/*
 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(Ob,Y){var lb=function(Va,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 Ka(a){return a instanceof Array?new Ag(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 x.__string_rec(this,"")},Q=Q||{},B,qa=function(){};t["lime.app.IModule"]=qa;qa.__name__="lime.app.IModule";qa.__isInterface__=!0;qa.prototype={__registerLimeModule:null,__unregisterLimeModule:null,__class__:qa};var sa=function(){this.onExit=new qm};t["lime.app.Module"]=sa;sa.__name__="lime.app.Module";sa.__interfaces__=[qa];sa.prototype={onExit:null,__registerLimeModule:function(a){},__unregisterLimeModule:function(a){},__class__:sa};var Ba=function(a){this.gameDeviceCache=
new Qd;this.parent=a;this.nextUpdate=this.lastUpdate=this.currentUpdate=0;this.framePeriod=-1;sd.init();this.accelerometer=hj.registerSensor(Nz.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=Se.__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 Xv;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&&(Se.__connect(b),g.isGamepad&&rf.__connect(b))}g=this.gameDeviceCache.h[b];d=Se.devices.h[b];c=rf.devices.h[b];if(f.connected){for(var q=0,v=f.buttons.length;q<v;){var w=q++;l=f.buttons[w].value;if(l!=g.buttons[w]){if(w==6)d.onAxisMove.dispatch(f.axes.length,
l),c!=null&&c.onAxisMove.dispatch(4,l);else if(w==7)d.onAxisMove.dispatch(f.axes.length+1,l),c!=null&&c.onAxisMove.dispatch(5,l);else if(l>0?d.onButtonDown.dispatch(w):d.onButtonUp.dispatch(w),c!=null){switch(w){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[w]=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,Se.__disconnect(b),rf.__disconnect(b))}},__class__:Ba};var Ma=function(){this.onDeviceOrientationChange=new Yv;this.onDisplayOrientationChange=new Zv;this.onCreateWindow=new $v;this.onUpdate=new qm;this.onExit=new qm;Ma.current==null&&(Ma.current=this);this.meta=new H;
this.modules=[];this.__windowByID=new Qd;this.__windows=[];this.__backend=new Ba(this);this.__registerLimeModule(this);this.__preloader=new aw;this.__preloader.onProgress.add(m(this,this.onPreloadProgress));this.__preloader.onComplete.add(m(this,this.onPreloadComplete))};t["lime.app.Application"]=Ma;Ma.__name__="lime.app.Application";Ma.__super__=sa;Ma.prototype=I(sa.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(){Ma.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),U.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 rm(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=rf.devices.iterator();a.hasNext();){var b=a.next();this.__onGamepadConnect(b)}rf.onConnect.add(m(this,this.__onGamepadConnect));
for(a=Se.devices.iterator();a.hasNext();)b=a.next(),this.__onJoystickConnect(b);Se.onConnect.add(m(this,this.__onJoystickConnect));Te.onCancel.add(m(this,this.onTouchCancel));Te.onStart.add(m(this,this.onTouchStart));Te.onMove.add(m(this,this.onTouchMove));Te.onEnd.add(m(this,this.onTouchEnd))},__removeWindow:function(a){a!=null&&this.__windowByID.h.hasOwnProperty(a.id)&&(this.__window==a&&(this.__window=null),U.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(),Ma.current==this&&(Ma.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));rf.onConnect.remove(m(this,this.__onGamepadConnect));Se.onConnect.remove(m(this,this.__onJoystickConnect));Te.onCancel.remove(m(this,this.onTouchCancel));Te.onStart.remove(m(this,this.onTouchStart));Te.onMove.remove(m(this,this.onTouchMove));Te.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__:Ma,__properties__:{get_windows:"get_windows",get_window:"get_window",get_preloader:"get_preloader",get_deviceOrientation:"get_deviceOrientation"}});var hc=function(){};t.ApplicationMain=hc;hc.__name__="ApplicationMain";hc.main=function(){Rb.__registerEntryPoint("TilBuci",hc.create)};hc.create=function(a){var b=new Oo;b.meta.h.build=
"116";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=u.fields(a);d<f.length;){var g=
f[d];++d;Object.prototype.hasOwnProperty.call(c,g)?c[g]=u.field(a,g):Object.prototype.hasOwnProperty.call(c.context,g)&&(c.context[g]=u.field(a,g))}b.createWindow(c);var h=new Wq(new S);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(){hc.start(n)});b.__preloader.load();b.exec()};hc.start=function(a){if(a.__uncaughtErrorEvents.__enabled)try{var b=a.getChildAt(0);b!=null&&b instanceof Ab||
(b=new ik,a.addChild(b));new Vf(b);a.dispatchEvent(new na("resize",!1,!1));a.window.__fullscreen&&a.dispatchEvent(new Lj("fullScreen",!1,!1,!0,!0))}catch(c){Pb.lastError=c,b=Z.caught(c).unwrap(),a.__handleError(b)}else b=a.getChildAt(0),b!=null&&b instanceof Ab||(b=new ik,a.addChild(b)),new Vf(b),a.dispatchEvent(new na("resize",!1,!1)),a.window.__fullscreen&&a.dispatchEvent(new Lj("fullScreen",!1,!1,!0,!0))};var Fb=function(){};t["openfl.events.IEventDispatcher"]=Fb;Fb.__name__="openfl.events.IEventDispatcher";
Fb.__isInterface__=!0;Fb.prototype={addEventListener:null,dispatchEvent:null,hasEventListener:null,removeEventListener:null,willTrigger:null,__class__:Fb};var ma=function(a){a!=null&&(this.__targetDispatcher=a)};t["openfl.events.EventDispatcher"]=ma;ma.__name__="openfl.events.EventDispatcher";ma.__interfaces__=[Fb];ma.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 H,this.__iterators=new H),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 sm(b,c,d,f))}else{var l=[];l.push(new sm(b,c,d,f));h=new Po(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 "+x.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 Po(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(La.get_current()!=null&&La.get_current().stage!=null&&La.get_current().stage.__uncaughtErrorEvents.__enabled)try{n(a)}catch(l){Pb.lastError=
l,h=Z.caught(l).unwrap(),a instanceof Bl||La.get_current().stage.__handleError(h)}else n(a)}else if(La.get_current()!=null&&La.get_current().stage!=null&&La.get_current().stage.__uncaughtErrorEvents.__enabled)try{h.callback(a)}catch(l){Pb.lastError=l,h=Z.caught(l).unwrap(),a instanceof Bl||La.get_current().stage.__handleError(h)}else h.callback(a);if(a.__isCanceledNow)break}}f.stop();f!=b[0]?U.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__:ma};var jc=function(){};t["openfl.display.IBitmapDrawable"]=jc;jc.__name__="openfl.display.IBitmapDrawable";jc.__isInterface__=!0;jc.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__:jc};var ub={__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=ub.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 ij(b,c,d)},toIntVector:function(a,b,c,d){return new jj(b,c,d)},toFloatVector:function(a,b,c,d){return new kj(b,c,d,!0)},toFunctionVector:function(a,b,c,d){return new lj(b,c,d)},toObjectVector:function(a,
b,c,d){return new Mi(b,c,d,!0)},toNullVector:function(a,b,c,d){return new Mi(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 jb;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 ha=function(){};t["haxe.IMap"]=ha;ha.__name__="haxe.IMap";ha.__isInterface__=!0;ha.prototype={get:null,set:null,exists:null,remove:null,keys:null,iterator:null,keyValueIterator:null,__class__:ha};var Ta=function(){this.h={__keys__:{}}};t["haxe.ds.ObjectMap"]=Ta;Ta.__name__="haxe.ds.ObjectMap";
Ta.__interfaces__=[ha];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 Ag(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 Cl(this)},toString:function(){var a="[";for(var b=this.keys();b.hasNext();){var c=b.next();a+=F.string(F.string(c));a+=" => ";a+=F.string(F.string(this.h[c.__id__]));b.hasNext()&&(a+=", ")}return a+"]"},__class__:Ta};var jb=function(){this.length=0};t["haxe.ds.List"]=jb;jb.__name__="haxe.ds.List";jb.prototype={h:null,q:null,length:null,
add:function(a){a=new Xq(a,null);this.h==null?this.h=a:this.q.next=a;this.q=a;this.length++},push:function(a){this.h=a=new Xq(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 bw(this.h)},__class__:jb};var ka=function(){this.__hasClippingLayer=!1;ma.call(this);this.__alpha=this.__drawableType=1;this.__blendMode=10;this.__cacheAsBitmap=!1;this.__transform=new hb;this.__visible=!0;this.__rotationSine=this.__rotation=0;this.__worldAlpha=this.__scaleY=this.__scaleX=this.__rotationCosine=1;this.__worldBlendMode=10;this.__worldTransform=new hb;this.__worldColorTransform=new id;
this.__renderTransform=new hb;this.__worldVisible=!0;this.set_name("instance"+ ++ka.__instanceCount);ka.__initStage!=null&&(this.stage=ka.__initStage,ka.__initStage=null,this.stage.addChild(this))};t["openfl.display.DisplayObject"]=ka;ka.__name__="openfl.display.DisplayObject";ka.__interfaces__=[jc];ka.__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};ka.__super__=ma;
ka.prototype=I(ma.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(ka.__broadcastEvents.h,
a)||(ka.__broadcastEvents.h[a]=[]);var g=ka.__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 jk(null),this.__customRenderEvent.objectColorTransform=new id,this.__customRenderEvent.objectMatrix=new hb,this.__customRenderClear=!0)}ma.prototype.addEventListener.call(this,a,b,c,d,f)},dispatchEvent:function(a){if(a instanceof Hc){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 Wf&&(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=hb.__pool.get();if(a!=null&&a!=this){b.copyFrom(this.__getWorldTransform());var c=hb.__pool.get();c.copyFrom(a.__getWorldTransform());
c.invert();b.concat(c);hb.__pool.release(c)}else b.identity();a=new Ha;this.__getBounds(a,b);hb.__pool.release(b);return a},getRect:function(a){return this.getBounds(a)},globalToLocal:function(a){return this.__globalToLocal(a,new Ca)},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);ma.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(ka.__broadcastEvents.h,a)&&U.remove(ka.__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=ma.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=ma.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=ka.__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)}ka.__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=Ha.__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;Ha.__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=Ha.__pool.get();c.copyFrom(this.__scrollRect);c.__transform(c,b);a.__expand(c.x,c.y,c.width,c.height);Ha.__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(ka.__supportDOM&&(this.__renderTransformChanged=!this.__renderTransform.equals(this.__renderTransformCache),this.__renderTransformCache==null?this.__renderTransformCache=this.__renderTransform.clone():this.__renderTransformCache.copyFrom(this.__renderTransform)),c!=null){if(ka.__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(),ka.__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 hb);this.__renderTransform==null&&(this.__renderTransform=new hb);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=Ha.__pool.get();this.__getLocalBounds(a);var b=a.height;Ha.__pool.release(a);return b},set_height:function(a){var b=Ha.__pool.get(),c=hb.__pool.get();c.identity();this.__getBounds(b,c);a!=b.height?this.set_scaleY(a/b.height):this.set_scaleY(1);
Ha.__pool.release(b);hb.__pool.release(c);return a},get_loaderInfo:function(){return this.stage!=null?jd.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:jd.current.stage.__mouseX,b=this.stage!=null?this.stage.__mouseY:jd.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:jd.current.stage.__mouseX,b=this.stage!=null?this.stage.__mouseY:jd.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?jd.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 Ha),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 Ha),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();ka.__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 Yq(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 Yq(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=Ha.__pool.get();this.__getLocalBounds(a);var b=a.width;Ha.__pool.release(a);return b},set_width:function(a){var b=Ha.__pool.get(),c=hb.__pool.get();c.identity();this.__getBounds(b,c);a!=b.width?this.set_scaleX(a/b.width):this.set_scaleX(1);Ha.__pool.release(b);hb.__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__:ka,__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 Ia=function(){ka.call(this);this.doubleClickEnabled=!1;this.mouseEnabled=
!0;this.needsSoftKeyboard=!1;this.__tabEnabled=null;this.__tabIndex=-1};t["openfl.display.InteractiveObject"]=Ia;Ia.__name__="openfl.display.InteractiveObject";Ia.__super__=ka;Ia.prototype=I(ka.prototype,{doubleClickEnabled:null,focusRect:null,mouseEnabled:null,needsSoftKeyboard:null,softKeyboardInputAreaOfInterest:null,__tabEnabled:null,__tabIndex:null,requestSoftKeyboard:function(){jd.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:ka.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 na("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 xe("Parameter tabIndex must be a non-negative number; got "+a);this.__tabIndex=a;this.dispatchEvent(new na("tabIndexChange",!0,!1))}return this.__tabIndex},__class__:Ia,__properties__:I(ka.prototype.__properties__,{set_tabIndex:"set_tabIndex",
get_tabIndex:"get_tabIndex",set_tabEnabled:"set_tabEnabled",get_tabEnabled:"get_tabEnabled"})});var Ab=function(){Ia.call(this);this.__tabChildren=this.mouseChildren=!0;this.__children=[];this.__removedChildren=ub.toObjectVector(null)};t["openfl.display.DisplayObjectContainer"]=Ab;Ab.__name__="openfl.display.DisplayObjectContainer";Ab.__super__=Ia;Ab.prototype=I(Ia.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 Db("Error #2024: An object cannot be added as a child of itself."),a.errorID=2024,a;if(a.stage==a)throw a=new Db("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 Z.thrown("Invalid index position "+b);if(a.parent==this)this.__children[b]!=a&&(U.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 na("added");c.bubbles=!0;c.target=a;a.__dispatchWithCapture(c);b&&(c=new na("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 na("removed",!0);a.__dispatchWithCapture(b);this.stage!=null&&(a.stage!=null&&this.stage.get_focus()==a&&this.stage.set_focus(null),b=new na("removedFromStage",
!1,!1),a.__dispatchWithCapture(b),a.__dispatchChildren(b),a.__setStageReference(null));a.parent=null;U.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 xe("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&&(U.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(){Ia.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){Ia.prototype.__getBounds.call(this,a,b);if(this.__children.length!=0){for(var c=hb.__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)}}hb.__pool.release(c)}},__getFilterBounds:function(a,b){Ia.prototype.__getFilterBounds.call(this,
a,b);if(this.__scrollRect==null&&this.__children.length!=0){for(var c=hb.__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=Ha.__pool.get();g.__getFilterBounds(h,c);a.__expand(h.x,h.y,h.width,h.height);Ha.__pool.release(h)}}hb.__pool.release(c)}},__getRenderBounds:function(a,b){if(this.__scrollRect!=
null)Ia.prototype.__getRenderBounds.call(this,a,b);else if(Ia.prototype.__getBounds.call(this,a,b),this.__children.length!=0){for(var c=hb.__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)}}hb.__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=Ca.__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 Ca.__pool.release(h),!1;Ca.__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){Ia.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){Ia.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){Ia.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){Ia.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 na("tabChildrenChange",!0,!1)));return this.__tabChildren},__class__:Ab,__properties__:I(Ia.prototype.__properties__,{set_tabChildren:"set_tabChildren",get_tabChildren:"get_tabChildren",get_numChildren:"get_numChildren"})});var Da=
function(){Ab.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__=Ab;Da.prototype=
I(Ab.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();Ab.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)||Xb.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=Ca.__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 Ca.__pool.release(h),this.__hitTestHitArea(a,b,c,d,!0,g);Ca.__pool.release(h)}return Ab.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 Ab.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 Th(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(Ab.prototype.__properties__,{get_graphics:"get_graphics",set_buttonMode:"set_buttonMode",get_buttonMode:"get_buttonMode"})});var ba=
function(){};t["feathers.core.IValidating"]=ba;ba.__name__="feathers.core.IValidating";ba.__isInterface__=!0;ba.prototype={get_depth:null,validateNow:null,__class__:ba,__properties__:{get_depth:"get_depth"}};var Xd=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"]=Xd;Xd.__name__="feathers.core.ValidatingSprite";Xd.__interfaces__=[ba];Xd.__super__=Da;Xd.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=x.getClass(this),new pb(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=ah.getDisplayObjectDepthFromStage(this);
this._validationQueue=kk.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__:Xd,__properties__:I(Da.prototype.__properties__,{get_depth:"get_depth",get_validating:"get_validating"})});var bd=function(){};t["feathers.core.IDisplayObject"]=bd;bd.__name__="feathers.core.IDisplayObject";bd.__isInterface__=!0;bd.__interfaces__=
[Fb];bd.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__:bd,__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 tb=function(){};t["feathers.core.IMeasureObject"]=tb;tb.__name__="feathers.core.IMeasureObject";tb.__isInterface__=!0;tb.__interfaces__=[bd];tb.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__:tb,__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 Cd=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;Xd.call(this)};t["feathers.core.MeasureSprite"]=Cd;Cd.__name__="feathers.core.MeasureSprite";Cd.__interfaces__=[tb];Cd.__super__=Xd;Cd.prototype=I(Xd.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){Xd.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){Xd.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(y.SIZE)):this.saveMeasurements(a,this.actualHeight,this.actualMinWidth,this.actualMinHeight,this.actualMaxWidth,this.actualMaxHeight)&&this.setInvalid(y.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(y.SIZE)):this.saveMeasurements(this.actualWidth,a,this.actualMinWidth,this.actualMinHeight,this.actualMaxWidth,this.actualMaxHeight)&&this.setInvalid(y.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(y.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(y.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(y.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(y.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(y.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(y.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(y.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(y.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 hb:this.__getBoundsHelperMatrix1.identity();if(a!=null&&a!=this){this.__getBoundsHelperMatrix2==null&&(this.__getBoundsHelperMatrix2=new hb);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 Ha(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,X.dispatch(this,"resize");return l},__class__:Cd,__properties__:I(Xd.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 R=function(){};t["feathers.layout.ILayoutObject"]=R;R.__name__="feathers.layout.ILayoutObject";R.__isInterface__=!0;R.__interfaces__=[Fb];R.prototype={get_includeInLayout:null,set_includeInLayout:null,get_layoutData:null,set_layoutData:null,__class__:R,__properties__:{set_layoutData:"set_layoutData",get_layoutData:"get_layoutData",set_includeInLayout:"set_includeInLayout",get_includeInLayout:"get_includeInLayout"}};
var Dd=function(){};t["feathers.style.IStyleObject"]=Dd;Dd.__name__="feathers.style.IStyleObject";Dd.__isInterface__=!0;Dd.prototype={get_themeEnabled:null,set_themeEnabled:null,__class__:Dd,__properties__:{set_themeEnabled:"set_themeEnabled",get_themeEnabled:"get_themeEnabled"}};var kd=function(){};t["feathers.style.IVariantStyleObject"]=kd;kd.__name__="feathers.style.IVariantStyleObject";kd.__isInterface__=!0;kd.__interfaces__=[Dd];kd.prototype={get_styleContext:null,get_variant:null,set_variant:null,
__class__:kd,__properties__:{set_variant:"set_variant",get_variant:"get_variant",get_styleContext:"get_styleContext"}};var Ea=function(){};t["feathers.core.IUIControl"]=Ea;Ea.__name__="feathers.core.IUIControl";Ea.__isInterface__=!0;Ea.__interfaces__=[bd];Ea.prototype={get_enabled:null,set_enabled:null,get_toolTip:null,set_toolTip:null,initializeNow:null,dispose:null,__class__:Ea,__properties__:{set_toolTip:"set_toolTip",get_toolTip:"get_toolTip",set_enabled:"set_enabled",get_enabled:"get_enabled"}};
var da=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;Cd.call(this);this.set_tabEnabled(x.__implements(this,od));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"]=da;da.__name__="feathers.core.FeathersControl";da.__interfaces__=[R,kd,Ea];da.__super__=Cd;da.prototype=I(Cd.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?Cd.prototype.set_alpha.call(this,
this._explicitAlpha):this._enabled||this._disabledAlpha==null||Cd.prototype.set_alpha.call(this,this._disabledAlpha);this.setInvalid(y.STATE);this._enabled?X.dispatch(this,"enable"):X.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(y.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(y.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;X.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)&&Cd.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?Cd.prototype.set_alpha.call(this,this._explicitAlpha):this._enabled||this._disabledAlpha==null||Cd.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 Cd.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?Cd.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&&x.__implements(this,od)&&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;Cd.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 Ca(-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);X.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(y.STYLES);return this._variant},_applyingStyles:null,_clearingStyles:null,_styleProviderStyles:null,_restrictedStyles:null,validateNow:function(){if(!this._initialized){if(this._initializing)throw new pb("A component cannot validate until after it has finished initializing.");
this.initializeNow()}this._waitingToApplyStyles&&this.applyStyles();Cd.prototype.validateNow.call(this);this._created||(this._created=!0,X.dispatch(this,"creationComplete"))},initializeNow:function(){this._initialized||this._initializing||(this._initializing=this._waitingToApplyStyles=!0,this.initialize(),this.setInvalid(),this._initializing=!1,this._initialized=!0,X.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);x.__implements(c,Ea)&&c.dispose()}},initialize:function(){},setStyle:function(a,b){a=b==null?Qo.Name(a):Qo.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)&&U.remove(this._styleProviderStyles,a),this._restrictedStyles.push(a));return!0},isStyleRestricted:function(a,b){a=b==null?Qo.Name(a):Qo.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(Eb.enumEq(b,d))return!0}return!1},applyStyles:function(){if(!this._initialized)throw new pb("Cannot apply styles until after a Feathers UI component has initialized.");this._waitingToApplyStyles=!1;var a=this._customStyleProvider;
if(a==null){var b=ac.getTheme(this);b!=null&&(a=b.getStyleProvider(this))}this._themeEnabled&&a==null&&(b=ac.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=u.field(this,d);if(f==null)throw new Db("Missing @style method: '"+d+"'");f.apply(this,[]);break;case 1:f=d.state,u.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;x.__implements(this,od)&&(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){X.dispatch(this,"layoutDataChange")},feathersControl_focusRect_enterFrameHandler:function(a){this.positionFocusRect()},__class__:da,__properties__:I(Cd.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 qb=function(){this.__layout=this.__backgroundSkin=this.__disabledBackgroundSkin=this.__maskSkin=null;this._layoutActive=this._layoutChanged=!1;this._xmlContent=null;this._autoSizeMode=Ue.CONTENT;this._currentBackgroundSkin=
this._backgroundSkinMeasurements=this._currentMaskSkin=null;this._ignoreChildChanges=this._ignoreChangesButSetFlags=this._ignoreLayoutChanges=!1;this._layoutMeasurements=new Sb;this._layoutResult=new Ng;this.items=[];this.initializeLayoutGroupTheme();da.call(this);this.addEventListener("addedToStage",m(this,this.layoutGroup_addedToStageHandler))};t["feathers.controls.LayoutGroup"]=qb;qb.__name__="feathers.controls.LayoutGroup";qb.__super__=da;qb.prototype=I(da.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(y.SIZE);this.stage!=null&&(this._autoSizeMode==Ue.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 da.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));x.__implements(a,R)&&a.addEventListener("layoutDataChange",m(this,this.layoutGroup_child_layoutDataChangeHandler),!1,0,!0);this._ignoreChangesButSetFlags?this.setInvalidationFlag(y.LAYOUT):this.setInvalid(y.LAYOUT);return b},_addChild:function(a){return da.prototype.addChildAt.call(this,
a,this.get__numChildren())},_addChildAt:function(a,b){return da.prototype.addChildAt.call(this,a,b)},removeChild:function(a){if(a==null||a.parent!=this)return a;U.remove(this.items,a);var b=this._removeChild(a);a.removeEventListener("resize",m(this,this.layoutGroup_child_resizeHandler));x.__implements(a,R)&&a.removeEventListener("layoutDataChange",m(this,this.layoutGroup_child_layoutDataChangeHandler));this._ignoreChangesButSetFlags?this.setInvalidationFlag(y.LAYOUT):this.setInvalid(y.LAYOUT);return b},
_removeChild:function(a){return da.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 da.prototype.removeChildAt.call(this,a)},getChildIndex:function(a){return this.items.indexOf(a)},_getChildIndex:function(a){return da.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 da.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 xe("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);da.prototype.removeChildren.call(this,a,b)},setChildIndex:function(a,b){this.getChildIndex(a)!=b&&(this._setChildIndex(a,this.getPrivateIndexForPublicIndex(b)),
U.remove(this.items,a),this.items.splice(b,0,a),this._ignoreChangesButSetFlags?this.setInvalidationFlag(y.LAYOUT):this.setInvalid(y.LAYOUT))},_setChildIndex:function(a,b){da.prototype.setChildIndex.call(this,a,b)},getChildAt:function(a){return this.items[a]},_getChildAt:function(a){return da.prototype.getChildAt.call(this,a)},readjustLayout:function(){this.setInvalid(y.LAYOUT)},initializeLayoutGroupTheme:function(){cw.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(y.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;da.prototype.validateNow.call(this);this._ignoreChangesButSetFlags=a},update:function(){var a=this;this._ignoreChangesButSetFlags=!1;var b=this.isInvalid(y.LAYOUT),c=this.isInvalid(y.SIZE),d=this.isInvalid(y.STYLES),f=this.isInvalid(y.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=x.getClass(a).__name__;var h=a.get_layout()!=null?x.getClass(a.get_layout()).__name__:"The layout";throw new pb(""+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:(x.__implements(a,Ea)&&a.initializeNow(),this._backgroundSkinMeasurements==null?this._backgroundSkinMeasurements=new Sb(a):this._backgroundSkinMeasurements.save(a),x.__implements(a,sb)&&a.set_uiContext(this),this._addChildAt(a,0))},removeCurrentBackgroundSkin:function(a){a!=null&&(x.__implements(a,sb)&&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&&(x.__implements(a,Ea)&&a.initializeNow(),x.__implements(a,sb)&&a.set_uiContext(this),this._addChild(a),this.set_mask(a))},removeCurrentMaskSkin:function(a){a!=null&&(x.__implements(a,sb)&&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),x.__implements(this._currentBackgroundSkin,ba)&&this._currentBackgroundSkin.validateNow());var h=this._autoSizeMode==Ue.CONTENT||
this.stage==null,n=0,l=0;if(!h){l=this.globalToLocal(new Ca);var q=this.globalToLocal(new Ca(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(!x.__implements(g,R)||g.get_includeInLayout()){x.__implements(g,ba)&&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),x.__implements(this._currentMaskSkin,ba)&&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),x.__implements(this._currentBackgroundSkin,ba)&&this._currentBackgroundSkin.validateNow())},validateChildren:function(){x.__implements(this._currentBackgroundSkin,ba)&&this._currentBackgroundSkin.validateNow();for(var a=0,b=this.items;a<b.length;){var c=b[a];++a;x.__implements(c,ba)&&c.validateNow()}},layoutGroup_addedToStageHandler:function(a){this._autoSizeMode==Ue.STAGE&&(this.setInvalid(y.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(y.SIZE)},layoutGroup_child_resizeHandler:function(a){this._ignoreChildChanges||
(this._ignoreChangesButSetFlags?this.setInvalidationFlag(y.LAYOUT):this.setInvalid(y.LAYOUT))},layoutGroup_child_layoutDataChangeHandler:function(a){this._ignoreChildChanges||(this._ignoreChangesButSetFlags?this.setInvalidationFlag(y.LAYOUT):this.setInvalid(y.LAYOUT))},layoutGroup_layout_changeHandler:function(a){this._ignoreLayoutChanges||(this._layoutActive?this._layoutChanged=!0:this._ignoreChangesButSetFlags?this.setInvalidationFlag(y.LAYOUT):this.setInvalid(y.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(y.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(y.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(y.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(y.STYLES);return this.__maskSkin},clearStyle_maskSkin:function(){this.set_maskSkin(null);return this.get_maskSkin()},get_styleContext:function(){return qb},__class__:qb,__properties__:I(da.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 Nb=function(){};t["feathers.core.IFocusManagerAware"]=Nb;Nb.__name__="feathers.core.IFocusManagerAware";Nb.__isInterface__=!0;Nb.prototype={get_focusManager:null,set_focusManager:null,__class__:Nb,__properties__:{set_focusManager:"set_focusManager",get_focusManager:"get_focusManager"}};var Wa=function(){this.__scaleManager=
null;this._scaleFactor=1;Wa._topLevelApplication==null&&(Wa._topLevelApplication=this);this.initializeApplicationTheme();qb.call(this);this.addEventListener("addedToStage",m(this,this.application_addedToStageHandler),!1,100)};t["feathers.controls.Application"]=Wa;Wa.__name__="feathers.controls.Application";Wa.__interfaces__=[Nb];Wa.__properties__={get_topLevelApplication:"get_topLevelApplication"};Wa.get_topLevelApplication=function(){return Wa._topLevelApplication};Wa.defaultPopUpContainerFactory=
function(){return new Da};Wa.__super__=qb;Wa.prototype=I(qb.prototype,{_scaleFactor:null,get_scaleFactor:function(){return this._scaleFactor},_currentScaleManager:null,popUpContainerFactory:null,_applicationPopUpContainer:null,_applicationFocusManager:null,_applicationToolTipManager:null,initializeApplicationTheme:function(){Zq.initialize()},update:function(){var a=this.isInvalid(y.SIZE),b=this.isInvalid(y.STYLES);(a||b)&&this.refreshScaleManager();qb.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=Wa.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(){Ed.hasRoot(this.stage)||(this._applicationFocusManager=Ed.addRoot(this.stage))},cleanupFocusManager:function(){this._applicationFocusManager!=null&&(this._applicationFocusManager=null,Ed.removeRoot(this.stage))},prepareToolTipManager:function(){ee.hasRoot(this.stage)||(this._applicationToolTipManager=ee.addRoot(this.stage))},cleanupToolTipManager:function(){this._applicationToolTipManager!=null&&(this._applicationToolTipManager=
null,ee.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 Wa},__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(y.STYLES);return this.__scaleManager},clearStyle_scaleManager:function(){this.set_scaleManager(null);return this.get_scaleManager()},__class__:Wa,__properties__:I(qb.prototype.__properties__,
{set_scaleManager:"set_scaleManager",get_scaleManager:"get_scaleManager",get_scaleFactor:"get_scaleFactor"})});var ua=function(){x.__cast(ac.get_fallbackTheme(),un).set_darkMode(!0);Wa.call(this);this.set_layout(new Ni);ua.mode="player";ua.movie="";ua.scene="";var a=this.get_loaderInfo().parameters;Object.prototype.hasOwnProperty.call(a,"mode")&&u.field(this.get_loaderInfo().parameters,"mode")=="editor"&&(ua.mode="editor");a=this.get_loaderInfo().parameters;Object.prototype.hasOwnProperty.call(a,
"movie")&&(ua.movie=u.field(this.get_loaderInfo().parameters,"movie"),a=this.get_loaderInfo().parameters,Object.prototype.hasOwnProperty.call(a,"scene")&&(ua.scene=u.field(this.get_loaderInfo().parameters,"scene")));a=this.get_loaderInfo().parameters;Object.prototype.hasOwnProperty.call(a,"decrypt")&&(ob.customDecrypt=u.field(this.get_loaderInfo().parameters,"decrypt"));a=this.get_loaderInfo().parameters;if(Object.prototype.hasOwnProperty.call(a,"vars")){try{var b=pi.decode(u.field(this.get_loaderInfo().parameters,
"vars")).toString()}catch(g){b=null}if(b!=null){a=Fa.jsonAsMap(b);b=Object.keys(a.h);for(var c=b.length,d=0;d<c;){var f=b[d++];ua.iniVars.h[f]=a.h[f]}}}a=this.get_loaderInfo().parameters;Object.prototype.hasOwnProperty.call(a,"moviePath")&&(ua.moviePath=u.field(this.get_loaderInfo().parameters,"moviePath"));a=this.get_loaderInfo().parameters;Object.prototype.hasOwnProperty.call(a,"assets")&&(ua.assetsPath=u.field(this.get_loaderInfo().parameters,"assets"));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?(ua.us=u.field(this.get_loaderInfo().parameters,"us"),ua.uk=u.field(this.get_loaderInfo().parameters,"uk")):ua.us=ua.uk="";if(this.stage==null)this.addEventListener("addedToStage",m(this,this.onStage));else this.onStage()};t.Main=ua;ua.__name__="Main";ua.__super__=Wa;ua.prototype=I(Wa.prototype,{_player:null,_editor:null,onStage:function(a){this.hasEventListener("addedToStage")&&this.removeEventListener("addedToStage",
m(this,this.onStage));ua.mode=="editor"?(this._editor=new lk(ua.assetsPath+"editor.json"),this._editor.registerPlugin(new Ro),this._editor.registerPlugin(new So),this._editor.registerPlugin(new To),this._editor.registerPlugin(new Uo),this._editor.registerPlugin(new qe),this.addChild(this._editor)):(this.stage.set_scaleMode(2),ua.mode="player",this._player=new og(ua.assetsPath+"player.json","player","landscape"),this._player.registerPlugin(new Ro),this._player.registerPlugin(new So),this._player.registerPlugin(new To),
this._player.registerPlugin(new Uo),this._player.registerPlugin(new qe),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__:ua});var Vf=function(a){a.addChild(this);ua.call(this);this.dispatchEvent(new na("addedToStage",!1,!1))};t.DocumentClass=Vf;Vf.__name__=
"DocumentClass";Vf.__super__=ua;Vf.prototype=I(ua.prototype,{__class__:Vf});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(F.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(F.string(a.getMinutes()),"0",2);case "R":return qc.__format(a,
"%H:%M");case "S":return N.lpad(F.string(a.getSeconds()),"0",2);case "T":return qc.__format(a,"%H:%M:%S");case "Y":return F.string(a.getFullYear());case "a":return qc.DAY_SHORT_NAMES[a.getDay()];case "d":return N.lpad(F.string(a.getDate()),"0",2);case "e":return F.string(a.getDate());case "b":case "h":return qc.MONTH_SHORT_NAMES[a.getMonth()];case "H":case "k":return N.lpad(F.string(a.getHours()),b=="H"?"0":" ",2);case "I":case "l":return a=a.getHours()%12,N.lpad(F.string(a==0?12:a),b=="I"?"0":" ",
2);case "m":return N.lpad(F.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 F.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 F.string(a.getDay());case "y":return N.lpad(F.string(a.getFullYear()%100),"0",2);default:throw new vn("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?U.substr(b,d,null):U.substr(b,d,g);c+=F.string(qc.__format_get(a,U.substr(b,f+1,1)));d=f+2}g=b.length-d;return c+=g==null?U.substr(b,d,null):U.substr(b,d,g)};qc.format=function(a,b){return qc.__format(a,b)};var Xa=function(a,b){this.r=new RegExp(a,b.split("u").join(""))};t.EReg=Xa;Xa.__name__="EReg";Xa.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 Z.thrown("EReg::matched");},matchedRight:function(){if(this.r.m==null)throw Z.thrown("No string matched");var a=this.r.m.index+this.r.m[0].length;return U.substr(this.r.s,a,this.r.s.length-a)},matchedPos:function(){if(this.r.m==null)throw Z.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:U.substr(a,0,b+c)),c=this.r.m!=null)this.r.s=a}else if(c=this.match(c<0?U.substr(a,b,null):U.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+=F.string(U.substr(a,c,null));break}var f=this.matchedPos();d+=F.string(U.substr(a,c,f.pos-c));d+=F.string(b(this));
f.len==0?(d+=F.string(U.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+=F.string(U.substr(a,c,null)));return d},__class__:Xa};var U=function(){};t.HxOverrides=U;U.__name__="HxOverrides";U.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)};U.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 Z.thrown("Invalid date format : "+a);}};U.cca=function(a,b){a=a.charCodeAt(b);if(a==a)return a};U.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)};U.remove=function(a,b){b=a.indexOf(b);if(b==-1)return!1;a.splice(b,1);return!0};U.keyValueIter=function(a){return new $q(a)};U.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 kb=function(){};t.Lambda=kb;kb.__name__="Lambda";kb.array=function(a){var b=[];for(a=Ka(a);a.hasNext();){var c=a.next();b.push(c)}return b};
kb.count=function(a,b){var c=0;if(b==null)for(b=Ka(a);b.hasNext();)b.next(),++c;else for(a=Ka(a);a.hasNext();){var d=a.next();b(d)&&++c}return c};Math.__name__="Math";var S=function(){Da.call(this);this._ast=new va;this._ast.addEventListener("change",m(this,this.onAstChange));this._ast.addEventListener("complete",m(this,this.onAstComplete));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=S;S.__name__="Preloader";S.__super__=Da;S.prototype=I(Da.prototype,{_ast:null,onProgress:function(a){},onComplete:function(a){a.stopImmediatePropagation();a.preventDefault()},onAstChange: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=this._ast.complete/100*this.stage.stageWidth;var b=this._ast.complete/100*this.stage.stageHeight;this.get_graphics().beginFill(0);this.get_graphics().drawRect(this.stage.stageWidth/2-a/2,this.stage.stageHeight/2-b/2,a,b);this.get_graphics().endFill()}},onAstComplete:function(a){this._ast.removeEventListener("change",m(this,this.onAstChange));this._ast.removeEventListener("complete",m(this,this.onAstComplete));this._ast=null;this.get_graphics().clear();a.preventDefault();this.dispatchEvent(new na("unload"))},
__class__:S});var u=function(){};t.Reflect=u;u.__name__="Reflect";u.field=function(a,b){try{return a[b]}catch(c){return Pb.lastError=c,null}};u.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]};u.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};u.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};u.isFunction=function(a){return typeof a=="function"?!(a.__name__||a.__ename__):!1};u.compare=function(a,b){return a==b?0:a>b?1:-1};u.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};u.isEnumValue=function(a){return a!=null?a.__enum__!=null:!1};u.deleteField=function(a,b){if(!Object.prototype.hasOwnProperty.call(a,b))return!1;delete a[b];
return!0};u.makeVarArgs=function(a){return function(){var b=arguments;b=Array.prototype.slice.call(b);return a(b)}};var F=function(){};t.Std=F;F.__name__="Std";F.string=function(a){return x.__string_rec(a,"")};F.parseInt=function(a){a=parseInt(a);return isNaN(a)?null:a};F.random=function(a){return a<=0?0:Math.floor(Math.random()*a)};var Za=function(){this.b=""};t.StringBuf=Za;Za.__name__="StringBuf";Za.prototype={b:null,__class__:Za};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=U.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?U.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?U.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 Pa=Q.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}};Pa.__constructs__=[Pa.TNull,Pa.TInt,Pa.TFloat,Pa.TBool,Pa.TObject,Pa.TFunction,Pa.TClass,Pa.TEnum,Pa.TUnknown];var Eb=function(){};t.Type=Eb;Eb.__name__="Type";Eb.resolveEnum=function(a){return Q[a]};Eb.createInstance=function(a,b){return new (Function.prototype.bind.apply(a,[null].concat(b)))};
Eb.createEnum=function(a,b,c){var d=u.field(a,b);if(d==null)throw Z.thrown("No such constructor "+b);if(u.isFunction(d)){if(c==null)throw Z.thrown("Constructor "+b+" need parameters");return d.apply(a,c)}if(c!=null&&c.length!=0)throw Z.thrown("Constructor "+b+" does not need parameters");return d};Eb.getInstanceFields=function(a){var b=[],c;for(c in a.prototype)b.push(c);U.remove(b,"__class__");U.remove(b,"__properties__");return b};Eb.typeof=function(a){switch(typeof a){case "boolean":return Pa.TBool;
case "function":return a.__name__||a.__ename__?Pa.TObject:Pa.TFunction;case "number":return Math.ceil(a)==a%2147483648?Pa.TInt:Pa.TFloat;case "object":if(a==null)return Pa.TNull;var b=a.__enum__;if(b!=null)return Pa.TEnum(Q[b]);a=x.getClass(a);return a!=null?Pa.TClass(a):Pa.TObject;case "string":return Pa.TClass(String);case "undefined":return Pa.TNull;default:return Pa.TUnknown}};Eb.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=Q[c].__constructs__[a._hx_index].__params__;for(c=0;c<d.length;){var f=d[c];++c;if(!Eb.enumEq(a[f],b[f]))return!1}}catch(g){return Pb.lastError=g,!1}return!0};Eb.enumParameters=function(a){var b=Q[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 Ua={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}},bc={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"}}},ib=function(a){this.nodeType=a;this.children=[];this.attributeMap=new H};t.Xml=ib;ib.__name__="Xml";ib.parse=function(a){return Dl.parse(a)};ib.createElement=function(a){var b=new ib(ib.Element);if(b.nodeType!=ib.Element)throw Z.thrown("Bad node type, expected Element but found "+(b.nodeType==null?"null":bc.toString(b.nodeType)));b.nodeName=a;return b};
ib.createPCData=function(a){var b=new ib(ib.PCData);if(b.nodeType==ib.Document||b.nodeType==ib.Element)throw Z.thrown("Bad node type, unexpected "+(b.nodeType==null?"null":bc.toString(b.nodeType)));b.nodeValue=a;return b};ib.createCData=function(a){var b=new ib(ib.CData);if(b.nodeType==ib.Document||b.nodeType==ib.Element)throw Z.thrown("Bad node type, unexpected "+(b.nodeType==null?"null":bc.toString(b.nodeType)));b.nodeValue=a;return b};ib.createComment=function(a){var b=new ib(ib.Comment);if(b.nodeType==
ib.Document||b.nodeType==ib.Element)throw Z.thrown("Bad node type, unexpected "+(b.nodeType==null?"null":bc.toString(b.nodeType)));b.nodeValue=a;return b};ib.createDocType=function(a){var b=new ib(ib.DocType);if(b.nodeType==ib.Document||b.nodeType==ib.Element)throw Z.thrown("Bad node type, unexpected "+(b.nodeType==null?"null":bc.toString(b.nodeType)));b.nodeValue=a;return b};ib.createProcessingInstruction=function(a){var b=new ib(ib.ProcessingInstruction);if(b.nodeType==ib.Document||b.nodeType==
ib.Element)throw Z.thrown("Bad node type, unexpected "+(b.nodeType==null?"null":bc.toString(b.nodeType)));b.nodeValue=a;return b};ib.createDocument=function(){return new ib(ib.Document)};ib.prototype={nodeType:null,nodeName:null,nodeValue:null,parent:null,children:null,attributeMap:null,get:function(a){if(this.nodeType!=ib.Element)throw Z.thrown("Bad node type, expected Element but found "+(this.nodeType==null?"null":bc.toString(this.nodeType)));return this.attributeMap.h[a]},set:function(a,b){if(this.nodeType!=
ib.Element)throw Z.thrown("Bad node type, expected Element but found "+(this.nodeType==null?"null":bc.toString(this.nodeType)));this.attributeMap.h[a]=b},exists:function(a){if(this.nodeType!=ib.Element)throw Z.thrown("Bad node type, expected Element but found "+(this.nodeType==null?"null":bc.toString(this.nodeType)));return Object.prototype.hasOwnProperty.call(this.attributeMap.h,a)},attributes:function(){if(this.nodeType!=ib.Element)throw Z.thrown("Bad node type, expected Element but found "+(this.nodeType==
null?"null":bc.toString(this.nodeType)));return new ar(this.attributeMap.h)},addChild:function(a){if(this.nodeType!=ib.Document&&this.nodeType!=ib.Element)throw Z.thrown("Bad node type, expected Element or Document but found "+(this.nodeType==null?"null":bc.toString(this.nodeType)));a.parent!=null&&a.parent.removeChild(a);this.children.push(a);a.parent=this},removeChild:function(a){if(this.nodeType!=ib.Document&&this.nodeType!=ib.Element)throw Z.thrown("Bad node type, expected Element or Document but found "+
(this.nodeType==null?"null":bc.toString(this.nodeType)));return U.remove(this.children,a)?(a.parent=null,!0):!1},toString:function(){return wn.print(this)},__class__:ib};var bh=function(){};t["feathers.core.IFocusExclusions"]=bh;bh.__name__="feathers.core.IFocusExclusions";bh.__isInterface__=!0;bh.__interfaces__=[Nb];bh.prototype={get_focusExclusions:null,__class__:bh,__properties__:{get_focusExclusions:"get_focusExclusions"}};var Gf=function(){};t["feathers.core.IOpenCloseToggle"]=Gf;Gf.__name__=
"feathers.core.IOpenCloseToggle";Gf.__isInterface__=!0;Gf.__interfaces__=[Ea];Gf.prototype={get_opened:null,set_opened:null,__class__:Gf,__properties__:{set_opened:"set_opened",get_opened:"get_opened"}};var Ve=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=Ue.STAGE;this._pendingAnimation=this._opened=!1;this._pendingOpened=null;
this._pullableEdge=pa.LEFT;this._ignoreDrawerResize=this._ignoreContentResize=!1;this._focusExclusions=[];this.initializeDrawerTheme();da.call(this);this.set_content(a);this.set_drawer(b);this.addEventListener("addedToStage",m(this,this.drawer_addedToStageHandler))};t["feathers.controls.Drawer"]=Ve;Ve.__name__="feathers.controls.Drawer";Ve.__interfaces__=[bh,Gf];Ve.__super__=da;Ve.prototype=I(da.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),x.__implements(this._drawer,Ea)&&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(y.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),U.remove(this._focusExclusions,this._content));this._content=a;this._content!=null&&(this.addChildAt(this._content,0),x.__implements(this._content,Ea)&&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(y.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(y.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(y.SIZE);this.stage!=null&&(this._autoSizeMode==Ue.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(y.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(y.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(y.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);da.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 Db("Cannot set opened property to true because drawer property is null");this.setInvalid(y.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 Db("Cannot set opened property to true because drawer property is null");this.setInvalid(y.DATA)}},initializeDrawerTheme:function(){dw.initialize()},initialize:function(){da.prototype.initialize.call(this);this._edgePuller==null&&(this._edgePuller=new pg(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(y.DATA),b=this.isInvalid(y.STATE),c=this.isInvalid(y.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!=Ue.CONTENT&&this.stage!=null){var h=this.globalToLocal(new Ca);f=this.globalToLocal(new Ca(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;x.__implements(this._content,tb)&&(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());x.__implements(this._content,ba)&&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);x.__implements(this._content,Ea)&&
this._content.set_enabled(this._enabled);x.__implements(this._drawer,Ea)&&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:(x.__implements(this._currentOverlaySkin,Ea)&&this._currentOverlaySkin.initializeNow(),this._overlaySkinMeasurements==null?this._overlaySkinMeasurements=
new Sb(this._currentOverlaySkin):this._overlaySkinMeasurements.save(this._currentOverlaySkin),this._overlaySkinAlpha=this._currentOverlaySkin.get_alpha(),x.__implements(this._currentOverlaySkin,sb)&&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)),
x.__implements(a,sb)&&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),
x.__implements(this._content,ba)&&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 Db("Unknown pullable edge position: "+F.string(this._pullableEdge));}x.__implements(this._drawer,ba)&&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 Db("Unknown pullable edge position: "+F.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 Db("Unknown pullable edge position: "+F.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 Db("Unknown pullable edge position: "+F.string(this._pullableEdge));}},clearFocusOnOpening:function(){if(this._focusManager!=null){if(this._focusManager.get_focus()==null)return;x.__implements(this._content,od)&&this._focusManager.get_focus()==this._content?
this._focusManager.set_focus(null):this._content instanceof Ab&&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 Ab&&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=Rd.forStage(this.stage);b=this._edgePuller.get_touchPointIsSimulated()?
c.claimMouse(this):c.claimTouch(b,this);if(!b){a.preventDefault();return}}(b=X.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){X.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;X.dispatch(this,"open");this.setInvalid(y.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;X.dispatch(this,"close");this.setInvalid(y.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)));X.dispatch(this,"cancel");this.setInvalid(y.STATE)},drawer_edgePuller_changeHandler:function(a){this.updateWithPullDistance()},drawer_addedToStageHandler:function(a){this._autoSizeMode==Ue.STAGE&&(this.setInvalid(y.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(y.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)>Ve.MAX_CLICK_DISTANCE_FOR_CLOSE||b>Ve.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)>
Ve.MAX_CLICK_DISTANCE_FOR_CLOSE||b>Ve.MAX_CLICK_DISTANCE_FOR_CLOSE||this.set_opened(!1)}},drawer_drawer_resizeHandler:function(a){this._ignoreDrawerResize||this.setInvalid(y.SIZE)},drawer_content_resizeHandler:function(a){this._ignoreContentResize||(this._contentMeasurements.save(this.get_content()),this.setInvalid(y.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(y.STYLES);return this.__overlaySkin},clearStyle_overlaySkin:function(){this.set_overlaySkin(null);return this.get_overlaySkin()},get_styleContext:function(){return Ve},__class__:Ve,__properties__:I(da.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 lk=function(a,b){b==null&&(b=!0);this._windows=new H;this._menus=new H;this._nocache=!0;Ve.call(this);this.build=new bb;this._nocache=b;k.econfig=new Gc(a,m(this,this.onConfig),b)};t["com.tilbuci.Editor"]=lk;lk.__name__="com.tilbuci.Editor";lk.__super__=Ve;lk.prototype=I(Ve.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 Tc;a.set_layout(new Ni);a.setPadding(10);var c=new fa;c.set_text(b);c.set_layoutData(cd.center());a.addChild(c);Aa.addPopUp(a,this)},onConfig:function(a){if(a)if(k.ln=new Nk,k.ln.get_ok()){k.ws=new br(k.econfig.get_ws());a=new H;if(ua.us!=""&&ua.uk!=""){var b=ua.us;a.h.us=b;b=ua.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 tm(k.econfig.get_font()+F.string(a[f].v),a[f].n)}k.acInfo=new ew;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 Gb(this.stage);window.TBB_startTabsChannel(m(this,this.onChannelMessage));this._devTimer=new Ec(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"&&(ua.scene!=""&&(k.sceneToLoad=ua.scene),ua.movie!=""&&this._player.player.load(ua.movie))},startInterface:function(){k.stage=
this.stage;this._interface=new Mj;this._interface.set_layoutData(cd.fill());this._interface.set_backgroundSkin(new wh);this.set_content(this._interface);this._leftArea=new cr(m(this,this.actionLeftInterface));this._centertArea=new le;this._centertArea.set_layout(new Ni);var a=new ab;a.set_fill(vb.SolidColor(10066329));this._centertArea.set_backgroundSkin(a);this._player=new dr(k.econfig.get_player(),m(this,this.playerCallback));this._playerControls=new er(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 xn;this._rightArea=new fr((B=this._playerControls,m(B,B.centerPlayer)),m(this,this.startWindow));a=this._menus;b=new gr(m(this,this.actionMenuMovie));a.h["left-movie"]=b;a=this._menus;b=new hr(m(this,this.actionMenuScene));a.h["left-scene"]=b;a=this._menus;b=new ir(m(this,this.actionMenuMedia));
a.h["left-media"]=b;a=this._menus;b=new jr(m(this,this.actionMenuContraptions));a.h["left-contraptions"]=b;a=this._menus;b=new kr(m(this,this.actionMenuNarrative));a.h["left-narrative"]=b;a=this._menus;b=new lr(m(this,this.actionMenuExchange));a.h["left-exchange"]=b;a=this._menus;b=new mr(m(this,this.actionMenuKeyframe));a.h["left-keyframe"]=b;this._playback=new nr((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 H;a.h.type="picture";a.h.call="menubrowseimgbg";b.h["Media/Single"]=a;this.showWindow("mediapicture");b=this._windows.h.mediapicture;a=new H;a.h.mode="single";b.action("setmode",a);break;case "menubrowseimgbt":b=k.temp;a=new H;a.h.type="picture";a.h.call="menubrowseimgbt";b.h["Media/Single"]=a;this.showWindow("mediapicture");
b=this._windows.h.mediapicture;a=new H;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 H;a.h.type="picture";a.h.call="messagesbrowseimgbg";b.h["Media/Single"]=a;this.showWindow("mediapicture");b=this._windows.h.mediapicture;a=new H;a.h.mode="single";b.action("setmode",a);break;case "messagesbrowseimgbt0":b=k.temp;
a=new H;a.h.type="picture";a.h.call="messagesbrowseimgbt0";b.h["Media/Single"]=a;this.showWindow("mediapicture");b=this._windows.h.mediapicture;a=new H;a.h.mode="single";b.action("setmode",a);break;case "messagesbrowseimgbt1":b=k.temp;a=new H;a.h.type="picture";a.h.call="messagesbrowseimgbt1";b.h["Media/Single"]=a;this.showWindow("mediapicture");b=this._windows.h.mediapicture;a=new H;a.h.mode="single";b.action("setmode",a);break;case "messagesbrowseimgbt2":b=k.temp;a=new H;a.h.type="picture";a.h.call=
"messagesbrowseimgbt2";b.h["Media/Single"]=a;this.showWindow("mediapicture");b=this._windows.h.mediapicture;a=new H;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 H;a.h.type="picture";a.h.call="landscapecover";b.h["Media/Single"]=a;this.showWindow("mediapicture");b=this._windows.h.mediapicture;a=new H;a.h.mode="single";b.action("setmode",a);break;case "menu-close":this.set_opened(!1);
break;case "portrait":b=k.temp;a=new H;a.h.type="picture";a.h.call="portraitcover";b.h["Media/Single"]=a;this.showWindow("mediapicture");b=this._windows.h.mediapicture;a=new H;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 H;a.h.type="picture";a.h.call="landscapebackground";b.h["Media/Single"]=a;this.showWindow("mediapicture");b=this._windows.h.mediapicture;a=new H;
a.h.mode="single";b.action("setmode",a);break;case "menu-close":this.set_opened(!1);break;case "portrait":b=k.temp;a=new H;a.h.type="picture";a.h.call="portraitbackground";b.h["Media/Single"]=a;this.showWindow("mediapicture");b=this._windows.h.mediapicture;a=new H;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 H;a.h.type="picture";a.h.call="targetdefault";b.h["Media/Single"]=
a;this.showWindow("mediapicture");b=this._windows.h.mediapicture;a=new H;a.h.mode="single";b.action("setmode",a);break;case "inst1":b=k.temp;a=new H;a.h.type="picture";a.h.call="targetinst1";b.h["Media/Single"]=a;this.showWindow("mediapicture");b=this._windows.h.mediapicture;a=new H;a.h.mode="single";b.action("setmode",a);break;case "inst2":b=k.temp;a=new H;a.h.type="picture";a.h.call="targetinst2";b.h["Media/Single"]=a;this.showWindow("mediapicture");b=this._windows.h.mediapicture;a=new H;a.h.mode=
"single";b.action("setmode",a);break;case "inst3":b=k.temp;a=new H;a.h.type="picture";a.h.call="targetinst3";b.h["Media/Single"]=a;this.showWindow("mediapicture");b=this._windows.h.mediapicture;a=new H;a.h.mode="single";b.action("setmode",a);break;case "interf":b=k.temp;a=new H;a.h.type="picture";a.h.call="targetinterf";b.h["Media/Single"]=a;this.showWindow("mediapicture");b=this._windows.h.mediapicture;a=new H;a.h.mode="single";b.action("setmode",a);break;case "menu-close":this.set_opened(!1);break;
case "menus":b=k.temp;a=new H;a.h.type="picture";a.h.call="targetmenus";b.h["Media/Single"]=a;this.showWindow("mediapicture");b=this._windows.h.mediapicture;a=new H;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 H;a.h.type="picture";a.h.call="formbackground";b.h["Media/Single"]=a;this.showWindow("mediapicture");b=this._windows.h.mediapicture;a=new H;a.h.mode="single";
b.action("setmode",a);break;case "formbtcancel":b=k.temp;a=new H;a.h.type="picture";a.h.call="formbtcancel";b.h["Media/Single"]=a;this.showWindow("mediapicture");b=this._windows.h.mediapicture;a=new H;a.h.mode="single";b.action("setmode",a);break;case "formbtok":b=k.temp;a=new H;a.h.type="picture";a.h.call="formbtok";b.h["Media/Single"]=a;this.showWindow("mediapicture");b=this._windows.h.mediapicture;a=new H;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 H;a.h.type="spritemap";a.h.call="intanim";b.h["Media/Single"]=a;this.showWindow("mediaspritemap");b=this._windows.h.mediaspritemap;a=new H;a.h.mode="single";b.action("setmode",a);break;case "intbackground":b=k.temp;a=new H;a.h.type="picture";a.h.call="intbackground";b.h["Media/Single"]=a;this.showWindow("mediapicture");b=this._windows.h.mediapicture;a=new H;a.h.mode="single";
b.action("setmode",a);break;case "intimage":b=k.temp;a=new H;a.h.type="picture";a.h.call="intimage";b.h["Media/Single"]=a;this.showWindow("mediapicture");b=this._windows.h.mediapicture;a=new H;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 H;a.h.type="audio";a.h.call="music";b.h["Media/Single"]=
a;this.showWindow("mediaaudio");b=this._windows.h.mediaaudio;a=new H;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 H;a.h.type="audio";a.h.call="sound";b.h["Media/Single"]=a;this.showWindow("mediaaudio");b=this._windows.h.mediaaudio;a=new H;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 H;a.h.type="picture";a.h.call="dflowbrowseimgbt";b.h["Media/Single"]=a;this.showWindow("mediapicture");b=this._windows.h.mediapicture;a=new H;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 H;a.h.type="picture";a.h.call="inventclose";b.h["Media/Single"]=a;this.showWindow("mediapicture");b=this._windows.h.mediapicture;a=new H;a.h.mode="single";b.action("setmode",a);break;case "inventh":b=k.temp;a=new H;a.h.type="picture";a.h.call="inventh";b.h["Media/Single"]=a;this.showWindow("mediapicture");b=this._windows.h.mediapicture;a=new H;a.h.mode="single";b.action("setmode",a);break;case "inventitem":b=k.temp;
a=new H;a.h.type="picture";a.h.call="inventitem";b.h["Media/Single"]=a;this.showWindow("mediapicture");b=this._windows.h.mediapicture;a=new H;a.h.mode="single";b.action("setmode",a);break;case "inventv":b=k.temp;a=new H;a.h.type="picture";a.h.call="inventv";b.h["Media/Single"]=a;this.showWindow("mediapicture");b=this._windows.h.mediapicture;a=new H;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 H;a.h.type="picture";a.h.call="battleattr";b.h["Media/Single"]=a;this.showWindow("mediapicture");b=this._windows.h.mediapicture;a=new H;a.h.mode="single";b.action("setmode",a);break;case "battleclose":b=k.temp;a=new H;a.h.type="picture";a.h.call="battleclose";b.h["Media/Single"]=a;this.showWindow("mediapicture");b=this._windows.h.mediapicture;a=new H;a.h.mode="single";b.action("setmode",a);break;case "battleh":b=k.temp;a=new H;a.h.type="picture";a.h.call=
"battleh";b.h["Media/Single"]=a;this.showWindow("mediapicture");b=this._windows.h.mediapicture;a=new H;a.h.mode="single";b.action("setmode",a);break;case "battlev":b=k.temp;a=new H;a.h.type="picture";a.h.call="battlev";b.h["Media/Single"]=a;this.showWindow("mediapicture");b=this._windows.h.mediapicture;a=new H;a.h.mode="single";b.action("setmode",a);break;case "imgcard":b=k.temp;a=new H;a.h.type="picture";a.h.call="imgcard";b.h["Media/Single"]=a;this.showWindow("mediapicture");b=this._windows.h.mediapicture;
a=new H;a.h.mode="single";b.action("setmode",a);break;case "itgraphic":b=k.temp;a=new H;a.h.type="picture";a.h.call="itgraphic";b.h["Media/Single"]=a;this.showWindow("mediapicture");b=this._windows.h.mediapicture;a=new H;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 H;a.h.type="audio";a.h.call="audiodialogue";b.h["Media/Single"]=
a;this.showWindow("mediaaudio");b=this._windows.h.mediaaudio;a=new H;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 H;a.h.type="\u00b4picture";a.h.call="browsefavicon";b.h["Media/Single"]=a;this.showWindow("mediapicture");b=this._windows.h.mediapicture;a=new H;a.h.mode="single";b.action("setmode",a);break;case "browseimage":b=k.temp;
a=new H;a.h.type="\u00b4picture";a.h.call="browseimage";b.h["Media/Single"]=a;this.showWindow("mediapicture");b=this._windows.h.mediapicture;a=new H;a.h.mode="single";b.action("setmode",a);break;case "browseloadingic":b=k.temp;a=new H;a.h.type="spritemap";a.h.call="browseloadingic";b.h["Media/Single"]=a;this.showWindow("mediaspritemap");b=this._windows.h.mediaspritemap;a=new H;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 H;a.h.type="picture";a.h.call="browsesceneimage";b.h["Media/Single"]=a;this.showWindow("mediapicture");b=this._windows.h.mediapicture;a=new H;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 H;a.h.type="picture";a.h.call="browsecordovaicon";b.h["Media/Single"]=a;this.showWindow("mediapicture");b=this._windows.h.mediapicture;a=new H;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 H;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 H;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 H;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 H;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 H;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 H;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 H;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 H;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 H,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 H;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=U.substr(Fa.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=U.substr(Fa.md5(c),0,10)}var f=d=-1;if(kb.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 H;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")+" "+U.dateStr(new Date),
m(this,this.onMediaAddStage),b.h.file):b.h.type=="paragraph"?this._player.createCollection(k.ln.get("menu-media-paragraph")+" "+U.dateStr(new Date),m(this,this.onMediaAddStage),b.h.file):b.h.type=="text"?this._player.createCollection(k.ln.get("menu-media-text")+" "+U.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=U.substr(Fa.md5(c),0,10);Object.prototype.hasOwnProperty.call(p.movie.collections.h[b.h.col].assets.h,a);)a=U.substr(Fa.md5(a),0,10);d=p.movie.collections.h[b.h.col].assets;c=new Nj({name:c,type:b.h.type,order:kb.count(p.movie.collections.h[b.h.col].assets),time:5,action:"loop",frames:F.parseInt(b.h.frames),frtime:F.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=U.substr(Fa.md5(a),0,10);;){d=p.movie.scene.keyframes[p.area.get_currentKf()];if(!Object.prototype.hasOwnProperty.call(d.h,c))break;c=U.substr(Fa.md5(c),0,10)}f=d=-1;if(kb.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 H;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 H;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 H;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 H;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 H;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 H;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 H;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 H;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 H,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 H;c.h.mode="newasset";a.action("setmode",c);break;case "html":this.showWindow("mediahtml");
a=this._windows.h.mediahtml;c=new H;c.h.mode="newasset";a.action("setmode",c);break;case "paragraph":this.showWindow("mediaparagraph");a=this._windows.h.mediaparagraph;c=new H;c.h.mode="newasset";a.action("setmode",c);break;case "picture":this.showWindow("mediapicture");a=this._windows.h.mediapicture;c=new H;c.h.mode="newasset";a.action("setmode",c);break;case "shape":this.showWindow("mediashape");a=this._windows.h.mediashape;c=new H;c.h.mode="newasset";a.action("setmode",c);break;case "spritemap":this.showWindow("mediaspritemap");
a=this._windows.h.mediaspritemap;c=new H;c.h.mode="newasset";a.action("setmode",c);break;case "text":this.showWindow("mediatext");a=this._windows.h.mediatext;c=new H;c.h.mode="newasset";a.action("setmode",c);break;case "video":this.showWindow("mediavideo"),a=this._windows.h.mediavideo,c=new H,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 H;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 H;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 H;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 H;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 H;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 H;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 H;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 H;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 H;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 H;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 H;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 H;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 H;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 H;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 H;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 H;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 H;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 H;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 H;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 H;
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 H;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 H;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 H;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 H;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 H;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 H;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 H;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 H;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 H;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 H;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 H;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 H;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 H;
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 H;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 H;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 H;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 H;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 H;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 H;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 H;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 H,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=U.substr(Fa.md5(a),0,10);var d=this._player,f=b.map.h.id,g=b.map.h.name,h=new H;h.h[a]={name:c,type:k.temp.h["media/addstage"].h.type,order:0,time:5,action:"",frames:F.parseInt(k.temp.h["media/addstage"].h.frames),frtime:F.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(kb.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 or(m(this,
this.actionAsset));c.h.assetbase=d;break;case "assistantcontraptions":c=this._windows;d=new pr(m(this,this.actionAssistant));c.h.assistantcontraptions=d;break;case "assistantdata":c=this._windows;d=new qr(m(this,this.actionAssistant));c.h.assistantdata=d;break;case "assistantinstance":c=this._windows;d=new rr(m(this,this.actionAssistant));c.h.assistantinstance=d;break;case "assistantnarrative":c=this._windows;d=new sr(m(this,this.actionAssistant));c.h.assistantnarrative=d;break;case "assistantplugin":c=
this._windows;d=new tr(m(this,this.actionAssistant));c.h.assistantplugin=d;break;case "assistantplus":c=this._windows;d=new ur(m(this,this.actionAssistant));c.h.assistantplus=d;break;case "assistantruntime":c=this._windows;d=new vr(m(this,this.actionAssistant));c.h.assistantruntime=d;break;case "assistantscene":c=this._windows;d=new wr(m(this,this.actionAssistant));c.h.assistantscene=d;break;case "assistantvariables":c=this._windows;d=new xr(m(this,this.actionAssistant));c.h.assistantvariables=d;
break;case "background":c=this._windows;d=new yr(m(this,this.actionWindowContrBackground));c.h.background=d;break;case "collectionbase":c=this._windows;d=new zr(m(this,this.actionCollection));c.h.collectionbase=d;break;case "cover":c=this._windows;d=new Ar(m(this,this.actionWindowContrCover));c.h.cover=d;break;case "designnotes":c=this._windows;d=new Br(m(this,this.actionWindowNotes));c.h.designnotes=d;break;case "dflowscene":c=this._windows;d=new Cr(m(this,this.actionScene));c.h.dflowscene=d;break;
case "exchangecord":c=this._windows;d=new Dr(m(this,this.actionExchange));c.h.exchangecord=d;break;case "exchangedesk":c=this._windows;d=new Er(m(this,this.actionExchange));c.h.exchangedesk=d;break;case "exchangeexport":c=this._windows;d=new Fr(m(this,this.actionExchange));c.h.exchangeexport=d;break;case "exchangeiframe":c=this._windows;d=new Gr(m(this,this.actionExchange));c.h.exchangeiframe=d;break;case "exchangeimport":c=this._windows;d=new Hr(m(this,this.actionExchange));c.h.exchangeimport=d;
break;case "exchangepub":c=this._windows;d=new Ir(m(this,this.actionExchange));c.h.exchangepub=d;break;case "exchangepwa":c=this._windows;d=new Jr(m(this,this.actionExchange));c.h.exchangepwa=d;break;case "exchangewebsite":c=this._windows;d=new Kr(m(this,this.actionExchange));c.h.exchangewebsite=d;break;case "form":c=this._windows;d=new Lr(m(this,this.actionWindowContrForm));c.h.form=d;break;case "interfaces":c=this._windows;d=new Mr(m(this,this.actionWindowContrInterf));c.h.interfaces=d;break;case "kfmanage":c=
this._windows;d=new Nr(m(this,this.actionKeyframe));c.h.kfmanage=d;break;case "login":c=this._windows;d=new Or(m(this,this.actionWindowLogin));c.h.login=d;break;case "mediaaudio":c=this._windows;d=new Pr(m(this,this.actionMedia),"simple");c.h.mediaaudio=d;break;case "mediacollection":c=this._windows;d=new Qr(m(this,this.actionMedia));c.h.mediacollection=d;break;case "mediacollectionadd":c=this._windows;d=new Rr(m(this,this.actionMedia));c.h.mediacollectionadd=d;break;case "mediacollectionrm":c=this._windows;
d=new Sr(m(this,this.actionMedia));c.h.mediacollectionrm=d;break;case "mediaembed":c=this._windows;d=new Tr(m(this,this.actionMedia));c.h.mediaembed=d;break;case "mediahtml":c=this._windows;d=new Ur(m(this,this.actionMedia),"simple");c.h.mediahtml=d;break;case "mediaparagraph":c=this._windows;d=new Vr(m(this,this.actionMedia),"simple");c.h.mediaparagraph=d;break;case "mediapicture":c=this._windows;d=new Wr(m(this,this.actionMedia),"simple");c.h.mediapicture=d;break;case "mediashape":c=this._windows;
d=new Xr(m(this,this.actionMedia),"simple");c.h.mediashape=d;break;case "mediaspritemap":c=this._windows;d=new Yr(m(this,this.actionMedia),"simple");c.h.mediaspritemap=d;break;case "mediastrings":c=this._windows;d=new Zr(m(this,this.actionMedia));c.h.mediastrings=d;break;case "mediatext":c=this._windows;d=new $r(m(this,this.actionMedia),"simple");c.h.mediatext=d;break;case "mediavideo":c=this._windows;d=new as(m(this,this.actionMedia),"simple");c.h.mediavideo=d;break;case "menus":c=this._windows;
d=new bs(m(this,this.actionWindowContrMenu));c.h.menus=d;break;case "messages":c=this._windows;d=new cs(m(this,this.actionWindowContrMessages));c.h.messages=d;break;case "music":c=this._windows;d=new ds(m(this,this.actionWindowContrMusic));c.h.music=d;break;case "narrative-battle":c=this._windows;d=new es(m(this,this.actionWindowNarrBattle));c.h["narrative-battle"]=d;break;case "narrative-char":c=this._windows;d=new fs(m(this,this.actionWindowNarrChar));c.h["narrative-char"]=d;break;case "narrative-dflow":c=
this._windows;d=new gs(m(this,this.actionWindowNarrDflow));c.h["narrative-dflow"]=d;break;case "narrative-diag":c=this._windows;d=new hs(m(this,this.actionWindowDiagChar));c.h["narrative-diag"]=d;break;case "narrative-inventory":c=this._windows;d=new is(m(this,this.actionWindowNarrInventory));c.h["narrative-inventory"]=d;break;case "newmovie":c=this._windows;d=new js(m(this,this.actionMovie));c.h.newmovie=d;break;case "newscene":c=this._windows;d=new ks(m(this,this.actionScene));c.h.newscene=d;break;
case "openmovie":c=this._windows;d=new ls(m(this,this.actionMovie));c.h.openmovie=d;break;case "openscene":c=this._windows;d=new ms(m(this,this.actionScene));c.h.openscene=d;break;case "pluginmovie":c=this._windows;d=new ns(m(this,this.actionMovie));c.h.pluginmovie=d;break;case "propmovie":c=this._windows;d=new os(m(this,this.actionMovie));c.h.propmovie=d;break;case "propscene":c=this._windows;d=new ps(m(this,this.actionScene));c.h.propscene=d;break;case "removemovie":c=this._windows;d=new qs(m(this,
this.actionMovie));c.h.removemovie=d;break;case "republish":c=this._windows;d=new rs(m(this,this.actionMovie));c.h.republish=d;break;case "saveasscene":c=this._windows;d=new ss(m(this,this.actionScene));c.h.saveasscene=d;break;case "seqmovie":c=this._windows;d=new ts(m(this,this.actionMovie));c.h.seqmovie=d;break;case "setup":c=this._windows;d=new us(m(this,this.actionWindowSetup),this.build);c.h.setup=d;break;case "snippets":c=this._windows;d=new vs(m(this,this.actionMovie));c.h.snippets=d;break;
case "sound":c=this._windows;d=new ws(m(this,this.actionWindowContrSound));c.h.sound=d;break;case "targets":c=this._windows;d=new xs(m(this,this.actionWindowContrTarget));c.h.targets=d;break;case "testactions":c=this._windows;d=new ys(m(this,this.actionWindowTestingActions));c.h.testactions=d;break;case "timedaction":c=this._windows;d=new zs(m(this,this.actionTimed));c.h.timedaction=d;break;case "usermovie":c=this._windows;d=new As(m(this,this.actionMovie));c.h.usermovie=d;break;case "versionscene":c=
this._windows;d=new Bs(m(this,this.actionScene));c.h.versionscene=d;break;case "visitors":c=this._windows;d=new Cs(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 H;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=x.__cast(u.field(b.map.h.info,"isOwner"),fw),k.mvCollaborator=x.__cast(u.field(b.map.h.info,"isCollaborator"),fw)),this._playerControls.updateDisplay(),k.sceneToLoad!=""&&(p.movie.loadScene(k.sceneToLoad),k.sceneToLoad=""),k.acInfo.loadInfo(!0))},__class__:lk});var og=function(a,b,c,d,f){d==null&&(d=!0);this._touchDistance=this._touchDistanceCheck=this._touchStartTime=this._lastmwheel=0;this._touchStart=new Ca;
this._toggles=new H;this._numerics=new H;this._tareas=new H;this._inputs=new H;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")+"_"+Fa.random();p.session=U.substr(p.session,0,32);b==null&&(b="player");this.setMode(b);p.build=new bb(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 H,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"]=og;og.__name__="com.tilbuci.Player";og.__super__=Da;og.prototype=I(Da.prototype,{label:null,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 gw(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 Tc;a.set_layout(new Ni);a.setPadding(10);var c=new fa;c.set_text(b);c.set_layoutData(cd.center());a.addChild(c);Aa.addPopUp(a,this)},onPlayerConf:function(a,b,c){c==null&&(c=!1);if(c)p.ln=new Nk,p.base="./",p.font="./font/",p.render="webgl",p.share="never",ua.moviePath!=""&&(p.base=ua.moviePath),p.fps="free",p.secret=Na.ofHex(""),
Object.prototype.hasOwnProperty.call(ua,"ws")&&u.field(ua,"ws")!=""?(p.ws=new yn(u.field(ua,"ws"),""),p.server=!0):(p.ws=new yn("./ws/",""),p.server=!1),p.movie=new um(m(this,this.onMovie),m(this,this.onScene)),p.parser=new Oi,p.parser.eventSend=m(this,this.warnListeners),p.ready=!0,p.mode=="player"&&ua.us!=""&&ua.uk!=""&&p.ws.checkVisitorKey(ua.us,ua.uk,m(this,this.onKeyCheck)),this._bgarea=new Da,p.mode!="editor"&&this.addChild(this._bgarea),this._uiArea=new Da,p.area=new El(this,this._bgarea,this._uiArea),
this.addChild(p.area),this.addChild(this._uiArea),this.initializePlugins(),new Ds,p.mode=="player"&&(this._firstScene=this._firstMovie=!0);else if(a)if(p.ln=new Nk,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=Na.ofHex(b.map.h.secret);p.ws=new yn(b.map.h.ws,"");p.movie=new um(m(this,this.onMovie),m(this,this.onScene));p.parser=new Oi;p.parser.eventSend=m(this,this.warnListeners);ua.moviePath!=
""&&(p.base=ua.moviePath);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 tm(p.font+a[f].file,a[f].name)}}ua.us!=""&&ua.uk!=""&&p.ws.checkVisitorKey(ua.us,ua.uk,m(this,this.onKeyCheck))}new Ds;p.ready=!0;this._bgarea=new Da;p.mode!="editor"&&this.addChild(this._bgarea);this._uiArea=new Da;p.area=new El(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(ua,"movie")&&(a=u.field(ua,"movie")),a==""?this.load(b.map.h.start):(this.load(a),Object.prototype.hasOwnProperty.call(ua,"movie")&&(ua.movie="")));p.fps!="free"&&p.fps!="calc"&&(b=F.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(ua.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));if(this._firstMovie){var b=ua.iniVars.h;a=Object.keys(b);var c=a.length;
for(b=0;b<c;){var d=a[b++];p.parser.setString(d,ua.iniVars.h[d])}}a=[];c=b=p.plugins.h;b=Object.keys(b);d=b.length;for(var f=0;f<d;){var g=c[b[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&&(c=p.callback,b=new H,d=p.movie.get_mvId(),b.h.id=d,c("movieload",b));ye.trace(p.mdata.title+" movie loaded.",{fileName:"Source/com/tilbuci/Player.hx",lineNumber:599,className:"com.tilbuci.Player",
methodName:"onMovie"});a.length==0?ye.trace("No plugins used.",{fileName:"Source/com/tilbuci/Player.hx",lineNumber:600,className:"com.tilbuci.Player",methodName:"onMovie"}):ye.trace("Plugins used: "+a.join(", ")+".",{fileName:"Source/com/tilbuci/Player.hx",lineNumber:601,className:"com.tilbuci.Player",methodName:"onMovie"});b=new H;d=p.movie.get_mvId();b.h.id=d;b.h.title=p.mdata.title;this.dispatchEvent(new Ok("movie_loaded",b))}},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 Ec(2E3);this._fpsStart.run=m(this,this.fpsCount)}p.callback!=null&&(a=p.callback,b=new H,c=p.movie.get_scId(),b.h.id=c,a("sceneload",b));b=new H;c=p.movie.get_scId();b.h.id=c;b.h.title=p.movie.scene.title;this.dispatchEvent(new Ok("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 Ec(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=F.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 Ec(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 Ec(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 Ec(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 dd&&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 dd&&(p.parser.checkMouse("mousemiddle"),p.parser.hadInteraction=!0)},onMouseRight:function(a){this.stage.showDefaultContextMenu=!0;this.stage.get_focus()instanceof dd&&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 Ok("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 pd;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 sf;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 qd(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 Pk(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__:og,__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 xh=function(a){this.ok=!1;Da.call(this);a!=null&&this.load(a)};t["com.tilbuci.contraptions.BackgroundContraption"]=xh;xh.__name__="com.tilbuci.contraptions.BackgroundContraption";xh.__super__=Da;xh.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 xh(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=u.field(a,"id"),Object.prototype.hasOwnProperty.call(a,"portrait")?(this.portrait=u.field(a,"portrait"),
this.portrait!=""&&(this._portrait=new Zc(m(this,this.onPicLoad)),this._portrait.set_visible(!0))):this.portrait="",Object.prototype.hasOwnProperty.call(a,"landscape")?(this.landscape=u.field(a,"landscape"),this.landscape!=""&&(this._landscape=new Zc(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__:xh});var Uh=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 ch;this._opponentData=new ch};t["com.tilbuci.contraptions.BattleContraption"]=Uh;Uh.__name__="com.tilbuci.contraptions.BattleContraption";Uh.__super__=Da;Uh.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 Ec(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)),Pi.shake(this._player,.5,10),Pi.quickJump(this._opponent,.5,30),this._timer=new Ec(500),this._timer.run=
m(this,this.onLoose)):a>b?(this.soundwin!=""&&p.contraptions.soundPlay(p.parser.parseString(this.soundwin)),Pi.quickJump(this._player,.5,30),Pi.shake(this._opponent,.5,10),this._timer=new Ec(500),this._timer.run=m(this,this.onWin)):(this.soundtie!=""&&p.contraptions.soundPlay(p.parser.parseString(this.soundtie)),Pi.shake(this._player,.5,5),Pi.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 Xf(m(this,this.draw),!0,m(this,this.compare),this._playerData)),this._opponent==null&&(this._opponent=new Xf(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 Fl(m(this,this.draw))),this._opponentCurent==null&&(this._opponentCurent=new Fl(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 Ca(p.mdata.screen.big/2-1.5*this._cbitmap.get_width(),p.mdata.screen.small-this._cbitmap.get_height()-this.btAtrHeight()*2),p.focusMode?this._hbitmap.set_filters([new Hf(new qi)]):this._hbitmap.set_filters([])):(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 Ca(this._vbitmap.get_width()-
2*this._cbitmap.get_width(),this._vbitmap.get_height()/2-this._cbitmap.get_height()/2-this.btAtrHeight()*2),p.focusMode?this._vbitmap.set_filters([new Hf(new qi)]):this._vbitmap.set_filters([])),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 Uh;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=u.field(a,"id");Object.prototype.hasOwnProperty.call(a,"font")?this.font=u.field(a,"font"):this.font="sans";Object.prototype.hasOwnProperty.call(a,"fontcolor")?this.fontcolor=u.field(a,"fontcolor"):this.fontcolor="0xffffff";Object.prototype.hasOwnProperty.call(a,"fontsize")?this.fontsize=u.field(a,
"fontsize"):this.fontsize=20;Object.prototype.hasOwnProperty.call(a,"vertical")?this.vertical=u.field(a,"vertical"):this.vertical="";Object.prototype.hasOwnProperty.call(a,"horizontal")?this.horizontal=u.field(a,"horizontal"):this.horizontal="";Object.prototype.hasOwnProperty.call(a,"close")?this.close=u.field(a,"close"):this.close="";Object.prototype.hasOwnProperty.call(a,"attrbg")?this.attrbg=u.field(a,"attrbg"):this.attrbg="";Object.prototype.hasOwnProperty.call(a,"card")?this.card=u.field(a,"card"):
this.card="";Object.prototype.hasOwnProperty.call(a,"soundpick")?this.soundpick=u.field(a,"soundpick"):this.soundpick="";Object.prototype.hasOwnProperty.call(a,"soundwin")?this.soundwin=u.field(a,"soundwin"):this.soundwin="";Object.prototype.hasOwnProperty.call(a,"soundloose")?this.soundloose=u.field(a,"soundloose"):this.soundloose="";Object.prototype.hasOwnProperty.call(a,"soundtie")?this.soundtie=u.field(a,"soundtie"):this.soundtie="";Object.prototype.hasOwnProperty.call(a,"attributes")?(a=u.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=Fa.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 Zc(m(this,this.onBTLoad)));this._cbitmap.load(this.close);return!0}return!1},loadGraphics:function(){this.ok=!1;this.fontcolor=Fa.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 Zc(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 Zc(m(this,this.onAttrLoad))),this._abitmap.load(this.attrbg)},onAttrLoad:function(a){if(this.ok=a)this._hbitmap==null&&(this._hbitmap=
new Zc(m(this,this.onBgLoad))),this._hbitmap.load(this.horizontal),this._vbitmap==null&&(this._vbitmap=new Zc(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 me(p.mdata.highlightInt,1,4,4,255,1,!0)]))},onCloseOut:function(a){this._cbitmap.set_filters([])},__class__:Uh});var Xf=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 Zc(m(this,this.onPic));this.background=new Zc(m(this,this.onBg));this.attributes.push(new Qi(0,b,c));this.attributes.push(new Qi(1,b,c));this.attributes.push(new Qi(2,b,c));this.attributes.push(new Qi(3,b,c));this.attributes.push(new Qi(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"]=Xf;
Xf.__name__="com.tilbuci.contraptions.BattleCard";Xf.__super__=Da;Xf.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)}p.focusMode?this.background.set_filters([new Hf(new qi)]):this.background.set_filters([])},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]);Pi.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__:Xf});var Qi=function(a,b,c){this._player=!1;Da.call(this);this.id=a;this._player=b;this._compare=c;this.graphic=new Zc(m(this,this.onPic));this.text=new Ic;this.value=new Ic;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"]=Qi;Qi.__name__="com.tilbuci.contraptions.AttributeButton";Qi.__super__=Da;Qi.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,Fa.colorInt(p.contraptions.bs.h.bs.fontcolor),null,null,null,null,null,Qk.fromString("left")));this.value.set_defaultTextFormat(new ef(p.contraptions.bs.h.bs.font,
p.contraptions.bs.h.bs.fontsize,Fa.colorInt(p.contraptions.bs.h.bs.fontcolor),null,null,null,null,null,Qk.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 me(p.mdata.highlightInt,1,4,4,255,1,!0)]))},onOut:function(a){this.set_filters([])},__class__:Qi});var Fl=function(a){this.cards=[];Da.call(this);this.mouseEnabled=!1;this.cards.push(new Zc(m(this,this.onCard)));this.cards.push(new Zc(m(this,this.onCard)));this.cards.push(new Zc(m(this,this.onCard)));this.cards.push(new Zc(m(this,this.onCard)));
this.cards.push(new Zc(m(this,this.onCard)));this._draw=a};t["com.tilbuci.contraptions.CurrentCards"]=Fl;Fl.__name__="com.tilbuci.contraptions.CurrentCards";Fl.__super__=Da;Fl.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__:Fl});var ch=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"]=ch;ch.__name__="com.tilbuci.contraptions.BattleData";ch.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__:ch};var Rk=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 Zc(m(this,
this.onLoad));this._img.load(c);this.addChild(this._img);this._img.set_visible(!0);this._text=new Ic;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"]=Rk;Rk.__name__="com.tilbuci.contraptions.ContraptionButton";
Rk.__super__=Da;Rk.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 me(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__:Rk});var Gl=function(){this.interf=new H;this._formcurrent="";this.forms=new H;this.sounds=new H;this.musics=new H;this.backgrounds=new H;this.targets=new H;this.covers=new H;this.usingMessages=
!1;this._messagesCurrent=null;this.messages=new H;this.usingBs=!1;this._bsCurrent=null;this.bs=new H;this.usingInv=!1;this._invCurrent=null;this.inv=new H;this.usingDflow=!1;this._dflowCurrent=null;this.dflow=new H;this.usingMenu=!1;this._menuCurrent=null;this.menus=new H};t["com.tilbuci.contraptions.Contraptions"]=Gl;Gl.__name__="com.tilbuci.contraptions.Contraptions";Gl.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 H,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 Fa.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(F.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 Sk(m(this,this.onLoadingIc)),this._loadingOverlay.addChild(this._loadingIc)):this._loadingIc==
null&&(this._loadingOverlay.set_visible(!1),this._loadingIc=new Sk(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=F.parseInt(p.mdata.loadingic[1]),this._loadingIc.frtime=F.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 Zc(m(this,this.onZoomPic)),this._zoomPicture.set_visible(!1),this._zoomOverlay.addChild(this._zoomPicture),this._zoomVideo=new zn(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),p.focusMode?this._coverOverlay.set_filters([new Hf(new qi)]):this._coverOverlay.set_filters([]),!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),p.focusMode?this._backgroundOverlay.set_filters([new Hf(new qi)]):this._backgroundOverlay.set_filters([]),!0):!1},hideBackground:function(){this.getLayers();this._backgroundOverlay.removeChildren();this._backgroundOverlay.set_visible(!1);this._backgroundOverlay.mouseEnabled=!1},setFocus:function(){p.focusMode?(this._backgroundOverlay.get_visible()&&
this._backgroundOverlay.set_filters([new Hf(new qi)]),this._coverOverlay.get_visible()&&this._coverOverlay.set_filters([new Hf(new qi)])):(this._backgroundOverlay.get_visible()&&this._backgroundOverlay.set_filters([]),this._coverOverlay.get_visible()&&this._coverOverlay.set_filters([]))},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__:Gl};var Ri=function(a){this.ok=
!1;Da.call(this);a!=null&&this.load(a)};t["com.tilbuci.contraptions.CoverContraption"]=Ri;Ri.__name__="com.tilbuci.contraptions.CoverContraption";Ri.__super__=Da;Ri.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 Ri(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=u.field(a,"id"),Object.prototype.hasOwnProperty.call(a,"click")?this.holdClick=u.field(a,"click"):this.holdClick=!1,Object.prototype.hasOwnProperty.call(a,"portrait")?(this.portrait=u.field(a,"portrait"),this.portrait!=""&&(this._portrait=new Zc(m(this,this.onPicLoad)),this._portrait.set_visible(!0))):this.portrait="",
Object.prototype.hasOwnProperty.call(a,"landscape")?(this.landscape=u.field(a,"landscape"),this.landscape!=""&&(this._landscape=new Zc(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__:Ri});var Fd=function(){this._options=[];this._buttons=[];this.menuSize=new Ca;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"]=Fd;Fd.__name__="com.tilbuci.contraptions.DflowContraption";Fd.__super__=Da;Fd.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 Rk(f==null?"null":""+f,m(this,this.onClick),this.buton,a[f][0],this.font,this.fontsize,Fa.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 Fd;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=u.field(a,"id"),Object.prototype.hasOwnProperty.call(a,"font")?this.font=u.field(a,"font"):this.font="sans",Object.prototype.hasOwnProperty.call(a,"fontcolor")?this.fontcolor=u.field(a,"fontcolor"):this.fontcolor="0xffffff",Object.prototype.hasOwnProperty.call(a,"fontsize")?this.fontsize=u.field(a,
"fontsize"):this.fontsize=20,Object.prototype.hasOwnProperty.call(a,"buton")?this.buton=u.field(a,"buton"):this.buton="",Object.prototype.hasOwnProperty.call(a,"gap")?this.gap=u.field(a,"gap"):this.gap=10,Object.prototype.hasOwnProperty.call(a,"position")?this.position=u.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=Fa.colorHex(this.fontcolor,"#FFFFFF"),this._btbitmap==null&&(this._btbitmap=new Zc(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 Ca(this._btbitmap.oWidth,this._btbitmap.oHeight)},onClick:function(a){this._options[F.parseInt(a)][1]!=""&&p.parser.run('{"ac":"scene.load","param":["'+this._options[F.parseInt(a)][1]+'"]}');this.remove()},__class__:Fd});var Tk=function(a){this._inputs=new H;this._graphics=new H;this._created=
!1;this.elem=[];this.ok=!1;Da.call(this);a!=null&&this.load(a)};t["com.tilbuci.contraptions.FormContraption"]=Tk;Tk.__name__="com.tilbuci.contraptions.FormContraption";Tk.__super__=Da;Tk.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 pd)this._inputs.h[a].set_text(p.parser.parseString(b)),c=!0;else if(this._inputs.h[a]instanceof
qd)this._inputs.h[a].set_value(p.parser.parseInt(b)),c=!0;else if(this._inputs.h[a]instanceof ed)this._inputs.h[a].set_selected(p.parser.parseBool(b)),c=!0;else if(this._inputs.h[a]instanceof sf)this._inputs.h[a].set_text(p.parser.parseString(b)),c=!0;else if(this._inputs.h[a]instanceof fe){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 pd?b=this._inputs.h[a].get_text():this._inputs.h[a]instanceof qd?b=F.string(this._inputs.h[a].get_value()):this._inputs.h[a]instanceof ed?b=this._inputs.h[a].get_selected()?"true":"false":this._inputs.h[a]instanceof sf?b=this._inputs.h[a].get_text():this._inputs.h[a]instanceof fe&&(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 qd?(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 Zc;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 Zc,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 Zc;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 pd;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 qd;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 pd;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 fe;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 fg(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 sf;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 ed,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 Tk(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=u.field(a,"id"),Object.prototype.hasOwnProperty.call(a,"elem"))){a=u.field(a,"elem");for(var b=0,c=u.fields(a);b<c.length;){var d=c[b];++b;d=u.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 me(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 me(p.mdata.highlightInt,1,4,4,255,1,!0)])},onCancelOut:function(a){this._graphics.h.btcancel.set_filters([])},__class__:Tk});var D=function(a){this._graphics=new H;this._created=!1;this.elem=[];this.ok=!1;Da.call(this);a!=null&&this.load(a)};t["com.tilbuci.contraptions.InterfaceContraption"]=D;D.__name__="com.tilbuci.contraptions.InterfaceContraption";D.__super__=Da;D.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 Zc;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 Sk,this._smap.frames=F.parseInt(f[0]),this._smap.frtime=F.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 Ic,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(F.parseInt(f[0])),
d=new ef(f[1],F.parseInt(f[2]),Fa.colorInt(f[3]),f[4]=="true",f[5]=="true",null,null,null,Qk.fromString(f[6])),this._text.set_defaultTextFormat(d),this._text.set_height(F.parseInt(f[2])+12));break;default:d.file!=""&&(f=new Zc,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 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=u.field(a,"id"),Object.prototype.hasOwnProperty.call(a,"elem"))){a=u.field(a,"elem");for(var b=0,c=u.fields(a);b<c.length;){var d=c[b];++b;d=u.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 me(p.mdata.highlightInt,1,4,4,255,1,!0)])},onOut:function(a){a.target.set_filters([])},__class__:D});var K=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 O(m(this,this.draw));this._rows.push(a);a=new O(m(this,this.draw));this._rows.push(a);a=new O(m(this,this.draw));this._rows.push(a)};t["com.tilbuci.contraptions.InventoryContraption"]=
K;K.__name__="com.tilbuci.contraptions.InventoryContraption";K.__super__=Da;K.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),p.focusMode?this._hbitmap.set_filters([new Hf(new qi)]):this._hbitmap.set_filters([])):(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),p.focusMode?this._vbitmap.set_filters([new Hf(new qi)]):this._vbitmap.set_filters([]));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,Fa.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 K;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=u.field(a,"id");Object.prototype.hasOwnProperty.call(a,"font")?this.font=u.field(a,"font"):this.font="sans";Object.prototype.hasOwnProperty.call(a,"fontcolor")?this.fontcolor=u.field(a,"fontcolor"):this.fontcolor="0xffffff";
Object.prototype.hasOwnProperty.call(a,"fontsize")?this.fontsize=u.field(a,"fontsize"):this.fontsize=20;Object.prototype.hasOwnProperty.call(a,"vertical")?this.vertical=u.field(a,"vertical"):this.vertical="";Object.prototype.hasOwnProperty.call(a,"horizontal")?this.horizontal=u.field(a,"horizontal"):this.horizontal="";Object.prototype.hasOwnProperty.call(a,"close")?this.close=u.field(a,"close"):this.close="";Object.prototype.hasOwnProperty.call(a,"mode")?this.mode=u.field(a,"mode"):this.mode="a";
Object.prototype.hasOwnProperty.call(a,"sound")?this.sound=u.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=Fa.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 Zc(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 Zc(m(this,this.onBgLoad))),this._hbitmap.load(this.horizontal),this._vbitmap==null&&(this._vbitmap=new Zc(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 me(p.mdata.highlightInt,1,4,4,255,1,!0)]))},onCloseOut:function(a){this._cbitmap.set_filters([])},
__class__:K});var O=function(a){this._draw=null;this._size=0;this._texts=[];this.boxes=[];Da.call(this);this.set_visible(!1);this._draw=a;a=new Zc(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 Ic;a.set_visible(!1);this.addChild(a);this._texts.push(a);a=new Zc(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 Ic;a.set_visible(!1);this.addChild(a);this._texts.push(a);a=new Zc(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 Ic;a.set_visible(!1);
this.addChild(a);this._texts.push(a);a=new Zc(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 Ic;a.set_visible(!1);this.addChild(a);this._texts.push(a)};t["com.tilbuci.contraptions.InvItemRow"]=O;O.__name__="com.tilbuci.contraptions.InvItemRow";O.__super__=Da;O.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(F.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,Qk.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[F.parseInt(f.extraInfo[1])].get_text()!=""&&(p.narrative.consumeItem(f.extraInfo[0]),this._draw());Pi.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[F.parseInt(a.extraInfo[1])].get_text()!=""&&(p.narrative.consumeItem(a.extraInfo[0]),this._draw());Pi.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 me(p.mdata.highlightInt,1,4,4,255,1,!0)]))},onBoxOut:function(a){a.target.set_filters([])},__class__:O});var ja=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"]=ja;ja.__name__="com.tilbuci.contraptions.MenuContraption";ja.__super__=Da;ja.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 Rk(F.string(f+1),m(this,this.onClick),this.buton,a[f],this.font,this.fontsize,Fa.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;p.focusMode?this._bgbitmap.set_filters([new Hf(new qi)]):this._bgbitmap.set_filters([])}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 ja;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=u.field(a,"id"),Object.prototype.hasOwnProperty.call(a,"font")?this.font=u.field(a,"font"):this.font="sans",Object.prototype.hasOwnProperty.call(a,"fontcolor")?this.fontcolor=u.field(a,"fontcolor"):this.fontcolor="0xffffff",Object.prototype.hasOwnProperty.call(a,"fontsize")?
this.fontsize=u.field(a,"fontsize"):this.fontsize=20,Object.prototype.hasOwnProperty.call(a,"background")?this.background=u.field(a,"background"):this.background="",Object.prototype.hasOwnProperty.call(a,"buton")?this.buton=u.field(a,"buton"):this.buton="",Object.prototype.hasOwnProperty.call(a,"bgcolor")?this.bgcolor=u.field(a,"bgcolor"):this.bgcolor="0x000000",Object.prototype.hasOwnProperty.call(a,"bgalpha")?this.bgalpha=u.field(a,"bgalpha"):this.bgalpha=0,Object.prototype.hasOwnProperty.call(a,
"mode")?this.mode=u.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=Fa.colorHex(this.fontcolor,"#FFFFFF"),this.bgcolor=Fa.colorHex(this.bgcolor,"#000000"),this._bgbitmap==null&&(this._bgbitmap=
new Zc(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 Zc(m(this,this.onBTLoad))),this._btbitmap.load(this.buton))},onBTLoad:function(a){if(this.ok=a)this._btsize=new Ca(this._btbitmap.oWidth,this._btbitmap.oHeight)},onClick:function(a){this._ac(a)},__class__:ja});var la=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"]=la;la.__name__="com.tilbuci.contraptions.MessagesContraption";la.__super__=Da;la.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);ye.trace("adicionar texto",{fileName:"Source/com/tilbuci/contraptions/MessagesContraption.hx",lineNumber:58,className:"com.tilbuci.contraptions.MessagesContraption",methodName:"create",customParams:[a]});this._text=new Ic;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,
Fa.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 Rk(f==null?"null":""+f,m(this,this.onClick),this.buton[f],b[f],this.font,this.fontsize,Fa.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 la;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=u.field(a,"id");Object.prototype.hasOwnProperty.call(a,"font")?this.font=u.field(a,"font"):this.font="sans";Object.prototype.hasOwnProperty.call(a,"fontcolor")?this.fontcolor=u.field(a,"fontcolor"):
this.fontcolor="0xffffff";Object.prototype.hasOwnProperty.call(a,"fontsize")?this.fontsize=u.field(a,"fontsize"):this.fontsize=20;Object.prototype.hasOwnProperty.call(a,"gap")?this.gap=u.field(a,"gap"):this.gap=10;Object.prototype.hasOwnProperty.call(a,"background")?this.background=u.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=[u.field(a,"buton0"),
u.field(a,"buton1"),u.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=
Fa.colorHex(this.fontcolor,"#FFFFFF");this._bgbitmap==null&&(this._bgbitmap=new Zc(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 Zc(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 Zc(m(this,this.onBTLoad1))),this._btbitmap[2]==null&&(this._btbitmap[2]=new Zc(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__:la});var aa=function(a){this.ok=!1;Da.call(this);a!=null&&this.load(a)};t["com.tilbuci.contraptions.MusicContraption"]=aa;aa.__name__="com.tilbuci.contraptions.MusicContraption";aa.__super__=Da;aa.prototype=I(Da.prototype,{ok:null,id:null,media:null,_music:null,clone:function(){return new aa(this.toObject())},load:function(a){this.ok=!1;return Object.prototype.hasOwnProperty.call(a,"id")&&
(this.id=u.field(a,"id"),Object.prototype.hasOwnProperty.call(a,"media"))?(this.media=u.field(a,"media"),this.media==null&&(this.media=""),this._music=new xd(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__:aa});var Ya=function(a){this.ok=!1;Da.call(this);a!=null&&this.load(a)};t["com.tilbuci.contraptions.SoundContraption"]=Ya;Ya.__name__="com.tilbuci.contraptions.SoundContraption";Ya.__super__=Da;Ya.prototype=I(Da.prototype,{ok:null,id:null,
media:null,_sound:null,clone:function(){return new Ya(this.toObject())},load:function(a){this.ok=!1;return Object.prototype.hasOwnProperty.call(a,"id")&&(this.id=u.field(a,"id"),Object.prototype.hasOwnProperty.call(a,"media"))?(this.media=u.field(a,"media"),this.media==null&&(this.media=""),this._sound=new xd(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__:Ya});var db=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"]=db;db.__name__="com.tilbuci.contraptions.TargetContraption";db.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 db(this.toObject())},load:function(a){this.ok=!1;return Object.prototype.hasOwnProperty.call(a,"id")&&(this.id=u.field(a,"id"),Object.prototype.hasOwnProperty.call(a,
"defaultp"))?(this.defaultp=u.field(a,"defaultp"),Object.prototype.hasOwnProperty.call(a,"menus")&&(this.menus=u.field(a,"menus")),Object.prototype.hasOwnProperty.call(a,"interf")&&(this.interf=u.field(a,"interf")),Object.prototype.hasOwnProperty.call(a,"inst1")&&(this.inst1=u.field(a,"inst1")),Object.prototype.hasOwnProperty.call(a,"inst1name")&&(this.inst1name=u.field(a,"inst1name")),Object.prototype.hasOwnProperty.call(a,"inst2")&&(this.inst2=u.field(a,"inst2")),Object.prototype.hasOwnProperty.call(a,
"inst2name")&&(this.inst2name=u.field(a,"inst2name")),Object.prototype.hasOwnProperty.call(a,"inst3")&&(this.inst3=u.field(a,"inst3")),Object.prototype.hasOwnProperty.call(a,"inst3name")&&(this.inst3name=u.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__:db};var bb=function(a){a==null&&(a=!0);this._thanks=[];this._languages=new H;
this._version=this._build="";if(a){if(a=va.getText("buildInfo"),a=Fa.jsonParse(a),a!=0){this._version=u.field(a,"version");this._build=u.field(a,"build");for(var b=0,c=u.fields(u.field(a,"languages"));b<c.length;){var d=c[b];++b;var f=u.field(u.field(a,"languages"),d);this._languages.h[d]=f}b=0;for(c=u.fields(u.field(a,"thanks"));b<c.length;)d=c[b],++b,this._thanks.push(u.field(u.field(a,"thanks"),d));ye.trace("Tilbuci player "+this._version+" build "+this._build+".",{fileName:"Source/com/tilbuci/data/BuildInfo.hx",
lineNumber:62,className:"com.tilbuci.data.BuildInfo",methodName:"new"})}}else this._build=this._version="custom"};t["com.tilbuci.data.BuildInfo"]=bb;bb.__name__="com.tilbuci.data.BuildInfo";bb.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__:bb,
__properties__:{get_thanks:"get_thanks",get_languages:"get_languages",get_build:"get_build",get_version:"get_version"}};var Kb=function(){this._has=!1;this._instances=new H;this._collections=new H};t["com.tilbuci.data.CopyData"]=Kb;Kb.__name__="com.tilbuci.data.CopyData";Kb.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 H,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 H;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 H;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",Fa.jsonStringify(c));this.receiveMessage(Fa.jsonStringify(c))}},receiveMessage:function(a){a=Fa.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=u.fields(a.h.collections);b<c.length;){var d=c[b];++b;var f=new ff(d,null,!1);f.fromJson(u.field(a.h.collections,d))&&(this._collections.h[d]=f)}b=0;for(c=u.fields(a.h.instances);b<c.length;)d=c[b],++b,f=new yh(Fa.jsonParse(u.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__:Kb};var ob=function(a,b,c,d,f,g,h,n,l,q,v,w){w==null&&(w=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;ma.call(this);this._loader=new mj;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,v,w)};t["com.tilbuci.data.DataLoader"]=ob;ob.__name__="com.tilbuci.data.DataLoader";ob.__super__=ma;ob.prototype=I(ma.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,v){v==null&&(v=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=vm._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 ne(a);c.data=d;c.method=b;v>0&&(c.idleTimeout=v);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):U.substr(a,0,2)=="TB"&&U.substr(a,-10,1)=="b"?Fa.decrypt(a,Fa.md5(p.loadingMovie+U.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=Fa.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=Fa.jsonParse(this.rawtext);if(b==0)b=!1,this.rawtext=null;else{this.json=b;this.map=new H;for(var c=0,d=u.fields(b);c<d.length;){var f=d[c];++c;var g=u.field(b,f);this.map.h[f]=g}b=!0}break;case 5:this.binary=this._loader.data;this.rawtext=this.finalText(pi.encode(lc.toBytes(this.binary)));break;case 6:this.binary=this._loader.data;this.rawtext=this.finalText(pi.encode(lc.toBytes(this.binary)));
b=Fa.jsonParse(this.rawtext);if(b==0)b=!1,this.binary=this.rawtext=null;else{this.json=b;this.map=new H;c=0;for(d=u.fields(b);c<d.length;)f=d[c],++c,g=u.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):(ye.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 Gc=function(a,b,c){this._dateFile=
!0;this._language=[];this._base=this._player=this._ws=this._font="";this._loaded=!1;ma.call(this);var d=null;this._callback=b;c&&(b=new H,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"]=Gc;Gc.__name__="com.tilbuci.data.EditorConfig";Gc.__super__=ma;Gc.prototype=I(ma.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 nj("English","default")]:this._language=b.json.language,this._loaded&&
(this._base=Fa.slashURL(b.json.base),this._player=Fa.slashURL(b.json.player),this._ws=Fa.slashURL(b.json.ws),this._font=Fa.slashURL(b.json.font)),this._callback(this._loaded)):this._callback(!1);this._callback=null},__class__:Gc,__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 Gb=function(a){this._uploadType=this._externName="";this._extra=new H;ma.call(this);this._ref=
new Vo;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 Tc;a=new tf;a.setPadding(10);a.set_gap(20);a.set_verticalAlign(fc.TOP);a.set_horizontalAlign(Vb.LEFT);this._interface.set_backgroundSkin(new wh(3684408));this._interface.set_layout(a);this._interface.set_width(500);
this._interface.set_height(180);a=new Si;a.set_text(k.ln.get("uploader-title"));this._interface.set_header(a);this._fname=new fa;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 wm(0,0,1);this._bar.set_width(this._interface.get_width()-30);this._interface.addChild(this._bar);this._bt=new Wb;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 Vo;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"]=Gb;Gb.__name__="com.tilbuci.data.FileUpload";Gb.TBU_setFile=Sa.TBU_setFile=
function(a,b,c,d){k.up.onFileSelectExtern(a)};Gb.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)};Gb.TBU_setFailed=Sa.TBU_setFailed=function(){k.up.onCancelExtern()};Gb.TBU_setAborted=Sa.TBU_setAborted=function(){k.up.onCancelExtern()};Gb.__super__=ma;Gb.prototype=I(ma.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 Fa.stringContains(this.get_selectedName(),[".woff"])?(this._uploadType="Font",this._ac=a,this._extra=b,Object.prototype.hasOwnProperty.call(this._extra.h,"movie")?(a="../movie/"+F.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 H,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=Fa.jsonStringify(c);b=k.ws.get_url();c=new H;c.h.r=d;d=Fa.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 H,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=Fa.jsonStringify(b);window.TBU_upload(a,b,k.ws.get_user(),Fa.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,Fa.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,pi.encode(lc.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 hw(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__:Gb,__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 Es,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 Fs,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 Gs,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 Hl(a,b,c,d,f,g,h,n);Aa.addPopUp(a,k.stage)};k.evaluate=function(a){k.parser==null&&(k.parser=new An);k.interp==null&&(k.interp=new iw);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){ye.trace(a,{fileName:"Source/com/tilbuci/data/Global.hx",lineNumber:325,className:"com.tilbuci.data.Global",methodName:"copyText"}),b=!1}return b};var Ca=function(a,b){b==null&&(b=0);a==null&&(a=0);this.x=a;this.y=b};t["openfl.geom.Point"]=Ca;Ca.__name__="openfl.geom.Point";Ca.distance=function(a,b){var c=a.x-b.x;a=a.y-b.y;return Math.sqrt(c*c+a*a)};Ca.interpolate=function(a,b,c){return new Ca(b.x+c*(a.x-b.x),b.y+c*(a.y-b.y))};Ca.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 Ca(b.x+c*(a.x-b.x),b.y+c*(a.y-b.y))};Ca.polar=function(a,b){return new Ca(a*Math.cos(b),a*Math.sin(b))};Ca.polarToOutput=function(a,b,c){return c!=null?(c.setTo(a*Math.cos(b),a*Math.sin(b)),c):new Ca(a*Math.cos(b),a*Math.sin(b))};Ca.prototype={x:null,y:null,add:function(a){return new Ca(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 Ca(a.x+this.x,a.y+this.y)},clone:function(){return new Ca(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 Ca(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 Ca(this.x-a.x,this.y-a.y)},toString:function(){return"(x="+
this.x+", y="+this.y+")"},__toLimeVector2:function(){Ca.__limeVector2==null&&(Ca.__limeVector2=new Yf);var a=Ca.__limeVector2;a.x=this.x;a.y=this.y;return Ca.__limeVector2},get_length:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},__class__:Ca,__properties__:{get_length:"get_length"}};var yd=function(){this.cards=new H;this.consItAmounts=[];this.consItNames=[];this.keyItems=[];this.items=new H;this.dialogues=new H;this.chars=new H;this.diagSpeech=new xd(m(this,this.onSpeechLoad),m(this,
this.onSpeechEnd))};t["com.tilbuci.narrative.Narrative"]=yd;yd.__name__="com.tilbuci.narrative.Narrative";yd.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 Fa.jsonStringify({k:this.keyItems,
c:this.consItNames,a:this.consItAmounts})},loadItems:function(a){var b=Fa.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=u.field(b,"k");var c=u.field(b,"c");b=u.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 Fa.jsonStringify({k:this.keyItems})},loadKeyItems:function(a){a=Fa.jsonParse(a);
return a==0?!1:Object.prototype.hasOwnProperty.call(a,"k")&&(a=u.field(a,"k"),a!=null)?(this.keyItems=a,!0):!1},currentConsItems:function(){return Fa.jsonStringify({c:this.consItNames,a:this.consItAmounts})},loadConsItems:function(a){var b=Fa.jsonParse(a);return b==0?!1:Object.prototype.hasOwnProperty.call(b,"c")&&Object.prototype.hasOwnProperty.call(b,"a")&&(a=u.field(b,"c"),b=u.field(b,"a"),a!=null&&b!=null)?(this.consItNames=a,this.consItAmounts=b,!0):!1},getData:function(){var a=new H,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 Fa.jsonStringify(a)},onSpeechLoad:function(a){this.diagSpeech.play()},onSpeechEnd:function(){this.diagSpeech.stop()},__class__:yd};var Cc=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"]=Cc;Cc.__name__="com.tilbuci.display.BaseImage";
Cc.__super__=Da;Cc.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__:Cc,__properties__:I(Da.prototype.__properties__,{get_lastMedia:"get_lastMedia",
get_mediaLoaded:"get_mediaLoaded"})});var xd=function(a,b,c){this._channelPos=-1;this._currentTime=0;this._loaded=!1;Cc.call(this,"audio",!0,a);this._onEnd=b;this._sound=new td;this._sound.addEventListener("complete",m(this,this.onComplete));this._sound.addEventListener("ioError",m(this,this.onError));this._onTimedAc=c};t["com.tilbuci.display.AudioImage"]=xd;xd.__name__="com.tilbuci.display.AudioImage";xd.__super__=Cc;xd.prototype=I(Cc.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 ne(a))},iterateSound:function(a,b){this._channel!=null&&(xa.transform(this._channel,p.mdata.time).sound(a,null),this._transform=new ri(a,0))},stopSound:function(){xa.stop(this._sound)},kill:function(){Cc.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 Ec(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__:xd});
var td=function(a,b){this.__webAudioContext=null;this.__urlLoading=!1;ma.call(this,this);this.bytesTotal=this.bytesLoaded=0;this.isBuffering=!1;this.url=null;a!=null&&this.load(a,b);a==null&&sd.context!=null&&sd.context.type=="web"&&(this.__webAudioContext=sd.context.web)};t["openfl.media.Sound"]=td;td.__name__="openfl.media.Sound";td.fromAudioBuffer=function(a){var b=new td;b.__buffer=a;return b};td.fromFile=function(a){var b=re.fromFile(a);if(b==null)throw new xm("Error loading sound from file: "+
a);return td.fromAudioBuffer(b)};td.loadFromFile=function(a){return re.loadFromFile(a).then(function(b){return Fc.withValue(td.fromAudioBuffer(b))})};td.loadFromFiles=function(a){return re.loadFromFiles(a).then(function(b){return Fc.withValue(td.fromAudioBuffer(b))})};td.__super__=ma;td.prototype=I(ma.prototype,{bytesLoaded:null,bytesTotal:null,isBuffering:null,url:null,__urlLoading:null,__pendingSoundChannel:null,__pendingAudioSource:null,__buffer:null,__webAudioContext:null,close:function(){this.__buffer!=
null&&(ue.__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 na("open"));a=rb.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 re.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 Vh("ioError"));else{if(Ua.gt(a.position,0)||Ua.gt(lc.get_length(a),b)){var c=b;c==null&&(c=0);var d=new Vc(c),f=a.position;c=b;c==null&&(c=0);f==null&&(f=0);d.writeBytes(a,f,c);a=d}this.__buffer=re.fromBytes(lc.toBytes(a));this.__buffer==null?this.dispatchEvent(new Vh("ioError")):(this.dispatchEvent(new na("open")),
this.dispatchEvent(new zh("progress",!1,!1,Ua.toFloat(lc.get_length(a)),Ua.toFloat(lc.get_length(a)))),this.dispatchEvent(new na("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 Vh("ioError"));else{c=c=="float"?32:16;d=d?2:1;b=b*d*(c/8)|0;if(Ua.gt(a.position,0)||Ua.gt(lc.get_length(a),b)){var g=b;g==null&&(g=0);var h=new Vc(g),n=a.position;g=b;g==null&&(g=0);n==null&&(n=0);h.writeBytes(a,n,g);a=h}b=new re;
b.bitsPerSample=c;b.channels=d;c=lc.toArrayBuffer(a);c=c!=null?new Uint8Array(c,0):null;b.data=c;b.sampleRate=f|0;this.__buffer=b;this.dispatchEvent(new na("open"));this.dispatchEvent(new zh("progress",!1,!1,Ua.toFloat(lc.get_length(a)),Ua.toFloat(lc.get_length(a))));this.dispatchEvent(new na("complete"))}},play:function(a,b,c){b==null&&(b=0);a==null&&(a=0);if(ue.__soundChannels.length>=32)return null;c=c==null?new ri:c.clone();var d=ue.__soundTransform.pan+c.pan;d>1&&(d=1);d<-1&&(d=-1);var f=ue.__soundTransform.volume*
c.volume,g=new jw(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 Hs(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 kw},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 Vh("ioError")):(this.__buffer=a,a=1,this.__buffer.data!=null&&(a=this.__buffer.data.length),this.dispatchEvent(new zh("progress",!1,!1,a,a)),this.dispatchEvent(new na("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 zh("progress");c.bytesLoaded=a;c.bytesTotal=b;this.dispatchEvent(c)},__class__:td,__properties__:{get_sampleRate:"get_sampleRate",get_length:"get_length",get_id3:"get_id3"}});var sd=function(){};t["lime.media.AudioManager"]=sd;sd.__name__="lime.media.AudioManager";sd.init=function(a){if(sd.context==null){if(a==null&&(sd.context=new lw,a=sd.context,a.type=="openal")){var b=a.openal,c=b.openDevice();
c!=null&&(c=b.createContext(c),b.makeContextCurrent(c),b.processContext(c))}sd.context=a}};sd.resume=function(){if(sd.context!=null&&sd.context.type=="openal"){var a=sd.context.openal,b=a.getCurrentContext();if(b!=null){var c=a.getContextsDevice(b);a.resumeDevice(c);a.processContext(b)}}};sd.shutdown=function(){if(sd.context!=null&&sd.context.type=="openal"){var a=sd.context.openal,b=a.getCurrentContext();if(b!=null){var c=a.getContextsDevice(b);a.makeContextCurrent(null);a.destroyContext(b);c!=null&&
a.closeDevice(c)}}sd.context=null};sd.suspend=function(){if(sd.context!=null&&sd.context.type=="openal"){var a=sd.context.openal,b=a.getCurrentContext();b!=null&&(a.suspendContext(b),b=a.getContextsDevice(b),b!=null&&a.pauseDevice(b))}};var uf={__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 uf._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 Z.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 Z.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 Z.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 Z.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 Yf);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 uf._new(a.a,a.b,a.c,a.d,a.tx,a.ty)},fromFloat32Array:function(a){if(a.length!=9)throw Z.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 Z.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 mw(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 nf);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 Yf);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}},hb=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"]=hb;hb.__name__="openfl.geom.Matrix";hb.prototype={a:null,b:null,c:null,d:null,tx:null,ty:null,__array:null,clone:function(){return new hb(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 Z.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 Z.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 Z.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 Z.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 Ca(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 Ca(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 Ca(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 Ca(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(){uf.setTo(hb.__matrix3,this.a,this.b,this.c,this.d,this.tx,this.ty);return hb.__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__:hb};var id=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"]=id;id.__name__="openfl.geom.ColorTransform";id.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 id(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(){id.__limeColorMatrix==null&&(id.__limeColorMatrix=new Float32Array(20));id.__limeColorMatrix[0]=
this.redMultiplier;id.__limeColorMatrix[4]=this.redOffset/255;id.__limeColorMatrix[6]=this.greenMultiplier;id.__limeColorMatrix[9]=this.greenOffset/255;id.__limeColorMatrix[12]=this.blueMultiplier;id.__limeColorMatrix[14]=this.blueOffset/255;id.__limeColorMatrix[18]=this.alphaMultiplier;id.__limeColorMatrix[19]=this.alphaOffset/255;return id.__limeColorMatrix},__class__:id,__properties__:{set_color:"set_color",get_color:"get_color"}};var Yd=function(){ma.call(this);this.clear()};t["openfl.text.StyleSheet"]=
Yd;Yd.__name__="openfl.text.StyleSheet";Yd.__super__=ma;Yd.prototype=I(ma.prototype,{__styleNames:null,__styleNamesDirty:null,__styles:null,clear:function(){this.__styleNamesDirty=!1;this.__styleNames=null;this.__styles=new H},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 H;b.h.silent=!0;b=(new nw(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=F.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&&u.setProperty(h,"fontFamily",g);break;case "font-size":h=d;h!=null&&u.setProperty(h,"fontSize",g);break;
case "font-style":h=d;h!=null&&u.setProperty(h,"fontStyle",g);break;case "font-weight":h=d;h!=null&&u.setProperty(h,"fontWeight",g);break;case "letter-spacing":h=d;h!=null&&u.setProperty(h,"letterSpacing",g);break;case "margin-left":h=d;h!=null&&u.setProperty(h,"marginLeft",g);break;case "text-align":h=d;h!=null&&u.setProperty(h,"textAlign",g);break;case "text-decoration":h=d;h!=null&&u.setProperty(h,"textDecoration",g);break;case "text-indent":h=d;h!=null&&u.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=u.fields(b);d<f.length;){var g=f[d];++d;c[g]=u.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 Xa("[0-9A-Fa-f]+",""),d=new Xa("[0-9]+","");var f=a;f!=null&&Object.prototype.hasOwnProperty.call(f,"color")?(f=Je.__get(a,"color"),f=c.match(f==null?null:F.string(f))):f=!1;f&&(b.color=F.parseInt("0x"+c.matched(0)));f=a;f!=null&&Object.prototype.hasOwnProperty.call(f,"fontFamily")&&(f=Je.__get(a,"fontFamily"),b.set_font(this.__parseFont(f==null?null:F.string(f))));f=a;f!=null&&Object.prototype.hasOwnProperty.call(f,"fontSize")?(f=Je.__get(a,
"fontSize"),f=d.match(f==null?null:F.string(f))):f=!1;f&&b.set_size(F.parseInt(d.matched(0)));f=a;if(f!=null&&Object.prototype.hasOwnProperty.call(f,"fontStyle"))switch(Je.__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(Je.__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=Je.__get(a,
"leading"),f=d.match(f==null?null:F.string(f))):f=!1;f&&(b.leading=F.parseInt(d.matched(0)));f=a;f!=null&&Object.prototype.hasOwnProperty.call(f,"letterSpacing")?(f=Je.__get(a,"letterSpacing"),f=d.match(f==null?null:F.string(f))):f=!1;f&&(b.letterSpacing=parseFloat(d.matched(0)));f=a;f!=null&&Object.prototype.hasOwnProperty.call(f,"marginLeft")?(f=Je.__get(a,"marginLeft"),f=d.match(f==null?null:F.string(f))):f=!1;f&&(b.leftMargin=F.parseInt(d.matched(0)));f=a;f!=null&&Object.prototype.hasOwnProperty.call(f,
"marginRight")?(f=Je.__get(a,"marginRight"),f=d.match(f==null?null:F.string(f))):f=!1;f&&(b.rightMargin=F.parseInt(d.matched(0)));f=a;if(f!=null&&Object.prototype.hasOwnProperty.call(f,"textAlign"))switch(Je.__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(Je.__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=Je.__get(a,"textIndent"),f=d.match(f==null?null:F.string(f))):f=!1;f&&(b.blockIndent=F.parseInt(d.matched(0)))}},__parseFont:function(a){if(a==null)return null;a.indexOf(",")>-1&&(a=U.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__:Yd,__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){ye.trace(a,{fileName:"Source/com/tilbuci/data/GlobalPlayer.hx",lineNumber:255,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 xn=function(){this._max=20;this.propDisplay=[];this._current=0;this.states=[]};t["com.tilbuci.data.History"]=xn;xn.__name__="com.tilbuci.data.History";xn.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__:xn,__properties__:{get_current:"get_current"}};var Nk=function(){this._texts=new H;this._current="";this._ok=!1;ma.call(this);this._ok=this.load("langDefault")};t["com.tilbuci.data.Language"]=Nk;Nk.__name__="com.tilbuci.data.Language";Nk.__super__=ma;Nk.prototype=I(ma.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=va.getText(a);b=Fa.jsonParse(b);if(b==0)a=!1;else{for(var c=0,d=u.fields(b);c<d.length;){var f=d[c];++c;var g=u.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__:Nk,
__properties__:{get_current:"get_current",get_ok:"get_ok"}});var um=function(a,b){this._mvId=this._scId="";this._colLoad=0;this._cacheScene=new H;this._actions=new H;this.preventHistory=!1;this.collections=new H;this.data=new Wh;this.scene=new oc;this._actions.h.movie=a;this._actions.h.scene=b};t["com.tilbuci.data.MovieInfo"]=um;um.__name__="com.tilbuci.data.MovieInfo";um.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]}U.substr(a,
0,4)!="http"&&U.substr(a,0,4)!="file"&&(a=p.base+"movie/"+a);U.substr(a,-6,null)!=".movie"&&(a+=".movie");p.path=this._path=a+"/";a+="/movie.json";b=null;p.nocache&&(b=new H,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 H,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 H,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(Fa.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 H,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 H,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(ua,"scene")&&(ua.scene=""),this.loadMovie(p.mdata.fallback))):
a||p.mode!="player"?(p.parser.loadStringsJson(),p.mode=="player"&&(a="",Object.prototype.hasOwnProperty.call(ua,"scene")&&(a=u.field(ua,"scene")),a==""?this.loadScene(b.map.h.start):(this.loadScene(a),Object.prototype.hasOwnProperty.call(ua,"scene")&&(ua.scene="")))):(this._path=this._mvId="",p.mdata.fallback!=""&&(Object.prototype.hasOwnProperty.call(ua,"scene")&&(ua.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 ff(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 H;a=0;for(var d=u.fields(b.map.h.info);a<d.length;){var f=d[a];++a;var g=u.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 ff(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 ff(this._path+"collection/"+d+".json",m(this,this.onColLoad));f.h[d]=c}}else this._colLoad++,c=this.collections,f=new ff(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=U.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__:um,__properties__:{get_scLoaded:"get_scLoaded",get_scId:"get_scId",get_mvLoaded:"get_mvLoaded",get_mvId:"get_mvId"}};var Nj=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=u.field(a,"name"):this.ok=!1;this.ok&&Object.prototype.hasOwnProperty.call(a,"type")?this.type=u.field(a,"type"):this.ok=!1;this.ok&&Object.prototype.hasOwnProperty.call(a,"order")?this.order=u.field(a,"order"):this.ok=!1;this.ok&&Object.prototype.hasOwnProperty.call(a,"time")?this.time=u.field(a,"time"):this.ok=!1;this.ok&&Object.prototype.hasOwnProperty.call(a,"action")?this.action=u.field(a,"action"):
this.ok=!1;this.ok&&Object.prototype.hasOwnProperty.call(a,"frames")?this.frames=u.field(a,"frames"):this.ok=!1;this.ok&&Object.prototype.hasOwnProperty.call(a,"frtime")?this.frtime=u.field(a,"frtime"):this.ok=!1;if(this.ok&&Object.prototype.hasOwnProperty.call(a,"file")){var b=u.field(a,"file");if(Object.prototype.hasOwnProperty.call(b,"@1")){this.file=new H;var c=u.field(b,"@1");this.file.h["@1"]=c;Object.prototype.hasOwnProperty.call(b,"@2")?(c=u.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=u.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=u.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=u.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=u.field(a,"time")}else this.ok=!1};t["com.tilbuci.def.AssetData"]=Nj;Nj.__name__="com.tilbuci.def.AssetData";Nj.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__:Nj};var dh=function(a){this.reqFields=[];a!=null&&(this.reqFields=a)};t["com.tilbuci.def.DefBase"]=
dh;dh.__name__="com.tilbuci.def.DefBase";dh.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__:dh};var ff=function(a,b,c){c==null&&(c=!0);this.assetOrder=[];this.assets=new H;this.time=1;this.transition="none";this.name="";this.ok=!1;dh.call(this,["name","transition",
"time","assets"]);this._acLoad=b;c&&(b=null,p.nocache&&(b=new H,b.h.rand=Math.ceil(Math.random()*1E4)),new ob(!0,a,"GET",b,4,m(this,this.onLoad)))};t["com.tilbuci.def.CollectionData"]=ff;ff.__name__="com.tilbuci.def.CollectionData";ff.__super__=dh;ff.prototype=I(dh.prototype,{ok:null,name:null,transition:null,time:null,assets:null,assetOrder:null,_acLoad:null,toJson:function(){return Bg.print(this.toObject(),null,null)},fromJson:function(a){a=Fa.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=u.fields(a.h.assets);b<c.length;){var d=c[b];++b;var f=this.assets,g=new Nj(u.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(){dh.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=u.fields(b.map.h.assets);a<c.length;){var d=c[a];++a;var f=this.assets,g=new Nj(u.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__:ff});
var yh=function(a){this.playOnLoad=this.focus=!0;this.timedAc=new H;(this.ok=!0,Object.prototype.hasOwnProperty.call(a,"collection"))?this.collection=u.field(a,"collection"):this.ok=!1;this.ok&&Object.prototype.hasOwnProperty.call(a,"asset")?this.asset=u.field(a,"asset"):this.ok=!1;this.ok&&Object.prototype.hasOwnProperty.call(a,"action")?this.action=u.field(a,"action"):this.ok=!1;this.ok&&Object.prototype.hasOwnProperty.call(a,"play")?this.playOnLoad=u.field(a,"play"):this.ok=!1;this.ok&&Object.prototype.hasOwnProperty.call(a,
"horizontal")?this.horizontal=new Ti(u.field(a,"horizontal")):this.ok=!1;this.ok&&Object.prototype.hasOwnProperty.call(a,"vertical")?this.vertical=new Ti(u.field(a,"vertical")):this.ok=!1;!this.ok||this.horizontal.ok&&this.vertical.ok||(this.ok=!1);this.ok&&(this.asset=U.substr(this.asset,0,32));this.ok&&Object.prototype.hasOwnProperty.call(a,"actionover")?this.actionover=u.field(a,"actionover"):this.actionover="";if(this.ok&&Object.prototype.hasOwnProperty.call(a,"timedac")){var b=F.string(u.field(a,
"timedac"));if(b=="")this.timedAc=new H;else if(b=Fa.jsonParse(b),b==0)this.timedAc=new H;else for(var c=0,d=u.fields(b);c<d.length;){var f=d[c];++c;var g=u.field(b,f);this.timedAc.h[f]=g}}else this.timedAc=new H;this.ok&&Object.prototype.hasOwnProperty.call(a,"focus")?this.focus=u.field(a,"focus"):this.focus=!0};t["com.tilbuci.def.InstanceData"]=yh;yh.__name__="com.tilbuci.def.InstanceData";yh.prototype={ok:null,collection:null,asset:null,action:null,actionover:null,timedAc:null,playOnLoad:null,
focus: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="";kb.count(this.timedAc)>0&&(a=Fa.jsonStringify(this.timedAc));return{collection:this.collection,
asset:this.asset,action:this.action,actionover:this.actionover,timedac:a,play:this.playOnLoad,focus:this.focus,horizontal:this.horizontal.toObject(),vertical:this.vertical.toObject()}},toJson:function(){return Fa.jsonStringify(this.toObject())},clone:function(){return new yh(this.toObject())},__class__:yh};var Ti=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=u.field(a,"order"):this.ok=!1;this.ok&&Object.prototype.hasOwnProperty.call(a,"x")?this.x=u.field(a,"x"):this.ok=!1;this.ok&&Object.prototype.hasOwnProperty.call(a,"y")?this.y=u.field(a,"y"):this.ok=!1;this.ok&&Object.prototype.hasOwnProperty.call(a,"alpha")?this.alpha=
u.field(a,"alpha"):this.ok=!1;this.ok&&Object.prototype.hasOwnProperty.call(a,"width")?this.width=u.field(a,"width"):this.ok=!1;this.ok&&Object.prototype.hasOwnProperty.call(a,"height")?this.height=u.field(a,"height"):this.ok=!1;this.ok&&Object.prototype.hasOwnProperty.call(a,"rotation")?this.rotation=u.field(a,"rotation"):this.ok=!1;this.ok&&Object.prototype.hasOwnProperty.call(a,"visible")?this.visible=u.field(a,"visible"):this.ok=!1;this.ok&&Object.prototype.hasOwnProperty.call(a,"color")?this.color=
u.field(a,"color"):this.ok=!1;this.ok&&Object.prototype.hasOwnProperty.call(a,"colorAlpha")?this.colorAlpha=u.field(a,"colorAlpha"):this.ok=!1;this.ok&&Object.prototype.hasOwnProperty.call(a,"volume")?this.volume=u.field(a,"volume"):this.ok=!1;this.ok&&Object.prototype.hasOwnProperty.call(a,"pan")?this.pan=u.field(a,"pan"):this.ok=!1;this.ok&&Object.prototype.hasOwnProperty.call(a,"blur")?(this.blur=u.field(a,"blur").split(";"),this.blur.length!=2&&(this.blur=[])):this.ok=!1;this.ok&&Object.prototype.hasOwnProperty.call(a,
"dropshadow")?(this.dropshadow=u.field(a,"dropshadow").split(";"),this.dropshadow.length!=8&&(this.dropshadow=[])):this.ok=!1;this.ok&&Object.prototype.hasOwnProperty.call(a,"textFont")?this.textFont=u.field(a,"textFont"):this.ok=!1;this.ok&&Object.prototype.hasOwnProperty.call(a,"textSize")?this.textSize=u.field(a,"textSize"):this.ok=!1;this.ok&&Object.prototype.hasOwnProperty.call(a,"textColor")?this.textColor=u.field(a,"textColor"):this.ok=!1;this.ok&&Object.prototype.hasOwnProperty.call(a,"textBold")?
this.textBold=u.field(a,"textBold"):this.ok=!1;this.ok&&Object.prototype.hasOwnProperty.call(a,"textItalic")?this.textItalic=u.field(a,"textItalic"):this.ok=!1;this.ok&&Object.prototype.hasOwnProperty.call(a,"textLeading")?this.textLeading=u.field(a,"textLeading"):this.ok=!1;this.ok&&Object.prototype.hasOwnProperty.call(a,"textSpacing")?this.textSpacing=u.field(a,"textSpacing"):this.ok=!1;this.ok&&Object.prototype.hasOwnProperty.call(a,"textBackground")?this.textBackground=u.field(a,"textBackground"):
this.ok=!1;this.ok&&Object.prototype.hasOwnProperty.call(a,"textAlign")?this.textAlign=u.field(a,"textAlign"):this.ok=!1;this.ok&&Object.prototype.hasOwnProperty.call(a,"glow")?(this.glow=u.field(a,"glow").split(";"),this.glow.length!=5&&(this.glow=[])):this.glow=[];this.ok&&Object.prototype.hasOwnProperty.call(a,"blend")?this.blend=u.field(a,"blend"):this.blend="normal"};t["com.tilbuci.def.InstanceDesc"]=Ti;Ti.__name__="com.tilbuci.def.InstanceDesc";Ti.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__:Ti};var nj=function(a,b){this.name=a;this.file=b};t["com.tilbuci.def.InterfaceLang"]=nj;nj.__name__="com.tilbuci.def.InterfaceLang";nj.prototype={name:null,file:null,__class__:nj};var Wh=function(){this.inputs=new H;this.highlightInt=null;this.encrypted=!1;this.loadingic=["","",""];this.highlight="";this.plugins=new H;this.flags=
new H;this.numbers=new H;this.texts=new H;this.theme="";this.actions=[];this.style="";this.fonts=[];this.animation="linear";this.origin="center";this.time=1;this.vsgroups=[];this.identify=!1;dh.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 se;this.clear()};t["com.tilbuci.def.MovieData"]=Wh;Wh.__name__="com.tilbuci.def.MovieData";Wh.__super__=
dh;Wh.prototype=I(dh.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];xa.defaultEase=qg.get_easeNone();a=new H;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=F.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=F.parseInt(this.highlight)):(this.highlight="",this.highlightInt=null);if(Object.prototype.hasOwnProperty.call(a.h,"inputs"))for(var b=
0,c=u.fields(a.h.inputs);b<c.length;){var d=c[b];++b;var f=u.field(a.h.inputs,d);this.inputs.h[d]=f}Object.prototype.hasOwnProperty.call(a.h,"loadingic")?this.loadingic=a.h.loadingic==""?["","",""]:Fa.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":xa.defaultEase=Uk.easeIn;break;case "bounce.inout":xa.defaultEase=Uk.easeInOut;break;case "bounce.out":xa.defaultEase=
Uk.easeOut;break;case "cubic.in":xa.defaultEase=Vk.easeIn;break;case "cubic.inout":xa.defaultEase=Vk.easeInOut;break;case "cubic.out":xa.defaultEase=Vk.easeOut;break;case "elastic.in":xa.defaultEase=oj.easeIn;break;case "elastic.inout":xa.defaultEase=oj.easeInOut;break;case "elastic.out":xa.defaultEase=oj.easeOut;break;case "expo.in":xa.defaultEase=mk.easeIn;break;case "expo.inout":xa.defaultEase=mk.easeInOut;break;case "expo.out":xa.defaultEase=mk.easeOut;break;case "quad.in":xa.defaultEase=Ui.easeIn;
break;case "quad.inout":xa.defaultEase=Ui.easeInOut;break;case "quad.out":xa.defaultEase=Ui.easeOut;break;case "quart.in":xa.defaultEase=Ah.easeIn;break;case "quart.inout":xa.defaultEase=Ah.easeInOut;break;case "quart.out":xa.defaultEase=Ah.easeOut;break;case "quint.in":xa.defaultEase=Wk.easeIn;break;case "quint.inout":xa.defaultEase=Wk.easeInOut;break;case "quint.out":xa.defaultEase=Wk.easeOut;break;case "sine.in":xa.defaultEase=Xk.easeIn;break;case "sine.inout":xa.defaultEase=Xk.easeInOut;break;
case "sine.out":xa.defaultEase=Xk.easeOut;break;default:this.animation="linear",xa.defaultEase=qg.get_easeNone()}b=0;for(c=this.fonts;b<c.length;)d=c[b],++b,new tm(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=u.fields(a.h.texts);b<c.length;)d=c[b],++b,f=u.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=u.fields(a.h.numbers);b<c.length;)d=c[b],++b,f=u.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=u.fields(a.h.flags);b<c.length;)d=c[b],++b,f=u.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=u.fields(a.h.plugins);b<c.length;)d=c[b],++b,f=u.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(ua,
"mode")&&u.field(ua,"mode")=="editor"&&(a=!1);a&&(p.theme=new Is(this.theme),ac.setTheme(p.theme));p.contraptions.loadLoadingIc()},toJson:function(){return Bg.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(){dh.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__:Wh});var se=function(){this.clear()};t["com.tilbuci.def.MovieDataScreen"]=se;se.__name__="com.tilbuci.def.MovieDataScreen";se.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__:se};var oc=function(){this.dflow=[];this.navigation=new H;this.ackeyframes=[];this.acstart="";
this.loop=0;this.keyframes=[];this.collections=[];this.staticsc=!1;this.title=this.about=this.image="";dh.call(this,"title about image navigation collections keyframes loop acstart ackeyframes".split(" "));this.clear()};t["com.tilbuci.def.SceneData"]=oc;oc.__name__="com.tilbuci.def.SceneData";oc.__super__=dh;oc.prototype=I(dh.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 H;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 H;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=u.fields(a.h.keyframes);b<g.length;){c=g[b];++b;f=new H;for(var h=0,n=u.fields(u.field(a.h.keyframes,c));h<n.length;){var l=n[h];++h;
d=new yh(u.field(u.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=u.fields(a.h.ackeyframes);b<g.length;)c=g[b],++b,this.ackeyframes.push(u.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=u.fields(a.h.dflow);b<g.length;)c=g[b],++b,c=u.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 Bg.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=u.field(a,"title"));Object.prototype.hasOwnProperty.call(a,
"about")&&(this.about=u.field(a,"about"));Object.prototype.hasOwnProperty.call(a,"image")&&(this.image=u.field(a,"image"));Object.prototype.hasOwnProperty.call(a,"staticsc")&&(this.staticsc=u.field(a,"staticsc"));Object.prototype.hasOwnProperty.call(a,"loop")&&(this.loop=u.field(a,"loop"));Object.prototype.hasOwnProperty.call(a,"acstart")&&(this.acstart=u.field(a,"acstart"));Object.prototype.hasOwnProperty.call(a,"ackeyframes")&&(this.ackeyframes=u.field(a,"ackeyframes"));Object.prototype.hasOwnProperty.call(a,
"collections")&&(this.collections=u.field(a,"collections"));if(Object.prototype.hasOwnProperty.call(a,"navigation")){var b=u.field(a,"navigation");if(Object.prototype.hasOwnProperty.call(b,"up")){var c=u.field(b,"up");this.navigation.h.up=c}Object.prototype.hasOwnProperty.call(b,"down")&&(c=u.field(b,"down"),this.navigation.h.down=c);Object.prototype.hasOwnProperty.call(b,"left")&&(c=u.field(b,"left"),this.navigation.h.left=c);Object.prototype.hasOwnProperty.call(b,"right")&&(c=u.field(b,"right"),
this.navigation.h.right=c);Object.prototype.hasOwnProperty.call(b,"nin")&&(c=u.field(b,"nin"),this.navigation.h.nin=c);Object.prototype.hasOwnProperty.call(b,"nout")&&(c=u.field(b,"nout"),this.navigation.h.nout=c)}if(Object.prototype.hasOwnProperty.call(a,"dflow")){this.dflow=[["",""],["",""],["",""],["",""]];c=u.field(a,"dflow");for(var d=0,f=0,g=u.fields(c);f<g.length;)b=g[f],++f,b=u.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=u.field(a,"keyframes");f=0;for(g=u.fields(a);f<g.length;){b=g[f];++f;d=new H;for(var h=0,n=u.fields(u.field(a,b));h<n.length;){var l=n[h];++h;c=new yh(u.field(u.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(){dh.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__:oc});var Wo=function(){this._cursor=-1;this._data=[];this._data=[];this._cursor=-1};t["com.tilbuci.def.TBArray"]=Wo;Wo.__name__="com.tilbuci.def.TBArray";Wo.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 Fa.jsonStringify(this._data)},fromJson:function(a){this._data=Fa.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__:Wo};var Xo=function(a){this._scrollPos=0;Cc.call(this,"html",!1,a);this._text=new Ic;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 mj;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"]=Xo;Xo.__name__="com.tilbuci.display.HtmlImage";Xo.__super__=Cc;Xo.prototype=I(Cc.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=F.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(F.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 ne(a))},kill:function(){Cc.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__:Xo});var Js=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 Ca;Da.call(this);this._name=a;this._onSelect=b;this._display=new Da;this._mask=new Jd;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 Yo(m(this,this.onLoad),a,m(this,this.onTimedAc));this._im2=new Yo(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 Ca(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 ow;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"]=Js;Js.__name__="com.tilbuci.display.InstanceImage";Js.__super__=Da;Js.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(){xa.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);p.focusMode?(xa.tween(this,3,{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).ease(qg.get_easeNone()),xa.transform(this,3).color(F.parseInt(this._desc.color),this._desc.colorAlpha).ease(qg.get_easeNone())):
(xa.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),xa.transform(this,p.mdata.time).color(F.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 Il(F.parseInt(this._desc.dropshadow[0]),
parseFloat(this._desc.dropshadow[1]),F.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 pj(parseFloat(this._desc.blur[0]),parseFloat(this._desc.blur[1])));this._desc.glow.length==5&&a.push(new me(F.parseInt(this._desc.glow[0]),parseFloat(this._desc.glow[1]),F.parseInt(this._desc.glow[2]),F.parseInt(this._desc.glow[2]),
F.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"&&xa.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}p.focusMode?xa.tween(this,3,{x:a,y:b,width:c,height:d,alpha:f}).autoVisible(!1).ease(qg.get_easeNone()):xa.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);xa.stop(this._imCurrent);xa.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);p.focusMode?(xa.tween(this._imCurrent,3,{alpha:1}).ease(qg.get_easeNone()),xa.tween(this._imOther,3,{alpha:0}).ease(qg.get_easeNone())):(xa.tween(this._imCurrent,p.movie.collections.h[this._data.collection].time,{alpha:1}),xa.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);p.focusMode?(xa.tween(this._imCurrent,3,{y:0}).ease(qg.get_easeNone()),xa.tween(this._imOther,3,{y:-this._imCurrent.get_height()}).ease(qg.get_easeNone())):(xa.tween(this._imCurrent,p.movie.collections.h[this._data.collection].time,{y:0}),xa.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);p.focusMode?(xa.tween(this._imCurrent,3,{x:0}).ease(qg.get_easeNone()),xa.tween(this._imOther,3,{x:this._imCurrent.get_width()}).ease(qg.get_easeNone())):(xa.tween(this._imCurrent,p.movie.collections.h[this._data.collection].time,{x:0}),xa.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);p.focusMode?(xa.tween(this._imCurrent,3,{x:0}).ease(qg.get_easeNone()),xa.tween(this._imOther,3,{x:-this._imCurrent.get_width()}).ease(qg.get_easeNone())):(xa.tween(this._imCurrent,p.movie.collections.h[this._data.collection].time,{x:0}),
xa.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);p.focusMode?(xa.tween(this._imCurrent,3,{y:0}).ease(qg.get_easeNone()),xa.tween(this._imOther,3,{y:this._imCurrent.get_height()}).ease(qg.get_easeNone())):(xa.tween(this._imCurrent,
p.movie.collections.h[this._data.collection].time,{y:0}),xa.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 Ca(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 H;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 me(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},focus: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].focus:!0},__class__:Js,__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 ow=function(){this._fixed=[];this.horizontal=new Ti([]);this.vertical=new Ti([]);this.horizontal.ok=this.vertical.ok=!0};t["com.tilbuci.display.ImageSet"]=ow;ow.__name__="com.tilbuci.display.ImageSet";ow.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)&&U.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__:ow};var Ks=function(){this._updating="";Da.call(this);this._borders=
new Jd;this.addChild(this._borders);this._move=new Da;new Oa;var a=new Oa(va.getBitmapData("iconMove"));a.smoothing=!0;this._move.addChild(a);this.addChild(this._move);this._resizeH=new Da;var b=new Oa(va.getBitmapData("iconResizeH"));b.smoothing=!0;this._resizeH.addChild(b);this.addChild(this._resizeH);this._resizeV=new Da;b=new Oa(va.getBitmapData("iconResizeV"));b.smoothing=!0;this._resizeV.addChild(b);this.addChild(this._resizeV);this._resize=new Da;b=new Oa(va.getBitmapData("iconResize"));b.smoothing=
!0;this._resize.addChild(b);this.addChild(this._resize);this._limits=new Ca(3*a.get_width(),3*a.get_height());this._stagepos=new Ca;this.set_visible(!1)};t["com.tilbuci.display.InstanceSelect"]=Ks;Ks.__name__="com.tilbuci.display.InstanceSelect";Ks.__super__=Da;Ks.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;xa.transform(this.image,.01).color(F.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;xa.stop(this.image,null,!0);xa.transform(this.image,.01).color(F.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 Il(F.parseInt(c.dropshadow[0]),parseFloat(c.dropshadow[1]),F.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 pj(parseFloat(c.blur[0]),
parseFloat(c.blur[1]))),c.glow.length==5&&a.push(new me(F.parseInt(c.glow[0]),parseFloat(c.glow[1]),F.parseInt(c.glow[2]),F.parseInt(c.glow[2]),F.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__:Ks});var Ls=function(){this.size=new Ca;this.position=new Ca;this.instances=[];Da.call(this);this.mouseChildren=
this.mouseEnabled=!1};t["com.tilbuci.display.MultiSelect"]=Ls;Ls.__name__="com.tilbuci.display.MultiSelect";Ls.__super__=Da;Ls.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__:Ls});var Ms=function(a){this._scrollPos=0;Cc.call(this,"paragraph",!1,a);this._text=new Ic;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"]=Ms;Ms.__name__="com.tilbuci.display.ParagraphImage";
Ms.__super__=Cc;Ms.prototype=I(Cc.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=F.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(F.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 Ec(100);this._loadTimer.run=m(this,this.onOk)},kill:function(){Cc.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__:Ms});var Zc=function(a){Cc.call(this,"picture",!1,a);this._lastMedia="";
this._loader=new If;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"]=Zc;Zc.__name__="com.tilbuci.display.PictureImage";Zc.__super__=Cc;Zc.prototype=I(Cc.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 ne(a))},unload:function(){this._mediaLoaded=!1;this._lastMedia="";try{this._loader.unload()}catch(a){}},kill:function(){Cc.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__:Zc});var Bn=function(a){Cc.call(this,"shape",!1,a);this._shape=new Jd;this.addChild(this._shape)};t["com.tilbuci.display.ShapeImage"]=Bn;
Bn.__name__="com.tilbuci.display.ShapeImage";Bn.__super__=Cc;Bn.prototype=I(Cc.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=Fa.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(F.parseInt(u.field(b,"color")),u.field(b,"alpha"));u.field(b,"border")>0?this._shape.get_graphics().lineStyle(u.field(b,"border"),F.parseInt(u.field(b,"bdcolor")),u.field(b,"bdalpha")):(b.border=.2,this._shape.get_graphics().lineStyle(.2,
F.parseInt(u.field(b,"color")),u.field(b,"alpha")));switch(u.field(b,"type")){case "circle":this._shape.get_graphics().drawCircle(128,128,128-2*u.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-u.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(u.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-u.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(u.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-u.field(b,"border")/2,165);this._shape.get_graphics().lineTo(183,253);this._shape.get_graphics().lineTo(73,253);this._shape.get_graphics().lineTo(u.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-u.field(b,"border")/2,108);this._shape.get_graphics().lineTo(191,216);this._shape.get_graphics().lineTo(65,216);this._shape.get_graphics().lineTo(u.field(b,"border")/2,108);this._shape.get_graphics().lineTo(65,0);a=!0;break;case "isoscelestriangle":this._shape.get_graphics().moveTo(128,u.field(b,"border")/2);this._shape.get_graphics().lineTo(256-
u.field(b,"border")/2,256-u.field(b,"border")/2);this._shape.get_graphics().lineTo(u.field(b,"border")/2,256-u.field(b,"border")/2);this._shape.get_graphics().lineTo(128,u.field(b,"border")/2);a=!0;break;case "octagon":this._shape.get_graphics().moveTo(75,u.field(b,"border")/2);this._shape.get_graphics().lineTo(181,u.field(b,"border")/2);this._shape.get_graphics().lineTo(256-u.field(b,"border")/2,75);this._shape.get_graphics().lineTo(256-u.field(b,"border")/2,181);this._shape.get_graphics().lineTo(181,
256-u.field(b,"border")/2);this._shape.get_graphics().lineTo(75,256-u.field(b,"border")/2);this._shape.get_graphics().lineTo(u.field(b,"border")/2,181);this._shape.get_graphics().lineTo(u.field(b,"border")/2,75);this._shape.get_graphics().lineTo(75,u.field(b,"border")/2);a=!0;break;case "pentagon":this._shape.get_graphics().moveTo(128,u.field(b,"border")/2);this._shape.get_graphics().lineTo(256-u.field(b,"border")/2,98);this._shape.get_graphics().lineTo(206,256-u.field(b,"border")/2);this._shape.get_graphics().lineTo(50,
256-u.field(b,"border")/2);this._shape.get_graphics().lineTo(u.field(b,"border")/2,98);this._shape.get_graphics().lineTo(128,u.field(b,"border")/2);a=!0;break;case "righttriangle":this._shape.get_graphics().moveTo(u.field(b,"border")/2,u.field(b,"border")/2);this._shape.get_graphics().lineTo(256-u.field(b,"border")/2,256-u.field(b,"border")/2);this._shape.get_graphics().lineTo(u.field(b,"border")/2,256-u.field(b,"border")/2);this._shape.get_graphics().lineTo(u.field(b,"border")/2,u.field(b,"border")/
2);a=!0;break;case "square":this._shape.get_graphics().drawRect(u.field(b,"border")/2,u.field(b,"border")/2,256-2*u.field(b,"border"),256-2*u.field(b,"border"));a=!0;break;case "triangle":this._shape.get_graphics().moveTo(128,0);this._shape.get_graphics().lineTo(256-u.field(b,"border")/2,220);this._shape.get_graphics().lineTo(u.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(u.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 Ec(100);this._loadTimer.run=a?m(this,this.onOk):m(this,this.onError)},kill:function(){Cc.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__:Bn});var Sk=function(a){this._display=[];this._current=0;this.playOnLoad=this._warn=!0;this.frtime=100;this.frames=1;Cc.call(this,"spritemap",!1,a);this._loader=new If;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"]=Sk;Sk.__name__="com.tilbuci.display.SpritemapImage";Sk.__super__=Cc;Sk.prototype=I(Cc.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 ne(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(){Cc.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 yc(Math.ceil(this.oWidth),Math.ceil(this.oHeight),!0,0);d.draw(this._loader,new hb(1,0,0,1,-c*this.oWidth,0),null,null,new Ha(0,0,this.oWidth,this.oHeight));c=new Oa(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 Ec(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 Ec(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__:Sk});var Ns=function(a){Cc.call(this,"text",!1,a);this._text=new Ic;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"]=Ns;Ns.__name__="com.tilbuci.display.TextImage";Ns.__super__=Cc;Ns.prototype=I(Cc.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=F.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(F.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 Ec(100);this._loadTimer.run=m(this,this.onOk)},kill:function(){Cc.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__:Ns});
var Yo=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 Zc(m(this,this.onLoad));this.addChild(this._picture);this._video=new zn(m(this,this.onLoad),m(this,this.onEnd),c);this.addChild(this._video);
this._audio=new xd(m(this,this.onLoad),m(this,this.onEnd),c);this.addChild(this._audio);this._text=new Ns(m(this,this.onLoad));this.addChild(this._text);this._paragraph=new Ms(m(this,this.onLoad));this.addChild(this._paragraph);this._html=new Xo(m(this,this.onLoad));this.addChild(this._html);this._spritemap=new Sk(m(this,this.onLoad));this.addChild(this._spritemap);this._shape=new Bn(m(this,this.onLoad));this.addChild(this._shape)};t["com.tilbuci.display.TilBuciImage"]=Yo;Yo.__name__="com.tilbuci.display.TilBuciImage";
Yo.__super__=Da;Yo.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 Ec(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 Ec(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 Ec(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__:Yo,
__properties__:I(Da.prototype.__properties__,{get_currentMedia:"get_currentMedia",get_currentType:"get_currentType",get_playing:"get_playing"})});var zn=function(a,b,c){this._lasttime=0;this._current="";this._loaded=!1;Cc.call(this,"video",!0,a);this._onEnd=b;this._onTimedAc=c;this._bg=new Jd;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 Zo;this._video.smoothing=!0;this.addChild(this._video);
this._connection=new Cn;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 $o(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"]=zn;zn.__name__="com.tilbuci.display.VideoImage";zn.__super__=Cc;zn.prototype=I(Cc.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){xa.transform(this._stream,p.mdata.time).sound(a,null)},stopSound:function(){xa.stop(this._stream)},kill:function(){Cc.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__:zn});var na=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"]=na;na.__name__="openfl.events.Event";na.prototype={bubbles:null,cancelable:null,currentTarget:null,eventPhase:null,target:null,type:null,__isCanceled:null,__isCanceledNow:null,__preventDefault:null,clone:function(){var a=
new na(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=u.field(this,f);a=typeof c=="string"?a+(" "+f+'="'+F.string(c)+'"'):a+(" "+f+"="+F.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__:na};var Ok=function(a,b,c,d){d==null&&(d=!1);c==null&&(c=!1);na.call(this,a,c,d);this.info=b};t["com.tilbuci.event.TilBuciEvent"]=Ok;Ok.__name__="com.tilbuci.event.TilBuciEvent";Ok.__super__=na;Ok.prototype=I(na.prototype,{info:null,__class__:Ok});var tm=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"]=
tm;tm.__name__="com.tilbuci.font.EmbedFont";tm.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(lc.get_length(b.binary));for(var d=new DataView(a,0,a.byteLength),f=0,g=lc.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){oe.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__:tm,__properties__:{get_fname:"get_fname"}};var ap=function(a){this.ok=!1;a!=null&&this.load(a)};t["com.tilbuci.narrative.BattleCardNarrative"]=ap;ap.__name__="com.tilbuci.narrative.BattleCardNarrative";ap.prototype={ok:null,cardname:null,cardgraphic:null,cardattributes:null,clone:function(){return new ap(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=u.field(a,"cardname"),this.cardgraphic=u.field(a,"cardgraphic"),this.cardattributes=u.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__:ap};var Dn=function(a){this.ok=!1;Da.call(this);a!=null&&this.load(a)};t["com.tilbuci.narrative.CharacterNarrative"]=Dn;Dn.__name__="com.tilbuci.narrative.CharacterNarrative";Dn.__super__=Da;Dn.prototype=I(Da.prototype,{ok:null,id:null,chname:null,about:null,collection:null,clone:function(){return new Dn(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=u.field(a,"id"),this.chname=u.field(a,"chname"),this.about=u.field(a,"about"),this.collection=u.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__:Dn});
var En=function(a){this.diags=new H;this.loaded=!1;this.code="";this.ok=!1;Da.call(this);a!=null&&this.load(a)};t["com.tilbuci.narrative.DialogueFolderNarrative"]=En;En.__name__="com.tilbuci.narrative.DialogueFolderNarrative";En.__super__=Da;En.prototype=I(Da.prototype,{ok:null,id:null,code:null,loaded:null,diags:null,_callback:null,clone:function(){return new En(this.toObject())},load:function(a){this.ok=!1;if(Object.prototype.hasOwnProperty.call(a,"id")){this.id=u.field(a,"id");Object.prototype.hasOwnProperty.call(a,
"code")&&(this.code=u.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=u.field(a,"diags"),b=0,c=u.fields(a);b<c.length;)f=c[b],++b,d=new Fn,d.load(u.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 H}},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 H,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 H,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 kb.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__:En});var ym=function(a){this.audio=this.character=this.asset="";this.ok=!1;Da.call(this);a!=null&&this.load(a)};t["com.tilbuci.narrative.DialogueLineNarrative"]=ym;ym.__name__="com.tilbuci.narrative.DialogueLineNarrative";ym.__super__=Da;ym.prototype=I(Da.prototype,{ok:null,
text:null,audio:null,character:null,asset:null,clone:function(){return new ym(this.toObject())},load:function(a){this.ok=!1;return Object.prototype.hasOwnProperty.call(a,"text")?(this.text=u.field(a,"text"),this.audio=u.field(a,"audio"),this.character=u.field(a,"character"),this.asset=u.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__:ym});var Fn=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"]=Fn;Fn.__name__="com.tilbuci.narrative.DialogueNarrative";Fn.__super__=Da;Fn.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 Fn(this.toObject())},load:function(a){this.ok=!1;if(Object.prototype.hasOwnProperty.call(a,"id")){this.id=u.field(a,"id");Object.prototype.hasOwnProperty.call(a,"navprev")&&(this.navprev=u.field(a,"navprev"));Object.prototype.hasOwnProperty.call(a,"navnext")&&(this.navnext=u.field(a,"navnext"));Object.prototype.hasOwnProperty.call(a,"navend")&&(this.navend=u.field(a,"navend"));Object.prototype.hasOwnProperty.call(a,
"insttext")&&(this.insttext=u.field(a,"insttext"));Object.prototype.hasOwnProperty.call(a,"instname")&&(this.instname=u.field(a,"instname"));Object.prototype.hasOwnProperty.call(a,"instexpr")&&(this.instexpr=u.field(a,"instexpr"));if(Object.prototype.hasOwnProperty.call(a,"lines")){a=u.field(a,"lines");for(var b=0,c=u.fields(a);b<c.length;){var d=c[b];++b;var f=new ym;f.load(u.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__:Fn});var bp=function(a){this.ok=!1;a!=null&&this.load(a)};t["com.tilbuci.narrative.InvItemNarrative"]=bp;bp.__name__="com.tilbuci.narrative.InvItemNarrative";bp.prototype={ok:null,itname:null,ittype:null,itgraphic:null,itaction:null,clone:function(){return new bp(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=u.field(a,"itname"),this.ittype=u.field(a,"ittype"),this.itgraphic=u.field(a,"itgraphic"),this.itaction=u.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__:bp};var Ds=function(){this._directionclick=[!0,!0,!0,!0];this._counterd=0;this._buttonclick=[!0,
!0,!0,!0];this._counter=0;this._controls=new H;this._gameInput=new Sc;this._gameInput.addEventListener("deviceAdded",m(this,this.onDeviceAdded));this._gameInput.addEventListener("deviceRemoved",m(this,this.onDeviceRemoved))};t["com.tilbuci.player.Joystick"]=Ds;Ds.__name__="com.tilbuci.player.Joystick";Ds.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 Ec(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__:Ds};var El=function(a,b,c){this._lastfocus=!1;this._targetTime=.0075;this._target=new Os;this.kfPercent=0;this._currentKf=-1;this._instances=new H;this._scale=1;this._bloverlays=new H;this._overlays=
new H;this._kftoLoad=-1;this._playing=!0;Da.call(this);this._player=a;this._bgarea=b;this._bg=new Jd;this._scene=new Da;this._inputArea=new Da;this._player.inputArea=this._inputArea;this._mask=new Jd;this._holder=new Da;this._overlay=new Da;this._bloverlay=new Da;this._uiBg=new Jd;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 Ps(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 Ks;
this.addChild(this._select);this._multiSelect=new Ls;this.addChild(this._multiSelect)};t["com.tilbuci.player.MovieArea"]=El;El.__name__="com.tilbuci.player.MovieArea";El.__super__=Da;El.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,_lastfocus: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 Ec(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();xa.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 Js(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]);if(p.mode!="editor")if(this.kfPercent=0,p.focusMode)xa.tween(this,3,{kfPercent:100}).onComplete(m(this,this.nextKeyframe)).ease(qg.get_easeNone());else xa.tween(this,p.mdata.time,{kfPercent:100}).onComplete(m(this,this.nextKeyframe));else 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 H,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));this.setFocus()},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;xa.transform(d,.01).color(F.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?(xa.pauseAll(),this._playing=!1):(xa.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"?xa.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){xa.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":xa.defaultEase=Uk.easeIn;break;case "bounce.inout":xa.defaultEase=Uk.easeInOut;break;case "bounce.out":xa.defaultEase=Uk.easeOut;break;case "cubic.in":xa.defaultEase=Vk.easeIn;break;case "cubic.inout":xa.defaultEase=Vk.easeInOut;break;case "cubic.out":xa.defaultEase=
Vk.easeOut;break;case "elastic.in":xa.defaultEase=oj.easeIn;break;case "elastic.inout":xa.defaultEase=oj.easeInOut;break;case "elastic.out":xa.defaultEase=oj.easeOut;break;case "expo.in":xa.defaultEase=mk.easeIn;break;case "expo.inout":xa.defaultEase=mk.easeInOut;break;case "expo.out":xa.defaultEase=mk.easeOut;break;case "linear":xa.defaultEase=qg.get_easeNone();break;case "quad.in":xa.defaultEase=Ui.easeIn;break;case "quad.inout":xa.defaultEase=Ui.easeInOut;break;case "quad.out":xa.defaultEase=Ui.easeOut;
break;case "quart.in":xa.defaultEase=Ah.easeIn;break;case "quart.inout":xa.defaultEase=Ah.easeInOut;break;case "quart.out":xa.defaultEase=Ah.easeOut;break;case "quint.in":xa.defaultEase=Wk.easeIn;break;case "quint.inout":xa.defaultEase=Wk.easeInOut;break;case "quint.out":xa.defaultEase=Wk.easeOut;break;case "sine.in":xa.defaultEase=Xk.easeIn;break;case "sine.inout":xa.defaultEase=Xk.easeInOut;break;case "sine.out":xa.defaultEase=Xk.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(){xa.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 v=p.parser.parseString("$_TEXTS:invalidcode");v==""&&(v="The provided code is invalid. Please try again.");var w=p.parser.parseString("$_TEXTS:emailsubject");w==""&&(w="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,v,w,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()},setFocus:function(){if(p.focusMode){var a=this._instances.h,b=a;a=Object.keys(a);for(var c=a.length,d=0;d<c;){var f=b[a[d++]];f.focus()?f.set_filters([]):
f.set_filters([new Hf(new qi)])}}else if(this._lastfocus)for(b=a=this._instances.h,a=Object.keys(a),c=a.length,d=0;d<c;)f=b[a[d++]],f.set_filters([]);this._lastfocus=p.focusMode},__class__:El,__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 Os=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 Zc(m(this,this.onLoad));this.clear()};t["com.tilbuci.player.Target"]=Os;Os.__name__="com.tilbuci.player.Target";Os.__super__=Da;Os.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 Oa(va.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&&U.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&&U.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&&U.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__:Os});var Ke=function(a,b,c,d,f){f==null&&(f=!1);d==null&&(d=!1);c==null&&(c="");this._actions=new H;this.active=!1;this.config=new H;this._plindex=this._plws=this._ready=!1;ma.call(this);this._plname=a;this._pltitle=b;this._plfile=c;this._plindex=d;this._plws=f;this._ready=!1;this.info=new Qs};t["com.tilbuci.plugin.Plugin"]=
Ke;Ke.__name__="com.tilbuci.plugin.Plugin";Ke.__super__=ma;Ke.prototype=I(ma.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 H;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=u.fields(b.map.h.conf);a<c.length;){var d=c[a];++a;var f=u.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 H;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 H;c.h.wd=a;b("showwindow",c)},hideWindow:function(a){var b=k.editorActions,c=new H;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 H;d.h.name=this._plname;d.h.file=this._plfile;d.h.index=b;d.h.ws=c;b=Fa.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__:Ke,__properties__:{get_ready:"get_ready",get_plfile:"get_plfile",get_pltitle:"get_pltitle",get_plname:"get_plname"}});var gw=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"]=gw;gw.__name__="com.tilbuci.plugin.PluginAccess";gw.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__:gw};var Oj=function(a,b,c,d,f){f==null&&(f=!1);d==null&&(d=!1);b==null&&(b=!0);this.extra=new H;this.ok=!0;na.call(this,a,d,f);this.ok=b;c!=null&&(this.extra=c)};t["com.tilbuci.plugin.PluginEvent"]=
Oj;Oj.__name__="com.tilbuci.plugin.PluginEvent";Oj.__super__=na;Oj.prototype=I(na.prototype,{ok:null,extra:null,__class__:Oj});var od=function(){};t["feathers.core.IFocusObject"]=od;od.__name__="feathers.core.IFocusObject";od.__isInterface__=!0;od.__interfaces__=[bd,Nb];od.prototype={get_focusEnabled:null,set_focusEnabled:null,get_focusOwner:null,set_focusOwner:null,showFocus:null,__class__:od,__properties__:{set_focusOwner:"set_focusOwner",get_focusOwner:"get_focusOwner",set_focusEnabled:"set_focusEnabled",
get_focusEnabled:"get_focusEnabled"}};var y=Q["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)};y.__constructs__=[y.STATE,y.SIZE,y.STYLES,y.SKIN,y.LAYOUT,y.DATA,y.SCROLL,y.SELECTION,y.FOCUS,y.SORT,y.CUSTOM];var Kc=function(){};t["feathers.utils.DisplayObjectFactory"]=Kc;Kc.__name__="feathers.utils.DisplayObjectFactory";Kc.withDisplayObject=function(a,b){var c=new Kc;c.create=function(){return a};c.destroy=b;return c};Kc.withClass=
function(a,b){b==null&&(b=function(d){x.__implements(d,Ea)&&d.dispose()});var c=new Kc;c.create=function(){return Eb.createInstance(a,[])};c.destroy=b;return c};Kc.withFunction=function(a,b){var c=new Kc;c.create=a;c.destroy=b;return c};Kc.prototype={create:function(){return null},destroy:function(a){},__class__:Kc};var x=function(){};t["js.Boot"]=x;x.__name__="js.Boot";x.getClass=function(a){if(a==null)return null;if(a instanceof Array)return Array;var b=a.__class__;if(b!=null)return b;a=x.__nativeClassName(a);
return a!=null?x.__resolveNativeClass(a):null};x.__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=Q[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(x.__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?",":"")+x.__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+" : "+x.__string_rec(a[g],b));b=b.substring(1);
return c+("\n"+b+"}");case "string":return a;default:return String(a)}};x.__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||x.__interfLoop(g,b))return!0}return x.__interfLoop(a.__super__,b)};x.__instanceof=function(a,b){if(b==null)return!1;switch(b){case Array:return a instanceof Array;case fw:return typeof a=="boolean";case kA:return a!=null;case Oz:return typeof a=="number";case pw:return typeof a==
"number"?(a|0)===a:!1;case String:return typeof a=="string";default:if(a!=null)if(typeof b=="function"){if(x.__downcastCheck(a,b))return!0}else{if(typeof b=="object"&&x.__isNativeObj(b)&&a instanceof b)return!0}else return!1;return b==qw&&a.__name__!=null||b==Xz&&a.__ename__!=null?!0:a.__enum__!=null?Q[a.__enum__]==b:!1}};x.__downcastCheck=function(a,b){return a instanceof b?!0:b.__isInterface__?x.__interfLoop(x.getClass(a),b):!1};x.__implements=function(a,b){return x.__interfLoop(x.getClass(a),b)};
x.__cast=function(a,b){if(a==null||x.__instanceof(a,b))return a;throw Z.thrown("Cannot cast "+F.string(a)+" to "+F.string(b));};x.__nativeClassName=function(a){a=x.__toStr.call(a).slice(8,-1);return a=="Object"||a=="Function"||a=="Math"||a=="JSON"?null:a};x.__isNativeObj=function(a){return x.__nativeClassName(a)!=null};x.__resolveNativeClass=function(a){return wa[a]};var Jl=function(){};t["feathers.controls.IRange"]=Jl;Jl.__name__="feathers.controls.IRange";Jl.__isInterface__=!0;Jl.__interfaces__=
[Ea];Jl.prototype={get_value:null,set_value:null,get_minimum:null,set_minimum:null,get_maximum:null,set_maximum:null,__class__:Jl,__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 cp=function(){};t["feathers.controls.IScrollBar"]=cp;cp.__name__="feathers.controls.IScrollBar";cp.__isInterface__=!0;cp.__interfaces__=[Jl];cp.prototype={get_step:null,set_step:null,get_page:null,set_page:null,
__class__:cp,__properties__:{set_page:"set_page",get_page:"get_page",set_step:"set_step",get_step:"get_step"}};var Bh=function(){};t["feathers.core.IStateContext"]=Bh;Bh.__name__="feathers.core.IStateContext";Bh.__isInterface__=!0;Bh.__interfaces__=[Fb];Bh.prototype={get_currentState:null,__class__:Bh,__properties__:{get_currentState:"get_currentState"}};var Xh=function(){};t["feathers.controls.ITriggerView"]=Xh;Xh.__name__="feathers.controls.ITriggerView";Xh.__isInterface__=!0;Xh.__interfaces__=
[Ea];var si=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=Jc.UP;da.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"]=si;si.__name__="feathers.controls.BasicButton";si.__interfaces__=[Bh,Xh];si.__super__=da;si.prototype=I(da.prototype,{_currentState:null,get_currentState:function(){return this._currentState},set_enabled:function(a){da.prototype.set_enabled.call(this,a);this._enabled?this._currentState==Jc.DISABLED&&this.changeState(Jc.UP):this.changeState(Jc.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(y.STYLES)}},initialize:function(){da.prototype.initialize.call(this);this._pointerToState==null&&(this._pointerToState=
new zm(this,m(this,this.changeState),Jc.UP,Jc.DOWN,Jc.HOVER));this._keyToState==null&&(this._keyToState=new Gn(this,m(this,this.changeState),Jc.UP,Jc.DOWN));this._pointerTrigger==null&&(this._pointerTrigger=new Rs(this))},update:function(){this.commitChanges();this.measure();this.layoutContent()},commitChanges:function(){var a=this.isInvalid(y.STYLES),b=this.isInvalid(y.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:(x.__implements(a,Ea)&&a.initializeNow(),this._backgroundSkinMeasurements==null?this._backgroundSkinMeasurements=new Sb(a):this._backgroundSkinMeasurements.save(a),x.__implements(a,sb)&&a.set_uiContext(this),x.__implements(a,ge)&&a.set_stateContext(this),this.addChildAt(a,0))},removeCurrentBackgroundSkin:function(a){a!=null&&(x.__implements(a,sb)&&a.set_uiContext(null),x.__implements(a,ge)&&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;x.__implements(this._currentBackgroundSkin,
tb)&&(h=this._currentBackgroundSkin);x.__implements(this._currentBackgroundSkin,ba)&&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),
x.__implements(this._currentBackgroundSkin,ba)&&this._currentBackgroundSkin.validateNow())},changeState:function(a){this._enabled||(a=Jc.DISABLED);this._currentState!=a&&(this._currentState=a,this.setInvalid(y.STATE),X.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(y.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(y.STYLES);return this.__backgroundSkin},clearStyle_backgroundSkin:function(){this.set_backgroundSkin(null);return this.get_backgroundSkin()},__class__:si,__properties__:I(da.prototype.__properties__,{set_backgroundSkin:"set_backgroundSkin",get_backgroundSkin:"get_backgroundSkin",
set_keepDownStateOnRollOut:"set_keepDownStateOnRollOut",get_keepDownStateOnRollOut:"get_keepDownStateOnRollOut",get_currentState:"get_currentState"})});var Kl=function(){};t["feathers.core.IHTMLTextControl"]=Kl;Kl.__name__="feathers.core.IHTMLTextControl";Kl.__isInterface__=!0;Kl.__interfaces__=[Ea];Kl.prototype={get_htmlText:null,set_htmlText:null,__class__:Kl,__properties__:{set_htmlText:"set_htmlText",get_htmlText:"get_htmlText"}};var te=function(){};t["feathers.core.ITextControl"]=te;te.__name__=
"feathers.core.ITextControl";te.__isInterface__=!0;te.__interfaces__=[Ea];te.prototype={get_text:null,set_text:null,get_baseline:null,__class__:te,__properties__:{get_baseline:"get_baseline",set_text:"set_text",get_text:"get_text"}};var Wb=function(a,b){this.__showText=!0;this.__gap=this.__minGap=this.__iconOffsetX=this.__iconOffsetY=this.__textOffsetX=this.__textOffsetY=0;this.__iconPosition=pa.LEFT;this.__verticalAlign=fc.MIDDLE;this.__horizontalAlign=Vb.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();si.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"]=Wb;Wb.__name__="feathers.controls.Button";Wb.__interfaces__=[od,Kl,te];Wb.__super__=si;Wb.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(y.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(y.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(y.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(y.STYLES)}},setPadding:function(a){this.set_paddingTop(a);this.set_paddingRight(a);this.set_paddingBottom(a);this.set_paddingLeft(a)},initializeButtonTheme:function(){rw.initialize()},
initialize:function(){si.prototype.initialize.call(this);this.textField==null&&(this.textField=new Ic,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(y.DATA),b=this.isInvalid(y.SIZE),c=this.isInvalid(y.STATE),d=this.isInvalid(y.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;x.__implements(this._currentBackgroundSkin,tb)&&(h=this._currentBackgroundSkin);x.__implements(this._currentBackgroundSkin,ba)&&this._currentBackgroundSkin.validateNow();x.__implements(this._currentIcon,ba)&&(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()!=pa.LEFT&&this.get_iconPosition()!=pa.RIGHT||(x.__implements(this._currentIcon,ba)&&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()==pa.LEFT||this.get_iconPosition()==pa.RIGHT){if(b||c)d+=a;d+=this._currentIcon.get_width()}else if(this.get_iconPosition()==pa.TOP||this.get_iconPosition()==pa.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()==pa.TOP||this.get_iconPosition()==pa.BOTTOM){if(b||c)d+=a;d+=this._currentIcon.get_height()}else if(this.get_iconPosition()==pa.LEFT||this.get_iconPosition()==pa.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()==pa.LEFT||this.get_iconPosition()==pa.RIGHT){if(b||c)d+=a;d+=this._currentIcon.get_width()}else if(this.get_iconPosition()==pa.TOP||this.get_iconPosition()==pa.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()==pa.TOP||this.get_iconPosition()==pa.BOTTOM){if(b||c)d+=a;d+=this._currentIcon.get_height()}else if(this.get_iconPosition()==pa.LEFT||this.get_iconPosition()==pa.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(){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()!=pa.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()==pa.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;x.__implements(this._currentIcon,ba)&&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()==pa.LEFT||this.get_iconPosition()==pa.RIGHT)b-=this._currentIcon.get_width()+a;if(this.get_iconPosition()==pa.TOP||this.get_iconPosition()==pa.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()==Vb.LEFT?a.set_x(this.get_paddingLeft()):this.get_horizontalAlign()==Vb.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()==fc.TOP?a.set_y(this.get_paddingTop()):this.get_verticalAlign()==fc.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()==pa.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()==fc.TOP){var a=this.textField;a.set_y(a.get_y()+(this._currentIcon.get_height()+this.get_gap()))}else this.get_verticalAlign()==fc.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()==pa.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()==Vb.RIGHT?(a=this.textField,a.set_x(a.get_x()-(this._currentIcon.get_width()+this.get_gap()))):this.get_horizontalAlign()==Vb.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()==pa.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()==fc.BOTTOM?(a=this.textField,a.set_y(a.get_y()-(this._currentIcon.get_height()+this.get_gap()))):this.get_verticalAlign()==fc.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()==pa.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()==Vb.LEFT?(a=this.textField,a.set_x(a.get_x()+(this.get_gap()+this._currentIcon.get_width()))):this.get_horizontalAlign()==Vb.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()==pa.LEFT||this.get_iconPosition()==pa.RIGHT?
this.get_verticalAlign()==fc.TOP?this._currentIcon.set_y(this.get_paddingTop()):this.get_verticalAlign()==fc.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()==Vb.LEFT?this._currentIcon.set_x(this.get_paddingLeft()):this.get_horizontalAlign()==Vb.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{x.__implements(a,Ea)&&a.initializeNow();this._iconMeasurements==
null?this._iconMeasurements=new Sb(a):this._iconMeasurements.save(a);x.__implements(a,sb)&&a.set_uiContext(this);x.__implements(a,ge)&&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)),
x.__implements(a,sb)&&a.set_uiContext(null),x.__implements(a,ge)&&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 Hc("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(y.STYLES)},button_icon_resizeHandler:function(a){this._ignoreIconResizes||this.setInvalid(y.STYLES)},get_styleContext:function(){return Wb},__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(y.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(y.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(y.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(y.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(y.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(y.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(y.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(y.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(y.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(y.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(y.STYLES);return this.__horizontalAlign},clearStyle_horizontalAlign:function(){this.set_horizontalAlign(Vb.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(y.STYLES);return this.__verticalAlign},clearStyle_verticalAlign:function(){this.set_verticalAlign(fc.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(y.STYLES);return this.__iconPosition},clearStyle_iconPosition:function(){this.set_iconPosition(pa.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(y.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(y.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(y.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(y.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(y.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(y.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(y.STYLES);return this.__showText},clearStyle_showText:function(){this.set_showText(!0);return this.get_showText()},__class__:Wb,__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_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 Zf=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;da.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"]=Zf;Zf.__name__="feathers.controls.supportClasses.BaseScrollBar";Zf.__interfaces__=[cp];Zf.__super__=da;Zf.prototype=I(da.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(y.DATA);!this.liveDragging&&this._dragging||X.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(y.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(y.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(y.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(y.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(y.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(y.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(Zf.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(Zf.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();da.prototype.dispose.call(this)},initialize:function(){da.prototype.initialize.call(this);this._isDefaultValue&&this.set_value(this.restrictValue(this._value))},update:function(){this.isInvalid(y.SIZE);var a=this.isInvalid(y.STATE),
b=this.isInvalid(y.STYLES);this._previousCustomDecrementButtonVariant!=this.get_customDecrementButtonVariant()&&this.setInvalidationFlag(Zf.INVALIDATION_FLAG_DECREMENT_BUTTON_FACTORY);this._previousCustomIncrementButtonVariant!=this.get_customIncrementButtonVariant()&&this.setInvalidationFlag(Zf.INVALIDATION_FLAG_INCREMENT_BUTTON_FACTORY);var c=this.isInvalid(Zf.INVALIDATION_FLAG_DECREMENT_BUTTON_FACTORY),d=this.isInvalid(Zf.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=x.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&&(x.__implements(a,sb)&&a.set_uiContext(null),a.removeEventListener("mouseDown",m(this,this.thumbSkin_mouseDownHandler)),this.removeChild(a)),this._currentThumbSkin!=null?(x.__implements(this._currentThumbSkin,Ea)&&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)),x.__implements(this._currentThumbSkin,sb)&&this._currentThumbSkin.set_uiContext(this)):this._thumbSkinMeasurements=null)},refreshTrack:function(){var a=this._currentTrackSkin;this._currentTrackSkin=this.get_trackSkin();this._currentTrackSkin!=a&&(a!=null&&(x.__implements(a,sb)&&a.set_uiContext(null),this.removeChild(a),a.removeEventListener("mouseDown",m(this,this.trackSkin_mouseDownHandler))),this._currentTrackSkin!=null?(x.__implements(this._currentTrackSkin,
Ea)&&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)),x.__implements(this._currentTrackSkin,sb)&&this._currentTrackSkin.set_uiContext(this)):this._trackSkinMeasurements=null)},refreshSecondaryTrack:function(){var a=this._currentSecondaryTrackSkin;
this._currentSecondaryTrackSkin=this.get_secondaryTrackSkin();this._currentSecondaryTrackSkin!=a&&(a!=null&&(x.__implements(a,sb)&&a.set_uiContext(null),this.removeChild(a),a.removeEventListener("mouseDown",m(this,this.trackSkin_mouseDownHandler))),this._currentSecondaryTrackSkin!=null?(x.__implements(this._currentSecondaryTrackSkin,Ea)&&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)),x.__implements(this._currentSecondaryTrackSkin,sb)&&this._currentSecondaryTrackSkin.set_uiContext(this)):this._secondaryTrackSkinMeasurements=null)},refreshEnabled:function(){x.__implements(this._currentThumbSkin,Ea)&&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=x.getClass(this);throw new Ce("Missing override for 'layoutButtons' in type "+a.__name__);}},layoutSplitTrack:function(){var a=x.getClass(this);throw new Ce("Missing override for 'layoutSplitTrack' in type "+a.__name__);},layoutSingleTrack:function(){var a=x.getClass(this);throw new Ce("Missing override for 'layoutSingleTrack' in type "+a.__name__);},layoutThumb:function(){var a=
x.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:Zf.defaultDecrementButtonFactory;this._oldDecrementButtonFactory=a;this.decrementButton=a.create();this.decrementButton.get_variant()==null&&(a=this.get_customDecrementButtonVariant(),a==null&&(this instanceof eh?a=eh.CHILD_VARIANT_DECREMENT_BUTTON:
this instanceof fh&&(a=fh.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:Zf.defaultIncrementButtonFactory;this._oldIncrementButtonFactory=a;this.incrementButton=a.create();this.incrementButton.get_variant()==null&&(a=this.get_customIncrementButtonVariant(),a==null&&(this instanceof eh?a=eh.CHILD_VARIANT_INCREMENT_BUTTON:this instanceof fh&&(a=fh.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=x.getClass(this);throw new Ce("Missing override for 'valueToLocation' in type "+a.__name__);},locationToValue:function(a,b){a=x.getClass(this);throw new Ce("Missing override for 'locationToValue' in type "+a.__name__);},saveThumbStart:function(a,b){a=x.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&&Rd.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,Kd.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=x.__cast(a.currentTarget,dd);a.removeEventListener("mouseMove",m(this,this.thumbSkin_stage_mouseMoveHandler));a.removeEventListener("mouseUp",
m(this,this.thumbSkin_stage_mouseUpHandler));this._dragging=!1;Kd.dispatch(this,"scrollComplete");this.liveDragging||X.dispatch(this,"change")},trackSkin_mouseDownHandler:function(a){this._enabled&&this.stage!=null&&Rd.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,Kd.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=x.__cast(a.currentTarget,dd);a.removeEventListener("mouseMove",m(this,this.trackSkin_stage_mouseMoveHandler));
a.removeEventListener("mouseUp",m(this,this.trackSkin_stage_mouseUpHandler));this._dragging=!1;Kd.dispatch(this,"scrollComplete");this.liveDragging||X.dispatch(this,"change")},baseScrollBar_decrementButton_mouseDownHandler:function(a){this._enabled&&this.decrementButton.get_enabled()&&this.stage!=null&&Rd.forStage(this.stage).claimMouse(this)&&this.decrement()},baseScrollBar_decrementButton_touchBeginHandler:function(a){a.isPrimaryTouchPoint||this._enabled&&this.decrementButton.get_enabled()&&this.stage!=
null&&Rd.forStage(this.stage).claimMouse(this)&&this.decrement()},baseScrollBar_incrementButton_mouseDownHandler:function(a){this._enabled&&this.incrementButton.get_enabled()&&this.stage!=null&&Rd.forStage(this.stage).claimMouse(this)&&this.increment()},baseScrollBar_incrementButton_touchBeginHandler:function(a){a.isPrimaryTouchPoint||this._enabled&&this.incrementButton.get_enabled()&&this.stage!=null&&Rd.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(y.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(y.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(y.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(y.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(y.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(y.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(y.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(y.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(y.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(y.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(y.STYLES);return this.__hideThumbWhenDisabled},clearStyle_hideThumbWhenDisabled:function(){this.set_hideThumbWhenDisabled(!1);return this.get_hideThumbWhenDisabled()},__class__:Zf,__properties__:I(da.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 fh=function(a,b,c,d){c==null&&(c=1);b==null&&(b=0);a==null&&(a=0);
this.initializeHScrollBarTheme();Zf.call(this,a,b,c,d)};t["feathers.controls.HScrollBar"]=fh;fh.__name__="feathers.controls.HScrollBar";fh.__super__=Zf;fh.prototype=I(Zf.prototype,{initializeHScrollBarTheme:function(){sw.initialize()},valueToLocation:function(a){x.__implements(this._currentThumbSkin,ba)&&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),
x.__implements(this._currentThumbSkin,ba)&&this._currentThumbSkin.validateNow());this._currentTrackSkin!=null&&(this._trackSkinMeasurements.restore(this._currentTrackSkin),x.__implements(this._currentTrackSkin,ba)&&this._currentTrackSkin.validateNow());this._currentSecondaryTrackSkin!=null&&(this._secondaryTrackSkinMeasurements.restore(this._currentSecondaryTrackSkin),x.__implements(this._currentSecondaryTrackSkin,ba)&&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&&(x.__implements(this._currentThumbSkin,ba)&&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);x.__implements(this._currentTrackSkin,ba)&&this._currentTrackSkin.validateNow();
x.__implements(this._currentSecondaryTrackSkin,ba)&&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);x.__implements(this._currentTrackSkin,ba)&&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()){x.__implements(this._currentThumbSkin,ba)&&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):x.__implements(this._currentThumbSkin,tb)&&(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 fh},__class__:fh});var eh=function(a,b,c,d){c==null&&(c=1);b==
null&&(b=0);a==null&&(a=0);this.initializeVScrollBarTheme();Zf.call(this,a,b,c,d)};t["feathers.controls.VScrollBar"]=eh;eh.__name__="feathers.controls.VScrollBar";eh.__super__=Zf;eh.prototype=I(Zf.prototype,{initializeVScrollBarTheme:function(){tw.initialize()},valueToLocation:function(a){x.__implements(this._currentThumbSkin,ba)&&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),x.__implements(this._currentThumbSkin,ba)&&this._currentThumbSkin.validateNow());this._currentTrackSkin!=null&&(this._trackSkinMeasurements.restore(this._currentTrackSkin),x.__implements(this._currentTrackSkin,ba)&&this._currentTrackSkin.validateNow());this._currentSecondaryTrackSkin!=null&&(this._secondaryTrackSkinMeasurements.restore(this._currentSecondaryTrackSkin),x.__implements(this._currentSecondaryTrackSkin,ba)&&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&&
(x.__implements(this._currentThumbSkin,ba)&&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);x.__implements(this._currentSecondaryTrackSkin,ba)&&this._currentSecondaryTrackSkin.validateNow();
x.__implements(this._currentTrackSkin,ba)&&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);x.__implements(this._currentTrackSkin,ba)&&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()){x.__implements(this._currentThumbSkin,ba)&&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):x.__implements(this._currentThumbSkin,tb)&&(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 eh},__class__:eh});var Bb=function(){this.__scrollPixelSnapping=
!1;this.__hideScrollBarEase=Ah.easeOut;this.__hideScrollBarDuration=.2;this.__showScrollBarMinimumDuration=.5;this.__scrollBarYPosition=pa.RIGHT;this.__scrollBarXPosition=pa.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=Pj.MASK;this._ignoreScrollerChanges=
this._settingScrollerDimensions=this._ignoreViewPortResizing=!1;this._scrollRect2=new Ha;this._scrollRect1=new Ha;this._prevMinScrollX=this._prevMaxScrollX=this._prevMinScrollY=this._prevMaxScrollY=0;this._hideScrollBarX=this._hideScrollBarY=null;this._scrollPolicyX=this._scrollPolicyY=Le.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;da.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"]=Bb;Bb.__name__="feathers.controls.supportClasses.BaseScrollContainer";
Bb.__interfaces__=[od];Bb.__super__=da;Bb.prototype=I(da.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(y.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(Bb.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(Bb.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(Bb.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,Kd.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,Kd.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,Kd.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,Kd.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(y.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(y.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(y.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(y.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(y.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 Ha(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();da.prototype.dispose.call(this)},update:function(){var a=this.isInvalid(y.STYLES);this.isInvalid(y.SIZE);
var b=this.isInvalid(y.STATE),c=this.isInvalid(Bb.INVALIDATION_FLAG_SCROLLER_FACTORY),d=this.isInvalid(Bb.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(y.SCROLL)&&this.needsScrollMeasurement()||this.isInvalid(y.DATA)||this.isInvalid(y.SIZE)||this.isInvalid(y.STYLES)||this.isInvalid(Bb.INVALIDATION_FLAG_SCROLL_BAR_FACTORY)||this.isInvalid(y.STATE)?!0:this.isInvalid(y.LAYOUT)},needsScrollMeasurement:function(){return!1},createScroller:function(){this.destroyScroller();this.scroller=
this._scrollerFactory!=null?this._scrollerFactory():new Vi;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(Bb.INVALIDATION_FLAG_SCROLLER_FACTORY))},
createScrollBars:function(){this.createScrollBarX();this.createScrollBarY()},createScrollBarX:function(){this.destroyScrollBarX();var a=this._scrollBarXFactory!=null?this._scrollBarXFactory:Bb.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(x.__cast(this.scrollBarX,ka))},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(x.__cast(this.scrollBarX,ka)),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:Bb.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(x.__cast(this.scrollBarY,ka))},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(x.__cast(this.scrollBarY,ka)),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()||Kd.dispatch(this,"scroll",!1,!1,this.scroller.get_scrollX(),this.scroller.get_scrollY())}},refreshViewPort:function(){x.__implements(this.scrollBarX,ba)&&this.scrollBarX.validateNow();x.__implements(this.scrollBarY,ba)&&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()==Le.AUTO){var a=this.showScrollBarX;this.calculateViewPortOffsetsForFixedScrollBarX(!1);this.get_fixedScrollBars()&&this.showScrollBarX!=
a&&this.refreshViewPortBoundsForMeasurement()}this.get_scrollPolicyY()==Le.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()==Le.AUTO&&this.get_scrollPolicyY()==Le.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()==Le.AUTO&&(a=this.showScrollBarX,this.calculateViewPortOffsetsForFixedScrollBarX(!0),this.get_fixedScrollBars()&&
this.showScrollBarX!=a&&this.refreshViewPortBoundsForLayout());this.get_scrollPolicyY()==Le.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()==Le.AUTO&&this.get_scrollPolicyY()==Le.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==
Le.ON||this._scrollPolicyX==Le.AUTO&&this.scroller.get_minScrollX()!=this.scroller.get_maxScrollX());this.showScrollBarY=this.get_showScrollBars()&&(this._scrollPolicyX==Le.ON||this._scrollPolicyY==Le.AUTO&&this.scroller.get_minScrollY()!=this.scroller.get_maxScrollY());this.topViewPortOffset=this.get_fixedScrollBars()&&this.showScrollBarX&&this.get_scrollBarXPosition()==pa.TOP?this.scrollBarX.get_height():0;this.bottomViewPortOffset=this.get_fixedScrollBars()&&this.showScrollBarX&&this.get_scrollBarXPosition()==
pa.BOTTOM?this.scrollBarX.get_height():0;this.leftViewPortOffset=this.get_fixedScrollBars()&&this.showScrollBarY&&this.get_scrollBarYPosition()==pa.LEFT?this.scrollBarY.get_width():0;this.rightViewPortOffset=this.get_fixedScrollBars()&&this.showScrollBarY&&this.get_scrollBarYPosition()==pa.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()!=Le.OFF&&(b=this.get_scrollPolicyX()==Le.ON,b||this.get_scrollPolicyX()!=Le.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()==pa.TOP?this.topViewPortOffset+=a:this.bottomViewPortOffset+=a))}},calculateViewPortOffsetsForFixedScrollBarY:function(a){if(this.scrollBarY!=
null){var b=!1;this.get_showScrollBars()&&this.get_scrollPolicyY()!=Le.OFF&&(b=this.get_scrollPolicyY()==Le.ON,b||this.get_scrollPolicyY()!=Le.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()==pa.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==Pj.MASK||this._scrollMode==Pj.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==Pj.MASK||this._scrollMode==Pj.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(x.__cast(this._viewPort,Ia));this.scroller.enabledX=this._enabled&&this._scrollPolicyX!=Le.OFF;this.scroller.enabledY=this._enabled&&this._scrollPolicyY!=Le.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);x.__cast(this.scrollBarX,Ab).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),x.__cast(this.scrollBarY,Ab).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;x.__implements(this._currentBackgroundSkin,tb)&&(h=this._currentBackgroundSkin);x.__implements(this._currentBackgroundSkin,ba)&&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:(x.__implements(a,Ea)&&a.initializeNow(),this._backgroundSkinMeasurements==null?this._backgroundSkinMeasurements=new Sb(a):this._backgroundSkinMeasurements.save(a),x.__implements(a,sb)&&a.set_uiContext(this),this.addChildAt(a,0))},removeCurrentBackgroundSkin:function(a){a!=null&&(x.__implements(a,sb)&&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&&(x.__implements(a,Ea)&&a.initializeNow(),x.__implements(a,sb)&&a.set_uiContext(this),this.addChild(a),this.set_mask(a))},
removeCurrentMaskSkin:function(a){a!=null&&(x.__implements(a,sb)&&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==Pj.MASK?(this._fallbackViewPortMaskSkin==null&&(this._fallbackViewPortMaskSkin=new ab(vb.SolidColor(16711935))),this._fallbackViewPortMaskSkin):null},addCurrentViewPortMaskSkin:function(a){a!=null&&(x.__implements(a,Ea)&&a.initializeNow(),x.__implements(a,sb)&&a.set_uiContext(this),this.addChild(a),x.__cast(this._viewPort,ka).set_mask(a))},removeCurrentViewPortMaskSkin:function(a){a!=null&&(x.__implements(a,sb)&&a.set_uiContext(null),a.parent==this&&this.removeChild(a),x.__cast(this._viewPort,
ka).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&&(x.__implements(a,Ea)&&a.initializeNow(),
x.__implements(a,sb)&&a.set_uiContext(this),this.addChild(a))},removeCurrentScrollBarsCornerSkin:function(a){a!=null&&(x.__implements(a,sb)&&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),x.__implements(this._currentBackgroundSkin,ba)&&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),
x.__implements(this._currentMaskSkin,ba)&&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()==pa.LEFT&&(a-=this.scrollBarY.get_width()));this.get_fixedScrollBars()&&
this.scrollBarX.get_visible()&&(d+=this.scrollBarX.get_height(),this.get_scrollBarXPosition()==pa.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);x.__implements(this._currentViewPortMaskSkin,ba)&&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&&x.__implements(this.scrollBarX,ba)&&this.scrollBarX.validateNow();this.scrollBarY!=null&&x.__implements(this.scrollBarY,ba)&&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=ah.getConcatenatedScaleX(this),d=ah.getConcatenatedScaleY(this);a=Math.round(a/c)*c;b=Math.round(b/d)*d}if(this._scrollMode==Pj.MASK||this._scrollMode==Pj.MASKLESS||this._currentViewPortMaskSkin!=null)d=x.__cast(this._viewPort,ka),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==
Pj.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=x.__cast(this._viewPort,ka);d.set_scrollRect(c)}else throw new Db("Unknown scrollMode: "+F.string(this._scrollMode));
},revealScrollBarX:function(){this.scrollBarX!=null&&this.scroller.get_minScrollX()!=this.scroller.get_maxScrollX()&&(this._hideScrollBarX!=null&&xa.stop(this._hideScrollBarX),this.scrollBarX.set_alpha(1),this._scrollBarXRevealTime=La.getTimer())},revealScrollBarY:function(){this.scrollBarY!=null&&this.scroller.get_minScrollY()!=this.scroller.get_maxScrollY()&&(this._hideScrollBarY!=null&&xa.stop(this._hideScrollBarY),this.scrollBarY.set_alpha(1),this._scrollBarYRevealTime=La.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=xa.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=(La.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=xa.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=(La.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!=
Le.OFF||this._scrollPolicyX!=Le.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!=Le.OFF&&(b=!0,this.set_scrollY(f));this.get_scrollX()!=d&&this._scrollPolicyX!=Le.OFF&&(b=!0,this.set_scrollX(d));b&&a.preventDefault()}},baseScrollContainer_addedToStageHandler:function(a){this.setInvalid(y.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 Ic&&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=Rd.forStage(this.stage);a=b.claimMouse(this);
if(!a){this.scroller.stop();return}}else if(a!=null&&(b=Rd.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();Kd.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(y.SCROLL):(this._viewPort.set_scrollX(this.get_scrollX()),this._viewPort.set_scrollY(this.get_scrollY())):(this.checkForRevealScrollBars(),this.needsScrollMeasurement()?this.setInvalid(y.SCROLL):(this._viewPort.set_scrollX(this.get_scrollX()),this._viewPort.set_scrollY(this.get_scrollY()),this.refreshScrollRect(),this.refreshScrollBarValues()),
Kd.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();Kd.dispatch(this,"scrollComplete",!1,!1,this.scroller.get_scrollX(),this.scroller.get_scrollY())},reclaimMouse:function(){if(this.scroller.get_touchPointIsSimulated()){var a=Rd.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=Rd.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;Kd.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();Kd.dispatch(this,"scrollComplete",!1,!1,this.scroller.get_scrollX(),this.scroller.get_scrollY())},
scrollBarY_scrollStartHandler:function(a){this.scroller.stop();this._scrollerDraggingY=!0;Kd.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();Kd.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(y.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(y.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(y.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(y.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(y.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(y.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(y.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(y.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(y.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(y.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(y.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(y.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(y.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(y.STYLES);return this.__scrollBarXPosition},clearStyle_scrollBarXPosition:function(){this.set_scrollBarXPosition(pa.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(y.STYLES);return this.__scrollBarYPosition},clearStyle_scrollBarYPosition:function(){this.set_scrollBarYPosition(pa.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(y.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(y.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(y.STYLES);return this.__hideScrollBarEase},clearStyle_hideScrollBarEase:function(){this.set_hideScrollBarEase(Ah.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(y.STYLES);return this.__scrollPixelSnapping},clearStyle_scrollPixelSnapping:function(){this.set_scrollPixelSnapping(!1);return this.get_scrollPixelSnapping()},__class__:Bb,__properties__:I(da.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 rg=function(){};t["feathers.core.IFocusContainer"]=rg;rg.__name__="feathers.core.IFocusContainer";rg.__isInterface__=!0;rg.__interfaces__=[od];rg.prototype={get_childFocusEnabled:null,set_childFocusEnabled:null,__class__:rg,__properties__:{set_childFocusEnabled:"set_childFocusEnabled",get_childFocusEnabled:"get_childFocusEnabled"}};var le=function(){this.__layout=null;this._manageChildVisibility=!1;this._autoSizeMode=Ue.CONTENT;this._childFocusEnabled=!0;this._xmlContent=
null;this.items=[];this._displayListBypassEnabled=!0;this._ignoreRemovedEvent=this._ignoreChildChanges=this._ignoreChangesButSetFlags=!1;this.initializeScrollContainerTheme();Bb.call(this);this.get_viewPort()==null&&(this.layoutViewPort=new dp,this.addRawChild(this.layoutViewPort),this.set_viewPort(this.layoutViewPort));this.addEventListener("addedToStage",m(this,this.scrollContainer_addedToStageHandler))};t["feathers.controls.ScrollContainer"]=le;le.__name__="feathers.controls.ScrollContainer";le.__interfaces__=
[rg];le.__super__=Bb;le.prototype=I(Bb.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(y.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(y.SIZE);
this.stage!=null&&(this._autoSizeMode==Ue.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(y.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():Bb.prototype.get_numChildren.call(this)},
addChild:function(a){return this._displayListBypassEnabled?this.addChildAt(a,this.layoutViewPort.get_numChildren()):Bb.prototype.addChild.call(this,a)},addChildAt:function(a,b){if(!this._displayListBypassEnabled)return Bb.prototype.addChildAt.call(this,a,b);var c=this.items.indexOf(a);if(c==b)return a;c>=0&&U.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));x.__implements(a,R)&&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(y.LAYOUT):this.setInvalid(y.LAYOUT);return b},removeChild:function(a){return this.removeChildInternal(a,!0)},removeChildInternal:function(a,b){if(!this._displayListBypassEnabled)return Bb.prototype.removeChild.call(this,a);if(a==null||a.parent!=this.layoutViewPort)return a;U.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));x.__implements(a,R)&&a.removeEventListener("layoutDataChange",m(this,this.scrollContainer_child_layoutDataChangeHandler));a.removeEventListener("removed",m(this,this.scrollContainer_child_removedHandler));this._ignoreChangesButSetFlags?this.setInvalidationFlag(y.LAYOUT):this.setInvalid(y.LAYOUT);
return c},removeChildAt:function(a){return this._displayListBypassEnabled?this.removeChild(this.layoutViewPort.getChildAt(a)):Bb.prototype.removeChildAt.call(this,a)},getChildAt:function(a){return this._displayListBypassEnabled?this.layoutViewPort.getChildAt(a):Bb.prototype.removeChildAt.call(this,a)},getChildIndex:function(a){return this._displayListBypassEnabled?this.items.indexOf(a):Bb.prototype.getChildIndex.call(this,a)},setChildIndex:function(a,b){this._displayListBypassEnabled?this.getChildIndex(a)!=
b&&(U.remove(this.items,a),this.items.splice(b,0,a),this._ignoreChangesButSetFlags?this.setInvalidationFlag(y.LAYOUT):this.setInvalid(y.LAYOUT)):Bb.prototype.setChildIndex.call(this,a,b)},getChildByName:function(a){if(!this._displayListBypassEnabled)return Bb.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 xe("The supplied index is out of bounds.");for(b-=a;b>=0;)this.removeChildAt(a),--b}}else Bb.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(y.LAYOUT)},initializeScrollContainerTheme:function(){uw.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=Bb.prototype.dispatchEvent.call(this,a);this._displayListBypassEnabled=b;return a},validateNow:function(){var a=this._ignoreChangesButSetFlags;this._ignoreChangesButSetFlags=!0;Bb.prototype.validateNow.call(this);this._ignoreChangesButSetFlags=a},update:function(){this._ignoreChangesButSetFlags=!1;var a=this.isInvalid(y.LAYOUT),b=this.isInvalid(y.STYLES);(a||b)&&this.refreshLayout();a=this._displayListBypassEnabled;this._displayListBypassEnabled=!1;b=this._ignoreChildChanges;
this._ignoreChildChanges=!0;Bb.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==Ue.STAGE&&this.stage!=null?(b=this.globalToLocal(new Ca),c=this.globalToLocal(new Ca(this.stage.stageWidth,
this.stage.stageHeight)),a=c.x-b.x,b=c.y-b.y,this.saveMeasurements(a,b,a,b)):Bb.prototype.measure.call(this):!1},refreshViewPortBoundsForMeasurement:function(){var a=this._displayListBypassEnabled;this._displayListBypassEnabled=!0;Bb.prototype.refreshViewPortBoundsForMeasurement.call(this);this._displayListBypassEnabled=a},refreshViewPortBoundsForLayout:function(){var a=this._displayListBypassEnabled;this._displayListBypassEnabled=!0;Bb.prototype.refreshViewPortBoundsForLayout.call(this);this._displayListBypassEnabled=
a},refreshScrollerValues:function(){Bb.prototype.refreshScrollerValues.call(this);if(x.__implements(this.get_layout(),gf)){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 x.__implements(this.get_layout(),gf)},refreshLayout:function(){this.layoutViewPort.set_manageChildVisibility(this._manageChildVisibility);this.layoutViewPort.set_layout(this.get_layout())},scrollContainer_addedToStageHandler:function(a){this._autoSizeMode==Ue.STAGE&&(this.setInvalid(y.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(y.SIZE)},scrollContainer_child_layoutDataChangeHandler:function(a){this._ignoreChildChanges||(this._ignoreChangesButSetFlags?
this.setInvalidationFlag(y.LAYOUT):this.setInvalid(y.LAYOUT))},scrollContainer_child_resizeHandler:function(a){this._ignoreChildChanges||(this._ignoreChangesButSetFlags?this.setInvalidationFlag(y.LAYOUT):this.setInvalid(y.LAYOUT))},scrollContainer_child_removedHandler:function(a){this._ignoreRemovedEvent||Je.__neq(a.target,a.currentTarget)||(a=x.__cast(a.currentTarget,ka),this.removeChildInternal(a,!1))},get_styleContext:function(){return le},__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(y.STYLES);return this.__layout},clearStyle_layout:function(){this.set_layout(null);return this.get_layout()},__class__:le,__properties__:I(Bb.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 ti=function(){};t["feathers.core.IFocusExtras"]=ti;ti.__name__="feathers.core.IFocusExtras";ti.__isInterface__=!0;ti.__interfaces__=[Nb];ti.prototype={get_focusExtrasBefore:null,get_focusExtrasAfter:null,__class__:ti,__properties__:{get_focusExtrasAfter:"get_focusExtrasAfter",
get_focusExtrasBefore:"get_focusExtrasBefore"}};var Tc=function(){this._focusExtrasAfter=[];this._focusExtrasBefore=[];this._footerMeasurements=this._footer=null;this._ignoreFooterResize=!1;this._headerMeasurements=this._header=null;this._ignoreHeaderResize=!1;this.initializePanelTheme();le.call(this)};t["feathers.controls.Panel"]=Tc;Tc.__name__="feathers.controls.Panel";Tc.__interfaces__=[ti];Tc.__super__=le;Tc.prototype=I(le.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)),U.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),x.__implements(this._header,
Ea)&&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(y.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)),U.remove(this._focusExtrasAfter,this._footer),this.removeRawChild(this._footer));this._footer=a;this._footer!=null?(this._focusExtrasAfter.push(this._footer),this.addRawChild(this._footer),x.__implements(this._footer,Ea)&&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(y.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);le.prototype.dispose.call(this)},initializePanelTheme:function(){vw.initialize()},update:function(){this._ignoreChangesButSetFlags=
!1;le.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());x.__implements(this._header,ba)&&this._header.validateNow();this.topViewPortOffset+=this._header.get_height();this.chromeMeasuredWidth=Math.max(this.chromeMeasuredWidth,this._header.get_width());x.__implements(this._header,tb)&&(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()),x.__implements(this._footer,ba)&&this._footer.validateNow(),this.bottomViewPortOffset+=this._footer.get_height(),this.chromeMeasuredWidth=
Math.max(this.chromeMeasuredWidth,this._footer.get_width()),x.__implements(this._footer,tb)&&(this.chromeMeasuredMinWidth=Math.max(this.chromeMeasuredMinWidth,this._footer.get_minWidth())),this._ignoreFooterResize=c);le.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()),x.__implements(this._header,
ba)&&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()),x.__implements(this._footer,ba)&&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(y.SIZE))},panel_footer_resizeHandler:function(a){this._ignoreFooterResize||(this._footerMeasurements!=null&&this._footerMeasurements.save(this._footer),this.setInvalid(y.SIZE))},get_styleContext:function(){return Tc},__class__:Tc,__properties__:I(le.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 ca=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=[];Tc.call(this);this.ui=new zc(this._padding);this.set_backgroundSkin(new wh(3684408));this.set_layout(new Ni);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 Si;this._head.set_text(b);this.set_header(this._head);a=new qb;b=new Cg;b.set_gap(10);a.set_layout(b);h&&(this._btNotes=
new Wb,h=new Oa(va.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 Wb,h=new Oa(va.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 gh;this._tabs.set_dataProvider(new fg);this._tabs.set_layoutData(cd.fill());this._tabs.addEventListener("change",m(this,this.onTab));f&&this.addChild(this._tabs);this._vLayout=new tf;this._vLayout.setPadding(0);this._vLayout.set_gap(0);this._vLayout.set_verticalAlign(fc.TOP);this._vLayout.set_horizontalAlign(Vb.LEFT);this._forms=new le;this._forms.set_backgroundSkin(new wh);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"]=ca;ca.__name__="com.tilbuci.ui.window.PopupWindow";ca.__super__=Tc;ca.prototype=I(Tc.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);x.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(sg.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);x.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__:ca});var ep=function(a,b,c,d){d==
null&&(d=!1);ca.call(this,null,a,b,c,d)};t["com.tilbuci.plugin.PluginWindow"]=ep;ep.__name__="com.tilbuci.plugin.PluginWindow";ep.__super__=ca;ep.prototype=I(ca.prototype,{__class__:ep});var Qs=function(a){this.orientation="";this.displayMultiply=1;this.keyframeTotal=this.keyframeCurrent=this.displayBigger=this.displaySmaller=0;this.movieName=this.movieId=this.sceneName=this.sceneId="";ma.call(this,a)};t["com.tilbuci.plugin.SystemInfo"]=Qs;Qs.__name__="com.tilbuci.plugin.SystemInfo";Qs.__super__=
ma;Qs.prototype=I(ma.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 Oj("movieload"))},onNewScene:function(a,b,c){this.sceneName=a;this.sceneId=b;this.keyframeTotal=
c;this.keyframeCurrent=0;this.dispatchEvent(new Oj("sceneload"))},onNewKeyframe:function(a){this.keyframeCurrent=a;this.dispatchEvent(new Oj("keyframeload"))},onDisplayResize:function(a,b){this.orientation=a;this.displayMultiply=b;this.dispatchEvent(new Oj("displayresize"))},__class__:Qs});var ew=function(){this._aShaders=new H;this._mnPlacement=new H;this._scDirections=new H;this._mvOrigins=new H;this.selScenes=[];this.scenes=new H;this.selMovies=[];this.movies=new H;this.groups=[];var a=new H,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 H;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 H;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;a=new H;b=k.ln.get("sharders-none");a.h.none=b;b=k.ln.get("sharders-deuteranotopia");
a.h.deuteranotopia=b;b=k.ln.get("sharders-protonatopia");a.h.protonatopia=b;b=k.ln.get("sharders-tritanotopia");a.h.tritanotopia=b;b=k.ln.get("sharders-contrast");a.h.contrast=b;b=k.ln.get("sharders-grayscale");a.h.grayscale=b;this._aShaders=a;this.groups.push(new Jf(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 Jf(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 Jf(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 Jf(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 Jf(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 Jf(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 Jf(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 Jf(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 Jf(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 Jf(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 Jf(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 Jf(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 Jf(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 Jf(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 Jf(k.ln.get("window-acbaccesibility-title"),[{n:k.ln.get("acinfo-accesssetdescription"),a:"accessibility.setdescription",p:[{t:"s",n:k.ln.get("acinfo-accesssetdescription-p1"),v:""}],e:[]},{n:k.ln.get("acinfo-accesschangeshader"),a:"accessibility.changeshader",p:[],e:[]},{n:k.ln.get("acinfo-accesssetshader"),a:"accessibility.setshader",p:[{t:"s",n:k.ln.get("acinfo-accesssetshader-p1"),v:"shader"}],e:[]},{n:k.ln.get("acinfo-accessfocuson"),
a:"accessibility.focuson",p:[],e:[]},{n:k.ln.get("acinfo-accessfocusoff"),a:"accessibility.focusoff",p:[],e:[]},{n:k.ln.get("acinfo-accessfocusswitch"),a:"accessibility.focusswitch",p:[],e:[]}]));this.groups.push(new Jf(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 Jf(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 Jf(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 Jf(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 Jf(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 Jf(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"]=
ew;ew.__name__="com.tilbuci.script.ActionInfo";ew.prototype={groups:null,movies:null,selMovies:null,scenes:null,selScenes:null,_lastUpdate:null,_mvOrigins:null,_scDirections:null,_mnPlacement:null,_aShaders: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=="shader"?Object.prototype.hasOwnProperty.call(this._aShaders.h,b[q])?h.push(this._aShaders.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;case "shader":d=Object.prototype.hasOwnProperty.call(this._aShaders.h,c)?d+this._aShaders.h[c]:d+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 H,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 H,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=u.fields(b.map.h.movies);c<d.length;)a=d[c],++c,a=u.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=u.fields(b.map.h.scenes);c<d.length;)a=d[c],++c,a=
u.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__:ew};var Jf=function(a,b){this.actions=new H;this.name="";this.name=a;a=0;for(var c=u.fields(b);a<c.length;){var d=c[a];++a;var f=u.field(b,d);d=this.actions;var g=f.a;f=new Ss(f);d.h[g]=f}};t["com.tilbuci.script.ActionInfoGroup"]=Jf;Jf.__name__="com.tilbuci.script.ActionInfoGroup";Jf.prototype={name:null,actions:null,__class__:Jf};var Ss=function(a){this.e=[];this.p=[];this.a=this.n=
"";this.a=a.a;this.n=a.n;for(var b=0,c=u.fields(a.p);b<c.length;){var d=c[b];++b;this.p.push(new ww(u.field(a.p,d)))}this.e=a.e};t["com.tilbuci.script.ActionInfoAc"]=Ss;Ss.__name__="com.tilbuci.script.ActionInfoAc";Ss.prototype={a:null,n:null,p:null,e:null,__class__:Ss};var ww=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"]=ww;ww.__name__="com.tilbuci.script.ActionInfoParam";ww.prototype={t:null,n:null,v:null,__class__:ww};var xw=function(a,
b,c,d,f){this.name=a;this._steps=c;this._current=0;this._action=d;this._acend=f;this._timer=new Ec(b);this._timer.run=m(this,this.runAction)};t["com.tilbuci.script.ActionTimer"]=xw;xw.__name__="com.tilbuci.script.ActionTimer";xw.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__:xw};var vf=function(a,b,c){this._actions=new H;this._idbuttons=new H;ca.call(this,a,b,800,zc.pickValue(700,710),!1);a=this._idbuttons;var d=new Qc("btCopy",m(this,this.onCopy),k.ln.get("window-acvariable-create"),va.getBitmapData("btCopy"));a.h.btCopy=d;a=this._idbuttons;d=new Qc("btShow",m(this,this.onShow),k.ln.get("window-acvariable-show"));a.h.btShow=d;a=
this._idbuttons;d=new Qc("ggeneral",m(this,this.onGeneral),k.ln.get("window-globals-get"),va.getBitmapData("btCopy"));a.h.ggeneral=d;a=this._idbuttons;d=new Qc("instance",m(this,this.onInstance),k.ln.get("window-globals-get"),va.getBitmapData("btCopy"));a.h.ginstance=d;a=this._idbuttons;d=new Qc("movie",m(this,this.onMovie),k.ln.get("window-globals-get"),va.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:fa.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:[]},v={tp:"Label",id:"ginstancen",tx:k.ln.get("window-globals-instancen"),vr:fa.VARIANT_DETAIL},w={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},G=k.ln.get("window-globals-name");this.addForm(b,a.createColumnHolder("form",c,d.forge("right",[f,g,h,n,l,q,v,{tp:"Select",id:"ginstancen",vl:[],sl:[]},w,z,r,{tp:"Label",id:"gname",tx:G,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:fa.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__=ca;vf.prototype=I(ca.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(){ca.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){ca.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(F.string(this.ui.selects.h.gmovie.get_selectedItem().value)+this.ui.inputs.h.gname.get_text()),this.ui.inputs.h.showAction.set_text(F.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 pr=function(a){vf.call(this,a,k.ln.get("window-contraptions-title"),k.ln.get("window-contraptions-list"));a=new H;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"]=pr;pr.__name__="com.tilbuci.script.AssistContraptions";pr.__super__=vf;pr.prototype=I(vf.prototype,{__class__:pr});var qr=function(a){vf.call(this,a,k.ln.get("window-acdata-title"),k.ln.get("window-acdata-list"));a=new H;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"]=qr;qr.__name__="com.tilbuci.script.AssistDataInput";qr.__super__=vf;qr.prototype=I(vf.prototype,{__class__:qr});var rr=function(a){this._idbuttons=new H;ca.call(this,a,k.ln.get("window-acinstance-title"),800,zc.pickValue(630,690),!1);a=this._idbuttons;var b=new Qc("create",m(this,this.onCopy),k.ln.get("window-acinstance-create"),va.getBitmapData("btCopy"));a.h.create=b;a=this._idbuttons;b=new Qc("btShow",m(this,this.onShow),k.ln.get("window-acvariable-show"));
a.h.btShow=b;a=this._idbuttons;b=new Qc("cpasset",m(this,this.onAsset),k.ln.get("window-acinstance-cpasset"),va.getBitmapData("btCopy"));a.h.cpasset=b;a=this._idbuttons;b=new Qc("ggeneral",m(this,this.onGeneral),k.ln.get("window-globals-get"),va.getBitmapData("btCopy"));a.h.ggeneral=b;a=this._idbuttons;b=new Qc("instance",m(this,this.onInstance),k.ln.get("window-globals-get"),va.getBitmapData("btCopy"));a.h.ginstance=b;a=this._idbuttons;b=new Qc("movie",m(this,this.onMovie),k.ln.get("window-globals-get"),
va.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:""},v={tp:"Label",id:"other",tx:k.ln.get("window-acinstance-other"),vr:""},w={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)},G=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:""},v,{tp:"TInput",id:"other",vl:"",vr:""},w,z,r,{tp:"Spacer",id:"showAction",ht:5,ln:!1},{tp:"Label",id:"showAction",tx:G,vr:fa.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:""};v={tp:"Label",id:"ginstancep",tx:k.ln.get("window-globals-instancep"),
vr:fa.VARIANT_DETAIL};w={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:fa.VARIANT_DETAIL};r={tp:"Custom",
cont:this._idbuttons.h.ginstance};G={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},P=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,v,w,z,{tp:"Select",id:"ginstancen",vl:[],sl:[]},r,G,L,{tp:"Label",id:"gname",tx:P,vr:""},{tp:"TInput",id:"gname",tx:"",vr:""},{tp:"Custom",cont:this._idbuttons.h.gmovie}])))};
t["com.tilbuci.script.AssistInstance"]=rr;rr.__name__="com.tilbuci.script.AssistInstance";rr.__super__=ca;rr.prototype=I(ca.prototype,{_idbuttons:null,acStart:function(){ca.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){ca.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'+
F.string(this.ui.selects.h.property.get_selectedItem().value)+'", "param": [ "'+F.string(this.ui.lists.h.list.get_selectedItem().value)+'" ] }'),Aa.removePopUp(this));break;case "loadasset":k.copyText('{ "ac": "instance.'+F.string(this.ui.selects.h.actions.get_selectedItem().value)+'", "param": [ "'+F.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.'+F.string(this.ui.selects.h.actions.get_selectedItem().value)+
'", "param": [ "'+F.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": [ "'+F.string(this.ui.lists.h.list.get_selectedItem().value)+'", "'+this.ui.inputs.h.other.get_text()+'" ] }'):k.copyText('{ "ac": "instance.set'+F.string(this.ui.selects.h.property.get_selectedItem().value)+'", "param": [ "'+
F.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.'+F.string(this.ui.selects.h.actions.get_selectedItem().value)+'", "param": [ "'+F.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'+F.string(this.ui.selects.h.property.get_selectedItem().value)+'", "param": [ "'+F.string(this.ui.lists.h.list.get_selectedItem().value)+'" ] }');break;case "loadasset":this.ui.inputs.h.showAction.set_text('{ "ac": "instance.'+F.string(this.ui.selects.h.actions.get_selectedItem().value)+'", "param": [ "'+F.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.'+
F.string(this.ui.selects.h.actions.get_selectedItem().value)+'", "param": [ "'+F.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": [ "'+F.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'+
F.string(this.ui.selects.h.property.get_selectedItem().value)+'", "param": [ "'+F.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.'+F.string(this.ui.selects.h.actions.get_selectedItem().value)+'", "param": [ "'+F.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(F.string(this.ui.selects.h.gmovie.get_selectedItem().value)+this.ui.inputs.h.gname.get_text()),k.copyText(F.string(this.ui.selects.h.gmovie.get_selectedItem().value)+this.ui.inputs.h.gname.get_text()))},
onClose:function(a){Aa.removePopUp(this)},__class__:rr});var sr=function(a){vf.call(this,a,k.ln.get("window-narrative-title"),k.ln.get("window-narrative-list"));a=new H;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"]=sr;sr.__name__="com.tilbuci.script.AssistNarrative";sr.__super__=vf;sr.prototype=I(vf.prototype,{__class__:sr});var tr=function(a){vf.call(this,a,k.ln.get("window-plugin-title"),k.ln.get("window-plugin-list"));a=new H;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"]=tr;tr.__name__="com.tilbuci.script.AssistPlugin";tr.__super__=vf;tr.prototype=I(vf.prototype,{__class__:tr});var ur=function(a){vf.call(this,a,k.ln.get("window-acplus-title"),k.ln.get("window-acplus-list"));a=new H;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"]=ur;ur.__name__="com.tilbuci.script.AssistPlus";ur.__super__=vf;ur.prototype=I(vf.prototype,{__class__:ur});var vr=function(a){vf.call(this,a,k.ln.get("window-runtime-title"),k.ln.get("window-runtime-list"));
a=new H;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"]=vr;vr.__name__=
"com.tilbuci.script.AssistRuntime";vr.__super__=vf;vr.prototype=I(vf.prototype,{__class__:vr});var wr=function(a){this._idbuttons=new H;ca.call(this,a,k.ln.get("window-acscene-title"),500,zc.pickValue(630,690),!1);a=this._idbuttons;var b=new Qc("copymovieload",m(this,this.onCopyMovieLoad),k.ln.get("window-acmovie-copyload"),va.getBitmapData("btCopy"));a.h.btCopyMovieLoad=b;a=this._idbuttons;b=new Qc("showmovieload",m(this,this.onShowMovieLoad),k.ln.get("window-acvariable-show"));a.h.btShowMovieLoad=
b;a=this._idbuttons;b=new Qc("copyid",m(this,this.onCopyId),k.ln.get("window-acscene-copyid"),va.getBitmapData("btCopy"));a.h.btCopyId=b;a=this._idbuttons;b=new Qc("copyload",m(this,this.onCopyLoad),k.ln.get("window-acscene-copyload"),va.getBitmapData("btCopy"));a.h.btCopyLoad=b;a=this._idbuttons;b=new Qc("showload",m(this,this.onShowLoad),k.ln.get("window-acvariable-show"));a.h.btShowLoad=b;a=this._idbuttons;b=new Qc("copyac",m(this,this.onCopy),k.ln.get("window-acscene-btaction"),va.getBitmapData("btCopy"));
a.h.btCopyAc=b;a=this._idbuttons;b=new Qc("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:""},v={tp:"Label",id:"navigate",tx:k.ln.get("window-acscene-navigate"),vr:""},w={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)},G=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},v,{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},w,z,r,{tp:"Spacer",id:"showAction",ht:10,ln:!1},{tp:"Label",id:"showAction",tx:G,vr:fa.VARIANT_DETAIL},{tp:"TInput",id:"showAction",tx:""}]))};t["com.tilbuci.script.AssistScene"]=wr;wr.__name__="com.tilbuci.script.AssistScene";
wr.__super__=ca;wr.prototype=I(ca.prototype,{_idbuttons:null,acStart:function(){ca.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 H,m(this,this.onList))},startInterface:function(a){ca.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": [ "'+F.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": [ "'+
F.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": [ "'+F.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": [ "'+F.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": "'+F.string(this.ui.selects.h.actions.get_selectedItem().value)+'", "param": [ "'+F.string(this.ui.selects.h.navigate.get_selectedItem().value)+'" ] }'):k.copyText('{ "ac": "'+F.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": "'+F.string(this.ui.selects.h.actions.get_selectedItem().value)+'", "param": [ "'+F.string(this.ui.selects.h.navigate.get_selectedItem().value)+'" ] }'):this.ui.inputs.h.showAction.set_text('{ "ac": "'+F.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=u.fields(b.map.h.list);a<d.length;){var f=d[a];++a;f=u.field(b.map.h.list,f);Object.prototype.hasOwnProperty.call(f,"id")&&c.push({text:u.field(f,"title"),value:u.field(f,"id")})}}this.ui.setSelectOptions("movielist",c);b=k.ws;a=new H;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=u.fields(b.map.h.list);a<d.length;){var f=d[a];++a;f=u.field(b.map.h.list,f);Object.prototype.hasOwnProperty.call(f,
"id")&&c.push({text:u.field(f,"title"),value:u.field(f,"id")})}}this.ui.setSelectOptions("list",c)},__class__:wr});var xr=function(a){vf.call(this,a,k.ln.get("window-acvariable-title"),k.ln.get("window-acvariable-list"));a=new H;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"]=xr;xr.__name__="com.tilbuci.script.AssistVariables";xr.__super__=vf;xr.prototype=I(vf.prototype,{__class__:xr});var Oi=function(){this.onDrag=null;this._sngroup="";this._dSnippets=new H;this._currDiag="";this._snpParam="      ".split(" ");this._stringfile=new H;this._lastEvent=new H;this.hadInteraction=!1;this.eventSend=null;this.globalAvailable=[];this.available=[];this._currentArray=
"";this._arrays=new H;this._bools=new H;this._ints=new H;this._floats=new H;this._timers=new H;this._replacefile=new H;this._replacestr=new H;this._jsongropup="";this._stringsjson=new H;this._strings=new H};t["com.tilbuci.script.ScriptParser"]=Oi;Oi.__name__="com.tilbuci.script.ScriptParser";Oi.tilbuci_getstring=Sa.tilbuci_getstring=function(a){return p.parser.getString(a)};Oi.tilbuci_getfloat=Sa.tilbuci_getfloat=function(a){return p.parser.getFloat(a)};Oi.tilbuci_getint=Sa.tilbuci_getint=function(a){return p.parser.getInt(a)};
Oi.tilbuci_getbool=Sa.tilbuci_getbool=function(a){return p.parser.getBool(a)};Oi.tilbuci_setstring=Sa.tilbuci_setstring=function(a,b){p.parser.setString(a,b)};Oi.tilbuci_setfloat=Sa.tilbuci_setfloat=function(a,b){p.parser.setFloat(a,b)};Oi.tilbuci_setint=Sa.tilbuci_setint=function(a,b){p.parser.setInt(a,b)};Oi.tilbuci_setbool=Sa.tilbuci_setbool=function(a,b){p.parser.setBool(a,b)};Oi.tilbuci_runaction=Sa.tilbuci_runaction=function(a){return p.parser.run(a)};Oi.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 H;this._jsongropup="";if(p.nocache){var a=p.base+"movie/"+p.movie.get_mvId()+".movie/strings.json",b=new H,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 H,3,m(this,this.onStringsJSON))},onStringsJSON:function(a,b){if(a){a=0;for(var c=u.fields(b.json);a<c.length;){var d=c[a];++a;for(var f=u.field(b.json,d),g=new H,h=0,n=u.fields(f);h<
n.length;){var l=n[h];++h;var q=u.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 H,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 H,3,m(this,this.onContraptions))},loadNarrative:function(){if(p.nocache){var a=p.base+
"movie/"+p.movie.get_mvId()+".movie/narrative.json",b=new H,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 H,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:F.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 Wo;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=Fa.decrypt(b,Fa.md5(p.movie.get_mvId()+U.substr(p.movie.get_mvId(),2,null)).toLowerCase()),a=Fa.jsonParse(b),a==0)this._acError!=null&&this.run(this._acError,!0);else{b=0;for(var c=u.fields(a);b<c.length;){var d=c[b];++b;d=u.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=u.fields(b.json);a<c.length;){var d=c[a];++a;if(d=="covers"){d=0;for(var f=u.fields(u.field(b.json,"covers"));d<f.length;){var g=f[d];++d;var h=new Ri;h.load(u.field(u.field(b.json,"covers"),g))?p.contraptions.covers.h[h.id]=
h:h.kill()}}else if(d=="backgrounds")for(d=0,f=u.fields(u.field(b.json,"backgrounds"));d<f.length;)g=f[d],++d,h=new xh,h.load(u.field(u.field(b.json,"backgrounds"),g))?p.contraptions.backgrounds.h[h.id]=h:h.kill();else if(d=="menus")for(d=0,f=u.fields(u.field(b.json,"menus"));d<f.length;)g=f[d],++d,h=new ja,h.load(u.field(u.field(b.json,"menus"),g))?p.contraptions.menus.h[h.id]=h:h.kill();else if(d=="messages")for(d=0,f=u.fields(u.field(b.json,"messages"));d<f.length;)g=f[d],++d,h=new la,h.load(u.field(u.field(b.json,
"messages"),g))?p.contraptions.messages.h[h.id]=h:h.kill();else if(d=="dflow")for(d=0,f=u.fields(u.field(b.json,"dflow"));d<f.length;)g=f[d],++d,h=new Fd,h.load(u.field(u.field(b.json,"dflow"),g))?p.contraptions.dflow.h[h.id]=h:h.kill();else if(d=="inv")for(d=0,f=u.fields(u.field(b.json,"inv"));d<f.length;)g=f[d],++d,h=new K,h.load(u.field(u.field(b.json,"inv"),g))?p.contraptions.inv.h.inv=h:h.kill();else if(d=="bs")for(d=0,f=u.fields(u.field(b.json,"bs"));d<f.length;)g=f[d],++d,h=new Uh,h.load(u.field(u.field(b.json,
"bs"),g))?p.contraptions.bs.h.bs=h:h.kill();else if(d=="musics")for(d=0,f=u.fields(u.field(b.json,"musics"));d<f.length;)g=f[d],++d,h=new aa,h.load(u.field(u.field(b.json,"musics"),g))?p.contraptions.musics.h[h.id]=h:h.kill();else if(d=="sounds")for(d=0,f=u.fields(u.field(b.json,"sounds"));d<f.length;)g=f[d],++d,h=new Ya,h.load(u.field(u.field(b.json,"sounds"),g))?p.contraptions.sounds.h[h.id]=h:h.kill();else if(d=="targets")for(d=0,f=u.fields(u.field(b.json,"targets"));d<f.length;)g=f[d],++d,h=new db,
h.load(u.field(u.field(b.json,"targets"),g))?p.contraptions.targets.h[h.id]=h:h.kill();else if(d=="forms")for(d=0,f=u.fields(u.field(b.json,"forms"));d<f.length;)g=f[d],++d,h=new Tk,h.load(u.field(u.field(b.json,"forms"),g))?p.contraptions.forms.h[h.id]=h:h.kill();else if(d=="interf")for(d=0,f=u.fields(u.field(b.json,"interf"));d<f.length;)g=f[d],++d,h=new D,h.load(u.field(u.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=u.fields(b.json);a<c.length;){var d=c[a];++a;if(d=="chars"){d=0;for(var f=u.fields(u.field(b.json,"chars"));d<f.length;){var g=f[d];++d;var h=new Dn;h.load(u.field(u.field(b.json,"chars"),g))?p.narrative.chars.h[h.id]=h:h.kill()}}else if(d=="dialogues")for(d=0,f=u.fields(u.field(b.json,"dialogues"));d<f.length;)g=f[d],++d,h=new En,h.load(u.field(u.field(b.json,"dialogues"),g))?p.narrative.dialogues.h[h.id]=h:h.kill();else if(d=="items")for(d=0,f=u.fields(u.field(b.json,"items"));d<f.length;)g=
f[d],++d,h=new bp,h.load(u.field(u.field(b.json,"items"),g))?p.narrative.items.h[h.itname]=h:h.kill();else if(d=="cards")for(d=0,f=u.fields(u.field(b.json,"cards"));d<f.length;)g=f[d],++d,h=new ap,h.load(u.field(u.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=U.substr(b,0,1)=="#"?Object.prototype.hasOwnProperty.call(this._ints.h,U.substr(b,1,null))?F.string(this._ints.h[U.substr(b,1,null)]):Object.prototype.hasOwnProperty.call(this._floats.h,
U.substr(b,1,null))?F.string(this._floats.h[U.substr(b,1,null)]):this.parseString(b):U.substr(b,0,1)=="?"?Object.prototype.hasOwnProperty.call(this._bools.h,U.substr(b,1,null))?this._bools.h[U.substr(b,1,null)]?"true":"false":this.parseString(b):this.parseString(b);c=U.substr(c,0,1)=="#"?Object.prototype.hasOwnProperty.call(this._ints.h,U.substr(c,1,null))?F.string(this._ints.h[U.substr(c,1,null)]):Object.prototype.hasOwnProperty.call(this._floats.h,U.substr(c,1,null))?F.string(this._floats.h[U.substr(c,
1,null)]):this.parseString(c):U.substr(c,0,1)=="?"?Object.prototype.hasOwnProperty.call(this._bools.h,U.substr(c,1,null))?this._bools.h[U.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(Eb.typeof(b)==Pa.TFloat||Eb.typeof(b)==Pa.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(Eb.typeof(b)==Pa.TInt)this._ints.h[a]=b;else if(Eb.typeof(b)==Pa.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);Eb.typeof(b)==Pa.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=Fa.jsonParse(a);if(c==0)return!1;if(Eb.typeof(c)!=Pa.TObject){a=[];b=!1;try{a=x.__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")&&Eb.typeof(u.field(a,"param"))!=Pa.TObject){var b=[],c=!1;try{b=x.__cast(u.field(a,"param"),Array),c=!0}catch(G){c=!1}if(c)switch(u.field(a,"ac")){case "accessibility.changeshader":return p.currentShader++,p.currentShader>=p.shaders.length&&(p.currentShader=0),this.applyPlayerShader(p.currentShader),!0;case "accessibility.focuson":return p.focusMode=!0,p.area.setFocus(),p.contraptions.setFocus(),!0;case "accessibility.focusooff":return p.focusMode=!1,p.area.setFocus(),p.contraptions.setFocus(),
!0;case "accessibility.focusswitch":return p.focusMode=!p.focusMode,p.area.setFocus(),p.contraptions.setFocus(),!0;case "accessibility.setdescription":return b.length>=1?window.TBB_callDescription(this.parseString(b[0])):!1;case "accessibility.setshader":if(b.length>=1){ye.trace("param ok",{fileName:"Source/com/tilbuci/script/ScriptParser.hx",lineNumber:3036,className:"com.tilbuci.script.ScriptParser",methodName:"exec"});p.currentShader=0;switch(this.parseString(b[0])){case "contrast":p.currentShader=
4;break;case "deuteranotopia":p.currentShader=1;break;case "grayscale":p.currentShader=5;break;case "protonatopia":p.currentShader=2;break;case "tritanotopia":p.currentShader=3}this.applyPlayerShader(p.currentShader);return!0}return!1;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 Wo;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 Wo,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=u.field(a,"success")),Object.prototype.hasOwnProperty.call(a,"error")&&(this._acError=u.field(a,"error")),a=null,this._currentArray=this.parseString(b[0]),p.nocache&&(f=new H,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(u.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(F.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]),F.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=u.field(a,"win"));Object.prototype.hasOwnProperty.call(a,"loose")&&(g=u.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=u.field(a,"ok")),Object.prototype.hasOwnProperty.call(a,"cancel")&&(d=u.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=u.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=u.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++,U.substr(F.string(b[n]),0,1)=="#"?Object.prototype.hasOwnProperty.call(this._ints.h,U.substr(F.string(b[n]),1,null))?a.push(this._ints.h[U.substr(F.string(b[n]),1,null)]):Object.prototype.hasOwnProperty.call(this._floats.h,U.substr(F.string(b[n]),
1,null))?a.push(this._floats.h[U.substr(F.string(b[n]),1,null)]):a.push(this.parseString(b[n])):U.substr(F.string(b[n]),0,1)=="?"?Object.prototype.hasOwnProperty.call(this._bools.h,U.substr(F.string(b[n]),1,null))?a.push(this._bools.h[U.substr(F.string(b[n]),1,null)]):a.push(this.parseString(b[n])):a.push(this.parseString(b[n]));f=new H;g=this.parseString(b[0]);f.h.name=g;g=U.dateStr(new Date);f.h.when=g;g=Fa.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(G){}return!0;case "data.liststates":return this._acOk=this._acError=null,Object.prototype.hasOwnProperty.call(a,"success")&&(this._acOk=u.field(a,"success")),Object.prototype.hasOwnProperty.call(a,
"error")&&(this._acError=u.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=u.field(a,"success")),Object.prototype.hasOwnProperty.call(a,"error")&&(this._acError=u.field(a,"error")),p.ws.dataLoad(this.parseString(b[0]),m(this,this.onDataLoad)),!0;Object.prototype.hasOwnProperty.call(a,"error")&&this.run(u.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=Fa.jsonParse(u.field(d.data,"values"));if(q==0)Object.prototype.hasOwnProperty.call(a,"error")&&this.run(u.field(a,"error"),!0);else{f=0;for(g=u.fields(q);f<g.length;){n=g[f];++f;var v=u.field(q,n);switch(u.field(v,"t")){case "B":h=u.field(v,"v");this._bools.h[u.field(v,"n")]=h;break;case "F":var w=u.field(v,
"v");this._floats.h[u.field(v,"n")]=w;break;case "I":var z=u.field(v,"v");this._ints.h[u.field(v,"n")]=z;break;case "S":var r=u.field(v,"v");this._strings.h[u.field(v,"n")]=r}}Object.prototype.hasOwnProperty.call(a,"success")&&this.run(u.field(a,"success"),!0)}}else Object.prototype.hasOwnProperty.call(a,"error")&&this.run(u.field(a,"error"),!0)}catch(G){Object.prototype.hasOwnProperty.call(a,"error")&&this.run(u.field(a,"error"),!0)}return!0}Object.prototype.hasOwnProperty.call(a,"error")&&this.run(u.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=u.field(a,"success")),Object.prototype.hasOwnProperty.call(a,"error")&&(this._acError=u.field(a,"error")),p.ws.stateLoad("",!0,m(this,this.onStateLoad)),!0;Object.prototype.hasOwnProperty.call(a,"error")&&this.run(u.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=u.field(a,"success")),Object.prototype.hasOwnProperty.call(a,"error")&&(this._acError=u.field(a,"error")),p.ws.stateLoad(this.parseString(b[0]),!1,m(this,this.onStateLoad)),!0;Object.prototype.hasOwnProperty.call(a,"error")&&this.run(u.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=
Fa.jsonParse(u.field(d.data,"values")),q==0)Object.prototype.hasOwnProperty.call(a,"error")&&this.run(u.field(a,"error"),!0);else{f=0;for(g=u.fields(q);f<g.length;)switch(n=g[f],++f,v=u.field(q,n),u.field(v,"t")){case "B":h=u.field(v,"v");this._bools.h[u.field(v,"n")]=h;break;case "F":w=u.field(v,"v");this._floats.h[u.field(v,"n")]=w;break;case "I":z=u.field(v,"v");this._ints.h[u.field(v,"n")]=z;break;case "S":r=u.field(v,"v"),this._strings.h[u.field(v,"n")]=r}Object.prototype.hasOwnProperty.call(a,
"success")&&this.run(u.field(a,"success"),!0)}else Object.prototype.hasOwnProperty.call(a,"error")&&this.run(u.field(a,"error"),!0)}catch(G){Object.prototype.hasOwnProperty.call(a,"error")&&this.run(u.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++,v=this.getValueObj(b[n]),v!=null&&h.push(v);h.length==0?Object.prototype.hasOwnProperty.call(a,"error")&&this.run(u.field(a,"error"),!0):(Object.prototype.hasOwnProperty.call(a,
"success")&&(this._acOk=u.field(a,"success")),Object.prototype.hasOwnProperty.call(a,"error")&&(this._acError=u.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(u.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++,v=this.getValueObj(b[n]),v!=null&&h.push(v);if(h.length==0)Object.prototype.hasOwnProperty.call(a,"error")&&
this.run(u.field(a,"error"),!0);else try{d=Xe.getLocal(p.movie.get_mvId()+"_"+this.parseString(b[0])),d.data.values=Fa.jsonStringify(h),d.flush(),Object.prototype.hasOwnProperty.call(a,"success")&&this.run(u.field(a,"success"),!0)}catch(G){Object.prototype.hasOwnProperty.call(a,"error")&&this.run(u.field(a,"error"),!0)}return!0}Object.prototype.hasOwnProperty.call(a,"error")&&this.run(u.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=u.field(a,"success"));
Object.prototype.hasOwnProperty.call(a,"error")&&(this._acError=u.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(u.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=u.field(a,"success"));Object.prototype.hasOwnProperty.call(a,"error")&&(this._acError=u.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(u.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=u.field(a,"success"));Object.prototype.hasOwnProperty.call(a,"error")&&(this._acError=u.field(a,"error"));try{d=Xe.getLocal(p.movie.get_mvId()+"_state"),d.data.values=Fa.jsonStringify(h),d.data.scene=p.movie.get_scId(),d.flush(),Object.prototype.hasOwnProperty.call(a,"success")&&this.run(u.field(a,"success"),!0)}catch(G){Object.prototype.hasOwnProperty.call(a,
"error")&&this.run(u.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=u.field(a,"success")),Object.prototype.hasOwnProperty.call(a,"error")&&(this._acError=u.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(u.field(a,"error"),!0);return!1}Object.prototype.hasOwnProperty.call(a,"error")&&this.run(u.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=F.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(u.field(a,"then"),!0):Object.prototype.hasOwnProperty.call(a,"else")?this.run(u.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(u.field(a,"then"),!0):Object.prototype.hasOwnProperty.call(a,"else")?this.run(u.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(u.field(a,"then"),!0):Object.prototype.hasOwnProperty.call(a,"else")?this.run(u.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(u.field(a,"then"),!0):Object.prototype.hasOwnProperty.call(a,"else")?this.run(u.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(u.field(a,"then"),!0):Object.prototype.hasOwnProperty.call(a,"else")?this.run(u.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(u.field(a,"then"),!0):Object.prototype.hasOwnProperty.call(a,"else")?this.run(u.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(u.field(a,"then"),!0):Object.prototype.hasOwnProperty.call(a,"else")?this.run(u.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(u.field(a,"then"),!0):Object.prototype.hasOwnProperty.call(a,"else")?this.run(u.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(u.field(a,"then"),!0):Object.prototype.hasOwnProperty.call(a,"else")?this.run(u.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(u.field(a,"then"),!0):Object.prototype.hasOwnProperty.call(a,"else")?this.run(u.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(u.field(a,
"then"),!0):Object.prototype.hasOwnProperty.call(a,"else")?this.run(u.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(u.field(a,"then"),!0):Object.prototype.hasOwnProperty.call(a,"else")?this.run(u.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(u.field(a,"then"),!0):Object.prototype.hasOwnProperty.call(a,
"else")?this.run(u.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(u.field(a,"then"),!0):Object.prototype.hasOwnProperty.call(a,"else")?this.run(u.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(u.field(a,"then"),!0):Object.prototype.hasOwnProperty.call(a,"else")?this.run(u.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(u.field(a,"then"),!0):Object.prototype.hasOwnProperty.call(a,"else")?this.run(u.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(u.field(a,"then"),!0):Object.prototype.hasOwnProperty.call(a,"else")?this.run(u.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(u.field(a,"then"),!0):Object.prototype.hasOwnProperty.call(a,"else")?this.run(u.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(u.field(a,"then"),!0):Object.prototype.hasOwnProperty.call(a,"else")?this.run(u.field(a,"else"),
!0):!0:!1;case "if.stringemail":return b.length>0&&Object.prototype.hasOwnProperty.call(a,"then")?Fa.validateEmail(this.parseString(b[0]))?this.run(u.field(a,"then"),!0):Object.prototype.hasOwnProperty.call(a,"else")?this.run(u.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(u.field(a,"then"),!0):Object.prototype.hasOwnProperty.call(a,"else")?this.run(u.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(u.field(a,"then"),!0):Object.prototype.hasOwnProperty.call(a,"else")?this.run(u.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(u.field(a,"then"),!0):Object.prototype.hasOwnProperty.call(a,"else")?this.run(u.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(u.field(a,"then"),!0):Object.prototype.hasOwnProperty.call(a,"else")?this.run(u.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(u.field(a,"then"),!0):Object.prototype.hasOwnProperty.call(a,"else")?this.run(u.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=u.field(a,"ok"));Object.prototype.hasOwnProperty.call(a,
"cancel")&&(d=u.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=u.field(a,"ok")),Object.prototype.hasOwnProperty.call(a,"cancel")&&(d=u.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=u.field(a,"ok")),Object.prototype.hasOwnProperty.call(a,"cancel")&&(d=u.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=u.field(a,"ok"));Object.prototype.hasOwnProperty.call(a,"cancel")&&(d=u.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=u.field(a,"ok")),Object.prototype.hasOwnProperty.call(a,
"cancel")&&(d=u.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=u.field(a,"ok"));Object.prototype.hasOwnProperty.call(a,"cancel")&&(d=u.field(a,"cancel"));c=!1;try{x.__cast(d,Array),c=!0}catch(G){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=u.field(a,"ok")),Object.prototype.hasOwnProperty.call(a,"cancel")&&(d=u.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(u.field(a,"else"),!0):!0:f.hitTestObject(b)?Object.prototype.hasOwnProperty.call(a,"then")?this.run(u.field(a,"then"),!0):!0:Object.prototype.hasOwnProperty.call(a,"else")?this.run(u.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=u.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=F.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(u.field(a,"then"),!0):Object.prototype.hasOwnProperty.call(a,"else")&&this.run(u.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=u.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 zd.hide(),p.cursorVisible=!1,p.area.noMouseOver(),!0;case "mouse.show":return p.cursorVisible=!0,zd.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 H,!0;case "replace.clearallstrings":return this._replacestr=new H,
!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=u.field(a,"then")),Object.prototype.hasOwnProperty.call(a,"else")&&u.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(u.field(a,"then"),
!0):Object.prototype.hasOwnProperty.call(a,"else")&&this.run(u.field(a,"else"),!0),!0;Object.prototype.hasOwnProperty.call(a,"else")&&this.run(u.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=u.field(a,"success"));Object.prototype.hasOwnProperty.call(a,"error")&&(this._acError=u.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=Fa.encrypt(Fa.jsonStringify(a),Fa.md5(p.movie.get_mvId()+U.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=u.field(a,"end")),Pi.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=u.field(a,"success")),Object.prototype.hasOwnProperty.call(a,"error")&&(this._acError=u.field(a,"error")),a=null,p.nocache&&(f=
new H,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(u.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=u.field(a,"success")),Object.prototype.hasOwnProperty.call(a,"error")&&(this._acError=u.field(a,"error")),a=null,p.nocache&&(f=new H,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(u.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=F.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(u.field(a,"else"),!0):!0;case "system.ifhorizontal":return p.area.get_pOrientation()=="horizontal"?Object.prototype.hasOwnProperty.call(a,"then")?this.run(u.field(a,"then"),!0):!0:Object.prototype.hasOwnProperty.call(a,"else")?this.run(u.field(a,"else"),!0):!0;case "system.ifmobile":return Object.prototype.hasOwnProperty.call(a,
"else")?this.run(u.field(a,"else"),!0):!0;case "system.ifplayer":return Object.prototype.hasOwnProperty.call(a,"else")?this.run(u.field(a,"else"),!0):!0;case "system.ifpublish":return Object.prototype.hasOwnProperty.call(a,"else")?this.run(u.field(a,"else"),!0):!0;case "system.ifpwa":return Object.prototype.hasOwnProperty.call(a,"else")?this.run(u.field(a,"else"),!0):!0;case "system.ifpwainstalled":return Object.prototype.hasOwnProperty.call(a,"else")?this.run(u.field(a,"else"),!0):!0;case "system.ifvertical":return p.area.get_pOrientation()==
"vertical"?Object.prototype.hasOwnProperty.call(a,"then")?this.run(u.field(a,"then"),!0):!0:Object.prototype.hasOwnProperty.call(a,"else")?this.run(u.field(a,"else"),!0):!0;case "system.ifwebsite":return Object.prototype.hasOwnProperty.call(a,"else")?this.run(u.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 ne(b[0]),b.method="GET",La.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 H;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(u.field(a,"then"),!0):Object.prototype.hasOwnProperty.call(a,"else")?this.run(u.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(G){}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=F.parseInt(b[1]);if(g==null||g<
250)return!1;h=F.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=u.field(a,"end"));d=this._timers;h=new xw(b[0],g,h,u.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=u.field(a,"then"));Object.prototype.hasOwnProperty.call(a,"else")&&(g.onelse=u.field(a,"else"));Object.prototype.hasOwnProperty.call(a,"ok")&&(g.onok=u.field(a,"ok"));Object.prototype.hasOwnProperty.call(a,"cancel")&&(g.oncancel=u.field(a,"cancel"));Object.prototype.hasOwnProperty.call(a,"tick")&&(g.ontick=u.field(a,"tick"));Object.prototype.hasOwnProperty.call(a,"end")&&(g.onend=u.field(a,"end"));Object.prototype.hasOwnProperty.call(a,"success")&&
(g.onsuccess=u.field(a,"success"));Object.prototype.hasOwnProperty.call(a,"error")&&(g.onerror=u.field(a,"error"));h=c=p.plugins.h;d=Object.keys(c);c=d.length;for(v=0;v<c;)l=h[d[v++]],l.active&&!n&&l.hasAction(u.field(a,"ac"))&&(f=l.runAction(u.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(U.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(U.substr(a,0,7)=="$_INPUT")return b=a.split(":"),b.length==2?p.area.getInputText(b[1]):a;if(U.substr(a,0,7)=="$_TAREA")return b=a.split(":"),b.length==2?p.area.getTareaText(b[1]):a;if(U.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(U.substr(a,0,6)=="$_FORM")return b=a.split(":"),b.length==2?p.contraptions.getFormValue(b[1]):"";if(U.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,U.substr(a,1,null))?this._strings.h[U.substr(a,1,null)]:Object.prototype.hasOwnProperty.call(this._stringfile.h,U.substr(a,1,null))?this._stringfile.h[U.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(U.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(U.substr(a,0,8)=="?_TOGGLE")return a=a.split(":"),a.length==2?p.area.getToggleValue(this.parseString(a[1])):!1;if(U.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,U.substr(a,1,null))?this._bools.h[U.substr(a,1,null)]:U.substr(a,1,null).toLowerCase()!="true"?U.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(U.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(U.substr(a,0,9)=="#_NUMERIC")return a=a.split(":"),a.length==2?p.area.getNumericValue(this.parseString(a[1])):0;if(U.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,U.substr(a,1,null))?this._floats.h[U.substr(a,1,null)]:parseFloat(U.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(U.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(U.substr(a,0,15)=="#_INVCONSUMABLE")return a=a.split(":"),a.length==2?p.narrative.consumableAmount(this.parseString(a[1])):0;if(U.substr(a,0,9)=="#_NUMERIC")return a=a.split(":"),a.length==
2?p.area.getNumericValue(this.parseString(a[1])):0;if(U.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,U.substr(a,1,null))?this._ints.h[U.substr(a,1,null)]:F.parseInt(U.substr(a,1,null))}}}else return F.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=Fa.jsonParse(b.map.h.values),a==0)this._acError!=null&&this.run(this._acError,!0);else{b=0;for(var c=u.fields(a);b<c.length;){var d=c[b];++b;
d=u.field(a,d);switch(u.field(d,"t")){case "B":var f=u.field(d,"v");this._bools.h[u.field(d,"n")]=f;break;case "F":f=u.field(d,"v");this._floats.h[u.field(d,"n")]=f;break;case "I":f=u.field(d,"v");this._ints.h[u.field(d,"n")]=f;break;case "S":f=u.field(d,"v"),this._strings.h[u.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=Fa.jsonParse(b.map.h.values),
a==0)this._acError!=null&&this.run(this._acError,!0);else{b=0;for(var c=u.fields(a);b<c.length;){var d=c[b];++b;d=u.field(a,d);switch(u.field(d,"t")){case "B":var f=u.field(d,"v");this._bools.h[u.field(d,"n")]=f;break;case "F":f=u.field(d,"v");this._floats.h[u.field(d,"n")]=f;break;case "I":f=u.field(d,"v");this._ints.h[u.field(d,"n")]=f;break;case "S":f=u.field(d,"v"),this._strings.h[u.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 Ca(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=u.fields(f.data.events);g<h.length;){var n=h[g];++g;d.push(u.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 H},applyPlayerShader:function(a){if(a<p.shaders.length&&p.area.parent!=null){var b=[];switch(a){case 1:b=[new Hf(new Ts)];break;case 2:b=[new Hf(new Us)];break;case 3:b=
[new Hf(new Vs)];break;case 4:b=[new Hf(new Ws)];break;case 5:b=[new Hf(new Xs)]}p.area.parent.set_filters(b)}},__class__:Oi};var Yh=function(a){this.byteCode=a;this.precisionHint=1;this.__glSourceDirty=!0;this.__numPasses=1;this.__data=Yz._new(a)};t["openfl.display.Shader"]=Yh;Yh.__name__="openfl.display.Shader";Yh.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?Xb.error(b,{fileName:"openfl/display/Shader.hx",lineNumber:336,className:"openfl.display.Shader",methodName:"__createGLShader"}):g&&Xb.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),Xb.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=Yz._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 Xa("uniform ([A-Za-z0-9]+) ([A-Za-z0-9_]+)",""):new Xa("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 Ys;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)||u.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 Hn;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 Hn;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 Hn;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),Ad.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 v=a.paramData,w=null,z=null,r=null;l=0;for(q=a.paramCount;l<q;){n=
l++;var G=!1;if(n<g){var J=a.paramRefs_Bool[c];for(var L=0,P=a.overrideBoolCount;L<P;){var V=L++;if(J.name==a.overrideBoolNames[V]){w=a.overrideBoolValues[V];G=!0;break}}G?J.__updateGL(this.__context,w):J.__updateGLFromBuffer(this.__context,v,a.paramPositions[n],a.paramLengths[n],b);++c}else if(n<g+h){J=a.paramRefs_Float[d];L=0;for(P=a.overrideFloatCount;L<P;)if(V=L++,J.name==a.overrideFloatNames[V]){z=a.overrideFloatValues[V];G=!0;break}G?J.__updateGL(this.__context,z):J.__updateGLFromBuffer(this.__context,
v,a.paramPositions[n],a.paramLengths[n],b);++d}else{J=a.paramRefs_Int[f];L=0;for(P=a.overrideIntCount;L<P;)if(V=L++,J.name==a.overrideIntNames[V]){r=a.overrideIntValues[V];G=!0;break}G?J.__updateGL(this.__context,r):J.__updateGLFromBuffer(this.__context,v,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__:Yh,__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 $f=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}");
Yh.call(this,a);this.__isGenerated=!0;this.__initGL()};t["openfl.display.GraphicsShader"]=$f;$f.__name__="openfl.display.GraphicsShader";$f.__super__=Yh;$f.prototype=I(Yh.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__:$f});var Ws=function(){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\r\n\t\tvoid main(void) {\r\n\t\t\tvec4 color = texture2D(bitmap, openfl_TextureCoordv);\r\n\t\t\tfloat contrast = 1.5;\r\n\t\t\tvec3 contrasted = ((color.rgb - 0.5) * contrast) + 0.5;\r\n\t\t\tgl_FragColor = vec4(contrasted, color.a);\r\n\t\t\tgl_FragColor = gl_FragColor * openfl_Alphav;\r\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\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\n\t\t}");
$f.call(this);this.__isGenerated=!0;this.__initGL()};t["com.tilbuci.shaders.ContrastShader"]=Ws;Ws.__name__="com.tilbuci.shaders.ContrastShader";Ws.__super__=$f;Ws.prototype=I($f.prototype,{__class__:Ws});var Ts=function(){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\r\n\t\tvoid main(void) {\r\n\t\t\tvec4 color = texture2D(bitmap, openfl_TextureCoordv);\r\n\t\t\tmat3 deuteranopiaCorrection = mat3(\r\n\t\t\t\t0.625, 0.375, 0.0,\r\n\t\t\t\t0.7,   0.3,   0.0,\r\n\t\t\t\t0.0,   0.3,   0.7 \r\n\t\t\t);\r\n\t\t\tvec3 corrected = deuteranopiaCorrection * color.rgb;\r\n\t\t\tgl_FragColor = vec4(corrected, color.a);\r\n\t\t\tgl_FragColor = gl_FragColor * openfl_Alphav;\r\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\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\n\t\t}");
$f.call(this);this.__isGenerated=!0;this.__initGL()};t["com.tilbuci.shaders.DeuteranopiaShader"]=Ts;Ts.__name__="com.tilbuci.shaders.DeuteranopiaShader";Ts.__super__=$f;Ts.prototype=I($f.prototype,{__class__:Ts});var Xs=function(){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\r\n\t\tvoid main(void) {\r\n\t\t\tgl_FragColor = texture2D(bitmap, openfl_TextureCoordv);\r\n\t\t\tfloat sum = (gl_FragColor.r + gl_FragColor.g + gl_FragColor.b) / 3.0;\r\n\t\t\tgl_FragColor = vec4(sum, sum, sum, gl_FragColor.a);\r\n\t\t\tgl_FragColor = gl_FragColor * openfl_Alphav;\r\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\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\n\t\t}");
$f.call(this);this.__isGenerated=!0;this.__initGL()};t["com.tilbuci.shaders.GrayscaleShader"]=Xs;Xs.__name__="com.tilbuci.shaders.GrayscaleShader";Xs.__super__=$f;Xs.prototype=I($f.prototype,{__class__:Xs});var Us=function(){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\r\n\t\tvoid main(void) {\r\n            vec4 color = texture2D(bitmap, openfl_TextureCoordv);\r\n            mat3 protanopiaCorrection = mat3(\r\n                0.567, 0.433, 0.0,\r\n                0.558, 0.442, 0.0,\r\n                0.0,   0.242, 0.758\r\n            );\r\n            vec3 corrected = protanopiaCorrection * color.rgb;\r\n            gl_FragColor = vec4(corrected, color.a);\r\n            gl_FragColor = gl_FragColor * openfl_Alphav;\r\n        }");
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\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\n\t\t}");
$f.call(this);this.__isGenerated=!0;this.__initGL()};t["com.tilbuci.shaders.ProtanopiaShader"]=Us;Us.__name__="com.tilbuci.shaders.ProtanopiaShader";Us.__super__=$f;Us.prototype=I($f.prototype,{__class__:Us});var Vs=function(){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\r\n\t\tvoid main(void) {\r\n            vec4 color = texture2D(bitmap, openfl_TextureCoordv);\r\n            mat3 tritanopiaCorrection = mat3(\r\n                0.95,  0.05,  0.0,\r\n                0.0,   0.433, 0.567,\r\n                0.0,   0.475, 0.525\r\n            );\r\n            vec3 corrected = tritanopiaCorrection * color.rgb;\r\n            gl_FragColor = vec4(corrected, color.a);\r\n            gl_FragColor = gl_FragColor * openfl_Alphav;\r\n        }");
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\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\n\t\t}");
$f.call(this);this.__isGenerated=!0;this.__initGL()};t["com.tilbuci.shaders.TritanopiaShader"]=Vs;Vs.__name__="com.tilbuci.shaders.TritanopiaShader";Vs.__super__=$f;Vs.prototype=I($f.prototype,{__class__:Vs});var qi=function(){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\r\n\t\tvec3 reduceSaturation(vec3 color, float factor) {\r\n\t\t\tfloat gray = dot(color, vec3(0.299, 0.587, 0.114));\r\n\t\t\treturn mix(vec3(gray), color, factor);\r\n\t\t}\r\n\t\tvoid main(void) {\r\n\t\t\tvec2 uv = openfl_TextureCoordv;\r\n\t\t\tvec4 baseColor = texture2D(bitmap, uv);\r\n\t\t\tfloat offset = 1.0 / 512.0;\r\n\t\t\tvec4 blurColor = baseColor;\r\n\t\t\tblurColor += texture2D(bitmap, uv + vec2(offset, 0.0));\r\n\t\t\tblurColor += texture2D(bitmap, uv - vec2(offset, 0.0));\r\n\t\t\tblurColor += texture2D(bitmap, uv + vec2(0.0, offset));\r\n\t\t\tblurColor += texture2D(bitmap, uv - vec2(0.0, offset));\r\n\t\t\tblurColor /= 5.0;\r\n\t\t\tvec3 desaturated = reduceSaturation(blurColor.rgb, 0.15);\r\n\t\t\tgl_FragColor = vec4(desaturated, blurColor.a);\r\n\t\t\tgl_FragColor *= openfl_Alphav;\r\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\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\n\t\t}");
$f.call(this);this.__isGenerated=!0;this.__initGL()};t["com.tilbuci.shaders.UnfocusShader"]=qi;qi.__name__="com.tilbuci.shaders.UnfocusShader";qi.__super__=$f;qi.prototype=I($f.prototype,{__class__:qi});var va=function(){this.complete=0;this._nocache=!1;this._curLoad=this._curTxtLoad=-1;this._path="assets/icons/";this._plTexts=[{name:"langDefault",path:"assets/language/default.json"}];this._plAssets=["btClose","btOk","icTarget"];this._edTexts=[{name:"buildInfo",path:"assets/build.json"},{name:"license",
path:"assets/license.html"},{name:"langDefault",path:"assets/language/default.json"}];this._edAssets="buci tilBuci01 tilBuci02 tilBuci03 tilBuci04 tilBuci05 tilBuci06 tilBuci07 tilBuci08 btBack btClose btOk btMovie btScene btMovieScene btData icData icInput icSystem icReplace icSnippets icText icTimer icUser icDebug icShare icGoogle icContraption icNarrative icServer btPlus btPlugin btSetup btToggle btZoomP btZoomM btZoomFit btZoom100 btMedia btFolder iconFolder iconUpLevel iconPublished btPlay btPause btStop btLeft btRight btUp btDown btKeyframe btFullscreen btWorkspace btScreen btFocus btColors btOpenfile btCopy btPaste btNone btAll btStageLeft btStageCenter btStageRight btStageTop btStageMiddle btStageBottom btSelectionLeft btSelectionCenter btSelectionRight btSelectionTop btSelectionMiddle btSelectionBottom btDistributeH btDistributeV btBool btInteger btFloat btString btVariables btToLeft btToRight btToCenter btToTop btToDown btToMiddle btExchange btVisitors btContraptions btNarrative iconMove iconResizeH iconResizeV iconResize iconPlus iconMinus iconDown iconUp iconLock iconLandscape iconPortrait btBlocks btCode btDel btEdit btExpand btCompress btNotes btLock icTarget".split(" ");
ma.call(this);var a=La.get_current().stage.application.__window.parameters;Object.prototype.hasOwnProperty.call(a,"mode")?La.get_current().stage.application.__window.parameters.mode=="editor"?(this._reaAssets=this._edAssets,this._realTexts=this._edTexts,this._nocache=!0):(this._reaAssets=this._plAssets,this._realTexts=this._plTexts):(this._reaAssets=this._edAssets,this._realTexts=this._edTexts,this._nocache=!0);a=La.get_current().stage.application.__window.parameters;if(Object.prototype.hasOwnProperty.call(a,
"assets")){this._path=F.string(La.get_current().stage.application.__window.parameters.assets)+this._path;a=0;for(var b=this._realTexts.length;a<b;){var c=a++,d=F.string(La.get_current().stage.application.__window.parameters.assets);this._realTexts[c].path=d+this._realTexts[c].path}}this._txtLoader=new mj;this._txtLoader.addEventListener("complete",m(this,this.onTxtOk));this._txtLoader.addEventListener("ioError",m(this,this.onTxtError));this._txtLoader.addEventListener("securityError",m(this,this.onTxtError));
this.loadNextTxt();this._bmpLoader=new If;this._bmpLoader.contentLoaderInfo.addEventListener("complete",m(this,this.onOk));this._bmpLoader.contentLoaderInfo.addEventListener("ioError",m(this,this.onError));this._bmpLoader.contentLoaderInfo.addEventListener("securityError",m(this,this.onError));this.loadNext()};t["com.tilbuci.statictools.Assets"]=va;va.__name__="com.tilbuci.statictools.Assets";va.getBitmapData=function(a,b){return Object.prototype.hasOwnProperty.call(va.graphics.h,a)?va.graphics.h[a].data:
new yc(32,32,!1)};va.getText=function(a,b){return Object.prototype.hasOwnProperty.call(va.texts.h,a)?va.texts.h[a]:""};va.__super__=ma;va.prototype=I(ma.prototype,{_edAssets:null,_edTexts:null,_plAssets:null,_plTexts:null,_reaAssets:null,_realTexts:null,_path:null,_curLoad:null,_curTxtLoad:null,_bmpLoader:null,_txtLoader:null,_nocache:null,complete:null,loadNext:function(){this._curLoad++;this._curLoad<this._reaAssets.length?(this.complete=Math.round(100*this._curLoad/this._reaAssets.length),this._bmpLoader.load(new ne(this._path+
this._reaAssets[this._curLoad]+".png"))):(this._bmpLoader.contentLoaderInfo.removeEventListener("complete",m(this,this.onOk)),this._bmpLoader.contentLoaderInfo.removeEventListener("ioError",m(this,this.onError)),this._bmpLoader.contentLoaderInfo.removeEventListener("securityError",m(this,this.onError)),this._bmpLoader.unload(),this._bmpLoader=null,this.complete=100,this.dispatchEvent(new na("complete")))},loadNextTxt:function(){this._curTxtLoad++;if(this._curTxtLoad<this._realTexts.length){var a=
new ne(this._realTexts[this._curTxtLoad].path);if(this._nocache){var b=vm._new();b.rand=Math.ceil(Math.random()*1E4);a.data=b}this._txtLoader.load(a)}else this._txtLoader.removeEventListener("complete",m(this,this.onTxtOk)),this._txtLoader.removeEventListener("ioError",m(this,this.onTxtError)),this._txtLoader.removeEventListener("securityError",m(this,this.onTxtError)),this._txtLoader=null},onOk:function(a){a=va.graphics;var b=this._reaAssets[this._curLoad],c={data:this._bmpLoader.content.get_bitmapData().clone(),
loaded:!0};a.h[b]=c;this._bmpLoader.unload();this.dispatchEvent(new na("change"));this.loadNext()},onError:function(a){this.loadNext()},onTxtOk:function(a){va.texts.h[this._realTexts[this._curTxtLoad].name]=this._txtLoader.data;this.loadNextTxt()},onTxtError:function(a){this.loadNextTxt()},__class__:va});var Pi=function(){};t["com.tilbuci.statictools.SpriteStatic"]=Pi;Pi.__name__="com.tilbuci.statictools.SpriteStatic";Pi.shake=function(a,b,c,d){var f=a.get_x(),g=a.get_y();xa.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)})};Pi.quickJump=function(a,b,c,d){var f=a.get_y();xa.tween(a,b/2,{y:f-c}).ease(Ui.easeOut).onComplete(function(){xa.tween(a,b/2,{y:f}).ease(Ui.easeIn).onComplete(function(){d!=null&&p.parser.run(d,!0)})})};Pi.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,v=a.get_y()-(a.get_height()*
c-a.get_height())/2,w=null,z=null,r=d;b/=2*d;w=function(){r>0?(--r,xa.tween(a,b,{scaleX:c,scaleY:c,x:q,y:v}).ease(Ui.easeOut).onComplete(z)):f!=null&&p.parser.run(f,!0)};z=function(){xa.tween(a,b,{scaleX:g,scaleY:h,x:n,y:l}).ease(Ui.easeIn).onComplete(w)};w()};var Fa=function(){};t["com.tilbuci.statictools.StringStatic"]=Fa;Fa.__name__="com.tilbuci.statictools.StringStatic";Fa.slashURL=function(a){return a.charAt(a.length-1)=="/"?a:a+"/"};Fa.jsonParse=function(a){var b=null;try{b=(new In(a)).doParse()}catch(c){b=
!1}return b};Fa.jsonStringify=function(a,b){return Bg.print(a,null,b)};Fa.jsonAsMap=function(a){var b=new H;a=Fa.jsonParse(a);if(a!=0)for(var c=0,d=u.fields(a);c<d.length;){var f=d[c];++c;var g=u.field(a,f);b.h[f]=g}return b};Fa.md5=function(a){return Qj.encode(a)};Fa.validateEmail=function(a){return(new Xa(".+@.+","i")).match(a)};Fa.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};Fa.encryptKey=function(a,
b,c){a=Na.ofString(a);b=Na.ofString(b);return(new mc(b,c)).encrypt("ctr",a,"NoPadding").toHex()};Fa.decryptKey=function(a,b,c){a=Na.ofHex(a);b=Na.ofString(b);return(new mc(b,c)).decrypt("ctr",a,"NoPadding").toString()};Fa.decrypt=function(a,b){a=U.substr(a,0,a.length-10)+U.substr(a,-9,null);a=U.substr(a,2,null);try{var c=pi.decode(a),d=c.sub(0,16),f=c.sub(16,c.length-16),g=Na.ofString(b),h=new mc;h.init(g,d);a=h.decrypt("cbc",f,"PKCS7").toString()}catch(n){a=""}return a};Fa.encrypt=function(a,b){var c=
new mc,d=Na.ofString(b);b=Na.ofString(U.substr(Fa.random(),0,16));c.init(d,b);a=Na.ofString(a);d=new Na(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=pi.encode(c);return a="TB"+U.substr(a,0,a.length-9)+"b"+U.substr(a,-9,null)};Fa.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))};Fa.colorHex=function(a,b){b==null&&(b="#FFFFFF");a==null&&(a=b);a=N.replace(a,"#","0x");U.substr(a,0,2)!="0x"&&(a="0x"+a);a=F.parseInt(a);a=a==null?b:"#"+N.hex(a,6);return a.toUpperCase()};Fa.colorInt=function(a,b){b==null&&(b="0xFFFFFF");a=N.replace(a,"#","0x");U.substr(a,0,2)!="0x"&&U.substr(a,0,2)!="0X"&&(a="0x"+a);a=F.parseInt(a);a==null&&(a=F.parseInt(b));return a};Fa.random=function(){return Fa.md5(F.string(Math.random()*1E5))};var hf=
function(){this.layout=this._xmlContent=this.__backgroundSkin=this.__disabledBackgroundSkin=this.__resizeDraggingSkin=null;this._layoutResult=new Ng;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=Ue.CONTENT;this._resizingDividerIndex=-1;this._resizingTouchPointIsMouse=!1;this._resizingTouchPointID=
null;da.call(this);this.addEventListener("addedToStage",m(this,this.baseDividedBox_addedToStageHandler))};t["feathers.controls.supportClasses.BaseDividedBox"]=hf;hf.__name__="feathers.controls.supportClasses.BaseDividedBox";hf.__super__=da;hf.prototype=I(da.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(y.SIZE);this.stage!=null&&(this._autoSizeMode==Ue.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(x.__cast(d,Ia),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(y.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(y.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:da.prototype.get_numChildren.call(this)},addChild:function(a){return this._displayListBypassEnabled?this.addChildAt(a,this.items.length):da.prototype.addChild.call(this,a)},addChildAt:function(a,b){if(!this._displayListBypassEnabled)return da.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(y.LAYOUT);return b},removeChild:function(a){if(!this._displayListBypassEnabled)return da.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(y.LAYOUT);return b},removeChildAt:function(a){return this._displayListBypassEnabled?
this.removeChild(this.items[a]):da.prototype.removeChildAt.call(this,a)},getChildAt:function(a){return this._displayListBypassEnabled?this.items[a]:da.prototype.removeChildAt.call(this,a)},getChildIndex:function(a){return this._displayListBypassEnabled?this.items.indexOf(a):da.prototype.getChildIndex.call(this,a)},setChildIndex:function(a,b){this._displayListBypassEnabled?(U.remove(this.items,a),this.items.splice(b,0,a)):da.prototype.setChildIndex.call(this,a,b)},getChildByName:function(a){if(!this._displayListBypassEnabled)return da.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 xe("The supplied index is out of bounds.");for(b-=a;b>=0;)this.removeChildAt(a),--b}}else da.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();da.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 da.prototype.addChildAt.call(this,a,d)},removeItem:function(a){U.remove(this.items,a);var b=this.getRawChildIndex(a);if(b!=0){var c=da.prototype.getChildAt.call(this,b-1);this.dividers.splice(b-1,1);U.remove(this._layoutItems,c);this.destroyDivider(x.__cast(c,Ia),this._dividerFactory)}U.remove(this._layoutItems,
a);return da.prototype.removeChild.call(this,a)},update:function(){var a=this.isInvalid(y.STATE),b=this.isInvalid(y.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:(x.__implements(a,Ea)&&a.initializeNow(),this._backgroundSkinMeasurements==null?this._backgroundSkinMeasurements=new Sb(a):this._backgroundSkinMeasurements.save(a),x.__implements(a,sb)&&a.set_uiContext(this),
this.addRawChildAt(a,0))},removeCurrentBackgroundSkin:function(a){a!=null&&(x.__implements(a,sb)&&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&&(x.__implements(this._currentResizeDraggingSkin,
Ea)&&this._currentResizeDraggingSkin.initializeNow(),x.__implements(this._currentResizeDraggingSkin,sb)&&this._currentResizeDraggingSkin.set_uiContext(this),this._currentResizeDraggingSkin.set_visible(!1),this._currentResizeDraggingSkin instanceof Ia&&(this._currentResizeDraggingSkin.mouseEnabled=!1),this._currentResizeDraggingSkin instanceof Ab&&(this._currentResizeDraggingSkin.mouseChildren=!1),this.addRawChild(this._currentResizeDraggingSkin)))},getCurrentResizeDraggingSkin:function(){return this.get_resizeDraggingSkin()},
removeCurrentResizeDraggingSkin:function(a){a!=null&&(x.__implements(a,sb)&&a.set_uiContext(null),a.parent==this&&this.removeRawChild(a))},createDivider:function(){var a=(this._dividerFactory!=null?this._dividerFactory:hf.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),x.__implements(this._currentBackgroundSkin,ba)&&this._currentBackgroundSkin.validateNow());var h=this._autoSizeMode==Ue.CONTENT||
this.stage==null,n=0,l=0;if(!h){l=this.globalToLocal(new Ca);var q=this.globalToLocal(new Ca(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]);x.__implements(d,R)&&!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),x.__implements(this._currentBackgroundSkin,ba)&&this._currentBackgroundSkin.validateNow())},validateChildren:function(){for(var a=0,b=this._layoutItems;a<b.length;){var c=b[a];++a;x.__implements(c,ba)&&c.validateNow()}},prepareResize:function(a,b,c){a=x.getClass(this);throw new Ce("Missing override for 'prepareResize' in type "+a.__name__);},commitResize:function(a,b,c,d){a=x.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=Rd.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&&(zd.set_cursor(this._oldDividerMouseCursor),this._oldDividerMouseCursor=null))},baseDividedBox_child_resizeHandler:function(a){this._ignoreChildChanges||
this.setInvalid(y.LAYOUT)},baseDividedBox_child_layoutDataChangeHandler:function(a){this._ignoreChildChanges||this.setInvalid(y.LAYOUT)},baseDividedBox_addedToStageHandler:function(a){this._autoSizeMode==Ue.STAGE&&(this.setInvalid(y.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(y.SIZE)},baseDividedBox_divider_rollOverHandler:function(a){this._enabled&&this._resizingDividerIndex==-1&&zd.get_cursor()=="auto"&&(this._oldDividerMouseCursor=zd.get_cursor(),zd.set_cursor(this.resizeCursor))},baseDividedBox_divider_rollOutHandler:function(a){this._enabled&&this._resizingDividerIndex==
-1&&this._oldDividerMouseCursor!=null&&(zd.set_cursor(this._oldDividerMouseCursor),this._oldDividerMouseCursor=null)},baseDividedBox_divider_mouseDownHandler:function(a){a=x.__cast(a.currentTarget,Ia);this.resizeTouchBegin(hf.POINTER_ID_MOUSE,!0,a,this.stage.get_mouseX(),this.stage.get_mouseY())},baseDividedBox_divider_stage_mouseMoveHandler:function(a){a=x.__cast(a.currentTarget,dd);this.resizeTouchMove(hf.POINTER_ID_MOUSE,!0,a.get_mouseX(),a.get_mouseY())},baseDividedBox_divider_stage_mouseUpHandler:function(a){a=
x.__cast(a.currentTarget,dd);this.resizeTouchEnd(hf.POINTER_ID_MOUSE,!0,a.get_mouseX(),a.get_mouseY())},baseDividedBox_divider_touchBeginHandler:function(a){if(!a.isPrimaryTouchPoint){var b=x.__cast(a.currentTarget,Ia);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(y.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(y.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(y.STYLES);return this.__resizeDraggingSkin},clearStyle_resizeDraggingSkin:function(){this.set_resizeDraggingSkin(null);return this.get_resizeDraggingSkin()},__class__:hf,__properties__:I(da.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 Zh=function(){this._fallbackFluidIndex=-1;this._customItemHeights=[];this.initializeVDividedBoxTheme();hf.call(this);this.resizeCursor=hh.fromLimeCursor(fd.RESIZE_NS)};t["feathers.controls.VDividedBox"]=Zh;Zh.__name__="feathers.controls.VDividedBox";Zh.__super__=hf;Zh.prototype=I(hf.prototype,{_vDividedBoxLayout:null,_customItemHeights:null,_fallbackFluidIndex:null,_resizeStartStageY:null,_resizeStartHeight1:null,_resizeStartHeight2:null,addItemAt:function(a,b){var c=hf.prototype.addItemAt.call(this,
a,b),d=null;x.__implements(a,tb)&&(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=hf.prototype.removeItem.call(this,a);b!=-1&&this._customItemHeights.splice(b,1);return a},initializeVDividedBoxTheme:function(){yw.initialize()},
initialize:function(){hf.prototype.initialize.call(this);this._vDividedBoxLayout==null&&(this._vDividedBoxLayout=new fp);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;hf.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()),x.__implements(this._currentResizeDraggingSkin,ba)&&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*=ah.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()),x.__implements(this._currentResizeDraggingSkin,ba)&&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;x.__implements(f,tb)&&(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;x.__implements(d,tb)&&(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(y.LAYOUT)}},baseDividedBox_child_layoutDataChangeHandler:function(a){hf.prototype.baseDividedBox_child_layoutDataChangeHandler.call(this,a);a=x.__cast(a.currentTarget,R);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,x.__implements(b,tb)&&(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(y.LAYOUT))}},__class__:Zh});var er=function(a,b){Zh.call(this);this._ac=b;this._player=a;this.ui=new zc;this.set_layoutData(cd.fill());this._scroller=new le;this._scroller.set_autoHideScrollBars(!1);this._scroller.set_fixedScrollBars(!0);this._scroller.set_showScrollBars(!0);
this._scroller.set_layout(new tf);a=new ab;a.set_fill(vb.SolidColor(10066329));this._scroller.set_backgroundSkin(a);this.addChild(this._scroller);this._scroller.addChild(this._player);this._controls=new Mj;this._controls.set_layoutData(cd.fill());b=new Cg;b.set_gap(5);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);this._displayArea=this.ui.createHArea("left");
this._controls.addChild(this._displayArea);this.ui.createIconButton("screen",m(this,this.onScreen),new Oa(va.getBitmapData("btScreen")),null,this._displayArea);this.ui.createSpacer("screen",10,!1,this._displayArea);this.ui.createIconButton("color",m(this,this.onColor),new Oa(va.getBitmapData("btColors")),null,this._displayArea);this.ui.createIconButton("focus",m(this,this.onFocus),new Oa(va.getBitmapData("btFocus")),null,this._displayArea);this._zoomArea=this.ui.createHArea("center");this._controls.addChild(this._zoomArea);
this.ui.createIconButton("zoom+",m(this,this.onZoomP),new Oa(va.getBitmapData("btZoomP")),null,this._zoomArea);this.ui.createIconButton("zoom-",m(this,this.onZoomM),new Oa(va.getBitmapData("btZoomM")),null,this._zoomArea);this.ui.createIconButton("zoomfit",m(this,this.centerPlayer),new Oa(va.getBitmapData("btZoomFit")),null,this._zoomArea);this.ui.createIconButton("zoom100",m(this,this.onZoom100),new Oa(va.getBitmapData("btZoom100")),null,this._zoomArea);this._playArea=this.ui.createHArea("left");
this._controls.addChild(this._playArea);this.ui.createIconButton("left",m(this,this.onLeft),new Oa(va.getBitmapData("btLeft")),null,this._playArea);this.ui.createLabel("keyframes","","",this._playArea);this.ui.createIconButton("right",m(this,this.onRight),new Oa(va.getBitmapData("btRight")),null,this._playArea);this.ui.createIconButton("actions",m(this,this.onActions),new Oa(va.getBitmapData("btSetup")),null,this._playArea);this.ui.createIconButton("play",m(this,this.onPlay),new Oa(va.getBitmapData("btPlay")),
null,this._playArea);this._movieInfo=new Zs(m(this,this.updateInfo));this._controls.addChild(this._movieInfo);this.ui.buttons.h.screen.set_toolTip(k.ln.get("tooltip-playercontrols-screen"));this.ui.buttons.h.color.set_toolTip(k.ln.get("tooltip-playercontrols-color"));this.ui.buttons.h.focus.set_toolTip(k.ln.get("tooltip-playercontrols-focus"));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"]=
er;er.__name__="com.tilbuci.ui.PlayerControls";er.__super__=Zh;er.prototype=I(Zh.prototype,{_ac:null,_controls:null,_scroller:null,_player:null,_movieInfo:null,_displayArea:null,_zoomArea:null,_playArea:null,_centerTimer:null,ui:null,updateDisplay:function(){this._movieInfo.onUpdate();this.updateInfo()},updateInfo:function(){this.updateSizes();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 Ec(150),this._centerTimer.run=m(this,this.reCenter);else{try{this._centerTimer.stop()}catch(b){}this._centerTimer=null}this.updateSizes()},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());this.updateSizes()},onColor:function(a){p.parser.run('{ "ac": "accessibility.changeshader", "param": [] }');switch(p.currentShader){case 1:this._movieInfo.showMsg(k.ln.get("tooltip-accessibility-deuteranotopia"));
break;case 2:this._movieInfo.showMsg(k.ln.get("tooltip-accessibility-protonatopia"));break;case 3:this._movieInfo.showMsg(k.ln.get("tooltip-accessibility-tritanotopia"));break;case 4:this._movieInfo.showMsg(k.ln.get("tooltip-accessibility-contrast"));break;case 5:this._movieInfo.showMsg(k.ln.get("tooltip-accessibility-grayscale"));break;default:this._movieInfo.showMsg(k.ln.get("tooltip-accessibility-none"))}this.updateSizes()},onFocus:function(a){p.parser.run('{ "ac": "accessibility.focusswitch", "param": [] }');
p.focusMode?this._movieInfo.showMsg(k.ln.get("tooltip-accessibility-focuson")):this._movieInfo.showMsg(k.ln.get("tooltip-accessibility-focusoff"));this.updateSizes()},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());this.updateSizes()},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());this.updateSizes()},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())},updateSizes:function(){var a=Math.round(this.get_width()-20);this._displayArea.set_width(Math.round(a*.2));this._zoomArea.set_width(Math.round(a*.2));this._playArea.set_width(Math.round(a*.25));this._movieInfo.set_width(a-(this._displayArea.get_width()-this._zoomArea.get_width()-this._playArea.get_width()))},__class__:er});var dr=function(a,
b){da.call(this);this._bg=new Jd;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 og("player.json","editor","landscape",!0,b);this.addChild(this.player)};t["com.tilbuci.ui.PlayerHolder"]=dr;dr.__name__="com.tilbuci.ui.PlayerHolder";dr.__super__=da;dr.prototype=I(da.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 H,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 ff(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=U.substr(h,0,32),l=g.assets;h=new Nj(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=Fa.md5(a)}c=p.movie.scene.keyframes[p.area.get_currentKf()];var d=new yh(b);c.h[a]=d;
p.movie.scene.collections.indexOf(u.field(b,"collection"))==-1&&p.movie.scene.collections.push(u.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 H,
n=Object.keys(p.movie.scene.keyframes[g].h),l=n.length,q=0;q<l;){var v=n[q++],w=p.movie.scene.keyframes[g].h[v].clone();h.h[v]=w}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__:dr,__properties__:I(da.prototype.__properties__,{get_rHeight:"get_rHeight",get_rWidth:"get_rWidth"})});var Ps=function(a){this._buttons=[];this._statetexts=new H;this._logintexts=new H;this._gap=10;Tc.call(this);this._uiBg=a;a=new tf;a.set_gap(this._gap);
a.setPadding(this._gap);this.set_layout(a);this.set_y(-500);this._pheader=new Si;this._pheader.set_text("");this.set_header(this._pheader);this._pfooter=new qb;a=new Cg;a.set_horizontalAlign(Vb.CENTER);a.set_gap(this._gap);a.setPadding(this._gap);this._pfooter.set_layout(a);this.set_footer(this._pfooter);this._inputBtCancel=new Wb;a=new Oa(va.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 Wb;a=new Oa(va.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 pd;this._inputText.setPadding(this._gap);this._inputList=new Dc;this._inputList.itemToText=function(b){return b.text};this._inputNumeric=new qd;this._inputLabel=new fa;this._inputLabel.set_wordWrap(!0);this._inputArea=new sf;this._inputArea.set_selectable(!1);this._inputArea.set_enabled(!1);this._inputArea.set_wordWrap(!0);
this._inputCheck=new Am;this.set_visible(!1)};t["com.tilbuci.ui.PlayerInput"]=Ps;Ps.__name__="com.tilbuci.ui.PlayerInput";Ps.__super__=Tc;Ps.prototype=I(Tc.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);
xa.tween(this,.3,{y:50});xa.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,v,w,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=v;this._logintexts.h.emailsender=w;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 fg(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 Qc(c[d],m(this,this.onEmailDomain),c[d]),d.set_width(this._inputText.get_width()),this.addChild(d),this._buttons.push(d);Ed.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 ab(vb.SolidColor(p.theme.get_headerBackground()))),p.theme.get_windowBackground()!=null&&this.set_backgroundSkin(new ab(vb.SolidColor(p.theme.get_windowBackground()))),p.theme.footerFillColor!=null&&this._pfooter.set_backgroundSkin(new ab(vb.SolidColor(p.theme.footerFillColor))),this._pheader.set_textFormat(new ui(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);xa.tween(this,.3,{y:50});xa.tween(this._uiBg,.3,{alpha:1}).autoVisible(!1)},
inputBtOk:function(a){if(this._inputType=="secretkey"){if(a="",p.mdata.key!=""&&(a=Fa.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)),xa.tween(this,.1,{y:-500}).onComplete(m(this,this.inputClose)),xa.tween(this._uiBg,.1,{alpha:0}).autoVisible(!1)}else if(this._inputType=="login"){if(this._inputCheck.get_selected())if((new Xa(".+@.+","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)),xa.tween(this,.1,{y:-500}).onComplete(m(this,this.inputClose)),xa.tween(this._uiBg,.1,{alpha:0}).autoVisible(!1));else if(this._inputType=="email")Fa.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(),xa.tween(this,.1,{y:-500}).onComplete(m(this,this.inputClose)),
xa.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));xa.tween(this,.1,{y:-500}).onComplete(m(this,this.inputClose));xa.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=u.fields(b.map.h.states);c<d.length;){var f=d[c];++c;f=u.field(b.map.h.states,f);var g=u.field(f,"date"),h=u.field(f,"about");h!=""&&(g=g+" : "+h);a.push({text:g,id:u.field(f,"id")})}this._inputList.set_dataProvider(new fg(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();xa.tween(this,.1,{y:-500}).onComplete(m(this,this.inputClose));xa.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__:Ps});var gp=function(){};t["feathers.style.ITheme"]=gp;gp.__name__="feathers.style.ITheme";gp.__isInterface__=!0;gp.prototype={getStyleProvider:null,dispose:null,__class__:gp};var Bm=function(){this.styleProvider=new Ll};
t["feathers.themes.ClassVariantTheme"]=Bm;Bm.__name__="feathers.themes.ClassVariantTheme";Bm.__interfaces__=[gp];Bm.prototype={styleProvider:null,getStyleProvider:function(a){var b=null,c=null;x.__implements(a,kd)&&(b=a.get_styleContext(),c=a.get_variant());b==null&&(b=x.getClass(a));var d=this.styleProvider.getStyleFunction(b,c);if(d!=null)return this.styleProvider;if(c==null)return null;d=ac.get_fallbackTheme();if(d!=null&&d!=this&&d instanceof Bm&&(a=d.getStyleProvider(a),a=a instanceof Ll?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(){X.dispatch(this.styleProvider,"clear")},__class__:Bm};var un=function(){};t["feathers.style.IDarkModeTheme"]=un;un.__name__="feathers.style.IDarkModeTheme";un.__isInterface__=!0;un.__interfaces__=[gp];un.prototype={get_darkMode:null,set_darkMode:null,__class__:un,__properties__:{set_darkMode:"set_darkMode",get_darkMode:"get_darkMode"}};var wc=
function(a,b){this._darkMode=!1;this.styleProvider=new Ll;this.customThemeColor=a;this.customDarkThemeColor=b;this.refreshColors();this.refreshFonts();this.refreshPaddings();this.styleProvider=new Ll;this.mediaQueryList=x.__cast(wa,Window).matchMedia("(hover: hover) and (pointer: fine)");this.mediaQueryList.addListener(m(this,this.mediaQueryList_changeHandler))};t["feathers.themes.steel.BaseSteelTheme"]=wc;wc.__name__="feathers.themes.steel.BaseSteelTheme";wc.__interfaces__=[un];wc.__super__=Bm;wc.prototype=
I(Bm.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();Ch.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);Bm.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 vb.SolidColor(this.themeColor)},getControlFill:function(){return vb.SolidColor(this.controlFillColor2)},getControlDisabledFill:function(){return vb.SolidColor(this.controlDisabledFillColor,
.7)},getButtonFill:function(){return vb.Gradient(0,[this.controlFillColor1,this.controlFillColor2],[1,1],[0,255],$s.fromRadians(Math.PI/2))},getButtonDownFill:function(){return vb.Gradient(0,[this.controlFillColor2,this.controlFillColor1],[1,1],[0,255],$s.fromRadians(Math.PI/2))},getButtonDisabledFill:function(){return vb.SolidColor(this.controlDisabledFillColor)},getScrollBarThumbFill:function(){return vb.SolidColor(this.scrollBarThumbFillColor)},getScrollBarThumbDisabledFill:function(){return vb.SolidColor(this.scrollBarThumbDisabledFillColor,
.7)},getBorder:function(a){a==null&&(a=1);return nc.SolidColor(a,this.borderColor)},getButtonBorder:function(a){a==null&&(a=1);return nc.SolidColor(a,this.borderColor)},getButtonDisabledBorder:function(a){a==null&&(a=1);return nc.SolidColor(a,this.disabledInsetBorderColor)},getInsetBorder:function(a){a==null&&(a=1);return nc.SolidColor(a,this.insetBorderColor)},getDisabledInsetBorder:function(a){a==null&&(a=1);return nc.SolidColor(a,this.disabledInsetBorderColor)},getSelectedInsetBorder:function(a){a==
null&&(a=1);return nc.SolidColor(a,this.selectedInsetBorderColor)},getThemeBorder:function(a){a==null&&(a=1);return nc.SolidColor(a,this.themeColor)},getSelectedBorder:function(a){a==null&&(a=1);return nc.SolidColor(a,this.selectedBorderColor)},getActiveFillBorder:function(a){a==null&&(a=1);return nc.SolidColor(a,this.activeFillBorderColor)},getContainerBorder:function(a){a==null&&(a=1);return nc.SolidColor(a,this.borderColor)},getDividerBorder:function(a){a==null&&(a=1);return nc.SolidColor(a,this.dividerColor)},
getDividerFill:function(){return vb.SolidColor(this.dividerColor)},getSubHeadingDividerBorder:function(a){a==null&&(a=1);return nc.SolidColor(a,this.subHeadingDividerColor)},getSubHeadingDividerFill:function(){return vb.SolidColor(this.subHeadingDividerColor)},getFocusBorder:function(a){a==null&&(a=1);return nc.SolidColor(a,this.focusBorderColor)},getInsetFill:function(){return vb.SolidColor(this.insetFillColor)},getDisabledInsetFill:function(){return vb.SolidColor(this.disabledInsetFillColor)},getActiveThemeFill:function(){return vb.Gradient(0,
[this.themeColor,this.offsetThemeColor],[1,1],[0,255],$s.fromRadians(Math.PI/2))},getReversedActiveThemeFill:function(){return vb.Gradient(0,[this.offsetThemeColor,this.themeColor],[1,1],[0,255],$s.fromRadians(Math.PI/2))},getDangerFill:function(){return vb.Gradient(0,[this.dangerFillColor,this.offsetDangerFillColor],[1,1],[0,255],$s.fromRadians(Math.PI/2))},getReversedDangerFill:function(){return vb.Gradient(0,[this.offsetDangerFillColor,this.dangerFillColor],[1,1],[0,255],$s.fromRadians(Math.PI/
2))},getDangerBorder:function(a){a==null&&(a=1);return nc.SolidColor(a,this.dangerBorderColor)},getOverlayFill:function(){return vb.SolidColor(this.overlayFillColor,.8)},getRootFill:function(){return vb.SolidColor(this.rootFillColor)},getContainerFill:function(){return vb.SolidColor(this.containerFillColor)},getSubHeadingFill:function(){return vb.SolidColor(this.subHeadingFillColor)},getTextFormat:function(a){a==null&&(a=3);return new ui(this.fontName,this.fontSize,this.textColor,!1,!1,!1,null,null,
a)},getDisabledTextFormat:function(a){a==null&&(a=3);return new ui(this.fontName,this.fontSize,this.disabledTextColor,!1,!1,!1,null,null,a)},getSecondaryTextFormat:function(a){a==null&&(a=3);return new ui(this.fontName,this.fontSize,this.secondaryTextColor,!1,!1,!1,null,null,a)},getDangerTextFormat:function(a){a==null&&(a=3);return new ui(this.fontName,this.fontSize,this.dangerTextColor,!1,!1,!1,null,null,a)},getHeaderTextFormat:function(a){a==null&&(a=3);return new ui(this.fontName,this.headerFontSize,
this.textColor,!1,!1,!1,null,null,a)},getDisabledHeaderTextFormat:function(a){a==null&&(a=3);return new ui(this.fontName,this.headerFontSize,this.disabledTextColor,!1,!1,!1,null,null,a)},getDetailTextFormat:function(a){a==null&&(a=3);return new ui(this.fontName,this.detailFontSize,this.textColor,!1,!1,!1,null,null,a)},getDisabledDetailTextFormat:function(a){a==null&&(a=3);return new ui(this.fontName,this.detailFontSize,this.disabledTextColor,!1,!1,!1,null,null,a)},getSecondaryDetailTextFormat:function(a){a==
null&&(a=3);return new ui(this.fontName,this.detailFontSize,this.secondaryTextColor,!1,!1,!1,null,null,a)},getHeaderFill:function(){return vb.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();Ch.dispatch(this.styleProvider,"stylesChange")},__class__:wc,__properties__:{set_darkMode:"set_darkMode",get_darkMode:"get_darkMode"}});var Cm=function(a,b){wc.call(this,a,b);zw.initialize(this);Aw.initialize(this);Zq.initialize(this);rw.initialize(this);Bw.initialize(this);Cw.initialize(this);Dw.initialize(this);Yk.initialize(this);Ew.initialize(this);$h.initialize(this);dw.initialize(this);Fw.initialize(this);Gw.initialize(this);Hw.initialize(this);Iw.initialize(this);Jw.initialize(this);
Kw.initialize(this);Lw.initialize(this);sw.initialize(this);Mw.initialize(this);Zk.initialize(this);Nw.initialize(this);Ow.initialize(this);cw.initialize(this);Pw.initialize(this);Qw.initialize(this);Rw.initialize(this);Sw.initialize(this);Tw.initialize(this);vw.initialize(this);Jn.initialize(this);Uw.initialize(this);Vw.initialize(this);Ww.initialize(this);uw.initialize(this);Xw.initialize(this);Yw.initialize(this);Zw.initialize(this);$w.initialize(this);ax.initialize(this);bx.initialize(this);cx.initialize(this);
dx.initialize(this);ex.initialize(this);fx.initialize(this);gx.initialize(this);yw.initialize(this);hx.initialize(this);tw.initialize(this);ix.initialize(this)};t["feathers.themes.steel.SteelTheme"]=Cm;Cm.__name__="feathers.themes.steel.SteelTheme";Cm.__super__=wc;Cm.prototype=I(wc.prototype,{__class__:Cm});var Is=function(a){Cm.call(this);this.set_darkMode(!0);a=Fa.jsonParse(a);if(a!=0)for(var b=0,c=u.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=u.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=F.string(u.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"]=Is;Is.__name__="com.tilbuci.ui.PlayerTheme";Is.__super__=Cm;Is.prototype=I(Cm.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=F.parseInt(u.field(b,a));b!=null&&(this[a]=b)},__class__:Is,__properties__:I(Cm.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 ge=function(){};
t["feathers.core.IStateObserver"]=ge;ge.__name__="feathers.core.IStateObserver";ge.__isInterface__=!0;ge.prototype={get_stateContext:null,set_stateContext:null,__class__:ge,__properties__:{set_stateContext:"set_stateContext",get_stateContext:"get_stateContext"}};var sb=function(){};t["feathers.skins.IProgrammaticSkin"]=sb;sb.__name__="feathers.skins.IProgrammaticSkin";sb.__isInterface__=!0;sb.__interfaces__=[tb];sb.prototype={get_uiContext:null,set_uiContext:null,__class__:sb,__properties__:{set_uiContext:"set_uiContext",
get_uiContext:"get_uiContext"}};var Dh=function(){Cd.call(this);this.mouseChildren=!1;this.set_tabEnabled(!1);this.set_tabChildren(!1)};t["feathers.skins.ProgrammaticSkin"]=Dh;Dh.__name__="feathers.skins.ProgrammaticSkin";Dh.__interfaces__=[ge,sb];Dh.__super__=Cd;Dh.prototype=I(Cd.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)),x.__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),x.__implements(this._uiContext,ud)&&this._uiContext.addEventListener("change",m(this,this.uiContextToggle_changeHandler)),this.onAddUIContext());this.setInvalid(y.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(y.DATA);return this._stateContext},
onAddUIContext:function(){},onRemoveUIContext:function(){},update:function(){},needsStateUpdate:function(){return!0},checkForStateChange:function(){this.needsStateUpdate()&&this.setInvalid(y.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__:Dh,__properties__:I(Cd.prototype.__properties__,
{set_stateContext:"set_stateContext",get_stateContext:"get_stateContext",set_uiContext:"set_uiContext",get_uiContext:"get_uiContext"})});var De=function(a,b){this._previousBorder=this._previousFill=null;Dh.call(this);this.set_fill(a);this.set_border(b)};t["feathers.skins.BaseGraphicsPathSkin"]=De;De.__name__="feathers.skins.BaseGraphicsPathSkin";De.__super__=Dh;De.prototype=I(Dh.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(y.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(y.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(y.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(y.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(y.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(y.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(y.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(y.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!=vb.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 hb;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&&x.__implements(this._uiContext,Bh)&&(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&&x.__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&&x.__implements(this._uiContext,Bh)&&(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&&x.__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__:De,__properties__:I(Dh.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 ab=function(a,b){this._cornerRadius=0;De.call(this,a,b)};t["feathers.skins.RectangleSkin"]=ab;ab.__name__="feathers.skins.RectangleSkin";ab.__super__=De;ab.prototype=I(De.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(y.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__:ab,__properties__:I(De.prototype.__properties__,{set_cornerRadius:"set_cornerRadius",
get_cornerRadius:"get_cornerRadius"})});var wh=function(a){a==null&&(a=6710886);ab.call(this);this.set_fill(vb.SolidColor(a))};t["com.tilbuci.ui.base.BackgroundSkin"]=wh;wh.__name__="com.tilbuci.ui.base.BackgroundSkin";wh.__super__=ab;wh.prototype=I(ab.prototype,{__class__:wh});var Hl=function(a,b,c,d,f,g,h,n){n==null&&(n="");h==null&&(h="warn");Tc.call(this);var l=new tf;l.setPadding(10);l.set_gap(20);l.set_verticalAlign(fc.TOP);l.set_horizontalAlign(Vb.LEFT);this.set_backgroundSkin(new wh(3684408));
this.set_layout(l);this.set_width(c);this.set_height(d);d=new Si;d.set_text(a);this.set_header(d);a=new fa;a.set_text(b);a.set_wordWrap(!0);a.set_width(c-30);this.addChild(a);this._btOk=new Wb;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 Wb;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"]=Hl;Hl.__name__="com.tilbuci.ui.base.ConfirmWindow";Hl.__super__=Tc;Hl.prototype=I(Tc.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__:Hl});var Mj=function(){this._fallbackFluidIndex=-1;this._customItemWidths=[];this.initializeHDividedBoxTheme();hf.call(this);this.resizeCursor=hh.fromLimeCursor(fd.RESIZE_WE)};t["feathers.controls.HDividedBox"]=Mj;Mj.__name__="feathers.controls.HDividedBox";Mj.__super__=hf;Mj.prototype=
I(hf.prototype,{_hDividedBoxLayout:null,_customItemWidths:null,_fallbackFluidIndex:null,_resizeStartStageX:null,_resizeStartWidth1:null,_resizeStartWidth2:null,initializeHDividedBoxTheme:function(){Jw.initialize()},addItemAt:function(a,b){var c=hf.prototype.addItemAt.call(this,a,b),d=null;x.__implements(a,tb)&&(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=hf.prototype.removeItem.call(this,a);b!=-1&&this._customItemWidths.splice(b,1);return a},initialize:function(){hf.prototype.initialize.call(this);this._hDividedBoxLayout==null&&(this._hDividedBoxLayout=new hp);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;hf.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()),
x.__implements(this._currentResizeDraggingSkin,ba)&&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*=ah.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()),x.__implements(this._currentResizeDraggingSkin,
ba)&&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;x.__implements(f,tb)&&(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;x.__implements(d,tb)&&(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(y.LAYOUT)}},baseDividedBox_child_layoutDataChangeHandler:function(a){hf.prototype.baseDividedBox_child_layoutDataChangeHandler.call(this,a);a=x.__cast(a.currentTarget,R);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,x.__implements(b,tb)&&(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(y.LAYOUT))}},__class__:Mj});var Wi=function(){Mj.call(this)};
t["com.tilbuci.ui.base.HInterfaceContainer"]=Wi;Wi.__name__="com.tilbuci.ui.base.HInterfaceContainer";Wi.__super__=Mj;Wi.prototype=I(Mj.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__:Wi});var jx=function(){qb.call(this);var a=new Cg;a.set_gap(10);this.set_layout(a)};t["com.tilbuci.ui.base.HPanelContainer"]=jx;jx.__name__="com.tilbuci.ui.base.HPanelContainer";jx.__super__=qb;jx.prototype=I(qb.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();ye.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);ye.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__:jx});var at=function(a,b,c,d){d==null&&(d=0);Zh.call(this);this.set_layoutData(cd.fill());var f=new ab;f.set_fill(vb.SolidColor(6710886));this.set_backgroundSkin(f);var g=new Mj;g.set_layoutData(cd.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"]=
at;at.__name__="com.tilbuci.ui.base.InterfaceColumns";at.__super__=Zh;at.prototype=I(Zh.prototype,{left:null,right:null,bottom:null,__class__:at});var Rj=function(a,b,c,d){d==null&&(d=-1);c==null&&(c=-1);b==null&&(b=-1);a==null&&(a="");le.call(this);a=="v"?(a=new tf,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 Cg,b>0&&(a.set_gap(b),a.setPadding(b)),this.set_layout(a));c>=0&&(b=new ab,b.set_fill(vb.SolidColor(c)),d>=0&&b.set_border(nc.SolidColor(1,
d)),this.set_backgroundSkin(b))};t["com.tilbuci.ui.base.InterfaceContainer"]=Rj;Rj.__name__="com.tilbuci.ui.base.InterfaceContainer";Rj.__super__=le;Rj.prototype=I(le.prototype,{replaceChildren:function(a){this.removeChildren();for(var b=0,c=a.length;b<c;){var d=b++;this.addChild(a[d])}},__class__:Rj});var zc=function(a){a==null&&(a=10);this.lists=new H;this.selects=new H;this._btActions=new H;this.toggles=new H;this.buttons=new H;this.spacers=new H;this.numerics=new H;this.tareas=new H;this.inputs=
new H;this.labels=new H;this.hcontainers=new H;this.containers=new H;this.columns=new H;this._padding=10;this._padding=a;this._vLayout=new tf;this._vLayout.setPadding(this._padding);this._vLayout.set_gap(this._padding/2);this._vLayout.set_verticalAlign(fc.TOP);this._vLayout.set_horizontalAlign(Vb.LEFT);this._hLayout=new Cg;this._hLayout.setPadding(this._padding);this._hLayout.set_gap(this._padding/2);this._hLayout.set_verticalAlign(fc.TOP);this._hLayout.set_horizontalAlign(Vb.LEFT)};t["com.tilbuci.ui.base.InterfaceFactory"]=
zc;zc.__name__="com.tilbuci.ui.base.InterfaceFactory";zc.pickValue=function(a,b){return pc.isMobile()?b:a};zc.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 at(b,c,d,f);return this.columns.h[a]=b},createContainer:function(a,b){b==null&&
(b=-1);var c=new Rj;c.set_backgroundSkin(new wh);if(b<0)c.set_layout(this._vLayout);else{var d=new tf;d.setPadding(b);d.set_gap(b/2);d.set_verticalAlign(fc.TOP);d.set_horizontalAlign(Vb.LEFT);c.set_layout(d)}return this.lastCont=this.containers.h[a]=c},createHContainer:function(a,b){b==null&&(b=-1);var c=new Wi;if(b>=0){var d=new ab;d.set_fill(vb.SolidColor(b));c.set_backgroundSkin(d)}else c.set_backgroundSkin(new wh);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 Tc,f=new Cg;f.set_gap(c);f.setPadding(c);switch(a){case "left":f.set_horizontalAlign(Vb.LEFT);break;case "right":f.set_horizontalAlign(Vb.RIGHT);break;default:f.set_horizontalAlign(Vb.CENTER)}d.set_layout(f);a=new ab;a.set_fill(vb.SolidColor(b));d.set_backgroundSkin(a);return d},createWarning:function(a,b,c,d,f,g,h){h==null&&(h="Ok");a=new Hl(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 Hl(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 ip;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 ip;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 bt;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 qd;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 Pk;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 sf;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 Qc(a,c,b,null,f);b.set_horizontalAlign(Vb.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 Qc(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(Vb.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 Cd;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 ct;g.set_dataProvider(new fg(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 fg(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 Dc;g.set_dataProvider(new fg(b));g.itemToText=function(h){return h.text};g.set_height(c);g.doubleClickEnabled=
!0;b=Me.withFunction(function(){var h=new Rc;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++,v=h.getChildAt(q);Object.prototype.hasOwnProperty.call(v,"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=
Me.withFunction(function(){var c=new Rc;c.set_icon(new Kn);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);x.__cast(c.get_icon(),Kn).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 fg(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 ab,f.set_fill(vb.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__:zc};var qj=function(a,b,c){c==null&&(c=!1);b==null&&(b=250);a==null&&(a=760);this._codemode=!1;this._idbuttons=new H;
le.call(this);var d=new tf;d.set_gap(5);d.setPadding(0);this.set_layout(d);this.set_backgroundSkin(new wh);this._code=new jp("js");this._code.set_width(a);this._code.set_height(b-35);this._block=new dt(this._code);this._block.set_width(a);this._block.set_height(b-35);this.addChild(this._block);this._buttons=new Wi;this._buttons.set_width(a);b=this._idbuttons;d=new Qc("switch",m(this,this.onSwitch),null,va.getBitmapData("btBlocks"));b.h["switch"]=d;b=this._idbuttons;d=new Qc("copy",m(this,this.onCopy),
null,va.getBitmapData("btCopy"));b.h.copy=d;b=this._idbuttons;d=new Qc("scene",m(this,this.onScene),null,va.getBitmapData("btMovieScene"));b.h.scene=d;b=this._idbuttons;d=new Qc("instance",m(this,this.onInstance),null,va.getBitmapData("btMedia"));b.h.instance=d;b=this._idbuttons;d=new Qc("variables",m(this,this.onVariables),null,va.getBitmapData("btVariables"));b.h.variables=d;b=this._idbuttons;d=new Qc("data",m(this,this.onData),null,va.getBitmapData("btData"));b.h.data=d;b=this._idbuttons;d=new Qc("plus",
m(this,this.onPlus),null,va.getBitmapData("btPlus"));b.h.plus=d;b=this._idbuttons;d=new Qc("plus",m(this,this.onRuntime),null,va.getBitmapData("btSetup"));b.h.runtime=d;b=this._idbuttons;d=new Qc("contraptions",m(this,this.onContraptions),null,va.getBitmapData("btContraptions"));b.h.contraptions=d;b=this._idbuttons;d=new Qc("narrative",m(this,this.onNarrative),null,va.getBitmapData("btNarrative"));b.h.narrative=d;b=this._idbuttons;d=new Qc("plugin",m(this,this.onPlugin),null,va.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 Wi;this._blockbuttons.set_width(a);b=this._idbuttons;d=new Qc("blswitch",m(this,this.onSwitch),null,va.getBitmapData("btCode"));b.h.blswitch=d;b=this._idbuttons;d=new Qc("bldel",m(this,this.onDel),null,va.getBitmapData("btDel"));b.h.bldel=d;b=this._idbuttons;
d=new Qc("bledit",m(this,this.onEdit),null,va.getBitmapData("btEdit"));b.h.bledit=d;b=this._idbuttons;d=new Qc("blopen",m(this,this.onOpen),null,va.getBitmapData("btExpand"));b.h.blopen=d;b=this._idbuttons;d=new Qc("blclose",m(this,this.onClose),null,va.getBitmapData("btCompress"));b.h.blclose=d;b=this._idbuttons;d=new Qc("blup",m(this,this.onUp),null,va.getBitmapData("btUp"));b.h.blup=d;b=this._idbuttons;d=new Qc("bldown",m(this,this.onDown),null,va.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"]=qj;qj.__name__="com.tilbuci.ui.component.ActionArea";qj.__super__=le;qj.prototype=I(le.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__:qj});
var vi=function(a,b,c,d,f){this._blocks2=[];this._blocks1=[];this.isOpen=!1;this.order=0;this.selected=!1;this._paramValues=[];Tc.call(this);this.doubleClickEnabled=!0;this.blaction=a;var g=new tf;g.set_gap(5);g.setPadding(8);this.set_layout(g);g=new ab(vb.SolidColor(4473924),nc.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 fa(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 tf;b.set_gap(2);b.setPadding(5);if(k.acInfo.getNumParams(a.ac)>0||a.param.length>0){this._paramArea=new Tc;this._paramArea.set_backgroundSkin(new ab(vb.SolidColor(0),nc.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 fa(k.acInfo.getAcParam(a.ac,g,a.param[g]));h.set_variant(fa.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 fa(k.acInfo.getAcParam(a.ac,g)),h.set_variant(fa.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 tf;g.set_gap(5);g.setPadding(8);if(k.acInfo.getExtra1(a.ac)!=""){this._extra1Area=new Tc;this._extra1Area.set_backgroundSkin(new ab(vb.SolidColor(0),nc.SolidColor(1,8947848)));this._extra1Area.set_width(this.get_width()-
20);this._extra1Area.set_layout(g);h=new fa(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 vi(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 Qc("addbt",m(this,
this.addActionBlock1),null,va.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 Tc;this._extra2Area.set_backgroundSkin(new ab(vb.SolidColor(0),nc.SolidColor(1,8947848)));this._extra2Area.set_width(this.get_width()-20);this._extra2Area.set_layout(g);h=new fa(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 vi(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 Qc("addbt",m(this,this.addActionBlock2),null,va.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"]=vi;vi.__name__="com.tilbuci.ui.component.ActionBlock";vi.__super__=Tc;vi.prototype=I(Tc.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 ab(vb.SolidColor(136),nc.SolidColor(1,8947848));a.set_cornerRadius(5);this.set_backgroundSkin(a)},unselect:function(){this.selected=!1;var a=new ab(vb.SolidColor(4473924),nc.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 vi&&(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 vi&&(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 vi&&(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 vi&&(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 fa(k.acInfo.getAcParam(this.blaction.ac,a,this.blaction.param[a]));d.set_variant(fa.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 fa(k.acInfo.getAcParam(this.blaction.ac,a)),d.set_variant(fa.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 fa(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 fa(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 fa(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 fa(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 fa(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 fa(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 vi(new Ml(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 vi(new Ml(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__:vi});
var ze=function(a,b){this._open=!1;this.startWindow=null;this.callbacks=[];Tc.call(this);this.ui=new zc;this.set_layout(new Ni);var c=new ab;c.set_fill(vb.SolidColor(6710886));this.set_backgroundSkin(c);c=new fa;c.set_text(a);a=new Si;a.set_leftView(c);a.set_rightView(this.ui.createIconButton("toggle",m(this,this.toggle),new Oa(va.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__=
Tc;ze.prototype=I(Tc.prototype,{ui:null,callbacks:null,startWindow:null,_open:null,_content:null,toggle:function(a){this._open?(a=new Oa(va.getBitmapData("iconPlus")),this.removeChildren()):(a=new Oa(va.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 et=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"]=et;et.__name__="com.tilbuci.ui.component.ActionPanel";et.__super__=ze;et.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 H,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__:et});var dt=function(a){this._blocks=[];le.call(this);this._code=a;a=new tf;a.setPadding(5);a.set_gap(5);this.set_layout(a);this._selected=null;this._addbt=new Qc("addbt",m(this,this.addActionBlock),null,va.getBitmapData("btPlus"));this._addbt.set_toolTip(k.ln.get("acblock-addbt"))};
t["com.tilbuci.ui.component.BlockArea"]=dt;dt.__name__="com.tilbuci.ui.component.BlockArea";dt.__super__=le;dt.prototype=I(le.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=Fa.jsonParse("[ ]"),this.addChild(this._addbt),!0;N.trim(U.substr(this._code.get_text(),0,1))!="["&&this._code.set_text("["+N.trim(this._code.get_text())+"]");this._json=Fa.jsonParse(this._code.get_text());
if(this._json==0)return!1;for(var a=0,b=0,c=u.fields(this._json);b<c.length;){var d=c[b];++b;this.addAction(new Ml(u.field(this._json,d)),a);++a}this.addChild(this._addbt);return!0},addAction:function(a,b){a=new vi(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 Fa.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 vi(new Ml(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 vi(new Ml(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__:dt});var Ml=function(a){this.param=[];this.color=0;this.ac="";Object.prototype.hasOwnProperty.call(a,"ac")&&(this.ac=
u.field(a,"ac"));Object.prototype.hasOwnProperty.call(a,"param")&&(this.param=u.field(a,"param"));var b=new H;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=u.field(a,g);b=0;for(var n=u.fields(h);b<n.length;){var l=n[b];++b;l=new Ml(u.field(h,l));l.ac!=""?
this.extras.h[g].push(l):l.kill()}}}};t["com.tilbuci.ui.component.BlockAction"]=Ml;Ml.__name__="com.tilbuci.ui.component.BlockAction";Ml.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 Fa.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__:Ml};var ai=function(){};t["feathers.core.IStageFocusDelegate"]=ai;ai.__name__="feathers.core.IStageFocusDelegate";ai.__isInterface__=!0;ai.__interfaces__=[od];ai.prototype={get_stageFocusTarget:null,__class__:ai,__properties__:{get_stageFocusTarget:"get_stageFocusTarget"}};var wi=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 Nl(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 Ha;this._measurementTextLineModel=new Nl("a",5);this._lineDelimiter=null;this.defaultLineDelimiter="\n";Py.initialize();da.call(this);this._readOnly=b;this._readOnly||(this._editMananger=new kx(this),this._undoManager=new lx(this));this._clipboardMananger=new mx(this);this._selectionMananger=new Eh(this);this._colorManager=new kp(this);
this._findReplaceManager=new nx(this);this.createContextMenu();this.set_text(a);this.addEventListener(Ld.TEXT_CHANGE,m(this,this.textEditor_textChangeHandler));this.addEventListener("focusIn",m(this,this.textEditor_focusInHandler))};t["moonshine.editor.text.TextEditor"]=wi;wi.__name__="moonshine.editor.text.TextEditor";wi.__interfaces__=[ai,od];wi.__super__=da;wi.prototype=I(da.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 Xa("\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 Nl(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 fg(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(y.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(y.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(y.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(y.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(y.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=U.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+U.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=Md.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(y.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(y.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(y.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(y.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(y.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(y.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(y.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(y.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=x.__cast(this._listView.itemToItemRenderer(d),bi);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 pb("Toggle line comment not allowed on read-only text editor");this._editMananger.toggleLineComment()},toggleBlockComment:function(){if(this.get_readOnly())throw new pb("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,v=this._expandedCaretCharIndex,w=!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,w=!0):(this._selectionStartLineIndex!=a&&(this._selectionStartLineIndex=a,w=!0),this._selectionStartCharIndex!=b&&(this._selectionStartCharIndex=b,w=!0),this._selectionEndLineIndex!=c&&(this._selectionEndLineIndex=c,w=!0),this._selectionEndCharIndex!=d&&(this._selectionEndCharIndex=d,w=!0));this._caretLineIndex!=c&&(this._caretLineIndex=c,w=!0);a=f?this.expandCaretCharIndex(d):d;this._expandedCaretCharIndex!=a&&(this._expandedCaretCharIndex=a,w=!0);w&&(this.forceUpdateRangeDiff(g!=-1?g:q,h!=-1?
h:v,n!=-1?n:q,l!=-1?l:v,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 Ol(Ol.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 pb("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 pb("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=x.__cast(this._listView.itemToItemRenderer(c),bi);if(g!=null){a=g.getCharBoundaries(a.character);if(a==null)return null;d=a.x;f=a.width}else if(c=new Pl(c,b,!1,c.text),g=this.createTextLineRenderer(),this.updateTextLineRenderer(g,c),La.get_current().stage.addChild(g),g.validateNow(),a=g.getCharBoundaries(a.character),
a!=null&&(d=a.x,f=a.width),this.resetTextLineRenderer(g,c),La.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 Ha(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=x.__cast(this._listView.itemToItemRenderer(d),
bi);if(f!=null){b=f.getCharBoundaries(a.character);if(b==null)return null;c=b.x}else if(d=new Pl(d,b,!1,d.text),f=this.createTextLineRenderer(),this.updateTextLineRenderer(f,d),La.get_current().stage.addChild(f),f.validateNow(),b=f.getCharBoundaries(a.character),b!=null&&(c=b.x),this.resetTextLineRenderer(f,d),La.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 Ca(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=x.__cast(this._listView.itemToItemRenderer(d),bi);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 Pl(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 Ln(c,d.text.length):new Ln(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 Ln(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 Fh,this._layout.set_contentJustify(!this._wordWrap));this._listView==null&&(this._listView=new ft,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(Me.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?Md.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 x.__cast(this._listView.indexToItemRenderer(a),bi)},createTextLineRenderer:function(){return this._textLineRendererFactory!=null?x.__cast(this._textLineRendererFactory.create(),bi):new bi},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=x.__cast(b.data,Nl);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(y.DATA),this._listView.setInvalid(y.LAYOUT))},forceUpdateRangeDiff:function(a,b,c,d,f,g,h,n,l){l==null&&(l=!1);var q=this._lines.get_length()-1,v=a,w=b,z=c,r=d;a>c&&(v=c,w=d,z=a,r=b);a=f;b=g;c=h;d=n;f>h&&(a=h,b=n,c=f,d=g);f=v;g=w;v>a&&(f=a,g=b);h=z;n=r;z<c&&(h=c,n=d);for(var G=f,J=h+1;G<J;){var L=G++;if(L>q)break;if(L<v||L<a||L>z||L>c)l?this._lines.updateAt(L):this.updateLineAtIndex(L);else{if(L==f){if(L==v&&g!=w||L==a&&g!=b){l?this._lines.updateAt(L):this.updateLineAtIndex(L);
continue}}else if(L==v||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 bi?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(y.DATA),b=this.isInvalid(y.SCROLL),c=this.isInvalid(y.STYLES);this._parser==null&&(this._parser=new Mn);this._textStyles==null&&(this._textStyles=(new ox).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 pb("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;Kd.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(y.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(y.DATA)},textEditor_lines_updateAllHandler:function(a){this.setInvalid(y.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(y.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(y.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(y.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(y.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(y.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(y.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(y.STYLES);return this.__highlightAllFindResults},clearStyle_highlightAllFindResults:function(){this.set_highlightAllFindResults(!1);return this.get_highlightAllFindResults()},get_styleContext:function(){return wi},__class__:wi,__properties__:I(da.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 jp=function(a){var b=this;wi.call(this);this.set_layoutData(new ih);this._fontSettings=new Nn;this._colorSettings=rj.monokai();var c=new Qd,d=null,f=null,g=null;switch(a){case "css":this._tparser=new yb;g=new px;g.setFontSettings(this._fontSettings);g.setColorSettings(this._colorSettings);c=g.build();d=[["{","}"],["[","]"],["(",")"]];f=[new Xi("{","}"),new Xi("[","]"),new Xi("(",")"),new Xi("'","'"),new Xi('"','"')];g=
["/*","*/"];this.brackets=d;this.autoClosingPairs=f;this.lineComment=null;this.blockComment=g;this.setParserAndTextStyles(this._tparser,c);break;case "js":this._tparser=new $c,a=new qx,a.setFontSettings(this._fontSettings),a.setColorSettings(this._colorSettings),c=a.build(),d=[["{","}"],["[","]"],["(",")"]],f=[new Xi("{","}"),new Xi("[","]"),new Xi("(",")"),new Xi("'","'"),new Xi('"','"'),new Xi("`","`")],this.brackets=d,this.autoClosingPairs=f,this.lineComment=null,this.blockComment=g,this.setParserAndTextStyles(this._tparser,
c)}this.set_backgroundSkin(new ab(vb.SolidColor(this._colorSettings.backgroundColor)));this.set_textLineRendererFactory(Ql.fromFunction(function(){var h=new bi;h.set_backgroundSkin(new ab(vb.SolidColor(b._colorSettings.backgroundColor)));h.set_gutterBackgroundSkin(new ab(vb.SolidColor(b._colorSettings.backgroundColor)));h.set_focusedBackgroundSkin(new ab(vb.SolidColor(b._colorSettings.focusedLineBackgroundColor)));h.set_debuggerStoppedBackgroundSkin(new ab(vb.SolidColor(b._colorSettings.backgroundColor)));
h.set_searchResultBackgroundSkinFactory(function(){return new ab(vb.SolidColor(b._colorSettings.searchResultBackgroundColor))});return h}))};t["com.tilbuci.ui.component.CodeArea"]=jp;jp.__name__="com.tilbuci.ui.component.CodeArea";jp.__super__=wi;jp.prototype=I(wi.prototype,{_tparser:null,_fontSettings:null,_colorSettings:null,__class__:jp});var gt=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"]=gt;gt.__name__="com.tilbuci.ui.component.ColorPanel";gt.__super__=
ze;gt.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(F.parseInt("0x"+U.substr(a,-6,2)));this.ui.numerics.h.green.set_value(F.parseInt("0x"+U.substr(a,-4,2)));this.ui.numerics.h.blue.set_value(F.parseInt("0x"+U.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",Fa.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 Ec(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__:gt});var nr=function(a){Tc.call(this);this._acCenter=
a;a=new tf;a.set_gap(0);a.setPadding(0);a.set_verticalAlign(fc.TOP);a.set_horizontalAlign(Vb.CENTER);this.set_layout(a);this._div=new Zh;this._div.set_layoutData(cd.fill());this._div.liveDragging=!1;this.addChild(this._div);a=new ab;a.set_fill(vb.SolidColor(13421772));var b=new Ni;this._top=new qb;this._top.set_layout(b);this._top.set_layoutData(cd.fill());this._top.set_backgroundSkin(a);this._div.addChild(this._top);a=new ab;a.set_fill(vb.SolidColor(10066329));b=new Cg;b.set_gap(10);b.setPadding(10);
b.set_verticalAlign(fc.MIDDLE);b.set_horizontalAlign(Vb.CENTER);this._bottom=new qb;this._bottom.set_layout(b);this._bottom.set_layoutData(cd.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 zc;this.ui.createIconButton("play",m(this,this.onPlay),new Oa(va.getBitmapData("btPlay")),null,this._bottom);this.ui.createSpacer("play",10,!1,this._bottom);this.ui.createIconButton("screen",
m(this,this.onScreen),new Oa(va.getBitmapData("btScreen")),null,this._bottom);this.ui.createSpacer("screen",10,!1,this._bottom);this.ui.createIconButton("close",m(this,this.onClose),new Oa(va.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"]=nr;nr.__name__="com.tilbuci.ui.component.EditorPlayback";nr.__super__=Tc;nr.prototype=I(Tc.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?Ec.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 Oa(va.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 Ec(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 Oa(va.getBitmapData("btPlay")))):(p.mode="editorplayerwait",p.area.play(),this.ui.buttons.h.play.set_icon(new Oa(va.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();zd.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__:nr});var ht=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"},v={tp:"Label",id:"blur",tx:k.ln.get("rightbar-filter-blur"),vr:""},w={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:""},G={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"},P={tp:"Label",id:"dsalpha",tx:k.ln.get("rightbar-filter-dsalpha"),vr:"detail"},V={tp:"Label",
id:"dsblurx",tx:k.ln.get("rightbar-filter-dsblurx"),vr:"detail"},ia={tp:"Label",id:"dsblury",tx:k.ln.get("rightbar-filter-dsblury"),vr:"detail"},ea={tp:"Label",id:"dsstrength",tx:k.ln.get("rightbar-filter-dsstrength"),vr:"detail"},ra=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},v,{tp:"Toggle",id:"blur",vl:!1,ch:m(this,this.changeProperties)},w,{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)},G,{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},P,{tp:"Numeric",id:"dsalpha",mn:0,mx:100,st:1,vl:0,ch:m(this,this.changeProperties)},V,{tp:"Numeric",id:"dsblurx",mn:0,mx:100,st:1,vl:0,ch:m(this,this.changeProperties)},ia,{tp:"Numeric",id:"dsblury",mn:0,mx:100,st:1,vl:0,ch:m(this,
this.changeProperties)},ea,{tp:"Numeric",id:"dsstrength",mn:0,mx:255,st:1,vl:0,ch:m(this,this.changeProperties)},{tp:"Label",id:"dsinner",tx:ra,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"]=ht;ht.__name__="com.tilbuci.ui.component.FilterPanel";ht.__super__=ze;ht.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(F.parseInt(a[0]));this.ui.numerics.h.blury.set_value(F.parseInt(a[1]));a=this._current.getCurrentArr("dropshadow");this.ui.numerics.h.dsdistance.set_value(F.parseInt(a[0]));this.ui.numerics.h.dsangle.set_value(F.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(F.parseInt(a[4]));this.ui.numerics.h.dsblury.set_value(F.parseInt(a[5]));
this.ui.numerics.h.dsstrength.set_value(F.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(F.parseInt(a[2])-6);this.ui.numerics.h.glstrength.set_value(F.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",[F.string(this.ui.numerics.h.blurx.get_value()),F.string(this.ui.numerics.h.blury.get_value())]);
a=N.replace(this.ui.inputs.h.dscolor.get_text(),"#","0x");a=F.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",[F.string(this.ui.numerics.h.dsdistance.get_value()),F.string(this.ui.numerics.h.dsangle.get_value()),a,F.string(this.ui.numerics.h.dsalpha.get_value()/100),F.string(this.ui.numerics.h.dsblurx.get_value()),F.string(this.ui.numerics.h.dsblury.get_value()),
F.string(this.ui.numerics.h.dsstrength.get_value()),b]);a=N.replace(this.ui.inputs.h.glcolor.get_text(),"#","0x");a=F.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,F.string(this.ui.numerics.h.glalpha.get_value()/100),F.string(this.ui.numerics.h.glblur.get_value()+6),F.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 Ec(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__:ht});var it=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"]=it;it.__name__="com.tilbuci.ui.component.HistoryPanel";it.__super__=ze;it.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__:it});var Qc=function(a,b,c,d,f){f==null&&(f=!0);a==null&&(a="");this._ac=null;this.autoResize=!0;Wb.call(this);this.btid=a;this.autoResize=f;c!=null&&this.set_text(c);d!=null&&(a=new Oa(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"]=
Qc;Qc.__name__="com.tilbuci.ui.component.IDButton";Qc.__super__=Wb;Qc.prototype=I(Wb.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__:Qc});var fa=function(a){a==null&&(a="");this.__backgroundSkin=this.__disabledBackgroundSkin=null;this.__wordWrap=!1;this.__verticalAlign=fc.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();da.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"]=fa;fa.__name__="feathers.controls.Label";fa.__interfaces__=[ai,od,Kl,te];fa.__super__=da;fa.prototype=I(da.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(y.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(y.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(y.SELECTION);return this._selectable},get_tabEnabled:function(){return this._selectable&&this._enabled?this.get_rawTabEnabled():!1},get_focusEnabled:function(){return this._selectable?da.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(){Ow.initialize()},initialize:function(){da.prototype.initialize.call(this);
this.textField==null&&(this.textField=new Ic,this.textField.set_multiline(!0),this.addChild(this.textField))},update:function(){var a=this.isInvalid(y.DATA),b=this.isInvalid(y.SELECTION),c=this.isInvalid(y.SIZE),d=this.isInvalid(y.STATE),f=this.isInvalid(y.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;x.__implements(this._currentBackgroundSkin,tb)&&(h=this._currentBackgroundSkin);x.__implements(this._currentBackgroundSkin,
ba)&&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:(x.__implements(a,Ea)&&a.initializeNow(),this._backgroundSkinMeasurements==null?this._backgroundSkinMeasurements=new Sb(a):this._backgroundSkinMeasurements.save(a),x.__implements(a,sb)&&a.set_uiContext(this),this.addChildAt(a,0))},removeCurrentBackgroundSkin:function(a){a!=null&&(x.__implements(a,sb)&&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),x.__implements(this._currentBackgroundSkin,ba)&&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(y.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(y.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(y.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(y.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(y.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(y.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(y.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(y.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(y.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(y.STYLES);return this.__verticalAlign},clearStyle_verticalAlign:function(){this.set_verticalAlign(fc.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(y.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(y.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(y.STYLES);return this.__disabledBackgroundSkin},clearStyle_disabledBackgroundSkin:function(){this.set_disabledBackgroundSkin(null);return this.get_disabledBackgroundSkin()},
get_styleContext:function(){return fa},__class__:fa,__properties__:I(da.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 ip=function(){this.autoResize=!0;fa.call(this)};t["com.tilbuci.ui.component.IDLabel"]=ip;ip.__name__="com.tilbuci.ui.component.IDLabel";ip.__super__=fa;ip.prototype=I(fa.prototype,{autoResize:null,__class__:ip});
var xi=function(){};t["feathers.core.IDataSelector"]=xi;xi.__name__="feathers.core.IDataSelector";xi.__isInterface__=!0;xi.prototype={get_selectedItem:null,set_selectedItem:null,__class__:xi,__properties__:{set_selectedItem:"set_selectedItem",get_selectedItem:"get_selectedItem"}};var sj=function(){};t["feathers.core.IIndexSelector"]=sj;sj.__name__="feathers.core.IIndexSelector";sj.__isInterface__=!0;sj.prototype={get_selectedIndex:null,set_selectedIndex:null,get_maxSelectedIndex:null,__class__:sj,
__properties__:{get_maxSelectedIndex:"get_maxSelectedIndex",set_selectedIndex:"set_selectedIndex",get_selectedIndex:"get_selectedIndex"}};var lp=function(){};t["feathers.dragDrop.IDropTarget"]=lp;lp.__name__="feathers.dragDrop.IDropTarget";lp.__isInterface__=!0;lp.__interfaces__=[Fb];var jt=function(){};t["feathers.dragDrop.IDragSource"]=jt;jt.__name__="feathers.dragDrop.IDragSource";jt.__isInterface__=!0;jt.__interfaces__=[Fb];var Pl=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"]=Pl;Pl.__name__="feathers.data.ListViewItemState";Pl.prototype={owner:null,data:null,index:null,selected:null,text:null,enabled:null,recyclerID:null,__class__:Pl};var Dc=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=Dc.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 Yi(0,0);this._visibleIndices=new Yi(0,0);this._virtualCache=[];this._unrenderedData=[];this.itemStatePool=
new dc(function(){return new Pl});this.itemRendererToItemState=new Ta;this.stringDataToItemRenderer=new H;this.objectDataToItemRenderer=new Ta;this._additionalStorage=null;this._defaultStorage=new kt(null,Me.withClass(Rc));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();Bb.call(this);this.set_dataProvider(a);this.set_tabEnabled(!0);this.focusRect=null;this.get_viewPort()==null&&(this.listViewPort=new $k,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"]=Dc;Dc.__name__="feathers.controls.ListView";Dc.__interfaces__=[lp,jt,rg,xi,sj];Dc.defaultUpdateItemRenderer=function(a,
b){x.__implements(a,te)&&a.set_text(b.text)};Dc.defaultResetItemRenderer=function(a,b){x.__implements(a,te)&&a.set_text(null)};Dc.__super__=Bb;Dc.prototype=I(Bb.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(y.DATA);X.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(y.SELECTION),X.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(y.SELECTION);X.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(y.SELECTION);X.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(y.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(y.SELECTION);X.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(y.SELECTION);X.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(Dc.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(y.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(Dc.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(y.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=Dc.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 F.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(y.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 H);b==null?(b=this._recyclerMap,Object.prototype.hasOwnProperty.call(b.h,a)&&delete b.h[a]):(this._recyclerMap.h[a]=b,this.setInvalid(Dc.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 Pl;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);Bb.prototype.dispose.call(this)},initializeListViewTheme:function(){Qw.initialize()},
update:function(){var a=this.isInvalid(y.LAYOUT),b=this.isInvalid(y.STYLES);this._previousCustomItemRendererVariant!=this.get_customItemRendererVariant()&&this.setInvalidationFlag(Dc.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();Bb.prototype.update.call(this);this._previousCustomItemRendererVariant=this.get_customItemRendererVariant();this.handlePendingScroll()},createScroller:function(){Bb.prototype.createScroller.call(this);this.listViewPort.set_scroller(this.scroller)},refreshScrollerValues:function(){Bb.prototype.refreshScrollerValues.call(this);
if(x.__implements(this.get_layout(),gf)){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&&x.__implements(this.get_layout(),ci)){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=Dc.defaultUpdateItemRenderer,this._defaultStorage.itemRendererRecycler.reset==null&&(this._defaultStorage.itemRendererRecycler.reset=Dc.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=Dc.defaultUpdateItemRenderer,f.reset==null&&(f.reset=Dc.defaultResetItemRenderer))}}a=this.listViewPort.isInvalid(Dc.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=x.getClass(this),new pb(""+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=x.getClass(this),new pb(""+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=x.getClass(this),new pb(""+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&&x.__implements(this.get_layout(),ci)){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(!U.remove(l.inactiveItemRenderers,f))throw b=x.getClass(this),new pb(""+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,Dc.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;x.__implements(a,Ea)&&a.set_enabled(b.enabled);x.__implements(a,Gh)&&a.set_data(b.data);x.__implements(a,mp)&&(a.set_index(b.index),
a.set_listViewOwner(b.owner));x.__implements(a,yi)&&a.set_layoutIndex(b.index);x.__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(x.__implements(c,kd)){var d=c;if(d.get_variant()==null){var f=this.get_customItemRendererVariant()!=null?this.get_customItemRendererVariant():Dc.CHILD_VARIANT_ITEM_RENDERER;d.set_variant(f)}}x.__implements(c,Ea)&&c.initializeNow();b.measurements==null&&(b.measurements=new Sb(c))}else c=b.inactiveItemRenderers.shift();this.updateItemRenderer(c,a,b);x.__implements(c,Xh)?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)));x.__implements(c,ud)&&c.addEventListener("change",m(this,this.listView_itemRenderer_changeHandler));x.__implements(c,tb)&&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 pb('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 kt(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(x.__implements(this.get_layout(),gf))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&&x.__implements(this.get_layout(),tj)){x.__implements(this.get_dragDropIndicatorSkin(),Ea)&&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=x.__cast(a.currentTarget,ka);b=this.itemRendererToItemState.h[b.__id__];di.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=x.__cast(a.currentTarget,ka);b=this.itemRendererToItemState.h[b.__id__];
di.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=x.__cast(a.currentTarget,ka);b=this.itemRendererToItemState.h[b.__id__];di.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(y.LAYOUT)},
listView_itemRenderer_changeHandler:function(a){if(!this._ignoreSelectionChange){var b=x.__cast(a.currentTarget,ka);a=x.__cast(b,ud);b=this.itemRendererToItemState.h[b.__id__];a.get_selected()!=b.selected&&this.setInvalid(y.SELECTION)}},listView_itemRenderer_mouseDownHandler:function(a){if(this._enabled&&this._dragEnabled&&this.stage!=null){a=x.__cast(a.currentTarget,ka);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=
x.__cast(a.currentTarget,dd);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 lt;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());gb.startDrag(this,b,d,-this._dragItemRenderer.get_mouseX(),-this._dragItemRenderer.get_mouseY())}},listView_stage_pressAndMove_mouseUpHandler:function(a){a=x.__cast(a.currentTarget,dd);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=x.__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=La.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=La.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=x.__cast(a.dragData.get(this._dragFormat),Array),c=this._dataProvider.get_length();if(x.__implements(this.get_layout(),tj)){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(y.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],X.dispatch(this,"change"))}},listView_dataProvider_removeItemHandler:function(a){this._virtualCache!=null&&U.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),X.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];
X.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(y.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(y.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(x.__implements(this.get_layout(),Sj)){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=x.__cast(this.get_layout(),Sj).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(x.__implements(this.get_layout(),gf)){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
Ic&&this.stage.get_focus().get_type()==1||this.navigateWithKeyboard(a)):Bb.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);di.dispatch(this,"itemTrigger",a);b&&this.itemStatePool.release(a)}},get_styleContext:function(){return Dc},__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(y.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(y.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(y.STYLES);return this.__dragDropIndicatorSkin},clearStyle_dragDropIndicatorSkin:function(){this.set_dragDropIndicatorSkin(null);
return this.get_dragDropIndicatorSkin()},__class__:Dc,__properties__:I(Bb.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 fe=function(a,b){this._previousCustomButtonVariant=this._previousCustomListViewVariant=this.__popUpAdapter=this.__customButtonVariant=this.__customListViewVariant=null;this._itemRendererRecycler=Me.withClass(Rc);this._selectedItem=null;this._selectedIndex=-1;this._ignoreListViewChange=!1;this.buttonMeasurements=
new Sb;this.initializePopUpListViewTheme();da.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"]=fe;fe.__name__="feathers.controls.PopUpListView";fe.__interfaces__=[ai,xi,sj];fe.__super__=da;fe.prototype=I(da.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(y.SELECTION),X.dispatch(this,"change");this.setInvalid(y.DATA);X.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(y.SELECTION);X.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(y.SELECTION);X.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(y.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(y.DATA);return this._itemRendererRecycler},itemToText:function(a){return F.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(fe.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(fe.INVALIDATION_FLAG_LIST_VIEW_FACTORY);return this._listViewFactory},get_open:function(){return this.listView!=
null?this.listView.parent!=null:!1},showFocus:function(a){da.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),X.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),X.dispatch(this,"close"))}},dispose:function(){this.destroyButton();this.destroyListView();this._selectedItem=null;this._selectedIndex=-1;this.set_dataProvider(null);da.prototype.dispose.call(this)},initializePopUpListViewTheme:function(){Uw.initialize()},update:function(){var a=this.isInvalid(y.DATA),b=this.isInvalid(y.SELECTION),
c=this.isInvalid(y.STATE);this._previousCustomButtonVariant!=this.get_customButtonVariant()&&this.setInvalidationFlag(fe.INVALIDATION_FLAG_BUTTON_FACTORY);this._previousCustomListViewVariant!=this.get_customListViewVariant()&&this.setInvalidationFlag(fe.INVALIDATION_FLAG_LIST_VIEW_FACTORY);var d=this.isInvalid(fe.INVALIDATION_FLAG_BUTTON_FACTORY),f=this.isInvalid(fe.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:fe.defaultButtonFactory;this._oldButtonFactory=a;this.button=a.create();this.button.get_variant()==null&&this.button.set_variant(this.get_customButtonVariant()!=null?this.get_customButtonVariant():fe.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:fe.defaultListViewFactory;this._oldListViewFactory=a;
this.listView=a.create();this.listView.get_variant()==null&&this.listView.set_variant(this.get_customListViewVariant()!=null?this.get_customListViewVariant():fe.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(y.SELECTION),X.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()||Je.__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()||
Je.__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){X.dispatch(this,"open")},popUpListView_popUpAdapter_closeHandler:function(a){X.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(y.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(y.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(y.STYLES);return this.__customListViewVariant},clearStyle_customListViewVariant:function(){this.set_customListViewVariant(null);return this.get_customListViewVariant()},get_styleContext:function(){return fe},__class__:fe,__properties__:I(da.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 ct=function(){this.autoResize=!0;fe.call(this)};t["com.tilbuci.ui.component.IDPopUpListView"]=
ct;ct.__name__="com.tilbuci.ui.component.IDPopUpListView";ct.__super__=fe;ct.prototype=I(fe.prototype,{autoResize:null,__class__:ct});var Zd=function(a){this.__topArrowGap=this.__rightArrowGap=this.__bottomArrowGap=this.__leftArrowGap=0;this.__backgroundSkin=this.__topArrowSkin=this.__rightArrowSkin=this.__bottomArrowSkin=this.__leftArrowSkin=null;this.__arrowPosition=pa.TOP;this.__verticalAlign=fc.MIDDLE;this.__horizontalAlign=Vb.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();da.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"]=Zd;Zd.__name__="feathers.controls.Callout";Zd.show=function(a,
b,c,d,f){d==null&&(d=!0);var g=new Zd;g.set_content(a);return Zd.showCallout(g,b,c,d,f)};Zd.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};Zd.positionBelowOrigin=function(a,b){a.measureWithArrowPosition(pa.TOP);var c=Aa.forStage(a.stage).get_root(),d=new Ca;d=c.globalToLocal(d);
var f=new Ca(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(pa.TOP)};Zd.positionAboveOrigin=function(a,b){a.measureWithArrowPosition(pa.BOTTOM);var c=Aa.forStage(a.stage).get_root(),d=new Ca;
d=c.globalToLocal(d);var f=new Ca(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(pa.BOTTOM)};Zd.positionLeftOfOrigin=function(a,b){a.measureWithArrowPosition(pa.RIGHT);var c=Aa.forStage(a.stage).get_root(),
d=new Ca;d=c.globalToLocal(d);var f=new Ca(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(pa.RIGHT)};Zd.positionRightOfOrigin=function(a,b){a.measureWithArrowPosition(pa.RIGHT);var c=
Aa.forStage(a.stage).get_root(),d=new Ca;d=c.globalToLocal(d);var f=new Ca(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(pa.LEFT)};Zd.__super__=da;Zd.prototype=I(da.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),x.__implements(this._content,Ea)&&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(y.DATA);this.setInvalid(y.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 Db("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(Zd.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);da.prototype.dispose.call(this)},initializeCalloutTheme:function(){Cw.initialize()},
update:function(){var a=this.isInvalid(y.DATA),b=this.isInvalid(Zd.INVALIDATION_FLAG_ORIGIN),c=this.isInvalid(y.SIZE),d=this.isInvalid(y.STATE),f=this.isInvalid(y.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 Ca,g=this.globalToLocal(g),n=new Ca(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;x.__implements(this._currentBackgroundSkin,tb)&&(n=this._currentBackgroundSkin);x.__implements(this._currentBackgroundSkin,
ba)&&this._currentBackgroundSkin.validateNow();x.__implements(this.get_topArrowSkin(),ba)&&this.get_topArrowSkin().validateNow();x.__implements(this.get_rightArrowSkin(),ba)&&this.get_rightArrowSkin().validateNow();x.__implements(this.get_bottomArrowSkin(),ba)&&this.get_bottomArrowSkin().validateNow();x.__implements(this.get_leftArrowSkin(),ba)&&this.get_leftArrowSkin().validateNow();var l=0,q=0,v=0,w=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:v=this.get_bottomArrowSkin().get_width();w=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:v=this.get_topArrowSkin().get_width(),w=this.get_topArrowSkin().get_height()+this.get_topArrowGap()}a=null;x.__implements(this._content,tb)&&(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()-w-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()-
w-this.get_paddingLeft()-this.get_paddingRight():null,g!=null?g-l-this.get_paddingLeft()-this.get_paddingRight():null,h!=null?h-w-this.get_paddingLeft()-this.get_paddingRight():null);x.__implements(this._content,ba)&&this._content.validateNow();this._ignoreContentResize=z}z=this.get_explicitWidth();b&&(b=0,this._content!=null&&(b=this._content.get_width()),b<v&&(b=v),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+=w);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<v&&(d=v),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+=w,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:(x.__implements(a,Ea)&&a.initializeNow(),this._backgroundSkinMeasurements==null?this._backgroundSkinMeasurements=new Sb(a):this._backgroundSkinMeasurements.save(a),x.__implements(a,sb)&&a.set_uiContext(this),this.addChildAt(a,0))},removeCurrentBackgroundSkin:function(a){a!=null&&(x.__implements(a,sb)&&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),x.__implements(this._currentArrowSkin,sb)&&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&&(x.__implements(a,sb)&&a.set_uiContext(null),a.parent==this&&this.removeChild(a))},refreshEnabled:function(){x.__implements(this._content,Ea)&&this._content.set_enabled(this._enabled)},layoutChildren:function(){x.__implements(this._currentArrowSkin,ba)&&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()==fc.MIDDLE?f+=Math.round((g-this.get_rightArrowSkin().get_height())/2):this.get_verticalAlign()==fc.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()==Vb.CENTER?g+=Math.round((f-this.get_bottomArrowSkin().get_width())/2):this.get_horizontalAlign()==Vb.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()==fc.MIDDLE?f+=Math.round((g-this.get_leftArrowSkin().get_height())/2):this.get_verticalAlign()==fc.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()==
Vb.CENTER?g+=Math.round((f-this.get_topArrowSkin().get_width())/2):this.get_horizontalAlign()==Vb.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()),x.__implements(this._content,ba)&&this._content.validateNow(),this._ignoreContentResize=a)},checkForOriginMoved:function(){if(this._origin==null)return this._lastPopUpOriginBounds==null?this._lastPopUpOriginBounds=new Ha:this._lastPopUpOriginBounds.setEmpty(),!1;var a=Aa.forStage(this.stage).get_root(),
b=new Ca(this.get_origin().get_x(),this.get_origin().get_y());b=this.get_origin().parent.localToGlobal(b);b=a.globalToLocal(b);var c=new Ca(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 Ha(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 Ca(this.stage.stageWidth,this.stage.stageHeight);b=a.globalToLocal(b);var c=a=-Infinity,d=-Infinity,f=-Infinity,g=this.supportedPositions;g==null&&(g=[pa.BOTTOM,pa.TOP,pa.RIGHT,pa.LEFT]);for(var h=0;h<g.length;){var n=g[h];++h;switch(n._hx_index){case 0:this.measureWithArrowPosition(pa.BOTTOM);a=this._lastPopUpOriginBounds.y-this.actualHeight;if(a>=this.get_marginTop()){Zd.positionAboveOrigin(this,this._lastPopUpOriginBounds);return}a<0&&(a=0);break;
case 1:this.measureWithArrowPosition(pa.LEFT);d=b.x-this.actualWidth-(this._lastPopUpOriginBounds.x+this._lastPopUpOriginBounds.width);if(d>=this.get_marginRight()){Zd.positionRightOfOrigin(this,this._lastPopUpOriginBounds);return}d<0&&(d=0);break;case 3:this.measureWithArrowPosition(pa.RIGHT);f=this._lastPopUpOriginBounds.x-this.actualWidth;if(f>=this.get_marginLeft()){Zd.positionLeftOfOrigin(this,this._lastPopUpOriginBounds);return}f<0&&(f=0);break;default:this.measureWithArrowPosition(pa.TOP);
c=b.y-this.actualHeight-(this._lastPopUpOriginBounds.y+this._lastPopUpOriginBounds.height);if(c>=this.get_marginBottom()){Zd.positionBelowOrigin(this,this._lastPopUpOriginBounds);return}c<0&&(c=0)}}c!=-Infinity&&c>=a&&c>=d&&c>=f?Zd.positionBelowOrigin(this,this._lastPopUpOriginBounds):a!=-Infinity&&a>=d&&a>=f?Zd.positionAboveOrigin(this,this._lastPopUpOriginBounds):d!=-Infinity&&d>=f?Zd.positionRightOfOrigin(this,this._lastPopUpOriginBounds):f!=-Infinity?Zd.positionLeftOfOrigin(this,this._lastPopUpOriginBounds):
Zd.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));X.dispatch(this,"close")},callout_enterFrameHandler:function(a){this.checkForOriginMoved()&&this.setInvalid(Zd.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(y.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(y.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(y.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(y.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(y.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(y.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(y.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(y.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(y.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(y.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(y.STYLES);
return this.__horizontalAlign},clearStyle_horizontalAlign:function(){this.set_horizontalAlign(Vb.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(y.STYLES);return this.__verticalAlign},clearStyle_verticalAlign:function(){this.set_verticalAlign(fc.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(y.STYLES);return this.__arrowPosition},clearStyle_arrowPosition:function(){this.set_arrowPosition(pa.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(y.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(y.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(y.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(y.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(y.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(y.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(y.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(y.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(y.STYLES);return this.__leftArrowGap},clearStyle_leftArrowGap:function(){this.set_leftArrowGap(0);return this.get_leftArrowGap()},get_styleContext:function(){return Zd},__class__:Zd,__properties__:I(da.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();Zd.call(this);this.set_text(a)};t["feathers.controls.TextCallout"]=Ye;Ye.__name__="feathers.controls.TextCallout";Ye.__interfaces__=[Kl,te];Ye.show=function(a,b,c,d){d==null&&(d=!0);a=new Ye(a);return x.__cast(Zd.showCallout(a,b,c,d),Ye)};Ye.__super__=Zd;Ye.prototype=I(Zd.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(y.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(y.DATA);return this._htmlText},get_baseline:function(){return this.label==null?0:this.label.get_y()+this.label.get_baseline()},initializeTextCalloutTheme:function(){ax.initialize()},initialize:function(){Zd.prototype.initialize.call(this);this.label==null&&(this.label=new fa,this.addChild(this.label),
this.set_content(this.label))},update:function(){var a=this.isInvalid(y.DATA),b=this.isInvalid(y.STATE),c=this.isInvalid(y.STYLES);(c||b)&&this.refreshTextStyles();(a||c||b)&&this.refreshText();Zd.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(y.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(y.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(y.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(y.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(y.STYLES);
return this.__wordWrap},clearStyle_wordWrap:function(){this.set_wordWrap(!1);return this.get_wordWrap()},__class__:Ye,__properties__:I(Zd.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 pd=function(a,b,c){a==null&&(a="");this.__errorFocusRectSkin=this.__customErrorCalloutVariant=null;this.__autoSizeWidth=!1;this.__verticalAlign=fc.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=Ee.ENABLED;this._editable=this._selectable=!0;this.initializeTextInputTheme();da.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"]=pd;pd.__name__="feathers.controls.TextInput";pd.__interfaces__=[ai,te,Bh];pd.__super__=da;pd.prototype=I(da.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(y.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(y.STATE);return this._selectable},get_stageFocusTarget:function(){return this.textField},_currentState:null,get_currentState:function(){return this._currentState},set_enabled:function(a){da.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(y.DATA);X.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(y.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(y.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(y.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(y.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(y.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(y.SCROLL);X.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(y.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(y.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(y.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(pd.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(y.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(y.STYLES))},selectRange:function(a,b){this._pendingSelectionAnchorIndex=a;this._pendingSelectionActiveIndex=b;this.setInvalid(y.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){da.prototype.showFocus.call(this,
a);a&&this.selectRange(this._text.length,0)},dispose:function(){this.destroyErrorCallout();da.prototype.dispose.call(this)},initializeTextInputTheme:function(){bx.initialize()},initialize:function(){da.prototype.initialize.call(this);this.textField==null&&(this.textField=new Ic,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(y.DATA),b=this.isInvalid(y.SCROLL),c=this.isInvalid(y.SELECTION),d=this.isInvalid(y.SIZE),f=this.isInvalid(y.STATE),g=this.isInvalid(y.STYLES);this._previousCustomErrorCalloutVariant!=this.get_customErrorCalloutVariant()&&this.setInvalidationFlag(pd.INVALIDATION_FLAG_ERROR_CALLOUT_FACTORY);var h=this.isInvalid(pd.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:(x.__implements(a,Ea)&&a.initializeNow(),this._backgroundSkinMeasurements==
null?this._backgroundSkinMeasurements=new Sb(a):this._backgroundSkinMeasurements.save(a),x.__implements(a,sb)&&a.set_uiContext(this),x.__implements(a,ge)&&a.set_stateContext(this),this.addChildAt(a,0))},removeCurrentBackgroundSkin:function(a){a!=null&&(x.__implements(a,sb)&&a.set_uiContext(null),x.__implements(a,ge)&&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:(x.__implements(this._currentLeftView,Ea)&&this._currentLeftView.initializeNow(),this._leftViewMeasurements==null?this._leftViewMeasurements=new Sb(this._currentLeftView):this._leftViewMeasurements.save(this._currentLeftView),x.__implements(this._currentLeftView,sb)&&this._currentLeftView.set_uiContext(this),x.__implements(this._currentLeftView,ge)&&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)),x.__implements(a,sb)&&a.set_uiContext(null),x.__implements(a,ge)&&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:(x.__implements(this._currentRightView,Ea)&&this._currentRightView.initializeNow(),this._rightViewMeasurements==null?this._rightViewMeasurements=new Sb(this._currentRightView):this._rightViewMeasurements.save(this._currentRightView),x.__implements(this._currentRightView,sb)&&this._currentRightView.set_uiContext(this),
x.__implements(this._currentRightView,ge)&&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)),x.__implements(a,sb)&&a.set_uiContext(null),x.__implements(a,ge)&&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;x.__implements(this._currentBackgroundSkin,
tb)&&(h=this._currentBackgroundSkin);x.__implements(this._currentBackgroundSkin,ba)&&this._currentBackgroundSkin.validateNow();var n=this._ignoreLeftViewResize;this._ignoreLeftViewResize=!0;var l=this._ignoreRightViewResize;this._ignoreRightViewResize=!0;var q=null;x.__implements(this._currentLeftView,tb)&&(q=this._currentLeftView);x.__implements(this._currentLeftView,ba)&&this._currentLeftView.validateNow();var v=null;x.__implements(this._currentRightView,tb)&&(v=this._currentRightView);x.__implements(this._currentRightView,
ba)&&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()),v!=null?n+=v.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),v!=null&&a<v.get_height()?a=v.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()),v!=null?b+=v.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),v!=null&&c<v.get_minHeight()?c=v.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 Ic,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()!=Ee.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()==fc.JUSTIFY)c=d;c<0&&(c=0);this.textField.set_height(c);var f=0;this._currentLeftView!=null&&(x.__implements(this._currentLeftView,ba)&&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&&(x.__implements(this._currentRightView,ba)&&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()==fc.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),x.__implements(this._currentBackgroundSkin,ba)&&this._currentBackgroundSkin.validateNow())},refreshErrorString:function(){this.errorStringCallout!=null&&(this.errorStringCallout.set_text(this._errorString),this._currentState==Ee.FOCUSED&&this.errorStringCallout.parent==null?Aa.addPopUp(this.errorStringCallout,this,!1,!1):this._currentState!=Ee.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:pd.defaultErrorCalloutFactory;this._oldErrorCalloutFactory=a;this.errorStringCallout=a.create();this.errorStringCallout.get_variant()==null&&this.errorStringCallout.set_variant(this.get_customErrorCalloutVariant()!=null?this.get_customErrorCalloutVariant():
pd.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=
Ee.DISABLED);this._currentState!=a&&(this._currentState=a,this.setInvalid(y.STATE),X.dispatch(this,"stateChange"))},getCurrentFocusRectSkin:function(){return this._errorString!=null&&this.get_errorFocusRectSkin()!=null?this.get_errorFocusRectSkin():da.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(Ee.FOCUSED):
b?this.changeState(Ee.ERROR):this.changeState(Ee.ENABLED)}else this.changeState(Ee.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(y.DATA):(this._previousMeasureText=
a,this._previousText=this._text);X.dispatch(this,"change")},textInput_textField_scrollHandler:function(a){this._scrollX=this.textField.get_scrollH();X.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(y.STYLES)},textInput_promptTextFormat_changeHandler:function(a){this.setInvalid(y.STYLES)},
textInput_leftView_resizeHandler:function(a){this._ignoreLeftViewResize||this.setInvalid(y.STYLES)},textInput_rightView_resizeHandler:function(a){this._ignoreRightViewResize||this.setInvalid(y.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(y.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(y.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(y.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(y.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(y.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(y.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(y.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(y.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(y.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(y.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(y.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(y.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(y.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(y.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(y.STYLES);return this.__verticalAlign},clearStyle_verticalAlign:function(){this.set_verticalAlign(fc.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(y.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(y.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(y.STYLES);return this.__customErrorCalloutVariant},clearStyle_customErrorCalloutVariant:function(){this.set_customErrorCalloutVariant(null);return this.get_customErrorCalloutVariant()},get_styleContext:function(){return pd},
__class__:pd,__properties__:I(da.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 bt=function(){this.autoResize=!0;pd.call(this)};t["com.tilbuci.ui.component.IDTextInput"]=bt;bt.__name__="com.tilbuci.ui.component.IDTextInput";bt.__super__=pd;bt.prototype=I(pd.prototype,{autoResize:null,__class__:bt});var mt=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=va.getBitmapData("btNone"),
d=this.ui.hcontainers.h.copybuttons;b.createIconButton("none",m(this,this.onNone),new Oa(c),null,d);b=this.ui;c=va.getBitmapData("btAll");d=this.ui.hcontainers.h.copybuttons;b.createIconButton("all",m(this,this.onAll),new Oa(c),null,d);b=this.ui;c=va.getBitmapData("btCopy");d=this.ui.hcontainers.h.copybuttons;b.createIconButton("btcopy",m(this,this.onCopy),new Oa(c),null,d);b=this.ui;c=va.getBitmapData("btPaste");d=this.ui.hcontainers.h.copybuttons;b.createIconButton("btpaste",m(this,this.onPaste),
new Oa(c),null,d);this.ui.hcontainers.h.copybuttons.set_width(a-5);this.ui.createHContainer("stage",3355443);b=this.ui;c=va.getBitmapData("btStageLeft");d=this.ui.hcontainers.h.stage;b.createIconButton("stageleft",m(this,this.onStageLeft),new Oa(c),null,d);b=this.ui;c=va.getBitmapData("btStageCenter");d=this.ui.hcontainers.h.stage;b.createIconButton("stagecenter",m(this,this.onStageCenter),new Oa(c),null,d);b=this.ui;c=va.getBitmapData("btStageRight");d=this.ui.hcontainers.h.stage;b.createIconButton("stageright",
m(this,this.onStageRight),new Oa(c),null,d);b=this.ui;c=va.getBitmapData("btStageTop");d=this.ui.hcontainers.h.stage;b.createIconButton("stagetop",m(this,this.onStageTop),new Oa(c),null,d);b=this.ui;c=va.getBitmapData("btStageMiddle");d=this.ui.hcontainers.h.stage;b.createIconButton("stagemiddle",m(this,this.onStageMiddle),new Oa(c),null,d);b=this.ui;c=va.getBitmapData("btStageBottom");d=this.ui.hcontainers.h.stage;b.createIconButton("stagebottom",m(this,this.onStageBottom),new Oa(c),null,d);this.ui.hcontainers.h.stage.set_width(a-
5);this.ui.createHContainer("selection",3355443);b=this.ui;c=va.getBitmapData("btSelectionLeft");d=this.ui.hcontainers.h.selection;b.createIconButton("selectionleft",m(this,this.onSelectionLeft),new Oa(c),null,d);b=this.ui;c=va.getBitmapData("btSelectionCenter");d=this.ui.hcontainers.h.selection;b.createIconButton("selectioncenter",m(this,this.onSelectionCenter),new Oa(c),null,d);b=this.ui;c=va.getBitmapData("btSelectionRight");d=this.ui.hcontainers.h.selection;b.createIconButton("selectionright",
m(this,this.onSelectionRight),new Oa(c),null,d);b=this.ui;c=va.getBitmapData("btSelectionTop");d=this.ui.hcontainers.h.selection;b.createIconButton("selectiontop",m(this,this.onSelectionTop),new Oa(c),null,d);b=this.ui;c=va.getBitmapData("btSelectionMiddle");d=this.ui.hcontainers.h.selection;b.createIconButton("selectionmiddle",m(this,this.onSelectionMiddle),new Oa(c),null,d);b=this.ui;c=va.getBitmapData("btSelectionBottom");d=this.ui.hcontainers.h.selection;b.createIconButton("selectionbottom",m(this,
this.onSelectionBottom),new Oa(c),null,d);this.ui.hcontainers.h.selection.set_width(a-5);this.ui.createHContainer("distribute",3355443);b=this.ui;c=va.getBitmapData("btDistributeH");d=this.ui.hcontainers.h.distribute;b.createIconButton("distributeh",m(this,this.onDistributeH),new Oa(c),null,d);b=this.ui;c=va.getBitmapData("btDistributeV");d=this.ui.hcontainers.h.distribute;b.createIconButton("distributev",m(this,this.onDistributeV),new Oa(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"),fa.VARIANT_DETAIL,this.ui.hcontainers.h.pos);this.ui.createLabel("ypos",k.ln.get("rightbar-instances-ypos"),fa.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"),fa.VARIANT_DETAIL,this.ui.hcontainers.h.size);this.ui.createLabel("ysize",k.ln.get("rightbar-instances-ysize"),fa.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},v=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:v,ac:m(this,this.onRand)}],3355443,a-5);this.ui.lists.h.ilist.set_layoutData(cd.fill());this.ui.lists.h.ilist.itemToText=function(w){return w.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"]=mt;mt.__name__="com.tilbuci.ui.component.InstancesPanel";mt.__super__=ze;mt.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 H;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=U.substr(Fa.random(),0,10);a.indexOf(f)!=-1;)f=U.substr(Fa.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 fg(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 H,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__:mt});var nt=function(){this._current=0;this._icons=[];Tc.call(this);
this.set_width(this.set_height(150));var a=new ab;a.set_fill(vb.SolidColor(0,0));this.set_backgroundSkin(a);for(a=1;a<8;){var b=a++;b=new Oa(va.getBitmapData("tilBuci0"+b));b.smoothing=!0;b.set_alpha(.5);b.set_x((150-b.get_width())/2);b.set_y((150-b.get_height())/2);this._icons.push(b)}};t["com.tilbuci.ui.component.Interacting"]=nt;nt.__name__="com.tilbuci.ui.component.Interacting";nt.__super__=Tc;nt.prototype=I(Tc.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 Ec(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__:nt});var ot=function(a){this._current=null;ze.call(this,k.ln.get("rightbar-media"),a);this.ui.createHContainer("playback",
3355443);var b=this.ui,c=va.getBitmapData("btPlay"),d=this.ui.hcontainers.h.playback;b.createIconButton("play",m(this,this.onPlay),new Oa(c),null,d);b=this.ui;c=va.getBitmapData("btPause");d=this.ui.hcontainers.h.playback;b.createIconButton("pause",m(this,this.onPause),new Oa(c),null,d);b=this.ui;c=va.getBitmapData("btStop");d=this.ui.hcontainers.h.playback;b.createIconButton("stop",m(this,this.onStop),new Oa(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:"Label",id:"focus",tx:k.ln.get("rightbar-media-focus"),vr:""},q={tp:"Button",
id:"update",tx:k.ln.get("rightbar-media-update"),ac:m(this,this.onUpdate)},v={tp:"Button",id:"cache",tx:k.ln.get("rightbar-media-cache"),ac:m(this,this.onCache)},w=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},l,{tp:"Toggle",id:"focus",vl:!0},{tp:"Spacer",id:"update",ht:5},q,{tp:"Spacer",
id:"cache",ht:10},v,{tp:"Button",id:"remove",tx:w,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"]=ot;ot.__name__="com.tilbuci.ui.component.MediaPanel";ot.__super__=ze;ot.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);a=this.ui.toggles.h.focus;b=p.movie.scene.keyframes[p.area.get_currentKf()];c=this._current.getInstName();a.set_selected(b.h[c].focus);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.ui.toggles.h.focus.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 H,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 H,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",F.string(this.ui.selects.h.collection.get_selectedItem().value)+"|:|"+F.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].focus=this.ui.toggles.h.focus.get_selected()):(a=p.movie.scene.keyframes[p.area.get_currentKf()],b=this._current.getInstName(),a.h[b].focus!=this.ui.toggles.h.focus.get_selected()?(a=p.movie.scene.keyframes[p.area.get_currentKf()],b=this._current.getInstName(),a.h[b].focus=this.ui.toggles.h.focus.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",F.string(this.ui.selects.h.collection.get_selectedItem().value)+
"|:|"+F.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",F.string(this.ui.selects.h.collection.get_selectedItem().value)+
"|:|"+F.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),this.ui.toggles.h.focus.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__:ot});var pt=function(a,b,c){c==null&&(c=500);b==null&&(b=500);da.call(this);this._type=a;this._wd=b;this._ht=c;this.set_alpha(0);switch(a){case "audio":this._audio=new xd(m(this,this.onAudio),null);this.addChild(this._audio);this.createPlayback();break;case "html":this._html=new Xo(m(this,this.onHtml));this.addChild(this._html);
break;case "picture":this._loader=new If;this._loader.contentLoaderInfo.addEventListener("complete",m(this,this.onPicture));this.addChild(this._loader);break;case "spritemap":this._spritemap=new Sk(m(this,this.onSpritemap));this.addChild(this._spritemap);break;case "video":this._video=new zn(m(this,this.onVideo),null),this.addChild(this._video),this.createPlayback()}};t["com.tilbuci.ui.component.MediaPreview"]=pt;pt.__name__="com.tilbuci.ui.component.MediaPreview";pt.__super__=da;pt.prototype=I(da.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 da;var a=new Oa(va.getBitmapData("btPlay"));a.smoothing=!0;a.set_width(a.set_height(20));var b=new Wb;b.set_icon(a);b.addEventListener("trigger",m(this,this.onPlay));
this._controls.addChild(b);a=new Oa(va.getBitmapData("btStop"));a.smoothing=!0;a.set_width(a.set_height(20));b=new Wb;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 ne(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__:pt});var Zs=function(a){this._acupd=null;Tc.call(this);this._acupd=a;a=new Cg;a.set_gap(2);a.setPadding(10);a.set_horizontalAlign(Vb.RIGHT);this.set_layout(a);a=new ab;a.set_fill(vb.SolidColor(10066329));this.set_backgroundSkin(a);this._mvIcon=
new Oa(va.getBitmapData("btMovie"));this._mvIcon.smoothing=!0;this._mvIcon.set_width(this._mvIcon.set_height(22));this._movie=new fa;this._movie.set_variant(fa.VARIANT_DETAIL);this._movie.set_text("");this._scIcon=new Oa(va.getBitmapData("btScene"));this._scIcon.smoothing=!0;this._scIcon.set_width(this._scIcon.set_height(22));this._scene=new fa;this._scene.set_variant(fa.VARIANT_DETAIL);this._scene.set_text("");this._msg=new fa;this._msg.set_text("");k.showMsg=m(this,this.showMsg);this.addEventListener("click",
m(this,this.onCallout))};t["com.tilbuci.ui.component.MovieInfoDisplay"]=Zs;Zs.__name__="com.tilbuci.ui.component.MovieInfoDisplay";Zs.__super__=Tc;Zs.prototype=I(Tc.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 Ec(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,lA.fromRelativePosition(pa.TOP))},__class__:Zs});var qt=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 Oa(va.getBitmapData("iconDown")),null,b);this.ui.createIconButton("orderup",m(this,this.onOrderUp),new Oa(va.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 Oa(va.getBitmapData("btToLeft")),null,c);this.ui.createIconButton("xcenter",m(this,this.onXCenter),new Oa(va.getBitmapData("btToCenter")),null,c);this.ui.createIconButton("xright",m(this,this.onXRight),new Oa(va.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 Oa(va.getBitmapData("btToTop")),null,d);this.ui.createIconButton("ymiddle",
m(this,this.onYMiddle),new Oa(va.getBitmapData("btToMiddle")),null,d);this.ui.createIconButton("ybottom",m(this,this.onYBottom),new Oa(va.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)},v={tp:"Button",id:"aheight",tx:k.ln.get("rightbar-properties-aheight"),cl:m(this,this.onAdjustHeight)},w={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:""},G=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,v,w,z,{tp:"Custom",cont:b},r,{tp:"Toggle",id:"visible",vl:!1,ch:m(this,this.changeProperties)},{tp:"Label",
id:"rotation",tx:G,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"]=qt;qt.__name__="com.tilbuci.ui.component.PropertiesPanel";qt.__super__=ze;qt.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 Ec(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 Ec(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 Ec(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 Ec(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 Ec(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 Ec(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 Ec(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 Ec(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 Ec(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 Ec(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 Ec(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 Ec(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__:qt});var rt=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"]=rt;rt.__name__="com.tilbuci.ui.component.SoundPanel";rt.__super__=ze;rt.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 Ec(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__:rt});var st=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:""},v={tp:"Label",id:"align",tx:k.ln.get("rightbar-text-align"),vr:""},w={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)},v,w,{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"]=st;st.__name__="com.tilbuci.ui.component.TextPanel";st.__super__=ze;st.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=F.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=F.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 Ec(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__:st});var Es=function(a){ca.call(this,a,k.ln.get("window-actions-title"),
980,zc.pickValue(540,560),!1,!0)};t["com.tilbuci.ui.component.WindowAction"]=Es;Es.__name__="com.tilbuci.ui.component.WindowAction";Es.__super__=ca;Es.prototype=I(ca.prototype,{_acarea:null,_acok:null,_accancel:null,startInterface:function(a){this._acarea=new qj(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));ca.prototype.startInterface.call(this)},setContent:function(a,b,c){this._acarea.setText(a);this._acok=b;this._accancel=c},kill:function(){ca.prototype.kill.call(this)},onCancel:function(a){this._accancel!=null&&this._accancel();this._acok=this._accancel=null;this.closeWindow(null)},onOk:function(a){a=Fa.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__:Es});var Fs=function(a){ca.call(this,a,k.ln.get("window-actions-block"),980,zc.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"]=Fs;Fs.__name__="com.tilbuci.ui.component.WindowActionBlock";Fs.__super__=ca;Fs.prototype=
I(ca.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__:Fs});
var Gs=function(a){this._aShaders=[];this._mnPlacement=[];this._scDirections=[];this._mvOrigins=[];this._blindex=-1;ca.call(this,a,"",1100,zc.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._aShaders=[{text:k.ln.get("sharders-none"),value:"none"},{text:k.ln.get("sharders-deuteranotopia"),value:"deuteranotopia"},{text:k.ln.get("sharders-protonatopia"),value:"protonatopia"},{text:k.ln.get("sharders-tritanotopia"),value:"tritanotopia"},{text:k.ln.get("sharders-contrast"),value:"contrast"},{text:k.ln.get("sharders-grayscale"),
value:"grayscale"}];this.ui.createHContainer("assets");this.ui.createSelect("assets",[],null,this.ui.hcontainers.h.assets,!1);this.ui.hcontainers.h.assets.addChild(new Qc("cpasset",m(this,this.onAsset),k.ln.get("window-acinstance-cpasset"),va.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 Qc("ggeneral",m(this,this.onGeneral),k.ln.get("window-globals-get"),va.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 Qc("instance",m(this,this.onInstance),k.ln.get("window-globals-get"),va.getBitmapData("btCopy"),!1));this.ui.createHContainer("gname");this.ui.createTInput("gname","","",this.ui.hcontainers.h.gname,!1);
this.ui.hcontainers.h.gname.addChild(new Qc("movie",m(this,this.onMovie),k.ln.get("window-globals-get"),va.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:fa.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:""},v={tp:"Custom",cont:this.ui.hcontainers.h.ginstancep},w={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:fa.VARIANT_DETAIL},G={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:[]},v,{tp:"Spacer",id:"gmovie",ht:4,ln:!1},w,z,r,G,{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),fa.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"),fa.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"]=Gs;Gs.__name__="com.tilbuci.ui.component.WindowBlockEdit";Gs.__super__=ca;Gs.prototype=I(ca.prototype,{_blindex:null,_onOk:null,_acinfo:null,_blac:null,_mvOrigins:null,_scDirections:null,_mnPlacement:null,
_aShaders: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;case "shader":this.ui.setSelectOptions("param-"+f,this._aShaders);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 Ss({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":U.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":U.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":U.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(U.substr(f,0,1)=="?"||U.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":U.substr(f,0,1)!="?"&&U.substr(f,0,1)!="#"&&U.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(F.string(this.ui.selects.h.gmovie.get_selectedItem().value)+this.ui.inputs.h.gname.get_text()),k.copyText(F.string(this.ui.selects.h.gmovie.get_selectedItem().value)+this.ui.inputs.h.gname.get_text()))},__class__:Gs});var cr=function(a){this._addButtons=new H;Zh.call(this);this.set_layoutData(cd.fill());
this.set_backgroundSkin(new wh);this.set_width(this.set_minWidth(this.set_maxWidth(150)));this.ui=new zc;this._action=a;this._topArea=new le;a=new tf;a.set_gap(10);a.set_verticalAlign(fc.TOP);this._topArea.set_layout(a);this._topArea.set_backgroundSkin(new wh);this._topArea.setPadding(10);this.addChild(this._topArea);this._bottomArea=new le;a=new tf;a.set_gap(10);a.set_verticalAlign(fc.BOTTOM);this._bottomArea.set_layout(a);this._bottomArea.set_backgroundSkin(new wh);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"]=cr;cr.__name__=
"com.tilbuci.ui.main.LeftInterface";cr.__super__=Zh;cr.prototype=I(Zh.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 Oa(va.getBitmapData(c)),b,f);a.set_horizontalAlign(Vb.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__:cr});var fr=function(a,b){this._panels=[];le.call(this);var c=new tf;c.set_gap(2);c.setPadding(0);this.set_layout(c);c=new ab;c.set_fill(vb.SolidColor(6710886));this.set_backgroundSkin(c);this.set_maxWidth(this.set_minWidth(this.set_width(220)));this._panels.push(new mt(200));this._panels.push(new ot(200));
this._panels.push(new qt(200));this._panels.push(new gt(200));this._panels.push(new st(200));this._panels.push(new et(200));this._panels.push(new rt(200));this._panels.push(new ht(200));this._panels.push(new it(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(Le.OFF);this.addEventListener("resize",m(this,this.onResize))};t["com.tilbuci.ui.main.RightInterface"]=fr;fr.__name__="com.tilbuci.ui.main.RightInterface";fr.__super__=le;fr.prototype=I(le.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__:fr});var Gd=function(a,b){Tc.call(this);
this.set_backgroundSkin(new wh(6710886));this._ac=a;this.ui=new zc;this._head=new Si;this._head.set_text(b);this.set_header(this._head);a=this.ui.createIconButton("btBack",m(this,this.closeMenu),new Oa(va.getBitmapData("btBack")));a.set_horizontalAlign(Vb.LEFT);a.set_width(40);a.set_height(30);this._head.set_leftView(a);this._holder=new le;this._holder.set_layout(new Ni);this._holder.set_backgroundSkin(new wh(6710886));a=new tf;a.setPadding(10);a.set_gap(10);a.set_verticalAlign(fc.TOP);this._holder.set_layout(a);
this.addChild(this._holder)};t["com.tilbuci.ui.menu.DrawerMenu"]=Gd;Gd.__name__="com.tilbuci.ui.menu.DrawerMenu";Gd.__super__=Tc;Gd.prototype=I(Tc.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(Vb.LEFT);return a},closeMenu:function(a){this._ac("menu-close")},__class__:Gd});var jr=function(a){Gd.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"]=
jr;jr.__name__="com.tilbuci.ui.menu.MenuContraptions";jr.__super__=Gd;jr.prototype=I(Gd.prototype,{onShow:function(){Gd.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(){Gd.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__:jr});var lr=function(a){Gd.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"]=lr;lr.__name__="com.tilbuci.ui.menu.MenuExchange";lr.__super__=Gd;lr.prototype=I(Gd.prototype,{onShow:function(){Gd.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(){Gd.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__:lr});var mr=function(a){Gd.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"]=
mr;mr.__name__="com.tilbuci.ui.menu.MenuKeyframe";mr.__super__=Gd;mr.prototype=I(Gd.prototype,{onShow:function(){Gd.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(){Gd.prototype.kill.call(this)},onAdd:function(a){this._ac("add")},onRemove:function(a){this._ac("remove")},onManage:function(a){this._ac("manage")},__class__:mr});var ir=function(a){Gd.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"]=ir;ir.__name__="com.tilbuci.ui.menu.MenuMedia";ir.__super__=Gd;ir.prototype=I(Gd.prototype,{onShow:function(){Gd.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(){Gd.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__:ir});var gr=function(a){Gd.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"]=gr;gr.__name__="com.tilbuci.ui.menu.MenuMovie";gr.__super__=Gd;gr.prototype=I(Gd.prototype,{onShow:function(){Gd.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(){Gd.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 ne(p.base+"app/?mv="+p.movie.get_mvId());a.method="GET";La.getURL(a)},__class__:gr});var kr=function(a){Gd.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"]=kr;kr.__name__="com.tilbuci.ui.menu.MenuNarrative";kr.__super__=Gd;kr.prototype=I(Gd.prototype,{onShow:function(){Gd.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(){Gd.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__:kr});var hr=function(a){Gd.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"]=hr;hr.__name__="com.tilbuci.ui.menu.MenuScene";hr.__super__=Gd;hr.prototype=I(Gd.prototype,{onShow:function(){Gd.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(){Gd.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 ne(p.base+"app/?mv="+p.movie.get_mvId()+"&sc="+p.movie.get_scId());a.method=
"GET";La.getURL(a)},__class__:hr});var Or=function(a){ca.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"),fa.VARIANT_DETAIL,this.ui.lastCont);this.ui.createTInput("username","","",this.ui.lastCont);this.ui.createLabel("password",k.ln.get("window-login-password"),fa.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"]=Or;Or.__name__="com.tilbuci.ui.window.WindowLogin";Or.__super__=ca;Or.prototype=I(ca.prototype,{_btEnter:null,kill:function(){ca.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(Fa.validateEmail(this.ui.inputs.h.username.get_text())){a=
this._ac;var b=new H,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 H,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__:Or});var Br=function(a){this._own=[];this._scene=[];this._movie=[];this._guideline=[];ca.call(this,a,k.ln.get("window-notes-title"),1E3,zc.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"]=Br;Br.__name__="com.tilbuci.ui.window.WindowNotes";Br.__super__=ca;Br.prototype=I(ca.prototype,{_guideline:null,_movie:null,_scene:null,_own:null,acStart:function(){var a=k.ws,b=new H,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(){ca.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 H,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 H,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 H,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 H,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=u.field(a.map.h.notes,"guidelines");this._movie=u.field(a.map.h.notes,"movie");this._scene=u.field(a.map.h.notes,"scene");this._own=u.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__:Br});var us=function(a,b){ca.call(this,a,k.ln.get("window-setup-title"),
900,zc.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:fa.VARIANT_DETAIL},q={tp:"Label",id:"users-newpass",tx:k.ln.get("window-setup-users-newpass"),vr:fa.VARIANT_DETAIL},v={tp:"Label",id:"users-newlevel",tx:k.ln.get("window-setup-users-newlevel"),vr:fa.VARIANT_DETAIL},w=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:""},v,{tp:"Select",id:"users-newlevel",
vl:h,sl:75},{tp:"Button",id:"users-create",tx:w,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:""};v={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};w=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,v,{tp:"Button",id:"fps",tx:w,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:fa.VARIANT_DETAIL},f={tp:"Label",id:"email-email",tx:k.ln.get("window-setup-email-email"),vr:fa.VARIANT_DETAIL},g={tp:"Label",id:"email-server",tx:k.ln.get("window-setup-email-server"),vr:fa.VARIANT_DETAIL},n={tp:"Label",id:"email-user",tx:k.ln.get("window-setup-email-user"),vr:fa.VARIANT_DETAIL},
l={tp:"Label",id:"email-password",tx:k.ln.get("window-setup-email-password"),vr:fa.VARIANT_DETAIL},q={tp:"Label",id:"email-port",tx:k.ln.get("window-setup-email-port"),vr:fa.VARIANT_DETAIL},v={tp:"Label",id:"email-security",tx:k.ln.get("window-setup-email-security"),vr:fa.VARIANT_DETAIL},w=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:""},v,{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:w,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:fa.VARIANT_DETAIL};n={tp:"Label",id:"font-name",tx:k.ln.get("window-setup-font-name"),vr:fa.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))}w=[];c=b.get_languages().h;d=Object.keys(c);f=d.length;for(g=0;g<f;)a=c[d[g++]],w.push(a);h=new Oa(va.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:fa.VARIANT_HEADING};
f={tp:"Label",id:"about-lucas",tx:N.replace(k.ln.get("window-setup-created"),"[NAME]","Lucas Junqueira <doggo@tilbuci.com.br>"),vr:""};g={tp:"Label",id:"about-version",tx:k.ln.get("window-setup-about-version"),vr:fa.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:fa.VARIANT_DETAIL};q={tp:"Label",id:"about-buildnum",tx:b.get_build(),vr:""};v={tp:"Label",id:"about-languages",tx:k.ln.get("window-setup-about-languages"),
vr:fa.VARIANT_DETAIL};w={tp:"Label",id:"about-langlist",tx:w.join(", "),vr:""};var z={tp:"Label",id:"about-thanks",tx:k.ln.get("window-setup-about-thanks"),vr:fa.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,v,w,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 Ic;b.set_wordWrap(!0);b.condenseWhite=!0;b.set_width(860);b.set_autoSize(1);b.set_htmlText(va.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"]=us;us.__name__="com.tilbuci.ui.window.WindowSetup";us.__super__=ca;us.prototype=I(ca.prototype,{acStart:function(){k.userLevel==0&&(k.host==""&&k.ws.send("Email/GetConfig",new H,m(this,this.onEmailSettings)),
k.ws.send("Movie/SetList",new H,m(this,this.onMovieList)));!k.singleUser&&k.ws.get_level()<=50&&k.host==""&&k.ws.send("User/List",new H,m(this,this.onUserList))},kill:function(){ca.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 H,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){U.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(U.substr(k.up.get_selectedName(),
0,7)!="TilBuci"||U.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 H;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 H,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 ne(k.econfig.get_player()+"setup.php"),a.method="GET",La.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 H,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 tm(k.econfig.get_font()+F.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 H,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):Fa.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 H,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 H,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(Fa.validateEmail(this.ui.inputs.h["users-newemail"].get_text())){a=k.ws;var b=new H,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 H,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 H,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 H,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 H,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 H,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 H,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 H,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 ne("https://tilbuci.com.br/site/latest-version/");a.method="GET";La.getURL(a)},__class__:us});var ys=function(a){ca.call(this,a,k.ln.get("window-tactions-title"),800,zc.pickValue(520,530),!1,!0,!0)};t["com.tilbuci.ui.window.WindowTestingActions"]=ys;ys.__name__="com.tilbuci.ui.window.WindowTestingActions";ys.__super__=ca;ys.prototype=I(ca.prototype,{_actions:null,startInterface:function(a){this._actions=new qj(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:fa.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);ca.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__:ys});var Cs=function(a,b){ca.call(this,a,k.ln.get("window-visitors-title"),1E3,zc.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:""},v={tp:"Label",
id:"visitorgroups",tx:k.ln.get("window-visitors-list-groups"),vr:""},w={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:""},v,{tp:"TInput",id:"visitorgroups",tx:"",vr:""},{tp:"Spacer",id:"visitor",ht:26,ln:!0},w,{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:fa.VARIANT_DETAIL};
f={tp:"Label",id:"evname",tx:k.ln.get("window-visitors-event-name"),vr:fa.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:fa.VARIANT_DETAIL};l={tp:"Label",id:"clearname",tx:k.ln.get("window-visitors-event-clearname"),vr:fa.VARIANT_DETAIL};q={tp:"Label",id:"clearwhen",tx:k.ln.get("window-visitors-event-clearwhen"),
vr:fa.VARIANT_DETAIL};v={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"};w=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,v,{tp:"Button",id:"evclear",tx:w,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:fa.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:fa.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"]=Cs;Cs.__name__="com.tilbuci.ui.window.WindowVisitors";Cs.__super__=ca;Cs.prototype=I(ca.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(){ca.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",[]);ye.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 H,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=u.fields(b.map.h.movies);d<
c.length;)f=c[d],++d,f=u.field(b.map.h.movies,f),a.push({text:u.field(f,"title"),value:u.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 H,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(F.string(this._selected.movies)),this.ui.inputs.h.visitorstates.set_text(F.string(this._selected.states)),this.ui.inputs.h.visitordata.set_text(F.string(this._selected.data)),this.ui.inputs.h.visitorgroups.set_text(F.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 H;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 H;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 H,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 H,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 H,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 H,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&&Fa.validateEmail(this.ui.inputs.h.grvsadd.get_text())){a=k.ws;var b=new H,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 H,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 H,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 H;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 H,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 H,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(U.substr(this.ui.inputs.h.corsadd.get_text().toLowerCase(),0,4)==
"http"){a=k.ws;var b=new H,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__:Cs});var yr=function(a){this._list=new H;ca.call(this,a,k.ln.get("window-contrbg-title"),1E3,zc.pickValue(525,540),!1,!0,!0)};t["com.tilbuci.ui.window.contraptions.WindowContrBackground"]=yr;yr.__name__="com.tilbuci.ui.window.contraptions.WindowContrBackground";yr.__super__=ca;yr.prototype=I(ca.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=va.getBitmapData("btOpenfile"),
c=this.ui.hcontainers.h.landscape;a.createIconButton("landscape",m(this,this.acImgL),new Oa(b),null,c,!1);a=this.ui;b=va.getBitmapData("btDel");c=this.ui.hcontainers.h.landscape;a.createIconButton("landscapedel",m(this,this.acImgLdel),new Oa(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=va.getBitmapData("btOpenfile");
c=this.ui.hcontainers.h.portrait;a.createIconButton("portrait",m(this,this.acImgP),new Oa(b),null,c,!1);a=this.ui;b=va.getBitmapData("btDel");c=this.ui.hcontainers.h.portrait;a.createIconButton("portraitdel",m(this,this.acImgPdel),new Oa(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));ca.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 H;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 xh;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__:yr});var Ar=function(a){this._list=new H;ca.call(this,a,k.ln.get("window-contrcover-title"),
1E3,zc.pickValue(525,540),!1,!0,!0)};t["com.tilbuci.ui.window.contraptions.WindowContrCover"]=Ar;Ar.__name__="com.tilbuci.ui.window.contraptions.WindowContrCover";Ar.__super__=ca;Ar.prototype=I(ca.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=va.getBitmapData("btOpenfile"),c=this.ui.hcontainers.h.landscape;a.createIconButton("landscape",m(this,this.acImgL),new Oa(b),
null,c,!1);a=this.ui;b=va.getBitmapData("btDel");c=this.ui.hcontainers.h.landscape;a.createIconButton("landscapedel",m(this,this.acImgLdel),new Oa(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=va.getBitmapData("btOpenfile");c=this.ui.hcontainers.h.portrait;a.createIconButton("portrait",m(this,this.acImgP),new Oa(b),
null,c,!1);a=this.ui;b=va.getBitmapData("btDel");c=this.ui.hcontainers.h.portrait;a.createIconButton("portraitdel",m(this,this.acImgPdel),new Oa(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));ca.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 H;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 Ri;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__:Ar});var Lr=function(a){this._list=new H;ca.call(this,a,k.ln.get("window-contrform-title"),1E3,zc.pickValue(715,740),!1,!0,!0)};t["com.tilbuci.ui.window.contraptions.WindowContrForm"]=Lr;Lr.__name__="com.tilbuci.ui.window.contraptions.WindowContrForm";Lr.__super__=ca;Lr.prototype=I(ca.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=va.getBitmapData("btOpenfile"),c=this.ui.hcontainers.h.background;a.createIconButton("background",m(this,this.acBackground),new Oa(b),null,c,!1);a=this.ui;b=va.getBitmapData("btDel");c=this.ui.hcontainers.h.background;a.createIconButton("backgrounddel",m(this,this.acBackgrounddel),new Oa(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=va.getBitmapData("btOpenfile");c=this.ui.hcontainers.h.btok;a.createIconButton("btok",m(this,this.acBtok),new Oa(b),null,c,!1);a=this.ui;b=va.getBitmapData("btDel");
c=this.ui.hcontainers.h.btok;a.createIconButton("btokdel",m(this,this.acBtokdel),new Oa(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=va.getBitmapData("btOpenfile");c=this.ui.hcontainers.h.btcancel;a.createIconButton("btcancel",m(this,this.acBtcancel),new Oa(b),null,c,!1);a=this.ui;b=va.getBitmapData("btDel");c=this.ui.hcontainers.h.btcancel;a.createIconButton("btcanceldel",m(this,this.acBtcanceldel),new Oa(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));ca.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 H;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 Tk,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-"+F.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__:Lr});var Mr=function(a){this._lastfrtime=250;this._lastframes=1;this._list=new H;ca.call(this,a,k.ln.get("window-contrinterf-title"),1E3,zc.pickValue(715,740),!1,!0,!0)};t["com.tilbuci.ui.window.contraptions.WindowContrInterf"]=Mr;Mr.__name__=
"com.tilbuci.ui.window.contraptions.WindowContrInterf";Mr.__super__=ca;Mr.prototype=I(ca.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=va.getBitmapData("btOpenfile"),c=this.ui.hcontainers.h.background;a.createIconButton("background",m(this,this.acBackground),new Oa(b),null,c,!1);a=this.ui;b=va.getBitmapData("btDel");c=this.ui.hcontainers.h.background;
a.createIconButton("backgrounddel",m(this,this.acBackgrounddel),new Oa(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=va.getBitmapData("btOpenfile");c=this.ui.hcontainers.h.spritemap;a.createIconButton("spritemap",m(this,this.acBtsm),new Oa(b),null,c,!1);a=this.ui;b=va.getBitmapData("btDel");c=this.ui.hcontainers.h.spritemap;a.createIconButton("spritemap",m(this,this.acBtsmdel),new Oa(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},v={tp:"Label",id:"txwidth",tx:k.ln.get("window-contrinterf-width"),vr:""},
w={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},v,{tp:"Numeric",id:"txwidth",mn:1,mx:1E4,st:10,vl:100},w,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=va.getBitmapData("btOpenfile");c=this.ui.hcontainers.h.formel;a.createIconButton("formel",m(this,this.acElem),new Oa(b),null,c,!1);a=this.ui;b=va.getBitmapData("btDel");c=this.ui.hcontainers.h.formel;a.createIconButton("formeldel",m(this,this.acElemdel),new Oa(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));ca.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=F.parseInt(b.h.frames);this._lastfrtime=F.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 H;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 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())}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=F.parseInt(a[0]),this._lastfrtime=F.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(F.parseInt(a[0])),
this.ui.setSelectValue("txfont",a[1]),this.ui.numerics.h.txsize.set_value(F.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(F.string(this.ui.numerics.h.txwidth.get_value()));a.push(this.ui.selects.h.txfont.get_selectedItem().value);a.push(F.string(this.ui.numerics.h.txsize.get_value()));a.push(Fa.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__:Mr});var bs=function(a){this._list=new H;ca.call(this,a,k.ln.get("window-contrmenu-title"),1E3,zc.pickValue(560,580),!1,!0,!0)};t["com.tilbuci.ui.window.contraptions.WindowContrMenu"]=bs;bs.__name__="com.tilbuci.ui.window.contraptions.WindowContrMenu";bs.__super__=ca;
bs.prototype=I(ca.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=va.getBitmapData("btOpenfile"),c=this.ui.hcontainers.h.imgbg;a.createIconButton("imgbg",m(this,this.acImgbg),new Oa(b),null,c,!1);a=this.ui;b=va.getBitmapData("btDel");c=this.ui.hcontainers.h.imgbg;a.createIconButton("imgbgdel",m(this,this.acImgbgdel),new Oa(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=va.getBitmapData("btOpenfile");c=this.ui.hcontainers.h.imgbt;a.createIconButton("imgbt",m(this,this.acImgbt),new Oa(b),null,c,!1);a=this.ui;b=va.getBitmapData("btDel");c=this.ui.hcontainers.h.imgbt;a.createIconButton("imgimgbtdel",m(this,this.acImgbtdel),new Oa(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"},v={tp:"Label",id:"imgbg",tx:k.ln.get("window-contrmenu-imgbg"),vr:"detail"},w={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},v,w,{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));ca.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 H;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 ja;
b.load({id:this.ui.inputs.h.name.get_text(),mode:"v",font:this.ui.selects.h.font.get_selectedItem().value,fontcolor:Fa.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:Fa.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__:bs});var cs=function(a){this._list=new H;ca.call(this,a,k.ln.get("window-contrmess-title"),1E3,zc.pickValue(570,590),!1,!0,!0)};t["com.tilbuci.ui.window.contraptions.WindowContrMessages"]=
cs;cs.__name__="com.tilbuci.ui.window.contraptions.WindowContrMessages";cs.__super__=ca;cs.prototype=I(ca.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=va.getBitmapData("btOpenfile"),c=this.ui.hcontainers.h.imgbg;a.createIconButton("imgbg",m(this,this.acImgbg),new Oa(b),null,c,!1);a=this.ui;b=va.getBitmapData("btDel");c=this.ui.hcontainers.h.imgbg;a.createIconButton("imgbgdel",m(this,
this.acImgbgdel),new Oa(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=va.getBitmapData("btOpenfile");c=this.ui.hcontainers.h.imgbt0;a.createIconButton("imgbt0",m(this,this.acImgbt0),new Oa(b),null,c,!1);a=this.ui;b=va.getBitmapData("btDel");c=this.ui.hcontainers.h.imgbt0;a.createIconButton("imgimgbt0del",m(this,this.acImgbt0del),
new Oa(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=va.getBitmapData("btOpenfile");c=this.ui.hcontainers.h.imgbt1;a.createIconButton("imgbt1",m(this,this.acImgbt1),new Oa(b),null,c,!1);a=this.ui;b=va.getBitmapData("btDel");c=this.ui.hcontainers.h.imgbt1;a.createIconButton("imgimgbt1del",m(this,this.acImgbt1del),new Oa(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=va.getBitmapData("btOpenfile");c=this.ui.hcontainers.h.imgbt2;a.createIconButton("imgbt2",m(this,this.acImgbt2),new Oa(b),null,c,!1);a=this.ui;b=va.getBitmapData("btDel");c=this.ui.hcontainers.h.imgbt2;a.createIconButton("imgimgbtdel",m(this,this.acImgbt2del),new Oa(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"},v={tp:"Custom",cont:this.ui.hcontainers.h.imgbg},w={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"},G={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,v,w,z,r,G,{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));ca.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 H;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 la;b.load({id:this.ui.inputs.h.name.get_text(),font:this.ui.selects.h.font.get_selectedItem().value,fontcolor:Fa.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__:cs});var ds=function(a){this._list=new H;ca.call(this,a,k.ln.get("window-contrmusic-title"),1E3,zc.pickValue(525,540),!1,!0,!0)};t["com.tilbuci.ui.window.contraptions.WindowContrMusic"]=ds;ds.__name__="com.tilbuci.ui.window.contraptions.WindowContrMusic";ds.__super__=ca;ds.prototype=I(ca.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=va.getBitmapData("btOpenfile"),c=this.ui.hcontainers.h.audio;a.createIconButton("audio",m(this,this.acAudio),new Oa(b),null,c,!1);a=this.ui;b=va.getBitmapData("btDel");c=this.ui.hcontainers.h.audio;a.createIconButton("audiodel",m(this,this.acAudiodel),new Oa(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));ca.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 H;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 aa;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__:ds});var ws=function(a){this._list=new H;ca.call(this,a,k.ln.get("window-contrsound-title"),1E3,zc.pickValue(525,540),!1,!0,!0)};t["com.tilbuci.ui.window.contraptions.WindowContrSound"]=ws;ws.__name__="com.tilbuci.ui.window.contraptions.WindowContrSound";
ws.__super__=ca;ws.prototype=I(ca.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=va.getBitmapData("btOpenfile"),c=this.ui.hcontainers.h.audio;a.createIconButton("audio",m(this,this.acAudio),new Oa(b),null,c,!1);a=this.ui;b=va.getBitmapData("btDel");c=this.ui.hcontainers.h.audio;a.createIconButton("audiodel",m(this,this.acAudiodel),new Oa(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));ca.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 H;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 Ya;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__:ws});var xs=
function(a){this._list=new H;ca.call(this,a,k.ln.get("window-contrtr-title"),1E3,zc.pickValue(575,590),!1,!0,!0)};t["com.tilbuci.ui.window.contraptions.WindowContrTarget"]=xs;xs.__name__="com.tilbuci.ui.window.contraptions.WindowContrTarget";xs.__super__=ca;xs.prototype=I(ca.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=va.getBitmapData("btOpenfile"),c=this.ui.hcontainers.h["default"];
a.createIconButton("default",m(this,this.acImgD),new Oa(b),null,c,!1);a=this.ui;b=va.getBitmapData("btDel");c=this.ui.hcontainers.h["default"];a.createIconButton("defaultdel",m(this,this.acImgDdel),new Oa(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=va.getBitmapData("btOpenfile");c=this.ui.hcontainers.h.menus;a.createIconButton("menus",
m(this,this.acImgM),new Oa(b),null,c,!1);a=this.ui;b=va.getBitmapData("btDel");c=this.ui.hcontainers.h.menus;a.createIconButton("menusdel",m(this,this.acImgMdel),new Oa(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=va.getBitmapData("btOpenfile");c=this.ui.hcontainers.h.interf;a.createIconButton("interf",m(this,this.acImgI),
new Oa(b),null,c,!1);a=this.ui;b=va.getBitmapData("btDel");c=this.ui.hcontainers.h.interf;a.createIconButton("interfdel",m(this,this.acImgIdel),new Oa(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=va.getBitmapData("btOpenfile");c=this.ui.hcontainers.h.inst1;a.createIconButton("inst1",m(this,this.acImgI1),new Oa(b),null,c,!1);
a=this.ui;b=va.getBitmapData("btDel");c=this.ui.hcontainers.h.inst1;a.createIconButton("inst1del",m(this,this.acImgI1del),new Oa(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=va.getBitmapData("btOpenfile");c=this.ui.hcontainers.h.inst2;a.createIconButton("inst2",m(this,this.acImgI2),new Oa(b),null,c,!1);a=this.ui;b=va.getBitmapData("btDel");
c=this.ui.hcontainers.h.inst2;a.createIconButton("inst2del",m(this,this.acImgI2del),new Oa(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=va.getBitmapData("btOpenfile");c=this.ui.hcontainers.h.inst3;a.createIconButton("inst3",m(this,this.acImgI3),new Oa(b),null,c,!1);a=this.ui;b=va.getBitmapData("btDel");c=this.ui.hcontainers.h.inst3;
a.createIconButton("inst3del",m(this,this.acImgI3del),new Oa(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},v={tp:"Label",id:"inst1",tx:k.ln.get("window-contrtr-inst"),vr:"detail"},w={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},G=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},v,{tp:"TInput",id:"inst1name",tx:"",vr:""},w,{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:G,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));ca.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 H;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 db;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__:xs});var Dr=function(a){ca.call(this,
a,k.ln.get("window-exchcord-title"),1100,zc.pickValue(410,500),!1,!0,!0)};t["com.tilbuci.ui.window.exchange.WindowExchangeCordova"]=Dr;Dr.__name__="com.tilbuci.ui.window.exchange.WindowExchangeCordova";Dr.__super__=ca;Dr.prototype=I(ca.prototype,{startInterface:function(a){this.ui.createHContainer("icon");this.ui.createTInput("icon","","",this.ui.hcontainers.h.icon);a=this.ui;var b=va.getBitmapData("btOpenfile"),c=this.ui.hcontainers.h.icon;a.createIconButton("icon",m(this,this.onIcon),new Oa(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:fa.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:""},v=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:v,ac:m(this,this.onCord)}]));this.ui.labels.h.about.set_wordWrap(!0);this.ui.labels.h.cord.set_wordWrap(!0);ca.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 ne("https://capacitorjs.com/");a.method="GET";La.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 H,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 H;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__:Dr});var Er=function(a){ca.call(this,a,k.ln.get("window-exchdesk-title"),1E3,zc.pickValue(600,680),!1,!0,!0)};t["com.tilbuci.ui.window.exchange.WindowExchangeDesktop"]=Er;Er.__name__="com.tilbuci.ui.window.exchange.WindowExchangeDesktop";Er.__super__=ca;Er.prototype=I(ca.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:fa.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:fa.VARIANT_DETAIL},
h={tp:"Label",id:"height",tx:k.ln.get("window-exchdesk-height"),vr:fa.VARIANT_DETAIL},n={tp:"Label",id:"icon",tx:k.ln.get("window-exchdesk-icon"),vr:fa.VARIANT_DETAIL},l={tp:"Label",id:"author",tx:k.ln.get("window-exchdesk-author"),vr:fa.VARIANT_DETAIL},q={tp:"Label",id:"description",tx:k.ln.get("window-exchdesk-description"),vr:fa.VARIANT_DETAIL},v={tp:"Button",id:"export",tx:k.ln.get("window-exchdesk-button"),ac:m(this,this.onExport)},w={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},v,{tp:"Spacer",id:"nw",ht:20,ln:!0},w,{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);ca.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 ne("https://www.electronjs.org/");a.method="GET";La.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 H,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 H;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__:Er});var Fr=function(a){ca.call(this,a,k.ln.get("window-exchexport-title"),800,zc.pickValue(180,200),!1,!0,!0)};t["com.tilbuci.ui.window.exchange.WindowExchangeExport"]=
Fr;Fr.__name__="com.tilbuci.ui.window.exchange.WindowExchangeExport";Fr.__super__=ca;Fr.prototype=I(ca.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);ca.prototype.startInterface.call(this)},
kill:function(){ca.prototype.kill.call(this)},onExport:function(a){a=k.ws;var b=new H,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 H;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__:Fr});var Gr=function(a){ca.call(this,a,k.ln.get("window-exchiframe-title"),800,zc.pickValue(280,300),!1,!0,!0)};t["com.tilbuci.ui.window.exchange.WindowExchangeIframe"]=Gr;Gr.__name__="com.tilbuci.ui.window.exchange.WindowExchangeIframe";Gr.__super__=ca;Gr.prototype=I(ca.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);ca.prototype.startInterface.call(this)},kill:function(){ca.prototype.kill.call(this)},acStart:function(){this.ui.setSelectValue("location","sites")},onExport:function(a){a=k.ws;var b=new H,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 H;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__:Gr});var Hr=function(a){this._movieid="";ca.call(this,a,k.ln.get("window-exchimport-title"),800,zc.pickValue(205,220),!1)};t["com.tilbuci.ui.window.exchange.WindowExchangeImport"]=Hr;Hr.__name__="com.tilbuci.ui.window.exchange.WindowExchangeImport";Hr.__super__=ca;Hr.prototype=I(ca.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);ca.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(){ca.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 H,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 H;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 H,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 H;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__:Hr});var Ir=function(a){ca.call(this,a,k.ln.get("window-exchpub-title"),600,zc.pickValue(215,230),!1,!0,!0)};t["com.tilbuci.ui.window.exchange.WindowExchangePublish"]=Ir;Ir.__name__="com.tilbuci.ui.window.exchange.WindowExchangePublish";Ir.__super__=ca;Ir.prototype=I(ca.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);ca.prototype.startInterface.call(this)},acStart:function(){ca.prototype.acStart.call(this)},onExport:function(a){a=k.ws;var b=new H,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 H;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__:Ir});var Jr=function(a){ca.call(this,a,k.ln.get("window-exchpwa-title"),1E3,zc.pickValue(525,600),!1,!0,!0)};t["com.tilbuci.ui.window.exchange.WindowExchangePwa"]=Jr;
Jr.__name__="com.tilbuci.ui.window.exchange.WindowExchangePwa";Jr.__super__=ca;Jr.prototype=I(ca.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:fa.VARIANT_DETAIL},f={tp:"Label",id:"shortname",tx:k.ln.get("window-exchpwa-shortname"),vr:fa.VARIANT_DETAIL},g={tp:"Label",id:"lang",tx:k.ln.get("window-exchpwa-language"),vr:fa.VARIANT_DETAIL},
h={tp:"Label",id:"icon",tx:k.ln.get("window-exchpwa-icon"),vr:fa.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:fa.VARIANT_DETAIL},v=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:v,ac:m(this,this.onExport)}]));this.ui.labels.h.about.set_wordWrap(!0);this.ui.inputs.h.shortname.set_maxChars(12);ca.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()==""||U.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(),U.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 H,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 H;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__:Jr});var Kr=function(a){ca.call(this,a,k.ln.get("window-exchsite-title"),800,zc.pickValue(370,400),!1,!0,!0)};t["com.tilbuci.ui.window.exchange.WindowExchangeWebsite"]=Kr;Kr.__name__="com.tilbuci.ui.window.exchange.WindowExchangeWebsite";
Kr.__super__=ca;Kr.prototype=I(ca.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);ca.prototype.startInterface.call(this)},kill:function(){ca.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 H,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 H;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__:Kr});var Nr=function(a){ca.call(this,a,k.ln.get("window-kfmanage-title"),1E3,zc.pickValue(520,540),!1,!0,!0)};t["com.tilbuci.ui.window.keyframe.WindowKeyframeManage"]=Nr;Nr.__name__=
"com.tilbuci.ui.window.keyframe.WindowKeyframeManage";Nr.__super__=ca;Nr.prototype=I(ca.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)}])));ca.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:F.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(){ca.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__:Nr});var or=function(a){this._frtime=100;this._frames=1;this._endAction="";ca.call(this,a,k.ln.get("window-asset-title"),1E3,380,!1,!0,!0)};t["com.tilbuci.ui.window.media.WindowAssetBase"]=
or;or.__name__="com.tilbuci.ui.window.media.WindowAssetBase";or.__super__=ca;or.prototype=I(ca.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 Oa(va.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},v={tp:"Button",id:"assetac",tx:k.ln.get("window-collection-astacset"),ac:m(this,this.onEndActions)},w={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,v,{tp:"Spacer",id:"buttons",ht:10,ln:!1},w,{tp:"Button",
id:"btcancel",tx:z,ac:m(this,this.onClose)}]);this.addForm("properties",this._interface);ca.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=F.parseInt(b.h.frames),this._frtime=F.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 H;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__:or});var zr=function(a){this._assets=[];ca.call(this,a,k.ln.get("window-collectionbasic-title"),1E3,640,!1,!0,!0)};t["com.tilbuci.ui.window.media.WindowCollectionBase"]=zr;zr.__name__="com.tilbuci.ui.window.media.WindowCollectionBase";zr.__super__=ca;zr.prototype=I(ca.prototype,
{_instance:null,_collection:null,_assets:null,startInterface:function(a){this.ui.createHContainer("assetorder");a=this.ui;var b=va.getBitmapData("btUp"),c=this.ui.hcontainers.h.assetorder;a.createIconButton("orderup",m(this,this.onAssetUp),new Oa(b),null,c,!1);a=this.ui;b=va.getBitmapData("btDown");c=this.ui.hcontainers.h.assetorder;a.createIconButton("orderdown",m(this,this.onAssetDown),new Oa(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");ca.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__:zr});var Qr=function(a){this._changed=!1;ca.call(this,a,k.ln.get("window-collection-title"),
1E3,zc.pickValue(660,700),!1,!0,!0)};t["com.tilbuci.ui.window.media.WindowCollections"]=Qr;Qr.__name__="com.tilbuci.ui.window.media.WindowCollections";Qr.__super__=ca;Qr.prototype=I(ca.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 Ni);this._shape=new Bn(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=va.getBitmapData("btUp");c=this.ui.hcontainers.h.assetorder;a.createIconButton("orderup",m(this,this.onAssetUp),new Oa(b),null,c,!1);a=this.ui;b=va.getBitmapData("btDown");c=this.ui.hcontainers.h.assetorder;a.createIconButton("orderdown",m(this,this.onAssetDown),new Oa(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:fa.VARIANT_DETAIL};d={tp:"Label",id:"coltitle",tx:k.ln.get("window-collection-coltitle"),vr:fa.VARIANT_DETAIL};f={tp:"Label",id:"coltrans",tx:k.ln.get("window-collection-coltrans"),vr:fa.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:fa.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:fa.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:fa.VARIANT_DETAIL};l={tp:"Custom",cont:this.ui.hcontainers.h.newasset};var v=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:v,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));ca.prototype.startInterface.call(this);this._forms.removeChild(this._astint)},kill:function(){ca.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=U.substr(Fa.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=U.substr(Fa.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:F.parseInt(b.h.frames),frtime:F.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(F.parseInt(b.h.frames)),
this.ui.numerics.h.astsmaptime.set_value(F.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@"+F.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 H;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 H;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 v=p.movie.collections.h[d].assets.h[q];f.h[q]={uid:"-"+(l==null?"null":""+l),id:q,order:l,name:v.name,type:v.type,time:v.time,frames:v.frames,frtime:v.frtime,file1:v.file.h["@1"],file2:v.file.h["@2"],file3:v.file.h["@3"],file4:v.file.h["@4"],file5:v.file.h["@5"],action:v.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 H;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 H,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 H;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 H;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 H,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-"+F.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 H;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 H;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 H;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 H;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 H;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 Oa(va.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 H;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 v=p.movie.collections.h[f].assets,w=new Nj({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}});v.h[q]=w;++h}p.movie.collections.h[f].assetOrder=g;p.area.loadKeyframe(p.movie.scene.keyframes[p.area.get_currentKf()],p.area.get_currentKf())}}},__class__:Qr});var Rr=function(a){ca.call(this,a,k.ln.get("window-collectionadd-title"),1E3,zc.pickValue(600,620),!1,!0,!0)};t["com.tilbuci.ui.window.media.WindowCollectionsAdd"]=Rr;Rr.__name__="com.tilbuci.ui.window.media.WindowCollectionsAdd";
Rr.__super__=ca;Rr.prototype=I(ca.prototype,{_colint:null,startInterface:function(a){var b=a=this.ui,c={tp:"Label",id:"scene",tx:k.ln.get("window-collectionadd-colscene"),vr:fa.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:fa.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:fa.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));ca.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 H;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 H,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 H;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 ff(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 Nj({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 H;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__:Rr});var Sr=function(a){ca.call(this,a,k.ln.get("window-collectionrm-title"),1E3,zc.pickValue(590,610),!1,!0,!0)};t["com.tilbuci.ui.window.media.WindowCollectionsRm"]=Sr;Sr.__name__="com.tilbuci.ui.window.media.WindowCollectionsRm";Sr.__super__=ca;Sr.prototype=I(ca.prototype,
{_colint:null,startInterface:function(a){var b=a=this.ui,c={tp:"Label",id:"collections",tx:k.ln.get("window-collectionrm-cols"),vr:fa.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:fa.VARIANT_DETAIL}]);b=this.ui;c={tp:"Label",id:"assets",tx:k.ln.get("window-collection-assets"),vr:fa.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");ca.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 H,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 H,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 H,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__:Sr});var ad=function(a,b,c,d){this._frtime=100;this._frames=1;this._filenum="1";ca.call(this,a,b,1E3,zc.pickValue(685,695),!1,!0,!0);this._type=c;this._mode=d;this._preview=new pt(c,460,460)};t["com.tilbuci.ui.window.media.WindowMediaBase"]=ad;ad.__name__="com.tilbuci.ui.window.media.WindowMediaBase";ad.__super__=ca;ad.prototype=I(ca.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:fa.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))}ca.prototype.startInterface.call(this)},kill:function(){ca.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 H,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=u.fields(b.map.h.list);c<d.length;){var f=d[c];++c;u.field(u.field(b.map.h.list,f),"t")=="d"?a.push({text:u.field(u.field(b.map.h.list,f),"n"),value:u.field(u.field(b.map.h.list,f),"n"),type:"d",asset:"iconFolder"}):a.push({text:u.field(u.field(b.map.h.list,f),"n"),value:u.field(u.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 H;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=F.string(this._frames);c.h.frtime=F.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 H,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=F.string(this._frames),b.h.frtime=
F.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 H;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=F.string(this._frames);c.h.frtime=F.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 H,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=F.string(this._frames),b.h.frtime=F.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+=F.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 H,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=F.string(this._frames),a.h.frtime=F.string(this._frtime),a.h.num=this._filenum,b("addasset",a)):this._mode=="assetsingle"?
(this._mode="simple",b=this._ac,a=new H,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=F.string(this._frames),a.h.frtime=F.string(this._frtime),a.h.num=this._filenum,b("assetsingle",a)):this._mode=="newasset"?(this._mode="simple",b=this._ac,a=new H,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=F.string(this._frames),a.h.frtime=F.string(this._frtime),b("addnewasset",
a)):this._mode=="single"?(this._mode="single",b=this._ac,a=new H,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=F.string(this._frames),a.h.frtime=F.string(this._frtime),b("single",a)):(b=this._ac,a=new H,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=F.string(this._frames),a.h.frtime=F.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+F.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 H,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 H,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 H,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 H,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 H,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__:ad});var Pr=function(a,b){ad.call(this,a,k.ln.get("window-mdaudio-title"),"audio",b)};t["com.tilbuci.ui.window.media.WindowMediaAudio"]=Pr;Pr.__name__="com.tilbuci.ui.window.media.WindowMediaAudio";
Pr.__super__=ad;Pr.prototype=I(ad.prototype,{startInterface:function(a){ad.prototype.startInterface.call(this)},kill:function(){ad.prototype.kill.call(this)},__class__:Pr});var Tr=function(a){ca.call(this,a,k.ln.get("window-mdembed-title"),1E3,zc.pickValue(415,440),!1,!0,!0)};t["com.tilbuci.ui.window.media.WindowMediaEmbed"]=Tr;Tr.__name__="com.tilbuci.ui.window.media.WindowMediaEmbed";Tr.__super__=ca;Tr.prototype=I(ca.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:fa.VARIANT_DETAIL};f={tp:"Label",id:"addname",tx:k.ln.get("window-mdembed-addname"),
vr:fa.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 H,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 H,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 H;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/"+F.string(this.ui.lists.h.available.get_selectedItem().value)+"/index.html",a=new ne(a),a.method="GET",La.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 H,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__:Tr});var Ur=function(a,b){ad.call(this,a,k.ln.get("window-mdhtml-title"),"html",b)};t["com.tilbuci.ui.window.media.WindowMediaHtml"]=Ur;
Ur.__name__="com.tilbuci.ui.window.media.WindowMediaHtml";Ur.__super__=ad;Ur.prototype=I(ad.prototype,{startInterface:function(a){ad.prototype.startInterface.call(this)},kill:function(){ad.prototype.kill.call(this)},__class__:Ur});var Vr=function(a,b){ad.call(this,a,k.ln.get("window-mdparagraph-title"),"paragraph",b)};t["com.tilbuci.ui.window.media.WindowMediaParagraph"]=Vr;Vr.__name__="com.tilbuci.ui.window.media.WindowMediaParagraph";Vr.__super__=ad;Vr.prototype=I(ad.prototype,{startInterface:function(a){ad.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(){ad.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 H;b.h.path="";b.h.type=this._type;var c=this.ui.tareas.h.text.get_text();b.h.file=c;b.h.frames=F.string(this._frames);b.h.frtime=F.string(this._frtime);b.h.num=this._filenum;a("addasset",b)}else this._mode=="assetsingle"?(this._mode="simple",a=this._ac,b=new H,b.h.path="",b.h.type=this._type,c=this.ui.tareas.h.text.get_text(),b.h.file=c,b.h.frames=F.string(this._frames),b.h.frtime=F.string(this._frtime),b.h.num=this._filenum,a("assetsingle",b)):this._mode=="newasset"?
(this._mode="simple",a=this._ac,b=new H,b.h.path="",b.h.type=this._type,c=this.ui.tareas.h.text.get_text(),b.h.file=c,b.h.frames=F.string(this._frames),b.h.frtime=F.string(this._frtime),a("addnewasset",b)):(a=this._ac,b=new H,b.h.path="",b.h.type=this._type,c=this.ui.tareas.h.text.get_text(),b.h.file=c,b.h.frames=F.string(this._frames),b.h.frtime=F.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 H;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=F.string(this._frames);b.h.frtime=F.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 H;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=F.string(this._frames);b.h.frtime=F.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){ad.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__:Vr});var Wr=function(a,b){ad.call(this,a,k.ln.get("window-mdpicture-title"),"picture",
b)};t["com.tilbuci.ui.window.media.WindowMediaPicture"]=Wr;Wr.__name__="com.tilbuci.ui.window.media.WindowMediaPicture";Wr.__super__=ad;Wr.prototype=I(ad.prototype,{startInterface:function(a){ad.prototype.startInterface.call(this)},kill:function(){ad.prototype.kill.call(this)},__class__:Wr});var Xr=function(a,b){ad.call(this,a,k.ln.get("window-mdshape-title"),"shape",b)};t["com.tilbuci.ui.window.media.WindowMediaShape"]=Xr;Xr.__name__="com.tilbuci.ui.window.media.WindowMediaShape";Xr.__super__=ad;
Xr.prototype=I(ad.prototype,{_shape:null,_desc:null,startInterface:function(a){ad.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 Bn(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:""},v={tp:"Label",id:"rotation",tx:k.ln.get("window-mdshape-rotation"),vr:""},w=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},v,{tp:"Numeric",id:"rotation",mn:0,mx:359,vl:0,st:1},{tp:"Button",id:"show",tx:w,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(){ad.prototype.kill.call(this)},onShow:function(a){a=this.ui.inputs.h.color.get_text();a=N.replace(a,"#","0x");F.parseInt(a)==null&&(a="0x000000");var b=this.ui.inputs.h.bdcolor.get_text();b=N.replace(b,"#","0x");F.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(Fa.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=Fa.jsonStringify(this._desc);if(this._mode=="asset"){this._mode="simple";var b=this._ac,c=new H;c.h.path="";c.h.type=this._type;c.h.file=a;c.h.frames=F.string(this._frames);c.h.frtime=F.string(this._frtime);c.h.num=this._filenum;b("addasset",c)}else this._mode=="assetsingle"?(this._mode="simple",b=this._ac,c=new H,
c.h.path="",c.h.type=this._type,c.h.file=a,c.h.frames=F.string(this._frames),c.h.frtime=F.string(this._frtime),c.h.num=this._filenum,b("assetsingle",c)):this._mode=="newasset"?(this._mode="simple",b=this._ac,c=new H,c.h.path="",c.h.type=this._type,c.h.file=a,c.h.frames=F.string(this._frames),c.h.frtime=F.string(this._frtime),b("addnewasset",c)):(b=this._ac,c=new H,c.h.path="",c.h.type=this._type,c.h.file=a,c.h.frames=F.string(this._frames),c.h.frtime=F.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=Fa.jsonStringify(this._desc);var b=this._ac,c=new H;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=F.string(this._frames);c.h.frtime=F.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=Fa.jsonStringify(this._desc);var b=this._ac,c=new H;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=F.string(this._frames);c.h.frtime=F.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){ad.prototype.action.call(this,a,b);this._shape.set_visible(!1);this._desc=Fa.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__:Xr});var Yr=function(a,b){ad.call(this,a,k.ln.get("window-mdspritemap-title"),"spritemap",b)};t["com.tilbuci.ui.window.media.WindowMediaSpritemap"]=Yr;Yr.__name__="com.tilbuci.ui.window.media.WindowMediaSpritemap";
Yr.__super__=ad;Yr.prototype=I(ad.prototype,{_smapset:null,startInterface:function(a){ad.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:fa.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:fa.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(){ad.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__:Yr});var Zr=function(a){ca.call(this,a,k.ln.get("window-mdstrings-title"),1E3,zc.pickValue(535,565),!1,!0,!0);this._type="strings"};t["com.tilbuci.ui.window.media.WindowMediaStrings"]=Zr;Zr.__name__="com.tilbuci.ui.window.media.WindowMediaStrings";Zr.__super__=ca;Zr.prototype=I(ca.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));ca.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 H,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=u.fields(b.map.h.list);c<d.length;){var f=d[c];++c;a.push({text:u.field(u.field(b.map.h.list,f),"n"),value:u.field(u.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 H;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 H,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 H,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__:Zr});var $r=function(a,b){ad.call(this,a,k.ln.get("window-mdtext-title"),"text",b)};t["com.tilbuci.ui.window.media.WindowMediaText"]=
$r;$r.__name__="com.tilbuci.ui.window.media.WindowMediaText";$r.__super__=ad;$r.prototype=I(ad.prototype,{startInterface:function(a){ad.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(){ad.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 H;b.h.path="";b.h.type=this._type;var c=this.ui.tareas.h.text.get_text();b.h.file=c;b.h.frames=F.string(this._frames);b.h.frtime=F.string(this._frtime);b.h.num=this._filenum;a("addasset",b)}else this._mode=="newasset"?(this._mode="simple",a=this._ac,b=new H,
b.h.path="",b.h.type=this._type,c=this.ui.tareas.h.text.get_text(),b.h.file=c,b.h.frames=F.string(this._frames),b.h.frtime=F.string(this._frtime),a("addnewasset",b)):(a=this._ac,b=new H,b.h.path="",b.h.type=this._type,c=this.ui.tareas.h.text.get_text(),b.h.file=c,b.h.frames=F.string(this._frames),b.h.frtime=F.string(this._frtime),a("addstage",b));Aa.removePopUp(this)}},action:function(a,b){ad.prototype.action.call(this,a,b);this.ui.tareas.h.text.set_text(b.h.current)},__class__:$r});var as=function(a,
b){ad.call(this,a,k.ln.get("window-mdvideo-title"),"video",b)};t["com.tilbuci.ui.window.media.WindowMediaVideo"]=as;as.__name__="com.tilbuci.ui.window.media.WindowMediaVideo";as.__super__=ad;as.prototype=I(ad.prototype,{startInterface:function(a){ad.prototype.startInterface.call(this)},kill:function(){ad.prototype.kill.call(this)},__class__:as});var zs=function(a){this._list=[];ca.call(this,a,k.ln.get("window-timedac-title"),1300,zc.pickValue(660,700),!1,!0,!0)};t["com.tilbuci.ui.window.media.WindowTimedAction"]=
zs;zs.__name__="com.tilbuci.ui.window.media.WindowTimedAction";zs.__super__=ca;zs.prototype=I(ca.prototype,{_instance:null,_acarea:null,_list:null,startInterface:function(a){this._acarea=new qj(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));ca.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:F.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[F.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",[]);Kf.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__:zs});var js=function(a){ca.call(this,a,k.ln.get("window-movienew-title"),800,zc.pickValue(430,475),!1)};t["com.tilbuci.ui.window.movie.WindowMovieNew"]=js;js.__name__="com.tilbuci.ui.window.movie.WindowMovieNew";js.__super__=ca;js.prototype=I(ca.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:fa.VARIANT_DETAIL},f={tp:"Label",id:"movieid",tx:k.ln.get("window-movienew-id"),vr:fa.VARIANT_DETAIL},g={tp:"Label",id:"movieauthor",tx:k.ln.get("window-movienew-author"),vr:fa.VARIANT_DETAIL},h={tp:"Label",id:"moviecopyright",tx:k.ln.get("window-movienew-copyright"),vr:fa.VARIANT_DETAIL},n={tp:"Label",id:"moviecopyleft",tx:k.ln.get("window-movienew-copyleft"),vr:fa.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:fa.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:fa.VARIANT_DETAIL};f={tp:"Label",id:"moviesizesmall",tx:k.ln.get("window-movienew-sizesmall"),vr:fa.VARIANT_DETAIL};
g={tp:"Label",id:"moviesizetype",tx:k.ln.get("window-movienew-sizetype"),vr:fa.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:fa.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 v=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:v,ac:m(this,this.onCreateMovie)}])));ca.prototype.startInterface.call(this)},
kill:function(){ca.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 H,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 H;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__:js});var ls=function(a){ca.call(this,a,k.ln.get("window-movieopen-title"),800,zc.pickValue(415,435),!1)};t["com.tilbuci.ui.window.movie.WindowMovieOpen"]=ls;ls.__name__="com.tilbuci.ui.window.movie.WindowMovieOpen";ls.__super__=ca;ls.prototype=I(ca.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:fa.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)}]));ca.prototype.startInterface.call(this);this.ui.listDbClick("openlist",m(this,this.onOpen))},kill:function(){ca.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 H,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:u.field(d,"title"),value:u.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 H,c=this.ui.lists.h.openlist.get_selectedItem().value;b.h.id=c;a("movieload",b);p.area.imgSelect();Aa.removePopUp(this)}},__class__:ls});var ns=function(a){ca.call(this,a,k.ln.get("window-movieplugin-title"),1E3,720,!0,!0,!0)};t["com.tilbuci.ui.window.movie.WindowMoviePlugins"]=ns;ns.__name__="com.tilbuci.ui.window.movie.WindowMoviePlugins";
ns.__super__=ca;ns.prototype=I(ca.prototype,{startInterface:function(a){a=Object.keys(k.plugins.h).length;for(var b=0;b<a;)b++;ca.prototype.startInterface.call(this)},kill:function(){ca.prototype.kill.call(this)},acStart:function(){},onSave:function(a){var b="{}",c=k.plugins,d=Je.__get(a.target,"btid");Object.prototype.hasOwnProperty.call(c.h,d==null?null:F.string(d))&&(c=k.plugins,d=Je.__get(a.target,"btid"),b=Fa.jsonStringify(c.h[d==null?null:F.string(d)].getConfig()));var f=k.ws,g=new H;c=p.movie.get_mvId();
g.h.id=c;c=Je.__get(a.target,"btid");g.h.plugin=c;c=this.ui.toggles;a=Je.__get(a.target,"btid");a==null?a="null":(d=a,a=d==null?null:F.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__:ns});var os=function(a){this._thColors="themeColor offsetThemeColor headerFillColor headerFontSize headerFontName headerTextColor rootFillColor fontSize fontName textColor insetFillColor disabledTextColor footerFillColor controlFillColor1 controlFillColor2 scrollBarThumbFillColor".split(" ");ca.call(this,a,k.ln.get("window-movieprop-title"),1200,zc.pickValue(570,
620),!0,!0,!0)};t["com.tilbuci.ui.window.movie.WindowMovieProperties"]=os;os.__name__="com.tilbuci.ui.window.movie.WindowMovieProperties";os.__super__=ca;os.prototype=I(ca.prototype,{_cssArea:null,_acstart:null,_acsnippet:null,_thColors:null,_favicon:null,_image:null,_loadingic:null,startInterface:function(a){this.ui.createHContainer("images");a=new Rj("v",10,6710886);a.set_width(245);a.set_height(210);this.ui.createLabel("favicon",k.ln.get("window-movieprop-favicon"),fa.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 Zc(m(this,this.onFaviconLoaded));this._favicon.set_width(this._favicon.set_height(32));a.addChild(this._favicon);var b=new Rj("v",10,6710886);b.set_width(245);b.set_height(210);this.ui.createLabel("image",k.ln.get("window-movieprop-image"),fa.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 Zc(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:fa.VARIANT_DETAIL},
f={tp:"Label",id:"movieauthor",tx:k.ln.get("window-movienew-author"),vr:fa.VARIANT_DETAIL},g={tp:"Label",id:"moviecopyright",tx:k.ln.get("window-movienew-copyright"),vr:fa.VARIANT_DETAIL},h={tp:"Label",id:"moviecopyleft",tx:k.ln.get("window-movienew-copyleft"),vr:fa.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:fa.VARIANT_DETAIL},{tp:"TInput",id:"movietags",tx:"",vr:""}]);c=this.ui;d={tp:"Label",id:"movieindex",tx:k.ln.get("window-movieprop-index"),vr:fa.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:fa.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 Rj("v",0,6710886);a.set_width(395);a.set_height(210);this.ui.createLabel("loadingic",k.ln.get("window-movieprop-loading"),fa.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 Sk(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:fa.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:fa.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:fa.VARIANT_DETAIL};n={tp:"Label",id:"moviehighlight",tx:k.ln.get("window-movieprop-highlight"),
vr:fa.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:fa.VARIANT_DETAIL};d={tp:"Label",id:"moviesizesmall",tx:k.ln.get("window-movienew-sizesmall"),vr:fa.VARIANT_DETAIL};f={tp:"Label",id:"moviesizetype",tx:k.ln.get("window-movienew-sizetype"),vr:fa.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:fa.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:fa.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"),fa.VARIANT_DETAIL));this._cssArea=new jp("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 Wi;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 Wi;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:fa.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:fa.VARIANT_DETAIL};f={tp:"Label",id:"fontfile",tx:k.ln.get("window-setup-font-file"),vr:fa.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:fa.VARIANT_DETAIL},{tp:"TInput",id:"fontname",tx:"",
vr:""},{tp:"Custom",cont:l}])));c=new Wi;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 qj(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:fa.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:fa.VARIANT_DETAIL};g={tp:"Label",id:"snippetscode",tx:k.ln.get("window-movieprop-snippetscode"),vr:fa.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"),fa.VARIANT_DETAIL));this._acstart=new qj(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 Wi;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:fa.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:fa.VARIANT_DETAIL};g={tp:"Label",id:"textsvalue",tx:k.ln.get("window-movieprop-textsvalue"),vr:fa.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 Wi;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:fa.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:fa.VARIANT_DETAIL};g={tp:"Label",id:"numbersvalue",tx:k.ln.get("window-movieprop-numbersvalue"),vr:fa.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 Wi;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:fa.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:fa.VARIANT_DETAIL};g={tp:"Label",id:"flagsvalue",tx:k.ln.get("window-movieprop-flagsvalue"),vr:fa.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 Rj("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),fa.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 Rj("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),fa.VARIANT_DETAIL,n),f=new Wi,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 Rj("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(),fa.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:fa.VARIANT_DETAIL};d={tp:"Label",id:"login",tx:k.ln.get("window-movieprop-accesslogin"),vr:fa.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:fa.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:fa.VARIANT_DETAIL};l={tp:"Label",id:"fallback",tx:k.ln.get("window-movieprop-accessfallback"),vr:fa.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);ca.prototype.startInterface.call(this)},kill:function(){ca.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=Fa.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=F.parseInt(p.mdata.loadingic[1]),this._loadingic.frtime=F.parseInt(p.mdata.loadingic[2]),this._loadingic.load(p.mdata.loadingic[0]));
this.ui.setSelectOptions("movieindex",[]);var b=k.ws;a=new H;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=Fa.jsonParse(p.mdata.theme);if(b!=0)for(a=0,c=u.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(u.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=Fa.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 H,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");U.substr(a,0,2)!="0x"&&(a="0x"+a);F.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=Fa.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 H,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");U.substr(a,0,2)!="0x"&&(a="0x"+a);F.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(),F.string(this._loadingic.frames),F.string(this._loadingic.frtime)]);a=Fa.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:Fa.jsonStringify(a)});var b=k.ws,c=new H,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=Fa.jsonStringify({css:this._cssArea.get_text()});var b=k.ws,c=new H,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=Fa.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=Fa.jsonStringify({acstart:this._acstart.getText()});var b=k.ws,c=new H,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=u.fields(c);a<d.length;){var f=
d[a];++a;switch(f){case "about":p.mdata.description=u.field(c,f);break;case "acstart":p.mdata.acstart=u.field(c,f);break;case "actions":f=Fa.jsonParse(u.field(c,f));f!=0&&(p.mdata.actions=f);break;case "animation":p.mdata.animation=u.field(c,f);p.area.setAnimation(p.mdata.animation);break;case "author":p.mdata.author=u.field(c,f);break;case "copyleft":p.mdata.copyleft=u.field(c,f);break;case "copyright":p.mdata.copyright=u.field(c,f);break;case "css":p.mdata.style=u.field(c,f);p.style.clear();p.style.parseCSS(p.mdata.style);
break;case "fallback":p.mdata.fallback=u.field(c,f);break;case "favicon":p.mdata.favicon=u.field(c,f);break;case "flags":f=Fa.jsonParse(u.field(c,f));if(f!=0){p.mdata.flags=new H;for(var g=0,h=u.fields(f);g<h.length;){var n=h[g];++g;var l=x.__cast(u.field(f,n),fw);p.mdata.flags.h[n]=l}}break;case "highlight":p.mdata.highlight=u.field(c,f);p.mdata.highlightInt=F.parseInt(p.mdata.highlight);break;case "identify":p.mdata.identify=u.field(c,f)=="1";break;case "image":p.mdata.image=u.field(c,f);break;
case "inputs":f=Fa.jsonParse(u.field(c,f));if(f!=0)for(g=0,h=u.fields(f);g<h.length;)n=h[g],++g,l=x.__cast(u.field(f,n),String),p.mdata.inputs.h[n]=l;break;case "key":p.mdata.key=u.field(c,f);break;case "loadingic":p.mdata.loadingic=Fa.jsonParse(u.field(c,f));break;case "numbers":f=Fa.jsonParse(u.field(c,f));if(f!=0)for(p.mdata.numbers=new H,g=0,h=u.fields(f);g<h.length;)n=h[g],++g,l=x.__cast(u.field(f,n),Oz),p.mdata.numbers.h[n]=l;break;case "origin":p.mdata.origin=u.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=u.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=u.field(c,f);break;case "tags":p.mdata.tags=u.field(c,f).split(",");break;case "texts":f=Fa.jsonParse(u.field(c,f));if(f!=0)for(p.mdata.texts=new H,g=0,h=u.fields(f);g<h.length;)n=h[g],++g,l=x.__cast(u.field(f,
n),String),p.mdata.texts.h[n]=l;break;case "theme":p.mdata.theme=u.field(c,f);break;case "time":f=parseFloat(u.field(c,f));p.mdata.time=f;break;case "title":p.mdata.title=u.field(c,f);break;case "vsgroups":p.mdata.vsgroups=u.field(c,f).split(",")}}b.map.h.reload?(f=this._ac,a=new H,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 H,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 tm(k.econfig.get_player()+"movie/"+p.movie.get_mvId()+".movie/media/font/"+F.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(Fa.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=Fa.jsonStringify(b);b=Fa.jsonStringify({actions:a});c=k.ws;a=new H;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 H;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(),Fa.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 H,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 H;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=Fa.jsonStringify({texts:Fa.jsonStringify(b)});c=k.ws;a=new H;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 H;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=Fa.jsonStringify({numbers:Fa.jsonStringify(b)});c=k.ws;a=new H;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 H;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=Fa.jsonStringify({flags:Fa.jsonStringify(b)});c=k.ws;a=new H;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 H;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=Fa.jsonStringify({theme:Fa.jsonStringify(b)});c=k.ws;a=new H;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 H;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=Fa.jsonStringify({inputs:Fa.jsonStringify(a)});b=k.ws;c=new H;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=Fa.jsonStringify({plugins:a.join(",")});b=k.ws;c=new H;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=Fa.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=Fa.jsonStringify({key:b,identify:c,fallback:this.ui.selects.h.fallback.get_selectedItem().value,vsgroups:f.join(","),encrypt:d});c=k.ws;a=new H;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=u.fields(b.map.h.list);a<d.length;){var f=d[a];++a;f=u.field(b.map.h.list,f);Object.prototype.hasOwnProperty.call(f,"id")&&c.push({text:u.field(f,"title"),value:u.field(f,"id")})}}this.ui.setSelectOptions("movieindex",
c);this.ui.setSelectValue("movieindex",p.mdata.start);b=k.ws;a=new H;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=u.fields(b.map.h.list);c<d.length;){var f=d[c];++c;f=u.field(b.map.h.list,f);a.push({text:u.field(f,"title"),value:u.field(f,"id")});this.ui.setSelectOptions("fallback",a)}this.ui.setSelectValue("fallback",p.mdata.fallback);a=[];c=0;for(d=u.fields(b.map.h.group);c<d.length;)f=d[c],++c,f=u.field(b.map.h.group,f),a.push({text:u.field(f,"name"),value:u.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__:os});var qs=function(a){ca.call(this,a,k.ln.get("window-movieremove-title"),700,zc.pickValue(380,400),!1,!0,!0)};t["com.tilbuci.ui.window.movie.WindowMovieRemove"]=qs;qs.__name__="com.tilbuci.ui.window.movie.WindowMovieRemove";qs.__super__=ca;qs.prototype=I(ca.prototype,{startInterface:function(a){a=this.ui;var b={tp:"Label",id:"about",tx:k.ln.get("window-movieremove-about"),vr:fa.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)}]));ca.prototype.startInterface.call(this);this.ui.labels.h.about.set_wordWrap(!0)},kill:function(){ca.prototype.kill.call(this)},acStart:function(){var a=k.ws,b=new H;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=u.fields(b.map.h.list);c<
d.length;){var f=d[c];++c;f=u.field(b.map.h.list,f);a.push({text:u.field(f,"title"),value:u.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 H,c=this.ui.lists.h.list.get_selectedItem().value;
b.h.id=c;a.send("Movie/Remove",b,m(this,this.onList))}},__class__:qs});var rs=function(a){this._sequence=[];ca.call(this,a,k.ln.get("window-republish-title"),800,zc.pickValue(180,200),!1,!0,!0)};t["com.tilbuci.ui.window.movie.WindowMovieRepublish"]=rs;rs.__name__="com.tilbuci.ui.window.movie.WindowMovieRepublish";rs.__super__=ca;rs.prototype=I(ca.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);ca.prototype.startInterface.call(this)},kill:function(){ca.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 H,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__:rs});var ts=function(a){this._sequence=[];ca.call(this,a,k.ln.get("window-movieseq-title"),800,zc.pickValue(630,660),!1,!0,!0)};t["com.tilbuci.ui.window.movie.WindowMovieSequences"]=ts;ts.__name__="com.tilbuci.ui.window.movie.WindowMovieSequences";ts.__super__=ca;ts.prototype=I(ca.prototype,{_sequence:null,startInterface:function(a){var b=this.ui.createHContainer("order");b.addChild(new Qc("orderup",m(this,this.onUp),null,va.getBitmapData("btUp"),
!1));b.addChild(new Qc("orderdown",m(this,this.onDown),null,va.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:fa.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:fa.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:fa.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:fa.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));
ca.prototype.startInterface.call(this)},kill:function(){ca.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 H,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 H,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 H;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:u.field(d,"title"),value:u.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__:ts});var vs=function(a){this._warn=!1;ca.call(this,a,k.ln.get("window-moviesnip-title"),1100,zc.pickValue(630,660),!1,!0,!0)};t["com.tilbuci.ui.window.movie.WindowMovieSnippets"]=vs;vs.__name__="com.tilbuci.ui.window.movie.WindowMovieSnippets";vs.__super__=ca;vs.prototype=I(ca.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 qj(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:fa.VARIANT_DETAIL},n={tp:"Label",id:"snippets",tx:k.ln.get("window-moviesnip-snippets"),vr:fa.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:fa.VARIANT_DETAIL};n={tp:"Custom",cont:this._acarea};l={tp:"Label",id:"name",tx:k.ln.get("window-moviesnip-name"),vr:fa.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));ca.prototype.startInterface.call(this)},kill:function(){ca.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 H;var a=k.ws,b=new H,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 H,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=Fa.jsonAsMap(a),kb.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 H;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 H,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 H}}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 H,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 H;a=k.ws;b=new H;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 H;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(kb.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 H,c=p.movie.get_mvId();b.h.movie=c;c=N.replace(this.ui.inputs.h.grname.get_text()," ","");b.h.name=c;c=Fa.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__:vs});var As=function(a){ca.call(this,a,k.ln.get("window-movieusers-title"),700,zc.pickValue(580,420),!0,!0,!0)};t["com.tilbuci.ui.window.movie.WindowMovieUsers"]=As;As.__name__="com.tilbuci.ui.window.movie.WindowMovieUsers";As.__super__=ca;As.prototype=I(ca.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:fa.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:fa.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:fa.VARIANT_DETAIL,wrap:!0};d={tp:"Label",id:"ownernew",tx:k.ln.get("window-movieusers-ownernew"),vr:fa.VARIANT_DETAIL};f={tp:"Label",id:"ownernew",tx:k.ln.get("window-movieusers-ownernew2"),vr:fa.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)}]));ca.prototype.startInterface.call(this)},kill:function(){ca.prototype.kill.call(this)},acStart:function(){var a=k.ws,b=new H,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=u.fields(b.map.h.list);c<d.length;){var f=d[c];++c;a.push({text:u.field(b.map.h.list,f),value:u.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 H,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 H,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 H,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 H,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__:As});var hs=function(a){this._folderchange=this._diagchange=null;this._haschange=!1;this._lines=[];this._collections=
new H;this._list=new H;ca.call(this,a,k.ln.get("window-narrdiag-title"),1200,zc.pickValue(670,710),!1,!0,!0)};t["com.tilbuci.ui.window.narrative.WindowDiagChar"]=hs;hs.__name__="com.tilbuci.ui.window.narrative.WindowDiagChar";hs.__super__=ca;hs.prototype=I(ca.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=va.getBitmapData("btUp"),c=this.ui.hcontainers.h.lineorder;a.createIconButton("orderup",m(this,this.onUp),new Oa(b),null,c,!1);a=this.ui;b=va.getBitmapData("btDown");c=this.ui.hcontainers.h.lineorder;a.createIconButton("orderdown",m(this,this.onDown),new Oa(b),null,
c,!1);a=this.ui;b=va.getBitmapData("btDel");c=this.ui.hcontainers.h.lineorder;a.createIconButton("linerem",m(this,this.onRemLine),new Oa(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=va.getBitmapData("btOpenfile");c=this.ui.hcontainers.h.audio;a.createIconButton("audio",m(this,this.acAudio),new Oa(b),null,c,!1);a=this.ui;b=va.getBitmapData("btDel");c=this.ui.hcontainers.h.audio;a.createIconButton("audiodel",m(this,this.acAudiodel),new Oa(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:zc.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:zc.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 v={tp:"Custom",cont:this.ui.hcontainers.h.asset},w={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,v,
w,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)}]),zc.pickValue(580,600)));ca.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 H;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=u.fields(b.map.h.list);g<h.length;){a=h[g];++g;var n=u.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==
u.field(n,"id"))for(var l=u.field(n,"assets"),q=0,v=u.fields(l);q<v.length;){var w=v[q];++q;w=u.field(l,w);Object.prototype.hasOwnProperty.call(w,"id")&&Object.prototype.hasOwnProperty.call(w,"name")&&this._collections.h[f].chassets.push({asname:u.field(w,"name"),asid:u.field(w,"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:U.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 En({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 H;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 Fn({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 H;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 H;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=u.fields(b.map.h.ids);c<d.length;){var f=d[c];++c;var g=u.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:U.substr(N.trim(this.ui.inputs.h.text.get_text()),0,50),value:new ym({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:U.substr(N.trim(this.ui.inputs.h.text.get_text()),0,50),value:new ym({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__:hs});var es=function(a){this._list=new H;ca.call(this,a,k.ln.get("window-narrbattle-title"),1E3,580,!0,!0,!0)};t["com.tilbuci.ui.window.narrative.WindowNarrBattle"]=es;es.__name__=
"com.tilbuci.ui.window.narrative.WindowNarrBattle";es.__super__=ca;es.prototype=I(ca.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=va.getBitmapData("btOpenfile"),c=this.ui.hcontainers.h.imgbgh;a.createIconButton("imgbgh",m(this,this.acImgbgh),new Oa(b),null,c,!1);a=this.ui;b=va.getBitmapData("btDel");c=this.ui.hcontainers.h.imgbgh;a.createIconButton("imimgbghdel",m(this,this.acImgbghdel),
new Oa(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=va.getBitmapData("btOpenfile");c=this.ui.hcontainers.h.imgbgv;a.createIconButton("imgbgv",m(this,this.acImgbgv),new Oa(b),null,c,!1);a=this.ui;b=va.getBitmapData("btDel");c=this.ui.hcontainers.h.imgbgv;a.createIconButton("imimgbgvdel",m(this,this.acImgbgvdel),new Oa(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=va.getBitmapData("btOpenfile");c=this.ui.hcontainers.h.imgbt;a.createIconButton("imgbt",m(this,this.acImgbt),new Oa(b),null,c,!1);a=this.ui;b=va.getBitmapData("btDel");c=this.ui.hcontainers.h.imgbt;a.createIconButton("imgimgbtdel",m(this,this.acImgbtdel),new Oa(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=va.getBitmapData("btOpenfile");c=this.ui.hcontainers.h.imgattr;a.createIconButton("imgattr",m(this,this.acImgattr),new Oa(b),null,c,!1);a=this.ui;b=va.getBitmapData("btDel");c=this.ui.hcontainers.h.imgattr;a.createIconButton("imgattrdel",m(this,this.acImgattrdel),new Oa(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=va.getBitmapData("btOpenfile");c=this.ui.hcontainers.h.imgcard;
a.createIconButton("imgcard",m(this,this.acImgcard),new Oa(b),null,c,!1);a=this.ui;b=va.getBitmapData("btDel");c=this.ui.hcontainers.h.imgcard;a.createIconButton("imgcarddel",m(this,this.acImgcarddel),new Oa(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=va.getBitmapData("btOpenfile");c=this.ui.hcontainers.h.itgraphic;a.createIconButton("itgraphic",m(this,this.acItgraphic),
new Oa(b),null,c,!1);a=this.ui;b=va.getBitmapData("btDel");c=this.ui.hcontainers.h.itgraphic;a.createIconButton("itgraphicdel",m(this,this.acItgraphicdel),new Oa(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:fa.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:fa.VARIANT_DETAIL},l={tp:"Label",id:"set",tx:k.ln.get("window-narrbattle-cardat2"),vr:fa.VARIANT_DETAIL},
q={tp:"Label",id:"set",tx:k.ln.get("window-narrbattle-cardat3"),vr:fa.VARIANT_DETAIL},v={tp:"Label",id:"set",tx:k.ln.get("window-narrbattle-cardat4"),vr:fa.VARIANT_DETAIL},w={tp:"Label",id:"set",tx:k.ln.get("window-narrbattle-cardat5"),vr:fa.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},v,{tp:"Numeric",id:"cardat4",mn:-1E4,mx:1E4,st:1,vl:0},w,{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:fa.VARIANT_DETAIL};f={tp:"Label",id:"attr2",tx:k.ln.get("window-narrbattle-attr2"),vr:fa.VARIANT_DETAIL};g={tp:"Label",id:"attr3",tx:k.ln.get("window-narrbattle-attr3"),vr:fa.VARIANT_DETAIL};h={tp:"Label",id:"attr4",tx:k.ln.get("window-narrbattle-attr4"),vr:fa.VARIANT_DETAIL};n={tp:"Label",id:"attr5",tx:k.ln.get("window-narrbattle-attr5"),vr:fa.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:fa.VARIANT_DETAIL};f={tp:"Custom",cont:this.ui.hcontainers.h.imgbgh};g={tp:"Label",id:"imgbgv",tx:k.ln.get("window-narrbattle-imgbgv"),vr:fa.VARIANT_DETAIL};h={tp:"Custom",cont:this.ui.hcontainers.h.imgbgv};n={tp:"Label",id:"set",tx:k.ln.get("window-narrbattle-button"),vr:fa.VARIANT_DETAIL};l={tp:"Custom",cont:this.ui.hcontainers.h.imgbt};q={tp:"Label",id:"imgcard",tx:k.ln.get("window-narrbattle-card"),vr:fa.VARIANT_DETAIL};
v={tp:"Custom",cont:this.ui.hcontainers.h.imgcard};w={tp:"Label",id:"imgattr",tx:k.ln.get("window-narrbattle-imgattr"),vr:fa.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"},G={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,v,w,z,r,{tp:"Select",id:"font",vl:[],sl:null},G,{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:fa.VARIANT_DETAIL};
f={tp:"Label",id:"soundwin",tx:k.ln.get("window-narrbattle-soundwin"),vr:fa.VARIANT_DETAIL};g={tp:"Label",id:"soundloose",tx:k.ln.get("window-narrbattle-soundloose"),vr:fa.VARIANT_DETAIL};h={tp:"Label",id:"soundtie",tx:k.ln.get("window-narrbattle-soundtie"),vr:fa.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)}]));ca.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 ap({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 H;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=Fa.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 H,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 Uh,a.load({id:"bs",font:this.ui.selects.h.font.get_selectedItem().value,fontcolor:Fa.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 H;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 Uh;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 H;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 Uh;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 H;
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__:es});var fs=function(a){this._list=new H;ca.call(this,a,k.ln.get("window-narrchar-title"),1E3,530,!1,!0,!0)};t["com.tilbuci.ui.window.narrative.WindowNarrChar"]=fs;fs.__name__="com.tilbuci.ui.window.narrative.WindowNarrChar";fs.__super__=ca;fs.prototype=I(ca.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));ca.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 H;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 H;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 Dn,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__:fs});var gs=function(a){ca.call(this,a,k.ln.get("window-narrdflow-title"),1E3,580,!0,!0,!0)};t["com.tilbuci.ui.window.narrative.WindowNarrDflow"]=
gs;gs.__name__="com.tilbuci.ui.window.narrative.WindowNarrDflow";gs.__super__=ca;gs.prototype=I(ca.prototype,{startInterface:function(a){this.ui.createHContainer("imgbt");this.ui.createTInput("imgbt","","",this.ui.hcontainers.h.imgbt,!1);a=this.ui;var b=va.getBitmapData("btOpenfile"),c=this.ui.hcontainers.h.imgbt;a.createIconButton("imgbt",m(this,this.acImgbt),new Oa(b),null,c,!1);a=this.ui;b=va.getBitmapData("btDel");c=this.ui.hcontainers.h.imgbt;a.createIconButton("imgimgbtdel",m(this,this.acImgbtdel),
new Oa(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:fa.VARIANT_DETAIL},f={tp:"Custom",cont:this.ui.hcontainers.h.imgbt},g={tp:"Label",id:"position",tx:k.ln.get("window-narrdflow-position"),vr:fa.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:fa.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"},v={tp:"Label",id:"fontc",tx:k.ln.get("window-narrdflow-fontc"),vr:"detail"},w=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},v,{tp:"TInput",id:"fontc",tx:"#FFFFFF",vr:""},{tp:"Spacer",id:"gap",ht:110,ln:!1},{tp:"Button",id:"set",tx:w,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)}])));ca.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(Fa.colorHex(p.contraptions.dflow.h.dflow.fontcolor,"#FFFFFF")));this.ui.setListValues("scenes",[]);this.ui.setListValues("options",[]);a=k.ws;b=new H;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 Fd,a.load({id:"dflow",font:this.ui.selects.h.font.get_selectedItem().value,fontcolor:Fa.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 H;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__:gs});var is=function(a){this._list=new H;ca.call(this,a,k.ln.get("window-narrinv-title"),1E3,580,!0,!0,!0)};t["com.tilbuci.ui.window.narrative.WindowNarrInv"]=is;is.__name__="com.tilbuci.ui.window.narrative.WindowNarrInv";is.__super__=ca;is.prototype=I(ca.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=va.getBitmapData("btOpenfile"),c=this.ui.hcontainers.h.imgbgh;a.createIconButton("imgbgh",m(this,this.acImgbgh),new Oa(b),null,c,!1);a=this.ui;b=va.getBitmapData("btDel");c=this.ui.hcontainers.h.imgbgh;a.createIconButton("imimgbghdel",m(this,this.acImgbghdel),new Oa(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=va.getBitmapData("btOpenfile");c=this.ui.hcontainers.h.imgbgv;a.createIconButton("imgbgv",m(this,this.acImgbgv),new Oa(b),null,c,!1);a=this.ui;b=va.getBitmapData("btDel");c=this.ui.hcontainers.h.imgbgv;a.createIconButton("imimgbgvdel",m(this,this.acImgbgvdel),new Oa(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=va.getBitmapData("btOpenfile");c=this.ui.hcontainers.h.imgbt;a.createIconButton("imgbt",m(this,this.acImgbt),new Oa(b),null,c,!1);a=this.ui;b=va.getBitmapData("btDel");c=this.ui.hcontainers.h.imgbt;a.createIconButton("imgimgbtdel",m(this,this.acImgbtdel),new Oa(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=va.getBitmapData("btOpenfile");c=this.ui.hcontainers.h.itgraphic;
a.createIconButton("itgraphic",m(this,this.acItgraphic),new Oa(b),null,c,!1);a=this.ui;b=va.getBitmapData("btDel");c=this.ui.hcontainers.h.itgraphic;a.createIconButton("itgraphicdel",m(this,this.acItgraphicdel),new Oa(b),null,c,!1);this.ui.inputs.h.itgraphic.set_enabled(!1);this._acsnippet=new qj(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:fa.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:fa.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:fa.VARIANT_DETAIL};h={tp:"Custom",cont:this.ui.hcontainers.h.imgbgh};n={tp:"Label",id:"imgbgv",
tx:k.ln.get("window-narrinv-imgbgv"),vr:fa.VARIANT_DETAIL};l={tp:"Custom",cont:this.ui.hcontainers.h.imgbgv};q={tp:"Label",id:"set",tx:k.ln.get("window-narrinv-button"),vr:fa.VARIANT_DETAIL};var v={tp:"Custom",cont:this.ui.hcontainers.h.imgbt},w={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"},G={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,v,w,{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},G,{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)}]));ca.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 bp({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 H;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 K,a.load({id:"inv",font:this.ui.selects.h.font.get_selectedItem().value,fontcolor:Fa.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 H;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__:is});var Cr=function(a){ca.call(this,a,k.ln.get("window-scenedflow-title"),600,zc.pickValue(475,485),!1,!0,!0)};
t["com.tilbuci.ui.window.scene.WindowSceneDflow"]=Cr;Cr.__name__="com.tilbuci.ui.window.scene.WindowSceneDflow";Cr.__super__=ca;Cr.prototype=I(ca.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"),fa.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"),fa.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},v={tp:"Custom",cont:this.ui.hcontainers.h.dflows3},w={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},G=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,v,{tp:"Spacer",id:"choice3",ht:10,ln:!0},w,z,r,{tp:"Spacer",id:"choice4",ht:10,ln:!1},{tp:"Button",id:"okbutton",tx:G,ac:m(this,this.onSave)}]));ca.prototype.startInterface.call(this)},kill:function(){ca.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 H,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:u.field(d,
"title"),value:u.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__:Cr});var ks=function(a){ca.call(this,a,k.ln.get("window-scenenew-title"),800,zc.pickValue(170,190),!1,!0,!0)};t["com.tilbuci.ui.window.scene.WindowSceneNew"]=
ks;ks.__name__="com.tilbuci.ui.window.scene.WindowSceneNew";ks.__super__=ca;ks.prototype=I(ca.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:fa.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)}]));ca.prototype.startInterface.call(this)},
kill:function(){ca.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 H,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 H;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__:ks});var ms=function(a){ca.call(this,a,k.ln.get("window-sceneopen-title"),800,zc.pickValue(415,430),!1,!0,!0)};t["com.tilbuci.ui.window.scene.WindowSceneOpen"]=
ms;ms.__name__="com.tilbuci.ui.window.scene.WindowSceneOpen";ms.__super__=ca;ms.prototype=I(ca.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)}]));ca.prototype.startInterface.call(this);this.ui.listDbClick("openlist",m(this,
this.onOpen));this.ui.setListToIcon("openlist")},kill:function(){ca.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 H,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;u.field(d,"lock")==""?b.push({text:u.field(d,"title"),value:u.field(d,"id"),asset:"",user:null}):b.push({text:u.field(d,"title"),value:u.field(d,"id"),asset:"btLock",user:u.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 H,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__:ms});var ps=function(a){this._collections=new H;this._kfactext=[];ca.call(this,
a,k.ln.get("window-sceneprop-windowtitle"),1E3,zc.pickValue(590,660),!0,!0,!0)};t["com.tilbuci.ui.window.scene.WindowSceneProperties"]=ps;ps.__name__="com.tilbuci.ui.window.scene.WindowSceneProperties";ps.__super__=ca;ps.prototype=I(ca.prototype,{_acstart:null,_kfactions:null,_kfactext:null,_image:null,_collections:null,startInterface:function(a){this._image=new Zc(m(this,this.onImageLoaded));this._image.set_height(130);this._image.set_visible(!0);a=new Rj("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)},v={tp:"Button",id:"imagerm",tx:k.ln.get("window-sceneprop-imagerm"),ac:m(this,this.onImageRemove)},w=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,v,{tp:"Custom",cont:a},{tp:"Button",id:"about",tx:w,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"),fa.VARIANT_DETAIL));this._acstart=new qj(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 qj(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:fa.VARIANT_DETAIL};f={tp:"Label",id:"kfactions",tx:k.ln.get("window-sceneprop-kfactions"),vr:fa.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);ca.prototype.startInterface.call(this)},acStart:function(){this._kfactext=[];this._collections=new H;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 H;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:u.field(a,"title"),value:u.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:F.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(){ca.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]!=
""&&Fa.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]",F.string(b+1)),300,180,this.stage);else if(Fa.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 H,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__:ps});var ss=function(a){ca.call(this,a,k.ln.get("window-scenesaveas-title"),800,zc.pickValue(180,200),!1,!0,!0)};t["com.tilbuci.ui.window.scene.WindowSceneSaveas"]=ss;ss.__name__="com.tilbuci.ui.window.scene.WindowSceneSaveas";ss.__super__=ca;ss.prototype=I(ca.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:fa.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)}]));ca.prototype.startInterface.call(this)},acStart:function(){this.ui.inputs.h.scenename.set_text(p.movie.scene.title)},kill:function(){ca.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 H;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 H;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__:ss});var Bs=function(a){ca.call(this,
a,k.ln.get("window-sceneversion-title"),600,zc.pickValue(420,430),!1,!0,!0)};t["com.tilbuci.ui.window.scene.WindowSceneVersions"]=Bs;Bs.__name__="com.tilbuci.ui.window.scene.WindowSceneVersions";Bs.__super__=ca;Bs.prototype=I(ca.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");ca.prototype.startInterface.call(this)},kill:function(){ca.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 H,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=u.fields(b.map.h.list);c<d.length;){var f=d[c];++c;u.field(u.field(b.map.h.list,f),"pub")=="1"?a.push({text:u.field(u.field(b.map.h.list,f),"date"),value:u.field(u.field(b.map.h.list,f),"uid"),user:u.field(u.field(b.map.h.list,f),"user"),asset:"iconPublished"}):a.push({text:u.field(u.field(b.map.h.list,f),
"date"),value:u.field(u.field(b.map.h.list,f),"uid"),user:u.field(u.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 H,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__:Bs});var br=function(a){this._level=-1;this._key="";this._user="system";ma.call(this);this._url=a;this._interact=new nt};t["com.tilbuci.ws.Webservice"]=br;br.__name__="com.tilbuci.ws.Webservice";br.__super__=ma;br.prototype=I(ma.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=Fa.jsonStringify(b);b=this._url;var h=new H;h.h.r=g;g=Fa.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=vm._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 ne(b);a.data=c;a.method="GET";La.getURL(a)},openurl:function(a){a=new ne(a);a.method="GET";La.getURL(a)},openWorkspace:function(){var a=N.replace(this._url,"/ws","/editor"),b=vm._new();b.us=this._user;b.uk=Fa.md5(this._user+this._key);a=new ne(a);a.data=b;a.method="GET";La.getURL(a)},kill:function(){this._key=this._user=this._url=null},
onEnd:function(){this._interact.stop()},__class__:br,__properties__:{get_level:"get_level",get_key:"get_key",get_user:"get_user",get_url:"get_url"}});var yn=function(a,b){this._groups=[];this._level=-1;this._key="";this._user="system";ma.call(this);this._url=a;this._user="system";this._key=b;this._groups=[]};t["com.tilbuci.ws.WebserviceP"]=yn;yn.__name__="com.tilbuci.ws.WebserviceP";yn.__super__=ma;yn.prototype=I(ma.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=Fa.jsonStringify(b);b=this._url;var g=new H;g.h.r=f;f=Fa.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 H;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 H;d.h.email=a;d.h.code=b;return this.send("System/VisitorCode",d,c)},checkVisitorKey:function(a,b,c){var d=new H;d.h.email=a;d.h.key=b;return this.send("System/VisitorKey",d,c)},dataSave:function(a,b,c){var d=new H;d.h.name=a;a=Fa.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 H;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 H;a=Fa.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 H;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 H;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 H;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__:yn,__properties__:{get_groups:"get_groups",get_level:"get_level",get_key:"get_key",get_user:"get_user",get_url:"get_url"}});var np=function(){this.__indeterminateDuration=.75;this.__activitySkin=null;this._lastUpdateTime=0;this._reversed=!1;this._savedSkinAlpha=1;this._activitySkinMeasurements=null;this.initializeActivityIndicatorTheme();da.call(this);this.addEventListener("addedToStage",m(this,this.activityIndicator_addedToStageHandler));this.addEventListener("removedFromStage",
m(this,this.activityIndicator_removedFromStageHandler))};t["feathers.controls.ActivityIndicator"]=np;np.__name__="feathers.controls.ActivityIndicator";np.__super__=da;np.prototype=I(da.prototype,{_currentActivitySkin:null,_activitySkinMeasurements:null,_savedSkinAlpha:null,_reversed:null,_lastUpdateTime:null,initializeActivityIndicatorTheme:function(){zw.initialize()},update:function(){var a=this.isInvalid(y.SIZE),b=this.isInvalid(y.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;x.__implements(this._currentActivitySkin,tb)&&(h=this._currentActivitySkin);
x.__implements(this._currentActivitySkin,ba)&&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);x.__implements(this._currentActivitySkin,ba)&&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:(x.__implements(a,
Ea)&&a.initializeNow(),this._activitySkinMeasurements==null?this._activitySkinMeasurements=new Sb(a):this._activitySkinMeasurements.save(a),this._savedSkinAlpha=a.get_alpha(),x.__implements(a,sb)&&a.set_uiContext(this),this.addChildAt(a,0))},removeCurrentBackgroundSkin:function(a){a!=null&&(x.__implements(a,sb)&&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=
La.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=La.getTimer();var b=(a-this._lastUpdateTime)/(this.get_indeterminateDuration()*1E3);b>=1&&(b-=Math.floor(b),this._lastUpdateTime=a,this._reversed=
!this._reversed);x.__implements(this._currentActivitySkin,Dm)?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(y.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(y.STYLES);return this.__indeterminateDuration},
clearStyle_indeterminateDuration:function(){this.set_indeterminateDuration(.75);return this.get_indeterminateDuration()},__class__:np,__properties__:I(da.prototype.__properties__,{set_indeterminateDuration:"set_indeterminateDuration",get_indeterminateDuration:"get_indeterminateDuration",set_activitySkin:"set_activitySkin",get_activitySkin:"get_activitySkin"})});var op=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"]=
op;op.__name__="feathers.data.ButtonBarItemState";op.prototype={owner:null,data:null,index:null,text:null,enabled:null,recyclerID:null,__class__:op};var Ze=function(a,b){this.__customButtonVariant=this.__layout=this.__backgroundSkin=this.__disabledBackgroundSkin=null;this._ignoreChildChanges=!1;this._layoutResult=new Ng;this._layoutMeasurements=new Sb;this._currentBackgroundSkin=this._backgroundSkinMeasurements=null;this._ignoreSelectionChange=!1;this._layoutItems=[];this._unrenderedData=[];this.itemStatePool=
new dc(function(){return new op});this.buttonToItemState=new Ta;this.stringDataToButton=new H;this.objectDataToButton=new Ta;this._additionalStorage=null;this._defaultStorage=new tt(null,Me.withClass(Wb));this._recyclerMap=null;this._forceItemStateUpdate=!1;this._previousCustomButtonVariant=null;this.initializeButtonBarTheme();da.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__=da;Ze.prototype=I(da.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(y.DATA);X.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(y.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 F.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 op;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 H);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);da.prototype.dispose.call(this)},initializeButtonBarTheme:function(){Bw.initialize()},update:function(){var a=this.isInvalid(y.DATA);this.isInvalid(y.LAYOUT);var b=this.isInvalid(y.SELECTION),c=this.isInvalid(y.STATE),d=this.isInvalid(y.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(!x.__implements(c,ba))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=x.getClass(this),new pb(""+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=x.getClass(this),new pb(""+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=x.getClass(this),new pb(""+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:(x.__implements(a,Ea)&&a.initializeNow(),this._backgroundSkinMeasurements==null?this._backgroundSkinMeasurements=new Sb(a):this._backgroundSkinMeasurements.save(a),x.__implements(a,sb)&&a.set_uiContext(this),this.addChildAt(a,0))},removeCurrentBackgroundSkin:function(a){a!=null&&(x.__implements(a,sb)&&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),x.__implements(this._currentBackgroundSkin,
ba)&&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(!U.remove(q.inactiveButtons,g))throw a=x.getClass(this),new pb(""+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 pb('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 tt(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;x.__implements(a,
Ea)&&a.set_enabled(b.enabled);x.__implements(a,Gh)&&a.set_data(b.data);x.__implements(a,yi)&&a.set_layoutIndex(b.index);a.set_enabled(b.enabled);this._ignoreSelectionChange=c},buttonBar_button_triggerHandler:function(a){a=x.__cast(a.currentTarget,Wb);Tj.dispatch(this,"itemTrigger",this.buttonToItemState.h[a.__id__])},buttonBar_dataProvider_changeHandler:function(a){this.setInvalid(y.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(y.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(y.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(y.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(y.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(y.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(y.STYLES);return this.__disabledBackgroundSkin},clearStyle_disabledBackgroundSkin:function(){this.set_disabledBackgroundSkin(null);return this.get_disabledBackgroundSkin()},get_styleContext:function(){return Ze},__class__:Ze,__properties__:I(da.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 Si=function(a){a==null&&(a="");this.__verticalAlign=fc.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();da.call(this);this.set_text(a)};t["feathers.controls.Header"]=Si;Si.__name__="feathers.controls.Header";Si.__interfaces__=[te];Si.__super__=da;Si.prototype=I(da.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(y.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(y.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(y.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(y.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);da.prototype.dispose.call(this)},initializeHeaderTheme:function(){Kw.initialize()},initialize:function(){da.prototype.initialize.call(this);this.textField==null&&(this.textField=new Ic,this.textField.set_multiline(!0),this.textField.set_selectable(!1),this.addChild(this.textField))},update:function(){var a=this.isInvalid(y.DATA),b=this.isInvalid(y.LAYOUT),c=this.isInvalid(y.SIZE),d=this.isInvalid(y.STATE),
f=this.isInvalid(y.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;x.__implements(this._currentBackgroundSkin,tb)&&(l=this._currentBackgroundSkin);x.__implements(this._currentBackgroundSkin,ba)&&this._currentBackgroundSkin.validateNow();x.__implements(this._leftView,ba)&&this._leftView.validateNow();x.__implements(this._rightView,ba)&&
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:(x.__implements(a,Ea)&&a.initializeNow(),this._backgroundSkinMeasurements==null?this._backgroundSkinMeasurements=new Sb(a):this._backgroundSkinMeasurements.save(a),x.__implements(a,sb)&&a.set_uiContext(this),this.addChildAt(a,0))},removeCurrentBackgroundSkin:function(a){a!=
null&&(x.__implements(a,sb)&&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){x.__implements(this._leftView,ba)&&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){x.__implements(this._rightView,ba)&&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),x.__implements(this._currentBackgroundSkin,ba)&&this._currentBackgroundSkin.validateNow())},header_textFormat_changeHandler:function(a){this.setInvalid(y.STYLES)},header_leftView_resizeHandler:function(a){this._ignoreLeftViewResize||
this.setInvalid(y.LAYOUT)},header_rightView_resizeHandler:function(a){this._ignoreRightViewResize||this.setInvalid(y.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(y.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(y.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(y.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(y.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(y.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(y.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(y.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(y.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(y.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(y.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(y.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(y.STYLES);return this.__verticalAlign},
clearStyle_verticalAlign:function(){this.set_verticalAlign(fc.MIDDLE);return this.get_verticalAlign()},__class__:Si,__properties__:I(da.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 Hd=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();Tc.call(this);this.set_text(a)};t["feathers.controls.Alert"]=Hd;Hd.__name__="feathers.controls.Alert";Hd.show=function(a,b,c,d,f,g){f=f!=null?f():new Hd;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 rx(c[n])}c=a}else c=[];f.set_buttonsDataProvider(new fg(c));d!=null&&
f.addEventListener("itemTrigger",function(l){d(l.state)});return Hd.showAlert(f,g)};Hd.showAlert=function(a,b){b!=null?b.open(a,La.get_current()):Aa.addPopUp(a,La.get_current(),!0,!0);return a};Hd.__super__=Tc;Hd.prototype=I(Tc.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(y.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(y.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(y.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(Hd.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(Hd.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(Hd.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(y.DATA);return this._buttonsDataProvider},_iconMeasurements:null,_currentIcon:null,_ignoreIconResizes:null,_previousCustomButtonBarVariant:null,_previousCustomHeaderVariant:null,_previousCustomMessageLabelVariant:null,set_header:function(a){throw new pb("Alert header must be created with headerFactory");},_set_header:function(a){return Tc.prototype.set_header.call(this,a)},set_footer:function(a){throw new pb("Alert footer must be created with buttonBarFactory");
},_set_footer:function(a){return Tc.prototype.set_footer.call(this,a)},dispose:function(){this.destroyButtonBar();this.destroyHeader();this.destroyMessageLabel();Tc.prototype.dispose.call(this)},initializeAlertTheme:function(){Aw.initialize()},update:function(){var a=this.isInvalid(y.DATA),b=this.isInvalid(y.STATE),c=this.isInvalid(y.STYLES);this._previousCustomButtonBarVariant!=this.get_customButtonBarVariant()&&this.setInvalidationFlag(Hd.INVALIDATION_FLAG_BUTTON_BAR_FACTORY);var d=this.isInvalid(Hd.INVALIDATION_FLAG_BUTTON_BAR_FACTORY);
this._previousCustomHeaderVariant!=this.get_customHeaderVariant()&&this.setInvalidationFlag(Hd.INVALIDATION_FLAG_HEADER_FACTORY);var f=this.isInvalid(Hd.INVALIDATION_FLAG_HEADER_FACTORY);this._previousCustomMessageLabelVariant!=this.get_customMessageLabelVariant()&&this.setInvalidationFlag(Hd.INVALIDATION_FLAG_MESSAGE_LABEL_FACTORY);var g=this.isInvalid(Hd.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();Tc.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:Hd.defaultButtonBarFactory;this._oldButtonBarFactory=
b;this.buttonBar=b.create();this.buttonBar.get_variant()==null&&this.buttonBar.set_variant(this.get_customButtonBarVariant()!=null?this.get_customButtonBarVariant():Hd.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:Hd.defaultHeaderFactory;this._oldHeaderFactory=b;this.alertHeader=b.create();this.alertHeader.get_variant()==null&&this.alertHeader.set_variant(this.get_customHeaderVariant()!=null?this.get_customHeaderVariant():
Hd.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:Hd.defaultMessageLabelFactory;
this._oldMessageLabelFactory=a;this.messageLabel=a.create();this.messageLabel.get_variant()==null&&this.messageLabel.set_variant(this.get_customMessageLabelVariant()!=null?this.get_customMessageLabelVariant():Hd.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:(x.__implements(this._currentIcon,Ea)&&
this._currentIcon.initializeNow(),this._iconMeasurements==null?this._iconMeasurements=new Sb(this._currentIcon):this._iconMeasurements.save(this._currentIcon),x.__implements(this._currentIcon,sb)&&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&&(x.__implements(a,sb)&&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 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(y.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(y.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(y.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(y.STYLES);return this.__customMessageLabelVariant},clearStyle_customMessageLabelVariant:function(){this.set_customMessageLabelVariant(null);return this.get_customMessageLabelVariant()},__class__:Hd,__properties__:I(Tc.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 rx=function(a){this._text=a};t["feathers.controls._Alert.StringWrapper"]=rx;rx.__name__="feathers.controls._Alert.StringWrapper";
rx.prototype={_text:null,toString:function(){return this._text},__class__:rx};var Kn=function(a,b){this._scaleMode=3;this._scaleModeMask=null;this._sourceScale=1;this._contentMeasurements=new Sb;da.call(this);this.set_source(a);b!=null&&this.addEventListener("complete",b)};t["feathers.controls.AssetLoader"]=Kn;Kn.__name__="feathers.controls.AssetLoader";Kn.__super__=da;Kn.prototype=I(da.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(y.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(Hb.exists(this._source,
"IMAGE"))if(this.cleanupLoader(),Hb.isLocal(this._source,"IMAGE"))this._pendingFuture=null,a=Hb.getBitmapData(this._source),a=this.createBitmap(a),this._contentMeasurements.save(a),this.addChild(a),this.content=a;else{var c=Hb.loadBitmapData(this._source);c.onProgress(function(f,g){b.dispatchEvent(new zh("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(y.DATA),b.dispatchEvent(new na("complete")))}).onError(function(f){b.dispatchEvent(new Vh("ioError"))});
this._pendingFuture=c}else if(Hb.exists(this._source,"MOVIE_CLIP"))if(this.cleanupLoader(),Hb.isLocal(this._source,"MOVIE_CLIP"))this._pendingFuture=null,a=Hb.getMovieClip(this._source),this._contentMeasurements.save(a),this.addChild(a),this.content=a;else{var d=Hb.loadMovieClip(this._source);d.onProgress(function(f,g){b.dispatchEvent(new zh("progress",!1,!1,f,g))}).onComplete(function(f){d==b._pendingFuture&&(b._contentMeasurements.save(f),b.addChild(f),b.content=f,b.setInvalid(y.DATA),b.dispatchEvent(new na("complete")))}).onError(function(f){b.dispatchEvent(new Vh("ioError"))});
this._pendingFuture=d}else{this._pendingFuture=null;this.loader==null&&(this.loader=new If,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 ne(this._source))}catch(f){Pb.lastError=f,a=Z.caught(f).unwrap(),a instanceof ut&&this.dispatchEvent(new Em("securityError",!1,!1,a.get_message(),a.errorID))}}this.setInvalid(y.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(y.LAYOUT);return this._scaleMode},dispose:function(){this.set_source(null);da.prototype.dispose.call(this)},update:function(){this.isInvalid(y.DATA);this.isInvalid(y.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 v=this.get_explicitWidth();a&&(v=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(v,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 Ha(0,0,this._contentMeasurements.width,this._contentMeasurements.height),c=new Ha(0,
0,this.actualWidth,this.actualHeight);a=Rl.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);x.__implements(this.content,ba)&&this.content.validateNow();a=this.content.get_width()>this.actualWidth||this.content.get_height()>
this.actualHeight;break;default:b=new Ha(0,0,this._contentMeasurements.width,this._contentMeasurements.height),c=new Ha(0,0,this.actualWidth,this.actualHeight),Rl.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 ab(vb.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 Oa(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(y.LAYOUT);this.dispatchEvent(a)},get_styleContext:function(){return Kn},__class__:Kn,__properties__:I(da.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__=[Ea];ud.prototype={get_selected:null,set_selected:null,__class__:ud,__properties__:{set_selected:"set_selected",get_selected:"get_selected"}};var zi=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);da.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"]=zi;zi.__name__="feathers.controls.BasicToggleButton";
zi.__interfaces__=[Bh,ud,Xh];zi.__super__=da;zi.prototype=I(da.prototype,{_currentState:null,get_currentState:function(){return this._currentState},set_enabled:function(a){da.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(y.SELECTION);this.setInvalid(y.STATE);X.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(y.STYLES)}},initialize:function(){da.prototype.initialize.call(this);this._pointerToState==null&&(this._pointerToState=new zm(this,m(this,this.changeState),Yb.UP(!1),Yb.DOWN(!1),Yb.HOVER(!1)));this._keyToState==
null&&(this._keyToState=new Gn(this,m(this,this.changeState),Yb.UP(!1),Yb.DOWN(!1)));this._pointerTrigger==null&&(this._pointerTrigger=new Rs(this))},update:function(){this.commitChanges();this.measure();this.layoutContent()},commitChanges:function(){var a=this.isInvalid(y.SELECTION),b=this.isInvalid(y.STYLES),c=this.isInvalid(y.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:(x.__implements(a,Ea)&&a.initializeNow(),this._backgroundSkinMeasurements==null?this._backgroundSkinMeasurements=new Sb(a):this._backgroundSkinMeasurements.save(a),x.__implements(a,sb)&&a.set_uiContext(this),x.__implements(a,ge)&&a.set_stateContext(this),this.addChildAt(a,0))},removeCurrentBackgroundSkin:function(a){a!=null&&(x.__implements(a,sb)&&a.set_uiContext(null),x.__implements(a,ge)&&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;x.__implements(this._currentBackgroundSkin,tb)&&(h=this._currentBackgroundSkin);
x.__implements(this._currentBackgroundSkin,ba)&&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),
x.__implements(this._currentBackgroundSkin,ba)&&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(y.STATE),X.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(y.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(y.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(y.STYLES);return this.__selectedBackgroundSkin},clearStyle_selectedBackgroundSkin:function(){this.set_selectedBackgroundSkin(null);return this.get_selectedBackgroundSkin()},__class__:zi,__properties__:I(da.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 tt=function(a,b){this.inactiveButtons=[];this.activeButtons=[];this.id=a;this.buttonRecycler=b};t["feathers.controls._ButtonBar.ButtonStorage"]=tt;
tt.__name__="feathers.controls._ButtonBar.ButtonStorage";tt.prototype={id:null,oldButtonRecycler:null,buttonRecycler:null,activeButtons:null,inactiveButtons:null,__class__:tt};var Jc=Q["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}};Jc.__constructs__=[Jc.UP,Jc.HOVER,Jc.DOWN,Jc.DISABLED];var ed=function(a,b,c){b==null&&(b=!1);this.__showText=!0;this.__iconOffsetX=this.__iconOffsetY=this.__textOffsetX=this.__textOffsetY=0;this.__verticalAlign=fc.MIDDLE;this.__horizontalAlign=Vb.CENTER;this.__gap=this.__minGap=this.__paddingTop=this.__paddingRight=this.__paddingBottom=this.__paddingLeft=0;this.__iconPosition=pa.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();zi.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"]=ed;ed.__name__="feathers.controls.ToggleButton";ed.__interfaces__=[od,Kl,te];ed.__super__=zi;ed.prototype=I(zi.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(y.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(y.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(y.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(y.STYLES)}},setPadding:function(a){this.set_paddingTop(a);this.set_paddingRight(a);this.set_paddingBottom(a);this.set_paddingLeft(a)},initializeToggleButtonTheme:function(){cx.initialize()},
initialize:function(){zi.prototype.initialize.call(this);this.textField==null&&(this.textField=new Ic,this.textField.set_selectable(!1),this.textField.set_multiline(!0),this.addChild(this.textField))},commitChanges:function(){zi.prototype.commitChanges.call(this);var a=this.isInvalid(y.DATA),b=this.isInvalid(y.SIZE),c=this.isInvalid(y.STATE),d=this.isInvalid(y.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;x.__implements(this._currentBackgroundSkin,tb)&&(h=this._currentBackgroundSkin);x.__implements(this._currentBackgroundSkin,ba)&&this._currentBackgroundSkin.validateNow();x.__implements(this._currentIcon,ba)&&(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()!=pa.LEFT&&this.get_iconPosition()!=pa.RIGHT||(x.__implements(this._currentIcon,ba)&&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()==pa.LEFT||this.get_iconPosition()==pa.RIGHT){if(b||c)d+=a;d+=this._currentIcon.get_width()}else if(this.get_iconPosition()==pa.TOP||this.get_iconPosition()==pa.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()==pa.TOP||this.get_iconPosition()==pa.BOTTOM){if(b||c)d+=a;d+=this._currentIcon.get_height()}else if(this.get_iconPosition()==pa.LEFT||this.get_iconPosition()==pa.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()==pa.LEFT||this.get_iconPosition()==pa.RIGHT){if(b||c)d+=a;d+=this._currentIcon.get_width()}else if(this.get_iconPosition()==pa.TOP||this.get_iconPosition()==pa.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()==pa.TOP||this.get_iconPosition()==pa.BOTTOM){if(b||c)d+=a;d+=this._currentIcon.get_height()}else if(this.get_iconPosition()==pa.LEFT||this.get_iconPosition()==pa.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(){zi.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()!=
pa.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()==pa.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;x.__implements(this._currentIcon,ba)&&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()==pa.LEFT||this.get_iconPosition()==pa.RIGHT)b-=this._currentIcon.get_width()+a;if(this.get_iconPosition()==pa.TOP||this.get_iconPosition()==pa.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()==Vb.LEFT?a.set_x(this.get_paddingLeft()):this.get_horizontalAlign()==Vb.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()==fc.TOP?a.set_y(this.get_paddingTop()):this.get_verticalAlign()==fc.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()==pa.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()==fc.TOP){var a=this.textField;a.set_y(a.get_y()+(this._currentIcon.get_height()+this.get_gap()))}else this.get_verticalAlign()==fc.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()==pa.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()==Vb.RIGHT?(a=this.textField,a.set_x(a.get_x()-(this._currentIcon.get_width()+this.get_gap()))):this.get_horizontalAlign()==Vb.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()==
pa.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()==fc.BOTTOM?(a=this.textField,a.set_y(a.get_y()-(this._currentIcon.get_height()+this.get_gap()))):this.get_verticalAlign()==fc.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()==pa.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()==Vb.LEFT?(a=this.textField,a.set_x(a.get_x()+(this.get_gap()+this._currentIcon.get_width()))):this.get_horizontalAlign()==Vb.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()==pa.LEFT||this.get_iconPosition()==pa.RIGHT?this.get_verticalAlign()==fc.TOP?this._currentIcon.set_y(this.get_paddingTop()):this.get_verticalAlign()==fc.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()==Vb.LEFT?this._currentIcon.set_x(this.get_paddingLeft()):
this.get_horizontalAlign()==Vb.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{x.__implements(a,Ea)&&a.initializeNow();this._iconMeasurements==null?this._iconMeasurements=new Sb(a):this._iconMeasurements.save(a);x.__implements(a,sb)&&a.set_uiContext(this);x.__implements(a,ge)&&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)),x.__implements(a,sb)&&a.set_uiContext(null),x.__implements(a,ge)&&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 Hc("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(y.STYLES)},toggleButton_icon_resizeHandler:function(a){this._ignoreIconResizes||this.setInvalid(y.STYLES)},get_styleContext:function(){return ed},
__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(y.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(y.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(y.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(y.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(y.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(y.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(y.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(y.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(y.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(y.STYLES);return this.__iconPosition},clearStyle_iconPosition:function(){this.set_iconPosition(pa.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(y.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(y.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(y.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(y.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(y.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(y.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(y.STYLES);return this.__horizontalAlign},clearStyle_horizontalAlign:function(){this.set_horizontalAlign(Vb.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(y.STYLES);return this.__verticalAlign},
clearStyle_verticalAlign:function(){this.set_verticalAlign(fc.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(y.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(y.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(y.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(y.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(y.STYLES);return this.__showText},clearStyle_showText:function(){this.set_showText(!0);
return this.get_showText()},__class__:ed,__properties__:I(zi.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 Am=function(a,b,c){b==null&&(b=!1);this.initializeCheckTheme();ed.call(this,a,b,c)};t["feathers.controls.Check"]=Am;Am.__name__="feathers.controls.Check";Am.__super__=ed;Am.prototype=I(ed.prototype,{initializeCheckTheme:function(){Dw.initialize()},get_styleContext:function(){return Am},__class__:Am});var Hh=function(a,b){this.__animateContentAlpha=
!1;this.__openCloseDuration=.2;this.__customHeaderVariant=null;this.openCloseEase=Ah.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 Ha;this._scrollRect1=new Ha;this._ignoreHeaderEvents=!1;this.headerMeasurements=new Sb;this._measuredOpenHeight=0;this._collapseActuator=this._pendingHeight=null;
this.initializeCollapsibleTheme();da.call(this);this.set_text(a);this.set_content(b)};t["feathers.controls.Collapsible"]=Hh;Hh.__name__="feathers.controls.Collapsible";Hh.__interfaces__=[Gf];Hh.__super__=da;Hh.prototype=I(da.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(y.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(y.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(Hh.INVALIDATION_FLAG_HEADER_FACTORY);
return this._headerFactory},_previousCustomHeaderVariant:null,openCloseEase:null,dispose:function(){this._collapseActuator!=null&&(xa.stop(this._collapseActuator),this._collapseActuator=null);this.set_content(null);this.destroyHeader();da.prototype.dispose.call(this)},openContent:function(a){a==null&&(a=!0);this._pendingAnimation=a;this._pendingOpened!=null&&this._pendingOpened||!X.dispatch(this,"opening",!1,!0)||(this._pendingOpened=!0,this.setInvalid(y.DATA))},closeContent:function(a){a==null&&
(a=!0);this._pendingAnimation=a;(this._pendingOpened==null||this._pendingOpened)&&X.dispatch(this,"closing",!1,!0)&&(this._pendingOpened=!1,this.setInvalid(y.DATA))},initializeCollapsibleTheme:function(){Yk.initialize()},update:function(){this._previousCustomHeaderVariant!=this.get_customHeaderVariant()&&this.setInvalidationFlag(Hh.INVALIDATION_FLAG_HEADER_FACTORY);var a=this.isInvalid(y.DATA);this.isInvalid(Hh.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;x.__implements(this.header,tb)&&(a=this.header);df.resetFluidlyWithParentValues(this.headerMeasurements,this.header,this.get_explicitWidth(),null,this.get_explicitMinWidth(),null,this.get_explicitMaxWidth(),null);x.__implements(this.header,ba)&&this.header.validateNow();var b=null;this._content!=null&&(x.__implements(this._content,tb)&&(b=this._content),df.resetFluidlyWithParentValues(this._contentMeasurements,
this._content,this.get_explicitWidth(),null,this.get_explicitMinWidth(),null,this.get_explicitMaxWidth(),null),x.__implements(this._content,ba)&&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(){x.__implements(this.header,te)&&this.header.set_text(this._text)},updateOpened:function(){var a=this;if(this._pendingOpened!=null){this._collapseActuator!=null&&(xa.stop(this._collapseActuator),this._collapseActuator=null,X.dispatch(this,"cancel"));var b=this._ignoreHeaderEvents;this._ignoreHeaderEvents=!0;x.__implements(this.header,Gf)?this.header.set_opened(this._pendingOpened):
x.__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=xa.update(function(c,d){a.get_animateContentAlpha()&&a._content!=null&&a._content.set_alpha(d);a._pendingHeight=c;a.setInvalid(y.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(y.SIZE);return X.dispatch(a,"open")})):(this._content!=null&&this._content.set_visible(!0),b=xa.update(function(c,d){a.get_animateContentAlpha()&&a._content!=null&&a._content.set_alpha(d);a._pendingHeight=c;a.setInvalid(y.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(y.SIZE);return X.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,x.__implements(this.header,Gf)?this.header.set_opened(this._opened):x.__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:Hh.defaultHeaderFactory;this._oldHeaderFactory=a;this.header=a.create();x.__implements(this.header,kd)&&(a=this.header,a.get_variant()==null&&a.set_variant(this.get_customHeaderVariant()!=null?this.get_customHeaderVariant():Hh.CHILD_VARIANT_HEADER));x.__implements(this.header,Gf)?(this.header.addEventListener("open",
m(this,this.collapsible_header_openHandler)),this.header.addEventListener("close",m(this,this.collapsible_header_closeHandler))):x.__implements(this.header,ud)?this.header.addEventListener("change",m(this,this.collapsible_header_changeHandler)):x.__implements(this.header,Xh)?this.header.addEventListener("trigger",m(this,this.collapsible_header_triggerHandler)):this.header.addEventListener("click",m(this,this.collapsible_header_clickHandler));x.__implements(this.header,Ea)&&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);x.__implements(this.header,ba)&&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);x.__implements(this._content,ba)&&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(y.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(y.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(y.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(y.STYLES);return this.__animateContentAlpha},clearStyle_animateContentAlpha:function(){this.set_animateContentAlpha(!1);return this.get_animateContentAlpha()},get_styleContext:function(){return Hh},__class__:Hh,__properties__:I(da.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 Sd=function(a,b){this.__customTextInputVariant=this.__customButtonVariant=this.__customListViewVariant=null;this.__popUpAdapter=new al;this.openListViewOnFocus=!1;this._previousCustomTextInputVariant=this._previousCustomButtonVariant=this._previousCustomListViewVariant=this._filterText=null;this._ignoreTextInputChange=this._ignoreListViewChange=this._ignoreButtonToggleListView=!1;this._itemRendererRecycler=Me.withClass(Rc);this._customSelectedItem=this._selectedItem=null;this.pendingSelectedIndex=
this._selectedIndex=-1;this._allowCustomUserValue=!0;this.textInputMeasurements=new Sb;this.buttonMeasurements=new Sb;this.initializeComboBoxTheme();da.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"]=Sd;Sd.__name__=
"feathers.controls.ComboBox";Sd.__interfaces__=[ai,xi,sj];Sd.__super__=da;Sd.prototype=I(da.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(y.SELECTION),X.dispatch(this,"change");this._dataProvider!=null&&this._dataProvider.set_filterFunction(m(this,this.comboBoxFilterFunction));this.setInvalid(y.DATA);X.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(y.SELECTION);
X.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(y.SELECTION),X.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(y.SELECTION);X.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(y.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(y.DATA);return this._itemRendererRecycler},itemToText:function(a){return F.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(Sd.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(Sd.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(Sd.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){da.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);
da.prototype.dispose.call(this)},initializeComboBoxTheme:function(){Ew.initialize()},update:function(){var a=this.isInvalid(y.DATA),b=this.isInvalid(y.SELECTION),c=this.isInvalid(y.STATE);this._previousCustomTextInputVariant!=this.get_customTextInputVariant()&&this.setInvalidationFlag(Sd.INVALIDATION_FLAG_TEXT_INPUT_FACTORY);this._previousCustomButtonVariant!=this.get_customButtonVariant()&&this.setInvalidationFlag(Sd.INVALIDATION_FLAG_BUTTON_FACTORY);this._previousCustomListViewVariant!=this.get_customListViewVariant()&&
this.setInvalidationFlag(Sd.INVALIDATION_FLAG_LIST_VIEW_FACTORY);var d=this.isInvalid(Sd.INVALIDATION_FLAG_BUTTON_FACTORY),f=this.isInvalid(Sd.INVALIDATION_FLAG_TEXT_INPUT_FACTORY),g=this.isInvalid(Sd.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:Sd.defaultButtonFactory;this._oldButtonFactory=a;this.button=a.create();this.button.get_variant()==null&&this.button.set_variant(this.get_customButtonVariant()!=null?this.get_customButtonVariant():Sd.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: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("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:Sd.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():Sd.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&&di.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(),X.dispatch(this,"change");this.setInvalid(y.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){X.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;X.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,X.dispatch(this,"change")):c!=null?this.set_selectedItem(c):this._allowCustomUserValue&&(this._selectedItem=this._customSelectedItem=null,this._selectedIndex=-1,X.dispatch(this,"change"));this.setInvalid(y.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(y.STYLES);return this.__popUpAdapter},clearStyle_popUpAdapter:function(){this.set_popUpAdapter(new al);
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(y.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(y.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(y.STYLES);return this.__customListViewVariant},clearStyle_customListViewVariant:function(){this.set_customListViewVariant(null);
return this.get_customListViewVariant()},get_styleContext:function(){return Sd},__class__:Sd,__properties__:I(da.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 pp=function(){};t["feathers.core.IDateSelector"]=pp;pp.__name__="feathers.core.IDateSelector";pp.__isInterface__=!0;pp.prototype={get_selectedDate:null,
set_selectedDate:null,__class__:pp,__properties__:{set_selectedDate:"set_selectedDate",get_selectedDate:"get_selectedDate"}};var vt=function(a,b){this.enabled=!0;this.selected=!1;this.date=a;this.selected=!1};t["feathers.data.DatePickerItemState"]=vt;vt.__name__="feathers.data.DatePickerItemState";vt.prototype={owner:null,date:null,selected:null,enabled:null,__class__:vt};var Lb=function(){this.__showDatesFromAdjacentMonths=!0;this.__customWeekdayLabelVariant=this.__customDateRendererVariant=this.__customMutedDateRendererVariant=
null;this.__showMonthTitleView=this.__showMonthButtons=this.__showYearButtons=this.__showWeekdayLabels=!0;this.__monthTitleViewPosition=Vb.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 vt});this.monthTitleViewMeasurements=new Sb;this.incrementYearButtonMeasurements=new Sb;this.decrementYearButtonMeasurements=new Sb;this.incrementMonthButtonMeasurements=new Sb;this.decrementMonthButtonMeasurements=new Sb;this._mutedStorage=
new wt(null,Me.withClass(Rc));this._defaultStorage=new wt(null,Me.withClass(Rc));this.dateRendererToItemState=new Ta;this._dayNameLabels=[];this.initializeDatePickerTheme();da.call(this);this.addEventListener("keyDown",m(this,this.datePicker_keyDownHandler))};t["feathers.controls.DatePicker"]=Lb;Lb.__name__="feathers.controls.DatePicker";Lb.__interfaces__=[od,pp];Lb.defaultUpdateDateRenderer=function(a,b){x.__implements(a,te)&&a.set_text(F.string(b.date.getDate()))};Lb.defaultResetDateRenderer=function(a,
b){x.__implements(a,te)&&a.set_text(null)};Lb.__super__=da;Lb.prototype=I(da.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(y.SELECTION);X.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 xe("displayedMonth must be in the range 0-11");if(this._displayedMonth==
a)return this._displayedMonth;this._displayedMonth=a;this.setInvalid(y.SELECTION);X.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(y.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(y.SELECTION);X.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(Lb.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(Lb.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(Lb.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(Lb.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(Lb.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(y.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 Db("Length of customMonthNames must be exactly equal to 12");if(this._customMonthNames==a)return this._customMonthNames;this._customMonthNames=a;this.setInvalid(y.DATA);return this._customMonthNames},_customWeekdayNames:null,get_customWeekdayNames:function(){return this._customWeekdayNames},
set_customWeekdayNames:function(a){if(a!=null&&a.length!=7)throw new Db("Length of customWeekdayNames must be exactly equal to 7");if(this._customWeekdayNames==a)return this._customWeekdayNames;this._customWeekdayNames=a;this.setInvalid(y.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 xe("startOfWeek must be in the range 0-6");
if(this._customStartOfWeek==a)return this._customStartOfWeek;this._customStartOfWeek=a;this.setInvalid(y.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(Lb.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(Lb.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);da.prototype.dispose.call(this)},initializeDatePickerTheme:function(){$h.initialize()},initialize:function(){this.dateContainer==null&&(this.dateContainer=new qb,this.dateContainer.set_layout(new qp),this.addChild(this.dateContainer));da.prototype.initialize.call(this)},update:function(){var a=this.isInvalid(y.DATA),b=this.isInvalid(y.SELECTION),c=this.isInvalid(y.STATE),d=this.isInvalid(y.STYLES);this._previousCustomDateRendererVariant!=this.get_customDateRendererVariant()&&
this.setInvalidationFlag(Lb.INVALIDATION_FLAG_DATE_RENDERER_FACTORY);this._previousCustomMutedDateRendererVariant!=this.get_customMutedDateRendererVariant()&&this.setInvalidationFlag(Lb.INVALIDATION_FLAG_DATE_RENDERER_FACTORY);this._previousCustomWeekdayLabelVariant!=this.get_customWeekdayLabelVariant()&&this.setInvalidationFlag(Lb.INVALIDATION_FLAG_WEEKDAY_LABEL_FACTORY);this._previousCustomDecrementMonthButtonVariant!=this.get_customDecrementMonthButtonVariant()&&this.setInvalidationFlag(Lb.INVALIDATION_FLAG_DECREMENT_MONTH_BUTTON_FACTORY);
this._previousCustomIncrementMonthButtonVariant!=this.get_customIncrementMonthButtonVariant()&&this.setInvalidationFlag(Lb.INVALIDATION_FLAG_INCREMENT_MONTH_BUTTON_FACTORY);this._previousCustomDecrementYearButtonVariant!=this.get_customDecrementYearButtonVariant()&&this.setInvalidationFlag(Lb.INVALIDATION_FLAG_DECREMENT_YEAR_BUTTON_FACTORY);this._previousCustomIncrementYearButtonVariant!=this.get_customIncrementYearButtonVariant()&&this.setInvalidationFlag(Lb.INVALIDATION_FLAG_INCREMENT_YEAR_BUTTON_FACTORY);
this._previousCustomMonthTitleViewVariant!=this.get_customMonthTitleViewVariant()&&this.setInvalidationFlag(Lb.INVALIDATION_FLAG_MONTH_TITLE_VIEW_FACTORY);var f=this.isInvalid(Lb.INVALIDATION_FLAG_DATE_RENDERER_FACTORY),g=this.isInvalid(Lb.INVALIDATION_FLAG_WEEKDAY_LABEL_FACTORY),h=this.isInvalid(Lb.INVALIDATION_FLAG_DECREMENT_MONTH_BUTTON_FACTORY),n=this.isInvalid(Lb.INVALIDATION_FLAG_INCREMENT_MONTH_BUTTON_FACTORY),l=this.isInvalid(Lb.INVALIDATION_FLAG_DECREMENT_YEAR_BUTTON_FACTORY),q=this.isInvalid(Lb.INVALIDATION_FLAG_INCREMENT_YEAR_BUTTON_FACTORY),
v=this.isInvalid(Lb.INVALIDATION_FLAG_MONTH_TITLE_VIEW_FACTORY);(d||c)&&this.refreshBackgroundSkin();v&&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||v||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:Lb.defaultMonthTitleViewFactory;this._oldMonthTitleViewFactory=a;this.monthTitleView=a.create();this.monthTitleView.get_variant()==null&&this.monthTitleView.set_variant(this.get_customMonthTitleViewVariant()!=null?this.get_customMonthTitleViewVariant():
Lb.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:Lb.defaultDecrementMonthButtonFactory;this._oldDecrementMonthButtonFactory=a;this.decrementMonthButton=a.create();this.decrementMonthButton.get_variant()==null&&this.decrementMonthButton.set_variant(this.get_customDecrementMonthButtonVariant()!=null?this.get_customDecrementMonthButtonVariant():Lb.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:Lb.defaultIncrementMonthButtonFactory;this._oldIncrementMonthButtonFactory=a;this.incrementMonthButton=a.create();this.incrementMonthButton.get_variant()==null&&this.incrementMonthButton.set_variant(this.get_customIncrementMonthButtonVariant()!=null?this.get_customIncrementMonthButtonVariant():Lb.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:Lb.defaultDecrementYearButtonFactory;this._oldDecrementYearButtonFactory=a;this.decrementYearButton=a.create();this.decrementYearButton.get_variant()==null&&this.decrementYearButton.set_variant(this.get_customDecrementYearButtonVariant()!=null?this.get_customDecrementYearButtonVariant():Lb.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:Lb.defaultIncrementYearButtonFactory;this._oldIncrementYearButtonFactory=a;this.incrementYearButton=a.create();this.incrementYearButton.get_variant()==null&&this.incrementYearButton.set_variant(this.get_customIncrementYearButtonVariant()!=null?this.get_customIncrementYearButtonVariant():
Lb.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:Lb.defaultWeekdayLabelFactory;b=this.get_customWeekdayLabelVariant()!=null?this.get_customWeekdayLabelVariant():Lb.CHILD_VARIANT_WEEKDAY_LABEL;c=x.__cast(a.create(),fa);
this._oldWeekdayLabelFactory=a;c.get_variant()==null&&c.set_variant(b);this.dateContainer.addChildAt(c,0);this._dayNameLabels.push(c);c=x.__cast(a.create(),fa);this._oldWeekdayLabelFactory=a;c.get_variant()==null&&c.set_variant(b);this.dateContainer.addChildAt(c,1);this._dayNameLabels.push(c);c=x.__cast(a.create(),fa);this._oldWeekdayLabelFactory=a;c.get_variant()==null&&c.set_variant(b);this.dateContainer.addChildAt(c,2);this._dayNameLabels.push(c);c=x.__cast(a.create(),fa);this._oldWeekdayLabelFactory=
a;c.get_variant()==null&&c.set_variant(b);this.dateContainer.addChildAt(c,3);this._dayNameLabels.push(c);c=x.__cast(a.create(),fa);this._oldWeekdayLabelFactory=a;c.get_variant()==null&&c.set_variant(b);this.dateContainer.addChildAt(c,4);this._dayNameLabels.push(c);c=x.__cast(a.create(),fa);this._oldWeekdayLabelFactory=a;c.get_variant()==null&&c.set_variant(b);this.dateContainer.addChildAt(c,5);this._dayNameLabels.push(c);c=x.__cast(a.create(),fa);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=
Lb.defaultUpdateDateRenderer,this._defaultStorage.dateRendererRecycler.reset==null&&(this._defaultStorage.dateRendererRecycler.reset=Lb.defaultResetDateRenderer));this._mutedStorage.dateRendererRecycler.update==null&&(this._mutedStorage.dateRendererRecycler.update=Lb.defaultUpdateDateRenderer,this._mutedStorage.dateRendererRecycler.reset==null&&(this._mutedStorage.dateRendererRecycler.reset=Lb.defaultResetDateRenderer));var a=this.isInvalid(Lb.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=x.getClass(this),
new pb(""+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(x.__implements(c,kd)){var d=c;if(d.get_variant()==null){var f=b==this._mutedStorage?this.get_customMutedDateRendererVariant()!=null?this.get_customMutedDateRendererVariant():Lb.CHILD_VARIANT_MUTED_DATE_RENDERER:this.get_customDateRendererVariant()!=null?this.get_customDateRendererVariant():Lb.CHILD_VARIANT_DATE_RENDERER;
d.set_variant(f)}}x.__implements(c,Ea)&&c.initializeNow();b.measurements==null&&(b.measurements=new Sb(c))}else c=b.inactiveDateRenderers.shift();this.updateDateRenderer(c,a,b);x.__implements(c,Xh)?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)));x.__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,Lb.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;x.__implements(a,Ea)&&a.set_enabled(b.enabled);x.__implements(a,Gh)&&a.set_data(b.date);x.__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=bl.getDaysInMonth(this._displayedMonth,this._displayedFullYear),f=bl.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 rp(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:(x.__implements(a,Ea)&&a.initializeNow(),this._backgroundSkinMeasurements==null?this._backgroundSkinMeasurements=new Sb(a):this._backgroundSkinMeasurements.save(a),x.__implements(a,sb)&&a.set_uiContext(this),this.addChildAt(a,0))},removeCurrentBackgroundSkin:function(a){a!=null&&(x.__implements(a,sb)&&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 Db("Invalid month position: "+F.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),x.__implements(this._currentBackgroundSkin,ba)&&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=x.__cast(a.currentTarget,ka),a=this.dateRendererToItemState.h[a.__id__],Zi.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=x.__cast(a.currentTarget,
ka),a=this.dateRendererToItemState.h[a.__id__],Zi.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=x.__cast(a.currentTarget,ka),a=this.dateRendererToItemState.h[a.__id__],Zi.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=x.__cast(a.currentTarget,ka);a=x.__cast(b,ud);b=this.dateRendererToItemState.h[b.__id__];a.get_selected()!=b.selected&&this.setInvalid(y.SELECTION)}},datePicker_keyDownHandler:function(a){this._enabled&&!a.isDefaultPrevented()&&(this.stage!=null&&this.stage.get_focus()instanceof Ic&&
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(y.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(y.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(y.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(y.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(y.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(y.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(y.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(y.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(y.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(y.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(y.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(y.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(y.STYLES);return this.__monthTitleViewPosition},clearStyle_monthTitleViewPosition:function(){this.set_monthTitleViewPosition(Vb.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(y.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(y.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(y.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(y.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(y.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(y.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(y.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(y.STYLES);return this.__showDatesFromAdjacentMonths},clearStyle_showDatesFromAdjacentMonths:function(){this.set_showDatesFromAdjacentMonths(!0);return this.get_showDatesFromAdjacentMonths()},get_styleContext:function(){return Lb},__class__:Lb,__properties__:I(da.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 wt=function(a,b){this.inactiveDateRenderers=[];this.activeDateRenderers=[];this.id=a;this.dateRendererRecycler=b};t["feathers.controls._DatePicker.DateRendererStorage"]=wt;wt.__name__="feathers.controls._DatePicker.DateRendererStorage";wt.prototype={id:null,oldDateRendererRecycler:null,dateRendererRecycler:null,activeDateRenderers:null,inactiveDateRenderers:null,measurements:null,__class__:wt};var On=function(){this.initializeFormTheme();qb.call(this);
this.addEventListener("keyDown",m(this,this.form_keyDownHandler))};t["feathers.controls.Form"]=On;On.__name__="feathers.controls.Form";On.__super__=qb;On.prototype=I(qb.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(){Uj.dispatch(this,"submit")},dispose:function(){this._submitButton!=null&&this.set_submitButton(null);qb.prototype.dispose.call(this)},initializeFormTheme:function(){Fw.initialize()},form_keyDownHandler:function(a){if(this._enabled&&a.keyCode==13&&!a.isDefaultPrevented()){for(var b=x.__cast(a.target,ka);b!=this&&b!=null;){if(b instanceof $i&&!b.submitOnEnterEnabled)return;
b=b.parent}a.preventDefault();this.submit()}},form_submitButton_triggerHandler:function(a){this.submit()},get_styleContext:function(){return On},__class__:On,__properties__:I(qb.prototype.__properties__,{set_submitButton:"set_submitButton",get_submitButton:"get_submitButton"})});var $i=function(a,b,c){c==null&&(c=!1);a==null&&(a="");this.__textPosition=pa.TOP;this.__backgroundSkin=this.__disabledBackgroundSkin=null;this.__wordWrap=!1;this.__verticalAlign=fc.MIDDLE;this.__horizontalAlign=Vb.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();da.call(this);this.set_text(a);this.set_content(b);this.set_required(c)};t["feathers.controls.FormItem"]=$i;$i.__name__="feathers.controls.FormItem";$i.__interfaces__=[Nb,te];$i.__super__=da;$i.prototype=I(da.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(y.DATA);this._customTextColumnWidth==null||this.get_textPosition()!=pa.LEFT&&this.get_textPosition()!=pa.RIGHT||X.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(y.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;x.__implements(this._currentContent,te)&&(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(y.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(y.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(y.SELECTION);this._customTextColumnWidth==null||this.get_textPosition()!=pa.LEFT&&this.get_textPosition()!=pa.RIGHT||X.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(y.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=
x.__implements(this._currentContent,tb)?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(){Gw.initialize()},initialize:function(){da.prototype.initialize.call(this);this.textField==null&&(this.textField=new Ic,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(y.DATA),b=this.isInvalid(y.SELECTION),c=this.isInvalid(y.SIZE),d=this.isInvalid(y.STATE),f=this.isInvalid(y.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;x.__implements(this._currentBackgroundSkin,tb)&&(h=this._currentBackgroundSkin);
x.__implements(this._currentBackgroundSkin,ba)&&this._currentBackgroundSkin.validateNow();x.__implements(this._currentRequiredSkin,ba)&&this._currentRequiredSkin.validateNow();var n=null;x.__implements(this._currentContent,tb)&&(n=this._currentContent);var l=null;x.__implements(this._currentRequiredSkin,tb)&&(l=this._currentRequiredSkin);if(this._currentContent!=null){var q=0,v=0;this.get_textPosition()==pa.TOP||this.get_textPosition()==pa.BOTTOM?v=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()==Vb.JUSTIFY||this.get_verticalAlign()==fc.JUSTIFY){var w=null,z=null,r=null,G=null,J=null,L=null;this.get_horizontalAlign()==Vb.JUSTIFY&&(w=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()==fc.JUSTIFY&&(z=this.get_explicitHeight()!=null?this.get_explicitHeight()-v-this.get_paddingTop()-this.get_paddingBottom():null,G=this.get_explicitMinHeight()!=null?this.get_explicitMinHeight()-v-this.get_paddingLeft()-this.get_paddingRight():null,L=this.get_explicitMaxHeight()!=null?this.get_explicitMaxHeight()-
v-this.get_paddingLeft()-this.get_paddingRight():null);df.resetFluidlyWithParentValues(this._contentMeasurements,this._currentContent,w,z,r,G,J,L)}else this._contentMeasurements.restore(this._currentContent);q=this._ignoreContentResize;this._ignoreContentResize=!0;x.__implements(this._currentContent,ba)&&this._currentContent.validateNow();this._ignoreContentResize=q}q=this.get_explicitWidth();a&&(q=this._textMeasuredWidth,this._customTextColumnWidth==null||this.get_textPosition()!=pa.LEFT&&this.get_textPosition()!=
pa.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()==pa.LEFT||this.get_textPosition()==pa.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()==pa.LEFT||this.get_textPosition()==pa.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()!=pa.LEFT&&this.get_textPosition()!=pa.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()==pa.LEFT||this.get_textPosition()==pa.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()==pa.LEFT||this.get_textPosition()==pa.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()==pa.LEFT||this.get_textPosition()==pa.RIGHT)){var b=this._ignoreContentResize;this._ignoreContentResize=!0;x.__implements(this._content,ba)&&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:(x.__implements(a,Ea)&&a.initializeNow(),this._backgroundSkinMeasurements==null?this._backgroundSkinMeasurements=new Sb(a):this._backgroundSkinMeasurements.save(a),x.__implements(a,sb)&&a.set_uiContext(this),this.addChildAt(a,0))},removeCurrentBackgroundSkin:function(a){a!=null&&(x.__implements(a,sb)&&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:(x.__implements(a,Ea)&&a.initializeNow(),this._requiredSkinMeasurements==null?this._requiredSkinMeasurements=new Sb(a):this._requiredSkinMeasurements.save(a),
x.__implements(a,sb)&&a.set_uiContext(this),this.addChild(a))},removeCurrentRequiredSkin:function(a){a!=null&&(x.__implements(a,sb)&&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:(x.__implements(this._currentContent,
Ea)&&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&&x.__implements(this._currentContent,Ea)&&this._currentContent.set_enabled(this._enabled)},layoutContent:function(){this.layoutBackgroundSkin();x.__implements(this._currentRequiredSkin,ba)&&this._currentRequiredSkin.validateNow();
var a=this._ignoreContentResize;this._ignoreContentResize=!0;x.__implements(this._currentContent,ba)&&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()!=pa.LEFT&&this.get_textPosition()!=pa.RIGHT||(a=this._customTextColumnWidth-b);var c=this._textMeasuredHeight,d=this.actualWidth-this.get_paddingLeft()-this.get_paddingRight();
if(this.get_textPosition()==pa.LEFT||this.get_textPosition()==pa.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()!=pa.LEFT&&this.get_textPosition()!=pa.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 Db("Unknown text position: "+F.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 Db("Unknown text position: "+F.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()==pa.LEFT||this.get_textPosition()==pa.RIGHT)if(x.__implements(this._currentContent,te))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),x.__implements(this._currentBackgroundSkin,ba)&&this._currentBackgroundSkin.validateNow())},formItem_textFormat_changeHandler:function(a){this.setInvalid(y.STYLES)},formItem_textField_clickHandler:function(a){this._focusManager!=
null&&(a=null,x.__implements(this._currentContent,od)&&(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(y.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(y.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(y.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(y.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(y.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(y.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(y.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(y.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(y.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(y.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(y.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(y.STYLES);return this.__horizontalAlign},clearStyle_horizontalAlign:function(){this.set_horizontalAlign(Vb.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(y.STYLES);return this.__verticalAlign},clearStyle_verticalAlign:function(){this.set_verticalAlign(fc.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(y.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(y.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(y.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(y.STYLES);return this.__textPosition},clearStyle_textPosition:function(){this.set_textPosition(pa.TOP);return this.get_textPosition()},get_styleContext:function(){return $i},__class__:$i,__properties__:I(da.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 xt=function(a,b,c){b==null&&(b=-1);this.sortOrder=Ih.NONE;this.enabled=!0;this.columnIndex=-1;this.column=a;this.columnIndex=b;this.text=c};t["feathers.data.GridViewHeaderState"]=xt;xt.__name__="feathers.data.GridViewHeaderState";xt.prototype={owner:null,column:null,columnIndex:null,text:null,enabled:null,sortOrder:null,__class__:xt};var yt=function(){this.enabled=!0;
this.selected=!1;this.rowIndex=-1};t["feathers.controls._GridView.GridViewRowState"]=yt;yt.__name__="feathers.controls._GridView.GridViewRowState";yt.prototype={owner:null,data:null,rowIndex:null,selected:null,enabled:null,columns:null,cellRendererRecycler:null,customColumnWidths:null,customCellRendererVariant:null,forceItemStateUpdate:null,__class__:yt};var rc=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=Kc.withClass(Wb);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=rc.DEFAULT_DRAG_FORMAT_ITEMS;this._pendingScrollDuration=null;this._pendingScrollRowIndex=-1;this._ignoreSelectionChange=this._ignoreLayoutChanges=this._ignoreHeaderLayoutChanges=!1;this._selectable=!0;this._tempVisibleIndices=new Yi(0,0);this._visibleIndices=new Yi(0,0);this._virtualCache=[];this._rowLayoutItems=[];this._unrenderedData=[];this.rowStatePool=new dc(function(){return new yt});this.headerStatePool=new dc(function(){return new xt});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=Ih.NONE;this._sortableColumns=this._resizableColumns=!1;this._cellRendererRecycler=Me.withClass(Rc);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 Ha;this._headerScrollRect1=new Ha;this._columnDividerLayoutItems=[];this._defaultColumnDividerStorage=new sx;this._headerDividerLayoutItems=[];this._defaultHeaderDividerStorage=new tx(Kc.withClass(Wb));this._headerLayoutItems=[];this._unrenderedHeaderData=[];this._defaultHeaderStorage=new ux(Me.withClass(cl));this._resizingHeaderTouchPointIsMouse=
!1;this._resizingHeaderTouchPointID=null;this._resizingHeaderIndex=-1;this.initializeGridViewTheme();Bb.call(this);this._rowRendererFactory==null&&this.set_rowRendererFactory(Kc.withClass(gg));this.set_dataProvider(a);this.set_columns(b);this.set_tabEnabled(!0);this.focusRect=null;this.get_viewPort()==null&&(this.gridViewPort=new $k,this.addChild(this.gridViewPort),this.set_viewPort(this.gridViewPort));c!=null&&this.addEventListener("change",c)};t["feathers.controls.GridView"]=rc;rc.__name__="feathers.controls.GridView";
rc.__interfaces__=[lp,jt,rg,xi,sj];rc.defaultUpdateHeaderRenderer=function(a,b){x.__implements(a,te)&&a.set_text(b.text)};rc.defaultResetHeaderRenderer=function(a,b){x.__implements(a,te)&&a.set_text(null)};rc.defaultSortCompareFunction=function(a,b){a=F.string(a).toLowerCase();b=F.string(b).toLowerCase();return a<b?-1:a>b?1:0};rc.__super__=Bb;rc.prototype=I(Bb.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(y.DATA);X.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(y.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(rc.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(rc.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(y.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(y.SELECTION),X.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(y.SELECTION);X.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(y.SELECTION);X.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(y.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(y.SELECTION);X.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(y.SELECTION);X.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(y.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(y.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(y.LAYOUT);return this._resizableColumns},_currentColumnResizeSkin:null,_currentHeaderCornerSkin:null,_sortOrder:null,get_sortOrder:function(){return this._sortOrder},set_sortOrder:function(a){this._sortedColumn==null&&(a=Ih.NONE);if(this._sortOrder==
a)return this._sortOrder;this._sortOrder=a;this.setInvalid(y.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=Ih.NONE,this._sortedColumn;this._sortedColumn=a;this._sortedColumn!=null?this.set_sortOrder(this._sortedColumn.defaultSortOrder):this._sortOrder=Ih.NONE;this.setInvalid(y.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=rc.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(y.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);Bb.prototype.dispose.call(this)},initializeGridViewTheme:function(){Hw.initialize()},initialize:function(){Bb.prototype.initialize.call(this);this._headerContainerLayout==null&&(this._headerContainerLayout=
new Sl,this._headerContainerLayout.set_heightResetEnabled(!1));this._headerContainer==null&&(this._headerContainer=new qb,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(y.DATA),b=this.isInvalid(y.LAYOUT),c=this.isInvalid(y.SORT),d=this.isInvalid(y.STATE),f=this.isInvalid(y.STYLES);this._previousCustomHeaderRendererVariant!=this.get_customHeaderRendererVariant()&&this.setInvalidationFlag(rc.INVALIDATION_FLAG_HEADER_RENDERER_FACTORY);var g=this.isInvalid(rc.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(rc.INVALIDATION_FLAG_HEADER_DIVIDER_FACTORY));this._defaultHeaderDividerStorage.customHeaderDividerVariant!=this.get_customHeaderDividerVariant()&&(this._defaultHeaderDividerStorage.customHeaderDividerVariant=this.get_customHeaderDividerVariant(),this.setInvalidationFlag(rc.INVALIDATION_FLAG_HEADER_DIVIDER_FACTORY));
var h=this.isInvalid(rc.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(rc.INVALIDATION_FLAG_COLUMN_DIVIDER_FACTORY));this._defaultColumnDividerStorage.customColumnDividerVariant!=this.get_customColumnDividerVariant()&&
(this._defaultColumnDividerStorage.customColumnDividerVariant=this.get_customColumnDividerVariant(),this.setInvalidationFlag(rc.INVALIDATION_FLAG_COLUMN_DIVIDER_FACTORY));var n=this.isInvalid(rc.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();Bb.prototype.update.call(this);this._previousCustomHeaderRendererVariant=this.get_customHeaderRendererVariant();this.validateCustomColumnWidths();this.layoutHeaders();this.layoutHeaderDividers();this.layoutColumnDividers();this.handlePendingScroll()},createScroller:function(){Bb.prototype.createScroller.call(this);
this.gridViewPort.set_scroller(this.scroller)},refreshScrollerValues:function(){Bb.prototype.refreshScrollerValues.call(this);if(x.__implements(this.get_layout(),gf)){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&&x.__implements(this.get_layout(),ci)){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()&&Bb.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());Bb.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=u.fields(c);
for(var d=Array(c.length),f=0,g=c.length;f<g;){var h=f++,n=[c[h]];d[h]=new Fm(n[0],function(l){return function(q){return F.string(u.getProperty(q,l[0]))}}(n))}b=new fg(d)}else b=new fg;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());x.__implements(d,ba)&&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];x.__implements(d,ba)&&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;Bb.prototype.layoutScrollBars.call(this);this.topViewPortOffset=a}else Bb.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&&(x.__implements(a,Ea)&&a.initializeNow(),x.__implements(a,sb)&&a.set_uiContext(this),this.addChild(a))},removeCurrentHeaderCornerSkin:function(a){a!=null&&(x.__implements(a,sb)&&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&&(x.__implements(this._currentColumnResizeSkin,Ea)&&this._currentColumnResizeSkin.initializeNow(),x.__implements(this._currentColumnResizeSkin,sb)&&this._currentColumnResizeSkin.set_uiContext(this),this._currentColumnResizeSkin.set_visible(!1),this._currentColumnResizeSkin instanceof Ia&&(this._currentColumnResizeSkin.mouseEnabled=!1),this._currentColumnResizeSkin instanceof Ab&&(this._currentColumnResizeSkin.mouseChildren=
!1),this.addChildAt(this._currentColumnResizeSkin,0)))},getCurrentColumnResizeSkin:function(){return this.get_columnResizeSkin()},removeCurrentColumnResizeSkin:function(a){a!=null&&(x.__implements(a,sb)&&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=rc.defaultUpdateHeaderRenderer,this._defaultHeaderStorage.headerRendererRecycler.reset==null&&(this._defaultHeaderStorage.headerRendererRecycler.reset=rc.defaultResetHeaderRenderer));a=this.isInvalid(rc.INVALIDATION_FLAG_HEADER_RENDERER_FACTORY);this.refreshInactiveHeaderRenderers(a);this.findUnrenderedHeaderData();this.recoverInactiveHeaderRenderers();this.renderUnrenderedHeaderData();this.freeInactiveHeaderRenderers();if(this._defaultHeaderStorage.inactiveHeaderRenderers.length>
0)throw a=x.getClass(this),new pb(""+a.__name__+": inactive header renderers should be empty after updating.");},refreshHeaderDividers:function(){var a=this.isInvalid(rc.INVALIDATION_FLAG_HEADER_DIVIDER_FACTORY);this.refreshInactiveHeaderDividers(a);this.refreshActiveHeaderDividers();this.freeInactiveHeaderDividers();if(this._defaultHeaderDividerStorage.inactiveHeaderDividers.length>0)throw a=x.getClass(this),new pb(""+a.__name__+": inactive header dividers should be empty after updating.");},refreshColumnDividers:function(){var a=
this.isInvalid(rc.INVALIDATION_FLAG_COLUMN_DIVIDER_FACTORY);this.refreshInactiveColumnDividers(a);this.refreshActiveColumnDividers();this.freeInactiveColumnDividers();if(this._defaultColumnDividerStorage.inactiveColumnDividers.length>0)throw a=x.getClass(this),new pb(""+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=x.getClass(this),new pb(""+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(x.__implements(a,kd)){var c=a;if(c.get_variant()==null){var d=this.get_customHeaderDividerVariant()!=null?this.get_customHeaderDividerVariant():rc.CHILD_VARIANT_HEADER_DIVIDER;
c.set_variant(d)}}x.__implements(a,Ea)&&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=x.getClass(this),new pb(""+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(x.__implements(a,kd)){var c=a;if(c.get_variant()==
null){var d=this.get_customColumnDividerVariant()!=null?this.get_customColumnDividerVariant():rc.CHILD_VARIANT_COLUMN_DIVIDER;c.set_variant(d)}}x.__implements(a,Ea)&&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=x.getClass(this),new pb(""+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(!U.remove(this._defaultHeaderStorage.inactiveHeaderRenderers,f))throw a=x.getClass(this),new pb(""+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(rc.INVALIDATION_FLAG_ROW_RENDERER_FACTORY);this.refreshInactiveRowRenderers(a);
this.findUnrenderedData();this.recoverInactiveRowRenderers();this.renderUnrenderedData();this.freeInactiveRowRenderers();if(this.inactiveRowRenderers.length>0)throw a=x.getClass(this),new pb(""+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=x.getClass(this),new pb(""+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&&x.__implements(this.get_layout(),ci)){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(!U.remove(this.inactiveRowRenderers,f))throw b=x.getClass(this),new pb(""+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,rc.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(x.__implements(b,
kd)){var c=b;if(c.get_variant()==null){var d=this.get_customHeaderRendererVariant()!=null?this.get_customHeaderRendererVariant():rc.CHILD_VARIANT_HEADER_RENDERER;c.set_variant(d)}}x.__implements(b,Ea)&&b.initializeNow();this._defaultHeaderStorage.measurements==null&&(this._defaultHeaderStorage.measurements=new Sb(b))}else b=this._defaultHeaderStorage.inactiveHeaderRenderers.shift();this.updateHeaderRenderer(b,a);x.__implements(b,Xh)?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)));x.__implements(b,tb)&&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:Ih.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,rc.RESET_HEADER_STATE)},refreshHeaderRendererProperties:function(a,b){x.__implements(a,Ea)&&a.set_enabled(b.enabled);x.__implements(a,sp)&&(a.set_column(b.column),a.set_columnIndex(b.columnIndex),
a.set_gridViewOwner(b.owner));x.__implements(a,tp)&&a.set_sortOrder(b.sortOrder);x.__implements(a,yi)&&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(x.__implements(this.get_layout(),Sj)){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:x.__implements(this.get_layout(),gf)&&(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(x.__implements(this.get_layout(),gf))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&&x.__implements(this.get_layout(),tj)){x.__implements(this.get_dragDropIndicatorSkin(),Ea)&&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 Ic&&this.stage.get_focus().get_type()==1||this.navigateWithKeyboard(a)):
Bb.prototype.baseScrollContainer_keyDownHandler.call(this,a)},gridView_rowRenderer_triggerHandler:function(a){var b=x.__cast(a.currentTarget,gg);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=x.__cast(a.currentTarget,gg);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=x.__cast(a.currentTarget,dd);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 lt;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());gb.startDrag(this,b,c,-this._dragRowRenderer.get_mouseX(),-this._dragRowRenderer.get_mouseY())}},gridView_stage_pressAndMove_mouseUpHandler:function(a){a=x.__cast(a.currentTarget,dd);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(y.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],X.dispatch(this,"change"))}},gridView_dataProvider_removeItemHandler:function(a){this._virtualCache!=null&&U.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),X.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];X.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(y.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(y.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(y.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(y.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=Rd.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*=ah.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*=ah.getConcatenatedScaleX(this),this.calculateResizedColumnWidth(a),this._resizingHeaderTouchPointID=null,this._resizingHeaderTouchPointIsMouse=!1,this._resizingHeaderIndex=-1,this._oldHeaderDividerMouseCursor!=null&&(zd.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),rc.defaultSortCompareFunction(a,b)):this._sortedColumn.sortCompareFunction(a,b)},refreshSortedColumn:function(a){if(this._dataProvider!=null){var b=this._ignoreDataProviderChanges;this._ignoreDataProviderChanges=!0;this._sortOrder==Ih.ASCENDING?this._dataProvider.set_sortCompareFunction(m(this,
this.sortCompareFunction)):this._sortOrder==Ih.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!=Ih.NONE&&(this._sortedColumn!=a?this.set_sortedColumn(a):this.set_sortOrder(this._sortOrder==Ih.ASCENDING?Ih.DESCENDING:Ih.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=x.__cast(a.addedItem,Fm);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(y.LAYOUT)}}},gridView_columns_removeItemHandler:function(a){if(this._customColumnWidths!=null){var b=x.__cast(a.removedItem,Fm);a=a.index;b.width!=null||a>this._customColumnWidths.length||(this._customColumnWidths.splice(a,1),this.setInvalid(y.LAYOUT))}},
gridView_columns_changeHandler:function(a){this.setInvalid(y.DATA)},gridView_headerRenderer_touchTapHandler:function(a){this._enabled&&!a.isPrimaryTouchPoint&&(a=x.__cast(a.currentTarget,ka),a=this.headerRendererToHeaderState.h[a.__id__],this.updateSortedColumn(a.column),Lf.dispatchForHeader(this,"headerTrigger",a))},gridView_headerRenderer_clickHandler:function(a){this._enabled&&(a=x.__cast(a.currentTarget,ka),a=this.headerRendererToHeaderState.h[a.__id__],this.updateSortedColumn(a.column),Lf.dispatchForHeader(this,
"headerTrigger",a))},gridView_headerRenderer_triggerHandler:function(a){this._enabled&&(a=x.__cast(a.currentTarget,ka),a=this.headerRendererToHeaderState.h[a.__id__],this.updateSortedColumn(a.column),Lf.dispatchForHeader(this,"headerTrigger",a))},gridView_headerRenderer_resizeHandler:function(a){this._validating||this.setInvalid(y.LAYOUT)},gridView_headerDivider_mouseDownHandler:function(a){a=x.__cast(a.currentTarget,Ia);this.headerResizeTouchBegin(rc.POINTER_ID_MOUSE,!0,a,a.stage.get_mouseX())},
gridView_headerDivider_stage_mouseMoveHandler:function(a){a=x.__cast(a.currentTarget,dd);this.headerResizeTouchMove(rc.POINTER_ID_MOUSE,!0,a.get_mouseX())},gridView_headerDivider_stage_mouseUpHandler:function(a){a=x.__cast(a.currentTarget,dd);this.headerResizeTouchEnd(rc.POINTER_ID_MOUSE,!0,a.get_mouseX())},gridView_headerDivider_touchBeginHandler:function(a){if(!a.isPrimaryTouchPoint){var b=x.__cast(a.currentTarget,Ia);this.headerResizeTouchBegin(a.touchPointID,!1,b,b.stage.get_mouseX())}},gridView_headerDivider_stage_touchMoveHandler:function(a){var b=
x.__cast(a.currentTarget,dd);this.headerResizeTouchMove(a.touchPointID,!1,b.get_mouseX())},gridView_headerDivider_stage_touchEndHandler:function(a){var b=x.__cast(a.currentTarget,dd);this.headerResizeTouchEnd(a.touchPointID,!1,b.get_mouseX())},gridView_headerDivider_rollOverHandler:function(a){this._resizableColumns&&this._resizingHeaderIndex==-1&&zd.get_cursor()=="auto"&&(this._oldHeaderDividerMouseCursor=zd.get_cursor(),zd.set_cursor(hh.fromLimeCursor(fd.RESIZE_WE)))},gridView_headerDivider_rollOutHandler:function(a){this._resizableColumns&&
this._resizingHeaderIndex==-1&&this._oldHeaderDividerMouseCursor!=null&&(zd.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=x.__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=La.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=La.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=x.__cast(a.dragData.get(this._dragFormat),Array),c=this._dataProvider.get_length();if(x.__implements(this.get_layout(),tj)){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 rc},__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(y.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(y.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(y.STYLES);return this.__headerDividerFactory},clearStyle_headerDividerFactory:function(){this.set_headerDividerFactory(Kc.withClass(Wb));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(y.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(y.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(y.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(y.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(y.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(y.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(y.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(y.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(y.STYLES);return this.__dragDropIndicatorSkin},clearStyle_dragDropIndicatorSkin:function(){this.set_dragDropIndicatorSkin(null);return this.get_dragDropIndicatorSkin()},__class__:rc,__properties__:I(Bb.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 ux=function(a){this.inactiveHeaderRenderers=
[];this.activeHeaderRenderers=[];this.headerRendererRecycler=a};t["feathers.controls._GridView.HeaderRendererStorage"]=ux;ux.__name__="feathers.controls._GridView.HeaderRendererStorage";ux.prototype={oldHeaderRendererRecycler:null,headerRendererRecycler:null,activeHeaderRenderers:null,inactiveHeaderRenderers:null,measurements:null,__class__:ux};var tx=function(a){this.inactiveHeaderDividers=[];this.activeHeaderDividers=[];this.headerDividerFactory=a};t["feathers.controls._GridView.HeaderDividerStorage"]=
tx;tx.__name__="feathers.controls._GridView.HeaderDividerStorage";tx.prototype={customHeaderDividerVariant:null,oldHeaderDividerFactory:null,headerDividerFactory:null,activeHeaderDividers:null,inactiveHeaderDividers:null,__class__:tx};var sx=function(a){this.inactiveColumnDividers=[];this.activeColumnDividers=[];this.columnDividerFactory=a};t["feathers.controls._GridView.ColumnDividerStorage"]=sx;sx.__name__="feathers.controls._GridView.ColumnDividerStorage";sx.prototype={customColumnDividerVariant:null,
oldColumnDividerFactory:null,columnDividerFactory:null,activeColumnDividers:null,inactiveColumnDividers:null,__class__:sx};var up=function(){};t["feathers.controls.IGridViewColumn"]=up;up.__name__="feathers.controls.IGridViewColumn";up.__isInterface__=!0;up.prototype={width:null,minWidth:null,__class__:up};var Fm=function(a,b,c){this.defaultSortOrder=Ih.ASCENDING;this.cellRendererRecycler=this.sortCompareFunction=null;this.minWidth=0;this.width=null;ma.call(this);this.headerText=a;b!=null&&(this.itemToText=
b);this.width=c};t["feathers.controls.GridViewColumn"]=Fm;Fm.__name__="feathers.controls.GridViewColumn";Fm.__interfaces__=[up];Fm.__super__=ma;Fm.prototype=I(ma.prototype,{headerText:null,width:null,minWidth:null,cellRendererRecycler:null,sortCompareFunction:null,defaultSortOrder:null,itemToText:function(a){return F.string(a)},__class__:Fm});var vp=function(a,b,c,d,f,g){d==null&&(d=-1);a==null&&(a=ag.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"]=vp;vp.__name__="feathers.data.GroupListViewItemState";vp.prototype={owner:null,type:null,data:null,location:null,layoutIndex:null,selected:null,text:null,enabled:null,recyclerID:null,__class__:vp};var Wc=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 Yi(0,0);this._visibleIndices=new Yi(0,0);this._virtualCache=[];this._unrenderedLayoutIndices=[];this._unrenderedLocations=[];this.itemStatePool=new dc(function(){return new vp});this.itemRendererToItemState=new Ta;this.stringDataToItemRenderer=new H;this.objectDataToItemRenderer=new Ta;this._additionalItemStorage=this._additionalHeaderStorage=
null;this._defaultHeaderStorage=new wp(ag.HEADER,null,Me.withClass(Rc));this._defaultItemStorage=new wp(ag.STANDARD,null,Me.withClass(Rc));this._itemRendererRecyclerMap=this._headerRendererRecyclerMap=null;this._forceItemStateUpdate=!1;this._selectedLocation=this._selectedItem=this._previousCustomHeaderRendererVariant=this._previousCustomItemRendererVariant=null;this._childFocusEnabled=!0;this.initializeGroupListViewTheme();Bb.call(this);this.set_dataProvider(a);this.set_tabEnabled(!0);this.focusRect=
null;this.get_viewPort()==null&&(this.groupViewPort=new $k,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"]=Wc;Wc.__name__="feathers.controls.GroupListView";Wc.__interfaces__=[rg,xi];Wc.defaultUpdateItemRenderer=function(a,b){x.__implements(a,te)&&a.set_text(b.text)};Wc.defaultResetItemRenderer=function(a,b){x.__implements(a,
te)&&a.set_text(null)};Wc.__super__=Bb;Wc.prototype=I(Bb.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(y.DATA);X.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 Db("GroupListView selectedLocation must have a length of 2");this._selectedLocation=a;this._selectedItem=this._selectedLocation==null?null:this._dataProvider.get(this._selectedLocation);
this.setInvalid(y.SELECTION);X.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(y.SELECTION);
X.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(y.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(Wc.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(Wc.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(Wc.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(Wc.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(y.LAYOUT);return this._virtualLayout},pointerSelectionEnabled:null,_ignoreSelectionChange:null,_ignoreLayoutChanges:null,itemToText:function(a){return F.string(a)},itemToEnabled:function(a){return!0},
itemToHeaderText:function(a){return F.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 H);b==null?(b=this._itemRendererRecyclerMap,Object.prototype.hasOwnProperty.call(b.h,a)&&delete b.h[a]):(this._itemRendererRecyclerMap.h[a]=b,this.setInvalid(Wc.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 H);b==null?(b=this._headerRendererRecyclerMap,Object.prototype.hasOwnProperty.call(b.h,a)&&delete b.h[a]):(this._headerRendererRecyclerMap.h[a]=b,this.setInvalid(Wc.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(y.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 vp;var d=c.length==1?ag.HEADER:ag.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);Bb.prototype.dispose.call(this)},initializeGroupListViewTheme:function(){Iw.initialize()},update:function(){var a=this.isInvalid(y.LAYOUT),b=this.isInvalid(y.STYLES);this._previousCustomHeaderRendererVariant!=this.get_customHeaderRendererVariant()&&this.setInvalidationFlag(Wc.INVALIDATION_FLAG_HEADER_RENDERER_FACTORY);this._previousCustomItemRendererVariant!=this.get_customItemRendererVariant()&&this.setInvalidationFlag(Wc.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();Bb.prototype.update.call(this);this._previousCustomItemRendererVariant=this.get_customItemRendererVariant();
this._previousCustomHeaderRendererVariant=this.get_customHeaderRendererVariant();this.handlePendingScroll()},createScroller:function(){Bb.prototype.createScroller.call(this);this.groupViewPort.set_scroller(this.scroller)},refreshScrollerValues:function(){Bb.prototype.refreshScrollerValues.call(this);if(x.__implements(this.get_layout(),gf)){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&&x.__implements(this.get_layout(),
ci)){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=Wc.defaultUpdateItemRenderer,this._defaultItemStorage.itemRendererRecycler.reset==null&&(this._defaultItemStorage.itemRendererRecycler.reset=Wc.defaultResetItemRenderer));this._defaultHeaderStorage.itemRendererRecycler.update==null&&(this._defaultHeaderStorage.itemRendererRecycler.update=Wc.defaultUpdateItemRenderer,this._defaultHeaderStorage.itemRendererRecycler.reset==
null&&(this._defaultHeaderStorage.itemRendererRecycler.reset=Wc.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=Wc.defaultUpdateItemRenderer,f.reset==null&&(f.reset=Wc.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=Wc.defaultUpdateItemRenderer,f.reset==null&&(f.reset=Wc.defaultResetItemRenderer));a=this.groupViewPort.isInvalid(Wc.INVALIDATION_FLAG_ITEM_RENDERER_FACTORY);b=this.groupViewPort.isInvalid(Wc.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=x.getClass(this),new pb(""+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=x.getClass(this),new pb(""+a.__name__+": inactive item renderers "+f.id+" should be empty after updating.");this.freeInactiveItemRenderers(this._defaultHeaderStorage);if(this._defaultHeaderStorage.inactiveItemRenderers.length>0)throw a=x.getClass(this),new pb(""+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=x.getClass(this),new pb(""+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=x.getClass(this),new pb(""+b.__name__+": active "+F.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==ag.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&&x.__implements(this.get_layout(),
ci)){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?ag.HEADER:ag.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==ag.HEADER&&this._layoutHeaderIndices.push(c);if(!U.remove(h.inactiveItemRenderers,d))throw c=x.getClass(this),new pb(""+c.__name__+": item renderer map contains bad data for item at location "+F.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?ag.HEADER:ag.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==ag.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(x.__implements(c,kd)){var d=c;if(d.get_variant()==null){var f=a.type==ag.HEADER?this.get_customHeaderRendererVariant()!=null?this.get_customHeaderRendererVariant():Wc.CHILD_VARIANT_HEADER_RENDERER:this.get_customItemRendererVariant()!=null?this.get_customItemRendererVariant():Wc.CHILD_VARIANT_ITEM_RENDERER;d.set_variant(f)}}x.__implements(c,Ea)&&c.initializeNow();b.measurements==null&&(b.measurements=new Sb(c))}else c=b.inactiveItemRenderers.shift();this.updateItemRenderer(c,a,b);a.type==ag.STANDARD&&
(x.__implements(c,Xh)?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))),x.__implements(c,ud)&&c.addEventListener("change",m(this,this.groupListView_itemRenderer_changeHandler)));x.__implements(c,tb)&&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 pb('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 wp(a.type,g,b);f.push(h);return h},itemStateToStorage:function(a){return a.type==ag.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==ag.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,
Wc.RESET_ITEM_STATE)},refreshItemRendererProperties:function(a,b){var c=this._ignoreSelectionChange;this._ignoreSelectionChange=!0;x.__implements(a,Ea)&&a.set_enabled(b.enabled);x.__implements(a,Gh)&&a.set_data(b.data);x.__implements(a,yi)&&a.set_layoutIndex(b.layoutIndex);x.__implements(a,xp)&&(a.set_location(b.location),a.set_groupListViewOwner(b.owner));x.__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(x.__implements(this.get_layout(),Sj)){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:x.__implements(this.get_layout(),gf)&&(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(x.__implements(this.get_layout(),gf))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 Ic&&this.stage.get_focus().get_type()==1||this.navigateWithKeyboard(a)):Bb.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?ag.HEADER:ag.STANDARD,d=this.locationToDisplayIndex(this._selectedLocation);this.populateCurrentItemState(this._selectedItem,c,this._selectedLocation,d,a,!0);Ai.dispatch(this,"itemTrigger",a);b&&this.itemStatePool.release(a)}},groupListView_itemRenderer_touchTapHandler:function(a){if(this._enabled&&
!a.isPrimaryTouchPoint){var b=x.__cast(a.currentTarget,ka);b=this.itemRendererToItemState.h[b.__id__];Ai.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=x.__cast(a.currentTarget,ka);b=this.itemRendererToItemState.h[b.__id__];Ai.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=x.__cast(a.currentTarget,ka);b=this.itemRendererToItemState.h[b.__id__];Ai.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(y.LAYOUT)},groupListView_itemRenderer_changeHandler:function(a){if(!this._ignoreSelectionChange){var b=x.__cast(a.currentTarget,
ka);a=x.__cast(b,ud);b=this.itemRendererToItemState.h[b.__id__];a.get_selected()!=b.selected&&this.setInvalid(y.SELECTION)}},groupListView_dataProvider_changeHandler:function(a){this._totalLayoutCount=this.calculateTotalLayoutCount([]);this._virtualCache!=null&&(this._virtualCache.length=0,this._virtualCache.length=this._totalLayoutCount);this.setInvalid(y.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),X.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?ag.HEADER:ag.STANDARD;var f=typeof c=="string"?this.stringDataToItemRenderer.h[c]:this.objectDataToItemRenderer.h[c.__id__];if(f==null)this.setInvalid(y.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(y.DATA)}}if(d==ag.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 Wc},__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(y.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(y.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(y.STYLES);return this.__customItemRendererVariant},
clearStyle_customItemRendererVariant:function(){this.set_customItemRendererVariant(null);return this.get_customItemRendererVariant()},__class__:Wc,__properties__:I(Bb.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 wp=function(a,b,c){this.inactiveItemRenderers=[];this.activeItemRenderers=[];this.type=a;this.id=b;this.itemRendererRecycler=c};t["feathers.controls._GroupListView.ItemRendererStorage"]=wp;wp.__name__="feathers.controls._GroupListView.ItemRendererStorage";wp.prototype={type:null,id:null,oldItemRendererRecycler:null,itemRendererRecycler:null,activeItemRenderers:null,inactiveItemRenderers:null,measurements:null,__class__:wp};var nk=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=zt.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;
da.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"]=nk;nk.__name__="feathers.controls.supportClasses.BaseProgressBar";nk.__interfaces__=[Jl];nk.__super__=da;nk.prototype=I(da.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(y.DATA);X.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(y.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(y.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(y.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(y.STYLES),b=this.isInvalid(y.STATE);if(a||b)this.refreshBackgroundSkin(),this.refreshFillSkin();this.measure();this.layoutContent()},measure:function(){var a=x.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:(x.__implements(a,Ea)&&a.initializeNow(),this._backgroundSkinMeasurements==null?this._backgroundSkinMeasurements=new Sb(a):this._backgroundSkinMeasurements.save(a),
x.__implements(a,sb)&&a.set_uiContext(this),this.addChildAt(a,0))},removeCurrentBackgroundSkin:function(a){a!=null&&(x.__implements(a,sb)&&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=La.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:(x.__implements(a,Ea)&&a.initializeNow(),this._fillSkinMeasurements==null?this._fillSkinMeasurements=new Sb(a):this._fillSkinMeasurements.save(a),x.__implements(a,sb)&&a.set_uiContext(this),this.addChild(a))},removeCurrentFillSkin:function(a){a!=null&&(x.__implements(a,
sb)&&a.set_uiContext(null),a.parent==this&&this.removeChild(a))},layoutContent:function(){this.layoutBackground();this.layoutFill()},layoutBackground:function(){var a=x.getClass(this);throw new Ce("Missing override for 'layoutBackground' in type "+a.__name__);},layoutFill:function(){var a=x.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=La.getTimer();var b=
(a-this._lastIndeterminateUpdateTime)/(this.get_indeterminateDuration()*1E3);b>=1&&(b-=Math.floor(b),this._lastIndeterminateUpdateTime=a,this._reversedIndeterminate=!this._reversedIndeterminate);x.__implements(this._currentFillSkin,Dm)?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(y.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(y.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(y.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(y.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(y.STYLES);return this.__fillMode},clearStyle_fillMode:function(){this.set_fillMode(zt.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(y.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(y.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(y.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(y.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(y.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(y.STYLES);
return this.__paddingLeft},clearStyle_paddingLeft:function(){this.set_paddingLeft(0);return this.get_paddingLeft()},__class__:nk,__properties__:I(da.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 wm=function(a,b,c,d){c==null&&(c=1);b==null&&(b=0);a==null&&(a=0);this.initializeHProgressBarTheme();nk.call(this,a,b,c,d)};t["feathers.controls.HProgressBar"]=wm;wm.__name__="feathers.controls.HProgressBar";wm.__super__=nk;wm.prototype=
I(nk.prototype,{_currentMask:null,initializeHProgressBarTheme:function(){Lw.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);x.__implements(this._currentBackgroundSkin,
tb);x.__implements(this._currentBackgroundSkin,ba)&&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),x.__implements(this._currentBackgroundSkin,ba)&&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 ab(vb.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 Ha(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)}x.__implements(this._currentFillSkin,ba)&&this._currentFillSkin.validateNow()}},get_styleContext:function(){return wm},__class__:wm});var ok=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;da.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"]=ok;ok.__name__=
"feathers.controls.supportClasses.BaseSlider";ok.__interfaces__=[od,Jl];ok.__super__=da;ok.prototype=I(da.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(y.DATA);!this.liveDragging&&this._dragging||X.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(y.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(y.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(y.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(y.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){da.prototype.showFocus.call(this,a);if(x.__implements(this._currentThumbSkin,od)){var b=this._currentThumbSkin;
b.get_focusEnabled()&&b.showFocus(a)}},applyValueRestrictions:function(){this.set_value(this.restrictValue(this._value))},initialize:function(){da.prototype.initialize.call(this);this._isDefaultValue&&this.set_value(this.restrictValue(this._value))},update:function(){this.isInvalid(y.SIZE);var a=this.isInvalid(y.STATE),b=this.isInvalid(y.STYLES);b&&(this.refreshThumb(),this.refreshTrack(),this.refreshSecondaryTrack());(a||b)&&this.refreshEnabled();this.measure();this.layoutContent()},measure:function(){var a=
x.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&&(x.__implements(a,sb)&&a.set_uiContext(null),a.removeEventListener("mouseDown",m(this,this.thumbSkin_mouseDownHandler)),this.removeChild(a)),this._currentThumbSkin!=null?(x.__implements(this._currentThumbSkin,Ea)&&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)),x.__implements(this._currentThumbSkin,sb)&&this._currentThumbSkin.set_uiContext(this)):this._thumbSkinMeasurements=null)},refreshTrack:function(){var a=this._currentTrackSkin;this._currentTrackSkin=this.get_trackSkin();this._currentTrackSkin!=a&&(a!=
null&&(x.__implements(a,sb)&&a.set_uiContext(null),this.removeChild(a),a.removeEventListener("mouseDown",m(this,this.trackSkin_mouseDownHandler))),this._currentTrackSkin!=null?(x.__implements(this._currentTrackSkin,Ea)&&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)),x.__implements(this._currentTrackSkin,sb)&&this._currentTrackSkin.set_uiContext(this)):this._trackSkinMeasurements=null)},refreshSecondaryTrack:function(){var a=this._currentSecondaryTrackSkin;this._currentSecondaryTrackSkin=this.get_secondaryTrackSkin();this._currentSecondaryTrackSkin!=a&&(a!=null&&(x.__implements(a,sb)&&a.set_uiContext(null),this.removeChild(a),a.removeEventListener("mouseDown",m(this,this.trackSkin_mouseDownHandler))),this._currentSecondaryTrackSkin!=
null?(x.__implements(this._currentSecondaryTrackSkin,Ea)&&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)),x.__implements(this._currentSecondaryTrackSkin,
sb)&&this._currentSecondaryTrackSkin.set_uiContext(this)):this._secondaryTrackSkinMeasurements=null)},refreshEnabled:function(){x.__implements(this._currentThumbSkin,Ea)&&this._currentThumbSkin.set_enabled(this._enabled);x.__implements(this._currentTrackSkin,Ea)&&this._currentTrackSkin.set_enabled(this._enabled);x.__implements(this._currentSecondaryTrackSkin,Ea)&&this._currentSecondaryTrackSkin.set_enabled(this._enabled)},layoutContent:function(){this._currentTrackSkin!=null&&this._currentSecondaryTrackSkin!=
null?this.layoutSplitTrack():this.layoutSingleTrack();this.layoutThumb()},layoutSplitTrack:function(){var a=x.getClass(this);throw new Ce("Missing override for 'layoutSplitTrack' in type "+a.__name__);},layoutSingleTrack:function(){var a=x.getClass(this);throw new Ce("Missing override for 'layoutSingleTrack' in type "+a.__name__);},layoutThumb:function(){var a=x.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=x.getClass(this);throw new Ce("Missing override for 'valueToLocation' in type "+a.__name__);},locationToValue:function(a,b){a=x.getClass(this);throw new Ce("Missing override for 'locationToValue' in type "+
a.__name__);},saveThumbStart:function(a,b){a=x.getClass(this);throw new Ce("Missing override for 'saveThumbStart' in type "+a.__name__);},thumbSkin_mouseDownHandler:function(a){this._enabled&&this.stage!=null&&Rd.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=x.__cast(a.currentTarget,dd);a.removeEventListener("mouseMove",m(this,this.thumbSkin_stage_mouseMoveHandler));a.removeEventListener("mouseUp",m(this,this.thumbSkin_stage_mouseUpHandler));
this._dragging=!1;this.liveDragging||X.dispatch(this,"change")},trackSkin_mouseDownHandler:function(a){this._enabled&&this.stage!=null&&Rd.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=x.__cast(a.currentTarget,dd);a.removeEventListener("mouseMove",m(this,this.trackSkin_stage_mouseMoveHandler));a.removeEventListener("mouseUp",m(this,this.trackSkin_stage_mouseUpHandler));this._dragging=
!1;this.liveDragging||X.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(y.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(y.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(y.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(y.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(y.STYLES);return this.__maximumPadding},
clearStyle_maximumPadding:function(){this.set_maximumPadding(0);return this.get_maximumPadding()},__class__:ok,__properties__:I(da.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 Pn=function(a,b,c,d){c==null&&(c=1);b==null&&(b=0);a==null&&(a=0);this.initializeHSliderTheme();ok.call(this,a,b,c,d);this.addEventListener("keyDown",m(this,this.hSlider_keyDownHandler))};t["feathers.controls.HSlider"]=
Pn;Pn.__name__="feathers.controls.HSlider";Pn.__super__=ok;Pn.prototype=I(ok.prototype,{initializeHSliderTheme:function(){Mw.initialize()},valueToLocation:function(a){x.__implements(this._currentThumbSkin,ba)&&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),x.__implements(this._currentThumbSkin,ba)&&this._currentThumbSkin.validateNow());this._currentTrackSkin!=null&&(this._trackSkinMeasurements.restore(this._currentTrackSkin),x.__implements(this._currentTrackSkin,ba)&&this._currentTrackSkin.validateNow());this._currentSecondaryTrackSkin!=null&&(this._secondaryTrackSkinMeasurements.restore(this._currentSecondaryTrackSkin),x.__implements(this._currentSecondaryTrackSkin,
ba)&&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&&(x.__implements(this._currentThumbSkin,ba)&&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);x.__implements(this._currentTrackSkin,ba)&&this._currentTrackSkin.validateNow();x.__implements(this._currentSecondaryTrackSkin,ba)&&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),x.__implements(this._currentTrackSkin,ba)&&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 Pn},__class__:Pn});var pk=function(){};t["feathers.controls.IGroupedToggle"]=pk;pk.__name__="feathers.controls.IGroupedToggle";pk.__isInterface__=!0;pk.__interfaces__=[ud];pk.prototype={get_toggleGroup:null,set_toggleGroup:null,__class__:pk,__properties__:{set_toggleGroup:"set_toggleGroup",get_toggleGroup:"get_toggleGroup"}};var kt=function(a,b){this.inactiveItemRenderers=[];this.activeItemRenderers=[];this.id=
a;this.itemRendererRecycler=b};t["feathers.controls._ListView.ItemRendererStorage"]=kt;kt.__name__="feathers.controls._ListView.ItemRendererStorage";kt.prototype={id:null,oldItemRendererRecycler:null,itemRendererRecycler:null,activeItemRenderers:null,inactiveItemRenderers:null,measurements:null,__class__:kt};var qd=function(a,b,c,d){c==null&&(c=1);b==null&&(b=0);a==null&&(a=0);this.__textInputGap=this.__buttonGap=0;this.__buttonDirection=uj.HORIZONTAL;this.__textInputPosition=Vb.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();da.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"]=qd;qd.__name__="feathers.controls.NumericStepper";qd.__interfaces__=[ai,Jl];qd.__super__=da;qd.prototype=I(da.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(y.DATA);X.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(y.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(y.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(y.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(y.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(y.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(y.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(y.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(y.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(qd.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(qd.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(qd.INVALIDATION_FLAG_TEXT_INPUT_FACTORY);return this._textInputFactory},_previousCustomDecrementButtonVariant:null,_previousCustomIncrementButtonVariant:null,_previousCustomTextInputVariant:null,_pendingTextInputChanges:null,showFocus:function(a){da.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();da.prototype.dispose.call(this)},initializeNumericStepperTheme:function(){Rw.initialize()},initialize:function(){da.prototype.initialize.call(this);this._isDefaultValue&&this.set_value(this.restrictValue(this._value))},update:function(){var a=this.isInvalid(y.DATA);this.isInvalid(y.SIZE);var b=this.isInvalid(y.STATE);this.isInvalid(y.STYLES);this._previousCustomTextInputVariant!=this.get_customTextInputVariant()&&this.setInvalidationFlag(qd.INVALIDATION_FLAG_TEXT_INPUT_FACTORY);
this._previousCustomDecrementButtonVariant!=this.get_customDecrementButtonVariant()&&this.setInvalidationFlag(qd.INVALIDATION_FLAG_DECREMENT_BUTTON_FACTORY);this._previousCustomIncrementButtonVariant!=this.get_customIncrementButtonVariant()&&this.setInvalidationFlag(qd.INVALIDATION_FLAG_INCREMENT_BUTTON_FACTORY);var c=this.isInvalid(qd.INVALIDATION_FLAG_DECREMENT_BUTTON_FACTORY),d=this.isInvalid(qd.INVALIDATION_FLAG_INCREMENT_BUTTON_FACTORY),f=this.isInvalid(qd.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()==uj.VERTICAL?this.get_textInputPosition()==Vb.CENTER?Math.max(this.textInput.get_width(),g):this.textInput.get_width()+this.get_textInputGap()+g:this.get_textInputPosition()==Vb.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()==uj.VERTICAL?this.get_textInputPosition()==Vb.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()==uj.VERTICAL?this.get_textInputPosition()==Vb.CENTER?Math.max(this.textInput.get_minWidth(),
g):this.textInput.get_minWidth()+this.get_textInputGap()+g:this.get_textInputPosition()==Vb.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()==uj.VERTICAL?this.get_textInputPosition()==Vb.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(F.string(this._minimum|0).length,F.string(this._maximum|0).length),F.string(this._step|0).length)|0,b=(Math.max(Math.max(F.string(We.roundToPrecision(this._minimum-(this._minimum|0),10)).length,F.string(We.roundToPrecision(this._maximum-(this._maximum|0),10)).length),F.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(y.DATA);this._pendingTextInputChanges=!1},layoutContent:function(){this.decrementButton.validateNow();this.incrementButton.validateNow();
this.textInput.validateNow();this.get_buttonDirection()==uj.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()==Vb.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 Db("Invalid text input position: "+F.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 Db("Invalid text input position: "+F.string(this.get_textInputPosition()));}},createDecrementButton:function(){this.destroyDecrementButton();var a=
this._decrementButtonFactory!=null?this._decrementButtonFactory:qd.defaultDecrementButtonFactory;this._oldDecrementButtonFactory=a;this.decrementButton=a.create();this.decrementButton.get_variant()==null&&this.decrementButton.set_variant(this.get_customDecrementButtonVariant()!=null?this.get_customDecrementButtonVariant():qd.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:qd.defaultIncrementButtonFactory;this._oldIncrementButtonFactory=a;this.incrementButton=a.create();this.incrementButton.get_variant()==null&&this.incrementButton.set_variant(this.get_customIncrementButtonVariant()!=
null?this.get_customIncrementButtonVariant():qd.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: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("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&&Rd.forStage(this.stage).claimMouse(this)&&this.decrement()},numericStepper_decrementButton_touchBeginHandler:function(a){a.isPrimaryTouchPoint||this._enabled&&this.decrementButton.get_enabled()&&this.stage!=null&&Rd.forStage(this.stage).claimMouse(this)&&
this.decrement()},numericStepper_incrementButton_mouseDownHandler:function(a){this._enabled&&this.incrementButton.get_enabled()&&this.stage!=null&&Rd.forStage(this.stage).claimMouse(this)&&this.increment()},numericStepper_incrementButton_touchBeginHandler:function(a){a.isPrimaryTouchPoint||this._enabled&&this.incrementButton.get_enabled()&&this.stage!=null&&Rd.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(y.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(y.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(y.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(y.STYLES);return this.__textInputPosition},clearStyle_textInputPosition:function(){this.set_textInputPosition(Vb.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(y.STYLES);return this.__buttonDirection},clearStyle_buttonDirection:function(){this.set_buttonDirection(uj.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(y.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(y.STYLES);return this.__buttonGap},clearStyle_buttonGap:function(){this.set_buttonGap(0);return this.get_buttonGap()},__class__:qd,__properties__:I(da.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 jh=function(a,b){a==null&&(a=-1);this.__customToggleButtonVariant=this.__layout=this.__backgroundSkin=this.__disabledBackgroundSkin=
null;this._currentItemState=new vx;this._ignoreChildChanges=!1;this._layoutResult=new Ng;this._layoutMeasurements=new Sb;this._interactionMode=Qn.PREVIOUS_NEXT;this._currentBackgroundSkin=this._backgroundSkinMeasurements=null;this._ignoreSelectionChange=!1;this._layoutItems=[];this.activeToggleButtons=[];this.inactiveToggleButtons=[];this._toggleButtonRecycler=Me.withClass(ed);this._previousCustomToggleButtonVariant=null;this._selectedIndex=this._maxSelectedIndex=-1;this.initializePageIndicatorTheme();
da.call(this);this.mouseChildren=this._interactionMode==Qn.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"]=jh;jh.__name__="feathers.controls.PageIndicator";jh.__interfaces__=
[od,sj];jh.__super__=da;jh.prototype=I(da.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 xe("Index "+a+" is out of range "+this._maxSelectedIndex+" for PageIndicator.");this._selectedIndex=a;this.setInvalid(y.DATA);X.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(y.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(jh.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==Qn.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);da.prototype.dispose.call(this)},
initializePageIndicatorTheme:function(){Sw.initialize()},update:function(){this.isInvalid(y.DATA);var a=this.isInvalid(y.DATA);this.isInvalid(y.LAYOUT);var b=this.isInvalid(y.SELECTION),c=this.isInvalid(y.STATE),d=this.isInvalid(y.STYLES);this._previousCustomToggleButtonVariant!=this.get_customToggleButtonVariant()&&this.setInvalidationFlag(jh.INVALIDATION_FLAG_TOGGLE_BUTTON_FACTORY);var f=this.isInvalid(jh.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 Cg||this.get_layout()instanceof tf))throw new Db("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(jh.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=x.getClass(this),new pb(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=x.getClass(this),new pb(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:(x.__implements(a,Ea)&&a.initializeNow(),this._backgroundSkinMeasurements==null?this._backgroundSkinMeasurements=new Sb(a):this._backgroundSkinMeasurements.save(a),x.__implements(a,sb)&&a.set_uiContext(this),this.addChildAt(a,0))},removeCurrentBackgroundSkin:function(a){a!=
null&&(x.__implements(a,sb)&&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),x.__implements(this._currentBackgroundSkin,ba)&&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():
jh.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=x.__cast(a.currentTarget,ed),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 tf?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==
Qn.PREVIOUS_NEXT&&this.handleClickOrTap(a.localX,a.localY)},pageIndicator_touchTapHandler:function(a){this._enabled&&this._interactionMode==Qn.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(y.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(y.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(y.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(y.STYLES);return this.__disabledBackgroundSkin},clearStyle_disabledBackgroundSkin:function(){this.set_disabledBackgroundSkin(null);
return this.get_disabledBackgroundSkin()},get_styleContext:function(){return jh},__class__:jh,__properties__:I(da.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 Qn=Q["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}};Qn.__constructs__=[Qn.PREVIOUS_NEXT,Qn.PRECISE];var $d=function(){this.__customTextInputVariant=this.__customButtonVariant=this.__customDatePickerVariant=null;this.__popUpAdapter=new al;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();da.call(this);this.addEventListener("focusIn",m(this,this.popUpDatePicker_focusInHandler))};t["feathers.controls.PopUpDatePicker"]=$d;$d.__name__="feathers.controls.PopUpDatePicker";
$d.__interfaces__=[ai,od,pp];$d.__super__=da;$d.prototype=I(da.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(y.SELECTION);X.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(y.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($d.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($d.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($d.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(y.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 Db("Length of customMonthNames must be exactly equal to 12");if(this._customMonthNames==a)return this._customMonthNames;this._customMonthNames=a;this.setInvalid(y.DATA);return this._customMonthNames},_customWeekdayNames:null,
get_customWeekdayNames:function(){return this._customWeekdayNames},set_customWeekdayNames:function(a){if(a!=null&&a.length!=7)throw new Db("Length of customWeekdayNames must be exactly equal to 7");if(this._customWeekdayNames==a)return this._customWeekdayNames;this._customWeekdayNames=a;this.setInvalid(y.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 xe("startOfWeek must be in the range 0-6");
if(this._customStartOfWeek==a)return this._customStartOfWeek;this._customStartOfWeek=a;this.setInvalid(y.DATA);return this._customStartOfWeek},get_open:function(){return this.datePicker!=null?this.datePicker.parent!=null:!1},_filterText:null,showFocus:function(a){da.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();da.prototype.dispose.call(this)},initializePopUpDatePickerTheme:function(){Jn.initialize()},update:function(){var a=this.isInvalid(y.DATA),b=this.isInvalid(y.SELECTION),c=this.isInvalid(y.STATE);this._previousCustomTextInputVariant!=this.get_customTextInputVariant()&&this.setInvalidationFlag($d.INVALIDATION_FLAG_TEXT_INPUT_FACTORY);
this._previousCustomButtonVariant!=this.get_customButtonVariant()&&this.setInvalidationFlag($d.INVALIDATION_FLAG_BUTTON_FACTORY);this._previousCustomDatePickerVariant!=this.get_customDatePickerVariant()&&this.setInvalidationFlag($d.INVALIDATION_FLAG_DATE_PICKER_FACTORY);var d=this.isInvalid($d.INVALIDATION_FLAG_BUTTON_FACTORY),f=this.isInvalid($d.INVALIDATION_FLAG_TEXT_INPUT_FACTORY),g=this.isInvalid($d.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:$d.defaultButtonFactory;
this._oldButtonFactory=a;this.button=a.create();this.button.get_variant()==null&&this.button.set_variant(this.get_customButtonVariant()!=null?this.get_customButtonVariant():$d.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:
$d.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():$d.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:$d.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():$d.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 rp(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){X.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));X.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(y.STYLES);return this.__popUpAdapter},
clearStyle_popUpAdapter:function(){this.set_popUpAdapter(new al);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(y.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(y.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(y.STYLES);
return this.__customDatePickerVariant},clearStyle_customDatePickerVariant:function(){this.set_customDatePickerVariant(null);return this.get_customDatePickerVariant()},get_styleContext:function(){return $d},__class__:$d,__properties__:I(da.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 zt=Q["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}};zt.__constructs__=[zt.MASK,zt.SCROLL_RECT,zt.RESIZE];var yp=function(){this._requireSelection=
!0;this._selectedIndex=-1;this._ignoreChanges=!1;this._items=[];ma.call(this)};t["feathers.core.ToggleGroup"]=yp;yp.__name__="feathers.core.ToggleGroup";yp.__interfaces__=[xi,sj];yp.__super__=ma;yp.prototype=I(ma.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 xe("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&&X.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 Db("IToggle passed to ToggleGroup addItem() must not be null.");if(this._items.indexOf(a)!=-1)throw new pb("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);x.__implements(a,pk)&&a.set_toggleGroup(this)},removeItem:function(a){var b=this._items.indexOf(a);b!=-1&&(U.remove(this._items,a),a.removeEventListener("change",m(this,this.item_changeHandler)),x.__implements(a,pk)&&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):X.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));x.__implements(c,pk)&&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 xe("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 Db("Attempting to set index of an item that has not been added to this ToggleGroup.");c!=b&&(U.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=x.__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__:yp,__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 vj=function(a,b,c){b==null&&(b=!1);this._toggleGroup=null;this.initializeRadioTheme();ed.call(this,a,b);ed.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"]=vj;vj.__name__="feathers.controls.Radio";vj.__interfaces__=[pk];vj.__super__=ed;vj.prototype=I(ed.prototype,{set_toggleable:function(a){throw new pb("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!=vj.defaultRadioGroup&&this.stage!=null&&(a=vj.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);ed.prototype.dispose.call(this)},initializeRadioTheme:function(){Vw.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=x.__cast(this._toggleGroup.get_selectedItem(),od);this._focusManager!=null?(this._focusManager.set_focus(a),a.showFocus(!0)):this.stage.set_focus(x.__cast(a,Ia))}}},radio_addedToStageHandler:function(a){this._toggleGroup==
null&&this.set_toggleGroup(vj.defaultRadioGroup);this.addEventListener("removedFromStage",m(this,this.radio_removedFromStageHandler))},radio_removedFromStageHandler:function(a){this.removeEventListener("removedFromStage",m(this,this.radio_removedFromStageHandler));this._toggleGroup==vj.defaultRadioGroup&&this._toggleGroup.removeItem(this)},radio_keyDownHandler:function(a){this._enabled&&this.navigateWithKeyboard(a)},get_styleContext:function(){return vj},__class__:vj,__properties__:I(ed.prototype.__properties__,
{set_toggleGroup:"set_toggleGroup",get_toggleGroup:"get_toggleGroup"})});var Pj=Q["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}};Pj.__constructs__=[Pj.SCROLL_RECT,Pj.MASK,Pj.MASKLESS];
var Le=Q["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}};Le.__constructs__=[Le.ON,Le.OFF,Le.AUTO];var zp=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"]=zp;zp.__name__="feathers.data.TabBarItemState";zp.prototype={owner:null,data:null,index:null,selected:null,text:null,enabled:null,recyclerID:null,__class__:zp};var Ne=function(a,b){this.__customTabVariant=this.__layout=this.__backgroundSkin=this.__disabledBackgroundSkin=null;this._ignoreChildChanges=!1;this._layoutResult=new Ng;this._layoutMeasurements=new Sb;this._currentBackgroundSkin=this._backgroundSkinMeasurements=
null;this._ignoreSelectionChange=!1;this._layoutItems=[];this._unrenderedData=[];this.itemStatePool=new dc(function(){return new zp});this.tabToItemState=new Ta;this.stringDataToTab=new H;this.objectDataToTab=new Ta;this._additionalStorage=null;this._defaultStorage=new At(null,Me.withClass(ed));this._recyclerMap=null;this._forceItemStateUpdate=!1;this._selectedItem=this._previousCustomTabVariant=null;this._selectedIndex=-1;this._dataProvider=null;this.initializeTabBarTheme();da.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"]=Ne;Ne.__name__="feathers.controls.TabBar";Ne.__interfaces__=[od,xi,sj];Ne.defaultUpdateTab=function(a,b){a.set_text(b.text)};Ne.defaultResetTab=function(a,b){a.set_text(null)};Ne.__super__=da;Ne.prototype=I(da.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(y.SELECTION),X.dispatch(this,"change");this.setInvalid(y.DATA);X.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(y.SELECTION),X.dispatch(this,"change"),this._selectedIndex;this._selectedIndex=a;this._selectedItem=this._dataProvider.get(this._selectedIndex);this.setInvalid(y.SELECTION);X.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(y.SELECTION);X.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(Ne.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(y.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(Ne.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 F.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 zp;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 H);b==null?(b=this._recyclerMap,Object.prototype.hasOwnProperty.call(b.h,a)&&delete b.h[a]):(this._recyclerMap.h[a]=b,this.setInvalid(Ne.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);da.prototype.dispose.call(this)},initializeTabBarTheme:function(){Yw.initialize()},update:function(){var a=this.isInvalid(y.DATA);this.isInvalid(y.LAYOUT);var b=this.isInvalid(y.SELECTION),c=this.isInvalid(y.STATE),d=this.isInvalid(y.STYLES);this._previousCustomTabVariant!=this.get_customTabVariant()&&this.setInvalidationFlag(Ne.INVALIDATION_FLAG_TAB_FACTORY);var f=this.isInvalid(Ne.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(!x.__implements(c,ba))break;c.validateNow()}},refreshTabs:function(){this.get_tabRecycler().update==null&&(this.get_tabRecycler().update=Ne.defaultUpdateTab,this.get_tabRecycler().reset==null&&(this.get_tabRecycler().reset=Ne.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=Ne.defaultUpdateTab,f.reset==null&&(f.reset=Ne.defaultResetTab))}a=this.isInvalid(Ne.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=x.getClass(this),new pb(""+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=
x.getClass(this),new pb(""+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=x.getClass(this),new pb(""+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:
(x.__implements(a,Ea)&&a.initializeNow(),this._backgroundSkinMeasurements==null?this._backgroundSkinMeasurements=new Sb(a):this._backgroundSkinMeasurements.save(a),x.__implements(a,sb)&&a.set_uiContext(this),this.addChildAt(a,0))},removeCurrentBackgroundSkin:function(a){a!=null&&(x.__implements(a,sb)&&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),x.__implements(this._currentBackgroundSkin,ba)&&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(!U.remove(q.inactiveTabs,g))throw a=x.getClass(this),new pb(""+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():Ne.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 pb('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 At(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,Ne.RESET_TAB_STATE)},refreshTabProperties:function(a,b){var c=this._ignoreSelectionChange;this._ignoreSelectionChange=!0;x.__implements(a,Ea)&&a.set_enabled(b.enabled);x.__implements(a,Gh)&&a.set_data(b.data);x.__implements(a,yi)&&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=x.__cast(a.currentTarget,ed);Vj.dispatch(this,"itemTrigger",this.tabToItemState.h[a.__id__])},tabBar_tab_changeHandler:function(a){this._ignoreSelectionChange||(a=x.__cast(a.currentTarget,ed),a.get_selected()?this.set_selectedItem(this.tabToItemState.h[a.__id__].data):a.set_selected(!0))},tabBar_dataProvider_changeHandler:function(a){this.setInvalid(y.DATA)},
tabBar_dataProvider_addItemHandler:function(a){this._selectedIndex!=-1&&this._selectedIndex>=a.index&&(this._selectedIndex++,X.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),X.dispatch(this,"change")):this._selectedIndex>a.index&&
(this._selectedIndex--,X.dispatch(this,"change")))},tabBar_dataProvider_replaceItemHandler:function(a){this._selectedIndex!=-1&&this._selectedIndex==a.index&&(this._selectedItem=this._dataProvider.get(this._selectedIndex),X.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(y.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(y.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(y.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(y.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(y.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(y.STYLES);return this.__disabledBackgroundSkin},clearStyle_disabledBackgroundSkin:function(){this.set_disabledBackgroundSkin(null);return this.get_disabledBackgroundSkin()},get_styleContext:function(){return Ne},__class__:Ne,__properties__:I(da.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 At=function(a,b){this.inactiveTabs=[];this.activeTabs=[];this.id=a;this.tabRecycler=b};t["feathers.controls._TabBar.TabStorage"]=At;At.__name__="feathers.controls._TabBar.TabStorage";At.prototype={id:null,oldTabRecycler:null,tabRecycler:null,activeTabs:null,inactiveTabs:null,
__class__:At};var sf=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=Ee.ENABLED;this._editable=this._selectable=!0;this._updatedPromptStyles=!1;this._previousTextFormat=this._previousSimpleTextFormat=this._previousPrompt=this._previousPromptTextFormat=this._previousSimplePromptTextFormat=null;this.initializeTextAreaTheme();Bb.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 Ap,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"]=sf;sf.__name__="feathers.controls.TextArea";sf.__interfaces__=[ai,te,Bh];sf.__super__=Bb;sf.prototype=I(Bb.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(y.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(y.DATA);return this._selectable},_currentState:null,get_currentState:function(){return this._currentState},
set_enabled:function(a){Bb.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(y.DATA);X.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(y.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(y.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(y.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(y.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(y.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(y.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(y.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(sf.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(y.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(y.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){Bb.prototype.showFocus.call(this,a);a&&this.selectRange(this._text.length,0)},dispose:function(){this.destroyErrorCallout();Bb.prototype.dispose.call(this)},initializeTextAreaTheme:function(){$w.initialize()},
update:function(){var a=this.isInvalid(y.DATA),b=this.isInvalid(y.SIZE),c=this.isInvalid(y.STATE),d=this.isInvalid(y.STYLES);this._previousCustomErrorCalloutVariant!=this.get_customErrorCalloutVariant()&&this.setInvalidationFlag(sf.INVALIDATION_FLAG_ERROR_CALLOUT_FACTORY);var f=this.isInvalid(sf.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));Bb.prototype.update.call(this);(f||c||a)&&this.refreshErrorString();this._previousCustomErrorCalloutVariant=this.get_customErrorCalloutVariant()},layoutChildren:function(){Bb.prototype.layoutChildren.call(this);this.layoutPrompt()},addCurrentBackgroundSkin:function(a){a!=null&&x.__implements(a,ge)&&a.set_stateContext(this);Bb.prototype.addCurrentBackgroundSkin.call(this,a)},removeCurrentBackgroundSkin:function(a){a!=null&&(x.__implements(a,ge)&&a.set_stateContext(null),Bb.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 Ic,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()!=Ee.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==Ee.FOCUSED&&this.errorStringCallout.parent==null?Aa.addPopUp(this.errorStringCallout,this,!1,!1):this._currentState!=Ee.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:Bb.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:sf.defaultErrorCalloutFactory;this._oldErrorCalloutFactory=
a;this.errorStringCallout=a.create();this.errorStringCallout.get_variant()==null&&this.errorStringCallout.set_variant(this.get_customErrorCalloutVariant()!=null?this.get_customErrorCalloutVariant():sf.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=Ee.DISABLED);this._currentState!=a&&(this._currentState=a,this.setInvalid(y.STATE),X.dispatch(this,"stateChange"))},getCurrentFocusRectSkin:function(){return this._errorString!=null&&this.get_errorFocusRectSkin()!=null?this.get_errorFocusRectSkin():Bb.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(Ee.FOCUSED):this._errorString!=null?this.changeState(Ee.ERROR):this.changeState(Ee.ENABLED)}else this.changeState(Ee.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(y.STYLES)},textArea_promptTextFormat_changeHandler:function(a){this.setInvalid(y.STYLES)},get_styleContext:function(){return sf},__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(y.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(y.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(y.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(y.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(y.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(y.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(y.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(y.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(y.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(y.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(y.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(y.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(y.STYLES);return this.__customErrorCalloutVariant},clearStyle_customErrorCalloutVariant:function(){this.set_customErrorCalloutVariant(null);return this.get_customErrorCalloutVariant()},__class__:sf,__properties__:I(Bb.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 Ee=Q["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}};Ee.__constructs__=[Ee.ENABLED,Ee.DISABLED,Ee.FOCUSED,Ee.ERROR];var Yb=Q["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 Pk=function(a,b){a==null&&(a=!1);this.__toggleEase=Ah.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();da.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"]=Pk;Pk.__name__="feathers.controls.ToggleSwitch";Pk.__interfaces__=[od,ud];Pk.__super__=da;Pk.prototype=I(da.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;X.dispatch(this,"change");this.setInvalid(y.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(y.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(y.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(){dx.initialize()},update:function(){var a=this.isInvalid(y.DATA),b=this.isInvalid(y.SELECTION),c=this.isInvalid(y.SIZE),
d=this.isInvalid(y.STATE),f=this.isInvalid(y.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),x.__implements(this._currentThumbSkin,ba)&&this._currentThumbSkin.validateNow());this._currentTrackSkin!=null&&(this._trackSkinMeasurements.restore(this._currentTrackSkin),x.__implements(this._currentTrackSkin,ba)&&this._currentTrackSkin.validateNow());this._currentSecondaryTrackSkin!=
null&&(this._secondaryTrackSkinMeasurements.restore(this._currentSecondaryTrackSkin),x.__implements(this._currentSecondaryTrackSkin,ba)&&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 Ic;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 Ic,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&&(x.__implements(a,sb)&&a.set_uiContext(null),this.removeChild(a)),this._currentThumbSkin!=null?(x.__implements(this._currentThumbSkin,Ea)&&this._currentThumbSkin.initializeNow(),this._thumbSkinMeasurements==null?this._thumbSkinMeasurements=new Sb(this._currentThumbSkin):this._thumbSkinMeasurements.save(this._currentThumbSkin),x.__implements(this._currentThumbSkin,sb)&&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&&(x.__implements(a,sb)&&a.set_uiContext(null),this.removeChild(a)),this._currentTrackSkin!=null?(x.__implements(this._currentTrackSkin,Ea)&&this._currentTrackSkin.initializeNow(),this._trackSkinMeasurements==null?this._trackSkinMeasurements=new Sb(this._currentTrackSkin):this._trackSkinMeasurements.save(this._currentTrackSkin),
x.__implements(this._currentTrackSkin,sb)&&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&&(x.__implements(a,sb)&&a.set_uiContext(null),this.removeChild(a)),this._currentSecondaryTrackSkin!=null?(x.__implements(this._currentSecondaryTrackSkin,
Ea)&&this._currentSecondaryTrackSkin.initializeNow(),this._secondaryTrackSkinMeasurements==null?this._secondaryTrackSkinMeasurements=new Sb(this._currentSecondaryTrackSkin):this._secondaryTrackSkinMeasurements.save(this._currentSecondaryTrackSkin),x.__implements(this._currentSecondaryTrackSkin,sb)&&this._currentSecondaryTrackSkin.set_uiContext(this),this.addChildAt(this._currentSecondaryTrackSkin,this._currentTrackSkin!=null?1:0)):this._secondaryTrackSkinMeasurements=null)},refreshSelection:function(){x.__implements(this._currentThumbSkin,
ud)&&this._currentThumbSkin.set_selected(this._selected);x.__implements(this._currentTrackSkin,ud)&&this._currentTrackSkin.set_selected(this._selected);x.__implements(this._currentSecondaryTrackSkin,ud)&&this._currentSecondaryTrackSkin.set_selected(this._selected);this._toggleTween!=null&&(xa.stop(this._toggleTween,null,!1,!1),this._toggleTween=null)},refreshEnabled:function(){x.__implements(this._currentThumbSkin,Ea)&&this._currentThumbSkin.set_enabled(this._enabled);x.__implements(this._currentTrackSkin,
Ea)&&this._currentTrackSkin.set_enabled(this._enabled);x.__implements(this._currentSecondaryTrackSkin,Ea)&&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){x.__implements(this._currentThumbSkin,ba)&&this._currentThumbSkin.validateNow();var b=this.get_paddingLeft();this._selected&&(b=this.actualWidth-this._currentThumbSkin.get_width()-this.get_paddingRight());
this._animateSelectionChange?(this._toggleTween=xa.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);x.__implements(this._currentTrackSkin,ba)&&this._currentTrackSkin.validateNow();x.__implements(this._currentSecondaryTrackSkin,ba)&&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),x.__implements(this._currentTrackSkin,ba)&&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 Hc("click")))},toggleSwitch_mouseDownHandler:function(a){this._enabled&&this.stage!=null&&Rd.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=x.__cast(a.currentTarget,dd);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(y.STYLES)},toggleSwitch_offTextFormat_changeHandler:function(a){this.setInvalid(y.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(y.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(y.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(y.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(y.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(y.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(y.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(y.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(y.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(y.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(y.STYLES);return this.__toggleEase},clearStyle_toggleEase:function(){this.set_toggleEase(Ah.easeOut);return this.get_toggleEase()},get_styleContext:function(){return Pk},__class__:Pk,__properties__:I(da.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 Bt=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"]=Bt;Bt.__name__="feathers.data.TreeGridViewHeaderState";Bt.prototype={owner:null,column:null,columnIndex:null,text:null,enabled:null,__class__:Bt};
var Ct=function(){this.enabled=!0;this.branch=this.opened=this.selected=!1;this.layoutIndex=-1;this.rowLocation=null};t["feathers.controls._TreeGridView.TreeGridViewRowState"]=Ct;Ct.__name__="feathers.controls._TreeGridView.TreeGridViewRowState";Ct.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__:Ct};var Ac=
function(a,b,c){this.__extendedScrollBarY=this.__showHeaderDividersOnlyWhenResizable=!1;this.__customHeaderDividerVariant=this.__columnDividerFactory=this.__customColumnDividerVariant=this.__layout=this.__columnResizeSkin=this.__headerCornerSkin=null;this.__headerDividerFactory=Kc.withClass(Wb);this._pendingScrollLocation=this._pendingScrollDuration=this.__customCellRendererVariant=this.__customHeaderRendererVariant=null;this._ignoreSelectionChange=this._ignoreOpenedChange=this._ignoreLayoutChanges=
this._ignoreHeaderLayoutChanges=!1;this._selectable=!0;this._tempVisibleIndices=new Yi(0,0);this._visibleIndices=new Yi(0,0);this._virtualCache=[];this._totalRowLayoutCount=0;this._rowLayoutItems=[];this._unrenderedLayoutIndices=[];this._unrenderedLocations=[];this.rowStatePool=new dc(function(){return new Ct});this.headerStatePool=new dc(function(){return new Bt});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=Me.withClass(Mf);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 Ha;this._headerScrollRect1=new Ha;this._columnDividerLayoutItems=[];this._defaultColumnDividerStorage=new wx;this._headerDividerLayoutItems=
[];this._defaultHeaderDividerStorage=new xx(Kc.withClass(Wb));this._headerLayoutItems=[];this._unrenderedHeaderData=[];this._defaultHeaderStorage=new yx(Me.withClass(cl));this._resizingHeaderTouchPointIsMouse=!1;this._resizingHeaderTouchPointID=null;this._resizingHeaderIndex=-1;this.initializeTreeGridViewTheme();Bb.call(this);this._rowRendererFactory==null&&this.set_rowRendererFactory(Me.withClass(bg));this.set_dataProvider(a);this.set_columns(b);this.set_tabEnabled(!0);this.focusRect=null;this.get_viewPort()==
null&&(this.treeGridViewPort=new $k,this.addChild(this.treeGridViewPort),this.set_viewPort(this.treeGridViewPort));c!=null&&this.addEventListener("change",c)};t["feathers.controls.TreeGridView"]=Ac;Ac.__name__="feathers.controls.TreeGridView";Ac.__interfaces__=[rg,xi];Ac.defaultUpdateHeaderRenderer=function(a,b){x.__implements(a,te)&&a.set_text(b.text)};Ac.defaultResetHeaderRenderer=function(a,b){x.__implements(a,te)&&a.set_text(null)};Ac.__super__=Bb;Ac.prototype=I(Bb.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(y.DATA);X.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(y.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(Ac.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(Ac.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(y.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(y.SELECTION);X.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(y.SELECTION);X.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(y.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(y.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(y.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(y.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 Db("Cannot open branch because it is not in the data provider.");if(!this._dataProvider.isBranch(a))throw new Db("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 Db("Cannot open branch because it is not in the data provider.");
if(!this._dataProvider.isBranch(a))throw new Db("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);Bb.prototype.dispose.call(this)},initializeTreeGridViewTheme:function(){fx.initialize()},initialize:function(){Bb.prototype.initialize.call(this);this._headerContainerLayout==null&&(this._headerContainerLayout=new Sl,this._headerContainerLayout.set_heightResetEnabled(!1));this._headerContainer==null&&(this._headerContainer=new qb,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(y.DATA),b=this.isInvalid(y.LAYOUT),c=this.isInvalid(y.STATE),d=this.isInvalid(y.STYLES);this._previousCustomHeaderRendererVariant!=this.get_customHeaderRendererVariant()&&
this.setInvalidationFlag(Ac.INVALIDATION_FLAG_HEADER_RENDERER_FACTORY);var f=this.isInvalid(Ac.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(Ac.INVALIDATION_FLAG_HEADER_DIVIDER_FACTORY));this._defaultHeaderDividerStorage.customHeaderDividerVariant!=
this.get_customHeaderDividerVariant()&&(this._defaultHeaderDividerStorage.customHeaderDividerVariant=this.get_customHeaderDividerVariant(),this.setInvalidationFlag(Ac.INVALIDATION_FLAG_HEADER_DIVIDER_FACTORY));var g=this.isInvalid(Ac.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(Ac.INVALIDATION_FLAG_COLUMN_DIVIDER_FACTORY));this._defaultColumnDividerStorage.customColumnDividerVariant!=this.get_customColumnDividerVariant()&&(this._defaultColumnDividerStorage.customColumnDividerVariant=this.get_customColumnDividerVariant(),this.setInvalidationFlag(Ac.INVALIDATION_FLAG_COLUMN_DIVIDER_FACTORY));var h=this.isInvalid(Ac.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();Bb.prototype.update.call(this);this._previousCustomHeaderRendererVariant=this.get_customHeaderRendererVariant();
this.validateCustomColumnWidths();this.layoutHeaders();this.layoutHeaderDividers();this.layoutColumnDividers();this.handlePendingScroll()},createScroller:function(){Bb.prototype.createScroller.call(this);this.treeGridViewPort.set_scroller(this.scroller)},refreshScrollerValues:function(){Bb.prototype.refreshScrollerValues.call(this);if(x.__implements(this.get_layout(),gf)){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&&
x.__implements(this.get_layout(),ci)){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()&&Bb.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());Bb.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=u.fields(c);for(var d=Array(c.length),f=0,g=c.length;f<g;){var h=f++,n=[c[h]];d[h]=new Gm(n[0],function(l){return function(q){return F.string(u.getProperty(q,l[0]))}}(n))}b=new fg(d)}else b=new fg;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());x.__implements(d,ba)&&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];
x.__implements(d,ba)&&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;Bb.prototype.layoutScrollBars.call(this);this.topViewPortOffset=a}else Bb.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&&(x.__implements(a,Ea)&&a.initializeNow(),x.__implements(a,sb)&&a.set_uiContext(this),this.addChild(a))},removeCurrentHeaderCornerSkin:function(a){a!=null&&(x.__implements(a,sb)&&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&&(x.__implements(this._currentColumnResizeSkin,Ea)&&this._currentColumnResizeSkin.initializeNow(),x.__implements(this._currentColumnResizeSkin,sb)&&this._currentColumnResizeSkin.set_uiContext(this),this._currentColumnResizeSkin.set_visible(!1),
this._currentColumnResizeSkin instanceof Ia&&(this._currentColumnResizeSkin.mouseEnabled=!1),this._currentColumnResizeSkin instanceof Ab&&(this._currentColumnResizeSkin.mouseChildren=!1),this.addChildAt(this._currentColumnResizeSkin,0)))},getCurrentColumnResizeSkin:function(){return this.get_columnResizeSkin()},removeCurrentColumnResizeSkin:function(a){a!=null&&(x.__implements(a,sb)&&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=Ac.defaultUpdateHeaderRenderer,this._defaultHeaderStorage.headerRendererRecycler.reset==null&&(this._defaultHeaderStorage.headerRendererRecycler.reset=Ac.defaultResetHeaderRenderer));a=this.isInvalid(Ac.INVALIDATION_FLAG_HEADER_RENDERER_FACTORY);this.refreshInactiveHeaderRenderers(a);
this.findUnrenderedHeaderData();this.recoverInactiveHeaderRenderers();this.renderUnrenderedHeaderData();this.freeInactiveHeaderRenderers();if(this._defaultHeaderStorage.inactiveHeaderRenderers.length>0)throw a=x.getClass(this),new pb(""+a.__name__+": inactive header renderers should be empty after updating.");},refreshHeaderDividers:function(){var a=this.isInvalid(Ac.INVALIDATION_FLAG_HEADER_DIVIDER_FACTORY);this.refreshInactiveHeaderDividers(a);this.refreshActiveHeaderDividers();this.freeInactiveHeaderDividers();
if(this._defaultHeaderDividerStorage.inactiveHeaderDividers.length>0)throw a=x.getClass(this),new pb(""+a.__name__+": inactive header dividers should be empty after updating.");},refreshColumnDividers:function(){var a=this.isInvalid(Ac.INVALIDATION_FLAG_COLUMN_DIVIDER_FACTORY);this.refreshInactiveColumnDividers(a);this.refreshActiveColumnDividers();this.freeInactiveColumnDividers();if(this._defaultColumnDividerStorage.inactiveColumnDividers.length>0)throw a=x.getClass(this),new pb(""+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=x.getClass(this),new pb(""+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(x.__implements(a,kd)){var c=a;if(c.get_variant()==
null){var d=this.get_customHeaderDividerVariant()!=null?this.get_customHeaderDividerVariant():Ac.CHILD_VARIANT_HEADER_DIVIDER;c.set_variant(d)}}x.__implements(a,Ea)&&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=x.getClass(this),
new pb(""+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(x.__implements(a,kd)){var c=a;if(c.get_variant()==null){var d=this.get_customColumnDividerVariant()!=null?this.get_customColumnDividerVariant():Ac.CHILD_VARIANT_COLUMN_DIVIDER;c.set_variant(d)}}x.__implements(a,Ea)&&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=x.getClass(this),new pb(""+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(!U.remove(this._defaultHeaderStorage.inactiveHeaderRenderers,f))throw a=x.getClass(this),new pb(""+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(Ac.INVALIDATION_FLAG_ROW_RENDERER_FACTORY);this.refreshInactiveRowRenderers(a);this.findUnrenderedData();this.recoverInactiveRowRenderers();this.renderUnrenderedData();this.freeInactiveRowRenderers();if(this.inactiveRowRenderers.length>0)throw a=x.getClass(this),new pb(""+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=x.getClass(this),new pb(""+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&&x.__implements(this.get_layout(),ci)){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(!U.remove(this.inactiveRowRenderers,d))throw a=x.getClass(this),new pb(""+a.__name__+": row renderer map contains bad data for item at location "+F.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,Ac.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(x.__implements(b,kd)){var c=b;if(c.get_variant()==null){var d=this.get_customHeaderRendererVariant()!=null?this.get_customHeaderRendererVariant():
Ac.CHILD_VARIANT_HEADER_RENDERER;c.set_variant(d)}}x.__implements(b,Ea)&&b.initializeNow();this._defaultHeaderStorage.measurements==null&&(this._defaultHeaderStorage.measurements=new Sb(b))}else b=this._defaultHeaderStorage.inactiveHeaderRenderers.shift();this.updateHeaderRenderer(b,a);x.__implements(b,Xh)?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)));x.__implements(b,tb)&&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,Ac.RESET_HEADER_STATE)},refreshHeaderRendererProperties:function(a,b){x.__implements(a,Ea)&&a.set_enabled(b.enabled);x.__implements(a,Bp)&&(a.set_column(b.column),a.set_columnIndex(b.columnIndex),a.set_treeGridViewOwner(b.owner));x.__implements(a,yi)&&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(x.__implements(this.get_layout(),Sj)){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:x.__implements(this.get_layout(),gf)&&(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(x.__implements(this.get_layout(),gf))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 Hm,this.populateCurrentRowCellState(a,b,null,-1,c,d,!0),$e.dispatchForCell(this,"branchOpen",d)):!d&&n&&(U.remove(this.openBranches,a),this.populateCurrentRowState(a,b,c,g,!0),this.removeChildrenFromVirtualCache(b,c),f!=null&&this.updateRowRenderer(f,
g),d=new Hm,this.populateCurrentRowCellState(a,b,null,-1,c,d,!0),$e.dispatchForCell(this,"branchClose",d));h&&this.rowStatePool.release(g);this.setInvalid(y.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 Ic&&this.stage.get_focus().get_type()==1||this.navigateWithKeyboard(a)):Bb.prototype.baseScrollContainer_keyDownHandler.call(this,a)},treeGridView_rowRenderer_triggerHandler:function(a){this._selectable&&
(a=x.__cast(a.currentTarget,bg),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=x.__cast(a.currentTarget,bg),this.toggleBranch(this.rowRendererToRowState.h[a.__id__].data,!0))},treeGridView_rowRenderer_closeHandler:function(a){this._ignoreOpenedChange||
(a=x.__cast(a.currentTarget,bg),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(y.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),X.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(y.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(y.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(y.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(y.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=Rd.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*=ah.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*=ah.getConcatenatedScaleX(this),this.calculateResizedColumnWidth(a),this._resizingHeaderTouchPointID=null,this._resizingHeaderTouchPointIsMouse=!1,this._resizingHeaderIndex=-1,this._oldHeaderDividerMouseCursor!=null&&(zd.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=x.__cast(a.addedItem,Gm);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(y.LAYOUT)}}},treeGridView_columns_removeItemHandler:function(a){if(this._customColumnWidths!=null){var b=x.__cast(a.removedItem,Gm);a=a.index;
b.width!=null||a>this._customColumnWidths.length||(this._customColumnWidths.splice(a,1),this.setInvalid(y.LAYOUT))}},treeGridView_columns_changeHandler:function(a){this.setInvalid(y.DATA)},treeGridView_headerRenderer_touchTapHandler:function(a){this._enabled&&!a.isPrimaryTouchPoint&&(a=x.__cast(a.currentTarget,ka),$e.dispatchForHeader(this,"headerTrigger",this.headerRendererToHeaderState.h[a.__id__]))},treeGridView_headerRenderer_clickHandler:function(a){this._enabled&&(a=x.__cast(a.currentTarget,
ka),$e.dispatchForHeader(this,"headerTrigger",this.headerRendererToHeaderState.h[a.__id__]))},treeGridView_headerRenderer_triggerHandler:function(a){this._enabled&&(a=x.__cast(a.currentTarget,ka),$e.dispatchForHeader(this,"headerTrigger",this.headerRendererToHeaderState.h[a.__id__]))},treeGridView_headerRenderer_resizeHandler:function(a){this._validating||this.setInvalid(y.LAYOUT)},treeGridView_headerDivider_mouseDownHandler:function(a){a=x.__cast(a.currentTarget,Ia);this.headerResizeTouchBegin(Ac.POINTER_ID_MOUSE,
!0,a,a.stage.get_mouseX())},treeGridView_headerDivider_stage_mouseMoveHandler:function(a){a=x.__cast(a.currentTarget,dd);this.headerResizeTouchMove(Ac.POINTER_ID_MOUSE,!0,a.get_mouseX())},treeGridView_headerDivider_stage_mouseUpHandler:function(a){a=x.__cast(a.currentTarget,dd);this.headerResizeTouchEnd(Ac.POINTER_ID_MOUSE,!0,a.get_mouseX())},treeGridView_headerDivider_touchBeginHandler:function(a){if(!a.isPrimaryTouchPoint){var b=x.__cast(a.currentTarget,Ia);this.headerResizeTouchBegin(a.touchPointID,
!1,b,b.stage.get_mouseX())}},treeGridView_headerDivider_stage_touchMoveHandler:function(a){var b=x.__cast(a.currentTarget,dd);this.headerResizeTouchMove(a.touchPointID,!1,b.get_mouseX())},treeGridView_headerDivider_stage_touchEndHandler:function(a){var b=x.__cast(a.currentTarget,dd);this.headerResizeTouchEnd(a.touchPointID,!1,b.get_mouseX())},treeGridView_headerDivider_rollOverHandler:function(a){this._resizableColumns&&this._resizingHeaderIndex==-1&&zd.get_cursor()=="auto"&&(this._oldHeaderDividerMouseCursor=
zd.get_cursor(),zd.set_cursor(hh.fromLimeCursor(fd.RESIZE_WE)))},treeGridView_headerDivider_rollOutHandler:function(a){this._resizableColumns&&this._resizingHeaderIndex==-1&&this._oldHeaderDividerMouseCursor!=null&&(zd.set_cursor(this._oldHeaderDividerMouseCursor),this._oldHeaderDividerMouseCursor=null)},get_styleContext:function(){return Ac},__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(y.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(y.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(y.STYLES);return this.__headerDividerFactory},clearStyle_headerDividerFactory:function(){this.set_headerDividerFactory(Kc.withClass(Wb));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(y.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(y.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(y.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(y.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(y.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(y.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(y.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(y.STYLES);return this.__showHeaderDividersOnlyWhenResizable},clearStyle_showHeaderDividersOnlyWhenResizable:function(){this.set_showHeaderDividersOnlyWhenResizable(!1);return this.get_showHeaderDividersOnlyWhenResizable()},__class__:Ac,__properties__:I(Bb.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 yx=function(a){this.inactiveHeaderRenderers=[];this.activeHeaderRenderers=[];this.headerRendererRecycler=a};t["feathers.controls._TreeGridView.HeaderRendererStorage"]=yx;yx.__name__="feathers.controls._TreeGridView.HeaderRendererStorage";yx.prototype={oldHeaderRendererRecycler:null,headerRendererRecycler:null,activeHeaderRenderers:null,
inactiveHeaderRenderers:null,measurements:null,__class__:yx};var xx=function(a){this.inactiveHeaderDividers=[];this.activeHeaderDividers=[];this.headerDividerFactory=a};t["feathers.controls._TreeGridView.HeaderDividerStorage"]=xx;xx.__name__="feathers.controls._TreeGridView.HeaderDividerStorage";xx.prototype={customHeaderDividerVariant:null,oldHeaderDividerFactory:null,headerDividerFactory:null,activeHeaderDividers:null,inactiveHeaderDividers:null,__class__:xx};var wx=function(a){this.inactiveColumnDividers=
[];this.activeColumnDividers=[];this.columnDividerFactory=a};t["feathers.controls._TreeGridView.ColumnDividerStorage"]=wx;wx.__name__="feathers.controls._TreeGridView.ColumnDividerStorage";wx.prototype={customColumnDividerVariant:null,oldColumnDividerFactory:null,columnDividerFactory:null,activeColumnDividers:null,inactiveColumnDividers:null,__class__:wx};var Gm=function(a,b,c){this.cellRendererRecycler=null;this.minWidth=0;this.width=null;ma.call(this);this.headerText=a;b!=null&&(this.itemToText=
b);this.width=c};t["feathers.controls.TreeGridViewColumn"]=Gm;Gm.__name__="feathers.controls.TreeGridViewColumn";Gm.__interfaces__=[up];Gm.__super__=ma;Gm.prototype=I(ma.prototype,{headerText:null,width:null,minWidth:null,cellRendererRecycler:null,itemToText:function(a){return F.string(a)},__class__:Gm});var Cp=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"]=Cp;Cp.__name__="feathers.data.TreeViewItemState";Cp.prototype={owner:null,data:null,location:null,layoutIndex:null,branch:null,opened:null,selected:null,text:null,enabled:null,recyclerID:null,__class__:Cp};var he=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 Yi(0,0);this._visibleIndices=new Yi(0,0);this._virtualCache=[];this._unrenderedLayoutIndices=[];this._unrenderedLocations=[];this.itemStatePool=new dc(function(){return new Cp});this.itemRendererToItemState=new Ta;this.stringDataToItemRenderer=new H;this.objectDataToItemRenderer=new Ta;this._additionalStorage=null;this._defaultStorage=new Dt(null,Me.withClass(Mf));this._recyclerMap=
null;this._forceItemStateUpdate=!1;this._selectedLocation=this._selectedItem=this._previousCustomItemRendererVariant=null;this.openBranches=[];this._childFocusEnabled=!0;this.initializeTreeViewTheme();Bb.call(this);this.set_dataProvider(a);this.set_tabEnabled(!0);this.focusRect=null;this.get_viewPort()==null&&(this.treeViewPort=new $k,this.addChild(this.treeViewPort),this.set_viewPort(this.treeViewPort));b!=null&&this.addEventListener("change",b)};t["feathers.controls.TreeView"]=he;he.__name__="feathers.controls.TreeView";
he.__interfaces__=[rg,xi];he.defaultUpdateItemRenderer=function(a,b){x.__implements(a,te)&&a.set_text(b.text)};he.defaultResetItemRenderer=function(a,b){x.__implements(a,te)&&a.set_text(null)};he.__super__=Bb;he.prototype=I(Bb.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(y.DATA);X.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(y.SELECTION);X.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(y.SELECTION);X.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(he.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(y.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(he.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(y.LAYOUT);return this._virtualLayout},pointerSelectionEnabled:null,_ignoreSelectionChange:null,_ignoreOpenedChange:null,_ignoreLayoutChanges:null,_currentDisplayIndex:null,_pendingScrollLocation:null,_pendingScrollDuration:null,itemToText:function(a){return F.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 Db("Cannot open branch because it is not in the data provider.");if(!this._dataProvider.isBranch(a))throw new Db("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 Db("Cannot open branch because it is not in the data provider.");if(!this._dataProvider.isBranch(a))throw new Db("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(y.SCROLL))},getItemRendererRecycler:function(a){return this._recyclerMap==null?null:this._recyclerMap.h[a]},setItemRendererRecycler:function(a,b){this._recyclerMap==null&&(this._recyclerMap=new H);b==null?(b=this._recyclerMap,Object.prototype.hasOwnProperty.call(b.h,a)&&delete b.h[a]):(this._recyclerMap.h[a]=b,this.setInvalid(he.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 Cp;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);Bb.prototype.dispose.call(this)},initializeTreeViewTheme:function(){gx.initialize()},update:function(){var a=this.isInvalid(y.LAYOUT),b=this.isInvalid(y.STYLES);this._previousCustomItemRendererVariant!=this.get_customItemRendererVariant()&&this.setInvalidationFlag(he.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();Bb.prototype.update.call(this);this._previousCustomItemRendererVariant=this.get_customItemRendererVariant();this.handlePendingScroll()},createScroller:function(){Bb.prototype.createScroller.call(this);this.treeViewPort.set_scroller(this.scroller)},refreshScrollerValues:function(){Bb.prototype.refreshScrollerValues.call(this);
if(x.__implements(this.get_layout(),gf)){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&&x.__implements(this.get_layout(),ci)){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=he.defaultUpdateItemRenderer,this._defaultStorage.itemRendererRecycler.reset==null&&(this._defaultStorage.itemRendererRecycler.reset=he.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=he.defaultUpdateItemRenderer,f.reset==null&&(f.reset=he.defaultResetItemRenderer))}}a=this.treeViewPort.isInvalid(he.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=x.getClass(this),new pb(""+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=x.getClass(this),new pb(""+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=x.getClass(this),new pb(""+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&&x.__implements(this.get_layout(),ci)){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(!U.remove(h.inactiveItemRenderers,d))throw c=x.getClass(this),new pb(""+c.__name__+": item renderer map contains bad data for item at location "+F.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,he.RESET_ITEM_STATE)},refreshItemRendererProperties:function(a,b){var c=this._ignoreSelectionChange;this._ignoreSelectionChange=!0;var d=this._ignoreOpenedChange;this._ignoreOpenedChange=!0;x.__implements(a,Ea)&&a.set_enabled(b.enabled);x.__implements(a,Gh)&&a.set_data(b.data);x.__implements(a,ud)&&a.set_selected(b.selected);
x.__implements(a,dl)&&a.set_branch(b.branch);x.__implements(a,Im)&&a.set_hierarchyDepth(b.location!=null?b.location.length-1:0);x.__implements(a,Dp)&&(a.set_location(b.location),a.set_treeViewOwner(b.owner));x.__implements(a,yi)&&a.set_layoutIndex(b.layoutIndex);x.__implements(a,Gf)&&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(x.__implements(c,kd)){var d=c;if(d.get_variant()==null){var f=this.get_customItemRendererVariant()!=null?this.get_customItemRendererVariant():
he.CHILD_VARIANT_ITEM_RENDERER;d.set_variant(f)}}x.__implements(c,Ea)&&c.initializeNow();b.measurements==null&&(b.measurements=new Sb(c))}else c=b.inactiveItemRenderers.shift();this.updateItemRenderer(c,a,b);x.__implements(c,Xh)?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)));x.__implements(c,ud)&&c.addEventListener("change",
m(this,this.treeView_itemRenderer_changeHandler));x.__implements(c,tb)&&c.addEventListener("resize",m(this,this.treeView_itemRenderer_resizeHandler));x.__implements(c,Gf)&&(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 pb('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 Dt(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(x.__implements(this.get_layout(),Sj)){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(x.__implements(this.get_layout(),gf)){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(x.__implements(this.get_layout(),gf))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)Bb.prototype.baseScrollContainer_keyDownHandler.call(this,a);else if(this._enabled&&!a.isDefaultPrevented()&&this._dataProvider!=null&&!(this.stage!=null&&this.stage.get_focus()instanceof Ic&&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);Og.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)),Og.dispatch(this,"branchOpen",g)):!d&&n&&(U.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)),Og.dispatch(this,"branchClose",g));h&&this.itemStatePool.release(g);
this.setInvalid(y.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=x.__cast(a.currentTarget,ka),a=this.itemRendererToItemState.h[a.__id__],Og.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=x.__cast(a.currentTarget,
ka),a=this.itemRendererToItemState.h[a.__id__],Og.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=x.__cast(a.currentTarget,ka),a=this.itemRendererToItemState.h[a.__id__],Og.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(y.LAYOUT)},treeView_itemRenderer_changeHandler:function(a){if(!this._ignoreSelectionChange){var b=x.__cast(a.currentTarget,ka);a=x.__cast(b,ud);b=this.itemRendererToItemState.h[b.__id__];a.get_selected()!=b.selected&&this.setInvalid(y.SELECTION)}},treeView_itemRenderer_openHandler:function(a){this._ignoreOpenedChange||(a=x.__cast(a.currentTarget,
ka),this.toggleBranch(this.itemRendererToItemState.h[a.__id__].data,!0))},treeView_itemRenderer_closeHandler:function(a){this._ignoreOpenedChange||(a=x.__cast(a.currentTarget,ka),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(y.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),X.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(y.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(y.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 he},__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(y.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(y.STYLES);return this.__customItemRendererVariant},clearStyle_customItemRendererVariant:function(){this.set_customItemRendererVariant(null);return this.get_customItemRendererVariant()},__class__:he,__properties__:I(Bb.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 Dt=function(a,b){this.inactiveItemRenderers=[];this.activeItemRenderers=[];this.id=a;this.itemRendererRecycler=b};t["feathers.controls._TreeView.ItemRendererStorage"]=Dt;Dt.__name__="feathers.controls._TreeView.ItemRendererStorage";Dt.prototype={id:null,oldItemRendererRecycler:null,itemRendererRecycler:null,activeItemRenderers:null,
inactiveItemRenderers:null,measurements:null,__class__:Dt};var Rn=function(a,b,c,d){c==null&&(c=1);b==null&&(b=0);a==null&&(a=0);this.initializeVProgressBarTheme();nk.call(this,a,b,c,d)};t["feathers.controls.VProgressBar"]=Rn;Rn.__name__="feathers.controls.VProgressBar";Rn.__super__=nk;Rn.prototype=I(nk.prototype,{_currentMask:null,initializeVProgressBarTheme:function(){hx.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);x.__implements(this._currentBackgroundSkin,tb);x.__implements(this._currentBackgroundSkin,ba)&&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),x.__implements(this._currentBackgroundSkin,ba)&&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 ab(vb.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 Ha(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)}x.__implements(this._currentFillSkin,
ba)&&this._currentFillSkin.validateNow()}},get_styleContext:function(){return Rn},__class__:Rn});var Sn=function(a,b,c,d){c==null&&(c=1);b==null&&(b=0);a==null&&(a=0);this.initializeVSliderTheme();ok.call(this,a,b,c,d);this.addEventListener("keyDown",m(this,this.vSlider_keyDownHandler))};t["feathers.controls.VSlider"]=Sn;Sn.__name__="feathers.controls.VSlider";Sn.__super__=ok;Sn.prototype=I(ok.prototype,{initializeVSliderTheme:function(){ix.initialize()},valueToLocation:function(a){x.__implements(this._currentThumbSkin,
ba)&&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),x.__implements(this._currentThumbSkin,ba)&&this._currentThumbSkin.validateNow());
this._currentTrackSkin!=null&&(this._trackSkinMeasurements.restore(this._currentTrackSkin),x.__implements(this._currentTrackSkin,ba)&&this._currentTrackSkin.validateNow());this._currentSecondaryTrackSkin!=null&&(this._secondaryTrackSkinMeasurements.restore(this._currentSecondaryTrackSkin),x.__implements(this._currentSecondaryTrackSkin,ba)&&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&&(x.__implements(this._currentThumbSkin,ba)&&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);x.__implements(this._currentSecondaryTrackSkin,ba)&&this._currentSecondaryTrackSkin.validateNow();x.__implements(this._currentTrackSkin,ba)&&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),x.__implements(this._currentTrackSkin,ba)&&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 Sn},__class__:Sn});var Gh=function(){};t["feathers.controls.dataRenderers.IDataRenderer"]=Gh;Gh.__name__="feathers.controls.dataRenderers.IDataRenderer";
Gh.__isInterface__=!0;Gh.__interfaces__=[Ea];Gh.prototype={get_data:null,set_data:null,__class__:Gh,__properties__:{set_data:"set_data",get_data:"get_data"}};var Ep=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"]=Ep;Ep.__name__="feathers.data.GridViewCellState";Ep.prototype={owner:null,data:null,rowIndex:null,columnIndex:null,
column:null,selected:null,text:null,enabled:null,__class__:Ep};var gg=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 Ep});this._cellRendererToCellState=new Ta;this._columnToCellRenderer=new Ta;this._unrenderedData=[];this._additionalStorage=null;this._defaultStorage=new Et;qb.call(this)};t["feathers.controls.dataRenderers.GridViewRowRenderer"]=
gg;gg.__name__="feathers.controls.dataRenderers.GridViewRowRenderer";gg.__interfaces__=[Bh,Gh,ud,Xh];gg.defaultUpdateCellRenderer=function(a,b){x.__implements(a,te)&&a.set_text(b.text)};gg.defaultResetCellRenderer=function(a,b){x.__implements(a,te)&&a.set_text(null)};gg.__super__=qb;gg.prototype=I(qb.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){qb.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(y.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(y.SELECTION);X.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(y.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(y.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(y.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(gg.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(y.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(gg.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(y.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)}qb.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 Ep;this.populateCurrentItemState(a,c,b,!1)}return b},initialize:function(){qb.prototype.initialize.call(this);this._pointerToState==null&&(this._pointerToState=new zm(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 Gn(this,m(this,this.changeState),Yb.UP(!1),Yb.DOWN(!1)));this.get_layout()==null&&(this._rowLayout=new Sl,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(y.STATE),X.dispatch(this,"stateChange"))},addCurrentBackgroundSkin:function(a){a!=null&&x.__implements(a,ge)&&a.set_stateContext(this);qb.prototype.addCurrentBackgroundSkin.call(this,a)},removeCurrentBackgroundSkin:function(a){a!=null&&x.__implements(a,ge)&&a.set_stateContext(null);qb.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();qb.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=gg.defaultUpdateCellRenderer,this._defaultStorage.cellRendererRecycler.reset==
null&&(this._defaultStorage.cellRendererRecycler.reset=gg.defaultResetCellRenderer));for(var a=this._columns.iterator();a.hasNext();){var b=a.next();b.cellRendererRecycler!=null&&b.cellRendererRecycler.update==null&&(b.cellRendererRecycler.update=gg.defaultUpdateCellRenderer,b.cellRendererRecycler.reset==null&&(b.cellRendererRecycler.reset=gg.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=x.getClass(this),new pb(""+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=x.getClass(this),new pb(""+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=x.getClass(this),new pb(""+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(!U.remove(h.inactiveCellRenderers,g))throw a=x.getClass(this),new pb(""+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 Et(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(x.__implements(d,kd)){var f=d;if(f.get_variant()==null){var g=this.get_customCellRendererVariant()!=null?this.get_customCellRendererVariant():rc.CHILD_VARIANT_CELL_RENDERER;f.set_variant(g)}}x.__implements(d,
Ea)&&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);x.__implements(d,Xh)?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)));x.__implements(d,
ud)&&d.addEventListener("change",m(this,this.gridViewRowRenderer_cellRenderer_changeHandler));x.__implements(d,tb)&&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(y.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(y.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,gg.RESET_CELL_STATE)},refreshCellRendererProperties:function(a,b){var c=this._ignoreSelectionChange;this._ignoreSelectionChange=!0;x.__implements(a,Ea)&&a.set_enabled(b.enabled);x.__implements(a,Gh)&&a.set_data(b.data);
x.__implements(a,ud)&&a.set_selected(b.selected);x.__implements(a,Fp)&&(a.set_column(b.column),a.set_columnIndex(b.columnIndex),a.set_rowIndex(b.rowIndex),a.set_gridViewOwner(b.owner));x.__implements(a,yi)&&a.set_layoutIndex(b.rowIndex);x.__implements(a,Jm)&&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 Ca(a,b)),a.length>0&&(a=a[a.length-1],this.contains(a))))for(;a!=
null&&a!=this;){if((!(a instanceof Ia)||a.mouseEnabled)&&x.__implements(a,od)&&(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=x.__cast(a.currentTarget,ka);Lf.dispatchForCell(this,"cellTrigger",this._cellRendererToCellState.h[b.__id__]);of.dispatchFromTouchEvent(this,a)}},gridViewRowRenderer_cellRenderer_clickHandler:function(a){if(this._enabled&&
this.customHitTest(a.stageX,a.stageY)){var b=x.__cast(a.currentTarget,ka);Lf.dispatchForCell(this,"cellTrigger",this._cellRendererToCellState.h[b.__id__]);of.dispatchFromMouseEvent(this,a)}},gridViewRowRenderer_cellRenderer_triggerHandler:function(a){if(this._enabled&&this.customHitTest(a.stageX,a.stageY)){var b=x.__cast(a.currentTarget,ka);Lf.dispatchForCell(this,"cellTrigger",this._cellRendererToCellState.h[b.__id__]);this.dispatchEvent(a)}},gridViewRowRenderer_cellRenderer_resizeHandler:function(a){this._validating||
this.setInvalid(y.LAYOUT)},gridViewRowRenderer_cellRenderer_changeHandler:function(a){if(!this._ignoreSelectionChange){var b=x.__cast(a.currentTarget,ka);a=x.__cast(b,ud);b=this._cellRendererToCellState.h[b.__id__];a.get_selected()!=b.selected&&this.setInvalid(y.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);Lf.dispatchForCell(this,"cellTrigger",c);b&&this.cellStatePool.release(c)}},gridViewRowRenderer_columns_changeHandler:function(a){this.setInvalid(y.DATA)},get_styleContext:function(){return gg},__class__:gg,__properties__:I(qb.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 Et=function(a){this.inactiveCellRenderers=[];this.activeCellRenderers=[];this.cellRendererRecycler=a};t["feathers.controls.dataRenderers._GridViewRowRenderer.CellRendererStorage"]=Et;Et.__name__="feathers.controls.dataRenderers._GridViewRowRenderer.CellRendererStorage";Et.prototype={oldCellRendererRecycler:null,cellRendererRecycler:null,activeCellRenderers:null,inactiveCellRenderers:null,measurements:null,__class__:Et};var Jm=function(){};t["feathers.core.IPointerDelegate"]=Jm;Jm.__name__="feathers.core.IPointerDelegate";
Jm.__isInterface__=!0;Jm.prototype={get_pointerTarget:null,set_pointerTarget:null,__class__:Jm,__properties__:{set_pointerTarget:"set_pointerTarget",get_pointerTarget:"get_pointerTarget"}};var yi=function(){};t["feathers.layout.ILayoutIndexObject"]=yi;yi.__name__="feathers.layout.ILayoutIndexObject";yi.__isInterface__=!0;yi.prototype={get_layoutIndex:null,set_layoutIndex:null,__class__:yi,__properties__:{set_layoutIndex:"set_layoutIndex",get_layoutIndex:"get_layoutIndex"}};var Rc=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();ed.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"]=Rc;Rc.__name__="feathers.controls.dataRenderers.ItemRenderer";Rc.__interfaces__=[Jm,Gh,yi,rg];Rc.__super__=ed;Rc.prototype=I(ed.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(y.DATA);
X.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(y.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(y.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(y.DATA);this.setInvalid(y.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(y.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(y.STYLES))},initializeItemRendererTheme:function(){Nw.initialize()},dispose:function(){this.set_data(null);this.set_layoutIndex(-1);this.set_pointerTarget(null);ed.prototype.dispose.call(this)},initialize:function(){ed.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(y.DATA),b=this.isInvalid(y.SIZE),c=this.isInvalid(y.STATE),
d=this.isInvalid(y.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);ed.prototype.update.call(this)},refreshInteractivity:function(){ed.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 Ic,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)),x.__implements(a,
sb)&&a.set_uiContext(null),x.__implements(a,ge)&&a.set_stateContext(null),this._accessoryViewMeasurements.restore(a),a.parent==this&&this.removeChild(a))},addCurrentAccessoryView:function(a){a==null?this._accessoryViewMeasurements=null:(x.__implements(a,Ea)&&a.initializeNow(),this._accessoryViewMeasurements==null?this._accessoryViewMeasurements=new Sb(a):this._accessoryViewMeasurements.save(a),x.__implements(a,sb)&&a.set_uiContext(this),x.__implements(a,ge)&&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 Ab?c:null;c==null&&(c=this);if(c.stage==null)return!1;if(c.mouseChildren&&(a=c.stage.getObjectsUnderPoint(new Ca(a,b)),a.length>0&&(a=a[a.length-1],c.contains(a))))for(;a!=null&&a!=c;){if(!(a instanceof Ia&&!a.mouseEnabled||!x.__implements(a,od)||(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;x.__implements(this._currentIcon,ba)&&this._currentIcon.validateNow();this._ignoreIconResizes=b;b=this._ignoreAccessoryResizes;this._ignoreAccessoryResizes=!0;x.__implements(this._currentAccessoryView,ba)&&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()==pa.LEFT||this.get_iconPosition()==pa.RIGHT)b-=this._currentIcon.get_width()+a;if(this.get_iconPosition()==
pa.TOP||this.get_iconPosition()==pa.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=ed.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;x.__implements(this._currentAccessoryView,ba)&&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;x.__implements(this._currentAccessoryView,ba)&&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()==pa.LEFT||this.get_iconPosition()==pa.RIGHT){if(b||c||f||g||this.hasAccessoryViewInLayout())d+=a;d+=this._currentIcon.get_width()}else if(this.get_iconPosition()==pa.TOP||this.get_iconPosition()==pa.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;x.__implements(this._currentAccessoryView,ba)&&this._currentAccessoryView.validateNow();this._ignoreAccessoryResizes=h;d=Math.max(d,this._currentAccessoryView.get_height())}if(this._currentIcon!=null)if(this.get_iconPosition()==pa.TOP||this.get_iconPosition()==pa.BOTTOM){if(b||c||f||g)d+=a;d+=this._currentIcon.get_height()}else if(this.get_iconPosition()==pa.LEFT||this.get_iconPosition()==pa.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;x.__implements(this._currentAccessoryView,ba)&&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()==pa.LEFT||this.get_iconPosition()==pa.RIGHT){if(b||c||f||g||this.hasAccessoryViewInLayout())d+=a;d+=this._currentIcon.get_width()}else if(this.get_iconPosition()==pa.TOP||this.get_iconPosition()==pa.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;x.__implements(this._currentAccessoryView,ba)&&this._currentAccessoryView.validateNow();this._ignoreAccessoryResizes=h;d=Math.max(d,this._currentAccessoryView.get_height())}if(this._currentIcon!=null)if(this.get_iconPosition()==pa.TOP||this.get_iconPosition()==pa.BOTTOM){if(b||c||f||g)d+=a;d+=this._currentIcon.get_height()}else if(this.get_iconPosition()==pa.LEFT||this.get_iconPosition()==pa.RIGHT)d=Math.max(d,this._currentIcon.get_height());return d},hasAccessoryViewInLayout:function(){return this._currentAccessoryView==
null?!1:x.__implements(this._currentAccessoryView,R)?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()==pa.LEFT||this.get_iconPosition()==pa.RIGHT)l+=b+this._currentIcon.get_width();if(this.get_iconPosition()==pa.TOP||this.get_iconPosition()==pa.BOTTOM)q+=b+this._currentIcon.get_height()}var v=a&&(c||d||f||g)&&this._currentIcon!=null&&(this.get_iconPosition()==pa.TOP||this.get_iconPosition()==pa.BOTTOM);a=a&&(c||d||f||
g)&&this._currentIcon!=null&&(this.get_iconPosition()==pa.LEFT||this.get_iconPosition()==pa.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 Db("Unknown vertical align: "+F.string(this.get_verticalAlign()));}h-=this._currentAccessoryView.get_width()+b}if(this._currentIcon!=null){if(this.get_iconPosition()==pa.TOP||this.get_iconPosition()==pa.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 Db("Unknown horizontal align: "+F.string(this.get_horizontalAlign()));}if(this.get_iconPosition()==pa.LEFT||this.get_iconPosition()==pa.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 Db("Unknown vertical align: "+F.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 Db("Unknown horizontal align: "+F.string(this.get_horizontalAlign()));}if(v)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 Db("Unknown vertical align: "+F.string(this.get_verticalAlign()));
}this._currentIcon!=null&&(this.get_iconPosition()==pa.LEFT?(this._currentIcon.set_x(l),l+=b+this._currentIcon.get_width()):this.get_iconPosition()==pa.TOP&&(this._currentIcon.set_y(q),q+=b+this._currentIcon.get_height()));var w=0,z=0,r=h;this._currentIcon==null||this.get_iconPosition()!=pa.LEFT&&this.get_iconPosition()!=pa.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,w=Math.max(w,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,w=Math.max(w,r),z+=this.secondaryTextField.get_height());a&&this.get_iconPosition()==pa.LEFT?((c||d)&&this.textField.set_x(Math.max(this.textField.get_x(),this.get_paddingLeft()+h-w)),(f||g)&&this.secondaryTextField.set_x(Math.max(this.secondaryTextField.get_x(),
this.get_paddingLeft()+h-w))):v&&this.get_iconPosition()==pa.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+=w+b;this._currentIcon!=null&&(this.get_iconPosition()==pa.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()==pa.BOTTOM&&(v?
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(y.STYLES)},itemRenderer_accessoryView_resizeHandler:function(a){this._ignoreAccessoryResizes||this.setInvalid(y.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(y.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(y.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(y.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(y.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(y.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(y.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(y.STYLES);return this.__accessoryView},clearStyle_accessoryView:function(){this.set_accessoryView(null);return this.get_accessoryView()},get_styleContext:function(){return Rc},__class__:Rc,__properties__:I(ed.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 Tn=function(){};t["feathers.controls.dataRenderers.IOptionalHierarchyItemRenderer"]=Tn;Tn.__name__="feathers.controls.dataRenderers.IOptionalHierarchyItemRenderer";Tn.__isInterface__=!0;Tn.__interfaces__=[Ea];Tn.prototype={get_showHierarchy:null,set_showHierarchy:null,__class__:Tn,__properties__:{set_showHierarchy:"set_showHierarchy",
get_showHierarchy:"get_showHierarchy"}};var Im=function(){};t["feathers.controls.dataRenderers.IHierarchicalDepthItemRenderer"]=Im;Im.__name__="feathers.controls.dataRenderers.IHierarchicalDepthItemRenderer";Im.__isInterface__=!0;Im.__interfaces__=[Ea];Im.prototype={get_hierarchyDepth:null,set_hierarchyDepth:null,__class__:Im,__properties__:{set_hierarchyDepth:"set_hierarchyDepth",get_hierarchyDepth:"get_hierarchyDepth"}};var dl=function(){};t["feathers.controls.dataRenderers.IHierarchicalItemRenderer"]=
dl;dl.__name__="feathers.controls.dataRenderers.IHierarchicalItemRenderer";dl.__isInterface__=!0;dl.__interfaces__=[Ea];dl.prototype={get_branch:null,set_branch:null,__class__:dl,__properties__:{set_branch:"set_branch",get_branch:"get_branch"}};var Mf=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();Rc.call(this)};t["feathers.controls.dataRenderers.HierarchicalItemRenderer"]=Mf;Mf.__name__="feathers.controls.dataRenderers.HierarchicalItemRenderer";Mf.__interfaces__=[Gf,Tn,Im,dl];Mf.__super__=Rc;Mf.prototype=I(Rc.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(y.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(y.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(y.DATA);this._opened?X.dispatch(this,"open"):X.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(y.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(Mf.INVALIDATION_FLAG_DISCLOSURE_BUTTON_FACTORY);return this._disclosureButtonFactory},dispose:function(){this.destroyDisclosureButton();Rc.prototype.dispose.call(this)},initializeHierarchicalItemRendererTheme:function(){Zk.initialize()},update:function(){var a=this.isInvalid(y.DATA),b=this.isInvalid(y.STATE),c=this.isInvalid(y.STYLES);this._previousCustomDisclosureButtonVariant!=
this.get_customDisclosureButtonVariant()&&this.setInvalidationFlag(Mf.INVALIDATION_FLAG_DISCLOSURE_BUTTON_FACTORY);var d=this.isInvalid(Mf.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();Rc.prototype.update.call(this);this._previousCustomDisclosureButtonVariant=this.get_customDisclosureButtonVariant()},
calculateExplicitWidthForTextMeasurement:function(){var a=Rc.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,x.__implements(this._currentBranchOrLeafIcon,
ba)&&this._currentBranchOrLeafIcon.validateNow(),this._ignoreBranchOrLeafIconResizes=c,a-=this._currentBranchOrLeafIcon.get_width()+b);a<0&&(a=0);return a},measureContentWidth:function(){var a=Rc.prototype.measureContentWidth.call(this);if(!this._showHierarchy)return a;this.disclosureButton.validateNow();var b=this._ignoreBranchOrLeafIconResizes;this._ignoreBranchOrLeafIconResizes=!0;x.__implements(this._currentBranchOrLeafIcon,ba)&&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=Rc.prototype.measureContentMinWidth.call(this);if(!this._showHierarchy)return a;this.disclosureButton.validateNow();var b=this._ignoreBranchOrLeafIconResizes;this._ignoreBranchOrLeafIconResizes=!0;x.__implements(this._currentBranchOrLeafIcon,
ba)&&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;x.__implements(this._currentBranchOrLeafIcon,ba)&&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)});Rc.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 Db("Unknown vertical align: "+F.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 Db("Unknown vertical align: "+F.string(this.get_verticalAlign()));}}else Rc.prototype.layoutChildren.call(this)},createDisclosureButton:function(){this.destroyDisclosureButton();
var a=this._disclosureButtonFactory!=null?this._disclosureButtonFactory:Mf.defaultDisclosureButtonFactory;this._oldDisclosureButtonFactory=a;this.disclosureButton=a.create();this.disclosureButton.get_variant()==null&&this.disclosureButton.set_variant(this.get_customDisclosureButtonVariant()!=null?this.get_customDisclosureButtonVariant():Mf.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)),x.__implements(a,sb)&&a.set_uiContext(null),x.__implements(a,ge)&&a.set_stateContext(null),this._branchOrLeafIconMeasurements.restore(a),a.parent==this&&this.removeChild(a))},addCurrentBranchOrLeafIcon:function(a){a==null?this._branchOrLeafIconMeasurements=null:(x.__implements(a,
Ea)&&a.initializeNow(),this._branchOrLeafIconMeasurements==null?this._branchOrLeafIconMeasurements=new Sb(a):this._branchOrLeafIconMeasurements.save(a),x.__implements(a,sb)&&a.set_uiContext(this),x.__implements(a,ge)&&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(y.STYLES)},get_styleContext:function(){return Mf},__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(y.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(y.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(y.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(y.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(y.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(y.STYLES);return this.__customDisclosureButtonVariant},clearStyle_customDisclosureButtonVariant:function(){this.set_customDisclosureButtonVariant(null);
return this.get_customDisclosureButtonVariant()},__class__:Mf,__properties__:I(Rc.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 Fp=function(){};t["feathers.controls.dataRenderers.IGridViewCellRenderer"]=
Fp;Fp.__name__="feathers.controls.dataRenderers.IGridViewCellRenderer";Fp.__isInterface__=!0;Fp.__interfaces__=[Ea];Fp.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__:Fp,__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 sp=function(){};t["feathers.controls.dataRenderers.IGridViewHeaderRenderer"]=sp;sp.__name__="feathers.controls.dataRenderers.IGridViewHeaderRenderer";sp.__isInterface__=!0;sp.__interfaces__=[Ea];sp.prototype={get_column:null,set_column:null,get_columnIndex:null,set_columnIndex:null,get_gridViewOwner:null,set_gridViewOwner:null,__class__:sp,__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 xp=function(){};t["feathers.controls.dataRenderers.IGroupListViewItemRenderer"]=xp;xp.__name__="feathers.controls.dataRenderers.IGroupListViewItemRenderer";xp.__isInterface__=!0;xp.__interfaces__=[Ea];xp.prototype={get_location:null,set_location:null,get_groupListViewOwner:null,set_groupListViewOwner:null,__class__:xp,__properties__:{set_groupListViewOwner:"set_groupListViewOwner",get_groupListViewOwner:"get_groupListViewOwner",
set_location:"set_location",get_location:"get_location"}};var mp=function(){};t["feathers.controls.dataRenderers.IListViewItemRenderer"]=mp;mp.__name__="feathers.controls.dataRenderers.IListViewItemRenderer";mp.__isInterface__=!0;mp.__interfaces__=[Ea];mp.prototype={get_index:null,set_index:null,get_listViewOwner:null,set_listViewOwner:null,__class__:mp,__properties__:{set_listViewOwner:"set_listViewOwner",get_listViewOwner:"get_listViewOwner",set_index:"set_index",get_index:"get_index"}};var Gp=
function(){};t["feathers.controls.dataRenderers.ITreeGridViewCellRenderer"]=Gp;Gp.__name__="feathers.controls.dataRenderers.ITreeGridViewCellRenderer";Gp.__isInterface__=!0;Gp.__interfaces__=[dl];Gp.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__:Gp,__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 Bp=function(){};t["feathers.controls.dataRenderers.ITreeGridViewHeaderRenderer"]=Bp;Bp.__name__="feathers.controls.dataRenderers.ITreeGridViewHeaderRenderer";Bp.__isInterface__=!0;Bp.__interfaces__=[Ea];Bp.prototype={get_column:null,set_column:null,get_columnIndex:null,set_columnIndex:null,get_treeGridViewOwner:null,
set_treeGridViewOwner:null,__class__:Bp,__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 Dp=function(){};t["feathers.controls.dataRenderers.ITreeViewItemRenderer"]=Dp;Dp.__name__="feathers.controls.dataRenderers.ITreeViewItemRenderer";Dp.__isInterface__=!0;Dp.__interfaces__=[dl];Dp.prototype={get_location:null,set_location:null,
get_treeViewOwner:null,set_treeViewOwner:null,__class__:Dp,__properties__:{set_treeViewOwner:"set_treeViewOwner",get_treeViewOwner:"get_treeViewOwner",set_location:"set_location",get_location:"get_location"}};var Tl=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();qb.call(this)};
t["feathers.controls.dataRenderers.LayoutGroupItemRenderer"]=Tl;Tl.__name__="feathers.controls.dataRenderers.LayoutGroupItemRenderer";Tl.__interfaces__=[Jm,ud,Gh,yi,Bh];Tl.__super__=qb;Tl.prototype=I(qb.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(y.DATA);X.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(y.DATA);this.setInvalid(y.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(y.DATA);this.setInvalid(y.STYLES);X.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(y.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(y.STYLES)}},initializeLayoutGroupItemRendererTheme:function(){Pw.initialize()},initialize:function(){qb.prototype.initialize.call(this);this._pointerToState==null&&(this._pointerToState=new zm(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(y.DATA),b=this.isInvalid(y.STYLES);a&&this._pointerToState.set_target(this._pointerTarget!=
null?this._pointerTarget:this);b&&this.refreshInteractivity();qb.prototype.update.call(this)},refreshInteractivity:function(){this._pointerToState.set_enabled(this.get_showHoverAndDownStates())},customHitTest:function(a,b){var c=this._pointerTarget;c=c instanceof Ab?c:null;c==null&&(c=this);if(c.stage==null)return!1;if(c.mouseChildren&&(a=c.stage.getObjectsUnderPoint(new Ca(a,b)),a.length>0&&(a=a[a.length-1],c.contains(a))))for(;a!=null&&a!=c;){if(!(a instanceof Ia&&!a.mouseEnabled||!x.__implements(a,
od)||(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(y.STATE),X.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&&x.__implements(a,ge)&&a.set_stateContext(this);qb.prototype.addCurrentBackgroundSkin.call(this,a)},removeCurrentBackgroundSkin:function(a){a!=null&&x.__implements(a,ge)&&a.set_stateContext(null);qb.prototype.removeCurrentBackgroundSkin.call(this,a)},get_styleContext:function(){return Tl},__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(y.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(y.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(y.STYLES);return this.__alternateBackgroundSkin},clearStyle_alternateBackgroundSkin:function(){this.set_alternateBackgroundSkin(null);return this.get_alternateBackgroundSkin()},__class__:Tl,__properties__:I(qb.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 tp=function(){};t["feathers.data.ISortOrderObserver"]=tp;tp.__name__="feathers.data.ISortOrderObserver";tp.__isInterface__=!0;tp.prototype={get_sortOrder:null,set_sortOrder:null,__class__:tp,__properties__:{set_sortOrder:"set_sortOrder",get_sortOrder:"get_sortOrder"}};var cl=function(){this.__sortAscendingIcon=this.__sortDescendingIcon=null;this._sortOrder=Ih.NONE;this.initializeSortOrderHeaderRendererTheme();Rc.call(this);this.set_toggleable(!1)};t["feathers.controls.dataRenderers.SortOrderHeaderRenderer"]=
cl;cl.__name__="feathers.controls.dataRenderers.SortOrderHeaderRenderer";cl.__interfaces__=[tp];cl.__super__=Rc;cl.prototype=I(Rc.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(y.DATA);return this._sortOrder},_currentSortOrderIcon:null,_sortOrderIconMeasurements:null,initializeSortOrderHeaderRendererTheme:function(){Qy.initialize()},update:function(){var a=this.isInvalid(y.DATA),
b=this.isInvalid(y.STATE);(this.isInvalid(y.STYLES)||b||a)&&this.refreshSortOrderIcon();Rc.prototype.update.call(this)},calculateExplicitWidthForTextMeasurement:function(){var a=Rc.prototype.calculateExplicitWidthForTextMeasurement.call(this);if(a==null)return a;var b=this.get_gap();b==1/0&&(b=this.get_minGap());this._currentSortOrderIcon!=null&&(x.__implements(this._currentSortOrderIcon,ba)&&this._currentSortOrderIcon.validateNow(),a-=this._currentSortOrderIcon.get_width()+b);a<0&&(a=0);return a},
measureContentWidth:function(){var a=Rc.prototype.measureContentWidth.call(this);x.__implements(this._currentSortOrderIcon,ba)&&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=Rc.prototype.measureContentMinWidth.call(this);x.__implements(this._currentSortOrderIcon,ba)&&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;x.__implements(this._currentSortOrderIcon,ba)&&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)});Rc.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 Db("Unknown vertical align: "+F.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:(x.__implements(this._currentSortOrderIcon,Ea)&&this._currentSortOrderIcon.initializeNow(),this._sortOrderIconMeasurements==null?this._sortOrderIconMeasurements=new Sb(this._currentSortOrderIcon):this._sortOrderIconMeasurements.save(this._currentSortOrderIcon),x.__implements(this._currentSortOrderIcon,sb)&&this._currentSortOrderIcon.set_uiContext(this),x.__implements(this._currentSortOrderIcon,ge)&&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&&(x.__implements(a,sb)&&a.set_uiContext(null),x.__implements(a,ge)&&a.set_stateContext(null),this._sortOrderIconMeasurements.restore(a),a.parent==this&&this.removeChild(a))},get_styleContext:function(){return cl},__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(y.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(y.STYLES);return this.__sortDescendingIcon},clearStyle_sortDescendingIcon:function(){this.set_sortDescendingIcon(null);return this.get_sortDescendingIcon()},__class__:cl,__properties__:I(Rc.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 Hm=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"]=Hm;Hm.__name__=
"feathers.data.TreeGridViewCellState";Hm.prototype={owner:null,data:null,rowLocation:null,columnIndex:null,layoutIndex:null,branch:null,opened:null,column:null,selected:null,text:null,enabled:null,__class__:Hm};var bg=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 Hm});this._cellRendererToCellState=new Ta;this._columnToCellRenderer=new Ta;this._unrenderedData=[];this._additionalStorage=null;this._defaultStorage=new Ft;qb.call(this)};t["feathers.controls.dataRenderers.TreeGridViewRowRenderer"]=bg;bg.__name__="feathers.controls.dataRenderers.TreeGridViewRowRenderer";bg.__interfaces__=[Bh,Gh,ud,Xh];bg.defaultUpdateCellRenderer=function(a,b){x.__implements(a,te)&&a.set_text(b.text)};bg.defaultResetCellRenderer=function(a,b){x.__implements(a,
te)&&a.set_text(null)};bg.__super__=qb;bg.prototype=I(qb.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){qb.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(y.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(y.SELECTION);X.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(y.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(y.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(y.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(y.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(y.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(y.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(bg.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(y.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(bg.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(y.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)}qb.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 Hm;this.populateCurrentItemState(a,c,b,!1)}return b},initialize:function(){qb.prototype.initialize.call(this);this._pointerToState==null&&(this._pointerToState=new zm(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 Gn(this,m(this,this.changeState),Yb.UP(!1),Yb.DOWN(!1)));this.get_layout()==null&&(this._rowLayout=new Sl,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(y.STATE),X.dispatch(this,"stateChange"))},addCurrentBackgroundSkin:function(a){a!=null&&x.__implements(a,ge)&&a.set_stateContext(this);qb.prototype.addCurrentBackgroundSkin.call(this,a)},removeCurrentBackgroundSkin:function(a){a!=null&&x.__implements(a,ge)&&a.set_stateContext(null);qb.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();qb.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=bg.defaultUpdateCellRenderer,this._defaultStorage.cellRendererRecycler.reset==
null&&(this._defaultStorage.cellRendererRecycler.reset=bg.defaultResetCellRenderer));for(var a=this._columns.iterator();a.hasNext();){var b=a.next();b.cellRendererRecycler!=null&&b.cellRendererRecycler.update==null&&(b.cellRendererRecycler.update=bg.defaultUpdateCellRenderer,b.cellRendererRecycler.reset==null&&(b.cellRendererRecycler.reset=bg.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=x.getClass(this),new pb(""+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=x.getClass(this),new pb(""+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=x.getClass(this),new pb(""+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(!U.remove(h.inactiveCellRenderers,g))throw a=x.getClass(this),new pb(""+a.__name__+": cell renderer map contains bad data for item at row location "+F.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 Ft(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(x.__implements(d,kd)){var f=d;if(f.get_variant()==null){var g=this.get_customCellRendererVariant()!=null?this.get_customCellRendererVariant():Ac.CHILD_VARIANT_CELL_RENDERER;f.set_variant(g)}}x.__implements(d,Ea)&&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);x.__implements(d,
Xh)?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)));x.__implements(d,ud)&&d.addEventListener("change",m(this,this.treeGridViewRowRenderer_cellRenderer_changeHandler));x.__implements(d,tb)&&d.addEventListener("resize",m(this,this.treeGridViewRowRenderer_cellRenderer_resizeHandler));
x.__implements(d,Gf)&&(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(y.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(y.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,bg.RESET_CELL_STATE)},refreshCellRendererProperties:function(a,b){var c=this._ignoreSelectionChange;this._ignoreSelectionChange=!0;var d=this._ignoreOpenedChange;this._ignoreOpenedChange=!0;x.__implements(a,Ea)&&a.set_enabled(b.enabled);x.__implements(a,Gh)&&a.set_data(b.data);x.__implements(a,
ud)&&a.set_selected(b.selected);x.__implements(a,dl)&&a.set_branch(b.branch);x.__implements(a,Tn)&&a.set_showHierarchy(b.columnIndex==0);x.__implements(a,Im)&&a.set_hierarchyDepth(b.rowLocation!=null?b.rowLocation.length-1:0);x.__implements(a,Gp)&&(a.set_column(b.column),a.set_columnIndex(b.columnIndex),a.set_rowLocation(b.rowLocation),a.set_treeGridViewOwner(b.owner));x.__implements(a,yi)&&a.set_layoutIndex(b.layoutIndex);x.__implements(a,Gf)&&a.set_opened(b.opened);x.__implements(a,Jm)&&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 Ca(a,b)),a.length>0&&(a=a[a.length-1],this.contains(a))))for(;a!=null&&
a!=this;){if((!(a instanceof Ia)||a.mouseEnabled)&&x.__implements(a,od)&&(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=x.__cast(a.currentTarget,ka);$e.dispatchForCell(this,"cellTrigger",this._cellRendererToCellState.h[b.__id__]);of.dispatchFromTouchEvent(this,a)}},treeGridViewRowRenderer_cellRenderer_clickHandler:function(a){if(this._enabled&&
this.customHitTest(a.stageX,a.stageY)){var b=x.__cast(a.currentTarget,ka);$e.dispatchForCell(this,"cellTrigger",this._cellRendererToCellState.h[b.__id__]);of.dispatchFromMouseEvent(this,a)}},treeGridViewRowRenderer_cellRenderer_triggerHandler:function(a){if(this._enabled&&this.customHitTest(a.stageX,a.stageY)){var b=x.__cast(a.currentTarget,ka);$e.dispatchForCell(this,"cellTrigger",this._cellRendererToCellState.h[b.__id__]);this.dispatchEvent(a)}},treeGridViewRowRenderer_cellRenderer_resizeHandler:function(a){this._validating||
this.setInvalid(y.LAYOUT)},treeGridViewRowRenderer_cellRenderer_changeHandler:function(a){if(!this._ignoreSelectionChange){var b=x.__cast(a.currentTarget,ka);a=x.__cast(b,ud);b=this._cellRendererToCellState.h[b.__id__];a.get_selected()!=b.selected&&this.setInvalid(y.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(y.DATA)},get_styleContext:function(){return bg},__class__:bg,__properties__:I(qb.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 Ft=function(a){this.inactiveCellRenderers=[];this.activeCellRenderers=[];this.cellRendererRecycler=a};t["feathers.controls.dataRenderers._TreeGridViewRowRenderer.CellRendererStorage"]=Ft;Ft.__name__="feathers.controls.dataRenderers._TreeGridViewRowRenderer.CellRendererStorage";Ft.prototype={oldCellRendererRecycler:null,cellRendererRecycler:null,activeCellRenderers:null,inactiveCellRenderers:null,measurements:null,__class__:Ft};
var Td=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=Ue.STAGE;this._waitingForTransitionFrameCount=0;this._clearAfterTransition=this._waitingForDelayedTransition=!1;this._nextViewInTransitionMeasurements=new Sb;this._previousViewInTransitionMeasurements=
new Sb;this._addedItems=new H;this._addedItemIDs=[];this._activeViewMeasurements=new Sb;this._childFocusEnabled=!0;da.call(this);this._viewsContainer=this;this.addEventListener("addedToStage",m(this,this.baseNavigator_addedToStageHandler))};t["feathers.controls.navigators.BaseNavigator"]=Td;Td.__name__="feathers.controls.navigators.BaseNavigator";Td.__interfaces__=[rg];Td.defaultTransition=function(a,b){return new Hp(a)};Td.__super__=da;Td.prototype=I(da.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(y.SIZE);this._activeItemView!=null&&(this._autoSizeMode==Ue.STAGE?this._activeItemView.removeEventListener("resize",m(this,this.activeItemView_resizeHandler)):this._activeItemView.addEventListener("resize",m(this,this.activeItemView_resizeHandler)));this.stage!=null&&(this._autoSizeMode==Ue.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();da.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),X.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(y.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==Ue.CONTENT||this.stage==null,n=0,l=0;if(!h){l=this.globalToLocal(new Ca);var q=this.globalToLocal(new Ca(this.stage.stageWidth,this.stage.stageHeight));n=q.x-l.x;l=q.y-l.y}q=null;x.__implements(this._activeItemView,tb)&&(q=this._activeItemView);var v=null,w=null;this._transitionActive&&(x.__implements(this._previousViewInTransition,
tb)&&(v=this._previousViewInTransition),x.__implements(this._nextViewInTransition,tb)&&(w=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?(x.__implements(this._previousViewInTransition,ba)&&this._previousViewInTransition.validateNow(),x.__implements(this._nextViewInTransition,ba)&&this._nextViewInTransition.validateNow()):x.__implements(this._activeItemView,
ba)&&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?(v!=null&&b<v.get_minWidth()?b=v.get_minWidth():this._previousViewInTransition!=null&&b<this._previousViewInTransition.get_width()&&(b=this._previousViewInTransition.get_width()),w!=null&&b<w.get_minWidth()?b=w.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?(v!=null&&c<v.get_minHeight()?c=v.get_minHeight():this._previousViewInTransition!=null&&c<this._previousViewInTransition.get_height()&&(c=this._previousViewInTransition.get_height()),w!=null&&c<w.get_minHeight()?c=w.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?(v!=null&&d<v.get_maxWidth()?d=v.get_maxWidth():this._previousViewInTransition!=null&&d<this._previousViewInTransition.get_width()&&(d=this._previousViewInTransition.get_width()),w!=null&&d<w.get_maxWidth()?d=w.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?(v!=null&&f>v.get_maxHeight()?f=v.get_maxHeight():this._previousViewInTransition!=null&&f>this._previousViewInTransition.get_height()&&
(f=this._previousViewInTransition.get_height()),w!=null&&f>w.get_maxHeight()?f=w.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),x.__implements(this._activeItemView,ba)&&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),x.__implements(this._nextViewInTransition,ba)&&this._nextViewInTransition.validateNow());this._viewsContainer!=this&&x.__implements(this._viewsContainer,ba)&&this._viewsContainer.validateNow()},getView:function(a){throw new pb("Missing override of BaseNavigator.getView()");},
disposeView:function(a,b){throw new pb("Missing override of BaseNavigator.disposeView()");},transitionComplete:function(){},transitionCancel:function(){},addItemInternal:function(a,b){if(Object.prototype.hasOwnProperty.call(this._addedItems.h,a))throw new Db("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 Db("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 pb("Cannot remove an item while it is transitioning in or out.");a==this._activeItemID&&(this.clearActiveItemInternal(null),X.dispatch(this,"clear"));var b=this._addedItems.h[a],c=this._addedItems;Object.prototype.hasOwnProperty.call(c.h,a)&&delete c.h[a];U.remove(this._addedItemIDs,a);return b},clearFocusFromPreviousView:function(){if(this._previousViewInTransition!=
null){if(this._focusManager!=null){if(this._focusManager.get_focus()==null)return;x.__implements(this._previousViewInTransition,od)&&this._focusManager.get_focus()==this._previousViewInTransition?this._focusManager.set_focus(null):this._previousViewInTransition instanceof Ab&&this._previousViewInTransition.contains(x.__cast(this._focusManager.get_focus(),ka))&&this._focusManager.set_focus(null)}this.stage.get_focus()!=null&&(this.stage.get_focus()==this._previousViewInTransition||this._previousViewInTransition instanceof
Ab&&this._previousViewInTransition.contains(this.stage.get_focus()))&&this.stage.set_focus(this.stage)}},showItemInternal:function(a,b){if(!this.hasItem(a))throw new Db("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 pb("Failed to display navigator item with id '"+a+"'. Call to getView() incorrectly returned null.");this._nextViewInTransitionID=a;this._autoSizeMode!=Ue.CONTENT&&this.stage!=null||
this._nextViewInTransition.addEventListener("resize",m(this,this.activeItemView_resizeHandler));a=this._previousViewInTransition==this._nextViewInTransition;this._viewsContainer.addChild(this._nextViewInTransition);x.__implements(this._nextViewInTransition,Ea)&&this._nextViewInTransition.initializeNow();this.setInvalid(y.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,X.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(y.SELECTION);
this.startTransition(a)}},startTransition:function(a){ei.dispatch(this,"transitionStart",this._previousViewInTransitionID,this._previousViewInTransition,this._nextViewInTransitionID,this._nextViewInTransition);a!=null&&a!=Td.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=Td.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==Ue.STAGE&&(this.setInvalid(y.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(y.SIZE)},activeItemView_resizeHandler:function(a){this._validating||this._autoSizeMode!=Ue.CONTENT||this.setInvalid(y.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;ei.dispatch(this,"transitionComplete",d,c,b,a);X.dispatch(this,"change");this.setInvalid(y.LAYOUT);this.stage==null||this.stage.get_focus()!=null&&this.stage.get_focus().stage!=null||a instanceof Ia&&this.stage.set_focus(x.__cast(a,Ia));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();ei.dispatch(this,"transitionCancel",d,c,b,a);X.dispatch(this,"change");this.setInvalid(y.LAYOUT);this.stage==null||this.stage.get_focus()!=null&&this.stage.get_focus().stage!=null||this._activeItemView instanceof Ia&&this.stage.set_focus(x.__cast(this._activeItemView,Ia));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__:Td,__properties__:I(da.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 Dg=function(){this.internalID=F.string(Dg.internalIDCounter);Dg.internalIDCounter++};
t["feathers.controls.navigators.PageItem"]=Dg;Dg.__name__="feathers.controls.navigators.PageItem";Dg.withClass=function(a){var b=new Dg;b.viewFactory=Ql.fromClass(a);return b};Dg.withFunction=function(a){var b=new Dg;b.viewFactory=Ql.fromFunction(a);return b};Dg.withDisplayObject=function(a){var b=new Dg;b.viewFactory=Ql.fromDisplayObject(a);return b};Dg.withFactory=function(a){var b=new Dg;b.viewFactory=a;return b};Dg.prototype={internalID:null,viewFactory:null,getView:function(a){return this.viewFactory.create()},
returnView:function(a){this.viewFactory.destroy!=null&&this.viewFactory.destroy(a)},__class__:Dg};var Jh=function(a){this.__customPageIndicatorVariant=null;this.__gap=0;this.__previousTransition=this.__nextTransition=null;this.__pageIndicatorPosition=pa.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);
Td.call(this);this._viewsContainer=new qb;this.addChild(this._viewsContainer)};t["feathers.controls.navigators.PageNavigator"]=Jh;Jh.__name__="feathers.controls.navigators.PageNavigator";Jh.__interfaces__=[xi,sj];Jh.__super__=Td;Jh.prototype=I(Td.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(y.DATA);this._dataProvider==null||this._dataProvider.get_length()==0?this.set_selectedIndex(-1):this.set_selectedIndex(0);X.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(y.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(y.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(y.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(Jh.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);
Td.prototype.dispose.call(this)},initialize:function(){Td.prototype.initialize.call(this);this._previousEdgePuller==null&&(this._previousEdgePuller=new pg(this,pa.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 pg(this,pa.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(){Tw.initialize()},update:function(){var a=this.isInvalid(y.DATA),b=this.isInvalid(y.SELECTION);
this._previousCustomPageIndicatorVariant!=this.get_customPageIndicatorVariant()&&this.setInvalidationFlag(Jh.INVALIDATION_FLAG_PAGE_INDICATOR_FACTORY);var c=this.isInvalid(Jh.INVALIDATION_FLAG_PAGE_INDICATOR_FACTORY);c&&this.createPageIndicator();a&&(this._previousEdgePuller.simulateTouch=this._simulateTouch,this._nextEdgePuller.simulateTouch=this._simulateTouch);(a||b||c)&&this.refreshSelection();Td.prototype.update.call(this);this._previousCustomPageIndicatorVariant=this.get_customPageIndicatorVariant()},
measure:function(){this.get_explicitWidth()!=null?this.pageIndicator.set_width(this.get_explicitWidth()):this._autoSizeMode==Ue.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 Db("Invalid pageIndicatorPosition "+F.string(this.get_pageIndicatorPosition()));}return Td.prototype.measure.call(this)},createPageIndicator:function(){this.destroyPageIndicator();var a=this._pageIndicatorFactory!=null?this._pageIndicatorFactory:Jh.defaultPageIndicatorFactory;this._oldPageIndicatorFactory=a;this.pageIndicator=a.create();this.pageIndicator.get_variant()==null&&this.pageIndicator.set_variant(this.get_customPageIndicatorVariant()!=
null?this.get_customPageIndicatorVariant():Jh.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 Db("Invalid pageIndicatorPosition "+F.string(this.get_pageIndicatorPosition()));}Td.prototype.layoutContent.call(this)},
getView:function(a){return x.__cast(this._addedItems.h[a],Dg).getView(this)},disposeView:function(a,b){x.__cast(this._addedItems.h[a],Dg).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 Ul(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 Ul(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=x.__cast(a.addedItem,Dg);this.addItemInternal(b.internalID,b);this.setInvalid(y.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=x.__cast(a.removedItem,Dg);this.removeItemInternal(b.internalID);this.setInvalid(y.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=x.__cast(a.addedItem,Dg),c=x.__cast(a.removedItem,Dg);this.removeItemInternal(c.internalID);this.addItemInternal(b.internalID,b);this.setInvalid(y.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=Rd.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),X.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),X.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=Rd.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),X.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),X.dispatch(a,"complete"))},get_styleContext:function(){return Jh},__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(y.STYLES);return this.__pageIndicatorPosition},clearStyle_pageIndicatorPosition:function(){this.set_pageIndicatorPosition(pa.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(y.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(y.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(y.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(y.STYLES);return this.__customPageIndicatorVariant},
clearStyle_customPageIndicatorVariant:function(){this.set_customPageIndicatorVariant(null);return this.get_customPageIndicatorVariant()},__class__:Jh,__properties__:I(Td.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 Bi=function(){this._viewToEvents=new Ta};t["feathers.controls.navigators.Route"]=Bi;Bi.__name__="feathers.controls.navigators.Route";Bi.withClass=function(a,b,c,d,f){var g=new Bi;g.path=a;g.viewFactory=Kc.withClass(b);g.actions=c;g.updateState=d;g.saveData=f;return g};Bi.withFunction=function(a,b,c,d,f){var g=new Bi;g.path=a;g.viewFactory=Kc.withFunction(b);
g.actions=c;g.updateState=d;g.saveData=f;return g};Bi.withDisplayObject=function(a,b,c,d,f){var g=new Bi;g.path=a;g.viewFactory=Kc.withDisplayObject(b);g.actions=c;g.updateState=d;g.saveData=f;return g};Bi.withFactory=function(a,b,c,d,f){var g=new Bi;g.path=a;g.viewFactory=b;g.actions=c;g.updateState=d;g.saveData=f;return g};Bi.withRedirect=function(a,b){var c=new Bi;c.path=a;c.redirectTo=b;return c};Bi.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 H);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 zx(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__:Bi};var zx=function(a,b){this.eventType=a;this.listener=b};t["feathers.controls.navigators._Route.ViewListener"]=
zx;zx.__name__="feathers.controls.navigators._Route.ViewListener";zx.prototype={eventType:null,listener:null,__class__:zx};var Un=Q["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)};Un.__constructs__=[Un.Push,Un.Replace,Un.GoBack,Un.GoForward,Un.Go,Un.Listener,Un.NewAction];var Vn=function(){this.__forwardTransition=this.__backTransition=this.__replaceTransition=null;this._cachedPaths=new H;this._preferHashRouting=!1;this.basePath=this._savedGoTransition=null;this.historyDepth=0;this.initializeRouterNavigatorTheme();Td.call(this);this.addEventListener("addedToStage",m(this,this.routerNavigator_addedToStageHandler));this.addEventListener("removedFromStage",
m(this,this.routerNavigator_removedFromStageHandler))};t["feathers.controls.navigators.RouterNavigator"]=Vn;Vn.__name__="feathers.controls.navigators.RouterNavigator";Vn.__super__=Td;Vn.prototype=I(Td.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 Db("Must set preferHashRouting before a view is displayed");
return this._preferHashRouting=a},initializeRouterNavigatorTheme:function(){Ww.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=x.__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=U.substr(a,1,null));try{return vm._new(a)}catch(b){return Pb.lastError=b,vm._new()}},getPathname:function(){if(this._preferHashRouting||this.htmlWindow.location.protocol=="file:"){var a=this.htmlWindow.location.hash;a=a.length==0?"/":U.substr(a,1,null)}else a=this.htmlWindow.location.pathname;this.basePath!=null&&N.startsWith(a,this.basePath+"/")&&(a=U.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=Kh.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=x.__cast(this._addedItems.h[a],Bi);var b=a.path,c=new H;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 Ax(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));x.__cast(this._addedItems.h[a],Bi).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=U.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 Vn},__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(y.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(y.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(y.STYLES);return this.__replaceTransition},clearStyle_replaceTransition:function(){this.set_replaceTransition(null);
return this.get_replaceTransition()},__class__:Vn,__properties__:I(Td.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 Km=Q["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)};Km.__constructs__=[Km.Push,Km.Replace,Km.Pop,Km.PopMultiple,Km.PopToRoot,Km.PopToRootAndReplace,Km.Listener,Km.NewAction];var Ci=function(){this._viewToEvents=new Ta};t["feathers.controls.navigators.StackItem"]=Ci;Ci.__name__="feathers.controls.navigators.StackItem";Ci.withClass=
function(a,b,c,d,f,g){var h=new Ci;h.id=a;h.viewFactory=Ql.fromClass(b);h.actions=c;h.returnHandlers=d;h.saveData=f;h.restoreData=g;return h};Ci.withFunction=function(a,b,c,d,f,g){var h=new Ci;h.id=a;h.viewFactory=Ql.fromFunction(b);h.actions=c;h.returnHandlers=d;h.saveData=f;h.restoreData=g;return h};Ci.withDisplayObject=function(a,b,c,d,f,g){var h=new Ci;h.id=a;h.viewFactory=Ql.fromDisplayObject(b);h.actions=c;h.returnHandlers=d;h.saveData=f;h.restoreData=g;return h};Ci.withFactory=function(a,b,
c,d,f,g){var h=new Ci;h.id=a;h.viewFactory=b;h.actions=c;h.returnHandlers=d;h.saveData=f;h.restoreData=g;return h};Ci.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 H);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 Bx(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__:Ci};var Bx=function(a,b){this.eventType=a;this.listener=b};t["feathers.controls.navigators._StackItem.ViewListener"]=Bx;Bx.__name__="feathers.controls.navigators._StackItem.ViewListener";
Bx.prototype={eventType:null,listener:null,__class__:Bx};var Wn=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();Td.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"]=Wn;Wn.__name__="feathers.controls.navigators.StackNavigator";Wn.__super__=Td;Wn.prototype=I(Td.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 Lm(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(y.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(y.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(y.DATA);return this._popSwipeActiveEdgeSize},
savedInject:null,savedReturnedObject:null,savedIsPop:null,savedRestoreData:null,savedViewData:null,_poppedHistoryItems:null,initializeStackNavigatorTheme:function(){Xw.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&&U.remove(this._history,d)}d=this.removeItemInternal(a);return x.__cast(d,Ci)},removeAllItems:function(){this._history.length=0;Td.prototype.removeAllItems.call(this)},getItem:function(a){a=
this._addedItems.h[a];return a==null?null:x.__cast(a,Ci)},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 Lm(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 xe("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 xe("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 Lm(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 Lm(a,b,null,c);return this.showItemWithInjectAndReturnedObject(a,c,b,null,null,!1)},initialize:function(){Td.prototype.initialize.call(this);this._backEdgePuller==null&&(this._backEdgePuller=new pg(this,pa.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(y.DATA),b=this.isInvalid(y.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;Td.prototype.update.call(this)},getView:function(a){var b=x.__cast(this._addedItems.h[a],Ci);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){x.__cast(this._addedItems.h[a],
Ci).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 Ul(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 Lm(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=Rd.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),X.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),X.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 Wn},__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(y.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(y.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(y.STYLES);
return this.__replaceTransition},clearStyle_replaceTransition:function(){this.set_replaceTransition(null);return this.get_replaceTransition()},__class__:Wn,__properties__:I(Td.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 Lm=function(a,b,c,d){this.id=a;this.inject=b;this.viewData=c;this.transition=d};t["feathers.controls.navigators._StackNavigator.HistoryItem"]=Lm;Lm.__name__="feathers.controls.navigators._StackNavigator.HistoryItem";
Lm.prototype={id:null,inject:null,viewData:null,transition:null,__class__:Lm};var sg=function(){this.internalID=F.string(sg.internalIDCounter);sg.internalIDCounter++};t["feathers.controls.navigators.TabItem"]=sg;sg.__name__="feathers.controls.navigators.TabItem";sg.withClass=function(a,b){var c=new sg;c.text=a;c.viewFactory=Ql.fromClass(b);return c};sg.withFunction=function(a,b){var c=new sg;c.text=a;c.viewFactory=Ql.fromFunction(b);return c};sg.withDisplayObject=function(a,b){var c=new sg;c.text=
a;c.viewFactory=Ql.fromDisplayObject(b);return c};sg.withFactory=function(a,b){var c=new sg;c.text=a;c.viewFactory=b;return c};sg.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__:sg};var gh=function(a){this.__customTabBarVariant=null;this.__gap=0;this.__previousTransition=this.__nextTransition=null;this.__tabBarPosition=pa.BOTTOM;this._ignoreSelectionChange=
!1;this._previousCustomTabBarVariant=null;this._swipeEnabled=this._simulateTouch=!1;this._selectedItem=null;this._activeItemIndex=this._selectedIndex=-1;this.initializeTabNavigatorTheme();Td.call(this);this.set_dataProvider(a);this._viewsContainer=new qb;this.addChild(this._viewsContainer)};t["feathers.controls.navigators.TabNavigator"]=gh;gh.__name__="feathers.controls.navigators.TabNavigator";gh.__interfaces__=[xi,sj];gh.__super__=Td;gh.prototype=I(Td.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(y.DATA);this._dataProvider==null||this._dataProvider.get_length()==0?this.set_selectedIndex(-1):this.set_selectedIndex(0);X.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(y.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(y.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(y.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(gh.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);Td.prototype.dispose.call(this)},initialize:function(){Td.prototype.initialize.call(this);this._previousEdgePuller==null&&(this._previousEdgePuller=new pg(this,pa.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 pg(this,pa.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(){Zw.initialize()},
update:function(){var a=this.isInvalid(y.DATA),b=this.isInvalid(y.SELECTION);this._previousCustomTabBarVariant!=this.get_customTabBarVariant()&&this.setInvalidationFlag(gh.INVALIDATION_FLAG_TAB_BAR_FACTORY);var c=this.isInvalid(gh.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();Td.prototype.update.call(this);this._previousCustomTabBarVariant=this.get_customTabBarVariant()},measure:function(){this.get_explicitWidth()!=null?this.tabBar.set_width(this.get_explicitWidth()):this._autoSizeMode==Ue.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 Db("Invalid tabBarPosition "+F.string(this.get_tabBarPosition()));}return Td.prototype.measure.call(this)},createTabBar:function(){this.destroyTabBar();var a=this._tabBarFactory!=null?this._tabBarFactory:gh.defaultTabBarFactory;this._oldTabBarFactory=a;this.tabBar=
a.create();this.tabBar.get_variant()==null&&this.tabBar.set_variant(this.get_customTabBarVariant()!=null?this.get_customTabBarVariant():gh.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 Db("Invalid tabBarPosition "+F.string(this.get_tabBarPosition()));}Td.prototype.layoutContent.call(this)},getView:function(a){return x.__cast(this._addedItems.h[a],sg).getView(this)},disposeView:function(a,b){x.__cast(this._addedItems.h[a],sg).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 Ul(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 Ul(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=x.__cast(a.addedItem,sg);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=x.__cast(a.removedItem,sg);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=x.__cast(a.addedItem,sg),c=x.__cast(a.removedItem,sg);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=Rd.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),X.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),X.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=Rd.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),X.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),X.dispatch(a,"complete"))},get_styleContext:function(){return gh},__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(y.STYLES);return this.__tabBarPosition},clearStyle_tabBarPosition:function(){this.set_tabBarPosition(pa.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(y.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(y.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(y.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(y.STYLES);return this.__customTabBarVariant},clearStyle_customTabBarVariant:function(){this.set_customTabBarVariant(null);return this.get_customTabBarVariant()},
__class__:gh,__properties__:I(Td.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 Ip=function(){};t["feathers.controls.popups.IPopUpAdapter"]=Ip;Ip.__name__="feathers.controls.popups.IPopUpAdapter";
Ip.__isInterface__=!0;Ip.__interfaces__=[Fb];Ip.prototype={get_active:null,get_persistent:null,open:null,close:null,__class__:Ip,__properties__:{get_persistent:"get_persistent",get_active:"get_active"}};var al=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;ma.call(this)};t["feathers.controls.popups.DropDownPopUpAdapter"]=
al;al.__name__="feathers.controls.popups.DropDownPopUpAdapter";al.__interfaces__=[Ip];al.__super__=ma;al.prototype=I(ma.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 pb("Pop-up adapter is already open. Close the previous content before opening new content.");if(b.stage==null)throw new pb("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()&&(x.__implements(this.content,
ba)&&(a=this._ignoreContentResizing,this._ignoreContentResizing=!0,this.content.validateNow(),this._ignoreContentResizing=a),this._contentMeasurements.save(this.content),this.layout(),X.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);X.dispatch(this,"close")}},layout:function(){if(x.__implements(this.origin,ba)){var a=this._ignoreOriginResizing;this._ignoreOriginResizing=!0;this.origin.validateNow();this._ignoreOriginResizing=a}var b=Aa.forStage(this._stage).get_root();a=new Ca(this.origin.get_x(),this.origin.get_y());a=this.origin.parent.localToGlobal(a);a=b.globalToLocal(a);var c=new Ca(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&&x.__implements(this.content,tb)){var g=this.content;g.get_minWidth()<d&&(g.set_minWidth(d),f=!0)}g=this._ignoreContentResizing;this._ignoreContentResizing=!0;x.__implements(this.content,ba)&&this.content.validateNow();this._fitContentToOriginWidth&&!f&&this.content.get_width()<
d&&this.content.set_width(d);this._ignoreContentResizing=g;d=b.globalToLocal(new Ca);b=b.globalToLocal(new Ca(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=x.__cast(a.currentTarget,dd),kk.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 Ca(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=x.__cast(a.target,ka);if(this.content instanceof Ab){var b=this.content;if(b.contains(a))return}else if(this.content==a)return;if(this.origin instanceof Ab){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=x.__cast(a.target,ka);if(this.content instanceof Ab){var b=this.content;if(b.contains(a))return}else if(this.content==a)return;if(this.origin instanceof Ab){if(b=this.origin,b.contains(a))return}else if(this.origin==a)return;this.close()}},__class__:al,__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 qk=function(){};t["feathers.controls.supportClasses.IViewPort"]=qk;qk.__name__="feathers.controls.supportClasses.IViewPort";qk.__isInterface__=!0;qk.__interfaces__=[tb,ba,Ea];qk.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__:qk,__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 $k=function(){this._layoutActive=this._layoutChanged=!1;this._snapPositionsX=this._snapPositionsY=null;this._scrollX=this._scrollY=0;this._ignoreLayoutChanges=!1;this._layoutResult=new Ng;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;da.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"]=$k;$k.__name__="feathers.controls.supportClasses.AdvancedLayoutViewPort";$k.__interfaces__=[qk];$k.__super__=da;$k.prototype=I(da.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(y.SIZE)):(this._actualMinVisibleWidth=a,this._explicitVisibleWidth==null&&(this._actualVisibleWidth<a||this._actualVisibleWidth==b)&&this.setInvalid(y.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 Db("maxVisibleWidth cannot be null");var b=this._maxVisibleWidth;this._maxVisibleWidth=a;this._explicitVisibleWidth==null&&(this._actualVisibleWidth>a||this._actualVisibleWidth==b)&&this.setInvalid(y.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(y.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(y.SIZE)):(this._actualMinVisibleHeight=a,this._explicitVisibleHeight==null&&(this._actualVisibleHeight<a||this._actualVisibleHeight==b)&&this.setInvalid(y.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 Db("maxVisibleHeight cannot be null");var b=this._maxVisibleHeight;this._maxVisibleHeight=
a;this._explicitVisibleHeight==null&&(this._actualVisibleHeight>a||this._actualVisibleHeight==b)&&this.setInvalid(y.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(y.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(y.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(y.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(y.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=x.getClass(a.parent).__name__;var c=a._layout!=null?x.getClass(a._layout).__name__:"The layout";throw new pb(""+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(x.__implements(this._layout,gf)){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));x.__implements(this.get_layout(),Xn)?(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(y.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(y.LAYOUT))},__class__:$k,__properties__:I(da.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 dp=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;qb.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"]=dp;dp.__name__="feathers.controls.supportClasses.LayoutViewPort";dp.__interfaces__=[qk];dp.__super__=qb;dp.prototype=I(qb.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(y.SIZE)):(this._actualMinVisibleWidth=a,this._explicitVisibleWidth==null&&(this._actualVisibleWidth<a||this._actualVisibleWidth==b)&&this.setInvalid(y.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 Db("maxVisibleWidth cannot be null");var b=this._maxVisibleWidth;this._maxVisibleWidth=a;this._explicitVisibleWidth==null&&(this._actualVisibleWidth>a||this._actualVisibleWidth==b)&&this.setInvalid(y.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(y.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(y.SIZE)):(this._actualMinVisibleHeight=a,this._explicitVisibleHeight==null&&(this._actualVisibleHeight<a||this._actualVisibleHeight==b)&&this.setInvalid(y.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 Db("maxVisibleHeight cannot be null");var b=this._maxVisibleHeight;this._maxVisibleHeight=a;this._explicitVisibleHeight==null&&(this._actualVisibleHeight>a||this._actualVisibleHeight==b)&&this.setInvalid(y.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(y.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||x.__implements(this._currentLayout,gf))&&this.setInvalid(y.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||x.__implements(this._currentLayout,gf))&&this.setInvalid(y.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()==Ue.CONTENT||this.stage==null,n=0,l=0;if(!h){l=this.globalToLocal(new Ca);var q=this.globalToLocal(new Ca(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(x.__implements(this._currentLayout,gf)){var b=this._currentLayout;b.set_scrollX(this._scrollX);b.set_scrollY(this._scrollY)}this._ignoreLayoutChanges=a;qb.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));
x.__implements(this.get_layout(),Xn)?(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(y.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(y.LAYOUT),b=this.isInvalid(y.SIZE),c=this.isInvalid(y.SCROLL);qb.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 qb.prototype.removeChild.call(this,a)},removeChildAt:function(a){a=qb.prototype.removeChildAt.call(this,a);this._manageChildVisibility&&a!=null&&a.set_visible(!0);return a},__class__:dp,__properties__:I(qb.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 Ap=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;da.call(this);this.addEventListener("focusIn",m(this,this.textFieldViewPort_focusInHandler))};t["feathers.controls.supportClasses.TextFieldViewPort"]=Ap;Ap.__name__="feathers.controls.supportClasses.TextFieldViewPort";
Ap.__interfaces__=[ai,Nb,te,qk];Ap.__super__=da;Ap.prototype=I(da.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(y.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(y.DATA);
X.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(y.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(y.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(y.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(y.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(y.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(y.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(y.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(y.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(y.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(y.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(y.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(y.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(y.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(y.SIZE)):(this._actualMinVisibleWidth=a,this._explicitVisibleWidth==null&&(this._actualVisibleWidth<a||this._actualVisibleWidth==b)&&this.setInvalid(y.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 Db("maxVisibleWidth cannot be null");var b=this._maxVisibleWidth;this._maxVisibleWidth=a;this._explicitVisibleWidth==null&&(this._actualVisibleWidth>a||this._actualVisibleWidth==b)&&this.setInvalid(y.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(y.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(y.SIZE)):(this._actualMinVisibleHeight=a,this._explicitVisibleHeight==null&&(this._actualVisibleHeight<a||this._actualVisibleHeight==b)&&this.setInvalid(y.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 Db("maxVisibleHeight cannot be null");var b=this._maxVisibleHeight;this._maxVisibleHeight=
a;this._explicitVisibleHeight==null&&(this._actualVisibleHeight>a||this._actualVisibleHeight==b)&&this.setInvalid(y.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(y.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(y.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(y.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(y.SELECTION)},initialize:function(){da.prototype.initialize.call(this);this._textField==null&&(this._textField=new Ic,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(y.DATA),b=this.isInvalid(y.SELECTION),c=this.isInvalid(y.SIZE),d=this.isInvalid(y.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=x.__cast(this.parent,Bb),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=x.__cast(this.parent,Bb),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__:Ap,__properties__:I(da.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 Yn=function(){};t["feathers.core.IFocusManager"]=Yn;Yn.__name__="feathers.core.IFocusManager";Yn.__isInterface__=!0;Yn.__interfaces__=[Fb];Yn.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__:Yn,__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 Vl=function(a){this._showFocusIndicator=this._cancelMouseFocusChange=!1;this._root=this._focusPane=null;this._enabled=!0;ma.call(this);this.set_root(a)};t["feathers.core.DefaultFocusManager"]=Vl;Vl.__name__="feathers.core.DefaultFocusManager";Vl.__interfaces__=[Yn];Vl.__super__=ma;Vl.prototype=I(ma.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 pb("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(x.__cast(a,Ia)),this.get_focus();if(a!=null&&a.get_focusManager()!=this)throw new Db("Failed to change focus. Object is not managed by this focus manager: "+F.string(a));this._enabled&&this._root.stage!=null&&this.setStageFocus(x.__cast(a,Ia));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;X.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,x.__cast(d,ka),!0)),b==
null&&(b=this.findPreviousChildFocus(this._root),c=d!=null)):(d!=null&&(x.__implements(d,rg)&&d.get_childFocusEnabled()?b=this.findNextContainerFocus(x.__cast(d,Ab),null,!0):d.parent!=null&&(b=this.findNextContainerFocus(d.parent,x.__cast(d,ka),!0))),b==null&&(b=this.findNextChildFocus(this._root),c=d!=null));return new Mm(b,c)},findNextRelativeFocusInternal:function(a){switch(a){case 37:a=pa.LEFT;break;case 38:a=pa.TOP;break;case 39:a=pa.RIGHT;break;case 40:a=pa.BOTTOM;break;default:return new Mm(null,
!1)}var b=this.get_focus(),c=Zn.findAllFocusableObjects(this._root);if(b==null)return c.length>0?new Mm(c[0],!1):new Mm(null,!1);for(var d=b,f=x.__cast(b,ka).getBounds(b.stage),g=0;g<c.length;){var h=c[g];++g;h!=b&&this.isValidFocus(h)&&Di.isBetterFocusForRelativePosition(x.__cast(h,ka),x.__cast(d,ka),f,a)&&(d=h)}return new Mm(d,!1)},isValidFocusWithKeyboard:function(a){return a instanceof Ia&&!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()||x.__implements(a,Ea)&&!a.get_enabled()||!b&&Aa.forStage(this._root.stage).hasModalPopUps()&&(a=x.__cast(a,ka),!Ry.isTopLevelPopUpOrIsContainedByTopLevelPopUp(a))?!1:!0},setFocusManager:function(a){x.__implements(a,Nb)&&a.set_focusManager(this);a=a instanceof Ab?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(x.__implements(a,ti)){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(x.__implements(a,Nb)&&a.get_focusManager()==this){a==this._focusToRestore&&(this._focusToRestore=null);if(this.get_focus()==a){var b=null;x.__implements(a,od)&&(b=a.get_focusOwner());b!=null&&b.get_focusManager()!=this&&(b=null);this.set_focus(b)}a.set_focusManager(null)}a=a instanceof Ab?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(x.__implements(a,ti)){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;x.__implements(a,qk)&&!x.__implements(a,rg)&&(d=a.parent);var f=b==null;if(x.__implements(d,ti)){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(x.__implements(d,ti)&&(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?x.__implements(d,od)&&(a=d,this.isValidFocusWithKeyboard(a))?a:this.findPreviousContainerFocus(d.parent,d,!0):null},findNextContainerFocus:function(a,b,c){var d=a;x.__implements(a,qk)&&!x.__implements(a,rg)&&(d=a.parent);var f=b==null,g=null;x.__implements(d,bh)&&(g=d.get_focusExclusions());if(x.__implements(d,ti)){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(v){Pb.lastError=v}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(x.__implements(d,ti)&&(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 Ab?a:null;if(b!=null){var c=!x.__implements(b,od);!c&&x.__implements(b,rg)&&(c=b.get_childFocusEnabled());if(c&&(b=this.findPreviousContainerFocus(b,null,!1),b!=null))return b}if(x.__implements(a,od)&&this.isValidFocusWithKeyboard(a)){if(!x.__implements(a,pk))return a;b=a.get_toggleGroup();if(b==null||x.__implements(b.get_selectedItem(),
od)&&(a=b.get_selectedItem(),this.get_focus()!=a))return a}return null},findNextChildFocus:function(a){if(x.__implements(a,od)&&this.isValidFocusWithKeyboard(a)){if(!x.__implements(a,pk))return a;var b=a.get_toggleGroup();if(b==null)return a;if(x.__implements(b.get_selectedItem(),od)&&(b=b.get_selectedItem(),this.get_focus()!=b))return b}a=a instanceof Ab?a:null;return a!=null&&(b=!x.__implements(a,od),!b&&x.__implements(a,rg)&&(b=a.get_childFocusEnabled()),b&&(a=this.findNextContainerFocus(a,null,
!1),a!=null))?a:null},setStageFocus:function(a){for(;x.__implements(a,ai);){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(x.__cast(a.currentTarget,ka))},defaultFocusManager_root_removedFromStageHandler:function(a){this.handleRootRemovedFromStage(x.__cast(a.currentTarget,
ka))},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&&x.__implements(b,qk)&&!x.__implements(b,rg))b=b.parent;else if(!c&&x.__implements(b,ti)){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 Ab&&(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 Ab&&(c=h.contains(h)))break}}return c?b!=null&&b!=this._root?this.shouldBeManaged(b):!0:!1},defaultFocusManager_root_addedHandler:function(a){a=x.__cast(a.target,ka);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=x.__cast(a.target,ka);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 Ic?b:null;
if(b!=null){if(b.get_type()==1||b.get_selectable())return;for(var c=x.__cast(this.findFocusForDisplayObject(b),ka);x.__implements(c,ai);){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()==Vl.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:Vl.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 Ic&&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(x.__implements(a,
od)){var d=a;this.isValidFocus(d,b)?c!=null&&x.__implements(d,rg)&&d.get_childFocusEnabled()||(c=d):d.get_focusOwner()!=null&&this.isValidFocus(d.get_focusOwner(),b)&&(c=d.get_focusOwner(),a=x.__cast(d,ka))}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(x.__cast(a.target,ka)))},defaultFocusManager_root_activateHandler:function(a){this._enabled&&this.restoreFocus()},defaultFocusManager_root_deactivateHandler:function(a){this._enabled&&this.set_focus(null)},__class__:Vl,__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 Mm=function(a,b){this.newFocus=a;this.wrapped=b};t["feathers.core._DefaultFocusManager.FocusResult"]=Mm;Mm.__name__="feathers.core._DefaultFocusManager.FocusResult";Mm.prototype={newFocus:null,wrapped:null,__class__:Mm};var Gt=function(){};t["feathers.core.IPopUpManager"]=Gt;Gt.__name__="feathers.core.IPopUpManager";Gt.__isInterface__=!0;Gt.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__:Gt,__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 $n=function(a){this._popUpToOverlay=new Ta;this._centeredPopUps=[];this.popUps=[];this._ignoreRemoval=!1;this.set_root(a)};t["feathers.core.DefaultPopUpManager"]=
$n;$n.__name__="feathers.core.DefaultPopUpManager";$n.__interfaces__=[Gt];$n.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};$n.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 Db("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=$n.defaultOverlayFactory),b=d(),f=this._root.stage,d=this._root.globalToLocal(new Ca),f=this._root.globalToLocal(new Ca(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),U.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&&(x.__implements(a,tb)&&
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){x.__implements(a,ba)&&a.validateNow();var b=this._root.stage,c=this._root.globalToLocal(new Ca);b=this._root.globalToLocal(new Ca(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(!U.remove(this.popUps,a))throw new Ud("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=x.__cast(a.currentTarget,ka),a.removeEventListener("removedFromStage",m(this,this.defaultPopUpManager_popUp_removedFromStageHandler)),U.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=x.__cast(a.currentTarget,ka);this.centerPopUp(a)},defaultPopUpManager_stage_resizeHandler:function(a){var b=x.__cast(a.currentTarget,dd);a=
this._root.globalToLocal(new Ca);b=this._root.globalToLocal(new Ca(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__:$n,__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 Ht=function(){};t["feathers.core.IToolTipManager"]=Ht;Ht.__name__="feathers.core.IToolTipManager";Ht.__isInterface__=!0;Ht.prototype={get_root:null,dispose:null,__class__:Ht,__properties__:{get_root:"get_root"}};var el=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"]=el;el.__name__="feathers.core.DefaultToolTipManager";el.__interfaces__=[Ht];el.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(){ex.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&&(La.clearTimeout(this._delayTimeoutID),this._delayTimeoutID=null);this._toolTip!=null&&this._toolTip.parent!=null&&(Aa.removePopUp(x.__cast(this._toolTip,ka)),this._hideTime=La.getTimer())},hoverDelayCallback:function(){this._delayTimeoutID=null;if(this._target.get_toolTip()!=
null){if(this._toolTip==null){var a=new fa;a.set_variant(el.CHILD_VARIANT_TOOL_TIP);this._toolTip=a}this._toolTip instanceof Ia&&(a=this._toolTip,a.mouseEnabled=!1,a.set_tabEnabled(!1));this._toolTip instanceof Ab&&(this._toolTip.mouseChildren=!1);x.__implements(this._toolTip,kd)&&(a=this._toolTip,a.get_variant()==null&&a.set_variant(el.CHILD_VARIANT_TOOL_TIP));this._toolTip.set_text(this._target.get_toolTip());x.__implements(this._toolTip,ba)&&this._toolTip.validateNow();var b=this._target.stage,
c=Aa.forStage(b);a=c.get_root().globalToLocal(new Ca(this._toolTipStageX,this._toolTipStageY));b=c.get_root().globalToLocal(new Ca(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(x.__cast(this._toolTip,ka),x.__cast(this._target,ka),!1,!1)}},defaultToolTipManager_root_mouseMoveHandler:function(a){if(!a.buttonDown){for(var b=
x.__cast(a.target,ka);b!=null&&!x.__implements(b,Ea);)b=b.parent;x.__implements(b,Ea)?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=La.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__:el,__properties__:{get_root:"get_root"}};var Qo=Q["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)};Qo.__constructs__=[Qo.Name,Qo.NameAndState];var Ed=function(){};t["feathers.core.FocusManager"]=Ed;Ed.__name__="feathers.core.FocusManager";Ed.__properties__=
{set_focusManagerFactory:"set_focusManagerFactory",get_focusManagerFactory:"get_focusManagerFactory"};Ed.defaultFocusManagerFactory=function(a){return new Vl(a)};Ed.get_focusManagerFactory=function(){return Ed._focusManagerFactory};Ed.set_focusManagerFactory=function(a){a==null&&(Ed._focusManagerFactory=Ed.defaultFocusManagerFactory);if(Ed._focusManagerFactory==a)return Ed._focusManagerFactory;Ed._focusManagerFactory=a;return Ed._focusManagerFactory};Ed.hasRoot=function(a){return Ed.stageToManager.h.__keys__[a.__id__]!=
null};Ed.addRoot=function(a){if(a==null)throw new Db("FocusManager stage argument must not be null.");if(Ed.stageToManager.h.__keys__[a.__id__]!=null)throw new Db("Focus manager root already exists");var b=Ed.get_focusManagerFactory();b==null&&(b=Ed.defaultFocusManagerFactory);b=b(a);b.addEventListener("clear",Ed.focusManager_clearHandler,!1,0,!0);Ed.stageToManager.set(a,b);return b};Ed.removeRoot=function(a){a=Ed.stageToManager.h[a.__id__];a!=null&&a.dispose()};Ed.dispose=function(){for(var a=Ed.stageToManager.keys();a.hasNext();){var b=
a.next();Ed.stageToManager.h[b.__id__].dispose();Ed.stageToManager.remove(b)}};Ed.setFocus=function(a){var b=a.get_focusManager();if(b==null)throw new Db("Cannot set focus because focus manager is null.");b.set_focus(a)};Ed.focusManager_clearHandler=function(a){a=x.__cast(a.currentTarget,Yn);a.removeEventListener("clear",Ed.focusManager_clearHandler);a=a.get_root();a=a instanceof dd?a:null;a!=null&&Ed.stageToManager.remove(a)};Ed.prototype={FocusManager:function(){},__class__:Ed};var Jp=function(){};
t["feathers.core.IScaleManager"]=Jp;Jp.__name__="feathers.core.IScaleManager";Jp.__isInterface__=!0;Jp.__interfaces__=[Fb];Jp.prototype={get_target:null,set_target:null,getScale:null,getBounds:null,__class__:Jp,__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 Db("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 Db("The pop-up's owner must not be null.");b=b.stage;if(b==null)throw new Db("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 Db("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 Db("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 $n(a)};var Kp=function(a){ma.call(this);this._scaler=a};t["feathers.core.ScreenDensityScaleManager"]=Kp;Kp.__name__="feathers.core.ScreenDensityScaleManager";Kp.__interfaces__=[Jp];Kp.__super__=ma;Kp.prototype=I(ma.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());X.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;X.dispatch(this,"change");return this._scaler},getScale:function(){var a=1;if(this._target==null)return a;var b=x.__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 Xa("initial-scale=(\\d(?:\\.\\d+)?)",
"");c.match(b)&&(b=parseFloat(c.matched(1)),a*=1/b)}return a},getBounds:function(){var a=new Ha;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){X.dispatch(this,
"change")},__class__:Kp,__properties__:{set_scaler:"set_scaler",get_scaler:"get_scaler",set_target:"set_target",get_target:"get_target"}});var ee=function(){};t["feathers.core.ToolTipManager"]=ee;ee.__name__="feathers.core.ToolTipManager";ee.__properties__={set_toolTipManagerFactory:"set_toolTipManagerFactory",get_toolTipManagerFactory:"get_toolTipManagerFactory"};ee.defaultToolTipManagerFactory=function(a){return new el(a)};ee.get_toolTipManagerFactory=function(){return ee._toolTipManagerFactory};
ee.set_toolTipManagerFactory=function(a){a==null&&(ee._toolTipManagerFactory=ee.defaultToolTipManagerFactory);if(ee._toolTipManagerFactory==a)return ee._toolTipManagerFactory;ee._toolTipManagerFactory=a;return ee._toolTipManagerFactory};ee.hasRoot=function(a){return ee.stageToManager.h.__keys__[a.__id__]!=null};ee.forRoot=function(a){return ee.stageToManager.h[a.__id__]};ee.addRoot=function(a){if(a==null)throw new Db("ToolTipManager stage argument must not be null.");if(ee.stageToManager.h.__keys__[a.__id__]!=
null)throw new Db("Tool tip manager root already exists");var b=ee.get_toolTipManagerFactory();b==null&&(b=ee.defaultToolTipManagerFactory);b=b(a);ee.stageToManager.set(a,b);return b};ee.removeRoot=function(a){var b=ee.stageToManager.h[a.__id__];b!=null&&(b.dispose(),ee.stageToManager.remove(a))};ee.dispose=function(){for(var a=ee.stageToManager.keys();a.hasNext();){var b=a.next();ee.stageToManager.remove(b)}};ee.prototype={ToolTipManager:function(){},__class__:ee};var kk=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"]=kk;kk.__name__="feathers.core.ValidationQueue";kk.forStage=function(a){if(a==null)return null;kk.STAGE_TO_VALIDATION_QUEUE.h.__keys__[a.__id__]==null&&kk.STAGE_TO_VALIDATION_QUEUE.set(a,new kk(a));return kk.STAGE_TO_VALIDATION_QUEUE.h[a.__id__]};kk.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__:kk,__properties__:{get_validating:"get_validating"}};var ao=function(){};t["openfl.utils.IExternalizable"]=ao;ao.__name__="openfl.utils.IExternalizable";ao.__isInterface__=!0;ao.prototype={readExternal:null,writeExternal:null,
__class__:ao};var Lp=function(){};t["feathers.data.IFlatCollection"]=Lp;Lp.__name__="feathers.data.IFlatCollection";Lp.__isInterface__=!0;Lp.__interfaces__=[Fb];Lp.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__:Lp,
__properties__:{set_sortCompareFunction:"set_sortCompareFunction",get_sortCompareFunction:"get_sortCompareFunction",set_filterFunction:"set_filterFunction",get_filterFunction:"get_filterFunction",get_length:"get_length"}};var fg=function(a){this._filterFunction=this._sortCompareFunction=null;this._pendingRefresh=!1;this._filterAndSortData=this._array=null;ma.call(this);a==null&&(a=[]);this.set_array(a)};t["feathers.data.ArrayCollection"]=fg;fg.__name__="feathers.data.ArrayCollection";fg.__interfaces__=
[ao,Lp];fg.__super__=ma;fg.prototype=I(ma.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;Nd.dispatch(this,"reset",-1);X.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;Nd.dispatch(this,"filterChange",-1);X.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;Nd.dispatch(this,"sortChange",
-1);X.dispatch(this,"change");return this._sortCompareFunction},get:function(a){this._pendingRefresh&&this.refreshFilterAndSort();if(a<0||a>=this.get_length())throw new xe("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 xe("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,Nd.dispatch(this,"replaceItem",a,b,d)):(this._filterAndSortData.splice(a,1),Nd.dispatch(this,"removeItem",a,null,d)),X.dispatch(this,"change")):c&&(this._filterAndSortData[this._filterAndSortData.length]=
b,Nd.dispatch(this,"addItem",a,b),X.dispatch(this,"change"));return}if(this._sortCompareFunction!=null){U.remove(this._filterAndSortData,d);c=this.getSortedInsertionIndex(b);this._filterAndSortData[c]=b;Nd.dispatch(this,"replaceItem",a,b,d);X.dispatch(this,"change");return}}a<this._array.length?(d=this._array[a],this._array[a]=b,Nd.dispatch(this,"replaceItem",a,b,d)):(this._array[a]=b,Nd.dispatch(this,"addItem",a,b));X.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 xe("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)}Nd.dispatch(this,"reset",-1);X.dispatch(this,"change")},remove:function(a){this._pendingRefresh&&this.refreshFilterAndSort();var b=this.indexOf(a);b!=-1&&(this._filterAndSortData!=null&&U.remove(this._filterAndSortData,a),U.remove(this._array,a),Nd.dispatch(this,"removeItem",b,null,a),X.dispatch(this,"change"))},removeAt:function(a){this._pendingRefresh&&this.refreshFilterAndSort();if(a<0||a>=this.get_length())throw new xe("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];U.remove(this._filterAndSortData,b)}else b=this._array[a];U.remove(this._array,b);Nd.dispatch(this,"removeItem",a,null,b);X.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,Nd.dispatch(this,"removeAll",
-1),X.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 Ag(this._filterAndSortData):new Ag(this._array)},updateAt:function(a){if(a<0||a>=this.get_length())throw new xe("Failed to update item at index "+
a+". Expected a value between 0 and "+(this.get_length()-1)+".");Nd.dispatch(this,"updateItem",a);this.refresh()},updateAll:function(){Nd.dispatch(this,"updateAll",-1);this.refresh()},refresh:function(){if(this._filterFunction!=null||this._sortCompareFunction!=null)this._pendingRefresh=!0,this._filterFunction!=null&&Nd.dispatch(this,"filterChange",-1),this._sortCompareFunction!=null&&Nd.dispatch(this,"sortChange",-1),X.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 fg(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 xe("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&&(Nd.dispatch(this,"addItem",b,a),X.dispatch(this,"change")))}else this._array.splice(b,0,a),c&&(Nd.dispatch(this,"addItem",b,a),X.dispatch(this,"change"))},__class__:fg,__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 ag=Q["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}};ag.__constructs__=[ag.STANDARD,ag.HEADER];var It=function(){};t["feathers.data.IHierarchicalCollection"]=
It;It.__name__="feathers.data.IHierarchicalCollection";It.__isInterface__=!0;It.__interfaces__=[Fb];It.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__:It,__properties__:{set_sortCompareFunction:"set_sortCompareFunction",get_sortCompareFunction:"get_sortCompareFunction",
set_filterFunction:"set_filterFunction",get_filterFunction:"get_filterFunction"}};var vx=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"]=vx;vx.__name__="feathers.data.PageIndicatorItemState";vx.prototype={owner:null,index:null,selected:null,enabled:null,__class__:vx};var Ax=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"]=
Ax;Ax.__name__="feathers.data.RouteState";Ax.prototype={pattern:null,pathname:null,params:null,urlVariables:null,historyState:null,data:null,__class__:Ax};var Ih=Q["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}};Ih.__constructs__=[Ih.ASCENDING,Ih.DESCENDING,Ih.NONE];var lt=function(){this._data=new H};t["feathers.dragDrop.DragData"]=lt;lt.__name__="feathers.dragDrop.DragData";lt.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__:lt};var gb=function(){};
t["feathers.dragDrop.DragDropManager"]=gb;gb.__name__="feathers.dragDrop.DragDropManager";gb.__properties__={get_dragging:"get_dragging"};gb.get_dragging=function(){return gb.dragData!=null};gb.startDrag=function(a,b,c,d,f){f==null&&(f=0);d==null&&(d=0);gb.get_dragging()&&gb.cancelDrag();if(a==null)throw new Db("Drag source must not be null.");if(b==null)throw new Db("Drag data must not be null.");gb.dragSource=a;gb.dragData=b;gb.dragAvatar=c;gb.dragAvatarOffsetX=d;gb.dragAvatarOffsetY=f;a=x.__cast(a,
ka);gb._dragSourceStage=a.stage;gb.dragAvatar==null&&(gb._dragSourceBitmapData=new yc(Math.ceil(a.get_width()*1),Math.ceil(a.get_height()*1)),c=new hb,c.scale(1,1),gb._dragSourceBitmapData.draw(a,c),gb.dragAvatar=new Oa(gb._dragSourceBitmapData),gb.dragAvatar.set_alpha(.75),gb.dragAvatar.set_scaleX(1),gb.dragAvatar.set_scaleY(1));gb.dragAvatar instanceof Ia&&(a=gb.dragAvatar,gb._oldDragAvatarMouseEnabled=a.mouseEnabled,a.mouseEnabled=!1);gb.dragAvatar instanceof Ab&&(a=gb.dragAvatar,gb._oldDragAvatarMouseChildren=
a.mouseChildren,a.mouseChildren=!1);gb.dragAvatar.set_x(gb._dragSourceStage.get_mouseX()+gb.dragAvatarOffsetX);gb.dragAvatar.set_y(gb._dragSourceStage.get_mouseY()+gb.dragAvatarOffsetY);Aa.addPopUp(gb.dragAvatar,gb._dragSourceStage,!1,!1);gb._dragSourceStage.addEventListener("mouseMove",gb.dragDropManager_stage_mouseMoveHandler,!1,0,!0);gb._dragSourceStage.addEventListener("mouseUp",gb.dragDropManager_stage_mouseUpHandler,!1,0,!0);cg.dispatch(gb.dragSource,"dragStart",b,!1,null,null,gb.dragSource);
gb.updateDropTarget(gb._dragSourceStage,gb._dragSourceStage.get_mouseX(),gb._dragSourceStage.get_mouseY())};gb.acceptDrag=function(a){if(gb.currentDropTarget!=a)throw new Db("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.");gb.dropAccepted=!0};gb.cancelDrag=function(){gb.get_dragging()&&gb.completeDrag(!1)};gb.completeDrag=function(a){if(!gb.get_dragging())throw new pb("Drag cannot be completed because none is currently active.");
gb.currentDropTarget!=null&&(cg.dispatch(gb.currentDropTarget,"dragExit",gb.dragData,!1,gb._dropTargetLocalX,gb._dropTargetLocalY,gb.dragSource),gb.currentDropTarget=null);var b=gb.dragSource,c=gb.dragData;gb.cleanup();cg.dispatch(b,"dragComplete",c,a,null,null,b)};gb.cleanup=function(){gb._dragSourceStage!=null&&(gb._dragSourceStage.removeEventListener("mouseMove",gb.dragDropManager_stage_mouseMoveHandler),gb._dragSourceStage.removeEventListener("mouseUp",gb.dragDropManager_stage_mouseUpHandler),
gb._dragSourceStage=null);gb._dragSourceBitmapData!=null&&(gb._dragSourceBitmapData.dispose(),gb._dragSourceBitmapData=null);gb.dragAvatar!=null&&(Aa.isPopUp(gb.dragAvatar)&&Aa.removePopUp(gb.dragAvatar),gb.dragAvatar instanceof Ia&&(gb.dragAvatar.mouseEnabled=gb._oldDragAvatarMouseEnabled),gb.dragAvatar instanceof Ab&&(gb.dragAvatar.mouseChildren=gb._oldDragAvatarMouseChildren),gb.dragAvatar=null);gb.dragSource=null;gb.dragData=null};gb.updateDropTarget=function(a,b,c){b=new Ca(b,c);c=null;a=a.getObjectsUnderPoint(b);
for(var d=0;d<a.length;){var f=a[d];++d;if(!(f instanceof Ia)||f.mouseEnabled){for(;f!=null;){if(x.__implements(f,lp)){c=f;break}f=f.parent}if(c!=null)break}}c!=null&&(b=c.globalToLocal(b));c!=gb.currentDropTarget?(gb.currentDropTarget!=null&&cg.dispatch(gb.currentDropTarget,"dragExit",gb.dragData,!1,gb._dropTargetLocalX,gb._dropTargetLocalY,gb.dragSource),gb.currentDropTarget=c,gb.dropAccepted=!1,gb.currentDropTarget!=null&&(gb._dropTargetLocalX=b.x,gb._dropTargetLocalY=b.y,cg.dispatch(gb.currentDropTarget,
"dragEnter",gb.dragData,!1,gb._dropTargetLocalX,gb._dropTargetLocalY,gb.dragSource))):gb.currentDropTarget!=null&&(gb._dropTargetLocalX=b.x,gb._dropTargetLocalY=b.y,cg.dispatch(gb.currentDropTarget,"dragMove",gb.dragData,!1,gb._dropTargetLocalX,gb._dropTargetLocalY,gb.dragSource))};gb.dragDropManager_stage_mouseMoveHandler=function(a){a=x.__cast(a.currentTarget,dd);gb.dragAvatar!=null&&(gb.dragAvatar.set_x(a.get_mouseX()+gb.dragAvatarOffsetX),gb.dragAvatar.set_y(a.get_mouseY()+gb.dragAvatarOffsetY));
gb.updateDropTarget(a,a.get_mouseX(),a.get_mouseY())};gb.dragDropManager_stage_mouseUpHandler=function(a){a=!1;gb.currentDropTarget!=null&&gb.dropAccepted&&(cg.dispatch(gb.currentDropTarget,"dragDrop",gb.dragData,!0,gb._dropTargetLocalX,gb._dropTargetLocalY,gb.dragSource),a=!0);gb.currentDropTarget=null;gb.completeDrag(a)};var Tj=function(a,b){na.call(this,a,!1,!1);this.state=b};t["feathers.events.ButtonBarEvent"]=Tj;Tj.__name__="feathers.events.ButtonBarEvent";Tj.dispatch=function(a,b,c){var d=Tj._pool.get();
d.type=b;d.state=c;a=a.dispatchEvent(d);Tj._pool.release(d);return a};Tj.__super__=na;Tj.prototype=I(na.prototype,{state:null,clone:function(){return new Tj(this.type,this.state)},__class__:Tj});var Zi=function(a,b){na.call(this,a,!1,!1);this.state=b};t["feathers.events.DatePickerEvent"]=Zi;Zi.__name__="feathers.events.DatePickerEvent";Zi.dispatch=function(a,b,c){var d=Zi._pool.get();d.type=b;d.state=c;a=a.dispatchEvent(d);Zi._pool.release(d);return a};Zi.__super__=na;Zi.prototype=I(na.prototype,
{state:null,clone:function(){return new Zi(this.type,this.state)},__class__:Zi});var cg=function(a,b,c,d,f,g){na.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"]=cg;cg.__name__="feathers.events.DragDropEvent";cg.dispatch=function(a,b,c,d,f,g,h){var n=cg._pool.get();n.type=b;n.dragData=c;n.dropped=d;n.localX=f;n.localY=g;n.dragSource=h;a=a.dispatchEvent(n);cg._pool.release(n);return a};cg.__super__=na;cg.prototype=
I(na.prototype,{dragData:null,dropped:null,localX:null,localY:null,dragSource:null,acceptDrag:function(a){gb.acceptDrag(a)},clone:function(){return new cg(this.type,this.dragData,this.dropped,this.localX,this.localY,this.dragSource)},__class__:cg});var X=function(a,b,c){c==null&&(c=!1);b==null&&(b=!1);na.call(this,a,b,c)};t["feathers.events.FeathersEvent"]=X;X.__name__="feathers.events.FeathersEvent";X.dispatch=function(a,b,c,d){d==null&&(d=!1);c==null&&(c=!1);var f=X._pool.get();f.type=b;f.bubbles=
c;f.cancelable=d;a=a.dispatchEvent(f);X._pool.release(f);return a};X.__super__=na;X.prototype=I(na.prototype,{clone:function(){return new X(this.type,this.bubbles,this.cancelable)},__class__:X});var Nd=function(a,b,c,d,f,g){g==null&&(g=!1);f==null&&(f=!1);na.call(this,a,f,g);this.index=b;this.addedItem=c;this.removedItem=d};t["feathers.events.FlatCollectionEvent"]=Nd;Nd.__name__="feathers.events.FlatCollectionEvent";Nd.dispatch=function(a,b,c,d,f,g,h){h==null&&(h=!1);g==null&&(g=!1);var n=Nd._pool.get();
n.type=b;n.index=c;n.addedItem=d;n.removedItem=f;n.bubbles=g;n.cancelable=h;a=a.dispatchEvent(n);Nd._pool.release(n);return a};Nd.__super__=na;Nd.prototype=I(na.prototype,{index:null,addedItem:null,removedItem:null,clone:function(){return new Nd(this.type,this.index,this.addedItem,this.removedItem,this.bubbles,this.cancelable)},__class__:Nd});var Uj=function(a){na.call(this,a,!1,!1)};t["feathers.events.FormEvent"]=Uj;Uj.__name__="feathers.events.FormEvent";Uj.dispatch=function(a,b){var c=Uj._pool.get();
c.type=b;a=a.dispatchEvent(c);Uj._pool.release(c);return a};Uj.__super__=na;Uj.prototype=I(na.prototype,{clone:function(){return new Uj(this.type)},__class__:Uj});var Lf=function(a,b){na.call(this,a,!1,!1);this.state=b};t["feathers.events.GridViewEvent"]=Lf;Lf.__name__="feathers.events.GridViewEvent";Lf.dispatchForCell=function(a,b,c){var d=Lf._cellPool.get();d.type=b;d.state=c;a=a.dispatchEvent(d);Lf._cellPool.release(d);return a};Lf.dispatchForHeader=function(a,b,c){var d=Lf._headerPool.get();d.type=
b;d.state=c;a=a.dispatchEvent(d);Lf._headerPool.release(d);return a};Lf.__super__=na;Lf.prototype=I(na.prototype,{state:null,clone:function(){return new Lf(this.type,this.state)},__class__:Lf});var Ai=function(a,b){na.call(this,a,!1,!1);this.state=b};t["feathers.events.GroupListViewEvent"]=Ai;Ai.__name__="feathers.events.GroupListViewEvent";Ai.dispatch=function(a,b,c){var d=Ai._pool.get();d.type=b;d.state=c;a=a.dispatchEvent(d);Ai._pool.release(d);return a};Ai.__super__=na;Ai.prototype=I(na.prototype,
{state:null,clone:function(){return new Ai(this.type,this.state)},__class__:Ai});var Pg=function(a,b,c,d,f,g){g==null&&(g=!1);f==null&&(f=!1);na.call(this,a,f,g);this.location=b;this.addedItem=c;this.removedItem=d};t["feathers.events.HierarchicalCollectionEvent"]=Pg;Pg.__name__="feathers.events.HierarchicalCollectionEvent";Pg.dispatch=function(a,b,c,d,f,g,h){h==null&&(h=!1);g==null&&(g=!1);var n=Pg._pool.get();n.type=b;n.location=c;n.addedItem=d;n.removedItem=f;n.bubbles=g;n.cancelable=h;a=a.dispatchEvent(n);
Pg._pool.release(n);return a};Pg.__super__=na;Pg.prototype=I(na.prototype,{location:null,addedItem:null,removedItem:null,clone:function(){return new Pg(this.type,this.location,this.addedItem,this.removedItem,this.bubbles,this.cancelable)},__class__:Pg});var di=function(a,b){na.call(this,a,!1,!1);this.state=b};t["feathers.events.ListViewEvent"]=di;di.__name__="feathers.events.ListViewEvent";di.dispatch=function(a,b,c){var d=di._pool.get();d.type=b;d.state=c;a=a.dispatchEvent(d);di._pool.release(d);
return a};di.__super__=na;di.prototype=I(na.prototype,{state:null,clone:function(){return new di(this.type,this.state)},__class__:di});var Kd=function(a,b,c,d,f){f==null&&(f=0);d==null&&(d=0);c==null&&(c=!1);b==null&&(b=!1);na.call(this,a,b,c);this.x=d;this.y=f};t["feathers.events.ScrollEvent"]=Kd;Kd.__name__="feathers.events.ScrollEvent";Kd.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=Kd._pool.get();h.type=b;h.bubbles=c;h.cancelable=d;h.x=f;h.y=
g;a=a.dispatchEvent(h);Kd._pool.release(h);return a};Kd.__super__=na;Kd.prototype=I(na.prototype,{x:null,y:null,clone:function(){return new Kd(this.type,this.bubbles,this.cancelable,this.x,this.y)},__class__:Kd});var Ch=function(a,b){na.call(this,a);this.affectsTarget=b!=null?b:Ch.defaultAffectsTarget};t["feathers.events.StyleProviderEvent"]=Ch;Ch.__name__="feathers.events.StyleProviderEvent";Ch.dispatch=function(a,b,c){var d=Ch._pool.get();d.type=b;d.affectsTarget=c!=null?c:Ch.defaultAffectsTarget;
a=a.dispatchEvent(d);Ch._pool.release(d);return a};Ch.defaultAffectsTarget=function(a){return!0};Ch.__super__=na;Ch.prototype=I(na.prototype,{affectsTarget:null,clone:function(){return new Ch(this.type,this.affectsTarget)},__class__:Ch});var Vj=function(a,b){na.call(this,a,!1,!1);this.state=b};t["feathers.events.TabBarEvent"]=Vj;Vj.__name__="feathers.events.TabBarEvent";Vj.dispatch=function(a,b,c){var d=Vj._pool.get();d.type=b;d.state=c;a=a.dispatchEvent(d);Vj._pool.release(d);return a};Vj.__super__=
na;Vj.prototype=I(na.prototype,{state:null,clone:function(){return new Vj(this.type,this.state)},__class__:Vj});var ei=function(a,b,c,d,f){na.call(this,a,!1,!1);this.previousViewID=b;this.previousView=c;this.nextViewID=d;this.nextView=f};t["feathers.events.TransitionEvent"]=ei;ei.__name__="feathers.events.TransitionEvent";ei.dispatch=function(a,b,c,d,f,g){var h=ei._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);
ei._pool.release(h);return a};ei.__super__=na;ei.prototype=I(na.prototype,{previousView:null,previousViewID:null,nextView:null,nextViewID:null,clone:function(){return new ei(this.type,this.previousViewID,this.previousView,this.nextViewID,this.nextView)},__class__:ei});var $e=function(a,b){na.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__=na;$e.prototype=I(na.prototype,{state:null,clone:function(){return new $e(this.type,this.state)},__class__:$e});var Og=function(a,b){na.call(this,a,!1,!1);this.state=b};t["feathers.events.TreeViewEvent"]=Og;Og.__name__="feathers.events.TreeViewEvent";Og.dispatch=function(a,b,c){var d=Og._pool.get();d.type=b;d.state=
c;a=a.dispatchEvent(d);Og._pool.release(d);return a};Og.__super__=na;Og.prototype=I(na.prototype,{state:null,clone:function(){return new Og(this.type,this.state)},__class__:Og});var of=function(a,b,c,d,f,g,h,n,l,q,v,w,z,r,G){G==null&&(G=!1);r==null&&(r=!1);z==null&&(z=!1);w==null&&(w=!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);na.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=v;this.ctrlKey=w;this.altKey=z;this.shiftKey=r;this.commandKey=G};t["feathers.events.TriggerEvent"]=of;of.__name__="feathers.events.TriggerEvent";of.dispatchFromMouseEvent=function(a,b){var c=of._pool.get();c=of.fromMouseEvent(b,c);a=a.dispatchEvent(c);of._pool.release(c);return a};of.dispatchFromTouchEvent=function(a,b){var c=of._pool.get();c=of.fromTouchEvent(b,c);a=a.dispatchEvent(c);of._pool.release(c);
return a};of.fromMouseEvent=function(a,b){if(a.type!="click")throw new Db("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 of("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")&&u.field(a,"commandKey"));b.stageX=a.stageX;b.stageY=a.stageY;return b};of.fromTouchEvent=function(a,b){if(a.type!="touchTap")throw new Db("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 of("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")&&u.field(a,"commandKey"));b.stageX=a.stageX;b.stageY=a.stageY;return b};
of.__super__=na;of.prototype=I(na.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 of(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__:of});var $s={fromGradientBoxTransform:function(a){switch(a._hx_index){case 0:var b=a.rotation;return function(w,z,r,G,J){r=new hb;r.createGradientBox(w,z,b,G,J);return r};case 1:var c=a.rotation;return function(w,z,r,G,J){r=new hb;r.createGradientBox(w,z,c*Math.PI/180,G,J);return r};case 2:var d=a.tx,f=a.ty;return function(w,z,r,G,J){G=new hb;G.createGradientBox(w,z,r,d,f);return G};case 3:var g=a.rotation,h=a.tx,n=a.ty;return function(w,
z,r,G,J){r=new hb;r.createGradientBox(w,z,g,h,n);return r};case 4:var l=a.rotation,q=a.tx,v=a.ty;return function(w,z,r,G,J){r=new hb;r.createGradientBox(w,z,l*Math.PI/180,q,v);return r}}},fromRadians:function(a){return function(b,c,d,f,g){d=new hb;d.createGradientBox(b,c,a,f,g);return d}},fromMatrix:function(a){return function(b,c,d,f,g){return a}}},vb=Q["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}};vb.__constructs__=[vb.SolidColor,vb.Bitmap,vb.Gradient,vb.None];var Jt=Q["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)};Jt.__constructs__=[Jt.RotateRadians,Jt.RotateDegrees,Jt.Translate,Jt.RotateRadiansAndTranslate,Jt.RotateDegreesAndTranslate];var nc=Q["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}};nc.__constructs__=[nc.SolidColor,nc.Bitmap,nc.Gradient,nc.None];var kh=function(){};t["feathers.layout.ILayout"]=kh;kh.__name__="feathers.layout.ILayout";kh.__isInterface__=!0;kh.__interfaces__=[Fb];kh.prototype={layout:null,__class__:kh};var Ni=function(){ma.call(this)};t["feathers.layout.AnchorLayout"]=Ni;Ni.__name__="feathers.layout.AnchorLayout";Ni.__interfaces__=[kh];Ni.__super__=ma;Ni.prototype=I(ma.prototype,{layout:function(a,b,c){for(var d=
0;d<a.length;){var f=a[d];++d;if(x.__implements(f,R)){var g=f;if(!g.get_includeInLayout())continue;var h=null;g!=null&&g.get_layoutData()instanceof cd&&(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()))}}x.__implements(f,ba)&&f.validateNow()}l=n=0;for(var q=[];q.length<a.length;){var v=q.length;for(d=0;d<a.length;)if(f=a[d],++d,q.indexOf(f)==-1){g=null;if(x.__implements(f,R)&&(g=f,!g.get_includeInLayout())){q.push(f);continue}h=null;g!=null&&g.get_layoutData()instanceof cd&&(h=g.get_layoutData());x.__implements(f,ba)&&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 w=h.get_top(),z=w.get_value();g=
w.get_relativeTo();if(g!=null&&q.indexOf(g)==-1){if(f.parent!=g.parent)throw new pb("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){w=h.get_left();z=w.get_value();g=w.get_relativeTo();if(g!=null&&q.indexOf(g)==-1){if(f.parent!=g.parent)throw new pb("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){w=h.get_bottom();var r=w.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&&(w=h.get_right(),r=w.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(v==q.length)throw new pb("relativeTo circular reference detected");}for(var G=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;){v=q.length;for(d=0;d<a.length;)if(f=a[d],++d,q.indexOf(f)==-1){g=null;if(x.__implements(f,R)&&(g=f,!g.get_includeInLayout())){q.push(f);continue}h=null;g!=null&&g.get_layoutData()instanceof cd&&(h=g.get_layoutData());if(h!=null){if(h.get_top()!=null){w=h.get_top();
g=w.get_relativeTo();if(g!=null&&q.indexOf(g)==-1){if(f.parent!=g.parent)throw new pb("relativeTo must have the same parent");continue}w=w.get_value();g!=null&&(w+=g.get_y()+g.get_height());f.set_y(w)}if(h.get_left()!=null){w=h.get_left();g=w.get_relativeTo();if(g!=null&&q.indexOf(g)==-1){if(f.parent!=g.parent)throw new pb("relativeTo must have the same parent");continue}w=w.get_value();g!=null&&(w+=g.get_x()+g.get_width());f.set_x(w)}if(h.get_bottom()!=null){w=h.get_bottom();g=w.get_relativeTo();
if(g!=null&&q.indexOf(g)==-1){if(f.parent!=g.parent)throw new pb("relativeTo must have the same parent");continue}w=w.get_value();var L=r;g!=null&&(L=g.get_y());if(h.get_top()==null)f.set_y(L-w-f.get_height());else if(g=L-w-f.get_y(),g<0&&(g=0),f.get_height()!=g&&(f.set_height(g),b.width==null&&x.__implements(f,ba)&&(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){w=h.get_right();
g=w.get_relativeTo();if(g!=null&&q.indexOf(g)==-1){if(f.parent!=g.parent)throw new pb("relativeTo must have the same parent");continue}w=w.get_value();L=z;g!=null&&(L=g.get_x());if(h.get_left()==null)f.set_x(L-w-f.get_width());else if(h=L-w-f.get_x(),h<0&&(h=0),f.get_width()!=h&&(f.set_width(h),b.height==null&&x.__implements(f,ba)&&(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&&
v==q.length)throw new pb("relativeTo circular reference detected");}if(J&&(++G,G>a.length))throw new pb("AnchorLayout is stuck in an infinite loop.");}c==null&&(c=new Ng);c.contentX=0;c.contentY=0;c.contentWidth=z;c.contentHeight=r;c.viewPortWidth=z;c.viewPortHeight=r;return c},__class__:Ni});var Mp=function(a,b){a==null&&(a=0);ma.call(this);this._value=a;this._relativeTo=b};t["feathers.layout.Anchor"]=Mp;Mp.__name__="feathers.layout.Anchor";Mp.__super__=ma;Mp.prototype=I(ma.prototype,{_value:null,
get_value:function(){return this._value},set_value:function(a){if(this._value==a)return this._value;this._value=a;X.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;X.dispatch(this,"change");return this._relativeTo},__class__:Mp,__properties__:{set_relativeTo:"set_relativeTo",get_relativeTo:"get_relativeTo",set_value:"set_value",get_value:"get_value"}});
var Qg={fromPixels:function(a){return new Mp(a)},fromDisplayObject:function(a){return new Mp(0,a)}},Np=function(){};t["feathers.layout.ILayoutData"]=Np;Np.__name__="feathers.layout.ILayoutData";Np.__isInterface__=!0;Np.__interfaces__=[Fb];var cd=function(a,b,c,d,f,g){this._top=this._right=this._bottom=this._left=this._horizontalCenter=this._verticalCenter=null;ma.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"]=cd;cd.__name__="feathers.layout.AnchorLayoutData";cd.__interfaces__=[Np];cd.center=function(a,b){b==null&&(b=0);a==null&&(a=0);return new cd(null,null,null,null,a,b)};cd.fill=function(a){a==null&&(a=0);return new cd(Qg.fromPixels(a),Qg.fromPixels(a),Qg.fromPixels(a),Qg.fromPixels(a))};cd.fillHorizontal=function(a){a==null&&(a=0);return new cd(null,Qg.fromPixels(a),null,Qg.fromPixels(a))};cd.fillVertical=function(a){a==null&&(a=0);return new cd(Qg.fromPixels(a),
null,Qg.fromPixels(a),null)};cd.topLeft=function(a,b){b==null&&(b=0);a==null&&(a=0);return new cd(Qg.fromPixels(a),null,null,Qg.fromPixels(b))};cd.topCenter=function(a,b){b==null&&(b=0);a==null&&(a=0);return new cd(Qg.fromPixels(a),null,null,null,b)};cd.topRight=function(a,b){b==null&&(b=0);a==null&&(a=0);return new cd(Qg.fromPixels(a),Qg.fromPixels(b))};cd.middleLeft=function(a,b){b==null&&(b=0);a==null&&(a=0);return new cd(null,null,null,Qg.fromPixels(b),null,a)};cd.middleRight=function(a,b){b==
null&&(b=0);a==null&&(a=0);return new cd(null,Qg.fromPixels(b),null,null,null,a)};cd.bottomLeft=function(a,b){b==null&&(b=0);a==null&&(a=0);return new cd(null,null,Qg.fromPixels(a),Qg.fromPixels(b))};cd.bottomCenter=function(a,b){b==null&&(b=0);a==null&&(a=0);return new cd(null,null,Qg.fromPixels(a),null,b)};cd.bottomRight=function(a,b){b==null&&(b=0);a==null&&(a=0);return new cd(null,Qg.fromPixels(b),Qg.fromPixels(a))};cd.__super__=ma;cd.prototype=I(ma.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));X.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));X.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));X.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));X.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;X.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;X.dispatch(this,"change");return this._verticalCenter},anchorLayoutData_anchor_changeHandler:function(a){X.dispatch(this,"change")},__class__:cd,__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 Ue=Q["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}};Ue.__constructs__=[Ue.STAGE,Ue.CONTENT];var qp=function(){this._paddingTop=this._paddingRight=this._paddingBottom=this._paddingLeft=this._horizontalGap=this._verticalGap=0;ma.call(this)};t["feathers.layout.CalendarGridLayout"]=
qp;qp.__name__="feathers.layout.CalendarGridLayout";qp.__interfaces__=[kh];qp.__super__=ma;qp.prototype=I(ma.prototype,{_paddingTop:null,get_paddingTop:function(){return this._paddingTop},set_paddingTop:function(a){if(this._paddingTop==a)return this._paddingTop;this._paddingTop=a;X.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;X.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;X.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;X.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;X.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;X.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(x.__implements(f,R)){var g=f;if(!g.get_includeInLayout())continue}x.__implements(f,ba)&&f.validateNow()}var h=0,n=0;for(d=0;d<a.length;){f=a[d];++d;if(x.__implements(f,R)&&(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 v=this._paddingLeft,w=this._paddingTop;d=0;for(var z=a.length;d<z;){f=d++;f=a[f];if(x.__implements(f,R)&&(g=f,!g.get_includeInLayout()))continue;f.get_width()!=h&&f.set_width(h);f.get_height()!=n&&f.set_height(n);b>=7&&(v=this._paddingLeft,w+=n+this._verticalGap,b=0);f.set_x(v);f.set_y(w);v+=h+this._horizontalGap;++b}this.get_paddingBottom();c==null&&(c=new Ng);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;(!x.__implements(c,R)||c.get_includeInLayout())&&x.__implements(c,ba)&&c.validateNow()}},__class__:qp,__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 uj=Q["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}};
uj.__constructs__=[uj.VERTICAL,uj.HORIZONTAL,uj.NONE];var Op=function(){this._verticalAlign=fc.TOP;this._paddingTop=this._paddingRight=this._paddingBottom=this._paddingLeft=this._gap=0;ma.call(this)};t["feathers.layout.FormLayout"]=Op;Op.__name__="feathers.layout.FormLayout";Op.__interfaces__=[kh];Op.__super__=ma;Op.prototype=I(ma.prototype,{_paddingTop:null,get_paddingTop:function(){return this._paddingTop},set_paddingTop:function(a){if(this._paddingTop==a)return this._paddingTop;this._paddingTop=
a;X.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;X.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;X.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;X.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;X.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;X.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 $i?f:null;g!=null&&g.set_customTextColumnWidth(null);x.__implements(f,ba)&&f.validateNow()}var h=1/0,n=1/0,l=0,q=0;for(d=0;d<a.length;){f=a[d];++d;if(x.__implements(f,R)&&(g=f,!g.get_includeInLayout()))continue;
g=f instanceof $i?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(x.__implements(f,R)&&(g=f,!g.get_includeInLayout()))continue;g=f instanceof $i?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)}x.__implements(f,ba)&&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(x.__implements(f,R)&&(g=f,!g.get_includeInLayout()))continue;f.set_width(l-this._paddingLeft-this._paddingRight)}d=n-this._paddingTop-this._paddingBottom;if(this._verticalAlign==fc.BOTTOM||this._verticalAlign==fc.MIDDLE)if(f=q-this._paddingTop-this._paddingBottom,!(d>=f))for(b=0,this._verticalAlign==fc.BOTTOM?b=f-d:this._verticalAlign==fc.MIDDLE&&(b=(f-d)/2),d=0;d<a.length;){f=a[d];++d;if(x.__implements(f,
R)&&(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 Ng);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 $i?c:null;d!=null&&d.set_customTextColumnWidth(null);x.__implements(c,ba)&&c.validateNow()}},applyHorizontalAlign:function(a,b){for(var c=0;c<a.length;){var d=a[c];++c;if(x.__implements(d,
R)){var f=d;if(!f.get_includeInLayout())continue}d.set_width(b-this._paddingLeft-this._paddingRight)}},applyVerticalAlign:function(a,b,c){if(this._verticalAlign==fc.BOTTOM||this._verticalAlign==fc.MIDDLE){var d=c-this._paddingTop-this._paddingBottom;if(!(b>=d))for(c=0,this._verticalAlign==fc.BOTTOM?c=d-b:this._verticalAlign==fc.MIDDLE&&(c=(d-b)/2),b=0;b<a.length;){d=a[b];++b;if(x.__implements(d,R)){var f=d;if(!f.get_includeInLayout())continue}d.set_y(Math.max(this._paddingTop,d.get_y()+c))}}},__class__:Op,
__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 Sl=function(){this._heightResetEnabled=!0;this._paddingLeft=this._paddingRight=0;ma.call(this)};
t["feathers.layout.GridViewRowLayout"]=Sl;Sl.__name__="feathers.layout.GridViewRowLayout";Sl.__interfaces__=[kh];Sl.__super__=ma;Sl.prototype=I(ma.prototype,{_paddingLeft:null,get_paddingLeft:function(){return this._paddingLeft},set_paddingLeft:function(a){if(this._paddingLeft==a)return this._paddingLeft;this._paddingLeft=a;X.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;X.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;X.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;X.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;X.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&&x.__implements(h,tb)&&h.resetHeight();x.__implements(h,ba)&&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 Ng);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 v=l++,w=this._columns.get(v),z=w.width,r=a[v];if(z!=null)r.set_width(z),x.__implements(r,ba)&&r.validateNow();else if(this._customColumnWidths!=
null&&v<this._customColumnWidths.length)r.set_width(this._customColumnWidths[v]),x.__implements(r,ba)&&r.validateNow();else{z=100;var G=0;x.__implements(r,tb)&&(x.__implements(r,ba)&&r.validateNow(),G=r.get_minWidth());G=Math.max(w.minWidth,G);n=Math.max(G,n);h+=z;f.push(v);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],w=this._columns.get(n),z=
100,q=Math.floor(g*z),w=w.minWidth,w>b&&(w=b),q<w&&(q=w,b-=q,h-=z,U.remove(f,n),c=!0),r.set_width(q),x.__implements(r,ba)&&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__:Sl,__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 hp=function(){this._fallbackFluidIndex=-1;this._verticalAlign=fc.JUSTIFY;this._paddingTop=this._paddingRight=this._paddingBottom=this._paddingLeft=0;ma.call(this)};t["feathers.layout.HDividedBoxLayout"]=hp;hp.__name__="feathers.layout.HDividedBoxLayout";hp.__interfaces__=[kh];hp.__super__=ma;hp.prototype=I(ma.prototype,{_paddingTop:null,get_paddingTop:function(){return this._paddingTop},
set_paddingTop:function(a){if(this._paddingTop==a)return this._paddingTop;this._paddingTop=a;X.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;X.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;X.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;X.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;X.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;X.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;X.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(!x.__implements(f,R)||f.get_includeInLayout()){if(this._customItemWidths!=null&&d<this._customItemWidths.length){var h=this._customItemWidths[d];h!=null&&f.set_width(h)}x.__implements(f,ba)&&f.validateNow();x.__implements(g,
ba)&&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(!x.__implements(f,R)||f.get_includeInLayout())x.__implements(g,ba)&&g.validateNow(),g!=null&&g.get_visible()&&(g.set_x(h),h+=g.get_width()),x.__implements(f,ba)&&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 Ng);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(!x.__implements(c,R)||c.get_includeInLayout()){if(this._customItemWidths!=
null&&b<this._customItemWidths.length){var f=this._customItemWidths[b];f!=null&&c.set_width(f)}x.__implements(c,ba)&&c.validateNow();x.__implements(d,ba)&&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,v=-1,w=0;w<a.length;){var z=a[w],r=null;w>0&&(r=a[w-1]);if(x.__implements(z,R)&&!z.get_includeInLayout())q==w&&(q=-1);else{r!=null&&r.get_visible()&&(h+=r.get_width());v=w;r=Math.floor(w/2);var G=!0;this._customItemWidths!=null&&r<this._customItemWidths.length&&
(r=this._customItemWidths[r],r!=null&&(G=!1,z.set_width(r),f.push(w),x.__implements(z,ba)&&z.validateNow()));if(G){G=100;if(x.__implements(z,tb)){var J=z;z=J.get_explicitMinWidth();z!=null&&(n+=z)}l+=G;g.push(w)}else h+=z.get_width()}w+=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;w=b/l;w<0&&(w=0);for(c=0;c<g.length;)d=g[c],++c,z=a[d],G=100,r=Math.floor(w*G),J=null,x.__implements(z,tb)&&(J=z,J=J.get_explicitMinWidth()),J!=null&&(J>
b&&(J=b),r<J&&(r=J,b-=r,l-=G,U.remove(g,d),h=!0)),z.set_width(r),x.__implements(z,ba)&&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||v<q)q=v;q!=-1&&(g=a[q],r=g.get_width()+b,r<0?(b=r,r=0,U.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(!x.__implements(d,R)||d.get_includeInLayout()){var f=b;if(x.__implements(d,tb)){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__:hp,__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 Vb=Q["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}};Vb.__constructs__=[Vb.LEFT,Vb.CENTER,Vb.RIGHT,Vb.JUSTIFY];var tj=function(){};t["feathers.layout.IDragDropLayout"]=tj;tj.__name__="feathers.layout.IDragDropLayout";tj.__isInterface__=!0;tj.__interfaces__=[kh];tj.prototype={getDragDropIndex:null,getDragDropRegion:null,
__class__:tj};var Pp=function(){this._verticalAlign=fc.TOP;this._minItemWidth=0;this._maxItemWidth=1/0;this._paddingTop=this._paddingRight=this._paddingBottom=this._paddingLeft=this._gap=0;ma.call(this)};t["feathers.layout.HorizontalDistributedLayout"]=Pp;Pp.__name__="feathers.layout.HorizontalDistributedLayout";Pp.__interfaces__=[tj,kh];Pp.__super__=ma;Pp.prototype=I(ma.prototype,{_paddingTop:null,get_paddingTop:function(){return this._paddingTop},set_paddingTop:function(a){if(this._paddingTop==
a)return this._paddingTop;this._paddingTop=a;X.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;X.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;X.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;X.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;X.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;X.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;X.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;X.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(x.__implements(h,R)){var n=h;if(!n.get_includeInLayout())continue}x.__implements(h,ba)&&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(x.__implements(h,R)&&(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 Ng);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(!x.__implements(h,R)||h.get_includeInLayout()){x.__implements(h,ba)&&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],!x.__implements(f,R)||f.get_includeInLayout())x.__implements(f,ba)&&f.validateNow(),b+=f.get_width()+this._gap;h==null?h=new Ha(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(x.__implements(l,R)){var q=l;if(!q.get_includeInLayout())continue}x.__implements(l,ba)&&l.validateNow();l=x.__implements(l,tb)?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(x.__implements(l,R)&&(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);x.__implements(l,ba)&&l.validateNow()}},applyVerticalAlign:function(a,b){for(var c=0;c<a.length;){var d=a[c];++c;if(x.__implements(d,R)){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__:Pp,__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 Cg=function(){this._justifyResetEnabled=this._percentWidthResetEnabled=this._percentHeightResetEnabled=!1;this._verticalAlign=fc.TOP;this._horizontalAlign=Vb.LEFT;this._paddingTop=
this._paddingRight=this._paddingBottom=this._paddingLeft=this._gap=this._minGap=0;ma.call(this)};t["feathers.layout.HorizontalLayout"]=Cg;Cg.__name__="feathers.layout.HorizontalLayout";Cg.__interfaces__=[tj,kh];Cg.__super__=ma;Cg.prototype=I(ma.prototype,{_paddingTop:null,get_paddingTop:function(){return this._paddingTop},set_paddingTop:function(a){if(this._paddingTop==a)return this._paddingTop;this._paddingTop=a;X.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;X.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;X.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;X.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;X.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;X.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;X.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;X.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;X.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;X.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;X.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==fc.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,v=null;if(x.__implements(l,R)){var w=l;if(!w.get_includeInLayout())continue;w=w.get_layoutData();w=w instanceof lh?w:null;w!=null&&(q=w.get_percentWidth(),v=w.get_percentHeight())}g?n!=null?l.set_height(n):this._justifyResetEnabled&&x.__implements(l,tb)&&l.resetHeight():n!=null?v!=null&&(v<0?v=0:v>100&&(v=100),l.set_height(v/100*n)):v!=null&&this._percentHeightResetEnabled&&x.__implements(l,
tb)&&l.resetHeight();q!=null&&this._percentWidthResetEnabled&&h==null&&x.__implements(l,tb)&&l.resetWidth();x.__implements(l,ba)&&l.validateNow();g&&n==null&&b.maxHeight!=null&&(q=b.maxHeight-this._paddingTop-this._paddingBottom,l.get_height()>q&&(l.set_height(q),x.__implements(l,ba)&&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;w=null;if(x.__implements(l,R)){v=l;if(!v.get_includeInLayout())continue;w=v.get_layoutData();
w=w instanceof lh?w:null}x.__implements(l,ba)&&l.validateNow();w!=null&&w.get_marginLeft()!=null&&(g+=w.get_marginLeft());h<l.get_height()&&(h=l.get_height());l.set_x(g);g+=l.get_width()+d;w!=null&&w.get_marginRight()!=null&&(g+=w.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(x.__implements(l,R)&&(v=l,!v.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;v=n-this._paddingLeft-this._paddingRight;if(f=this._gap==1/0)d=this._minGap,a.length>1&&v>l&&(d+=(v-l)/(a.length-1)),d-=this._minGap;else{switch(this._horizontalAlign._hx_index){case 0:b=0;break;case 1:b=(v-l)/2;break;case 2:b=v-l;break;default:throw new Db("Unknown horizontal align: "+F.string(this._horizontalAlign));}b<0&&(b=0)}if(b!=0||d!=
0)for(f=0;f<a.length;){l=a[f];++f;if(x.__implements(l,R)&&(v=l,!v.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 Ng);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(!x.__implements(n,R)||n.get_includeInLayout()){x.__implements(n,
ba)&&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(!x.__implements(n,R)||n.get_includeInLayout())x.__implements(n,ba)&&n.validateNow(),b+=n.get_width()+c}h==null?h=new Ha(b,0,0,g):h.setTo(b,0,0,g);return h},validateItems:function(a,b){var c=this._verticalAlign==fc.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(x.__implements(h,R)){var q=h;if(!q.get_includeInLayout())continue;q=q.get_layoutData();q=q instanceof lh?q:null;q!=null&&(n=q.get_percentWidth(),l=q.get_percentHeight())}c?f!=null?h.set_height(f):this._justifyResetEnabled&&x.__implements(h,tb)&&h.resetHeight():f!=null?l!=null&&(l<0?l=0:l>100&&(l=100),h.set_height(l/100*f)):l!=null&&
this._percentHeightResetEnabled&&x.__implements(h,tb)&&h.resetHeight();n!=null&&this._percentWidthResetEnabled&&d==null&&x.__implements(h,tb)&&h.resetWidth();x.__implements(h,ba)&&h.validateNow();c&&f==null&&b.maxHeight!=null&&(n=b.maxHeight-this._paddingTop-this._paddingBottom,h.get_height()>n&&(h.set_height(n),x.__implements(h,ba)&&h.validateNow()))}},applyVerticalAlign:function(a,b,c){for(b=0;b<a.length;){var d=a[b];++b;if(x.__implements(d,R)){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 Db("Unknown horizontal align: "+F.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(x.__implements(c,R)){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 v=a[q];++q;if(x.__implements(v,
R)){var w=v;if(!w.get_includeInLayout())continue;var z=w.get_layoutData(),r=z instanceof lh?z:null;if(r!=null&&(z=r.get_percentWidth(),z!=null)){z<0&&(z=0);x.__implements(w,tb)&&(v=w,n+=v.get_minWidth());l+=z;r.get_marginLeft()!=null&&(h+=r.get_marginLeft());r.get_marginRight()!=null&&(h+=r.get_marginRight());h+=f;g.push(w);continue}}h+=v.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;)w=g[q],++q,r=x.__cast(w.get_layoutData(),lh),z=r.get_percentWidth(),z<0&&(z=0),r=d*z,x.__implements(w,tb)&&(v=w,v=v.get_explicitMinWidth(),v!=null&&v>a&&(v=a),r<v&&(r=v,a-=r,l-=z,U.remove(g,w),c=!0)),x.__cast(w,ka).set_width(r),x.__implements(w,ba)&&w.validateNow()},applyPercentHeight:function(a,b){b=b-this._paddingTop-this._paddingBottom;for(var c=0;c<a.length;){var d=a[c];++c;if(x.__implements(d,R)){var f=d;if(f.get_includeInLayout()&&(f=f.get_layoutData(),f=f instanceof
lh?f:null,f!=null&&(f=f.get_percentHeight(),f!=null))){f<0?f=0:f>100&&(f=100);f=b*f/100;if(x.__implements(d,tb)){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__:Cg,__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 lh=function(a,b){this._percentWidth=this._percentHeight=this._marginLeft=this._marginRight=null;ma.call(this);this.set_percentWidth(a);this.set_percentHeight(b)};t["feathers.layout.HorizontalLayoutData"]=lh;lh.__name__="feathers.layout.HorizontalLayoutData";lh.__interfaces__=[Np];lh.fill=function(){return new lh(100,100)};lh.fillHorizontal=function(a){a==null&&(a=100);return new lh(a,null)};
lh.fillVertical=function(a){a==null&&(a=100);return new lh(null,a)};lh.__super__=ma;lh.prototype=I(ma.prototype,{_percentWidth:null,get_percentWidth:function(){return this._percentWidth},set_percentWidth:function(a){if(this._percentWidth==a)return this._percentWidth;this._percentWidth=a;X.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;X.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;X.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;X.dispatch(this,"change");return this._marginRight},
__class__:lh,__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 Sj=function(){};t["feathers.layout.IKeyboardNavigationLayout"]=Sj;Sj.__name__="feathers.layout.IKeyboardNavigationLayout";Sj.__isInterface__=!0;Sj.__interfaces__=[kh];Sj.prototype={findNextKeyboardIndex:null,
__class__:Sj};var gf=function(){};t["feathers.layout.IScrollLayout"]=gf;gf.__name__="feathers.layout.IScrollLayout";gf.__isInterface__=!0;gf.__interfaces__=[kh];gf.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__:gf,__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 Xn=function(){};t["feathers.layout.ISnapLayout"]=Xn;Xn.__name__="feathers.layout.ISnapLayout";Xn.__isInterface__=!0;Xn.__interfaces__=[kh];Xn.prototype={getSnapPositionsX:null,getSnapPositionsY:null,__class__:Xn};var ci=function(){};t["feathers.layout.IVirtualLayout"]=ci;ci.__name__="feathers.layout.IVirtualLayout";ci.__isInterface__=!0;ci.__interfaces__=[gf];
ci.prototype={get_virtualCache:null,set_virtualCache:null,getVisibleIndices:null,__class__:ci,__properties__:{set_virtualCache:"set_virtualCache",get_virtualCache:"get_virtualCache"}};var Yi=function(a,b){this.start=a;this.end=b};t["feathers.layout.VirtualLayoutRange"]=Yi;Yi.__name__="feathers.layout.VirtualLayoutRange";Yi.prototype={start:null,end:null,__class__:Yi};var Ng=function(){this.reset()};t["feathers.layout.LayoutBoundsResult"]=Ng;Ng.__name__="feathers.layout.LayoutBoundsResult";Ng.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__:Ng};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:x.__implements(a,tb)?(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){x.__implements(a,tb)?(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 pa=Q["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}};pa.__constructs__=[pa.TOP,pa.RIGHT,pa.BOTTOM,pa.LEFT,pa.MANUAL];var lA={_new:function(a){return a},fromRelativePosition:function(a){return[a]}},fp=function(){this._fallbackFluidIndex=-1;this._horizontalAlign=Vb.JUSTIFY;
this._paddingTop=this._paddingRight=this._paddingBottom=this._paddingLeft=0;ma.call(this)};t["feathers.layout.VDividedBoxLayout"]=fp;fp.__name__="feathers.layout.VDividedBoxLayout";fp.__interfaces__=[kh];fp.__super__=ma;fp.prototype=I(ma.prototype,{_paddingTop:null,get_paddingTop:function(){return this._paddingTop},set_paddingTop:function(a){if(this._paddingTop==a)return this._paddingTop;this._paddingTop=a;X.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;X.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;X.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;X.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;X.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;X.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;X.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(!x.__implements(f,R)||f.get_includeInLayout()){if(this._customItemHeights!=null&&d<this._customItemHeights.length){var h=this._customItemHeights[d];h!=null&&f.set_height(h)}x.__implements(f,ba)&&f.validateNow();x.__implements(g,ba)&&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(!x.__implements(f,R)||
f.get_includeInLayout())x.__implements(g,ba)&&g.validateNow(),g!=null&&g.get_visible()&&(g.set_y(n),n+=g.get_height()),x.__implements(f,ba)&&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 Ng);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(!x.__implements(c,R)||c.get_includeInLayout()){if(this._customItemHeights!=null&&b<this._customItemHeights.length){var f=this._customItemHeights[b];f!=null&&c.set_height(f)}x.__implements(c,ba)&&c.validateNow();x.__implements(d,ba)&&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,v=-1,w=0;w<a.length;){var z=a[w],r=null;w>0&&(r=a[w-1]);if(x.__implements(z,R)&&!z.get_includeInLayout())q==w&&(q=-1);else{v=w;r!=null&&r.get_visible()&&(h+=r.get_height());r=Math.floor(w/2);var G=!0;this._customItemHeights!=null&&r<this._customItemHeights.length&&(r=this._customItemHeights[r],r!=null&&(G=!1,z.set_height(r),f.push(w),x.__implements(z,ba)&&z.validateNow()));if(G){G=100;if(x.__implements(z,
tb)){var J=z;z=J.get_explicitMinHeight();z!=null&&(n+=z)}l+=G;g.push(w)}else h+=z.get_height()}w+=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;w=b/l;w<0&&(w=0);for(c=0;c<g.length;)d=g[c],++c,z=a[d],G=100,r=Math.floor(w*G),J=null,x.__implements(z,tb)&&(J=z,J=J.get_explicitMinHeight()),J!=null&&(J>b&&(J=b),r<J&&(r=J,b-=r,l-=G,U.remove(g,d),h=!0)),z.set_height(r),x.__implements(z,ba)&&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||v<q)q=v;q!=-1&&(g=a[q],r=g.get_height()+b,r<0?(b=r,r=0,U.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(!x.__implements(d,R)||d.get_includeInLayout()){var f=b;if(x.__implements(d,tb)){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__:fp,__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 fc=Q["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}};fc.__constructs__=[fc.TOP,fc.MIDDLE,fc.BOTTOM,fc.JUSTIFY];var tf=function(){this._justifyResetEnabled=this._percentWidthResetEnabled=this._percentHeightResetEnabled=!1;this._verticalAlign=fc.TOP;this._horizontalAlign=Vb.LEFT;this._paddingTop=this._paddingRight=this._paddingBottom=this._paddingLeft=this._gap=this._minGap=0;ma.call(this)};t["feathers.layout.VerticalLayout"]=tf;tf.__name__="feathers.layout.VerticalLayout";
tf.__interfaces__=[tj,kh];tf.__super__=ma;tf.prototype=I(ma.prototype,{_paddingTop:null,get_paddingTop:function(){return this._paddingTop},set_paddingTop:function(a){if(this._paddingTop==a)return this._paddingTop;this._paddingTop=a;X.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;X.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;X.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;X.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;X.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;X.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;X.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;X.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;X.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;X.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;X.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==Vb.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,v=null;if(x.__implements(l,R)){var w=l;if(!w.get_includeInLayout())continue;w=w.get_layoutData();w=w instanceof ih?w:null;w!=null&&(q=w.get_percentWidth(),v=w.get_percentHeight())}g?h!=null?l.set_width(h):this._justifyResetEnabled&&x.__implements(l,tb)&&l.resetWidth():h!=null?q!=null&&(q<0?q=0:q>100&&(q=100),l.set_width(q/100*h)):q!=null&&this._percentWidthResetEnabled&&x.__implements(l,tb)&&l.resetWidth();v!=null&&this._percentHeightResetEnabled&&n==
null&&x.__implements(l,tb)&&l.resetHeight();x.__implements(l,ba)&&l.validateNow();g&&h==null&&b.maxWidth!=null&&(q=b.maxWidth-this._paddingLeft-this._paddingRight,l.get_width()>q&&(l.set_width(q),x.__implements(l,ba)&&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;w=null;if(x.__implements(l,R)){v=l;if(!v.get_includeInLayout())continue;w=v.get_layoutData();w=w instanceof ih?w:null}x.__implements(l,ba)&&l.validateNow();
g<l.get_width()&&(g=l.get_width());w!=null&&w.get_marginTop()!=null&&(h+=w.get_marginTop());l.set_y(h);h+=l.get_height()+d;w!=null&&w.get_marginBottom()!=null&&(h+=w.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(x.__implements(l,R)&&(v=l,!v.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;v=q-this._paddingTop-this._paddingBottom;if(f=this._gap==1/0)d=this._minGap,a.length>1&&v>l&&(d+=(v-l)/(a.length-1)),d-=this._minGap;else{switch(this._verticalAlign._hx_index){case 0:b=0;break;case 1:b=(v-l)/2;break;case 2:b=v-l;break;default:throw new Db("Unknown vertical align: "+F.string(this._verticalAlign));}b<0&&(b=0)}if(b!=0||d!=0)for(f=0;f<a.length;){l=a[f];++f;if(x.__implements(l,R)&&(v=l,!v.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 Ng);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(!x.__implements(n,R)||n.get_includeInLayout()){x.__implements(n,ba)&&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(!x.__implements(n,R)||n.get_includeInLayout())x.__implements(n,ba)&&n.validateNow(),b+=n.get_height()+c}h==null?h=new Ha(0,b,f,0):h.setTo(0,b,f,0);return h},validateItems:function(a,b){var c=this._horizontalAlign==Vb.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(x.__implements(h,R)){var q=h;if(!q.get_includeInLayout())continue;q=q.get_layoutData();q=q instanceof ih?q:null;q!=null&&(n=q.get_percentWidth(),l=q.get_percentHeight())}c?d!=null?h.set_width(d):this._justifyResetEnabled&&x.__implements(h,tb)&&h.resetWidth():d!=null?n!=null&&(n<0?n=0:n>100&&(n=100),h.set_width(n/100*d)):n!=null&&this._percentWidthResetEnabled&&x.__implements(h,tb)&&h.resetWidth();l!=null&&this._percentHeightResetEnabled&&f==null&&
x.__implements(h,tb)&&h.resetHeight();x.__implements(h,ba)&&h.validateNow();c&&d==null&&b.maxWidth!=null&&(n=b.maxWidth-this._paddingLeft-this._paddingRight,h.get_width()>n&&(h.set_width(n),x.__implements(h,ba)&&h.validateNow()))}},applyHorizontalAlign:function(a,b,c){for(b=0;b<a.length;){var d=a[b];++b;if(x.__implements(d,R)){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 Db("Unknown vertical align: "+F.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(x.__implements(c,R)){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(x.__implements(d,R)){var f=d;if(f.get_includeInLayout()&&(f=f.get_layoutData(),
f=f instanceof ih?f:null,f!=null&&(f=f.get_percentWidth(),f!=null))){f<0?f=0:f>100&&(f=100);f=b*f/100;if(x.__implements(d,tb)){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 v=a[q];++q;if(x.__implements(v,R)){var w=v;if(!w.get_includeInLayout())continue;var z=w.get_layoutData(),r=z instanceof ih?z:null;if(r!=null&&(z=r.get_percentHeight(),
z!=null)){z<0&&(z=0);x.__implements(w,tb)&&(v=w,n+=v.get_minHeight());l+=z;r.get_marginTop()!=null&&(h+=r.get_marginTop());r.get_marginBottom()!=null&&(h+=r.get_marginBottom());h+=f;g.push(w);continue}}h+=v.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;)w=g[q],++q,r=x.__cast(w.get_layoutData(),ih),z=r.get_percentHeight(),z<0&&(z=0),r=d*z,x.__implements(w,
tb)&&(v=w,v=v.get_explicitMinHeight(),v!=null&&v>a&&(v=a),r<v&&(r=v,a-=r,l-=z,U.remove(g,w),c=!0)),x.__cast(w,ka).set_height(r),x.__implements(w,ba)&&w.validateNow()},__class__:tf,__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 ih=function(a,b){this._percentWidth=this._percentHeight=this._marginTop=this._marginBottom=null;ma.call(this);this.set_percentWidth(a);this.set_percentHeight(b)};t["feathers.layout.VerticalLayoutData"]=ih;ih.__name__="feathers.layout.VerticalLayoutData";ih.__interfaces__=[Np];ih.fill=function(){return new ih(100,100)};ih.fillHorizontal=function(a){a==null&&(a=100);return new ih(a,null)};ih.fillVertical=function(a){a==null&&(a=100);return new ih(null,a)};ih.__super__=ma;ih.prototype=I(ma.prototype,
{_percentWidth:null,get_percentWidth:function(){return this._percentWidth},set_percentWidth:function(a){if(this._percentWidth==a)return this._percentWidth;this._percentWidth=a;X.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;X.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;X.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;X.dispatch(this,"change");return this._marginBottom},__class__:ih,__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 Fh=function(){this._widthResetEnabled=!0;this._contentJustify=!1;this._verticalAlign=fc.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;ma.call(this)};t["feathers.layout.VerticalListLayout"]=
Fh;Fh.__name__="feathers.layout.VerticalListLayout";Fh.__interfaces__=[tj,Sj,ci];Fh.__super__=ma;Fh.prototype=I(ma.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;X.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;X.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;X.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;X.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;X.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;X.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;X.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;X.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;X.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;X.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;X.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;X.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 v=f++,w=a[v];if(w==null)w=n,this._virtualCache!=null&&(v=this._virtualCache[v],v=v instanceof mh?v:null,v!=null&&v.itemHeight!=null&&(w=v.itemHeight)),l+=w+d;else if(!x.__implements(w,R)||w.get_includeInLayout()){w.set_x(this._paddingLeft);
w.set_y(l);w.set_width(g);x.__implements(w,ba)&&w.validateNow();w=w.get_height();if(this._virtualCache!=null&&(v=this._virtualCache[v],v=v instanceof mh?v:null,v!=null&&(v.itemHeight==null||v.itemHeight!=w))){var z=v.itemHeight;v.itemHeight=w;z==null&&l<this.get_scrollY()&&Kd.dispatch(this,"scroll",!1,!1,0,w-n);z==null&&w==n||X.dispatch(this,"change")}l+=w+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));w=l-this._paddingTop-this._paddingBottom;b=v=0;z=q-this._paddingTop-this._paddingBottom;
if(f=this._gap==1/0)b=this._minGap,a.length>1&&z>w&&(b+=(z-w)/(a.length-1)),b-=this._minGap;else{switch(this._verticalAlign._hx_index){case 0:v=0;break;case 1:v=(z-w)/2;break;case 2:v=z-w;break;default:throw new Db("Unknown vertical align: "+F.string(this._verticalAlign));}v<0&&(v=0)}if(v!=0||b!=0)for(f=0;f<a.length;){w=a[f];++f;if(x.__implements(w,R)&&(z=w,!z.get_includeInLayout()))continue;w!=null&&w.set_y(Math.max(this._paddingTop,w.get_y()+v));v+=b}c==null&&(c=new Ng);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 mh?n:null;if(n!=null){g=n.itemWidth;c<g&&(c=g);continue}}if(h!=null&&
(!x.__implements(h,R)||h.get_includeInLayout())&&(this._widthResetEnabled&&b.width==null&&x.__implements(h,tb)&&h.resetWidth(),x.__implements(h,ba)&&h.validateNow(),n=h.get_width(),c<n&&(c=n),this._virtualCache!=null)){var l=this._virtualCache[g];l=l instanceof mh?l:null;l==null&&(x.__implements(h,ba)&&h.validateNow(),l=new mh(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 mh?f:null;if(f==null||f.itemHeight==null)continue;return f.itemHeight}if(!x.__implements(g,R)||g.get_includeInLayout())return g.set_width(b),x.__implements(g,ba)&&g.validateNow(),a=g.get_height(),this._virtualCache!=null&&(b=this._virtualCache[f],
b=b instanceof mh?b:null,b==null||b.itemHeight!=null&&b.itemHeight==a||(b.itemHeight=a,X.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,v=l+c,w=0,z=0;z<a;){var r=z++,G=0;if(this._virtualCache!=null){var J=this._virtualCache[r];J=J instanceof mh?J:null;if(J!=null&&J.itemHeight!=null){if(G=J.itemHeight,h==null&&(h=G,q=Math.ceil(c/(h+b))+1,w>0)){for(J=
0;J<w;){var L=J++;n+=h+b;f==-1&&n>=l&&(f=L);if(f!=-1&&(g=L,n>=v&&g-f+1>=q))break}w=0}}else if(h!=null)G=h;else{if(w<5){++w;continue}g=f=0;break}}n+=G+b;f==-1&&n>=l&&(f=r);if(f!=-1&&(g=r,n>=v&&g-f+1>=q))break}f==-1&&this._verticalAlign!=fc.TOP&&(g=f=a-1);if((n<v||g-f+1<q)&&f>0){do if(--f,G=0,this._virtualCache!=null&&(J=this._virtualCache[f],J=J instanceof mh?J:null,J!=null&&J.itemHeight!=null?(G=J.itemHeight,h==null&&(h=G,q=Math.ceil(c/(h+b))+1)):h!=null&&(G=h)),n+=G+b,n>=v&&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 Yi(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 v=q++,w=0;if(this._virtualCache!=null){var z=this._virtualCache[v];z=z instanceof mh?z:null;z!=null&&z.itemHeight!=null?(w=z.itemHeight,h==null&&(h=w)):h!=null&&(w=h)}if(v==a){n=l;c=n+w-d;break}l+=w+g}a=this._scrollY;a<c?a=c:a>n&&(a=n);f==null&&(f=new Ca);
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 mh?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],v=0;q==null?this._virtualCache!=null&&(l=this._virtualCache[l],l=l instanceof mh?l:null,l!=null&&l.itemHeight!=null?(v=l.itemHeight,b==null&&(b=v)):b!=null&&(v=b)):v=q.get_height();d+=v+c}h==null?h=new Ha(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 v=l++;if(this._virtualCache!=
null){var w=this._virtualCache[v];w=w instanceof mh?w:null;if(w!=null&&w.itemHeight!=null){var z=w.itemHeight;if(n==null){n=z;break}}}}var r=d.length-1,G=a;if(G==-1){switch(b.keyCode){case 38:G=c?r:-1;break;case 40:G=0;break;default:G=-1}if(G==-1||f==null||f.indexOf(G)==-1)return G}var J=!0;l=b.keyCode;for(b=G;J;){J=!1;switch(l){case 33:l=0;for(v=a;v>=0;){q=d[v];z=n;q==null?this._virtualCache!=null&&(w=this._virtualCache[v],w=w instanceof mh?w:null,w!=null&&w.itemHeight!=null&&(z=w.itemHeight)):z=
q.get_height();l+=z;if(f!=null&&f.indexOf(v)!=-1)l+=g;else{if(l>h)break;l+=g;G=v}--v}l=38;break;case 34:v=0;l=a;for(q=d.length;l<q;){z=l++;var L=d[z];w=n;L==null?this._virtualCache!=null&&(L=this._virtualCache[z],L=L instanceof mh?L:null,L!=null&&L.itemHeight!=null&&(w=L.itemHeight)):w=L.get_height();v+=w;if(f!=null&&f.indexOf(z)!=-1)v+=g;else{if(v>h)break;v+=g;G=z}}l=40;break;case 35:for(q=r;q>a;){if(f==null||f.indexOf(q)==-1){G=q;break}--q}break;case 36:q=0;for(v=a;q<v;)if(z=q++,f==null||f.indexOf(z)==
-1){G=z;break}break;case 38:--G;break;case 40:++G;break;default:return a}G<0?G=c?r:0:G>r&&(G=c?0:r);if(f!=null&&f.indexOf(G)!=-1){if(G==b)return a;J=!0}b=G}return G},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 Db("Unknown vertical align: "+F.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(x.__implements(c,R)){var g=c;if(!g.get_includeInLayout())continue}c!=null&&c.set_y(Math.max(this._paddingTop,c.get_y()+b));b+=f}},__class__:Fh,__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 mh=function(a,b){this.itemWidth=a;this.itemHeight=b};t["feathers.layout._VerticalListLayout.VirtualCacheItem"]=
mh;mh.__name__="feathers.layout._VerticalListLayout.VirtualCacheItem";mh.prototype={itemWidth:null,itemHeight:null,__class__:mh};var Nm=function(){};t["feathers.motion.effects.IEffectContext"]=Nm;Nm.__name__="feathers.motion.effects.IEffectContext";Nm.__isInterface__=!0;Nm.__interfaces__=[Fb];Nm.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__:Nm,__properties__:{set_position:"set_position",
get_position:"get_position",get_duration:"get_duration",get_target:"get_target"}};var Wl=function(a){ma.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"]=Wl;Wl.__name__="feathers.motion.effects.BaseDelegateEffectContext";Wl.__interfaces__=[Nm];Wl.__super__=ma;
Wl.prototype=I(ma.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){X.dispatch(this,"change")},baseDelegateEffectContext_context_completeHandler:function(a){X.dispatch(this,"complete")},__class__:Wl,__properties__:{set_position:"set_position",get_position:"get_position",get_duration:"get_duration",get_target:"get_target",get_context:"get_context"}});var Xl=function(a,b,c){this._playing=
this._reversed=!1;this._duration=this._position=0;ma.call(this);this._target=a;this._duration=b;this._ease=c};t["feathers.motion.effects.BaseEffectContext"]=Xl;Xl.__name__="feathers.motion.effects.BaseEffectContext";Xl.__interfaces__=[Nm];Xl.__super__=ma;Xl.prototype=I(ma.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();X.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&&(xa.stop(this._animatePlayback,null,!1,!1),this._animatePlayback=null),this._playing=!0,this._reversed=!1,this._animatePlayback=xa.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&&(xa.stop(this._animatePlayback,null,!1,!1),this._animatePlayback=null),this._reversed=this._playing=!0,this._animatePlayback=xa.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&&(xa.stop(this._animatePlayback,null,!1,!1),this._animatePlayback=null),this._playing=!1)},stop:function(){this.pause();this.cleanupEffect();X.dispatch(this,"complete")},toEnd:function(){this.pause();this._position=1;this.cleanupEffect();X.dispatch(this,"complete")},interrupt:function(){this.toEnd()},prepareEffect:function(){},updateEffect:function(){},cleanupEffect:function(){},animatePlayback_onComplete:function(){this._animatePlayback=
null;this.cleanupEffect();X.dispatch(this,"complete")},__class__:Xl,__properties__:{get_ease:"get_ease",set_position:"set_position",get_position:"get_position",get_duration:"get_duration",get_target:"get_target"}});var Cx=Q["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}};Cx.__constructs__=[Cx.END,Cx.STOP];var Ul=function(a,b,c,d){this._paused=!0;Wl.call(this,a);this.set_callback(d);this.set_eventType(c);this.set_dispatcher(b)};t["feathers.motion.effects.EventToPositionEffectContext"]=Ul;Ul.__name__="feathers.motion.effects.EventToPositionEffectContext";Ul.__super__=Wl;Ul.prototype=I(Wl.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__:Ul,__properties__:I(Wl.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 Hp=function(a){this._duration=this._position=0;ma.call(this);this._target=a};t["feathers.motion.effects.NoOpEffectContext"]=Hp;Hp.__name__="feathers.motion.effects.NoOpEffectContext";Hp.__interfaces__=[Nm];Hp.__super__=
ma;Hp.prototype=I(ma.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 xe("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(){X.dispatch(this,"complete")},interrupt:function(){this.toEnd()},
__class__:Hp,__properties__:{set_position:"set_position",get_position:"get_position",get_duration:"get_duration",get_target:"get_target"}});var Kt=function(a,b,c){c==null&&(c=Cx.END);this._actuator=b;this.interruptBehavior=c;b=this._actuator.getEase();this._actuator.ease(qg.get_easeNone());this._onComplete=this._actuator.getOnComplete();this._onCompleteParams=this._actuator.getOnCompleteParams();this._actuator.onComplete(null,null);a==null&&(a=this._actuator.getTarget());Xl.call(this,a,this._actuator.getDuration(),
b)};t["feathers.motion.effects.actuate.ActuateEffectContext"]=Kt;Kt.__name__="feathers.motion.effects.actuate.ActuateEffectContext";Kt.__super__=Xl;Kt.prototype=I(Xl.prototype,{_actuator:null,get_actuator:function(){return this._actuator},interruptBehavior:null,_onComplete:null,_onCompleteParams:null,interrupt:function(){this.interruptBehavior==Cx.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__:Kt,__properties__:I(Xl.prototype.__properties__,{get_actuator:"get_actuator"})});var Dx=function(){};t["feathers.motion.effects.actuate.ActuateForEffects"]=Dx;Dx.__name__="feathers.motion.effects.actuate.ActuateForEffects";Dx.tween=function(a,b,c,d){d==null&&(d=!0);a=xa.tween(a,b,c,d,Qp);return x.__cast(a,Yl)};Dx.update=function(a,b,c,d,f){f==null&&(f=!0);a=xa.tween(a,b,{start:c,end:d},f,Rp);return x.__cast(a,
Yl)};var fl=function(){};t["motion.actuators.IGenericActuator"]=fl;fl.__name__="motion.actuators.IGenericActuator";fl.__isInterface__=!0;fl.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__:fl};var Sp=function(){};t["feathers.motion.effects.actuate.IGotoActuator"]=Sp;Sp.__name__="feathers.motion.effects.actuate.IGotoActuator";
Sp.__isInterface__=!0;Sp.__interfaces__=[fl];Sp.prototype={goto:null,__class__:Sp};var Yl=function(){};t["feathers.motion.effects.actuate.IReadableGenericActuator"]=Yl;Yl.__name__="feathers.motion.effects.actuate.IReadableGenericActuator";Yl.__isInterface__=!0;Yl.__interfaces__=[Sp,fl];Yl.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__:Yl};var rk=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=xa.defaultEase};t["motion.actuators.GenericActuator"]=rk;rk.__name__="motion.actuators.GenericActuator";rk.__interfaces__=
[fl];rk.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=u.fields(this.properties);a<b.length;){var c=b[a];++a;Object.prototype.hasOwnProperty.call(this.target,
c)?this.target[c]=u.field(this.properties,c):u.setProperty(this.target,c,u.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)}xa.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__:rk};var Vd=function(a,b,c){this.active=!0;this.propertyDetails=[];this.toggleVisible=this.setVisible=this.initialized=this.cacheVisible=this.paused=this.sendChange=!1;this.startTime=La.getTimer()/1E3;rk.call(this,a,b,c);Vd.addedEvent||
(Vd.addedEvent=!0,La.get_current().stage.addEventListener("enterFrame",Vd.stage_onEnterFrame))};t["motion.actuators.SimpleActuator"]=Vd;Vd.__name__="motion.actuators.SimpleActuator";Vd.stage_onEnterFrame=function(a){a=La.getTimer()/1E3;for(var b,c=0,d=0,f=Vd.actuatorsLength;d<f;)d++,b=Vd.actuators[c],b!=null&&b.active?(a>=b.timeOffset&&b.update(a),++c):(Vd.actuators.splice(c,1),--Vd.actuatorsLength)};Vd.__super__=rk;Vd.prototype=I(rk.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=rk.prototype.reverse.call(this,a);var b=La.getTimer()/1E3;this.update(b);return a},apply:function(){rk.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")?u.field(a,"visible"):u.getProperty(a,"visible");b!=null&&(a=
this.target,b=u.field(this.properties,"alpha")>0,!Object.prototype.hasOwnProperty.call(a,"visible")||a.__properties__&&a.__properties__.set_visible?u.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?u.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)?u.field(a,b):u.getProperty(a,b)},initialize:function(){for(var a,b=0,c=u.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=u.getProperty(this.target,d)):a=u.field(this.target,d);if(typeof a=="number"){var g=this.properties;g=Object.prototype.hasOwnProperty.call(g,
d)?u.field(g,d):u.getProperty(g,d);a==null&&(a=0);g==null&&(g=0);a=new Wj(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 ka;if(this.toggleVisible&&this.properties.alpha!=0){var a=this.target;var b=Object.prototype.hasOwnProperty.call(a,"visible")?u.field(a,"visible"):u.getProperty(a,"visible");a=!b}else a=
!1;a&&(this.setVisible=!0,a=this.target,this.cacheVisible=b=Object.prototype.hasOwnProperty.call(a,"visible")?u.field(a,"visible"):u.getProperty(a,"visible"),a=this.target,b=!0,!Object.prototype.hasOwnProperty.call(a,"visible")||a.__properties__&&a.__properties__.set_visible?u.setProperty(a,"visible",b):a.visible=b);this.timeOffset=this.startTime;Vd.actuators.push(this);++Vd.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,rk.prototype.pause.call(this),this.pauseTime=La.getTimer())},resume:function(){this.paused&&(this.paused=!1,this.timeOffset+=(La.getTimer()-this.pauseTime)/1E3,rk.prototype.resume.call(this))},setField:function(a,b,c){!Object.prototype.hasOwnProperty.call(a,b)||a.__properties__&&a.__properties__["set_"+b]?u.setProperty(a,b,c):a[b]=c},setProperty:function(a,b){a.isField?a.target[a.propertyName]=b:u.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=u.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")?u.field(a,"alpha"):u.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?u.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__:Vd});var Om=function(a,b,c){this.currentParameters=[];this.tweenProperties={};Vd.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"]=
Om;Om.__name__="motion.actuators.MethodActuator";Om.__super__=Vd;Om.prototype=I(Vd.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]=u.field(this.tweenProperties,"param"+d)}b=this.target;c=this.currentParameters;c==null&&(c=[]);b.apply(b,c)}Vd.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 Wj(this.tweenProperties,a,b,this.properties.end[f]-b),this.propertyDetails.push(a)}this.detailsLength=this.propertyDetails.length;this.initialized=!0},update:function(a){Vd.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]=u.field(this.tweenProperties,"param"+c)}a=this.target;b=this.currentParameters;b==null&&(b=[]);a.apply(a,b)}},__class__:Om});var Rp=function(a,b,c){Om.call(this,a,b,c)};t["feathers.motion.effects.actuate.MethodEffectActuator"]=Rp;Rp.__name__="feathers.motion.effects.actuate.MethodEffectActuator";Rp.__interfaces__=[Yl];Rp.__super__=Om;Rp.prototype=I(Om.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]=
u.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")?u.field(a,"alpha"):u.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?
u.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__:Rp});var Qp=function(a,b,c){Vd.call(this,a,b,c)};t["feathers.motion.effects.actuate.SimpleEffectActuator"]=Qp;Qp.__name__="feathers.motion.effects.actuate.SimpleEffectActuator";
Qp.__interfaces__=[Yl];Qp.__super__=Vd;Qp.prototype=I(Vd.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")?u.field(a,"alpha"):u.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?u.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__:Qp});var wj=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"]=wj;wj.__name__="feathers.motion.transitions.SlideTransitionBuilder";wj.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 xe("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 Db(wj.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 v=0,w=0;if(b>=0&&b<45){v=l;var z=l/Math.cos(b*Math.PI/180);w=-Math.sqrt(z*z-l*l)}else b>=45&&b<90?(w=-q,z=q/Math.sin(b*Math.PI/180),v=Math.sqrt(z*z-q*q)):b>=90&&b<135?(w=-q,z=q/Math.cos((b-90)*Math.PI/180),v=-Math.sqrt(z*z-q*q)):b>=135&&b<180?(v=-l,z=l/Math.sin((b-90)*Math.PI/180),w=-Math.sqrt(z*z-l*l)):b>=180&&b<225?(v=-l,z=l/Math.cos((b-180)*
Math.PI/180),w=Math.sqrt(z*z-l*l)):b>=225&&b<270?(w=q,z=q/Math.sin((b-180)*Math.PI/180),v=-Math.sqrt(z*z-q*q)):b>=270&&b<315?(w=q,z=q/Math.cos((b-270)*Math.PI/180),v=Math.sqrt(z*z-q*q)):(v=l,z=l/Math.sin((b-270)*Math.PI/180),w=Math.sqrt(z*z-l*l));h!=null&&(h.set_x(-v),h.set_y(-w));n!=null&&g!=null&&h!=null&&(l=n.getChildIndex(g),q=n.getChildIndex(h),l>q&&n.swapChildren(g,h));n=Dx.update(function(r,G){g!=null&&(g.set_x(r*a._parallax),g.set_y(G*a._parallax));h!=null&&(h.set_x(r-v),h.set_y(G-w))},c,
[0,0],[v,w]);d!=null&&n.ease(d);xa.pause(n);return new Kt(null,n,f)}},__class__:wj};var Ei=function(a,b){De.call(this,a,b)};t["feathers.skins.CircleSkin"]=Ei;Ei.__name__="feathers.skins.CircleSkin";Ei.__super__=De;Ei.prototype=I(De.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__:Ei});var Dm=function(){};
t["feathers.skins.IIndeterminateSkin"]=Dm;Dm.__name__="feathers.skins.IIndeterminateSkin";Dm.__isInterface__=!0;Dm.__interfaces__=[sb];Dm.prototype={get_indeterminatePosition:null,set_indeterminatePosition:null,__class__:Dm,__properties__:{set_indeterminatePosition:"set_indeterminatePosition",get_indeterminatePosition:"get_indeterminatePosition"}};var Pm=function(a){Dh.call(this);this.mouseChildren=!1;this.set_defaultView(a)};t["feathers.skins.MultiSkin"]=Pm;Pm.__name__="feathers.skins.MultiSkin";
Pm.__super__=Dh;Pm.prototype=I(Dh.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(y.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(y.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(y.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(y.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:(x.__implements(this._currentView,Ea)&&this._currentView.initializeNow(),this._currentViewMeasurements==null?this._currentViewMeasurements=new Sb(this._currentView):
this._currentViewMeasurements.save(this._currentView),x.__implements(this._currentView,sb)&&this._currentView.set_uiContext(this._uiContext),x.__implements(this._currentView,ge)&&this._currentView.set_stateContext(this._stateContext),this.addChild(this._currentView)))},removeCurrentView:function(a){a!=null&&(x.__implements(a,sb)&&a.set_uiContext(null),x.__implements(a,ge)&&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&&x.__implements(this._uiContext,Bh)&&(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&&x.__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;x.__implements(this._currentView,tb)&&(h=this._currentView);x.__implements(this._currentView,ba)&&
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__:Pm,__properties__:I(Dh.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 Lt=function(a,b,c){c==null&&(c=uj.HORIZONTAL);De.call(this,a,b);this._capDirection=c};t["feathers.skins.PillSkin"]=Lt;Lt.__name__="feathers.skins.PillSkin";Lt.__super__=De;Lt.prototype=I(De.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(y.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()==uj.VERTICAL?this.actualWidth:this.actualHeight;this.get_graphics().drawRoundRect(a,a,c,b,d)},__class__:Lt,__properties__:I(De.prototype.__properties__,{set_capDirection:"set_capDirection",get_capDirection:"get_capDirection"})});
var Fi=function(a,b,c){c==null&&(c=0);this._cornerRadius=0;this._drawBaseBorder=!0;this._cornerRadiusPosition=pa.TOP;De.call(this,a,b);this._cornerRadius=c};t["feathers.skins.TabSkin"]=Fi;Fi.__name__="feathers.skins.TabSkin";Fi.__super__=De;Fi.prototype=I(De.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(y.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(y.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(y.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 Db("Tab cornerRadiusPosition not supported: "+F.string(this._cornerRadiusPosition));}},__class__:Fi,__properties__:I(De.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 Nf=function(a,b){this._drawBaseBorder=!0;this._pointPosition=pa.TOP;De.call(this,a,b)};t["feathers.skins.TriangleSkin"]=Nf;Nf.__name__="feathers.skins.TriangleSkin";Nf.__super__=De;Nf.prototype=I(De.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(y.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(y.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 Db("Triangle pointPosition not supported: "+F.string(this._pointPosition));}},__class__:Nf,
__properties__:I(De.prototype.__properties__,{set_drawBaseBorder:"set_drawBaseBorder",get_drawBaseBorder:"get_drawBaseBorder",set_pointPosition:"set_pointPosition",get_pointPosition:"get_pointPosition"})});var Zl=function(a,b){De.call(this,a,b)};t["feathers.skins.UnderlineSkin"]=Zl;Zl.__name__="feathers.skins.UnderlineSkin";Zl.__super__=De;Zl.prototype=I(De.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__:Zl});var Tp=function(a,b){this._paddingTop=this._paddingBottom=0;this._horizontalAlign=Vb.CENTER;De.call(this,a,b)};t["feathers.skins.VerticalLineSkin"]=Tp;Tp.__name__=
"feathers.skins.VerticalLineSkin";Tp.__super__=De;Tp.prototype=I(De.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(y.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(y.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(y.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 Db("Unknown horizontal align: "+F.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__:Tp,__properties__:I(De.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 Up=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;Dh.call(this)};t["feathers.skins.activity.DotsActivitySkin"]=Up;Up.__name__="feathers.skins.activity.DotsActivitySkin";Up.__interfaces__=[Dm];Up.__super__=
Dh;Up.prototype=I(Dh.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(y.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(y.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(y.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(y.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(y.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(y.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(y.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(y.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(y.STYLES);return this._endDotAlpha},update:function(){var a=this.isInvalid(y.DATA),
b=this.isInvalid(y.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++,v=Ca.polar(a-g,-q*2*Math.PI/this._numDots+d*Math.PI/180),w=q/(this._numDots-h);q=this._dotColor;this._endDotColor!=null&&this._endDotColor!=this._dotColor&&(q=this.blendColors(this._dotColor,this._endDotColor,w));var z=this._dotAlpha-(this._dotAlpha-this._endDotAlpha)*w;this.get_dotRadius();w=this.get_dotRadius()-(this.get_dotRadius()-f)*w;this.get_graphics().beginFill(q,z);this.get_graphics().drawCircle(b+v.x,c+v.y,w);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__:Up,__properties__:I(Dh.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 Vp=function(){};t["feathers.style.IStyleProvider"]=Vp;Vp.__name__="feathers.style.IStyleProvider";Vp.__isInterface__=!0;Vp.__interfaces__=[Fb];Vp.prototype={applyStyles:null,__class__:Vp};var Ll=function(){ma.call(this)};t["feathers.style.ClassVariantStyleProvider"]=
Ll;Ll.__name__="feathers.style.ClassVariantStyleProvider";Ll.__interfaces__=[Vp];Ll.__super__=ma;Ll.prototype=I(ma.prototype,{styleTargets:null,setStyleFunction:function(a,b,c){var d=this;this.styleTargets==null&&(this.styleTargets=new cf);a=a.__name__;b=b==null?bo.Class(a):bo.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||u.compare(c,a)==0)return;this.styleTargets.set(b,c)}Ch.dispatch(this,"stylesChange",
function(f){var g=d.getStyleContext(f);f=d.getVariant(f);g=d.getStyleFunctionInternal(g,f,!1);return c!=g?u.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;x.__implements(a,kd)&&(b=a.get_styleContext());b==null&&(b=x.getClass(a));return b},getVariant:function(a){var b=
null;x.__implements(a,kd)&&(b=a.get_variant());return b},getStyleFunctionInternal:function(a,b,c){if(this.styleTargets==null)return null;a=a.__name__;b=b==null?bo.Class(a):bo.ClassAndVariant(a,b);b=this.styleTargets.get(b);return b!=null||c?b:this.styleTargets.get(bo.Class(a))},__class__:Ll});var bo=Q["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)};bo.__constructs__=[bo.Class,bo.ClassAndVariant];var ac=function(){};t["feathers.style.Theme"]=ac;ac.__name__="feathers.style.Theme";ac.__properties__={get_fallbackTheme:"get_fallbackTheme"};ac.get_fallbackTheme=function(){ac._fallbackTheme==
null&&(ac._fallbackTheme=new Mt);return ac._fallbackTheme};ac.setTheme=function(a,b,c){c==null&&(c=!0);var d=null;if(b==null)d=ac.primaryTheme,ac.primaryTheme=a;else if(ac.roots==null){ac.roots=[b];var f=new Ta;f.set(b,a);ac.rootToTheme=f}else d=ac.rootToTheme.h[b.__id__],d==null&&ac.roots.push(b),ac.rootToTheme.set(b,a);d!=null&&c&&d.dispose()};ac.getTheme=function(a){if(a instanceof ka){for(var b=a;b!=null;){if(x.__implements(b,Dd)&&!b.get_themeEnabled())return null;b=b.parent}if(ac.roots!=null){b=
0;for(var c=ac.roots;b<c.length;){var d=c[b];++b;if(d.contains(a))return ac.rootToTheme.h[d.__id__]}}}else if(a!=null&&!a.get_themeEnabled())return null;return ac.primaryTheme!=null?ac.primaryTheme:ac.get_fallbackTheme()};var ui=function(a,b,c,d,f,g,h,n,l,q,v,w,z){ma.call(this);this._textFormat=new ef(a,b,c,d,f,g,h,n,l,q,v,w,z)};t["feathers.text.TextFormat"]=ui;ui.__name__="feathers.text.TextFormat";ui.__super__=ma;ui.prototype=I(ma.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=tg.clone(this._textFormat);this._textFormat.set_font(a);X.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=tg.clone(this._textFormat);this._textFormat.set_size(a);X.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=tg.clone(this._textFormat);this._textFormat.color=a;X.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=tg.clone(this._textFormat);this._textFormat.set_bold(a);X.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=tg.clone(this._textFormat);this._textFormat.set_italic(a);X.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=tg.clone(this._textFormat);this._textFormat.underline=a;X.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=tg.clone(this._textFormat);this._textFormat.url=a;X.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=tg.clone(this._textFormat);this._textFormat.target=a;X.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=tg.clone(this._textFormat);this._textFormat.align=a;X.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=tg.clone(this._textFormat);this._textFormat.leftMargin=a;X.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=tg.clone(this._textFormat);this._textFormat.rightMargin=a;X.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=
tg.clone(this._textFormat);this._textFormat.indent=a;X.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=tg.clone(this._textFormat);this._textFormat.leading=a;X.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=tg.clone(this._textFormat);this._textFormat.blockIndent=a;X.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=tg.clone(this._textFormat);this._textFormat.bullet=a;X.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=tg.clone(this._textFormat);this._textFormat.kerning=a;X.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=tg.clone(this._textFormat);this._textFormat.letterSpacing=a;X.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=tg.clone(this._textFormat);this._textFormat.tabStops=a;X.dispatch(this,"change");return this._textFormat.tabStops},clone:function(){var a=new ui(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__:ui,__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 Mt=function(a,b){wc.call(this,a,b)};t["feathers.themes.steel.DefaultSteelTheme"]=Mt;Mt.__name__="feathers.themes.steel.DefaultSteelTheme";Mt.__super__=wc;Mt.prototype=I(wc.prototype,{__class__:Mt});var zw=function(){};t["feathers.themes.steel.components.SteelActivityIndicatorStyles"]=
zw;zw.__name__="feathers.themes.steel.components.SteelActivityIndicatorStyles";zw.initialize=function(a){if(a==null){var b=ac.get_fallbackTheme();a=b instanceof wc?b:null}a!=null&&(b=a.styleProvider,b.getStyleFunction(np,null)==null&&b.setStyleFunction(np,null,function(c){if(c.get_activitySkin()==null){var d=new Up;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 Aw=function(){};t["feathers.themes.steel.components.SteelAlertStyles"]=Aw;Aw.__name__="feathers.themes.steel.components.SteelAlertStyles";Aw.initialize=function(a){if(a==null){var b=ac.get_fallbackTheme();a=b instanceof wc?b:null}a!=null&&(b=a.styleProvider,b.getStyleFunction(Hd,null)==null&&b.setStyleFunction(Hd,null,function(c){var d=pc.isDesktop();c.set_autoHideScrollBars(!d);c.set_fixedScrollBars(d);c.get_backgroundSkin()==null&&(d=
new ab,d.set_border(nc.None),d.set_fill(a.getContainerFill()),d.set_maxWidth(276),c.set_backgroundSkin(d));c.get_layout()==null&&(d=new Cg,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,Hd.CHILD_VARIANT_BUTTON_BAR)==null&&b.setStyleFunction(Ze,Hd.CHILD_VARIANT_BUTTON_BAR,function(c){if(c.get_layout()==null){var d=
new Pp;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(fa,Hd.CHILD_VARIANT_MESSAGE_LABEL)==null&&b.setStyleFunction(fa,Hd.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(lh.fillHorizontal());
c.set_wordWrap(!0)}))};var Zq=function(){};t["feathers.themes.steel.components.SteelApplicationStyles"]=Zq;Zq.__name__="feathers.themes.steel.components.SteelApplicationStyles";Zq.initialize=function(a){a==null&&(a=ac.get_fallbackTheme(),a=a instanceof wc?a:null);a!=null&&(a=a.styleProvider,a.getStyleFunction(Wa,null)==null&&a.setStyleFunction(Wa,null,function(b){b.get_scaleManager()==null&&b.set_scaleManager(new Kp)}))};Zq.refreshStageColor=function(a,b){a!=null&&a.set_color(b.rootFillColor)};var Bw=
function(){};t["feathers.themes.steel.components.SteelButtonBarStyles"]=Bw;Bw.__name__="feathers.themes.steel.components.SteelButtonBarStyles";Bw.initialize=function(a){if(a==null){var b=ac.get_fallbackTheme();a=b instanceof wc?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 Cg;d.set_gap(a.mediumPadding);c.set_layout(d)}}))};var rw=function(){};t["feathers.themes.steel.components.SteelButtonStyles"]=rw;
rw.__name__="feathers.themes.steel.components.SteelButtonStyles";rw.initialize=function(a){if(a==null){var b=ac.get_fallbackTheme();a=b instanceof wc?b:null}a!=null&&(b=a.styleProvider,b.getStyleFunction(Wb,null)==null&&b.setStyleFunction(Wb,null,function(c){if(c.get_backgroundSkin()==null){var d=new ab;d.set_fill(a.getButtonFill());d.set_disabledFill(a.getButtonDisabledFill());d.setFillForState(Jc.DOWN,a.getReversedActiveThemeFill());d.set_border(a.getButtonBorder());d.set_disabledBorder(a.getButtonDisabledBorder());
d.setBorderForState(Jc.DOWN,a.getActiveFillBorder());d.set_cornerRadius(3);c.set_backgroundSkin(d)}c.get_focusRectSkin()==null&&(d=new ab,d.set_fill(vb.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(Wb,Wb.VARIANT_PRIMARY)==null&&b.setStyleFunction(Wb,Wb.VARIANT_PRIMARY,function(c){if(c.get_backgroundSkin()==null){var d=new ab;d.set_fill(a.getActiveThemeFill());d.set_disabledFill(a.getButtonDisabledFill());d.setFillForState(Jc.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 ab,d.set_fill(vb.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(Wb,Wb.VARIANT_DANGER)==null&&b.setStyleFunction(Wb,Wb.VARIANT_DANGER,function(c){if(c.get_backgroundSkin()==
null){var d=new ab;d.set_fill(a.getDangerFill());d.set_disabledFill(a.getButtonDisabledFill());d.setFillForState(Jc.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 ab,d.set_fill(vb.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 Cw=function(){};t["feathers.themes.steel.components.SteelCalloutStyles"]=Cw;Cw.__name__="feathers.themes.steel.components.SteelCalloutStyles";Cw.initialize=function(a){if(a==null){var b=ac.get_fallbackTheme();a=b instanceof wc?b:null}a!=null&&(b=a.styleProvider,b.getStyleFunction(Zd,
null)==null&&b.setStyleFunction(Zd,null,function(c){if(c.get_backgroundSkin()==null){var d=new ab;d.set_fill(a.getContainerFill());d.set_border(a.getContainerBorder());c.set_backgroundSkin(d)}c.get_topArrowSkin()==null&&(d=new Nf,d.set_pointPosition(pa.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 Nf,d.set_pointPosition(pa.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 Nf,d.set_pointPosition(pa.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 Nf,d.set_pointPosition(pa.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 Dw=function(){};t["feathers.themes.steel.components.SteelCheckStyles"]=Dw;Dw.__name__="feathers.themes.steel.components.SteelCheckStyles";Dw.initialize=function(a){if(a==null){var b=ac.get_fallbackTheme();a=b instanceof wc?b:null}a!=null&&(b=a.styleProvider,b.getStyleFunction(Am,null)==null&&b.setStyleFunction(Am,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 ab;f.set_fill(vb.SolidColor(0,0));f.set_border(nc.None);c.set_backgroundSkin(f)}if(c.get_icon()==null){f=new Pm;c.set_icon(f);var g=new ab;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 ab;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 Jd;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 ab;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 Jd;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 ab,f.set_fill(vb.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(Vb.LEFT);c.set_gap(a.smallPadding)}))};var Yk=function(){};t["feathers.themes.steel.components.SteelCollapsibleStyles"]=Yk;Yk.__name__="feathers.themes.steel.components.SteelCollapsibleStyles";Yk.initialize=function(a){if(a==null){var b=ac.get_fallbackTheme();a=b instanceof wc?b:null}a!=null&&
(b=a.styleProvider,b.getStyleFunction(ed,Hh.CHILD_VARIANT_HEADER)==null&&b.setStyleFunction(ed,Hh.CHILD_VARIANT_HEADER,function(c){var d=pc.isDesktop();if(c.get_backgroundSkin()==null){var f=new ab;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 Pm;c.set_icon(f);var g=new Jd;Yk.drawDisclosureClosedIcon(g,a.textColor,d);f.set_defaultView(g);g=new Jd;Yk.drawDisclosureClosedIcon(g,a.disabledTextColor,d);f.set_disabledView(g);g=new Jd;Yk.drawDisclosureOpenIcon(g,a.textColor,d);f.set_selectedView(g);g=new Jd;Yk.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(pa.RIGHT);c.set_horizontalAlign(Vb.LEFT);c.set_verticalAlign(fc.MIDDLE)}))};Yk.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()};Yk.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 Ew=function(){};t["feathers.themes.steel.components.SteelComboBoxStyles"]=Ew;Ew.__name__="feathers.themes.steel.components.SteelComboBoxStyles";Ew.initialize=function(a){if(a==null){var b=ac.get_fallbackTheme();a=b instanceof wc?b:null}a!=null&&(b=a.styleProvider,b.getStyleFunction(Wb,Sd.CHILD_VARIANT_BUTTON)==null&&b.setStyleFunction(Wb,Sd.CHILD_VARIANT_BUTTON,function(c){if(c.get_backgroundSkin()==null){var d=new Fi;d.set_cornerRadiusPosition(pa.RIGHT);
d.set_fill(a.getButtonFill());d.set_disabledFill(a.getButtonDisabledFill());d.setFillForState(Jc.DOWN,a.getReversedActiveThemeFill());d.set_border(a.getButtonBorder());d.set_disabledBorder(a.getButtonDisabledBorder());d.setBorderForState(Jc.DOWN,a.getActiveFillBorder());d.set_cornerRadius(3);c.set_backgroundSkin(d)}c.get_icon()==null&&(d=new Nf,d.set_pointPosition(pa.BOTTOM),d.set_fill(vb.SolidColor(a.textColor)),d.set_disabledFill(vb.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(pd,Sd.CHILD_VARIANT_TEXT_INPUT)==null&&b.setStyleFunction(pd,Sd.CHILD_VARIANT_TEXT_INPUT,function(c){var d=pc.isDesktop();if(c.get_backgroundSkin()==null){var f=new Fi;f.set_cornerRadiusPosition(pa.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(Ee.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(Dc,Sd.CHILD_VARIANT_LIST_VIEW)==null&&b.setStyleFunction(Dc,Sd.CHILD_VARIANT_LIST_VIEW,function(c){a.styleProvider.getStyleFunction(Dc,Dc.VARIANT_POP_UP)(c)}))};var $h=function(){};t["feathers.themes.steel.components.SteelDatePickerStyles"]=$h;$h.__name__="feathers.themes.steel.components.SteelDatePickerStyles";
$h.initialize=function(a){if(a==null){var b=ac.get_fallbackTheme();a=b instanceof wc?b:null}a!=null&&(b=a.styleProvider,b.getStyleFunction(Lb,null)==null&&b.setStyleFunction(Lb,null,function(c){if(c.get_backgroundSkin()==null){var d=new ab;d.set_border(nc.None);d.set_fill(a.getContainerFill());c.set_backgroundSkin(d)}c.get_focusRectSkin()==null&&(d=new ab,d.set_fill(vb.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(fa,Lb.CHILD_VARIANT_MONTH_TITLE_VIEW)==null&&b.setStyleFunction(fa,Lb.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(Wb,Lb.CHILD_VARIANT_DECREMENT_MONTH_BUTTON)==null&&b.setStyleFunction(Wb,Lb.CHILD_VARIANT_DECREMENT_MONTH_BUTTON,function(c){var d=pc.isDesktop();
if(c.get_backgroundSkin()==null){var f=new ab;f.set_fill(a.getButtonFill());f.setFillForState(Jc.DOWN,a.getReversedActiveThemeFill());f.setFillForState(Jc.DISABLED,a.getButtonDisabledFill());f.set_border(a.getButtonBorder());f.set_disabledBorder(a.getButtonDisabledBorder());f.setBorderForState(Jc.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 Jd,$h.drawDecrementMonthIcon(d,
a.textColor),c.set_icon(d));c.getIconForState(Jc.DISABLED)==null&&(d=new Jd,$h.drawDecrementMonthIcon(d,a.disabledTextColor),c.setIconForState(Jc.DISABLED,d));c.setPadding(a.smallPadding);c.set_gap(a.smallPadding)}),b.getStyleFunction(Wb,Lb.CHILD_VARIANT_INCREMENT_MONTH_BUTTON)==null&&b.setStyleFunction(Wb,Lb.CHILD_VARIANT_INCREMENT_MONTH_BUTTON,function(c){var d=pc.isDesktop();if(c.get_backgroundSkin()==null){var f=new ab;f.set_fill(a.getButtonFill());f.setFillForState(Jc.DOWN,a.getReversedActiveThemeFill());
f.setFillForState(Jc.DISABLED,a.getButtonDisabledFill());f.set_border(a.getButtonBorder());f.set_disabledBorder(a.getButtonDisabledBorder());f.setBorderForState(Jc.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 Jd,$h.drawIncrementMonthIcon(d,a.textColor),c.set_icon(d));c.getIconForState(Jc.DISABLED)==null&&(d=new Jd,$h.drawIncrementMonthIcon(d,a.disabledTextColor),c.setIconForState(Jc.DISABLED,
d));c.setPadding(a.smallPadding);c.set_gap(a.smallPadding)}),b.getStyleFunction(Wb,Lb.CHILD_VARIANT_DECREMENT_YEAR_BUTTON)==null&&b.setStyleFunction(Wb,Lb.CHILD_VARIANT_DECREMENT_YEAR_BUTTON,function(c){var d=pc.isDesktop();if(c.get_backgroundSkin()==null){var f=new ab;f.set_fill(a.getButtonFill());f.setFillForState(Jc.DOWN,a.getReversedActiveThemeFill());f.setFillForState(Jc.DISABLED,a.getButtonDisabledFill());f.set_border(a.getButtonBorder());f.set_disabledBorder(a.getButtonDisabledBorder());f.setBorderForState(Jc.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 Jd,$h.drawDecrementYearIcon(d,a.textColor),c.set_icon(d));c.getIconForState(Jc.DISABLED)==null&&(d=new Jd,$h.drawDecrementYearIcon(d,a.disabledTextColor),c.setIconForState(Jc.DISABLED,d));c.setPadding(a.smallPadding);c.set_gap(a.smallPadding)}),b.getStyleFunction(Wb,Lb.CHILD_VARIANT_INCREMENT_YEAR_BUTTON)==null&&b.setStyleFunction(Wb,
Lb.CHILD_VARIANT_INCREMENT_YEAR_BUTTON,function(c){var d=pc.isDesktop();if(c.get_backgroundSkin()==null){var f=new ab;f.set_fill(a.getButtonFill());f.setFillForState(Jc.DOWN,a.getReversedActiveThemeFill());f.setFillForState(Jc.DISABLED,a.getButtonDisabledFill());f.set_border(a.getButtonBorder());f.set_disabledBorder(a.getButtonDisabledBorder());f.setBorderForState(Jc.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 Jd,$h.drawIncrementYearIcon(d,a.textColor),c.set_icon(d));c.getIconForState(Jc.DISABLED)==null&&(d=new Jd,$h.drawIncrementYearIcon(d,a.disabledTextColor),c.setIconForState(Jc.DISABLED,d));c.setPadding(a.smallPadding);c.set_gap(a.smallPadding)}),b.getStyleFunction(fa,Lb.CHILD_VARIANT_WEEKDAY_LABEL)==null&&b.setStyleFunction(fa,Lb.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(fc.MIDDLE)}),b.getStyleFunction(Rc,Lb.CHILD_VARIANT_DATE_RENDERER)==null&&b.setStyleFunction(Rc,Lb.CHILD_VARIANT_DATE_RENDERER,function(c){var d=pc.isDesktop();if(c.get_backgroundSkin()==null){var f=new ab;f.set_fill(vb.SolidColor(16711935,0));f.set_selectedFill(a.getActiveThemeFill());f.setFillForState(Yb.DOWN(!1),a.getReversedActiveThemeFill());f.set_border(nc.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(Vb.CENTER);c.set_verticalAlign(fc.MIDDLE);
c.set_paddingTop(a.xsmallPadding);c.set_paddingRight(a.xsmallPadding);c.set_paddingBottom(a.xsmallPadding);c.set_paddingLeft(a.xsmallPadding)}),b.getStyleFunction(Rc,Lb.CHILD_VARIANT_MUTED_DATE_RENDERER)==null&&b.setStyleFunction(Rc,Lb.CHILD_VARIANT_MUTED_DATE_RENDERER,function(c){var d=pc.isDesktop();if(c.get_backgroundSkin()==null){var f=new ab;f.set_fill(vb.SolidColor(16711935,0));f.set_selectedFill(a.getActiveThemeFill());f.setFillForState(Yb.DOWN(!1),a.getReversedActiveThemeFill());f.set_border(nc.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(Vb.CENTER);c.set_verticalAlign(fc.MIDDLE);c.set_paddingTop(a.xsmallPadding);c.set_paddingRight(a.xsmallPadding);c.set_paddingBottom(a.xsmallPadding);c.set_paddingLeft(a.xsmallPadding)}))};$h.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()};$h.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()};$h.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()};$h.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 dw=function(){};t["feathers.themes.steel.components.SteelDrawerStyles"]=dw;dw.__name__="feathers.themes.steel.components.SteelDrawerStyles";dw.initialize=function(a){if(a==null){var b=ac.get_fallbackTheme();a=b instanceof wc?b:null}a!=null&&(b=a.styleProvider,b.getStyleFunction(Ve,null)==null&&b.setStyleFunction(Ve,null,function(c){if(c.get_overlaySkin()==null){var d=new ab;d.set_fill(a.getOverlayFill());d.set_border(nc.None);d.set_width(1);
d.set_height(1);c.set_overlaySkin(d)}}))};var Gw=function(){};t["feathers.themes.steel.components.SteelFormItemStyles"]=Gw;Gw.__name__="feathers.themes.steel.components.SteelFormItemStyles";Gw.initialize=function(a){if(a==null){var b=ac.get_fallbackTheme();a=b instanceof wc?b:null}a!=null&&(b=a.styleProvider,b.getStyleFunction($i,null)==null&&b.setStyleFunction($i,null,function(c){if(c.get_requiredSkin()==null){var d=new Jd;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 Fw=function(){};
t["feathers.themes.steel.components.SteelFormStyles"]=Fw;Fw.__name__="feathers.themes.steel.components.SteelFormStyles";Fw.initialize=function(a){if(a==null){var b=ac.get_fallbackTheme();a=b instanceof wc?b:null}a!=null&&(b=a.styleProvider,b.getStyleFunction(On,null)==null&&b.setStyleFunction(On,null,function(c){if(c.get_layout()==null){var d=new Op;d.set_gap(a.mediumPadding);c.set_layout(d)}}))};var Hw=function(){};t["feathers.themes.steel.components.SteelGridViewStyles"]=Hw;Hw.__name__="feathers.themes.steel.components.SteelGridViewStyles";
Hw.initialize=function(a){if(a==null){var b=ac.get_fallbackTheme();a=b instanceof wc?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 Fh,g.set_requestedRowCount(5),f.set_layout(g));f.get_backgroundSkin()==null&&(g=new ab,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 ab,g.set_fill(a.getThemeFill()),
g.set_border(nc.None),g.set_width(2),g.set_height(2),f.set_columnResizeSkin(g));f.get_headerCornerSkin()==null&&(g=new ab,g.set_fill(a.getSubHeadingFill()),g.set_border(nc.None),f.set_headerCornerSkin(g));f.get_focusRectSkin()==null&&(g=new ab,g.set_fill(vb.None),g.set_border(a.getFocusBorder()),f.set_focusRectSkin(g));f.get_dragDropIndicatorSkin()==null&&(g=new ab,g.set_fill(a.getActiveThemeFill()),g.set_border(nc.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 Fh,g.set_requestedRowCount(5),f.set_layout(g));f.get_backgroundSkin()==null&&(g=new ab,g.set_fill(a.getContainerFill()),g.set_border(nc.None),g.set_width(10),g.set_height(10),f.set_backgroundSkin(g));f.get_columnResizeSkin()==null&&
(g=new ab,g.set_fill(a.getThemeFill()),g.set_border(nc.None),g.set_width(2),g.set_height(2),f.set_columnResizeSkin(g));f.get_headerCornerSkin()==null&&(g=new ab,g.set_fill(a.getSubHeadingFill()),g.set_border(nc.None),f.set_headerCornerSkin(g));f.get_focusRectSkin()==null&&(g=new ab,g.set_fill(vb.None),g.set_border(a.getFocusBorder()),f.set_focusRectSkin(g));f.set_showHeaderDividersOnlyWhenResizable(!0)};b=a.styleProvider;b.getStyleFunction(rc,null)==null&&b.setStyleFunction(rc,null,function(f){pc.isDesktop()?
c(f):d(f)});b.getStyleFunction(rc,rc.VARIANT_BORDER)==null&&b.setStyleFunction(rc,rc.VARIANT_BORDER,c);b.getStyleFunction(rc,rc.VARIANT_BORDERLESS)==null&&b.setStyleFunction(rc,rc.VARIANT_BORDERLESS,d);b.getStyleFunction(Rc,rc.CHILD_VARIANT_CELL_RENDERER)==null&&b.setStyleFunction(Rc,rc.CHILD_VARIANT_CELL_RENDERER,function(f){var g=pc.isDesktop();if(f.get_backgroundSkin()==null){var h=new ab;h.set_fill(vb.SolidColor(16711935,0));h.set_border(nc.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(Rc,null)(f)});b.getStyleFunction(Rc,rc.CHILD_VARIANT_HEADER_RENDERER)==null&&b.setStyleFunction(Rc,rc.CHILD_VARIANT_HEADER_RENDERER,function(f){var g=pc.isDesktop();if(f.get_backgroundSkin()==null){var h=new ab;h.set_fill(a.getSubHeadingFill());h.set_border(nc.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(Vb.LEFT)});b.getStyleFunction(Wb,rc.CHILD_VARIANT_HEADER_DIVIDER)==null&&b.setStyleFunction(Wb,rc.CHILD_VARIANT_HEADER_DIVIDER,function(f){var g=pc.isDesktop();if(f.get_backgroundSkin()==null){var h=new Tp;h.set_fill(vb.SolidColor(16711935,0));h.set_border(a.getSubHeadingDividerBorder());h.setBorderForState(Jc.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(gg,null)==null&&b.setStyleFunction(gg,null,function(f){var g=pc.isDesktop();if(f.get_backgroundSkin()==null){var h=new Zl;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 Iw=function(){};t["feathers.themes.steel.components.SteelGroupListViewStyles"]=Iw;Iw.__name__="feathers.themes.steel.components.SteelGroupListViewStyles";Iw.initialize=function(a){if(a==null){var b=ac.get_fallbackTheme();a=b instanceof wc?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 Fh,g.set_requestedRowCount(5),f.set_layout(g));f.get_backgroundSkin()==
null&&(g=new ab,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 ab,g.set_fill(vb.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 Fh,g.set_requestedRowCount(5),f.set_layout(g));f.get_backgroundSkin()==null&&(g=new ab,g.set_fill(a.getContainerFill()),g.set_border(nc.None),g.set_width(10),g.set_height(10),f.set_backgroundSkin(g));f.get_focusRectSkin()==null&&(g=new ab,g.set_fill(vb.None),g.set_border(a.getFocusBorder()),f.set_focusRectSkin(g))};b=a.styleProvider;b.getStyleFunction(Wc,null)==null&&b.setStyleFunction(Wc,null,function(f){pc.isDesktop()?c(f):d(f)});b.getStyleFunction(Wc,Wc.VARIANT_BORDER)==null&&b.setStyleFunction(Wc,
Wc.VARIANT_BORDER,c);b.getStyleFunction(Wc,Wc.VARIANT_BORDERLESS)==null&&b.setStyleFunction(Wc,Wc.VARIANT_BORDERLESS,d);b.getStyleFunction(Rc,Wc.CHILD_VARIANT_HEADER_RENDERER)==null&&b.setStyleFunction(Rc,Wc.CHILD_VARIANT_HEADER_RENDERER,function(f){if(f.get_backgroundSkin()==null){var g=new ab;g.set_fill(a.getSubHeadingFill());g.set_border(nc.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(Vb.LEFT)})}};var Jw=function(){};
t["feathers.themes.steel.components.SteelHDividedBoxStyles"]=Jw;Jw.__name__="feathers.themes.steel.components.SteelHDividedBoxStyles";Jw.initialize=function(a){if(a==null){var b=ac.get_fallbackTheme();a=b instanceof wc?b:null}a!=null&&(b=a.styleProvider,b.getStyleFunction(Mj,null)==null&&b.setStyleFunction(Mj,null,function(c){if(c.get_resizeDraggingSkin()==null){var d=new ab;d.set_fill(a.getThemeFill());d.set_border(nc.None);d.set_width(2);d.set_height(2);c.set_resizeDraggingSkin(d)}}))};var Lw=function(){};
t["feathers.themes.steel.components.SteelHProgressBarStyles"]=Lw;Lw.__name__="feathers.themes.steel.components.SteelHProgressBarStyles";Lw.initialize=function(a){if(a==null){var b=ac.get_fallbackTheme();a=b instanceof wc?b:null}a!=null&&(b=a.styleProvider,b.getStyleFunction(wm,null)==null&&b.setStyleFunction(wm,null,function(c){if(c.get_fillSkin()==null){var d=new ab;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 ab,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 sw=function(){};t["feathers.themes.steel.components.SteelHScrollBarStyles"]=sw;sw.__name__="feathers.themes.steel.components.SteelHScrollBarStyles";
sw.initialize=function(a){if(a==null){var b=ac.get_fallbackTheme();a=b instanceof wc?b:null}a!=null&&(b=a.styleProvider,b.getStyleFunction(fh,null)==null&&b.setStyleFunction(fh,null,function(c){var d=pc.isDesktop();if(c.get_thumbSkin()==null){var f=new ab;f.set_fill(a.getScrollBarThumbFill());f.set_disabledFill(a.getScrollBarThumbDisabledFill());f.set_border(nc.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 si;g.set_keepDownStateOnRollOut(!0);
g.set_backgroundSkin(f);c.set_thumbSkin(g)}d&&c.get_trackSkin()==null&&(d=new ab,d.set_fill(a.getControlFill()),d.set_disabledFill(a.getControlDisabledFill()),d.set_border(nc.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(Wb,fh.CHILD_VARIANT_DECREMENT_BUTTON)==null&&b.setStyleFunction(Wb,
fh.CHILD_VARIANT_DECREMENT_BUTTON,function(c){if(c.get_backgroundSkin()==null){var d=new ab;d.set_fill(a.getControlFill());d.set_disabledFill(a.getControlDisabledFill());d.setFillForState(Jc.DOWN,a.getReversedActiveThemeFill());d.set_border(nc.None);d.set_width(12);d.set_height(12);c.set_backgroundSkin(d)}c.get_icon()==null&&(d=new Nf,d.set_pointPosition(pa.LEFT),d.set_fill(vb.SolidColor(a.scrollBarThumbFillColor)),d.set_disabledFill(vb.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(Wb,fh.CHILD_VARIANT_INCREMENT_BUTTON)==null&&b.setStyleFunction(Wb,fh.CHILD_VARIANT_INCREMENT_BUTTON,function(c){if(c.get_backgroundSkin()==null){var d=new ab;d.set_fill(a.getControlFill());d.set_disabledFill(a.getControlDisabledFill());d.setFillForState(Jc.DOWN,
a.getReversedActiveThemeFill());d.set_border(nc.None);d.set_width(12);d.set_height(12);c.set_backgroundSkin(d)}c.get_icon()==null&&(d=new Nf,d.set_pointPosition(pa.RIGHT),d.set_fill(vb.SolidColor(a.scrollBarThumbFillColor)),d.set_disabledFill(vb.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 Mw=function(){};t["feathers.themes.steel.components.SteelHSliderStyles"]=Mw;Mw.__name__="feathers.themes.steel.components.SteelHSliderStyles";Mw.initialize=function(a){if(a==null){var b=ac.get_fallbackTheme();a=b instanceof wc?b:null}a!=null&&(b=a.styleProvider,b.getStyleFunction(Pn,null)==null&&b.setStyleFunction(Pn,null,function(c){var d=pc.isDesktop();if(c.get_thumbSkin()==null){var f=new Wb;f.set_styleProvider(null);f.set_keepDownStateOnRollOut(!0);var g=new Ei;g.set_fill(a.getButtonFill());
g.set_disabledFill(a.getButtonDisabledFill());g.setFillForState(Jc.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 Ei;d.set_fill(vb.None);d.set_border(a.getFocusBorder());f.set_focusRectSkin(d);c.set_thumbSkin(f)}c.get_trackSkin()==null&&(f=new Fi,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(pa.LEFT),f.set_width(100),f.set_height(8),c.set_trackSkin(f),c.get_secondaryTrackSkin()==null&&(f=new Fi,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(pa.RIGHT),f.set_width(100),f.set_height(8),c.set_secondaryTrackSkin(f)))}))};var Kw=function(){};
t["feathers.themes.steel.components.SteelHeaderStyles"]=Kw;Kw.__name__="feathers.themes.steel.components.SteelHeaderStyles";Kw.initialize=function(a){if(a==null){var b=ac.get_fallbackTheme();a=b instanceof wc?b:null}a!=null&&(b=a.styleProvider,b.getStyleFunction(Si,null)==null&&b.setStyleFunction(Si,null,function(c){var d=pc.isDesktop();if(c.get_backgroundSkin()==null){var f=new ab;f.set_fill(a.getHeaderFill());f.set_border(nc.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 Zk=function(){};t["feathers.themes.steel.components.SteelHierarchicalItemRendererStyles"]=Zk;Zk.__name__="feathers.themes.steel.components.SteelHierarchicalItemRendererStyles";Zk.initialize=function(a){if(a==null){var b=ac.get_fallbackTheme();a=b instanceof wc?b:null}a!=null&&(b=a.styleProvider,b.getStyleFunction(Mf,null)==null&&b.setStyleFunction(Mf,null,function(c){var d=pc.isDesktop();if(c.get_backgroundSkin()==null){var f=
new Zl;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(Vb.LEFT)}),b.getStyleFunction(ed,Mf.CHILD_VARIANT_DISCLOSURE_BUTTON)==null&&b.setStyleFunction(ed,Mf.CHILD_VARIANT_DISCLOSURE_BUTTON,
function(c){var d=pc.isDesktop();if(c.get_icon()==null){var f=new Pm;c.set_icon(f);c=new Jd;Zk.drawDisclosureClosedIcon(c,a.textColor,d);f.set_defaultView(c);c=new Jd;Zk.drawDisclosureClosedIcon(c,a.disabledTextColor,d);f.set_disabledView(c);c=new Jd;Zk.drawDisclosureOpenIcon(c,a.textColor,d);f.set_selectedView(c);c=new Jd;Zk.drawDisclosureOpenIcon(c,a.disabledTextColor,d);f.setViewForState(Yb.DISABLED(!0),c)}}))};Zk.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()};Zk.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 Nw=function(){};t["feathers.themes.steel.components.SteelItemRendererStyles"]=Nw;Nw.__name__="feathers.themes.steel.components.SteelItemRendererStyles";Nw.initialize=function(a){if(a==null){var b=
ac.get_fallbackTheme();a=b instanceof wc?b:null}a!=null&&(b=a.styleProvider,b.getStyleFunction(Rc,null)==null&&b.setStyleFunction(Rc,null,function(c){var d=pc.isDesktop();if(c.get_backgroundSkin()==null){var f=new Zl;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(Vb.LEFT)}))};var Ow=function(){};t["feathers.themes.steel.components.SteelLabelStyles"]=Ow;Ow.__name__="feathers.themes.steel.components.SteelLabelStyles";Ow.initialize=function(a){if(a==null){var b=ac.get_fallbackTheme();a=b instanceof wc?b:null}a!=null&&(b=a.styleProvider,b.getStyleFunction(fa,null)==null&&b.setStyleFunction(fa,null,function(c){c.get_textFormat()==null&&c.set_textFormat(a.getTextFormat());c.get_disabledTextFormat()==
null&&c.set_disabledTextFormat(a.getDisabledTextFormat())}),b.getStyleFunction(fa,fa.VARIANT_HEADING)==null&&b.setStyleFunction(fa,fa.VARIANT_HEADING,function(c){c.get_textFormat()==null&&c.set_textFormat(a.getHeaderTextFormat());c.get_disabledTextFormat()==null&&c.set_disabledTextFormat(a.getDisabledHeaderTextFormat())}),b.getStyleFunction(fa,fa.VARIANT_DETAIL)==null&&b.setStyleFunction(fa,fa.VARIANT_DETAIL,function(c){c.get_textFormat()==null&&c.set_textFormat(a.getDetailTextFormat());c.get_disabledTextFormat()==
null&&c.set_disabledTextFormat(a.getDisabledDetailTextFormat())}),b.getStyleFunction(fa,fa.VARIANT_DANGER)==null&&b.setStyleFunction(fa,fa.VARIANT_DANGER,function(c){c.get_textFormat()==null&&c.set_textFormat(a.getDangerTextFormat());c.get_disabledTextFormat()==null&&c.set_disabledTextFormat(a.getDisabledTextFormat())}))};var Pw=function(){};t["feathers.themes.steel.components.SteelLayoutGroupItemRendererStyles"]=Pw;Pw.__name__="feathers.themes.steel.components.SteelLayoutGroupItemRendererStyles";
Pw.initialize=function(a){if(a==null){var b=ac.get_fallbackTheme();a=b instanceof wc?b:null}a!=null&&(b=a.styleProvider,b.getStyleFunction(Tl,null)==null&&b.setStyleFunction(Tl,null,function(c){var d=pc.isDesktop();if(c.get_backgroundSkin()==null){var f=new Zl;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 cw=function(){};t["feathers.themes.steel.components.SteelLayoutGroupStyles"]=cw;cw.__name__="feathers.themes.steel.components.SteelLayoutGroupStyles";cw.initialize=function(a){if(a==null){var b=ac.get_fallbackTheme();a=b instanceof wc?b:null}a!=null&&(b=a.styleProvider,b.getStyleFunction(qb,qb.VARIANT_TOOL_BAR)==null&&b.setStyleFunction(qb,qb.VARIANT_TOOL_BAR,function(c){var d=pc.isDesktop();
if(c.get_backgroundSkin()==null){var f=new ab;f.set_fill(a.getHeaderFill());f.set_border(nc.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 Cg,d.set_horizontalAlign(Vb.LEFT),d.set_verticalAlign(fc.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 Qw=function(){};t["feathers.themes.steel.components.SteelListViewStyles"]=Qw;Qw.__name__="feathers.themes.steel.components.SteelListViewStyles";Qw.initialize=function(a){if(a==null){var b=ac.get_fallbackTheme();a=b instanceof wc?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 Fh,g.set_requestedRowCount(5),f.set_layout(g));f.get_backgroundSkin()==null&&(g=new ab,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 ab,g.set_fill(vb.None),g.set_border(a.getFocusBorder()),f.set_focusRectSkin(g));f.get_dragDropIndicatorSkin()==null&&(g=new ab,g.set_fill(a.getActiveThemeFill()),g.set_border(nc.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 Fh,g.set_requestedRowCount(5),f.set_layout(g));f.get_backgroundSkin()==null&&(g=new ab,g.set_fill(a.getContainerFill()),g.set_border(nc.None),g.set_width(10),g.set_height(10),f.set_backgroundSkin(g));f.get_focusRectSkin()==null&&(g=new ab,g.set_fill(vb.None),g.set_border(a.getFocusBorder()),f.set_focusRectSkin(g))};b=a.styleProvider;b.getStyleFunction(Dc,null)==null&&b.setStyleFunction(Dc,null,function(f){pc.isDesktop()?
c(f):d(f)});b.getStyleFunction(Dc,Dc.VARIANT_BORDER)==null&&b.setStyleFunction(Dc,Dc.VARIANT_BORDER,c);b.getStyleFunction(Dc,Dc.VARIANT_BORDERLESS)==null&&b.setStyleFunction(Dc,Dc.VARIANT_BORDERLESS,d);b.getStyleFunction(Dc,Dc.VARIANT_POP_UP)==null&&b.setStyleFunction(Dc,Dc.VARIANT_POP_UP,function(f){if(f.get_layout()==null){var g=new Fh;g.set_requestedMinRowCount(1);g.set_requestedMaxRowCount(5);f.set_layout(g)}c(f)})}};var Rw=function(){};t["feathers.themes.steel.components.SteelNumericStepperStyles"]=
Rw;Rw.__name__="feathers.themes.steel.components.SteelNumericStepperStyles";Rw.initialize=function(a){if(a==null){var b=ac.get_fallbackTheme();a=b instanceof wc?b:null}a!=null&&(b=a.styleProvider,b.getStyleFunction(Wb,qd.CHILD_VARIANT_DECREMENT_BUTTON)==null&&b.setStyleFunction(Wb,qd.CHILD_VARIANT_DECREMENT_BUTTON,function(c){var d=pc.isDesktop();if(c.get_backgroundSkin()==null){var f=new Fi;f.set_cornerRadiusPosition(pa.LEFT);f.set_drawBaseBorder(!1);f.set_fill(a.getButtonFill());f.set_disabledFill(a.getButtonDisabledFill());
f.setFillForState(Jc.DOWN,a.getReversedActiveThemeFill());f.set_border(a.getButtonBorder());f.set_disabledBorder(a.getButtonDisabledBorder());f.setBorderForState(Jc.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(Wb,qd.CHILD_VARIANT_INCREMENT_BUTTON)==null&&b.setStyleFunction(Wb,qd.CHILD_VARIANT_INCREMENT_BUTTON,function(c){var d=pc.isDesktop();if(c.get_backgroundSkin()==null){var f=new Fi;f.set_cornerRadiusPosition(pa.RIGHT);f.set_drawBaseBorder(!1);f.set_fill(a.getButtonFill());f.set_disabledFill(a.getButtonDisabledFill());
f.setFillForState(Jc.DOWN,a.getReversedActiveThemeFill());f.set_border(a.getButtonBorder());f.set_disabledBorder(a.getButtonDisabledBorder());f.setBorderForState(Jc.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(pd,qd.CHILD_VARIANT_TEXT_INPUT)==null&&b.setStyleFunction(pd,qd.CHILD_VARIANT_TEXT_INPUT,function(c){var d=pc.isDesktop();if(c.get_backgroundSkin()==null){var f=new ab;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(Ee.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 Sw=function(){};t["feathers.themes.steel.components.SteelPageIndicatorStyles"]=Sw;Sw.__name__="feathers.themes.steel.components.SteelPageIndicatorStyles";Sw.initialize=function(a){if(a==null){var b=ac.get_fallbackTheme();a=b instanceof wc?b:null}a!=null&&(b=a.styleProvider,b.getStyleFunction(jh,null)==null&&b.setStyleFunction(jh,null,function(c){if(c.get_focusRectSkin()==null){var d=
new ab;d.set_fill(vb.None);d.set_border(a.getFocusBorder());d.set_cornerRadius(3);c.set_focusRectSkin(d)}c.get_layout()==null&&(d=new Cg,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(Vb.CENTER),d.set_verticalAlign(fc.MIDDLE),c.set_layout(d))}),b.getStyleFunction(ed,jh.CHILD_VARIANT_TOGGLE_BUTTON)==null&&b.setStyleFunction(ed,jh.CHILD_VARIANT_TOGGLE_BUTTON,function(c){if(c.get_backgroundSkin()==
null){var d=new Ei;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 Tw=function(){};t["feathers.themes.steel.components.SteelPageNavigatorStyles"]=Tw;Tw.__name__="feathers.themes.steel.components.SteelPageNavigatorStyles";Tw.initialize=function(a){a==null&&(a=ac.get_fallbackTheme(),a=a instanceof wc?a:null);a!=null&&(a=a.styleProvider,a.getStyleFunction(Jh,null)==null&&a.setStyleFunction(Jh,null,function(b){b.set_pageIndicatorPosition(pa.BOTTOM);b.set_previousTransition((new wj).setRight().build());b.set_nextTransition((new wj).setLeft().build())}))};var vw=function(){};
t["feathers.themes.steel.components.SteelPanelStyles"]=vw;vw.__name__="feathers.themes.steel.components.SteelPanelStyles";vw.initialize=function(a){if(a==null){var b=ac.get_fallbackTheme();a=b instanceof wc?b:null}a!=null&&(b=a.styleProvider,b.getStyleFunction(Tc,null)==null&&b.setStyleFunction(Tc,null,function(c){var d=pc.isDesktop();c.set_autoHideScrollBars(!d);c.set_fixedScrollBars(d);c.get_backgroundSkin()==null&&(d=new ab,d.set_fill(a.getContainerFill()),d.set_border(nc.None),c.set_backgroundSkin(d));
c.get_scrollBarsCornerSkin()==null&&(d=new ab,d.set_fill(a.getContainerFill()),d.set_border(nc.None),c.set_scrollBarsCornerSkin(d))}))};var Jn=function(){};t["feathers.themes.steel.components.SteelPopUpDatePickerStyles"]=Jn;Jn.__name__="feathers.themes.steel.components.SteelPopUpDatePickerStyles";Jn.initialize=function(a){if(a==null){var b=ac.get_fallbackTheme();a=b instanceof wc?b:null}a!=null&&(b=a.styleProvider,b.getStyleFunction(Wb,$d.CHILD_VARIANT_BUTTON)==null&&b.setStyleFunction(Wb,$d.CHILD_VARIANT_BUTTON,
function(c){var d=pc.isDesktop();if(c.get_backgroundSkin()==null){var f=new Fi;f.set_cornerRadiusPosition(pa.RIGHT);f.set_fill(a.getButtonFill());f.set_disabledFill(a.getButtonDisabledFill());f.setFillForState(Jc.DOWN,a.getReversedActiveThemeFill());f.set_border(a.getButtonBorder());f.set_disabledBorder(a.getButtonDisabledBorder());f.setBorderForState(Jc.DOWN,a.getActiveFillBorder());f.set_cornerRadius(3);c.set_backgroundSkin(f)}c.get_icon()==null&&(f=new Jd,Jn.drawIcon(f,a.textColor),c.set_icon(f),
c.getIconForState(Jc.DISABLED)==null&&(f=new Jd,Jn.drawIcon(f,a.disabledTextColor),c.setIconForState(Jc.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(pd,$d.CHILD_VARIANT_TEXT_INPUT)==null&&b.setStyleFunction(pd,
$d.CHILD_VARIANT_TEXT_INPUT,function(c){var d=pc.isDesktop();if(c.get_backgroundSkin()==null){var f=new Fi;f.set_cornerRadiusPosition(pa.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(Ee.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(Lb,$d.CHILD_VARIANT_DATE_PICKER)==
null&&b.setStyleFunction(Lb,$d.CHILD_VARIANT_DATE_PICKER,function(c){if(c.get_backgroundSkin()==null){var d=new ab;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)}))};Jn.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 Uw=function(){};t["feathers.themes.steel.components.SteelPopUpListViewStyles"]=Uw;Uw.__name__="feathers.themes.steel.components.SteelPopUpListViewStyles";Uw.initialize=
function(a){if(a==null){var b=ac.get_fallbackTheme();a=b instanceof wc?b:null}a!=null&&(b=a.styleProvider,b.getStyleFunction(fe,null)==null&&b.setStyleFunction(fe,null,function(c){pc.isDesktop()&&c.set_popUpAdapter(new al)}),b.getStyleFunction(Wb,fe.CHILD_VARIANT_BUTTON)==null&&b.setStyleFunction(Wb,fe.CHILD_VARIANT_BUTTON,function(c){a.styleProvider.getStyleFunction(Wb,null)(c);c.set_horizontalAlign(Vb.LEFT);c.set_gap(1/0);c.set_minGap(a.mediumPadding);if(c.get_icon()==null){var d=new Nf;d.set_pointPosition(pa.BOTTOM);
d.set_fill(vb.SolidColor(a.textColor));d.set_disabledFill(vb.SolidColor(a.disabledTextColor));d.set_width(8);d.set_height(4);c.set_icon(d)}c.set_iconPosition(pa.RIGHT)}),b.getStyleFunction(Dc,fe.CHILD_VARIANT_LIST_VIEW)==null&&b.setStyleFunction(Dc,fe.CHILD_VARIANT_LIST_VIEW,function(c){a.styleProvider.getStyleFunction(Dc,Dc.VARIANT_POP_UP)(c)}))};var Vw=function(){};t["feathers.themes.steel.components.SteelRadioStyles"]=Vw;Vw.__name__="feathers.themes.steel.components.SteelRadioStyles";Vw.initialize=
function(a){if(a==null){var b=ac.get_fallbackTheme();a=b instanceof wc?b:null}a!=null&&(b=a.styleProvider,b.getStyleFunction(vj,null)==null&&b.setStyleFunction(vj,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 ab;f.set_fill(vb.SolidColor(0,0));f.set_border(nc.None);c.set_backgroundSkin(f)}if(c.get_icon()==null){f=new Pm;
c.set_icon(f);var g=new Ei;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 Ei;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 Jd;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 Ei;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 Jd;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 ab,f.set_fill(vb.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(Vb.LEFT);c.set_gap(a.smallPadding)}))};var Ww=function(){};t["feathers.themes.steel.components.SteelRouterNavigatorStyles"]=Ww;Ww.__name__="feathers.themes.steel.components.SteelRouterNavigatorStyles";Ww.initialize=function(a){a==null&&(a=ac.get_fallbackTheme(),a=a instanceof wc?a:null);a!=null&&(a=a.styleProvider,a.getStyleFunction(Vn,null)==null&&a.setStyleFunction(Vn,null,function(b){b.set_backTransition((new wj).setRight().build());b.set_forwardTransition((new wj).setLeft().build())}))};
var uw=function(){};t["feathers.themes.steel.components.SteelScrollContainerStyles"]=uw;uw.__name__="feathers.themes.steel.components.SteelScrollContainerStyles";uw.initialize=function(a){if(a==null){var b=ac.get_fallbackTheme();a=b instanceof wc?b:null}a!=null&&(b=a.styleProvider,b.getStyleFunction(le,null)==null&&b.setStyleFunction(le,null,function(c){var d=pc.isDesktop();c.set_autoHideScrollBars(!d);c.set_fixedScrollBars(d);c.get_backgroundSkin()==null&&(d=new ab,d.set_fill(a.getContainerFill()),
d.set_border(nc.None),c.set_backgroundSkin(d));c.get_scrollBarsCornerSkin()==null&&(d=new ab,d.set_fill(a.getContainerFill()),d.set_border(nc.None),c.set_scrollBarsCornerSkin(d));c.get_focusRectSkin()==null&&(d=new ab,d.set_fill(vb.None),d.set_border(a.getFocusBorder()),c.set_focusRectSkin(d))}))};var Qy=function(){};t["feathers.themes.steel.components.SteelSortOrderHeaderRendererStyles"]=Qy;Qy.__name__="feathers.themes.steel.components.SteelSortOrderHeaderRendererStyles";Qy.initialize=function(a){if(a==
null){var b=ac.get_fallbackTheme();a=b instanceof wc?b:null}a!=null&&(b=a.styleProvider,b.getStyleFunction(cl,null)==null&&b.setStyleFunction(cl,null,function(c){var d=pc.isDesktop();if(c.get_backgroundSkin()==null){var f=new ab;f.set_fill(a.getSubHeadingFill());f.set_border(nc.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 Nf,
d.set_pointPosition(pa.TOP),d.set_fill(vb.SolidColor(a.textColor)),d.set_disabledFill(vb.SolidColor(a.disabledTextColor)),d.set_width(8),d.set_height(4),c.set_sortAscendingIcon(d));c.get_sortDescendingIcon()==null&&(d=new Nf,d.set_pointPosition(pa.BOTTOM),d.set_fill(vb.SolidColor(a.textColor)),d.set_disabledFill(vb.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(Vb.LEFT)}))};var Xw=function(){};t["feathers.themes.steel.components.SteelStackNavigatorStyles"]=
Xw;Xw.__name__="feathers.themes.steel.components.SteelStackNavigatorStyles";Xw.initialize=function(a){a==null&&(a=ac.get_fallbackTheme(),a=a instanceof wc?a:null);a!=null&&(a=a.styleProvider,a.getStyleFunction(Wn,null)==null&&a.setStyleFunction(Wn,null,function(b){b.set_popTransition((new wj).setRight().build());b.set_pushTransition((new wj).setLeft().build())}))};var Yw=function(){};t["feathers.themes.steel.components.SteelTabBarStyles"]=Yw;Yw.__name__="feathers.themes.steel.components.SteelTabBarStyles";
Yw.initialize=function(a){if(a==null){var b=ac.get_fallbackTheme();a=b instanceof wc?b:null}a!=null&&(b=a.styleProvider,b.getStyleFunction(Ne,null)==null&&b.setStyleFunction(Ne,null,function(c){var d=pc.isDesktop();if(c.get_backgroundSkin()==null){var f=new ab;f.set_fill(a.getControlFill());f.set_disabledFill(a.getControlDisabledFill());f.set_border(nc.None);c.set_backgroundSkin(f)}c.get_focusRectSkin()==null&&(f=new ab,f.set_fill(vb.None),f.set_border(a.getFocusBorder()),c.set_focusRectSkin(f));
c.get_layout()==null&&(f=new Cg,d||f.set_horizontalAlign(Vb.CENTER),c.set_layout(f))}),b.getStyleFunction(ed,Ne.CHILD_VARIANT_TAB)==null&&b.setStyleFunction(ed,Ne.CHILD_VARIANT_TAB,function(c){var d=pc.isDesktop();c.get_backgroundSkin()==null&&(d?(d=new Fi,d.set_cornerRadius(3),d.set_cornerRadiusPosition(pa.TOP),d.set_drawBaseBorder(!1),d.set_maxWidth(100),d.set_minWidth(20)):(d=new ab,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 Zw=function(){};t["feathers.themes.steel.components.SteelTabNavigatorStyles"]=Zw;Zw.__name__="feathers.themes.steel.components.SteelTabNavigatorStyles";Zw.initialize=function(a){a==null&&(a=ac.get_fallbackTheme(),a=a instanceof wc?a:null);a!=null&&(a=a.styleProvider,a.getStyleFunction(gh,null)==null&&a.setStyleFunction(gh,null,
function(b){var c=pc.isDesktop();b.set_tabBarPosition(c?pa.TOP:pa.BOTTOM);c||(b.set_previousTransition((new wj).setRight().build()),b.set_nextTransition((new wj).setLeft().build()))}))};var $w=function(){};t["feathers.themes.steel.components.SteelTextAreaStyles"]=$w;$w.__name__="feathers.themes.steel.components.SteelTextAreaStyles";$w.initialize=function(a){if(a==null){var b=ac.get_fallbackTheme();a=b instanceof wc?b:null}a!=null&&(b=a.styleProvider,b.getStyleFunction(sf,null)==null&&b.setStyleFunction(sf,
null,function(c){var d=pc.isDesktop();c.set_autoHideScrollBars(!d);c.set_fixedScrollBars(d);if(c.get_backgroundSkin()==null){var f=new ab;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(Ee.FOCUSED,a.getThemeBorder());f.setBorderForState(Ee.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,sf.CHILD_VARIANT_ERROR_CALLOUT)==null&&b.setStyleFunction(Ye,sf.CHILD_VARIANT_ERROR_CALLOUT,function(c){a.styleProvider.getStyleFunction(Ye,Ye.VARIANT_DANGER)(c)}))};var ax=function(){};t["feathers.themes.steel.components.SteelTextCalloutStyles"]=ax;ax.__name__="feathers.themes.steel.components.SteelTextCalloutStyles";ax.initialize=function(a){if(a==null){var b=ac.get_fallbackTheme();a=b instanceof
wc?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 ab;d.set_fill(a.getContainerFill());d.set_border(a.getContainerBorder());c.set_backgroundSkin(d)}c.get_topArrowSkin()==null&&(d=new Nf,d.set_pointPosition(pa.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 Nf,d.set_pointPosition(pa.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 Nf,d.set_pointPosition(pa.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 Nf,d.set_pointPosition(pa.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 ab;d.set_fill(a.getDangerFill());
d.set_border(a.getDangerBorder());c.set_backgroundSkin(d)}c.get_topArrowSkin()==null&&(d=new Nf,d.set_pointPosition(pa.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 Nf,d.set_pointPosition(pa.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 Nf,d.set_pointPosition(pa.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 Nf,d.set_pointPosition(pa.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 bx=function(){};t["feathers.themes.steel.components.SteelTextInputStyles"]=bx;bx.__name__="feathers.themes.steel.components.SteelTextInputStyles";bx.initialize=function(a){if(a==
null){var b=ac.get_fallbackTheme();a=b instanceof wc?b:null}a!=null&&(b=a.styleProvider,b.getStyleFunction(pd,null)==null&&b.setStyleFunction(pd,null,function(c){var d=pc.isDesktop();if(c.get_backgroundSkin()==null){var f=new ab;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(Ee.FOCUSED,a.getThemeBorder());f.setBorderForState(Ee.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(pd,
pd.VARIANT_SEARCH)==null&&b.setStyleFunction(pd,pd.VARIANT_SEARCH,function(c){var d=pc.isDesktop();if(c.get_backgroundSkin()==null){var f=new Lt;f.set_capDirection(uj.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(Ee.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,pd.CHILD_VARIANT_ERROR_CALLOUT)==null&&b.setStyleFunction(Ye,pd.CHILD_VARIANT_ERROR_CALLOUT,function(c){a.styleProvider.getStyleFunction(Ye,Ye.VARIANT_DANGER)(c)}))};
var cx=function(){};t["feathers.themes.steel.components.SteelToggleButtonStyles"]=cx;cx.__name__="feathers.themes.steel.components.SteelToggleButtonStyles";cx.initialize=function(a){if(a==null){var b=ac.get_fallbackTheme();a=b instanceof wc?b:null}a!=null&&(b=a.styleProvider,b.getStyleFunction(ed,null)==null&&b.setStyleFunction(ed,null,function(c){if(c.get_backgroundSkin()==null){var d=new ab;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 ab,d.set_fill(vb.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 dx=function(){};t["feathers.themes.steel.components.SteelToggleSwitchStyles"]=dx;dx.__name__="feathers.themes.steel.components.SteelToggleSwitchStyles";dx.initialize=function(a){if(a==null){var b=ac.get_fallbackTheme();
a=b instanceof wc?b:null}a!=null&&(b=a.styleProvider,b.getStyleFunction(Pk,null)==null&&b.setStyleFunction(Pk,null,function(c){var d=pc.isDesktop();if(c.get_trackSkin()==null){var f=new ab;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 zi;g.set_toggleable(!1);g.set_keepDownStateOnRollOut(!0);g.set_backgroundSkin(f);c.set_trackSkin(g)}c.get_thumbSkin()==null&&(f=new Ei,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 zi,g.set_toggleable(!1),g.set_keepDownStateOnRollOut(!0),g.set_backgroundSkin(f),c.set_thumbSkin(g));c.get_focusRectSkin()==null&&(f=new ab,f.set_fill(vb.None),f.set_border(a.getFocusBorder()),d?f.set_cornerRadius(12):f.set_cornerRadius(16),c.set_focusRectSkin(f))}))};var ex=function(){};t["feathers.themes.steel.components.SteelToolTipStyles"]=ex;ex.__name__="feathers.themes.steel.components.SteelToolTipStyles";ex.initialize=function(a){if(a==null){var b=
ac.get_fallbackTheme();a=b instanceof wc?b:null}a!=null&&(b=a.styleProvider,b.getStyleFunction(fa,el.CHILD_VARIANT_TOOL_TIP)==null&&b.setStyleFunction(fa,el.CHILD_VARIANT_TOOL_TIP,function(c){if(c.get_backgroundSkin()==null){var d=new ab;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 fx=function(){};t["feathers.themes.steel.components.SteelTreeGridViewStyles"]=fx;fx.__name__="feathers.themes.steel.components.SteelTreeGridViewStyles";fx.initialize=function(a){if(a==null){var b=ac.get_fallbackTheme();a=b instanceof wc?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 Fh,g.set_requestedRowCount(5),f.set_layout(g));f.get_backgroundSkin()==null&&(g=new ab,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 ab,g.set_fill(a.getThemeFill()),g.set_border(nc.None),g.set_width(2),g.set_height(2),f.set_columnResizeSkin(g));f.get_headerCornerSkin()==null&&(g=new ab,g.set_fill(a.getSubHeadingFill()),g.set_border(nc.None),f.set_headerCornerSkin(g));
f.get_focusRectSkin()==null&&(g=new ab,g.set_fill(vb.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 Fh,g.set_requestedRowCount(5),f.set_layout(g));f.get_backgroundSkin()==
null&&(g=new ab,g.set_fill(a.getContainerFill()),g.set_border(nc.None),g.set_width(10),g.set_height(10),f.set_backgroundSkin(g));f.get_columnResizeSkin()==null&&(g=new ab,g.set_fill(a.getThemeFill()),g.set_border(nc.None),g.set_width(2),g.set_height(2),f.set_columnResizeSkin(g));f.get_headerCornerSkin()==null&&(g=new ab,g.set_fill(a.getSubHeadingFill()),g.set_border(nc.None),f.set_headerCornerSkin(g));f.get_focusRectSkin()==null&&(g=new ab,g.set_fill(vb.None),g.set_border(a.getFocusBorder()),f.set_focusRectSkin(g));
f.set_showHeaderDividersOnlyWhenResizable(!0)};b=a.styleProvider;b.getStyleFunction(Ac,null)==null&&b.setStyleFunction(Ac,null,function(f){pc.isDesktop()?c(f):d(f)});b.getStyleFunction(Ac,Ac.VARIANT_BORDER)==null&&b.setStyleFunction(Ac,Ac.VARIANT_BORDER,c);b.getStyleFunction(Ac,Ac.VARIANT_BORDERLESS)==null&&b.setStyleFunction(Ac,Ac.VARIANT_BORDERLESS,d);b.getStyleFunction(Mf,Ac.CHILD_VARIANT_CELL_RENDERER)==null&&b.setStyleFunction(Mf,Ac.CHILD_VARIANT_CELL_RENDERER,function(f){var g=pc.isDesktop();
if(f.get_backgroundSkin()==null){var h=new ab;h.set_fill(vb.SolidColor(16711935,0));h.set_border(nc.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(Mf,null)(f)});b.getStyleFunction(Rc,Ac.CHILD_VARIANT_HEADER_RENDERER)==null&&b.setStyleFunction(Rc,Ac.CHILD_VARIANT_HEADER_RENDERER,function(f){var g=pc.isDesktop();if(f.get_backgroundSkin()==
null){var h=new ab;h.set_fill(a.getSubHeadingFill());h.set_border(nc.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(Vb.LEFT)});b.getStyleFunction(Wb,Ac.CHILD_VARIANT_HEADER_DIVIDER)==null&&b.setStyleFunction(Wb,Ac.CHILD_VARIANT_HEADER_DIVIDER,function(f){var g=pc.isDesktop();if(f.get_backgroundSkin()==null){var h=new Tp;h.set_fill(vb.SolidColor(16711935,0));
h.set_border(a.getSubHeadingDividerBorder());h.setBorderForState(Jc.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(bg,null)==null&&b.setStyleFunction(bg,null,function(f){var g=pc.isDesktop();if(f.get_backgroundSkin()==null){var h=new Zl;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 gx=function(){};t["feathers.themes.steel.components.SteelTreeViewStyles"]=gx;gx.__name__="feathers.themes.steel.components.SteelTreeViewStyles";gx.initialize=function(a){if(a==null){var b=ac.get_fallbackTheme();a=b instanceof wc?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 Fh,g.set_requestedRowCount(5),f.set_layout(g));f.get_backgroundSkin()==null&&(g=new ab,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 ab,g.set_fill(vb.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 Fh);f.get_backgroundSkin()==null&&(g=new ab,g.set_fill(a.getContainerFill()),g.set_border(nc.None),g.set_width(10),g.set_height(10),f.set_backgroundSkin(g));f.get_focusRectSkin()==null&&(g=new ab,g.set_fill(vb.None),g.set_border(a.getFocusBorder()),f.set_focusRectSkin(g))};b=a.styleProvider;b.getStyleFunction(he,null)==null&&b.setStyleFunction(he,null,function(f){pc.isDesktop()?
c(f):d(f)});b.getStyleFunction(he,he.VARIANT_BORDER)==null&&b.setStyleFunction(he,he.VARIANT_BORDER,c);b.getStyleFunction(he,he.VARIANT_BORDERLESS)==null&&b.setStyleFunction(he,he.VARIANT_BORDERLESS,d)}};var yw=function(){};t["feathers.themes.steel.components.SteelVDividedBoxStyles"]=yw;yw.__name__="feathers.themes.steel.components.SteelVDividedBoxStyles";yw.initialize=function(a){if(a==null){var b=ac.get_fallbackTheme();a=b instanceof wc?b:null}a!=null&&(b=a.styleProvider,b.getStyleFunction(Zh,null)==
null&&b.setStyleFunction(Zh,null,function(c){if(c.get_resizeDraggingSkin()==null){var d=new ab;d.set_fill(a.getThemeFill());d.set_border(nc.None);d.set_width(2);d.set_height(2);c.set_resizeDraggingSkin(d)}}))};var hx=function(){};t["feathers.themes.steel.components.SteelVProgressBarStyles"]=hx;hx.__name__="feathers.themes.steel.components.SteelVProgressBarStyles";hx.initialize=function(a){if(a==null){var b=ac.get_fallbackTheme();a=b instanceof wc?b:null}a!=null&&(b=a.styleProvider,b.getStyleFunction(Rn,
null)==null&&b.setStyleFunction(Rn,null,function(c){if(c.get_fillSkin()==null){var d=new ab;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 ab,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 tw=function(){};t["feathers.themes.steel.components.SteelVScrollBarStyles"]=tw;tw.__name__="feathers.themes.steel.components.SteelVScrollBarStyles";tw.initialize=function(a){if(a==null){var b=ac.get_fallbackTheme();a=b instanceof wc?b:null}a!=null&&(b=a.styleProvider,b.getStyleFunction(eh,null)==null&&b.setStyleFunction(eh,null,function(c){var d=pc.isDesktop();if(c.get_thumbSkin()==null){var f=new ab;f.set_fill(a.getScrollBarThumbFill());
f.set_disabledFill(a.getScrollBarThumbDisabledFill());f.set_border(nc.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 si;g.set_keepDownStateOnRollOut(!0);g.set_backgroundSkin(f);c.set_thumbSkin(g)}d&&c.get_trackSkin()==null&&(d=new ab,d.set_fill(a.getControlFill()),d.set_disabledFill(a.getControlDisabledFill()),d.set_border(nc.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(Wb,eh.CHILD_VARIANT_DECREMENT_BUTTON)==null&&b.setStyleFunction(Wb,eh.CHILD_VARIANT_DECREMENT_BUTTON,function(c){if(c.get_backgroundSkin()==null){var d=new ab;d.set_fill(a.getControlFill());d.set_disabledFill(a.getControlDisabledFill());d.setFillForState(Jc.DOWN,a.getReversedActiveThemeFill());d.set_border(nc.None);d.set_width(12);d.set_height(12);c.set_backgroundSkin(d)}c.get_icon()==
null&&(d=new Nf,d.set_pointPosition(pa.TOP),d.set_fill(vb.SolidColor(a.scrollBarThumbFillColor)),d.set_disabledFill(vb.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(Wb,eh.CHILD_VARIANT_INCREMENT_BUTTON)==null&&b.setStyleFunction(Wb,eh.CHILD_VARIANT_INCREMENT_BUTTON,
function(c){if(c.get_backgroundSkin()==null){var d=new ab;d.set_fill(a.getControlFill());d.set_disabledFill(a.getControlDisabledFill());d.setFillForState(Jc.DOWN,a.getReversedActiveThemeFill());d.set_border(nc.None);d.set_width(12);d.set_height(12);c.set_backgroundSkin(d)}c.get_icon()==null&&(d=new Nf,d.set_pointPosition(pa.BOTTOM),d.set_fill(vb.SolidColor(a.scrollBarThumbFillColor)),d.set_disabledFill(vb.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 ix=function(){};t["feathers.themes.steel.components.SteelVSliderStyles"]=ix;ix.__name__="feathers.themes.steel.components.SteelVSliderStyles";ix.initialize=function(a){if(a==null){var b=ac.get_fallbackTheme();a=b instanceof wc?b:null}a!=null&&(b=a.styleProvider,b.getStyleFunction(Sn,null)==null&&b.setStyleFunction(Sn,
null,function(c){var d=pc.isDesktop();if(c.get_thumbSkin()==null){var f=new Wb;f.set_styleProvider(null);f.set_keepDownStateOnRollOut(!0);var g=new Ei;g.set_fill(a.getButtonFill());g.set_disabledFill(a.getButtonDisabledFill());g.setFillForState(Jc.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 Ei;d.set_fill(vb.None);d.set_border(a.getFocusBorder());
f.set_focusRectSkin(d);c.set_thumbSkin(f)}c.get_trackSkin()==null&&(f=new Fi,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(pa.BOTTOM),f.set_width(8),f.set_height(100),c.set_trackSkin(f),c.get_secondaryTrackSkin()==null&&(f=new Fi,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(pa.TOP),f.set_width(8),f.set_height(100),c.set_secondaryTrackSkin(f)))}))};var Ql={fromFunction:function(a){return Kc.withFunction(a)},fromClass:function(a){return Kc.withClass(a)},fromDisplayObject:function(a){return Kc.withDisplayObject(a)}},Di=function(){};t["feathers.utils.DPadFocusUtil"]=Di;Di.__name__="feathers.utils.DPadFocusUtil";Di.isBetterFocusForRelativePosition=function(a,b,c,d){var f=a.getBounds(a.stage);
a=Di.calculateMinPrimaryAxisDistanceForRelativePosition(c,f,d);if(a==Infinity)return!1;var g=Di.calculateMaxPrimaryAxisDistanceForRelativePosition(c,f,d),h=Di.calculateSecondaryAxisDistanceForRelativePosition(c,f,d),n=Di.itemsAreOnSameAxis(c,f,d),l=Infinity,q=Infinity,v=Infinity;f=!1;b!=null&&(f=b.getBounds(b.stage),l=Di.calculateMinPrimaryAxisDistanceForRelativePosition(c,f,d),q=Di.calculateMaxPrimaryAxisDistanceForRelativePosition(c,f,d),v=Di.calculateSecondaryAxisDistanceForRelativePosition(c,
f,d),f=Di.itemsAreOnSameAxis(c,f,d));if(n&&f)return a>0?a<l:!1;b=d==pa.TOP||d==pa.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+v*v};Di.calculateSecondaryAxisDistanceForRelativePosition=function(a,b,c){return c==pa.TOP||c==pa.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))};Di.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};Di.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};Di.itemsAreOnSameAxis=function(a,b,c){return c==pa.TOP||c==pa.BOTTOM?a.x<=b.get_right()?b.x<=a.get_right():!1:a.y<=b.get_bottom()?b.y<=a.get_bottom():!1};var bl=function(){};t["feathers.utils.DateUtil"]=
bl;bl.__name__="feathers.utils.DateUtil";bl.getDaysInMonth=function(a,b){return a==1&&b!=null&&bl.isLeapYear(b)?bl.FEBRUARY_NUMBER_OF_DAYS_LEAP_YEAR:bl.MONTH_NUMBER_OF_DAYS[a]};bl.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 x.__cast(wa,Window).matchMedia(pc.MEDIA_QUERY_DESKTOP).matches};pc.isMobile=function(){return x.__cast(wa,Window).matchMedia(pc.MEDIA_QUERY_MOBILE).matches};
var Me=function(){};t["feathers.utils.DisplayObjectRecycler"]=Me;Me.__name__="feathers.utils.DisplayObjectRecycler";Me.withClass=function(a,b,c,d){d==null&&(d=function(g){x.__implements(g,Ea)&&g.dispose()});var f=new Me;f.create=function(){return Eb.createInstance(a,[])};f.update=b;f.reset=c;f.destroy=d;return f};Me.withFunction=function(a,b,c,d){var f=new Me;f.create=a;f.update=b;f.reset=c;f.destroy=d;return f};Me.withFactory=function(a,b,c){var d=new Me;d.create=m(a,a.create);d.update=b;d.reset=
c;d.destroy=m(a,a.destroy);return d};Me.__super__=Kc;Me.prototype=I(Kc.prototype,{update:function(a,b){},reset:function(a,b){},__class__:Me});var ah=function(){};t["feathers.utils.DisplayUtil"]=ah;ah.__name__="feathers.utils.DisplayUtil";ah.getDisplayObjectDepthFromStage=function(a){if(a.stage==null)return-1;for(var b=0;a.parent!=null;)a=a.parent,++b;return b};ah.getConcatenatedScaleX=function(a){if(a==null)throw new Db("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};ah.getConcatenatedScaleY=function(a){if(a==null)throw new Db("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};ah.getConcatenatedScale=function(a,b){if(a==null)throw new Db("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 Ca(c,d);b.setTo(c,d);return b};var pg=function(a,
b,c){b==null&&(b=pa.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=pa.LEFT;this._activeBorderSize=null;this._pullDistance=0;this._maxPullDistance=null;this.simulateTouch=!1;this.ease=Ah.easeOut;this.minDragDistance=6;this._active=this._dragging=!1;this.enabled=!0;
ma.call(this);this.set_target(a);this.set_pullableEdge(b);this.set_maxPullDistance(c)};t["feathers.utils.EdgePuller"]=pg;pg.__name__="feathers.utils.EdgePuller";pg.__super__=ma;pg.prototype=I(ma.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)?X.dispatch(this,"open"):X.dispatch(this,"close");return this._opened},setPullDistance:function(a){if(this._pullDistance==a)return this._pullDistance;this._pullDistance=
a;X.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 Db("Unknown pullable edge position: "+F.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 Db("Unknown pullable edge position: "+F.string(this._pullableEdge));}},getTouchScale:function(){switch(this._pullableEdge._hx_index){case 0:return ah.getConcatenatedScaleY(this._target);case 1:return ah.getConcatenatedScaleX(this._target);case 2:return ah.getConcatenatedScaleY(this._target);case 3:return ah.getConcatenatedScaleX(this._target);default:throw new Db("Unknown pullable edge position: "+F.string(this._pullableEdge));}},isInActiveBorder:function(a,
b,c){a=new Ca(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 Db("Unknown pullable edge position: "+F.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 Db("Unknown pullable edge position: "+F.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 Db("Unknown pullable edge position: "+F.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&&(xa.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 Ab){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==pa.RIGHT||this._pullableEdge==pa.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(La.getTimer())))},touchEnd:function(a,b){if(this._touchPointID!=null&&this._touchPointID==a&&this._touchPointIsSimulated==b&&(this.cleanupAfterDrag(),this._dragging)){for(var c=La.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?!X.dispatch(this,"closing",!1,!0):!X.dispatch(this,"opening",!1,!0))return this._dragging=this._active=!1,this.cleanupAfterDrag(),!1;if(this._target instanceof Ab){var a=this._target;this._restoreMouseChildren=a.mouseChildren;a.mouseChildren=!1}X.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 Ab&&(this._target.mouseChildren=this._restoreMouseChildren);var a=this._opened,b=this._pullDistance!=0;this.setOpened(b);b==a&&X.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)<=pg.MINIMUM_VELOCITY?this._pullDistance<b/2?0:b:a<0?0:b)},throwTo:function(a){var b=this;a!=null&&(this._animatePull!=
null&&(xa.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=xa.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(pg.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=
x.__cast(a.currentTarget,dd);this.touchMove(pg.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(pg.POINTER_ID_MOUSE,!0)},edgePuller_target_stage_touchBeginHandler:function(a){if(this._opened&&this.enabled&&this._touchPointID==null){var b=x.__cast(a.currentTarget,dd),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=x.__cast(a.currentTarget,dd),c=this.getMaxPullDistance(),d=new Ca(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 Db("Unknown pullable edge position: "+F.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=x.__cast(a.currentTarget,dd),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=x.__cast(a.currentTarget,dd);var b=this.getMaxPullDistance();this.isInActiveBorder(a.get_mouseX(),a.get_mouseY(),b)?this.touchBegin(pg.POINTER_ID_MOUSE,!0,a.get_mouseX(),a.get_mouseY()):(this._touchPointID=pg.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&&pg.POINTER_ID_MOUSE==this._touchPointID){a=x.__cast(a.currentTarget,dd);var b=this.getMaxPullDistance(),c=new Ca(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 Db("Unknown pullable edge position: "+F.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(pg.POINTER_ID_MOUSE,!0,a.get_mouseX(),a.get_mouseY())}},edgePuller_target_stage_mouseUpHandler2:function(a){this._touchPointIsSimulated&&
this._touchPointID!=null&&pg.POINTER_ID_MOUSE==this._touchPointID&&(a=x.__cast(a.currentTarget,dd),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__:pg,__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 Rd=function(a){this._touchClaims=new Qd;this._mouseClaim=null;this._stageListenerCount=
0;if(a==null)throw new Db("Stage cannot be null.");this._stage=a};t["feathers.utils.ExclusivePointer"]=Rd;Rd.__name__="feathers.utils.ExclusivePointer";Rd.forStage=function(a){if(a==null)throw new Db("Stage cannot be null.");var b=Rd.stageToObject.h[a.__id__];if(b!=null)return b;b=new Rd(a);Rd.stageToObject.set(a,b);return b};Rd.disposeForStage=function(a){var b=Rd.stageToObject.h[a.__id__];b!=null&&(b.dispose(),Rd.stageToObject.remove(a))};Rd.prototype={_stageListenerCount:null,_stage:null,_mouseClaim:null,
_touchClaims:null,claimTouch:function(a,b){if(b==null)throw new Db("Target cannot be null.");if(b.stage!=this._stage)throw new Db("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 Db("Target cannot be null.");if(a.stage!=this._stage)throw new Db("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=x.__cast(a.currentTarget,ka);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__:Rd};var Zn=function(){};t["feathers.utils.FocusUtil"]=Zn;Zn.__name__="feathers.utils.FocusUtil";Zn.findAllFocusableObjects=function(a,b){b==null&&(b=[]);x.__implements(a,od)&&a.get_focusEnabled()&&b.push(a);if(x.__implements(a,ti)){var c=a.get_focusExtrasBefore();if(c!=null)for(var d=0,f=c.length;d<f;){var g=d++;g=c[g];Zn.findAllFocusableObjects(g,b)}}if(x.__implements(a,od)){if(x.__implements(a,rg)&&
a.get_childFocusEnabled())for(c=x.__cast(a,Ab),d=0,f=c.get_numChildren();d<f;)g=d++,g=c.getChildAt(g),Zn.findAllFocusableObjects(g,b)}else if(a instanceof Ab)for(c=a,d=0,f=c.get_numChildren();d<f;)g=d++,g=c.getChildAt(g),Zn.findAllFocusableObjects(g,b);if(x.__implements(a,ti)&&(c=a.get_focusExtrasAfter(),c!=null))for(d=0,f=c.length;d<f;)g=d++,g=c[g],Zn.findAllFocusableObjects(g,b);return b};var Gn=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"]=Gn;Gn.__name__="feathers.utils.KeyToState";Gn.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;x.__implements(this._target,Bh)&&(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(x.__implements(this._target,od)){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__:Gn,__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(x.__implements(b,tb)){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 Nt=Q["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)};Nt.__constructs__=[Nt.Static,Nt.Capture];var Kh=function(){};t["feathers.utils.Path2EReg"]=Kh;Kh.__name__="feathers.utils.Path2EReg";Kh.parse=function(a){var b=new Xa("(\\\\.)|([\\/.])?(?:(?:\\:(\\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 v=h(3);n=h(4);var w=h(5),z=h(6),r=h(7),G=q==null?"/":q;g!=""&&(c.push(Nt.Static(g)),g="");v==null&&(d+=1,v=""+(d-1));c.push(Nt.Capture({name:v,prefix:q==null?"":q,delimiter:G,optional:z=="?"||z=="*",repeat:z=="+"||z=="*",partial:q!=null&&l!=""&&l!=q,asterisk:r!=null,pattern:Kh.escapeGroup(n==null?w==null?r==null?"[^"+G+"]+?":".*":w:n)}));
return""});f<a.length&&(g+=U.substr(a,f,null));g!=""&&c.push(Nt.Static(g));return c};Kh.tokensToEReg=function(a,b){b=Kh.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+=Kh.escapeString(h.token);break;case 1:h=h.key;var l=Kh.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?U.substr(f,0,f.length-2):f)+"(?:\\/(?=$))?");return new Xa("^"+(d?f+"$":f+(c&&g?"":"(?=\\/|$)")),Kh.flags(b))};Kh.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}};Kh.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};Kh.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};Kh.flags=function(a){return a.sensitive?"":"i"};Kh.encodeAsterisk=function(a){return(new Xa("[?#]","g")).map(a,function(b){b=b.matched(0);return"%"+N.hex(U.cca(b,0)).toUpperCase()})};Kh.toEReg=function(a,b){a=Kh.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:Kh.tokensToEReg(a,b),keys:c}};var zm=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"]=zm;zm.__name__="feathers.utils.PointerToState";zm.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&&x.__implements(this._target,Bh)&&(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=x.__cast(a.currentTarget,dd);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__:zm,__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 Rs=function(a,b){this._enabled=!0;this._target=this._eventFactory=null;this.set_target(a);this.set_eventFactory(b)};t["feathers.utils.PointerTrigger"]=Rs;Rs.__name__="feathers.utils.PointerTrigger";Rs.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()):
of.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()):of.dispatchFromTouchEvent(this._target,a))},__class__:Rs,__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 Ry=function(){};t["feathers.utils.PopUpUtil"]=Ry;Ry.__name__="feathers.utils.PopUpUtil";Ry.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 Ab&&f.contains(a))return!0}return!1};var Rl=function(){};t["feathers.utils.ScaleUtil"]=
Rl;Rl.__name__="feathers.utils.ScaleUtil";Rl.fitRectangle=function(a,b,c){var d=a.width,f=a.height;a=b.width;var g=b.height,h=Rl.scaleToFit(d,f,a,g);c==null&&(c=new Ha);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};Rl.fillRectangle=function(a,b,c){var d=a.width,f=a.height;a=b.width;var g=b.height,h=Rl.scaleToFill(d,f,a,g);c==null&&(c=new Ha);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};Rl.scaleToFit=function(a,b,c,d){a=c/a;b=d/b;return a<b?a:
b};Rl.scaleToFill=function(a,b,c,d){a=c/a;b=d/b;return a>b?a:b};var Sy=function(){this._buckets=[]};t["feathers.utils.ScreenDensityScaleCalculator"]=Sy;Sy.__name__="feathers.utils.ScreenDensityScaleCalculator";Sy.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 Db("Screen density cannot be added more than once: "+a);}d=this._buckets;a=new Ex(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){U.remove(this._buckets,d);break}}},getScale:function(a){if(this._buckets.length==0)throw new pb("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__:Sy};var Ex=function(a,b){this.density=
a;this.scale=b};t["feathers.utils._ScreenDensityScaleCalculator.ScreenDensityBucket"]=Ex;Ex.__name__="feathers.utils._ScreenDensityScaleCalculator.ScreenDensityBucket";Ex.prototype={density:null,scale:null,__class__:Ex};var Vi=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=Ah.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;ma.call(this);this.set_target(a)};t["feathers.utils.Scroller"]=Vi;Vi.__name__="feathers.utils.Scroller";
Vi.__super__=ma;Vi.prototype=I(ma.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;Kd.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;Kd.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;Kd.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;Kd.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=x.__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=x.__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&&Kd.dispatch(this,
"scroll",!1,!1,this._scrollX,this._scrollY)},stop:function(){this.animateScrollX!=null&&(xa.stop(this.animateScrollX,null,!1,!1),this.animateScrollX=null);this.animateScrollY!=null&&(xa.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&&xa.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=La.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&&xa.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=La.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&&(xa.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=xa.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&&(xa.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=xa.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)<=Vi.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)<=Vi.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-Vi.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 Ab){var a=this._target;this.restoreMouseChildren=a.mouseChildren;a.mouseChildren=!1}Kd.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 Ab&&(this._target.mouseChildren=this.restoreMouseChildren),Kd.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=La.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)),xa.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=
La.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)),xa.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&&(xa.stop(this.animateScrollX,null,!1,!1),this.animateScrollX=null);this.animateScrollY!=null&&(xa.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 Ab){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(La.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=La.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(Vi.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=x.__cast(a.currentTarget,dd);this.touchMove(Vi.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=Vi.POINTER_ID_MOUSE:(this._previousTouchPointID=null,a.stopImmediatePropagation()))},scroller_target_stage_mouseUpHandler:function(a){this.touchEnd(Vi.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__:Vi,__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 tg=function(){};t["feathers.utils.TextFormatUtil"]=tg;tg.__name__="feathers.utils.TextFormatUtil";tg.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 Xj=Q["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)};Xj.__constructs__=[Xj.CFunction,Xj.Module,Xj.FilePos,Xj.Method,Xj.LocalFunction];var Gi={callStack:function(){return Pb.toHaxe(Pb.callStack())},exceptionStack:function(a){a==
null&&(a=!1);var b=Pb.toHaxe(Pb.exceptionStack());return a?b:Gi.subtract(b,Gi.callStack())},toString:function(a){for(var b=new Za,c=0;c<a.length;){var d=a[c];++c;b.b+="\nCalled from ";Gi.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(Gi.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?Gi.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&&(Gi.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+=F.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}}},Z=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,Z),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"]=Z;Z.__name__="haxe.Exception";Z.caught=function(a){return a instanceof Z?a:a instanceof Error?
new Z(a.message,null,a):new Wp(a,null,a)};Z.thrown=function(a){if(a instanceof Z)return a.get_native();if(a instanceof Error)return a;a=new Wp(a);a.__skipStack++;return a};Z.__super__=Error;Z.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":Gi.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":Gi.toString(a))+b}else a=Gi.subtract(c.get_stack(),a.get_stack()),b="Exception: "+c.get_message()+(a==null?"null":Gi.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__:Z,__properties__:{get_native:"get_native",get_previous:"get_previous",get_stack:"get_stack",get_message:"get_message"}});var Zz={},Jb=function(a,b){this.high=a;this.low=b};t["haxe._Int64.___Int64"]=Jb;Jb.__name__="haxe._Int64.___Int64";
Jb.prototype={high:null,low:null,__class__:Jb};var ye=function(){};t["haxe.Log"]=ye;ye.__name__="haxe.Log";ye.formatOutput=function(a,b){var c=F.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+=", "+F.string(a)}return d+": "+c};ye.trace=function(a,b){a=ye.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=F.parseInt(g[3]);g=F.parseInt(g[4]);c.push(Xj.FilePos(n=="Anonymous function"?Xj.LocalFunction():n=="Global code"?null:Xj.Method(h.join("."),n),l,q,g))}else c.push(Xj.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=Xj.Method(f,g)):f=Xj.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(Xj.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 Eg=function(){this.buf=new Za;this.cache=[];this.useCache=Eg.USE_CACHE;this.useEnumIndex=Eg.USE_ENUM_INDEX;this.shash=new H;this.scount=0};t["haxe.Serializer"]=Eg;Eg.__name__="haxe.Serializer";Eg.run=function(a){var b=new Eg;b.serialize(a);return b.toString()};
Eg.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+=F.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=u.fields(a);b<c.length;){var d=c[b];++b;this.serializeString(d);this.serialize(u.field(a,d))}this.buf.b+="g"},serialize:function(a){var b=Eb.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:x.__instanceof(a,qw)?(a=a.__name__,this.buf.b+="A",this.serializeString(a)):x.__instanceof(a,Xz)?(this.buf.b+="B",this.serializeString(a.__ename__)):this.useCache&&this.serializeRef(a)||(this.buf.b+="o",this.serializeFields(a));break;case 5:throw Z.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+=F.string(a.getTime());break;case Qd: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 jb: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=u.field(c,"__id__");u.deleteField(c,"__id__");this.serialize(c);c.__id__=g;this.serialize(a.h[c.__id__])}this.buf.b+="h";break;case H: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 Na:this.buf.b+="s";this.buf.b+=F.string(Math.ceil(a.length*8/6));this.buf.b+=
":";b=0;c=a.length-2;g=Eg.BASE64_CODES;if(g==null){g=Array(Eg.BASE64.length);d=0;for(f=Eg.BASE64.length;d<f;){var h=d++;g[h]=U.cca(Eg.BASE64,h)}Eg.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+=F.string(this.useEnumIndex?"j":"w");this.serializeString(b.__ename__);this.useEnumIndex?(this.buf.b+=":",this.buf.b+=F.string(a._hx_index)):(b=a,this.serializeString(Q[b.__enum__].__constructs__[b._hx_index]._hx_name));this.buf.b+=":";c=Eb.enumParameters(a);this.buf.b+=F.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 Z.thrown("Cannot serialize "+F.string(a));}},__class__:Eg};var Ec=function(a){var b=
this;this.id=setInterval(function(){b.run()},a)};t["haxe.Timer"]=Ec;Ec.__name__="haxe.Timer";Ec.delay=function(a,b){var c=new Ec(b);c.run=function(){c.stop();a()};return c};Ec.measure=function(a,b){var c=(new Date).getTime()/1E3;a=a();ye.trace((new Date).getTime()/1E3-c+"s",b);return a};Ec.stamp=function(){return(new Date).getTime()/1E3};Ec.prototype={id:null,stop:function(){this.id!=null&&(clearInterval(this.id),this.id=null)},run:function(){},__class__:Ec};var Ot=function(){};t["haxe._Unserializer.DefaultResolver"]=
Ot;Ot.__name__="haxe._Unserializer.DefaultResolver";Ot.prototype={resolveClass:function(a){return t[a]},resolveEnum:function(a){return Q[a]},__class__:Ot};var Rg=function(a){this.buf=a;this.length=this.buf.length;this.pos=0;this.scache=[];this.cache=[];a=Rg.DEFAULT_RESOLVER;a==null&&(a=new Ot,Rg.DEFAULT_RESOLVER=a);this.resolver=a};t["haxe.Unserializer"]=Rg;Rg.__name__="haxe.Unserializer";Rg.initCodes=function(){for(var a=[],b=0,c=Rg.BASE64.length;b<c;){var d=b++;a[Rg.BASE64.charCodeAt(d)]=d}return a};
Rg.run=function(a){return(new Rg(a)).unserialize()};Rg.prototype={buf:null,pos:null,length:null,cache:null,scache:null,resolver:null,setResolver:function(a){a==null?(co.instance==null&&(co.instance=new co),this.resolver=co.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(U.substr(this.buf,a,this.pos-a))},unserializeObject:function(a){for(;;){if(this.pos>=this.length)throw Z.thrown("Invalid object");if(this.buf.charCodeAt(this.pos)==103)break;var b=this.unserialize();if(typeof b!="string")throw Z.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 Z.thrown("Invalid enum format");
var c=this.readDigits();if(c==0)return Eb.createEnum(a,b);for(var d=[];c-- >0;)d.push(this.unserialize());return Eb.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 Z.thrown("Class not found "+a);return b;case 66:a=this.unserialize();b=this.resolver.resolveEnum(a);if(b==null)throw Z.thrown("Enum not found "+a);return b;case 67:a=this.unserialize();b=this.resolver.resolveClass(a);if(b==
null)throw Z.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 Z.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 Z.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 H;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 Z.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 Z.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 Z.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 jb;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 Qd;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 Z.thrown("Invalid IntMap format");return a;case 114:a=this.readDigits();if(a<0||a>=this.cache.length)throw Z.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 Z.thrown("Invalid bytes length");d=Rg.CODES;d==null&&(d=Rg.initCodes(),Rg.CODES=d);b=this.pos;f=a&3;g=b+(a-f);h=new Na(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=U.strDate(U.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 Z.thrown("Enum not found "+a);b=this.unserializeEnum(c,this.unserialize());this.cache.push(b);return b;case 120:throw Z.thrown(this.unserialize());case 121:a=this.readDigits();if(this.buf.charCodeAt(this.pos++)!=58||this.length-this.pos<a)throw Z.thrown("Invalid string length");b=U.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 Z.thrown("Invalid char "+this.buf.charAt(this.pos)+" at position "+this.pos);},__class__:Rg};var co=function(){};t["haxe._Unserializer.NullResolver"]=co;co.__name__="haxe._Unserializer.NullResolver";co.prototype={resolveClass:function(a){return null},resolveEnum:function(a){return null},__class__:co};var Wp=function(a,b,c){Z.call(this,String(a),b,c);this.value=a;this.__skipStack++};t["haxe.ValueException"]=Wp;Wp.__name__="haxe.ValueException";Wp.__super__=
Z;Wp.prototype=I(Z.prototype,{value:null,unwrap:function(){return this.value},__class__:Wp});var $l=function(){this.a1=1;this.a2=0};t["haxe.crypto.Adler32"]=$l;$l.__name__="haxe.crypto.Adler32";$l.read=function(a){var b=new $l,c=a.readByte(),d=a.readByte(),f=a.readByte();a=a.readByte();b.a1=f<<8|a;b.a2=c<<8|d;return b};$l.make=function(a){var b=new $l;b.update(a,0,a.length);return b.get()};$l.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__:$l};var mc=function(a,b){mc.initTable();a!=null&&this.init(a,b)};t["haxe.crypto.Aes"]=mc;mc.__name__="haxe.crypto.Aes";mc.initTable=function(){mc.SBOX=Array(256);mc.RSBOX=Array(256);mc.SUB_BYTES_MIX_COLUMN_0=Array(256);mc.SUB_BYTES_MIX_COLUMN_1=Array(256);mc.SUB_BYTES_MIX_COLUMN_2=Array(256);
mc.SUB_BYTES_MIX_COLUMN_3=Array(256);mc.RSUB_BYTES_MIX_COLUMN_0=Array(256);mc.RSUB_BYTES_MIX_COLUMN_1=Array(256);mc.RSUB_BYTES_MIX_COLUMN_2=Array(256);mc.RSUB_BYTES_MIX_COLUMN_3=Array(256);mc.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;mc.SBOX[c]=f;mc.RSBOX[f]=c;var g=a[c],h=a[g],n=a[h],l=a[f]*257^Zz._mul(f,16843008);mc.SUB_BYTES_MIX_COLUMN_0[c]=l<<24|l>>>8;mc.SUB_BYTES_MIX_COLUMN_1[c]=
l<<16|l>>>16;mc.SUB_BYTES_MIX_COLUMN_2[c]=l<<8|l>>>24;mc.SUB_BYTES_MIX_COLUMN_3[c]=l;l=n*16843009^h*65537^g*257^c*16843008;mc.RSUB_BYTES_MIX_COLUMN_0[f]=l<<24|l>>>8;mc.RSUB_BYTES_MIX_COLUMN_1[f]=l<<16|l>>>16;mc.RSUB_BYTES_MIX_COLUMN_2[f]=l<<8|l>>>24;mc.RSUB_BYTES_MIX_COLUMN_3[f]=l;c==0?c=d=1:(c=g^a[a[a[n^g]]],d^=a[a[d]])}mc.RCON[0]=0;mc.RCON[1]=1;mc.RCON[2]=2;mc.RCON[3]=4;mc.RCON[4]=8;mc.RCON[5]=16;mc.RCON[6]=32;mc.RCON[7]=64;mc.RCON[8]=128;mc.RCON[9]=27;mc.RCON[10]=54};mc.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=mc.SBOX[f>>>24]<<24|
mc.SBOX[f>>>16&255]<<16|mc.SBOX[f>>>8&255]<<8|mc.SBOX[f&255],f^=mc.RCON[Math.floor(d/this.Nk)|0]<<24):this.Nk>6&&d%this.Nk==4&&(f=mc.SBOX[f>>>24]<<24|mc.SBOX[f>>>16&255]<<16|mc.SBOX[f>>>8&255]<<8|mc.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:mc.RSUB_BYTES_MIX_COLUMN_0[mc.SBOX[f>>>24]]^mc.RSUB_BYTES_MIX_COLUMN_1[mc.SBOX[f>>>
16&255]]^mc.RSUB_BYTES_MIX_COLUMN_2[mc.SBOX[f>>>8&255]]^mc.RSUB_BYTES_MIX_COLUMN_3[mc.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=Pt.pad(b,16);break;case "BitPadding":h=Xp.pad(b,16);break;case "ISO10126":h=Qt.pad(b,16);break;case "NoPadding":h=Rt.pad(b,16);break;case "NullPadding":h=St.pad(b,16);break;case "PKCS7":h=Tt.pad(b,16);break;case "SpacePadding":h=Ut.pad(b,16);break;case "TBC":h=Vt.pad(b,
16)}switch(a){case "cbc":Wt.encrypt(h,this.iv,16,m(this,this.encryptBlock));break;case "ccm":return ug.encrypt(h,this.iv,d,f,16,m(this,this.encryptBlock));case "cfb":Xt.encrypt(h,this.iv,16,m(this,this.encryptBlock));break;case "ctr":sk.encrypt(h,this.iv,16,m(this,this.encryptBlock));break;case "eax":return Lh.encrypt(h,this.key,this.iv,m(this,this.encryptBlock),g);case "ecb":Yt.encrypt(h,16,m(this,this.encryptBlock));break;case "gcm":return jf.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":Yp.encrypt(h,this.iv,16,m(this,this.encryptBlock));break;case "pcbc":Zt.encrypt(h,this.iv,16,m(this,this.encryptBlock));break;case "siv":return dg.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":Wt.decrypt(b,this.iv,16,m(this,this.decryptBlock));
break;case "ccm":return ug.decrypt(b,this.iv,d,f,16,m(this,this.encryptBlock));case "cfb":Xt.decrypt(b,this.iv,16,m(this,this.encryptBlock));break;case "ctr":sk.decrypt(b,this.iv,16,m(this,this.encryptBlock));break;case "eax":return Lh.decrypt(b,this.key,this.iv,m(this,this.encryptBlock),g);case "ecb":Yt.decrypt(b,16,m(this,this.decryptBlock));break;case "gcm":return jf.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":Yp.decrypt(b,this.iv,16,m(this,this.encryptBlock));break;case "pcbc":Zt.decrypt(b,this.iv,16,m(this,this.decryptBlock));break;case "siv":return dg.decrypt(this.key,b,this.iv,g,m(this,this.encryptBlock),m(this,this.init))}switch(c){case "AnsiX923":b=Pt.unpad(b);break;case "BitPadding":b=Xp.unpad(b);break;case "ISO10126":b=Qt.unpad(b);break;case "NoPadding":b=Rt.unpad(b);break;case "NullPadding":b=St.unpad(b);break;case "PKCS7":b=Tt.unpad(b);break;case "SpacePadding":b=
Ut.unpad(b);break;case "TBC":b=Vt.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,mc.SUB_BYTES_MIX_COLUMN_0,mc.SUB_BYTES_MIX_COLUMN_1,mc.SUB_BYTES_MIX_COLUMN_2,mc.SUB_BYTES_MIX_COLUMN_3,mc.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,mc.RSUB_BYTES_MIX_COLUMN_0,mc.RSUB_BYTES_MIX_COLUMN_1,mc.RSUB_BYTES_MIX_COLUMN_2,mc.RSUB_BYTES_MIX_COLUMN_3,mc.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],v=4,w,z,r,G=1,J=this.Nr;G<J;)G++,w=b[h>>>24]^c[n>>>16&255]^d[l>>>8&255]^f[q&255]^a[v++],z=b[n>>>24]^c[l>>>16&255]^d[q>>>8&255]^f[h&255]^a[v++],r=b[l>>>24]^c[q>>>16&255]^d[h>>>8&255]^f[n&255]^a[v++],q=b[q>>>24]^c[h>>>16&255]^d[n>>>8&255]^f[l&255]^a[v++],
h=w,n=z,l=r;w=(g[h>>>24]<<24|g[n>>>16&255]<<16|g[l>>>8&255]<<8|g[q&255])^a[v++];z=(g[n>>>24]<<24|g[l>>>16&255]<<16|g[q>>>8&255]<<8|g[h&255])^a[v++];r=(g[l>>>24]<<24|g[q>>>16&255]<<16|g[h>>>8&255]<<8|g[n&255])^a[v++];q=(g[q>>>24]<<24|g[h>>>16&255]<<16|g[n>>>8&255]<<8|g[l&255])^a[v++];this.state[0]=w;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__:mc,__properties__:{set_iv:"set_iv"}};var Na=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"]=Na;Na.__name__="haxe.io.Bytes";Na.ofString=function(a,b){if(b==Zp.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 Na(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 Na((new Uint8Array(c)).buffer)};Na.ofData=function(a){var b=a.hxBytes;return b!=null?b:new Na(a)};Na.ofHex=function(a){if((a.length&1)!=0)throw Z.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 Na((new Uint8Array(b)).buffer)};Na.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 Z.thrown(fi.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 Z.thrown(fi.OutsideBounds);return new Na(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 Z.thrown(fi.OutsideBounds);c==null&&(c=Zp.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(U.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__:Na};var Zp=Q["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}};Zp.__constructs__=[Zp.UTF8,Zp.RawNative];var pi=function(){};t["haxe.crypto.Base64"]=pi;
pi.__name__="haxe.crypto.Base64";pi.encode=function(a,b){b==null&&(b=!0);var c=(new $t(pi.BYTES)).encodeBytes(a).toString();if(b)switch(a.length%3){case 1:c+="==";break;case 2:c+="="}return c};pi.decode=function(a,b){b==null&&(b=!0);if(b)for(;U.cca(a,a.length-1)==61;)a=U.substr(a,0,-1);return(new $t(pi.BYTES)).decodeBytes(Na.ofString(a))};var $t=function(a){for(var b=a.length,c=1;b>1<<c;)++c;if(c>8||b!=1<<c)throw Z.thrown("BaseCode : base length must be a power of two.");this.base=a;this.nbits=c};
t["haxe.crypto.BaseCode"]=$t;$t.__name__="haxe.crypto.BaseCode";$t.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 Na(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 Na(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 Z.thrown("BaseCode : invalid encoded char");g|=q}h-=8;f.b[l++]=g>>h&255}return f},__class__:$t};var Qj=function(){};t["haxe.crypto.Md5"]=Qj;Qj.__name__="haxe.crypto.Md5";Qj.encode=function(a){var b=new Qj;a=b.doEncode(Qj.str2blks(a));return b.hex(a)};Qj.make=function(a){a=(new Qj).doEncode(Qj.bytes2blks(a));
var b=new Na(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};Qj.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};Qj.str2blks=function(a){var b=Na.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};Qj.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__:Qj};var Wt=function(){};t["haxe.crypto.mode.CBC"]=Wt;Wt.__name__="haxe.crypto.mode.CBC";Wt.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}};Wt.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 ug=function(){};t["haxe.crypto.mode.CCM"]=ug;ug.__name__="haxe.crypto.mode.CCM";ug.encrypt=function(a,b,c,d,f,g){if(b.length<7||b.length>13)throw Z.thrown("Nonce length must be between 7 and 13 bytes");if(d<4||d>16||(d&1)!=0)throw Z.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 Na(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=ug.createAuthBlocks(n,c,a,f);c=ug.computeCBCMac(c,f,g);a=ug.encryptCTR(b,a,f,g);b=ug.encryptTag(b,c,d,f,g);f=new Na(new ArrayBuffer(a.length+d));f.blit(0,a,0,a.length);f.blit(a.length,b,0,d);return f};ug.decrypt=function(a,b,c,d,f,g){if(b.length<7||b.length>13)throw Z.thrown("Nonce length must be between 7 and 13 bytes");if(d<4||d>16||
(d&1)!=0)throw Z.thrown("Tag length must be even and between 4 and 16 bytes");if(a.length<d)throw Z.thrown("Ciphertext too short for specified tag length");var h=a.length-d,n=a.sub(0,h);a=a.sub(h,d);n=ug.encryptCTR(b,n,f,g);var l=(c.length>0?64:0)|d-2>>1<<3|15-b.length-1;h=new Na(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=ug.createAuthBlocks(h,c,n,f);c=ug.computeCBCMac(c,f,g);b=ug.encryptTag(b,c,d,f,g);if(!ug.constantTimeCompare(b,a))throw Z.thrown("Authentication failed");
return n};ug.createAuthBlocks=function(a,b,c,d){var f=[];f.push(a);if(b.length>0){a=ug.formatAuthData(b);b=0;for(var g=a.length;g>0;){var h=new Na(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 Na(new ArrayBuffer(d)),n=g<d?g:d,h.blit(0,c,b,n),f.push(h),b+=d,g-=d;return f};ug.computeCBCMac=function(a,b,c){for(var d=new Na(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};
ug.formatAuthData=function(a){if(a.length==0)return new Na(new ArrayBuffer(0));var b=a.length;if(b<65280){var c=new Na(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 Na(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 Na(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};
ug.encryptCTR=function(a,b,c,d){if(b.length==0)return new Na(new ArrayBuffer(0));var f=new Na(new ArrayBuffer(b.length)),g=new Na(new ArrayBuffer(c)),h=new Na(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,v=15;q>0;)g.b[v]=q&255,q>>>=8,--v;d(g,0,h,0);q=0;for(v=l<c?l:c;q<v;){var w=q++;f.b[a+w]=b.b[a+w]^h.b[w]}a+=c;l-=c;++n}return f};ug.encryptTag=function(a,b,c,d,f){var g=new Na(new ArrayBuffer(d));g.b[0]=15-a.length-1;g.blit(1,a,0,a.length);
a=new Na(new ArrayBuffer(d));f(g,0,a,0);f=new Na(new ArrayBuffer(c));for(g=0;g<c;)d=g++,f.b[d]=b.b[d]^a.b[d];return f};ug.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 Xt=function(){};t["haxe.crypto.mode.CFB"]=Xt;Xt.__name__="haxe.crypto.mode.CFB";Xt.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}};Xt.decrypt=function(a,b,c,d){var f=b.sub(0,b.length),g=0,h=a.length;for(b=new Na(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 Of=function(){};t["haxe.crypto.mode.CMAC"]=Of;Of.__name__="haxe.crypto.mode.CMAC";Of.calculate=function(a,b){Of.aes==null?Of.aes=new mc(b):Of.aes.init(b);return Of.generate(a,b,16,(B=Of.aes,m(B,B.encryptBlock)))};Of.generate=function(a,b,c,d){b=Of.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 Na(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 Na(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 Na(new ArrayBuffer(c));f=0;for(g=n-1;f<g;){n=f++*c;for(var q=0,v=c;q<v;)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};Of.verify=function(a,b,c,d){d==null&&(Of.aes==null?Of.aes=new mc(c):Of.aes.init(c),
d=(B=Of.aes,m(B,B.encryptBlock)));a=Of.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};Of.generateSubkeys=function(a,b,c){if(b==16)a=135;else if(b==8)a=27;else throw Z.thrown("Unsupported block size for CMAC");var d=(new Na(new ArrayBuffer(b))).sub(0,b);c(d,0,d,0);c=Of.leftShiftOnebit(d);(d.b[0]&128)!=0&&(c.b[b-1]^=a);d=Of.leftShiftOnebit(c);(c.b[0]&128)!=0&&(d.b[b-1]^=a);return{k1:c,k2:d}};Of.leftShiftOnebit=function(a){for(var b=
new Na(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 sk=function(){};t["haxe.crypto.mode.CTR"]=sk;sk.__name__="haxe.crypto.mode.CTR";sk.encrypt=function(a,b,c,d){var f=new Na(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}};sk.decrypt=function(a,b,
c,d){sk.encrypt(a,b,c,d)};var Lh=function(){};t["haxe.crypto.mode.EAX"]=Lh;Lh.__name__="haxe.crypto.mode.EAX";Lh.encrypt=function(a,b,c,d,f){c=Lh.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 Na(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=Lh.omac(1,g,b,d)}else f=Lh.omac(1,new Na(new ArrayBuffer(0)),b,d);sk.encrypt(a,c,16,d);d=Lh.omac(2,a,b,d);b=new Na(new ArrayBuffer(16));for(h=0;h<16;)n=h++,
b.b[n]=c.b[n]^f.b[n]^d.b[n];c=new Na(new ArrayBuffer(a.length+16));c.blit(0,a,0,a.length);c.blit(a.length,b,0,16);return c};Lh.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=Lh.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 Na(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=Lh.omac(1,n,b,d)}else f=Lh.omac(1,new Na(new ArrayBuffer(0)),b,d);b=Lh.omac(2,
h,b,d);l=new Na(new ArrayBuffer(16));for(g=0;g<16;)n=g++,l.b[n]=c.b[n]^f.b[n]^b.b[n];if(!Lh.constantTimeEquals(a,l))return null;a=new Na(new ArrayBuffer(h.length));a.blit(0,h,0,h.length);sk.decrypt(a,c,16,d);return a};Lh.omac=function(a,b,c,d){for(var f=new Na(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 Of.generate(f,c,16,d)};Lh.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 Yt=function(){};t["haxe.crypto.mode.ECB"]=Yt;Yt.__name__="haxe.crypto.mode.ECB";Yt.encrypt=function(a,b,c){for(var d=0,f=a.length;d<f;)c(a,d,a,d),d+=b};Yt.decrypt=function(a,b,c){for(var d=0,f=a.length;d<f;)c(a,d,a,d),d+=b};var jf=function(){};t["haxe.crypto.mode.GCM"]=jf;jf.__name__="haxe.crypto.mode.GCM";jf.encrypt=function(a,b,c,d,f,g){if(d<4||d>16)throw Z.thrown("Tag length must be between 4 and 16 bytes (32-128 bits)");c==null&&(c=new Na(new ArrayBuffer(0)));
var h=new Na(new ArrayBuffer(f));g(new Na(new ArrayBuffer(f)),0,h,0);b=jf.calculateJ0(h,b);var n=jf.incrementCounter(b);a=a.sub(0,a.length);sk.encrypt(a,n,f,g);c=jf.calculateTag(h,c,a,b,g);f=new Na(new ArrayBuffer(a.length+d));f.blit(0,a,0,a.length);f.blit(a.length,c,0,d);return f};jf.decrypt=function(a,b,c,d,f,g){if(d<4||d>16)throw Z.thrown("Tag length must be between 4 and 16 bytes (32-128 bits)");if(a.length<d)throw Z.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 Na(new ArrayBuffer(f));g(new Na(new ArrayBuffer(f)),0,h,0);b=jf.calculateJ0(h,b);c=jf.calculateTag(h,c,n,b,g).sub(0,d);if(!jf.constantTimeCompare(c,a))throw Z.thrown("Authentication failed");c=jf.incrementCounter(b);n=n.sub(0,n.length);sk.encrypt(n,c,f,g);return n};jf.calculateJ0=function(a,b){if(b.length==12){var c=new Na(new ArrayBuffer(16));c.blit(0,b,0,12);c.b[15]=1}else{c=new Na(new ArrayBuffer(16));c=jf.ghashUpdate(a,c,b);var d=new Na(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=jf.ghashUpdate(a,c,d)}return c};jf.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};jf.calculateTag=function(a,b,c,d,f){a=jf.ghash(a,b,c);b=new Na(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};jf.ghash=function(a,b,c){var d=new Na(new ArrayBuffer(16));b.length>0&&(d=jf.ghashUpdate(a,d,b));c.length>0&&(d=jf.ghashUpdate(a,d,c));var f=new Na(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=jf.gmult(d,a)};jf.ghashUpdate=function(a,b,c){b=b.sub(0,16);for(var d=0,f=c.length;f>0;){var g=new Na(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=jf.gmult(b,a);d+=16;f-=16}return b};jf.xorBytes=function(a,b){for(var c=new Na(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};jf.gmult=function(a,b){var c=new Na(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};jf.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 Z.thrown("Invalid key length");if(b.length!=cc.NONCE_SIZE)throw Z.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 Na(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 Z.thrown("Invalid key length");if(b.length!=cc.NONCE_SIZE)throw Z.thrown("Invalid nonce length");
if(c.length<cc.AES_BLOCK_SIZE)throw Z.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),v=cc.subKey(2,h?3:5,b,f);g(v);h=new Na(new ArrayBuffer(n));n>0&&(h.blit(0,l,0,n),cc.aesCTR(v,c,l,h,f));d=cc.hash(v,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 Na(new ArrayBuffer(cc.AES_BLOCK_SIZE));
f.blit(f.length-c.length,c,0,c.length);c=new Na(new ArrayBuffer(b-a+1<<3));var g=new Na(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 Na(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 Na(new ArrayBuffer(cc.AES_BLOCK_SIZE)),a.blit(0,d,n,h),cc.updateBlockPolyval(a,0));a=new Na(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 Na(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 Jb(a^f<<31>>8&-520093696,d);cc.h1=new Jb(c,b);cc.s0=new Jb(0,0);cc.s1=new Jb(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 Na(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 Jb(b.high^f,b.low^g);b=cc.s0;var h=new Jb(b.high^d,b.low^c);g=new Jb(cc.h0.high,cc.h0.low);c=
new Jb(cc.h1.high,cc.h1.low);d=new Jb(0,0);b=new Jb(0,0);for(var n=0;n<64;){n++;a=63;a&=63;var l=a==0?new Jb(h.high,h.low):a<32?new Jb(h.high>>a,h.high<<32-a|h.low>>>a):new Jb(h.high>>31,h.high>>a-32),q=a=0;if(l.high!=a||l.low!=q)d=new Jb(d.high^g.high,d.low^g.low),b=new Jb(b.high^c.high,b.low^c.low);a=0;q=1;a&=c.high;q&=c.low;l=0;var v=1;l&=g.high;v&=g.low;g=new Jb(g.high>>>1,g.low>>>1|(g.high&1)<<31);c=new Jb(c.high>>>1,c.low>>>1|(c.high&1)<<31);var w=63;w&=63;l=w==0?new Jb(l,v):w<32?new Jb(l<<
w|v>>>32-w,v<<w):new Jb(v<<w-32,0);c=new Jb(c.high^l.high,c.low^l.low);v=l=0;if(a!=l||q!=v)a=cc.E,g=new Jb(g.high^a.high,g.low^a.low);a=1;a&=63;h=a==0?new Jb(h.high,h.low):a<32?new Jb(h.high<<a|h.low>>>32-a,h.low<<a):new Jb(h.low<<a-32,0)}for(n=64;n<127;){n++;a=63;a&=63;l=a==0?new Jb(f.high,f.low):a<32?new Jb(f.high>>a,f.high<<32-a|f.low>>>a):new Jb(f.high>>31,f.high>>a-32);q=a=0;if(l.high!=a||l.low!=q)d=new Jb(d.high^g.high,d.low^g.low),b=new Jb(b.high^c.high,b.low^c.low);a=0;q=1;a&=c.high;q&=c.low;
l=0;v=1;l&=g.high;v&=g.low;g=new Jb(g.high>>>1,g.low>>>1|(g.high&1)<<31);c=new Jb(c.high>>>1,c.low>>>1|(c.high&1)<<31);w=63;w&=63;l=w==0?new Jb(l,v):w<32?new Jb(l<<w|v>>>32-w,v<<w):new Jb(v<<w-32,0);c=new Jb(c.high^l.high,c.low^l.low);v=l=0;if(a!=l||q!=v)a=cc.E,g=new Jb(g.high^a.high,g.low^a.low);a=1;a&=63;f=a==0?new Jb(f.high,f.low):a<32?new Jb(f.high<<a|f.low>>>32-a,f.low<<a):new Jb(f.low<<a-32,0)}a=63;f=a==0?new Jb(f.high,f.low):a<32?new Jb(f.high>>a,f.high<<32-a|f.low>>>a):new Jb(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 Jb(d.high^a,d.low^q),a=c.high&f.high,q=c.low&f.low,cc.s1=new Jb(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 Na(new ArrayBuffer(b.length));a.blit(0,b,0,b.length);a.b[a.length-1]|=128;b=new Na(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 Jb(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 Yp=function(){};t["haxe.crypto.mode.OFB"]=Yp;Yp.__name__="haxe.crypto.mode.OFB";Yp.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}};Yp.decrypt=function(a,b,c,d){Yp.encrypt(a,
b,c,d)};var Zt=function(){};t["haxe.crypto.mode.PCBC"]=Zt;Zt.__name__="haxe.crypto.mode.PCBC";Zt.encrypt=function(a,b,c,d){b=b.sub(0,b.length);for(var f=0,g=a.length,h=new Na(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}};Zt.decrypt=function(a,b,c,d){b=b.sub(0,b.length);for(var f=0,g=a.length,h=new Na(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 dg=function(){};t["haxe.crypto.mode.SIV"]=dg;dg.__name__="haxe.crypto.mode.SIV";dg.encrypt=function(a,b,c,d,f,g){d==null&&(d=[]);if(b.length>2147483631)throw Z.thrown("Text to encrypt is too long");if(a.length!=64&&a.length!=48&&a.length!=32)throw Z.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=dg.s2v(n,b,d,c,f,g);b=dg.computeCtr(b,h,d,f,g);f=new Na(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};dg.decrypt=function(a,b,c,d,f,g){if(a.length!=64&&a.length!=48&&a.length!=32)throw Z.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 Z.thrown("Input length must be greater than or equal 16");h=b.sub(0,16);b=b.sub(16,b.length-16);b=dg.computeCtr(b,l,h,f,g);d=dg.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};dg.computeCtr=function(a,b,c,d,f){var g=new Na(new ArrayBuffer(16));g.blit(0,c,0,16);g.b[8]&=127;g.b[12]&=127;f(b,c);sk.encrypt(a,g,16,d);return a};dg.s2v=function(a,b,c,d,f,g){if(c.length>126)throw Z.thrown("Too many associatedData fields");g(a,d);g=Of.generate(new Na(new ArrayBuffer(16)),a,16,f);for(var h=0;h<c.length;){var n=c[h];++h;n=Of.generate(n,a,16,f);g=dg.dbl(g);g=dg.xor(g,n)}d!=null&&(n=Of.generate(d,a,16,f),g=dg.dbl(g),g=dg.xor(g,n));b.length>=16?b=dg.xorend(b,
g):(b=Xp.pad(b,16),b=dg.xor(dg.dbl(g),b));return Of.generate(b,a,16,f)};dg.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};dg.dbl=function(a){var b=new Na(new ArrayBuffer(a.length)),c=dg.shiftLeft(a,b);b.b[a.length-1]^=-c&135;return b};dg.xor=function(a,b){if(a.length>b.length)throw Z.thrown("in1.length must be <= in2.length");for(var c=new Na(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};dg.xorend=
function(a,b){if(a.length<b.length)throw Z.thrown("in1.length must be >= in2.length");var c=new Na(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 Pt=function(){};t["haxe.crypto.padding.AnsiX923"]=Pt;Pt.__name__="haxe.crypto.padding.AnsiX923";Pt.pad=function(a,b){b=b-a.length%b-1;var c=a.length+b,d=new Na(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};
Pt.unpad=function(a){return a.sub(0,a.length-a.b[a.length-1])};var Xp=function(){};t["haxe.crypto.padding.BitPadding"]=Xp;Xp.__name__="haxe.crypto.padding.BitPadding";Xp.pad=function(a,b){b=a.length+(b-a.length%b-1)+1;var c=new Na(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};Xp.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 Qt=function(){};t["haxe.crypto.padding.ISO10126"]=Qt;Qt.__name__=
"haxe.crypto.padding.ISO10126";Qt.pad=function(a,b){b=b-a.length%b-1;var c=a.length+b,d=new Na(new ArrayBuffer(c+1));d.blit(0,a,0,a.length);for(a=a.length;a<c;){var f=a++,g=F.random(256);d.b[f]=g}d.b[c]=b+1;return d};Qt.unpad=function(a){return a.sub(0,a.length-a.b[a.length-1])};var Rt=function(){};t["haxe.crypto.padding.NoPadding"]=Rt;Rt.__name__="haxe.crypto.padding.NoPadding";Rt.pad=function(a,b){return a.sub(0,a.length)};Rt.unpad=function(a){return a};var St=function(){};t["haxe.crypto.padding.NullPadding"]=
St;St.__name__="haxe.crypto.padding.NullPadding";St.pad=function(a,b){b=a.length+(b-a.length%b);var c=new Na(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};St.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 Tt=function(){};t["haxe.crypto.padding.PKCS7"]=Tt;Tt.__name__="haxe.crypto.padding.PKCS7";Tt.pad=function(a,b){if(b>255)throw Z.thrown("PKCS#7 padding cannot be longer than 255 bytes");if(b<0)throw Z.thrown("PKCS#7 padding size must be positive");
b-=a.length%b;var c=a.length+b,d=new Na(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};Tt.unpad=function(a){var b=a.b[a.length-1];if(b>a.length)throw Z.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 Z.thrown("Invalid padding value. Got "+a.b[g]+", expected "+b+" at position "+g);}return a.sub(0,c)};var Ut=function(){};t["haxe.crypto.padding.SpacePadding"]=
Ut;Ut.__name__="haxe.crypto.padding.SpacePadding";Ut.pad=function(a,b){b=a.length+(b-a.length%b);var c=new Na(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};Ut.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 Vt=function(){};t["haxe.crypto.padding.TBC"]=Vt;Vt.__name__="haxe.crypto.padding.TBC";Vt.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 Na(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};Vt.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 Kf=function(){};t["haxe.ds.ArraySort"]=Kf;Kf.__name__="haxe.ds.ArraySort";Kf.sort=function(a,b){Kf.rec(a,b,0,a.length)};Kf.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)Kf.swap(a,g-1,g);else break;--g}}else Kf.rec(a,b,c,f),Kf.rec(a,b,f,d),Kf.doMerge(a,b,c,f,d,f-c,d-
f)};Kf.doMerge=function(a,b,c,d,f,g,h){if(g!=0&&h!=0)if(g+h==2)b(a[d],a[c])<0&&Kf.swap(a,d,c);else{if(g>h){var n=g>>1;var l=c+n;var q=Kf.lower(a,b,d,f,l);var v=q-d}else v=h>>1,q=d+v,l=Kf.upper(a,b,c,d,q),n=l-c;Kf.rotate(a,b,l,d,q);d=l+v;Kf.doMerge(a,b,c,l,d,n,v);Kf.doMerge(a,b,d,q,f,g-n,h-v)}};Kf.rotate=function(a,b,c,d,f){if(c!=d&&d!=f)for(b=Kf.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}};Kf.gcd=function(a,b){for(;b!=0;){var c=
a%b;a=b;b=c}return a};Kf.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};Kf.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};Kf.swap=function(a,b,c){var d=a[b];a[b]=a[c];a[c]=d};var gl=function(){};t["haxe.ds.BalancedTree"]=gl;gl.__name__="haxe.ds.BalancedTree";gl.__interfaces__=[ha];gl.iteratorLoop=function(a,b){a!=null&&(gl.iteratorLoop(a.left,b),b.push(a.value),gl.iteratorLoop(a.right,
b))};gl.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 Z.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=
[];gl.iteratorLoop(this.root,a);return new Ag(a)},keyValueIterator:function(){return new Cl(this)},keys:function(){var a=[];this.keysLoop(this.root,a);return new Ag(a)},setLoop:function(a,b,c){if(c==null)return new gi(null,a,b,null);var d=this.compare(a,c.key);if(d==0)return new gi(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 Z.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 Z.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 gi(a.left,a.key,a.value,new gi(a.right,b,c,d)):new gi(new gi(a.left,a.key,a.value,a.right.left),a.right.key,a.right.value,new gi(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 gi(new gi(a,b,c,d.left),d.key,d.value,d.right):new gi(new gi(a,b,c,d.left.left),d.left.key,d.left.value,new gi(d.left.right,d.key,d.value,d.right))):new gi(a,b,c,d,(f>g?f:g)+1)},compare:function(a,b){return u.compare(a,b)},clear:function(){this.root=null},__class__:gl};var gi=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"]=gi;gi.__name__="haxe.ds.TreeNode";gi.prototype={left:null,right:null,key:null,value:null,_height:null,__class__:gi};var cf=function(){};t["haxe.ds.EnumValueMap"]=cf;cf.__name__="haxe.ds.EnumValueMap";cf.__interfaces__=[ha];cf.__super__=gl;cf.prototype=I(gl.prototype,{compare:function(a,b){var c=a._hx_index-b._hx_index;if(c!=0)return c;a=Eb.enumParameters(a);b=Eb.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 u.isEnumValue(a)&&u.isEnumValue(b)?this.compare(a,b):a instanceof Array&&b instanceof Array?this.compareArgs(a,b):u.compare(a,b)},__class__:cf});var sc=function(a,b){this.elt=a;this.next=b};t["haxe.ds.GenericCell"]=sc;sc.__name__="haxe.ds.GenericCell";
sc.prototype={elt:null,next:null,__class__:sc};var Fx=function(){};t["haxe.ds.GenericStack"]=Fx;Fx.__name__="haxe.ds.GenericStack";Fx.prototype={head:null,__class__:Fx};var Qd=function(){this.h={}};t["haxe.ds.IntMap"]=Qd;Qd.__name__="haxe.ds.IntMap";Qd.__interfaces__=[ha];Qd.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 Ag(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 Cl(this)},__class__:Qd};var Xq=function(a,b){this.item=a;this.next=b};t["haxe.ds._List.ListNode"]=Xq;Xq.__name__="haxe.ds._List.ListNode";Xq.prototype={item:null,next:null,__class__:Xq};var bw=function(a){this.head=a};t["haxe.ds._List.ListIterator"]=
bw;bw.__name__="haxe.ds._List.ListIterator";bw.prototype={head:null,hasNext:function(){return this.head!=null},next:function(){var a=this.head.item;this.head=this.head.next;return a},__class__:bw};var H=function(){this.h=Object.create(null)};t["haxe.ds.StringMap"]=H;H.__name__="haxe.ds.StringMap";H.__interfaces__=[ha];H.stringify=function(a){var b="[",c=!0,d;for(d in a)c?c=!1:b+=",",b+=d+" => "+F.string(a[d]);return b+"]"};H.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 ar(this.h)},iterator:function(){return new $p(this.h)},keyValueIterator:function(){return new Gx(this.h)},__class__:H};var ar=function(a){this.h=a;this.keys=Object.keys(a);this.length=this.keys.length;this.current=0};t["haxe.ds._StringMap.StringMapKeyIterator"]=ar;ar.__name__="haxe.ds._StringMap.StringMapKeyIterator";
ar.prototype={h:null,keys:null,length:null,current:null,hasNext:function(){return this.current<this.length},next:function(){return this.keys[this.current++]},__class__:ar};var $p=function(a){this.h=a;this.keys=Object.keys(a);this.length=this.keys.length;this.current=0};t["haxe.ds._StringMap.StringMapValueIterator"]=$p;$p.__name__="haxe.ds._StringMap.StringMapValueIterator";$p.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__:$p};var Gx=function(a){this.h=a;this.keys=Object.keys(a);this.length=this.keys.length;this.current=0};t["haxe.ds._StringMap.StringMapKeyValueIterator"]=Gx;Gx.__name__="haxe.ds._StringMap.StringMapKeyValueIterator";Gx.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__:Gx};var eo=function(a,b,c){Z.call(this,a,b);this.posInfos=c==null?{fileName:"(unknown)",
lineNumber:0,className:"(unknown)",methodName:"(unknown)"}:c;this.__skipStack++};t["haxe.exceptions.PosException"]=eo;eo.__name__="haxe.exceptions.PosException";eo.__super__=Z;eo.prototype=I(Z.prototype,{posInfos:null,toString:function(){return""+Z.prototype.toString.call(this)+" in "+this.posInfos.className+"."+this.posInfos.methodName+" at "+this.posInfos.fileName+":"+this.posInfos.lineNumber},__class__:eo});var vn=function(a,b,c){a==null&&(a="Not implemented");eo.call(this,a,b,c);this.__skipStack++};
t["haxe.exceptions.NotImplementedException"]=vn;vn.__name__="haxe.exceptions.NotImplementedException";vn.__super__=eo;vn.prototype=I(eo.prototype,{__class__:vn});var In=function(a){this.str=a;this.pos=0};t["haxe.format.JsonParser"]=In;In.__name__="haxe.format.JsonParser";In.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(U.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 Za);d=this.str;var f=this.pos-a-1;b.b+=f==null?U.substr(d,a,null):U.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=F.parseInt("0x"+U.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 Z.thrown("Invalid escape sequence \\"+String.fromCodePoint(d)+" at position "+(this.pos-1));}a=this.pos}else if(d!=d)throw Z.thrown("Unclosed string");}c!=-1&&(b.b+=String.fromCodePoint(65533));if(b==null)return U.substr(this.str,
a,this.pos-a-1);d=this.str;f=this.pos-a-1;b.b+=f==null?U.substr(d,a,null):U.substr(d,a,f);return b.b},invalidChar:function(){this.pos--;throw Z.thrown("Invalid char "+this.str.charCodeAt(this.pos)+" at position "+this.pos);},invalidNumber:function(a){throw Z.thrown("Invalid number at position "+a+": "+U.substr(this.str,a,this.pos-a));},__class__:In};var Bg=function(a,b){this.replacer=a;this.indent=b;this.pretty=b!=null;this.nind=0;this.buf=new Za};t["haxe.format.JsonPrinter"]=Bg;Bg.__name__="haxe.format.JsonPrinter";
Bg.print=function(a,b,c){b=new Bg(b,c);b.write("",a);return b.buf.b};Bg.prototype={buf:null,replacer:null,indent:null,pretty:null,nind:null,write:function(a,b){this.replacer!=null&&(b=this.replacer(a,b));a=Eb.typeof(b);switch(a._hx_index){case 0:this.buf.b+="null";break;case 1:this.buf.b+=F.string(b);break;case 2:b=isFinite(b)?F.string(b):"null";this.buf.b+=F.string(b);break;case 3:this.buf.b+=F.string(b);break;case 4:this.fieldsString(b,u.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+=F.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+=
F.string(f)))}this.buf.b+=String.fromCodePoint(93)}else if(a==H){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,u.fields(b))}else a==Date?this.quote(U.dateStr(b)):this.classString(b);break;case 7:f=b._hx_index;this.buf.b+=F.string(f==null?"null":""+f);break;case 8:this.buf.b+='"???"'}},classString:function(a){this.fieldsString(a,Eb.getInstanceFields(x.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=u.field(a,n);if(!u.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+=F.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+=F.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__:Bg};var aq=function(){this.size=this.pos=0};t["haxe.io.BytesBuffer"]=aq;aq.__name__="haxe.io.BytesBuffer";aq.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 Z.thrown(fi.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 Na(new ArrayBuffer(0));var a=new Na(this.buffer);a.length=this.pos;return a},__class__:aq};var au=
function(){};t["haxe.io.Input"]=au;au.__name__="haxe.io.Input";au.prototype={bigEndian:null,readByte:function(){throw new vn(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 Z.thrown(fi.OutsideBounds);try{for(;d>0;)f[b]=this.readByte(),++b,--d}catch(g){if(Pb.lastError=g,!(Z.caught(g).unwrap()instanceof bq))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 Z.thrown(fi.Blocked);b+=d;c-=d}},read:function(a){for(var b=new Na(new ArrayBuffer(a)),c=0;a>0;){var d=this.readBytes(b,c,a);if(d==0)throw Z.thrown(fi.Blocked);c+=d;a-=d}return b},readFloat:function(){return pf.i32ToFloat(this.readInt32())},readDouble:function(){var a=this.readInt32(),b=this.readInt32();return this.bigEndian?pf.i64ToDouble(b,a):pf.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 Na(new ArrayBuffer(a));this.readFullBytes(c,0,a);return c.getString(0,a,b)},__class__:au,__properties__:{set_bigEndian:"set_bigEndian"}};var fo=function(a,
b,c){b==null&&(b=0);c==null&&(c=a.length-b);if(b<0||c<0||b+c>a.length)throw Z.thrown(fi.OutsideBounds);this.b=a.b;this.pos=b;this.totlen=this.len=c};t["haxe.io.BytesInput"]=fo;fo.__name__="haxe.io.BytesInput";fo.__super__=au;fo.prototype=I(au.prototype,{b:null,pos:null,len:null,totlen:null,readByte:function(){if(this.len==0)throw Z.thrown(new bq);this.len--;return this.b[this.pos++]},readBytes:function(a,b,c){if(b<0||c<0||b+c>a.length)throw Z.thrown(fi.OutsideBounds);if(this.len==0&&c>0)throw Z.thrown(new bq);
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__:fo});var bu=function(){};t["haxe.io.Output"]=bu;bu.__name__="haxe.io.Output";bu.prototype={bigEndian:null,writeByte:function(a){throw new vn(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 Z.thrown(fi.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 Z.thrown(fi.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=pf.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 Z.thrown(fi.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=Na.ofString(a,b);this.writeFullBytes(a,0,a.length)},__class__:bu,__properties__:{set_bigEndian:"set_bigEndian"}};var cq=function(){this.b=
new aq};t["haxe.io.BytesOutput"]=cq;cq.__name__="haxe.io.BytesOutput";cq.__super__=bu;cq.prototype=I(bu.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__:cq});var bq=function(){};t["haxe.io.Eof"]=bq;bq.__name__="haxe.io.Eof";bq.prototype={toString:function(){return"Eof"},__class__:bq};var fi=Q["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)};fi.__constructs__=[fi.Blocked,fi.Overflow,fi.OutsideBounds,fi.Custom];var pf=function(){};t["haxe.io.FPHelper"]=pf;pf.__name__="haxe.io.FPHelper";pf.i32ToFloat=
function(a){pf.helper.setInt32(0,a,!0);return pf.helper.getFloat32(0,!0)};pf.floatToI32=function(a){pf.helper.setFloat32(0,a,!0);return pf.helper.getInt32(0,!0)};pf.i64ToDouble=function(a,b){pf.helper.setInt32(0,a,!0);pf.helper.setInt32(4,b,!0);return pf.helper.getFloat64(0,!0)};pf.doubleToI64=function(a){var b=pf.i64tmp;pf.helper.setFloat64(0,a,!0);b.low=pf.helper.getInt32(0,!0);b.high=pf.helper.getInt32(4,!0);return b};var mA={fromBytes:function(a,b,c){b==null&&(b=0);c==null&&(c=a.length-b>>2);
return new Float32Array(a.b.bufferValue,b,c)}},Fg=function(a){switch(a){case ".":case "..":this.dir=a;this.file="";return}var b=a.lastIndexOf("/"),c=a.lastIndexOf("\\");b<c?(this.dir=U.substr(a,0,c),a=U.substr(a,c+1,null),this.backslash=!0):c<b?(this.dir=U.substr(a,0,b),a=U.substr(a,b+1,null)):this.dir=null;b=a.lastIndexOf(".");b!=-1?(this.ext=U.substr(a,b+1,null),this.file=U.substr(a,0,b)):(this.ext=null,this.file=a)};t["haxe.io.Path"]=Fg;Fg.__name__="haxe.io.Path";Fg.withoutDirectory=function(a){a=
new Fg(a);a.dir=null;return a.toString()};Fg.directory=function(a){a=new Fg(a);return a.dir==null?"":a.dir};Fg.extension=function(a){a=new Fg(a);return a.ext==null?"":a.ext};Fg.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__:Fg};var Ag=function(a){this.current=0;this.array=a};t["haxe.iterators.ArrayIterator"]=Ag;Ag.__name__="haxe.iterators.ArrayIterator";Ag.prototype=
{array:null,current:null,hasNext:function(){return this.current<this.array.length},next:function(){return this.array[this.current++]},__class__:Ag};var $q=function(a){this.current=0;this.array=a};t["haxe.iterators.ArrayKeyValueIterator"]=$q;$q.__name__="haxe.iterators.ArrayKeyValueIterator";$q.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__:$q};var Cl=function(a){this.map=
a;this.keys=a.keys()};t["haxe.iterators.MapKeyValueIterator"]=Cl;Cl.__name__="haxe.iterators.MapKeyValueIterator";Cl.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__:Cl};var hg=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"]=hg;hg.__name__="haxe.xml.XmlParserException";hg.prototype={message:null,lineNumber:null,positionAtLine:null,position:null,xml:null,toString:function(){return x.getClass(this).__name__+": "+this.message+" at line "+this.lineNumber+" char "+this.positionAtLine},__class__:hg};var Dl=function(){};t["haxe.xml.Parser"]=Dl;Dl.__name__="haxe.xml.Parser";Dl.parse=function(a,b){b==null&&(b=!1);var c=ib.createDocument();Dl.doParse(a,b,0,c);return c};Dl.doParse=function(a,b,c,
d){c==null&&(c=0);for(var f=null,g=1,h=1,n=null,l=0,q=0,v=0,w=new Za,z=1,r=-1;c<a.length;){var G=a.charCodeAt(c);switch(g){case 0:switch(G){case 9:case 10:case 13:case 32:break;default:g=h;continue}break;case 1:if(G==60)g=0,h=2;else{l=c;g=13;continue}break;case 2:switch(G){case 33:if(a.charCodeAt(c+1)==91){c+=2;if(U.substr(a,c,6).toUpperCase()!="CDATA[")throw Z.thrown(new hg("Expected <![CDATA[",a,c));c+=5;g=17}else if(a.charCodeAt(c+1)==68||a.charCodeAt(c+1)==100){if(U.substr(a,c+2,6).toUpperCase()!=
"OCTYPE")throw Z.thrown(new hg("Expected <!DOCTYPE",a,c));c+=8;g=16}else{if(a.charCodeAt(c+1)!=45||a.charCodeAt(c+2)!=45)throw Z.thrown(new hg("Expected \x3c!--",a,c));c+=2;g=15}l=c+1;break;case 47:if(d==null)throw Z.thrown(new hg("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(!(G>=97&&G<=122||G>=65&&G<=90||G>=48&&G<=57||G==58||G==46||G==95||G==45)){if(c==l)throw Z.thrown(new hg("Expected node name",a,c));f=ib.createElement(U.substr(a,
l,c-l));d.addChild(f);++q;g=0;h=4;continue}break;case 4:switch(G){case 47:g=11;break;case 62:g=9;break;default:g=5;l=c;continue}break;case 5:if(!(G>=97&&G<=122||G>=65&&G<=90||G>=48&&G<=57||G==58||G==46||G==95||G==45)){if(l==c)throw Z.thrown(new hg("Expected attribute name",a,c));n=U.substr(a,l,c-l);if(f.exists(n))throw Z.thrown(new hg("Duplicate attribute ["+n+"]",a,c));g=0;h=6;continue}break;case 6:if(G==61)g=0,h=7;else throw Z.thrown(new hg("Expected =",a,c));break;case 7:switch(G){case 34:case 39:w=
new Za;g=8;l=c+1;r=G;break;default:throw Z.thrown(new hg('Expected "',a,c));}break;case 8:switch(G){case 38:z=c-l;w.b+=z==null?U.substr(a,l,null):U.substr(a,l,z);g=18;z=8;l=c+1;break;case 60:case 62:if(b)throw Z.thrown(new hg("Invalid unescaped "+String.fromCodePoint(G)+" in attribute value",a,c));G==r&&(h=c-l,w.b+=h==null?U.substr(a,l,null):U.substr(a,l,h),h=w.b,w=new Za,f.set(n,h),g=0,h=4);break;default:G==r&&(h=c-l,w.b+=h==null?U.substr(a,l,null):U.substr(a,l,h),h=w.b,w=new Za,f.set(n,h),g=0,h=
4)}break;case 9:l=c=Dl.doParse(a,b,c,f);g=1;break;case 10:if(!(G>=97&&G<=122||G>=65&&G<=90||G>=48&&G<=57||G==58||G==46||G==95||G==45)){if(l==c)throw Z.thrown(new hg("Expected node name",a,c));h=U.substr(a,l,c-l);if(d==null||d.nodeType!=0)throw Z.thrown(new hg("Unexpected </"+h+">, tag is not open",a,c));if(d.nodeType!=ib.Element)throw Z.thrown("Bad node type, expected Element but found "+(d.nodeType==null?"null":bc.toString(d.nodeType)));if(h!=d.nodeName){if(d.nodeType!=ib.Element)throw Z.thrown("Bad node type, expected Element but found "+
(d.nodeType==null?"null":bc.toString(d.nodeType)));throw Z.thrown(new hg("Expected </"+d.nodeName+">",a,c));}g=0;h=12;continue}break;case 11:if(G==62)g=1;else throw Z.thrown(new hg("Expected >",a,c));break;case 12:if(G==62)return q==0&&d.addChild(ib.createPCData("")),c;throw Z.thrown(new hg("Expected >",a,c));case 13:G==60?(h=c-l,w.b+=h==null?U.substr(a,l,null):U.substr(a,l,h),h=ib.createPCData(w.b),w=new Za,d.addChild(h),++q,g=0,h=2):G==38&&(z=c-l,w.b+=z==null?U.substr(a,l,null):U.substr(a,l,z),
g=18,z=13,l=c+1);break;case 14:G==63&&a.charCodeAt(c+1)==62&&(++c,g=U.substr(a,l+1,c-l-2),d.addChild(ib.createProcessingInstruction(g)),++q,g=1);break;case 15:G==45&&a.charCodeAt(c+1)==45&&a.charCodeAt(c+2)==62&&(d.addChild(ib.createComment(U.substr(a,l,c-l))),++q,c+=2,g=1);break;case 16:G==91?++v:G==93?--v:G==62&&v==0&&(d.addChild(ib.createDocType(U.substr(a,l,c-l))),++q,g=1);break;case 17:G==93&&a.charCodeAt(c+1)==93&&a.charCodeAt(c+2)==62&&(g=ib.createCData(U.substr(a,l,c-l)),d.addChild(g),++q,
c+=2,g=1);break;case 18:if(G==59){l=U.substr(a,l,c-l);if(l.charCodeAt(0)==35)l=l.charCodeAt(1)==120?F.parseInt("0"+U.substr(l,1,l.length-1)):F.parseInt(U.substr(l,1,l.length-1)),w.b+=String.fromCodePoint(l);else if(Object.prototype.hasOwnProperty.call(Dl.escapes.h,l))w.b+=F.string(Dl.escapes.h[l]);else{if(b)throw Z.thrown(new hg("Undefined entity: "+l,a,c));w.b+=F.string("&"+l+";")}l=c+1;g=z}else if(!(G>=97&&G<=122||G>=65&&G<=90||G>=48&&G<=57||G==58||G==46||G==95||G==45)&&G!=35){if(b)throw Z.thrown(new hg("Invalid character in entity: "+
String.fromCodePoint(G),a,c));w.b+=String.fromCodePoint(38);g=c-l;w.b+=g==null?U.substr(a,l,null):U.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!=ib.Element)throw Z.thrown("Bad node type, expected Element but found "+(d.nodeType==null?"null":bc.toString(d.nodeType)));throw Z.thrown(new hg("Unclosed node <"+d.nodeName+">",a,c));}if(c!=l||q==0)z=c-l,w.b+=z==null?U.substr(a,l,null):U.substr(a,l,z),d.addChild(ib.createPCData(w.b));return c}if(!b&&g==18&&
z==13)return w.b+=String.fromCodePoint(38),z=c-l,w.b+=z==null?U.substr(a,l,null):U.substr(a,l,z),d.addChild(ib.createPCData(w.b)),c;throw Z.thrown(new hg("Unexpected end",a,c));};var wn=function(a){this.output=new Za;this.pretty=a};t["haxe.xml.Printer"]=wn;wn.__name__="haxe.xml.Printer";wn.print=function(a,b){b==null&&(b=!1);b=new wn(b);b.writeNode(a,"");return b.output.b};wn.prototype={output:null,pretty:null,writeNode:function(a,b){switch(a.nodeType){case 0:this.output.b+=F.string(b+"<");if(a.nodeType!=
ib.Element)throw Z.thrown("Bad node type, expected Element but found "+(a.nodeType==null?"null":bc.toString(a.nodeType)));this.output.b+=F.string(a.nodeName);for(var c=a.attributes();c.hasNext();){var d=c.next();this.output.b+=F.string(" "+d+'="');d=N.htmlEscape(a.get(d),!0);this.output.b+=F.string(d);this.output.b+='"'}if(this.hasChildren(a)){this.output.b+=">";this.pretty&&(this.output.b+="\n");if(a.nodeType!=ib.Document&&a.nodeType!=ib.Element)throw Z.thrown("Bad node type, expected Element or Document but found "+
(a.nodeType==null?"null":bc.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+=F.string(b+"</");if(a.nodeType!=ib.Element)throw Z.thrown("Bad node type, expected Element but found "+(a.nodeType==null?"null":bc.toString(a.nodeType)));this.output.b+=F.string(a.nodeName);this.output.b+=">"}else this.output.b+="/>";this.pretty&&(this.output.b+="\n");break;case 1:if(a.nodeType==ib.Document||a.nodeType==ib.Element)throw Z.thrown("Bad node type, unexpected "+
(a.nodeType==null?"null":bc.toString(a.nodeType)));a=a.nodeValue;a.length!=0&&(d=b+N.htmlEscape(a),this.output.b+=F.string(d),this.pretty&&(this.output.b+="\n"));break;case 2:this.output.b+=F.string(b+"<![CDATA[");if(a.nodeType==ib.Document||a.nodeType==ib.Element)throw Z.thrown("Bad node type, unexpected "+(a.nodeType==null?"null":bc.toString(a.nodeType)));this.output.b+=F.string(a.nodeValue);this.output.b+="]]\x3e";this.pretty&&(this.output.b+="\n");break;case 3:if(a.nodeType==ib.Document||a.nodeType==
ib.Element)throw Z.thrown("Bad node type, unexpected "+(a.nodeType==null?"null":bc.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+=F.string(d);this.pretty&&(this.output.b+="\n");break;case 4:if(a.nodeType==ib.Document||a.nodeType==ib.Element)throw Z.thrown("Bad node type, unexpected "+(a.nodeType==null?"null":bc.toString(a.nodeType)));this.output.b+=F.string("<!DOCTYPE "+a.nodeValue+">");
this.pretty&&(this.output.b+="\n");break;case 5:if(a.nodeType==ib.Document||a.nodeType==ib.Element)throw Z.thrown("Bad node type, unexpected "+(a.nodeType==null?"null":bc.toString(a.nodeType)));this.output.b+=F.string("<?"+a.nodeValue+"?>");this.pretty&&(this.output.b+="\n");break;case 6:if(a.nodeType!=ib.Document&&a.nodeType!=ib.Element)throw Z.thrown("Bad node type, expected Element or Document but found "+(a.nodeType==null?"null":bc.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!=ib.Document&&a.nodeType!=ib.Element)throw Z.thrown("Bad node type, expected Element or Document but found "+(a.nodeType==null?"null":bc.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==ib.Document||c.nodeType==ib.Element)throw Z.thrown("Bad node type, unexpected "+(c.nodeType==null?"null":bc.toString(c.nodeType)));if(N.ltrim(c.nodeValue).length!=
0)return!0}}return!1},__class__:wn};var go=Q["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}};go.__constructs__=[go.FUnknown,go.FInfoZipUnicodePath,go.FUtf8];var Yj=Q["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)};Yj.__constructs__=[Yj.Found,Yj.NeedBit,Yj.NeedBits];var Hx=function(){};t["haxe.zip.HuffTools"]=Hx;Hx.__name__="haxe.zip.HuffTools";Hx.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 Z.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,Yj.NeedBit(this.treeCompress(a.left),
this.treeCompress(b));throw Z.thrown("assert");}for(var c=[],d=0,f=1<<b;d<f;)d++,c.push(Yj.Found(-1));this.treeWalk(c,0,0,b,a);return Yj.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 Z.thrown("Invalid huffman");var f=c<<5|d;if(a.h.hasOwnProperty(f))return Yj.Found(a.h[f]);c<<=1;++d;return Yj.NeedBit(this.treeMake(a,
b,c,d),this.treeMake(a,b,c|1,d))},make:function(a,b,c,d){if(c==1)return Yj.NeedBit(Yj.Found(0),Yj.Found(0));var f=[],g=[];if(d>32)throw Z.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 Z.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 Qd;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(Yj.NeedBit(this.treeMake(f,d,0,1),this.treeMake(f,
d,1,1)))},__class__:Hx};var Ix=function(a){this.buffer=new Na(new ArrayBuffer(65536));this.pos=0;a&&(this.crc=new $l)};t["haxe.zip._InflateImpl.Window"]=Ix;Ix.__name__="haxe.zip._InflateImpl.Window";Ix.prototype={buffer:null,pos:null,crc:null,slide:function(){this.crc!=null&&this.crc.update(this.buffer,0,32768);var a=new Na(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__:Ix};var Pf=Q["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}};Pf.__constructs__=[Pf.Head,Pf.Block,Pf.CData,Pf.Flat,Pf.Crc,Pf.Dist,Pf.DistOne,Pf.Done];var Sg=function(a,b,c){c==null&&(c=!0);b==null&&(b=!0);this.isFinal=!1;this.htools=new Hx;this.huffman=this.buildFixedHuffman();this.huffdist=null;this.dist=this.len=0;this.state=b?Pf.Head:Pf.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 Ix(c)};t["haxe.zip.InflateImpl"]=Sg;Sg.__name__="haxe.zip.InflateImpl";Sg.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(Sg.FIXED_HUFFMAN!=null)return Sg.FIXED_HUFFMAN;for(var a=[],b=0;b<288;){var c=b++;a.push(c<=143?8:c<=255?9:c<=279?7:8)}Sg.FIXED_HUFFMAN=this.htools.make(a,0,288,10);return Sg.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 Z.thrown("Invalid data");for(;c<f;)a[c]=d,++c;break;case 17:c+=3+this.getBits(3);if(c>b)throw Z.thrown("Invalid data");break;case 18:c+=11+this.getBits(7);if(c>b)throw Z.thrown("Invalid data");break;default:throw Z.thrown("Invalid data");}}},inflateLoop:function(){switch(this.state._hx_index){case 0:var a=
this.input.readByte();if((a&15)!=8)throw Z.thrown("Invalid data");var b=this.input.readByte(),c=(b&32)!=0;if(((a<<8)+b)%31!=0)throw Z.thrown("Invalid data");if(c)throw Z.thrown("Unsupported dictionary");this.state=Pf.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 Z.thrown("Invalid data");this.state=Pf.Flat;a=this.inflateLoop();this.resetBits();return a;case 1:return this.huffman=this.buildFixedHuffman(),
this.huffdist=null,this.state=Pf.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[Sg.CODE_LENGTHS_POS[g]]=this.getBits(3)}c=d;for(f=19;c<f;)g=c++,this.lengths[Sg.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=Pf.CData;return!0;default:throw Z.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?Pf.Crc:Pf.Block;else{b-=257;a=Sg.LEN_EXTRA_BITS_TBL[b];if(a==-1)throw Z.thrown("Invalid data");this.len=Sg.LEN_BASE_VAL_TBL[b]+this.getBits(a);b=this.huffdist==null?this.getRevBits(5):this.applyHuffman(this.huffdist);a=Sg.DIST_EXTRA_BITS_TBL[b];if(a==-1)throw Z.thrown("Invalid data");this.dist=Sg.DIST_BASE_VAL_TBL[b]+this.getBits(a);if(this.dist>this.window.available())throw Z.thrown("Invalid data");
this.state=this.dist==1?Pf.DistOne:Pf.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?Pf.Crc:Pf.Block),this.needed>0;case 4:a=this.window.checksum();if(a==null)return this.state=Pf.Done,!0;b=$l.read(this.input);if(!a.equals(b))throw Z.thrown("Invalid CRC");this.state=Pf.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=Pf.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=Pf.CData),this.needed>0;case 7:return!1}},__class__:Sg};var dq=function(a){this.i=a};t["haxe.zip.Reader"]=dq;dq.__name__="haxe.zip.Reader";dq.readZip=function(a){return(new dq(a)).read()};dq.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 jb;a>0;){if(a<4)throw Z.thrown("Invalid extra fields data");var c=this.i.readUInt16(),d=this.i.readUInt16();if(a<d)throw Z.thrown("Invalid extra fields data");if(c==28789){var f=this.i.readByte();if(f!=1){var g=new aq;g.addByte(f);g.add(this.i.read(d-1));b.add(go.FUnknown(c,g.getBytes()))}else c=this.i.readInt32(),f=this.i.read(d-5).toString(),b.add(go.FInfoZipUnicodePath(f,c))}else b.add(go.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 Z.thrown("Invalid Zip Data");a.readUInt16();b=a.readUInt16();var c=(b&2048)!=0;if((b&63473)!=0)throw Z.thrown("Unsupported flags "+b);var d=a.readUInt16(),f=d!=0;if(f&&d!=8)throw Z.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(go.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 jb,b=null;;){var c=this.readEntryHeader();if(c==null)break;if(c.crc32==null){if(c.compressed){b==null&&(b=new Na(new ArrayBuffer(65536)));for(var d=new aq,f=new Sg(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__:dq};var Hi=Q["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)};Hi.__constructs__=[Hi.CInt,Hi.CFloat,Hi.CString];var $a=Q["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)};$a.__constructs__=[$a.EConst,$a.EIdent,$a.EVar,$a.EParent,$a.EBlock,$a.EField,$a.EBinop,$a.EUnop,$a.ECall,$a.EIf,$a.EWhile,$a.EFor,$a.EBreak,$a.EContinue,$a.EFunction,$a.EReturn,$a.EArray,$a.EArrayDecl,$a.ENew,$a.EThrow,$a.ETry,$a.EObject,$a.ETernary,$a.ESwitch,$a.EDoWhile,$a.EMeta,$a.ECheckType,$a.EForGen,$a.ECast];var Tg=Q["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)};Tg.__constructs__=[Tg.CTPath,
Tg.CTFun,Tg.CTAnon,Tg.CTParent,Tg.CTOpt,Tg.CTNamed,Tg.CTExpr];var Id=Q["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)};Id.__constructs__=[Id.EInvalidChar,Id.EUnexpected,Id.EUnterminatedString,
Id.EUnterminatedComment,Id.EInvalidPreprocessor,Id.EUnknownVariable,Id.EInvalidIterator,Id.EInvalidOp,Id.EInvalidAccess,Id.ECustom];var Qm=Q["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)};Qm.__constructs__=[Qm.DPackage,Qm.DImport,Qm.DClass,Qm.DTypedef];var Zj=Q["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}};Zj.__constructs__=[Zj.APublic,Zj.APrivate,Zj.AInline,Zj.AOverride,Zj.AStatic,
Zj.AMacro];var Jx=Q["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)};Jx.__constructs__=[Jx.KFunction,Jx.KVar];var xj=Q["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}};xj.__constructs__=[xj.SBreak,xj.SContinue,xj.SReturn];var iw=function(){this.locals=new H;this.declared=[];this.resetVariables();this.initOps()};t["hscript.Interp"]=iw;iw.__name__="hscript.Interp";iw.prototype={variables:null,locals:null,binops:null,depth:null,inTry:null,
declared:null,returnValue:null,resetVariables:function(){var a=this;this.variables=new H;this.variables.h["null"]=null;this.variables.h["true"]=!0;this.variables.h["false"]=!1;var b=this.variables,c=u.makeVarArgs(function(d){var f=a.posInfos(),g=d.shift();d.length>0&&(f.customParams=d);ye.trace(F.string(g),f)});b.h.trace=c},posInfos:function(){return{fileName:"hscript",lineNumber:0}},initOps:function(){var a=this;this.binops=new H;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 x.__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);x.__implements(c,ha)?x.__cast(c,ha).set(a,b):c[a]=b;break;default:throw c=Id.EInvalidOp("="),Z.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);x.__implements(c,ha)?(b=b(x.__cast(c,ha).get(a),this.expr(d)),x.__cast(c,ha).set(a,b)):(b=b(c[a],this.expr(d)),c[a]=b);break;default:throw a=Id.EInvalidOp(a),Z.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),x.__implements(a,ha)?(f=x.__cast(a,ha).get(d),b?(f+=c,x.__cast(a,ha).set(d,f)):x.__cast(a,ha).set(d,f+c)):(f=a[d],b?(f+=c,a[d]=f):a[d]=f+c),f;default:throw a=Id.EInvalidOp(c>0?"++":"--"),Z.thrown(a);}},execute:function(a){this.depth=0;this.locals=new H;this.declared=[];return this.exprReturn(a)},exprReturn:function(a){try{return this.expr(a)}catch(b){if(Pb.lastError=b,a=Z.caught(b).unwrap(),
x.__instanceof(a,xj))switch(a._hx_index){case 0:throw Z.thrown("Invalid break");case 1:throw Z.thrown("Invalid continue");case 2:return a=this.returnValue,this.returnValue=null,a}else throw b;}},duplicate:function(a){for(var b=new H,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 Z.thrown(a);},rethrow:function(a){throw Z.thrown(a);},resolve:function(a){var b=
this.variables.h[a];if(b==null&&!Object.prototype.hasOwnProperty.call(this.variables.h,a))throw a=Id.EUnknownVariable(a),Z.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=Id.EInvalidOp(d),Z.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=Id.EInvalidOp(d),Z.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=Id.EInvalidAccess(a),Z.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 Z.thrown(xj.SBreak);
case 13:throw Z.thrown(xj.SContinue);case 14:g=a.ret;n=a.args;var l=a.e,q=a.name,v=this.duplicate(this.locals),w=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 P=Id.ECustom(L);throw Z.thrown(P);}var V=[],ia=L.length-z,ea=0;for(P=0;P<n.length;){var ra=n[P];++P;ra.opt?ia>0?(V.push(L[ea++]),--ia):V.push(null):V.push(L[ea++])}L=
V}V=w.locals;ia=w.depth;w.depth++;w.locals=w.duplicate(v);P=0;for(ea=n.length;P<ea;)ra=P++,w.locals.h[n[ra].name]={r:L[ra]};P=null;L=b.declared.length;if(b.inTry)try{P=w.exprReturn(l)}catch(za){throw Pb.lastError=za,P=Z.caught(za).unwrap(),b.restore(L),w.locals=V,w.depth=ia,Z.thrown(P);}else P=w.exprReturn(l);b.restore(L);w.locals=V;w.depth=ia;return P};f=u.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,v.h[q]=
g));return f;case 15:throw f=a.e,this.returnValue=f==null?null:this.expr(f),Z.thrown(xj.SReturn);case 16:return f=a.e,g=a.index,d=this.expr(f),f=this.expr(g),x.__implements(d,ha)?x.__cast(d,ha).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=Id.ECustom("Invalid map key=>value expression"),Z.thrown(g);else throw f=
Id.ECustom("Invalid map key=>value expression"),Z.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,Z.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=Z.caught(L).unwrap();if(x.__instanceof(f,
xj))throw this.inTry=c,Z.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),G=!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){G=!0;break}if(G){r=this.expr(c.expr);break}}G||(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=Id.ECustom("Invalid for expression"),Z.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=Z.caught(g).unwrap();if(x.__instanceof(f,xj))switch(f._hx_index){case 0:d=!1;break;case 2:throw Z.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=Z.caught(g).unwrap();if(x.__instanceof(f,xj))switch(f._hx_index){case 0:d=!1;break;case 2:throw Z.thrown(f);}else throw g;}if(!d)break}this.restore(c)},makeIterator:function(a){if(a instanceof Array)return new Ag(a);a.iterator!=null&&(a=Ka(a));if(a.hasNext==null||a.next==null)throw a=Id.EInvalidIterator(a),Z.thrown(a);return a},makeKeyValueIterator:function(a){if(a instanceof Array)return new $q(a);a.keyValueIterator!=null&&(a=a instanceof Array?U.keyValueIter(a):a.keyValueIterator());if(a.hasNext==
null||a.next==null)throw a=Id.EInvalidIterator(a),Z.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=Z.caught(h).unwrap(),x.__instanceof(g,xj))switch(g._hx_index){case 0:f=!1;break;case 2:throw Z.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=Z.caught(n).unwrap();if(x.__instanceof(h,xj))switch(h._hx_index){case 0:g=!1;break;case 2:throw Z.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=Z.caught(c).unwrap(),x.__instanceof(a,xj))switch(a._hx_index){case 0:b=!1;break;case 2:throw Z.thrown(a);}else throw c;}return b},isMap:function(a){return x.__implements(a,ha)},getMapValue:function(a,b){return x.__cast(a,ha).get(b)},setMapValue:function(a,b,c){x.__cast(a,ha).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&&u.isObject(n);g=g&&u.isEnumValue(n)}if(d){c=new Qd;for(d=0;d<a.length;)n=
a[d],f=d++,c.h[n]=b[f];return c}if(c){c=new H;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=Id.ECustom("Invalid map keys "+F.string(a));throw Z.thrown(b);},get:function(a,b){if(a==null)throw a=Id.EInvalidAccess(b),Z.thrown(a);return u.getProperty(a,b)},set:function(a,b,c){if(a==null)throw a=Id.EInvalidAccess(b),Z.thrown(a);u.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 Eb.createInstance(c,b)},__class__:iw};var nb=Q["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)};nb.__constructs__=[nb.TEof,nb.TConst,nb.TId,nb.TOp,nb.TPOpen,nb.TPClose,nb.TBrOpen,nb.TBrClose,nb.TDot,nb.TQuestionDot,
nb.TComma,nb.TSemicolon,nb.TBkOpen,nb.TBkClose,nb.TQuestion,nb.TDoubleDot,nb.TMeta,nb.TPrepro];var An=function(){this.uid=0;this.preprocesorValues=new H;this.line=1;this.opChars="+*/-=!><&|^%~";this.identChars="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_";var a=[["%"],["*","/"],["+","-"],["<<",">>",">>>"],["|","&","^"],"== != > < >= <=".split(" "),["..."],["&&"],["||"],"= += -= *= /= %= <<= >>= >>>= |= &= ^= =>".split(" "),["->"],["in","is"]];this.opPriority=new H;this.opRightAssoc=
new H;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"]=An;An.__name__="hscript.Parser";An.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 Z.thrown(a);},invalidChar:function(a){if(!this.resumeErrors)throw Z.thrown(Id.EInvalidChar(a));},initParser:function(a,b){this.preprocStack=[];this.tokens=new Fx;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[U.cca(this.opChars,c)]=!0}a=0;for(b=this.identChars.length;a<b;)c=a++,this.idents[U.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==nb.TEof)break;c=this.tokens;c.head=new sc(b,c.head);this.parseFullExpr(a)}return a.length==1?a[0]:$a.EBlock(a)},unexpected:function(a){a=Id.EUnexpected(this.tokenString(a));if(!this.resumeErrors)throw Z.thrown(a);return null},
push:function(a){var b=this.tokens;b.head=new sc(a,b.head)},ensure:function(a){var b=this.token();b!=a&&this.unexpected(b)},ensureToken:function(a){var b=this.token();Eb.enumEq(b,a)||this.unexpected(b)},maybe:function(a){var b=this.token();if(Eb.enumEq(b,a))return!0;a=this.tokens;a.head=new sc(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==nb.TComma&&b!=null&&b!=null&&b._hx_index==2;)b=this.parseStructure("var"),a.push(b),c=this.token();c!=nb.TSemicolon&&c!=nb.TEof&&(this.isBlock(b)?
(a=this.tokens,a.head=new sc(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!=nb.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($a.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($a.EConst(b));case 2:var c=a.s;b=this.parseStructure(c);b==null&&(b=$a.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 $a.EConst(Hi.CInt(-a.v));case 1:return $a.EConst(Hi.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 Z.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=U.substr(this.input,b,d-b+1),$a.EMeta(":markup",[],$a.EConst(Hi.CString(a)))}}return this.unexpected(a);
case 4:a=this.token();if(a==nb.TPClose)return c=this.token(),Eb.enumEq(c,nb.TOp("->"))||this.unexpected(c),a=this.parseExpr(),this.mkLambda([],a,0);c=this.tokens;c.head=new sc(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($a.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($a.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 sc(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 sc(b,c.head),c=this.tokens,c.head=new sc(a,c.head),b!=null&&b._hx_index==15)return this.parseExprNext(this.parseObject(0))}else c=this.tokens,c.head=new sc(a,c.head);else c=this.tokens,c.head=new sc(a,
c.head);break;case 2:b=this.token();c=this.tokens;c.head=new sc(b,c.head);c=this.tokens;c.head=new sc(a,c.head);if(b!=null&&b._hx_index==15)return this.parseExprNext(this.parseObject(0));break;case 7:return this.parseExprNext($a.EObject([]));default:c=this.tokens,c.head=new sc(a,c.head)}for(b=[];;){this.parseFullExpr(b);a=this.token();if(a==nb.TBrClose||this.resumeErrors&&a==nb.TEof)break;c=this.tokens;c.head=new sc(a,c.head)}return $a.EBlock(b);case 12:b=[];a=this.token();for(d=!0;a!=nb.TBkClose&&
(!this.resumeErrors||a!=nb.TEof);){if(!d)if(a!=nb.TComma)this.unexpected(a);else if(a=this.token(),a==nb.TBkClose)break;d=!1;c=this.tokens;c.head=new sc(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=$a.EBlock([$a.EVar(a,null,$a.EArrayDecl([])),this.mapCompr(a,b[0]),$a.EIdent(a)]),this.parseExprNext(b);case 11:return a="__a_"+this.uid++,b=$a.EBlock([$a.EVar(a,null,$a.EArrayDecl([])),this.mapCompr(a,
b[0]),$a.EIdent(a)]),this.parseExprNext(b);case 24:return a="__a_"+this.uid++,b=$a.EBlock([$a.EVar(a,null,$a.EArrayDecl([])),this.mapCompr(a,b[0]),$a.EIdent(a)]),this.parseExprNext(b)}return this.parseExprNext($a.EArrayDecl(b));case 16:return c=a.s,this.allowMetadata?(a=this.parseMetaArgs(),$a.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(nb.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();Eb.enumEq(d,nb.TOp("->"))||this.unexpected(d);c=this.parseExpr();return this.mkLambda(a,c,b)},mkLambda:function(a,b,c){return $a.EFunction(a,$a.EMeta(":lambda",[],$a.EReturn(b)))},parseMetaArgs:function(){var a=this.token();if(a!=nb.TPOpen){var b=this.tokens;b.head=new sc(a,b.head);return null}var c=[];a=this.token();if(a!=nb.TPClose)a:for(b=
this.tokens,b.head=new sc(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=$a.EParent(this.mapCompr(a,c));break;case 4:c=b.e;if(c.length==1){var d=c[0];a=$a.EBlock([this.mapCompr(a,d)])}else a=$a.ECall($a.EField($a.EIdent(a),"push"),[b]);break;case 9:var f=b.cond;d=b.e1;c=b.e2;a=c==null?$a.EIf(f,
this.mapCompr(a,d),null):$a.ECall($a.EField($a.EIdent(a),"push"),[b]);break;case 10:f=b.cond;c=b.e;a=$a.EWhile(f,this.mapCompr(a,c));break;case 11:d=b.v;f=b.it;c=b.e;a=$a.EFor(d,f,this.mapCompr(a,c));break;case 24:f=b.cond;c=b.e;a=$a.EDoWhile(f,this.mapCompr(a,c));break;case 27:f=b.it;c=b.e;a=$a.EForGen(f,this.mapCompr(a,c));break;default:a=$a.ECall($a.EField($a.EIdent(a),"push"),[b])}return a},makeUnop:function(a,b){if(b==null&&this.resumeErrors)return null;if(b==null)return $a.EUnop(a,!0,b);switch(b._hx_index){case 6:var c=
b.e1,d=b.e2;return $a.EBinop(b.op,this.makeUnop(a,c),d);case 22:return c=b.cond,d=b.e1,b=b.e2,$a.ETernary(this.makeUnop(a,c),d,b);default:return $a.EUnop(a,!0,b)}},makeBinop:function(a,b,c){if(c==null&&this.resumeErrors||c==null)return $a.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)?$a.EBinop(d,this.makeBinop(a,b,f),g):$a.EBinop(a,b,c);case 22:return f=c.cond,
g=c.e1,d=c.e2,Object.prototype.hasOwnProperty.call(this.opRightAssoc.h,a)?$a.EBinop(a,b,c):$a.ETernary(this.makeBinop(a,b,f),g,d);default:return $a.EBinop(a,b,c)}},parseStructure:function(a){switch(a){case "break":return $a.EBreak;case "cast":var b=this.token();if(b==nb.TPOpen){a=this.parseExpr();var c=this.token();c!=nb.TComma&&this.unexpected(c);c=this.parseType();return $a.ECast(a,c)}var d=this.tokens;d.head=new sc(b,d.head);a=this.parseExpr();return $a.ECast(a,null);case "continue":return $a.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(),$a.EDoWhile(b,a);case "else":return this.unexpected(nb.TId(a));case "final":case "var":var f=this.getIdent();b=this.token();c=null;b==nb.TDoubleDot&&this.allowTypes&&(c=this.parseType(),b=this.token());a=null;if(b==null)c!=null?(d=this.tokens,d.head=new sc(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 sc(b,d.head);break;default:c!=null?(d=this.tokens,d.head=new sc(b,d.head)):this.unexpected(b)}return $a.EVar(f,c,a);case "for":return c=this.token(),c!=nb.TPOpen&&this.unexpected(c),b=this.parseExpr(),c=this.token(),c!=nb.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)?$a.EFor(d.v,c,a):$a.EForGen(b,a);case "function":return b=this.token(),a=null,b==null?(d=this.tokens,
d.head=new sc(b,d.head)):b._hx_index==2?a=b.s:(d=this.tokens,d.head=new sc(b,d.head)),b=this.parseFunctionDecl(),$a.EFunction(b.args,b.body,a,b.ret);case "if":c=this.token();c!=nb.TPOpen&&this.unexpected(c);a=this.parseExpr();c=this.token();c!=nb.TPClose&&this.unexpected(c);c=this.parseExpr();f=null;var g=!1;b=this.token();b==nb.TSemicolon&&(g=!0,b=this.token());Eb.enumEq(b,nb.TId("else"))?f=this.parseExpr():(d=this.tokens,d.head=new sc(b,d.head),g&&(d=this.tokens,d.head=new sc(nb.TSemicolon,d.head)));
return $a.EIf(a,c,f);case "inline":return this.maybe(nb.TId("function"))||this.unexpected(nb.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(nb.TPClose);return $a.ENew(a.join("."),b);case "return":return b=this.token(),d=this.tokens,d.head=new sc(b,d.head),a=b==nb.TSemicolon?
null:this.parseExpr(),$a.EReturn(a);case "switch":a=this.parseExpr();g=null;f=[];c=this.token();c!=nb.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 sc(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?$a.EBlock([]):$a.EBlock(c);break;case "default":g!=null&&this.unexpected(b);c=this.token();c!=nb.TDoubleDot&&this.unexpected(c);d=[];b:for(;;)if(b=this.token(),c=this.tokens,
c.head=new sc(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?$a.EBlock([]):$a.EBlock(d);break;default:this.unexpected(b);break a}break;case 7:break a;default:this.unexpected(b);break a}return $a.ESwitch(a,f,g);case "throw":return a=this.parseExpr(),
$a.EThrow(a);case "try":return a=this.parseExpr(),c=this.token(),Eb.enumEq(c,nb.TId("catch"))||this.unexpected(c),c=this.token(),c!=nb.TPOpen&&this.unexpected(c),b=this.getIdent(),c=this.token(),c!=nb.TDoubleDot&&this.unexpected(c),c=null,this.allowTypes?c=this.parseType():(d=this.token(),Eb.enumEq(d,nb.TId("Dynamic"))||this.unexpected(d)),d=this.token(),d!=nb.TPClose&&this.unexpected(d),d=this.parseExpr(),$a.ETry(a,b,c,d);case "while":return b=this.parseExpr(),a=this.parseExpr(),$a.EWhile(b,a);default:return null}},
parseExprNext:function(a){var b=this.token();if(b==null){var c=this.tokens;c.head=new sc(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 sc(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 sc(b,c.head),a):this.parseExprNext($a.EUnop(c,!1,a)):this.makeBinop(c,a,this.parseExpr());case 4:return this.parseExprNext($a.ECall(a,this.parseExprList(nb.TPClose)));case 8:return b=this.getIdent(),this.parseExprNext($a.EField(a,b));case 9:return b=this.getIdent(),
d="__a_"+this.uid++,a=$a.EBlock([$a.EVar(d,null,a),$a.ETernary($a.EBinop("==",$a.EIdent(d),$a.EIdent("null")),$a.EIdent("null"),$a.EField($a.EIdent(d),b))]),this.parseExprNext(a);case 12:return c=this.parseExpr(),b=this.token(),b!=nb.TBkClose&&this.unexpected(b),this.parseExprNext($a.EArray(a,c));case 14:return c=this.parseExpr(),b=this.token(),b!=nb.TDoubleDot&&this.unexpected(b),b=this.parseExpr(),$a.ETernary(a,c,b);default:return c=this.tokens,c.head=new sc(b,c.head),a}},parseFunctionArgs:function(){var a=
[],b=this.token();if(b!=nb.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(nb.TDoubleDot)&&(b.t=this.parseType()),this.maybe(nb.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!=nb.TPOpen&&this.unexpected(a);a=this.parseFunctionArgs();var b=null;if(this.allowTypes){var c=this.token();if(c!=nb.TDoubleDot){var d=this.tokens;d.head=new sc(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!=nb.TDot){var c=this.tokens;c.head=new sc(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 sc(b,c.head);var d=this.parsePath(),f=null;b=this.token();if(b==null)c=this.tokens,c.head=new sc(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 sc(b,c.head),f.push(this.parseType())):c._hx_index==1?f.push(Tg.CTExpr($a.EConst(c.c))):(b=this.tokens,b.head=new sc(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(U.cca(c,0)==62){b=this.tokens;b.head=new sc(nb.TOp(U.substr(c,1,null)),b.head);break a}break;case 10:continue}this.unexpected(b);break}else c=this.tokens,c.head=new sc(b,c.head);else c=this.tokens,c.head=new sc(b,c.head);return this.parseTypeNext(Tg.CTPath(d,f));case 4:f=this.token();d=this.token();c=this.tokens;c.head=new sc(d,c.head);c=this.tokens;c.head=new sc(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 Tg.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(Tg.CTParent(g));case 10:c=[g];do c.push(this.parseType());while(this.maybe(nb.TComma));g=this.token();g!=nb.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 Z.thrown(Id.ECustom("Default values not allowed in function types"));c.push(Tg.CTNamed(g.name,g.opt?Tg.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(Tg.CTParent(g));case 10:c=[g];do c.push(this.parseType());while(this.maybe(nb.TComma));g=this.token();g!=nb.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 Z.thrown(Id.ECustom("Default values not allowed in function types"));c.push(Tg.CTNamed(g.name,g.opt?Tg.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(Tg.CTParent(g));case 10:c=[g];do c.push(this.parseType());while(this.maybe(nb.TComma));g=this.token();g!=nb.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!=nb.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!=nb.TSemicolon&&this.unexpected(c);break;default:if(b=this.token(),b!=nb.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(Tg.CTAnon(d));default:return this.unexpected(b)}},parseTypeNext:function(a){var b=this.token();if(b==null){var c=this.tokens;c.head=new sc(b,c.head);return a}if(b._hx_index==
3){if(b.s!="->")return c=this.tokens,c.head=new sc(b,c.head),a}else return c=this.tokens,c.head=new sc(b,c.head),a;b=this.parseType();return b._hx_index==1?(b.args.unshift(a),b):Tg.CTFun([a],b)},parseExprList:function(a){var b=[],c=this.token();if(c==a)return b;var d=this.tokens;for(d.head=new sc(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==nb.TEof)break;c=this.tokens;c.head=new sc(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 sc(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 sc(b,c.head);break}}return a},parseParams:function(){if(this.maybe(nb.TOp("<"))&&
!this.resumeErrors)throw Z.thrown(Id.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 sc(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 sc(n,l.head);break a}else{l=this.tokens;l.head=new sc(n,l.head);break}}l=[];n=this.token();for(n!=nb.TBrOpen&&this.unexpected(n);!this.maybe(nb.TBrClose);)l.push(this.parseField());return Qm.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!=nb.TDot){l=this.tokens;l.head=new sc(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(nb.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!=nb.TSemicolon&&this.unexpected(n);return Qm.DImport(a,c,b);case "package":return a=this.parsePath(),n=this.token(),n!=nb.TSemicolon&&this.unexpected(n),Qm.DPackage(a);case "typedef":return b=
this.getIdent(),f=this.parseParams(),n=this.token(),Eb.enumEq(n,nb.TOp("="))||this.unexpected(n),n=this.parseType(),Qm.DTypedef({name:b,meta:a,params:f,isPrivate:c,t:n});default:this.unexpected(nb.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(nb.TPOpen)){d=this.getIdent();f=this.token();f!=nb.TComma&&this.unexpected(f);f=this.getIdent();var g=this.token();
g!=nb.TPClose&&this.unexpected(g)}g=this.maybe(nb.TDoubleDot)?this.parseType():null;var h=this.maybe(nb.TOp("="))?this.parseExpr():null;if(h!=null)if(this.isBlock(h))this.maybe(nb.TSemicolon);else{var n=this.token();n!=nb.TSemicolon&&this.unexpected(n)}else g!=null&&(g==null?0:g._hx_index==2)?this.maybe(nb.TSemicolon):(n=this.token(),n!=nb.TSemicolon&&this.unexpected(n));return{name:c,meta:a,access:b,kind:Jx.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:Jx.KFunction({args:d.args,expr:d.body,ret:d.ret})};case "inline":b.push(Zj.AInline);break;case "macro":b.push(Zj.AMacro);break;case "override":b.push(Zj.AOverride);break;case "private":b.push(Zj.APrivate);break;case "public":b.push(Zj.APublic);break;case "static":b.push(Zj.AStatic);break;default:this.unexpected(nb.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 Z.thrown(Id.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 Z.thrown(Id.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,nb.TEof;switch(a){case 0:return nb.TEof;case 10:this.line++;break;case 9:case 13:case 32:break;case 34:case 39:return nb.TConst(Hi.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 nb.TPOpen;case 41:return nb.TPClose;case 44:return nb.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),nb.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,nb.TConst(Hi.CFloat(b/c))}break;default:return this.char=a,nb.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 sc(nb.TOp("..."),a.head),a=b|0,nb.TConst(a==b?Hi.CInt(a):Hi.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 sc(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 sc(d,g.head));break;case 3:d.s=="-"?(d=this.token(),d==null?(g=this.tokens,g.head=new sc(d,g.head)):d._hx_index==1?(g=d.c,g._hx_index==0?f=-g.v:(g=this.tokens,g.head=new sc(d,g.head))):(g=this.tokens,g.head=new sc(d,g.head))):(g=this.tokens,g.head=new sc(d,g.head));break;default:g=this.tokens,g.head=
new sc(d,g.head)}f==null&&this.invalidChar(a);c==0&&(c=10);return nb.TConst(Hi.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,nb.TConst(Hi.CInt(b))}break;
default:return this.char=a,a=b|0,nb.TConst(c>0?Hi.CFloat(b*10/c):a==b?Hi.CInt(a):Hi.CFloat(b))}break;case 58:return nb.TDoubleDot;case 59:return nb.TSemicolon;case 61:a=this.input.charCodeAt(this.readPos++);if(a==61)return nb.TOp("==");if(a==62)return nb.TOp("=>");this.char=a;return nb.TOp("=");case 63:a=this.input.charCodeAt(this.readPos++);if(a==46)return nb.TQuestionDot;this.char=a;return nb.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,nb.TMeta(b);b+=String.fromCodePoint(a)}this.invalidChar(a);break;case 91:return nb.TBkOpen;case 93:return nb.TBkClose;case 123:return nb.TBrOpen;case 125:return nb.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,nb.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 nb.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,nb.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 $a.EIdent(a.s);
case 3:return a.s=="!"?$a.EUnop("!",!0,this.parsePreproCond()):this.unexpected(a);case 4:return a=this.tokens,a.head=new sc(nb.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 Z.thrown(Id.EInvalidPreprocessor("Can't eval "+Q[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 Z.thrown(Id.EInvalidPreprocessor("Can't eval "+Q[a.__enum__].__constructs__[a._hx_index]._hx_name));return!1;default:if(!this.resumeErrors)throw Z.thrown(Id.EInvalidPreprocessor("Can't eval "+Q[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 nb.TPrepro(a);case "end":return this.preprocStack.length>0?(this.preprocStack.pop(),this.token()):nb.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 nb.TPrepro(a)}},skipTokens:function(){for(var a=this.preprocStack.length-1,b=this.preprocStack[a];;){var c=this.token();if(c==nb.TEof&&!this.resumeErrors)throw Z.thrown(Id.EInvalidPreprocessor("Unclosed"));if(this.preprocStack[a]!=b){a=this.tokens;a.head=new sc(c,a.head);break}}},tokenComment:function(a,b){var c=U.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 Z.thrown(Id.EUnterminatedComment);break}b=this.input.charCodeAt(this.readPos++);if(b!=b){this.line=c;if(!this.resumeErrors)throw Z.thrown(Id.EUnterminatedComment);break}}while(b!=47);return this.token()}this.char=b;return nb.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__:An,
__properties__:{get_currentPos:"get_currentPos"}};var eq=function(){};t["hscript.Tools"]=eq;eq.__name__="hscript.Tools";eq.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)}};eq.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=$a.EVar(a.n,d,c!=null?b(c):null);break;case 3:c=a.e;c=$a.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=$a.EBlock(a);break;case 5:c=a.e;var g=a.f;c=$a.EField(b(c),g);break;case 6:d=a.op;c=a.e1;a=a.e2;c=$a.EBinop(d,b(c),b(a));break;case 7:d=a.op;g=a.prefix;c=a.e;c=$a.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=$a.ECall(g,a);break;case 9:f=a.cond;c=a.e1;a=a.e2;c=$a.EIf(b(f),b(c),a!=null?b(a):null);break;case 10:f=a.cond;c=a.e;c=$a.EWhile(b(f),b(c));break;case 11:var n=
a.v;d=a.it;c=a.e;c=$a.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=$a.EFunction(f,b(c),n,d);break;case 15:c=a.e;c=$a.EReturn(c!=null?b(c):null);break;case 16:c=a.e;a=a.index;c=$a.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=$a.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=$a.ENew(g,a);break;case 19:c=a.e;c=$a.EThrow(b(c));break;case 20:c=a.e;n=a.v;d=a.t;f=a.ecatch;
c=$a.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=$a.EObject(a);break;case 22:f=a.cond;c=a.e1;a=a.e2;c=$a.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,v=f.values;q<v.length;)n=v[q],++q,c.push(b(n));a.push({values:c,expr:b(f.expr)})}c=$a.ESwitch(g,a,l==null?null:b(l));break;case 24:f=a.cond;c=a.e;c=$a.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=$a.EMeta(n,g,b(c));break;case 26:c=a.e;d=a.t;c=$a.ECheckType(b(c),d);break;case 27:d=a.it;c=a.e;c=$a.EForGen(b(d),b(c));break;case 28:c=a.e,d=a.t,c=$a.ECast(b(c),d)}return c};eq.expr=function(a){return a};eq.mk=function(a,b){return a};eq.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 hl=function(){};t["js.Browser"]=hl;hl.__name__="js.Browser";hl.__properties__={get_supported:"get_supported"};hl.get_supported=function(){return typeof window!="undefined"&&typeof window.location!="undefined"?typeof window.location.protocol=="string":!1};hl.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 Ty=function(){};
t["js.html._CanvasElement.CanvasUtil"]=Ty;Ty.__name__="js.html._CanvasElement.CanvasUtil";Ty.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 Uy=function(){};t["js.lib._ArrayBuffer.ArrayBufferCompat"]=Uy;Uy.__name__="js.lib._ArrayBuffer.ArrayBufferCompat";Uy.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 Xv=function(){this.connected=
!0;this.buttons=[];this.axes=[]};t["lime._internal.backend.html5.GameDeviceData"]=Xv;Xv.__name__="lime._internal.backend.html5.GameDeviceData";Xv.prototype={connected:null,id:null,isGamepad:null,buttons:null,axes:null,__class__:Xv};var Kx=function(a){this.parent=a;this.id=-1;this.gain=1;this.position=new ie};t["lime._internal.backend.html5.HTML5AudioSource"]=Kx;Kx.__name__="lime._internal.backend.html5.HTML5AudioSource";Kx.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__:Kx};var Zb=function(){this.validStatus0=(new Xa("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 Qf;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 Qf,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,"+yj.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 zj(null,d.width,d.height);g.__srcImage=d;Zb.activeRequests--;Zb.processQueue();b.complete(new Nc(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 ho(g.detail,null))},!1),d.src=a;else{var f=new XMLHttpRequest;f.onload=function(g){Zb.activeRequests--;Zb.processQueue();(new Nc).__fromBytes(Na.ofData(f.response),function(h){b.complete(h)})};f.onerror=function(g){b.error(new ho(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=Ka(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=F.string(h),b+=n+encodeURIComponent(g)}this.parent.method=="GET"&&b!=""&&(a=a.indexOf("?")>-1?a+("&"+b):a+("?"+b),b="")}this.request.open(F.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 Qf;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 Qf;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(U.substr(b,0,b.indexOf(":"))),b=N.trim(U.substr(b,b.indexOf(":")+1,null)),a!=""&&this.parent.responseHeaders.push(new cu(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=Na.ofString(c.request.responseText)):c.request.response!=null&&(d=Na.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 ho(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 ho(c.request.status,c.request.responseText))),c.request=null,Zb.activeRequests--,Zb.processQueue())})},__class__:Zb};var io=function(){this.canceled=!1;this.__listeners=[];this.__priorities=[];this.__repeat=[]};t["lime.app._Event_Dynamic_Void"]=io;io.__name__=
"lime.app._Event_Dynamic_Void";io.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__:io};var Rm={skip:function(a){return a!=null&&a instanceof Object&&u.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&&u.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&&u.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"&&u.deleteField(a,"toString")}var b=0;for(a=Object.values(a);b<a.length;){var c=a[b];++b;Rm.preserveClasses(c)}}},restoreClasses:function(a,b){b==null&&(b=Math.random()*2147483647|0,u.field(a,"__restoreFlag__")==
b&&++b);if(a!=null&&a instanceof Object&&u.field(a,"__skipPrototype__")!=1&&!(a.byteLength!=null&&a.byteOffset!=null&&a.buffer!=null&&a.buffer instanceof ArrayBuffer)&&u.field(a,"__restoreFlag__")!=b){try{a.__restoreFlag__=b}catch(f){Pb.lastError=f;return}if(u.field(a,"__prototype__")!=null)try{Object.setPrototypeOf(a,t[u.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;Rm.restoreClasses(d,b)}}}},Lx={__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 Z.thrown("Object is not a valid WorkFunction: "+F.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 Z.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 Z.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 io);Rm.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=U.substr(b.pathname,0,b.pathname.lastIndexOf("/")+1)+Ma.current.meta.h.file+".js";b.hash.length>0&&(b.hash+="_");b.hash+=$b.__workerCount;$b.__workerCount++;Lx.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&&Rm.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&&Rm.preserveClasses(a),this.__worker.postMessage(a,b)):$b.__messages.add(a)},dispatchMessage:function(a){a=a.data;
Rm.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 uc=function(a){this.__stopMousePropagation=this.imeCompositionActive=!1;this.unusedTouchesPool=new jb;this.scale=1;this.currentTouches=new Qd;
this.parent=a;this.cursor=fd.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=uc.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"]=uc;uc.__name__="lime._internal.backend.html5.HTML5Window";uc.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(F.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 Mx,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=Ad.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,Ec.delay(function(){a.__focusPending=!1;a.textInputEnabled&&uc.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=Oe.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(x.__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":Se.__connect(a.gamepad.index);a.gamepad.mapping=="standard"&&rf.__connect(a.gamepad.index);break;case "gamepaddisconnected":Se.__disconnect(a.gamepad.index),rf.__disconnect(a.gamepad.index)}},handleInputEvent:function(a){this.imeCompositionActive||uc.textInput.value==
uc.dummyCharacter||(a=N.replace(uc.textInput.value,uc.dummyCharacter,""),a.length>0&&this.parent.onTextInput.dispatch(a),uc.textInput.value=uc.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=am.PIXELS;break;case 1:c=am.LINES;break;case 2:c=am.PAGES;break;default:c=am.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");Oe.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,v=a.changedTouches;q<v.length;){var w=v[q];++q;b!=null?(g=c/b.width*(w.clientX-b.left),h=d/b.height*(w.clientY-b.top)):(g=w.clientX,h=w.clientY);if(a.type=="touchstart")f=this.unusedTouchesPool.pop(),f==null?f=new Te(g/c,h/d,w.identifier,0,0,w.force,this.parent.id):
(f.x=g/c,f.y=h/d,f.id=w.identifier,f.dx=0,f.dy=0,f.pressure=w.force,f.device=this.parent.id),this.currentTouches.h[w.identifier]=f,Te.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[w.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=w.force,a.type){case "touchcancel":Te.onCancel.dispatch(f);this.currentTouches.remove(w.identifier);this.unusedTouchesPool.add(f);
f==this.primaryTouch&&(this.primaryTouch=null);break;case "touchend":Te.onEnd.dispatch(f);this.currentTouches.remove(w.identifier);this.unusedTouchesPool.add(f);f==this.primaryTouch&&(this.parent.onMouseUp.dispatch(g,h,0),this.primaryTouch=null);break;case "touchmove":Te.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 nf(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),Nc.fromCanvas(b)}return null},resize:function(a,b){},setMinSize:function(a,b){},setMaxSize:function(a,b){},setBorderless:function(a){return a},setClipboard:function(a){uc.textArea==null&&(uc.textArea=
window.document.createElement("textarea"),uc.textArea.style.height="0px",uc.textArea.style.left="-100px",uc.textArea.style.opacity="0",uc.textArea.style.position="fixed",uc.textArea.style.top="-100px",uc.textArea.style.width="0px",window.document.body.appendChild(uc.textArea));uc.textArea.value=a;uc.textArea.focus();uc.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){zb.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(uc.textInput==null){uc.textInput=window.document.createElement("input");var b=wa.navigator.userAgent.indexOf("Android")>=0?"password":"text";uc.textInput.type=b;uc.textInput.style.position="absolute";uc.textInput.style.opacity="0";uc.textInput.style.color="transparent";uc.textInput.value=uc.dummyCharacter;
uc.textInput.autocapitalize="off";uc.textInput.autocorrect="off";uc.textInput.autocomplete="off";uc.textInput.style.left="0px";uc.textInput.style.top="50%";(new Xa("(iPad|iPhone|iPod).*OS 8_","gi")).match(window.navigator.userAgent)?(uc.textInput.style.fontSize="0px",uc.textInput.style.width="0px",uc.textInput.style.height="0px"):(uc.textInput.style.width="1px",uc.textInput.style.height="1px");uc.textInput.style.pointerEvents="none";uc.textInput.style.zIndex="-10000000"}uc.textInput.parentNode==null&&
this.parent.element.appendChild(uc.textInput);this.textInputEnabled||(uc.textInput.addEventListener("input",m(this,this.handleInputEvent),!0),uc.textInput.addEventListener("blur",m(this,this.handleFocusEvent),!0),uc.textInput.addEventListener("cut",m(this,this.handleCutOrCopyEvent),!0),uc.textInput.addEventListener("copy",m(this,this.handleCutOrCopyEvent),!0),uc.textInput.addEventListener("paste",m(this,this.handlePasteEvent),!0),uc.textInput.addEventListener("compositionstart",m(this,this.handleCompositionstartEvent),
!0),uc.textInput.addEventListener("compositionend",m(this,this.handleCompositionendEvent),!0));uc.textInput.focus();uc.textInput.select()}else uc.textInput!=null&&(uc.textInput.blur(),uc.textInput.removeEventListener("input",m(this,this.handleInputEvent),!0),uc.textInput.removeEventListener("blur",m(this,this.handleFocusEvent),!0),uc.textInput.removeEventListener("cut",m(this,this.handleCutOrCopyEvent),!0),uc.textInput.removeEventListener("copy",m(this,this.handleCutOrCopyEvent),!0),uc.textInput.removeEventListener("paste",
m(this,this.handlePasteEvent),!0),uc.textInput.removeEventListener("compositionstart",m(this,this.handleCompositionstartEvent),!0),uc.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__:uc};
var $z=function(){};t["lime._internal.backend.native.NativeCFFI"]=$z;$z.__name__="lime._internal.backend.native.NativeCFFI";var Vy=function(){};t["lime._internal.format.BMP"]=Vy;Vy.__name__="lime._internal.format.BMP";Vy.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=Sm.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 Na(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==Sm.ICO?a.height*2:a.height);h+=4;g.setUInt16(h,1);h+=2;g.setUInt16(h,b==Sm.RGB?24:32);h+=2;g.setInt32(h,b==Sm.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==Sm.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 nf(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 v=d.b[n++];var w=d.b[n++];var z=d.b[n++];g.b[h++]=z;g.b[h++]=w;g.b[h++]=v}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 G=d.b[n++];v=d.b[n++];w=d.b[n++];z=d.b[n++];g.b[h++]=z;g.b[h++]=w;g.b[h++]=v;g.b[h++]=G}break;case 2:f=new Na(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++,G=d.b[n++],v=d.b[n++],w=d.b[n++],z=d.b[n++],g.b[h++]=z,g.b[h++]=w,g.b[h++]=v,g.b[h++]=G,f.b[r++]=0;g.blit(h,f,0,a.width*a.height)}return g};var Sm=Q["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}};Sm.__constructs__=[Sm.RGB,Sm.BITFIELD,Sm.ICO];var yj=function(){};t["lime._internal.format.Base64"]=yj;yj.__name__="lime._internal.format.Base64";yj.decode=function(a){return pi.decode(a)};yj.encode=function(a){var b=
[],c=yj.DICTIONARY,d=yj.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 du=function(){};t["lime._internal.format.Deflate"]=du;du.__name__="lime._internal.format.Deflate";du.compress=function(a){a=pako.deflateRaw(a.b.bufferValue);
return Na.ofData(a)};du.decompress=function(a){a=pako.inflateRaw(a.b.bufferValue);return Na.ofData(a)};var eu=function(){};t["lime._internal.format.GZip"]=eu;eu.__name__="lime._internal.format.GZip";eu.compress=function(a){a=pako.gzip(a.b.bufferValue);return Na.ofData(a)};eu.decompress=function(a){a=pako.ungzip(a.b.bufferValue);return Na.ofData(a)};var fu=function(){};t["lime._internal.format.JPEG"]=fu;fu.__name__="lime._internal.format.JPEG";fu.decodeBytes=function(a,b){return null};fu.decodeFile=
function(a,b){return null};fu.encode=function(a,b){if(a.get_premultiplied()||a.get_format()!=0)a=a.clone(),a.set_premultiplied(!1),a.set_format(0);zb.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 Na(new ArrayBuffer(a.length));for(var c=0,d=a.length;c<d;){var f=c++;b.b[f]=U.cca(a,f)}return b}return null};var gu=function(){};t["lime._internal.format.LZMA"]=gu;gu.__name__="lime._internal.format.LZMA";
gu.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"?Na.ofString(b):Na.ofData(b)};gu.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"?Na.ofString(b):Na.ofData(b)};var fq=function(){};t["lime._internal.format.PNG"]=fq;fq.__name__="lime._internal.format.PNG";fq.decodeBytes=function(a,b){return null};fq.decodeFile=function(a,b){return null};
fq.encode=function(a){if(a.get_premultiplied()||a.get_format()!=0)a=a.clone(),a.set_premultiplied(!1),a.set_format(0);zb.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 Na(new ArrayBuffer(a.length)),c=0,d=a.length;c<d;){var f=c++;b.b[f]=U.cca(a,f)}return b}return null};var hu=function(){};t["lime._internal.format.Zlib"]=hu;hu.__name__="lime._internal.format.Zlib";hu.compress=function(a){a=pako.deflate(a.b.bufferValue);
return Na.ofData(a)};hu.decompress=function(a){a=pako.inflate(a.b.bufferValue);return Na.ofData(a)};var zb=function(){};t["lime._internal.graphics.ImageCanvasUtil"]=zb;zb.__name__="lime._internal.graphics.ImageCanvasUtil";zb.colorTransform=function(a,b,c){zb.convertToData(a);Ub.colorTransform(a,b,c)};zb.convertToCanvas=function(a,b){b==null&&(b=!1);var c=a.buffer;c.__srcImage!=null?(c.__srcCanvas==null&&(zb.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),zb.createCanvas(a,c.width,c.height),zb.createImageData(a),c.__srcContext.putImageData(c.__srcImageData,0,0)):a.type==ig.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=ig.CANVAS};zb.convertToData=function(a,b){b==null&&(b=!1);var c=a.buffer;c.__srcImage!=
null&&zb.convertToCanvas(a);if(c.__srcCanvas!=null&&c.data==null)zb.createImageData(a),a.type==ig.CANVAS&&(a.dirty=!1);else if(a.type==ig.CANVAS&&c.__srcCanvas!=null&&a.dirty){if(c.__srcImageData==null)zb.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=ig.DATA};zb.copyChannel=function(a,b,c,d,f,g){zb.convertToData(b);
zb.convertToData(a);Ub.copyChannel(a,b,c,d,f,g)};zb.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 Yf),b=b.clone(),b.copyChannel(f,new nf(c.x+g.x,c.y+g.y,c.width,c.height),new Yf(c.x,c.y),Ii.ALPHA,Ii.ALPHA)),zb.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),zb.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++)};zb.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()}))};zb.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}};zb.fillRect=function(a,b,c,d){zb.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++)};zb.floodFill=function(a,b,c,d,f){zb.convertToData(a);Ub.floodFill(a,b,c,d,f)};zb.getPixel=function(a,b,c,d){zb.convertToData(a);return Ub.getPixel(a,b,c,d)};zb.getPixel32=function(a,b,c,d){zb.convertToData(a);return Ub.getPixel32(a,b,c,d)};zb.getPixels=function(a,b,c){zb.convertToData(a);return Ub.getPixels(a,b,c)};zb.merge=function(a,b,c,d,f,g,h,n){zb.convertToData(b);zb.convertToData(a);Ub.merge(a,b,c,d,f,g,h,n)};zb.resize=function(a,b,c){var d=a.buffer;
if(d.__srcCanvas==null)zb.createCanvas(a,b,c),d.__srcContext.drawImage(d.get_src(),0,0,b,c);else{zb.convertToCanvas(a,!0);var f=d.__srcCanvas;d.__srcCanvas=null;zb.createCanvas(a,b,c);d.__srcContext.drawImage(f,0,0,b,c)}d.__srcImageData=null;d.data=null;a.dirty=!0;a.version++};zb.scroll=function(a,b,c){if(b%a.width!=0||c%a.height!=0){var d=a.clone();zb.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++}};
zb.setPixel=function(a,b,c,d,f){zb.convertToData(a);Ub.setPixel(a,b,c,d,f)};zb.setPixel32=function(a,b,c,d,f){zb.convertToData(a);Ub.setPixel32(a,b,c,d,f)};zb.setPixels=function(a,b,c,d,f){zb.convertToData(a);Ub.setPixels(a,b,c,d,f)};zb.sync=function(a,b){a!=null&&(a.type!=ig.CANVAS||a.buffer.__srcCanvas==null&&a.buffer.data==null?a.type==ig.DATA&&zb.convertToData(a,b):zb.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,v=a.buffer.format,w=b.buffer.format,z=c.buffer.format,r=a.get_premultiplied(),G=b.get_premultiplied(),J=c.get_premultiplied();b=new nh(b);c=new nh(c);for(var L,P,V=0,ia=0,ea,ra,za,fb=0,eb=0,Ra=0,wb=0,cb,Tb=0,Ib=b.height;Tb<Ib;){var Mb=Tb++;L=b.byteOffset+b.stride*Mb;for(var tc=0,Bd=b.width;tc<Bd;){var Qb=tc++;P=L+Qb*4;za=d.x|0;ea=d.y|0;if(h){ia=b.byteOffset+b.stride*(Mb-ea+1)+(Qb-za)*4;ra=z;cb=J;cb==null&&(cb=
!1);ra==null&&(ra=0);switch(ra){case 0:fb=(q[ia]&255)<<24|(q[ia+1]&255)<<16|(q[ia+2]&255)<<8|q[ia+3]&255;break;case 1:fb=(q[ia+1]&255)<<24|(q[ia+2]&255)<<16|(q[ia+3]&255)<<8|q[ia]&255;break;case 2:fb=(q[ia+2]&255)<<24|(q[ia+1]&255)<<16|(q[ia]&255)<<8|q[ia+3]&255}cb&&(fb&255)!=0&&(fb&255)!=255&&(W.unmult=255/(fb&255),fb=(W.__clamp[Math.round((fb>>>24&255)*W.unmult)]&255)<<24|(W.__clamp[Math.round((fb>>>16&255)*W.unmult)]&255)<<16|(W.__clamp[Math.round((fb>>>8&255)*W.unmult)]&255)<<8|fb&255);ia=b.byteOffset+
b.stride*(Mb-ea)+(Qb-za+1)*4;ra=z;cb=J;cb==null&&(cb=!1);ra==null&&(ra=0);switch(ra){case 0:eb=(q[ia]&255)<<24|(q[ia+1]&255)<<16|(q[ia+2]&255)<<8|q[ia+3]&255;break;case 1:eb=(q[ia+1]&255)<<24|(q[ia+2]&255)<<16|(q[ia+3]&255)<<8|q[ia]&255;break;case 2:eb=(q[ia+2]&255)<<24|(q[ia+1]&255)<<16|(q[ia]&255)<<8|q[ia+3]&255}cb&&(eb&255)!=0&&(eb&255)!=255&&(W.unmult=255/(eb&255),eb=(W.__clamp[Math.round((eb>>>24&255)*W.unmult)]&255)<<24|(W.__clamp[Math.round((eb>>>16&255)*W.unmult)]&255)<<16|(W.__clamp[Math.round((eb>>>
8&255)*W.unmult)]&255)<<8|eb&255);ia=b.byteOffset+b.stride*(Mb-ea+1)+(Qb-za+1)*4;ra=z;cb=J;cb==null&&(cb=!1);ra==null&&(ra=0);switch(ra){case 0:Ra=(q[ia]&255)<<24|(q[ia+1]&255)<<16|(q[ia+2]&255)<<8|q[ia+3]&255;break;case 1:Ra=(q[ia+1]&255)<<24|(q[ia+2]&255)<<16|(q[ia+3]&255)<<8|q[ia]&255;break;case 2:Ra=(q[ia+2]&255)<<24|(q[ia+1]&255)<<16|(q[ia]&255)<<8|q[ia+3]&255}cb&&(Ra&255)!=0&&(Ra&255)!=255&&(W.unmult=255/(Ra&255),Ra=(W.__clamp[Math.round((Ra>>>24&255)*W.unmult)]&255)<<24|(W.__clamp[Math.round((Ra>>>
16&255)*W.unmult)]&255)<<16|(W.__clamp[Math.round((Ra>>>8&255)*W.unmult)]&255)<<8|Ra&255);ia=b.byteOffset+b.stride*(Mb-ea)+(Qb-za)*4;ra=z;cb=J;cb==null&&(cb=!1);ra==null&&(ra=0);switch(ra){case 0:wb=(q[ia]&255)<<24|(q[ia+1]&255)<<16|(q[ia+2]&255)<<8|q[ia+3]&255;break;case 1:wb=(q[ia+1]&255)<<24|(q[ia+2]&255)<<16|(q[ia+3]&255)<<8|q[ia]&255;break;case 2:wb=(q[ia+2]&255)<<24|(q[ia+1]&255)<<16|(q[ia]&255)<<8|q[ia+3]&255}cb&&(wb&255)!=0&&(wb&255)!=255&&(W.unmult=255/(wb&255),wb=(W.__clamp[Math.round((wb>>>
24&255)*W.unmult)]&255)<<24|(W.__clamp[Math.round((wb>>>16&255)*W.unmult)]&255)<<16|(W.__clamp[Math.round((wb>>>8&255)*W.unmult)]&255)<<8|wb&255);ia=Ub.bilinear(fb,eb,Ra,wb,d.x-za,d.y-ea)}else{za=c.byteOffset+c.stride*(Mb-ea)+(Qb-za)*4;ea=z;ra=J;ra==null&&(ra=!1);ea==null&&(ea=0);switch(ea){case 0:ia=(q[za]&255)<<24|(q[za+1]&255)<<16|(q[za+2]&255)<<8|q[za+3]&255;break;case 1:ia=(q[za+1]&255)<<24|(q[za+2]&255)<<16|(q[za+3]&255)<<8|q[za]&255;break;case 2:ia=(q[za+2]&255)<<24|(q[za+1]&255)<<16|(q[za]&
255)<<8|q[za+3]&255}ra&&(ia&255)!=0&&(ia&255)!=255&&(W.unmult=255/(ia&255),ia=(W.__clamp[Math.round((ia>>>24&255)*W.unmult)]&255)<<24|(W.__clamp[Math.round((ia>>>16&255)*W.unmult)]&255)<<16|(W.__clamp[Math.round((ia>>>8&255)*W.unmult)]&255)<<8|ia&255)}za=(ia&255)/255;ea=((ia>>>24&255)-128)/255*za;ra=((ia>>>16&255)-128)/255*za;za=ea*f.x+ra*g.x;cb=ea*f.y+ra*g.y;ea=Math.floor(za*b.width);ra=Math.floor(cb*b.height);if(h){V=b.byteOffset+b.stride*(Mb+ra+1)+(Qb+ea)*4;var wd=w,Ae=G;Ae==null&&(Ae=!1);wd==
null&&(wd=0);switch(wd){case 0:fb=(l[V]&255)<<24|(l[V+1]&255)<<16|(l[V+2]&255)<<8|l[V+3]&255;break;case 1:fb=(l[V+1]&255)<<24|(l[V+2]&255)<<16|(l[V+3]&255)<<8|l[V]&255;break;case 2:fb=(l[V+2]&255)<<24|(l[V+1]&255)<<16|(l[V]&255)<<8|l[V+3]&255}Ae&&(fb&255)!=0&&(fb&255)!=255&&(W.unmult=255/(fb&255),fb=(W.__clamp[Math.round((fb>>>24&255)*W.unmult)]&255)<<24|(W.__clamp[Math.round((fb>>>16&255)*W.unmult)]&255)<<16|(W.__clamp[Math.round((fb>>>8&255)*W.unmult)]&255)<<8|fb&255);V=b.byteOffset+b.stride*(Mb+
ra)+(Qb+ea+1)*4;wd=w;Ae=G;Ae==null&&(Ae=!1);wd==null&&(wd=0);switch(wd){case 0:eb=(l[V]&255)<<24|(l[V+1]&255)<<16|(l[V+2]&255)<<8|l[V+3]&255;break;case 1:eb=(l[V+1]&255)<<24|(l[V+2]&255)<<16|(l[V+3]&255)<<8|l[V]&255;break;case 2:eb=(l[V+2]&255)<<24|(l[V+1]&255)<<16|(l[V]&255)<<8|l[V+3]&255}Ae&&(eb&255)!=0&&(eb&255)!=255&&(W.unmult=255/(eb&255),eb=(W.__clamp[Math.round((eb>>>24&255)*W.unmult)]&255)<<24|(W.__clamp[Math.round((eb>>>16&255)*W.unmult)]&255)<<16|(W.__clamp[Math.round((eb>>>8&255)*W.unmult)]&
255)<<8|eb&255);V=b.byteOffset+b.stride*(Mb+ra+1)+(Qb+ea+1)*4;wd=w;Ae=G;Ae==null&&(Ae=!1);wd==null&&(wd=0);switch(wd){case 0:Ra=(l[V]&255)<<24|(l[V+1]&255)<<16|(l[V+2]&255)<<8|l[V+3]&255;break;case 1:Ra=(l[V+1]&255)<<24|(l[V+2]&255)<<16|(l[V+3]&255)<<8|l[V]&255;break;case 2:Ra=(l[V+2]&255)<<24|(l[V+1]&255)<<16|(l[V]&255)<<8|l[V+3]&255}Ae&&(Ra&255)!=0&&(Ra&255)!=255&&(W.unmult=255/(Ra&255),Ra=(W.__clamp[Math.round((Ra>>>24&255)*W.unmult)]&255)<<24|(W.__clamp[Math.round((Ra>>>16&255)*W.unmult)]&255)<<
16|(W.__clamp[Math.round((Ra>>>8&255)*W.unmult)]&255)<<8|Ra&255);Qb=b.byteOffset+b.stride*(Mb+ra)+(Qb+ea)*4;V=w;wd=G;wd==null&&(wd=!1);V==null&&(V=0);switch(V){case 0:wb=(l[Qb]&255)<<24|(l[Qb+1]&255)<<16|(l[Qb+2]&255)<<8|l[Qb+3]&255;break;case 1:wb=(l[Qb+1]&255)<<24|(l[Qb+2]&255)<<16|(l[Qb+3]&255)<<8|l[Qb]&255;break;case 2:wb=(l[Qb+2]&255)<<24|(l[Qb+1]&255)<<16|(l[Qb]&255)<<8|l[Qb+3]&255}wd&&(wb&255)!=0&&(wb&255)!=255&&(W.unmult=255/(wb&255),wb=(W.__clamp[Math.round((wb>>>24&255)*W.unmult)]&255)<<
24|(W.__clamp[Math.round((wb>>>16&255)*W.unmult)]&255)<<16|(W.__clamp[Math.round((wb>>>8&255)*W.unmult)]&255)<<8|wb&255);V=Ub.bilinear(fb,eb,Ra,wb,za*b.width-ea,cb*b.height-ra)}else{Qb=b.byteOffset+b.stride*(Mb+ra)+(Qb+ea)*4;za=w;ea=G;ea==null&&(ea=!1);za==null&&(za=0);switch(za){case 0:V=(l[Qb]&255)<<24|(l[Qb+1]&255)<<16|(l[Qb+2]&255)<<8|l[Qb+3]&255;break;case 1:V=(l[Qb+1]&255)<<24|(l[Qb+2]&255)<<16|(l[Qb+3]&255)<<8|l[Qb]&255;break;case 2:V=(l[Qb+2]&255)<<24|(l[Qb+1]&255)<<16|(l[Qb]&255)<<8|l[Qb+
3]&255}ea&&(V&255)!=0&&(V&255)!=255&&(W.unmult=255/(V&255),V=(W.__clamp[Math.round((V>>>24&255)*W.unmult)]&255)<<24|(W.__clamp[Math.round((V>>>16&255)*W.unmult)]&255)<<16|(W.__clamp[Math.round((V>>>8&255)*W.unmult)]&255)<<8|V&255)}Qb=v;za=r;za==null&&(za=!1);Qb==null&&(Qb=0);za&&((V&255)==0?V!=0&&(V=0):(V&255)!=255&&(W.a16=W.__alpha16[V&255],V=((V>>>24&255)*W.a16>>16&255)<<24|((V>>>16&255)*W.a16>>16&255)<<16|((V>>>8&255)*W.a16>>16&255)<<8|V&255));switch(Qb){case 0:n[P]=V>>>24&255;n[P+1]=V>>>16&255;
n[P+2]=V>>>8&255;n[P+3]=V&255;break;case 1:n[P]=V&255;n[P+1]=V>>>24&255;n[P+2]=V>>>16&255;n[P+3]=V>>>8&255;break;case 2:n[P]=V>>>8&255,n[P+1]=V>>>16&255,n[P+2]=V>>>24&255,n[P+3]=V&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 ie(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 nh(a,b);var h=xf.getAlphaTable(c),n=xf.getRedTable(c),l=xf.getGreenTable(c);c=xf.getBlueTable(c);for(var q,v,w=0,z=0,r=b.height;z<r;){q=z++;q=b.byteOffset+b.stride*q;for(var G=0,J=b.width;G<J;){v=G++;v=q+v*4;var L=f,P=g;P==null&&(P=!1);L==null&&(L=0);switch(L){case 0:w=(d[v]&255)<<24|(d[v+1]&255)<<16|(d[v+2]&255)<<8|d[v+3]&255;break;case 1:w=(d[v+1]&255)<<24|(d[v+2]&255)<<16|(d[v+3]&255)<<8|d[v]&255;break;case 2:w=(d[v+2]&255)<<24|(d[v+1]&255)<<16|(d[v]&255)<<8|d[v+3]&255}P&&(w&255)!=0&&(w&
255)!=255&&(W.unmult=255/(w&255),w=(W.__clamp[Math.round((w>>>24&255)*W.unmult)]&255)<<24|(W.__clamp[Math.round((w>>>16&255)*W.unmult)]&255)<<16|(W.__clamp[Math.round((w>>>8&255)*W.unmult)]&255)<<8|w&255);w=(n[w>>>24&255]&255)<<24|(l[w>>>16&255]&255)<<16|(c[w>>>8&255]&255)<<8|h[w&255]&255;L=f;P=g;P==null&&(P=!1);L==null&&(L=0);P&&((w&255)==0?w!=0&&(w=0):(w&255)!=255&&(W.a16=W.__alpha16[w&255],w=((w>>>24&255)*W.a16>>16&255)<<24|((w>>>16&255)*W.a16>>16&255)<<16|((w>>>8&255)*W.a16>>16&255)<<8|w&255));
switch(L){case 0:d[v]=w>>>24&255;d[v+1]=w>>>16&255;d[v+2]=w>>>8&255;d[v+3]=w&255;break;case 1:d[v]=w&255;d[v+1]=w>>>24&255;d[v+2]=w>>>16&255;d[v+3]=w>>>8&255;break;case 2:d[v]=w>>>8&255,d[v+1]=w>>>16&255,d[v+2]=w>>>24&255,d[v+3]=w&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 nh(b,c);d=new nh(a,new nf(d.x,d.y,c.width,c.height));var l=b.buffer.format,q=a.buffer.format;b=b.buffer.premultiplied;for(var v=a.buffer.premultiplied,w,z,r=0,G=0,J=0,L=0,P=d.height;L<P;){z=L++;w=c.byteOffset+c.stride*z;z=d.byteOffset+d.stride*z;for(var V=0,ia=d.width;V<ia;){V++;var ea=l,ra=b;ra==null&&(ra=!1);ea==null&&(ea=0);switch(ea){case 0:r=(f[w]&255)<<24|(f[w+1]&255)<<16|(f[w+2]&255)<<8|f[w+3]&255;break;case 1:r=(f[w+1]&255)<<24|(f[w+2]&255)<<16|(f[w+3]&255)<<8|f[w]&
255;break;case 2:r=(f[w+2]&255)<<24|(f[w+1]&255)<<16|(f[w]&255)<<8|f[w+3]&255}ra&&(r&255)!=0&&(r&255)!=255&&(W.unmult=255/(r&255),r=(W.__clamp[Math.round((r>>>24&255)*W.unmult)]&255)<<24|(W.__clamp[Math.round((r>>>16&255)*W.unmult)]&255)<<16|(W.__clamp[Math.round((r>>>8&255)*W.unmult)]&255)<<8|r&255);ea=q;ra=v;ra==null&&(ra=!1);ea==null&&(ea=0);switch(ea){case 0:G=(g[z]&255)<<24|(g[z+1]&255)<<16|(g[z+2]&255)<<8|g[z+3]&255;break;case 1:G=(g[z+1]&255)<<24|(g[z+2]&255)<<16|(g[z+3]&255)<<8|g[z]&255;break;
case 2:G=(g[z+2]&255)<<24|(g[z+1]&255)<<16|(g[z]&255)<<8|g[z+3]&255}ra&&(G&255)!=0&&(G&255)!=255&&(W.unmult=255/(G&255),G=(W.__clamp[Math.round((G>>>24&255)*W.unmult)]&255)<<24|(W.__clamp[Math.round((G>>>16&255)*W.unmult)]&255)<<16|(W.__clamp[Math.round((G>>>8&255)*W.unmult)]&255)<<8|G&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:G=(J&255)<<24|(G>>>16&255)<<16|(G>>>8&255)<<8|G&255;break;case 1:G=(G>>>24&255)<<24|(J&255)<<
16|(G>>>8&255)<<8|G&255;break;case 2:G=(G>>>24&255)<<24|(G>>>16&255)<<16|(J&255)<<8|G&255;break;case 3:G=(G>>>24&255)<<24|(G>>>16&255)<<16|(G>>>8&255)<<8|J&255}ea=q;ra=v;ra==null&&(ra=!1);ea==null&&(ea=0);ra&&((G&255)==0?G!=0&&(G=0):(G&255)!=255&&(W.a16=W.__alpha16[G&255],G=((G>>>24&255)*W.a16>>16&255)<<24|((G>>>16&255)*W.a16>>16&255)<<16|((G>>>8&255)*W.a16>>16&255)<<8|G&255));switch(ea){case 0:g[z]=G>>>24&255;g[z+1]=G>>>16&255;g[z+2]=G>>>8&255;g[z+3]=G&255;break;case 1:g[z]=G&255;g[z+1]=G>>>24&255;
g[z+2]=G>>>16&255;g[z+3]=G>>>8&255;break;case 2:g[z]=G>>>8&255,g[z+1]=G>>>16&255,g[z+2]=G>>>24&255,g[z+3]=G&255}w+=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 nh(b,c);var q=new nf(d.x,d.y,
c.width,c.height);q=new nh(a,q);var v=b.buffer.format,w=a.buffer.format,z=0,r=0,G=b.buffer.premultiplied,J=a.buffer.premultiplied,L=b.buffer.bitsPerPixel/8|0,P=a.buffer.bitsPerPixel/8|0,V=f!=null&&f.get_transparent(),ia=h||V&&!a.get_transparent()||!h&&!a.get_transparent()&&b.get_transparent();if(V)if(P=f.buffer.data,b=f.buffer.format,h=0,f=new nh(f,new nf(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),ia)for(ia=0,L=q.height;ia<L;)for(V=ia++,d=c.byteOffset+
c.stride*V,g=q.byteOffset+q.stride*V,V=f.byteOffset+f.stride*V,eb=0,Ra=q.width;eb<Ra;){eb++;var ea=v;var ra=G;ra==null&&(ra=!1);ea==null&&(ea=0);switch(ea){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}ra&&(z&255)!=0&&(z&255)!=255&&(W.unmult=255/(z&255),z=(W.__clamp[Math.round((z>>>24&255)*W.unmult)]&255)<<24|(W.__clamp[Math.round((z>>>
16&255)*W.unmult)]&255)<<16|(W.__clamp[Math.round((z>>>8&255)*W.unmult)]&255)<<8|z&255);ea=w;ra=J;ra==null&&(ra=!1);ea==null&&(ea=0);switch(ea){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}ra&&(r&255)!=0&&(r&255)!=255&&(W.unmult=255/(r&255),r=(W.__clamp[Math.round((r>>>24&255)*W.unmult)]&255)<<24|(W.__clamp[Math.round((r>>>16&255)*
W.unmult)]&255)<<16|(W.__clamp[Math.round((r>>>8&255)*W.unmult)]&255)<<8|r&255);ea=b;ra=!1;ra==null&&(ra=!1);ea==null&&(ea=0);switch(ea){case 0:h=(P[V]&255)<<24|(P[V+1]&255)<<16|(P[V+2]&255)<<8|P[V+3]&255;break;case 1:h=(P[V+1]&255)<<24|(P[V+2]&255)<<16|(P[V+3]&255)<<8|P[V]&255;break;case 2:h=(P[V+2]&255)<<24|(P[V+1]&255)<<16|(P[V]&255)<<8|P[V+3]&255}ra&&(h&255)!=0&&(h&255)!=255&&(W.unmult=255/(h&255),h=(W.__clamp[Math.round((h>>>24&255)*W.unmult)]&255)<<24|(W.__clamp[Math.round((h>>>16&255)*W.unmult)]&
255)<<16|(W.__clamp[Math.round((h>>>8&255)*W.unmult)]&255)<<8|h&255);ra=(h&255)/255*((z&255)/255);if(ra>0){var za=(r&255)/255;var fb=1-ra;ea=ra+za*fb;wb=W.__clamp[Math.round(((z>>>24&255)*ra+(r>>>24&255)*za*fb)/ea)];r=(wb&255)<<24|(r>>>16&255)<<16|(r>>>8&255)<<8|r&255;wb=W.__clamp[Math.round(((z>>>16&255)*ra+(r>>>16&255)*za*fb)/ea)];r=(r>>>24&255)<<24|(wb&255)<<16|(r>>>8&255)<<8|r&255;ra=W.__clamp[Math.round(((z>>>8&255)*ra+(r>>>8&255)*za*fb)/ea)];r=(r>>>24&255)<<24|(r>>>16&255)<<16|(ra&255)<<8|r&
255;ea=W.__clamp[Math.round(ea*255)];r=(r>>>24&255)<<24|(r>>>16&255)<<16|(r>>>8&255)<<8|ea&255;ea=w;ra=J;ra==null&&(ra=!1);ea==null&&(ea=0);ra&&((r&255)==0?r!=0&&(r=0):(r&255)!=255&&(W.a16=W.__alpha16[r&255],r=((r>>>24&255)*W.a16>>16&255)<<24|((r>>>16&255)*W.a16>>16&255)<<16|((r>>>8&255)*W.a16>>16&255)<<8|r&255));switch(ea){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;V+=4}else for(ia=0,L=q.height;ia<L;)for(V=ia++,d=c.byteOffset+c.stride*V,g=q.byteOffset+q.stride*V,V=f.byteOffset+f.stride*V,eb=0,Ra=q.width;eb<Ra;){eb++;ea=v;ra=G;ra==null&&(ra=!1);ea==null&&(ea=0);switch(ea){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}ra&&(z&255)!=0&&
(z&255)!=255&&(W.unmult=255/(z&255),z=(W.__clamp[Math.round((z>>>24&255)*W.unmult)]&255)<<24|(W.__clamp[Math.round((z>>>16&255)*W.unmult)]&255)<<16|(W.__clamp[Math.round((z>>>8&255)*W.unmult)]&255)<<8|z&255);ea=b;ra=!1;ra==null&&(ra=!1);ea==null&&(ea=0);switch(ea){case 0:h=(P[V]&255)<<24|(P[V+1]&255)<<16|(P[V+2]&255)<<8|P[V+3]&255;break;case 1:h=(P[V+1]&255)<<24|(P[V+2]&255)<<16|(P[V+3]&255)<<8|P[V]&255;break;case 2:h=(P[V+2]&255)<<24|(P[V+1]&255)<<16|(P[V]&255)<<8|P[V+3]&255}ra&&(h&255)!=0&&(h&255)!=
255&&(W.unmult=255/(h&255),h=(W.__clamp[Math.round((h>>>24&255)*W.unmult)]&255)<<24|(W.__clamp[Math.round((h>>>16&255)*W.unmult)]&255)<<16|(W.__clamp[Math.round((h>>>8&255)*W.unmult)]&255)<<8|h&255);wb=Math.round((h&255)/255*(z&255));z=(z>>>24&255)<<24|(z>>>16&255)<<16|(z>>>8&255)<<8|wb&255;ea=w;ra=J;ra==null&&(ra=!1);ea==null&&(ea=0);ra&&((z&255)==0?z!=0&&(z=0):(z&255)!=255&&(W.a16=W.__alpha16[z&255],z=((z>>>24&255)*W.a16>>16&255)<<24|((z>>>16&255)*W.a16>>16&255)<<16|((z>>>8&255)*W.a16>>16&255)<<
8|z&255));switch(ea){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;V+=4}else if(ia)for(ia=0,L=q.height;ia<L;){V=ia++;d=c.byteOffset+c.stride*V;g=q.byteOffset+q.stride*V;for(var eb=0,Ra=q.width;eb<Ra;){eb++;ea=v;ra=G;ra==null&&(ra=!1);ea==null&&(ea=0);switch(ea){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}ra&&(z&255)!=0&&(z&255)!=255&&(W.unmult=255/(z&255),z=(W.__clamp[Math.round((z>>>24&255)*W.unmult)]&255)<<24|(W.__clamp[Math.round((z>>>16&255)*W.unmult)]&255)<<16|(W.__clamp[Math.round((z>>>8&255)*W.unmult)]&255)<<8|z&255);ea=w;ra=J;ra==null&&(ra=!1);ea==null&&(ea=0);switch(ea){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}ra&&(r&255)!=0&&(r&255)!=255&&(W.unmult=255/(r&255),r=(W.__clamp[Math.round((r>>>24&255)*W.unmult)]&255)<<24|(W.__clamp[Math.round((r>>>16&255)*W.unmult)]&255)<<16|(W.__clamp[Math.round((r>>>8&255)*W.unmult)]&255)<<8|r&255);ra=(z&255)/255;za=(r&255)/255;fb=1-ra;ea=ra+za*fb;if(ea==0)r=0;else{var wb=W.__clamp[Math.round(((z>>>24&255)*ra+(r>>>24&255)*
za*fb)/ea)];r=(wb&255)<<24|(r>>>16&255)<<16|(r>>>8&255)<<8|r&255;wb=W.__clamp[Math.round(((z>>>16&255)*ra+(r>>>16&255)*za*fb)/ea)];r=(r>>>24&255)<<24|(wb&255)<<16|(r>>>8&255)<<8|r&255;ra=W.__clamp[Math.round(((z>>>8&255)*ra+(r>>>8&255)*za*fb)/ea)];r=(r>>>24&255)<<24|(r>>>16&255)<<16|(ra&255)<<8|r&255;ea=W.__clamp[Math.round(ea*255)];r=(r>>>24&255)<<24|(r>>>16&255)<<16|(r>>>8&255)<<8|ea&255}ea=w;ra=J;ra==null&&(ra=!1);ea==null&&(ea=0);ra&&((r&255)==0?r!=0&&(r=0):(r&255)!=255&&(W.a16=W.__alpha16[r&
255],r=((r>>>24&255)*W.a16>>16&255)<<24|((r>>>16&255)*W.a16>>16&255)<<16|((r>>>8&255)*W.a16>>16&255)<<8|r&255));switch(ea){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(v==w&&G==J&&L==P)for(ia=0,L=q.height;ia<L;)V=ia++,d=c.byteOffset+c.stride*V,g=q.byteOffset+q.stride*V,l.set(n.subarray(d,d+q.width*P),
g);else for(ia=0,L=q.height;ia<L;)for(V=ia++,d=c.byteOffset+c.stride*V,g=q.byteOffset+q.stride*V,eb=0,Ra=q.width;eb<Ra;){eb++;ea=v;ra=G;ra==null&&(ra=!1);ea==null&&(ea=0);switch(ea){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}ra&&(z&255)!=0&&(z&255)!=255&&(W.unmult=255/(z&255),z=(W.__clamp[Math.round((z>>>24&255)*W.unmult)]&255)<<
24|(W.__clamp[Math.round((z>>>16&255)*W.unmult)]&255)<<16|(W.__clamp[Math.round((z>>>8&255)*W.unmult)]&255)<<8|z&255);ea=w;ra=J;ra==null&&(ra=!1);ea==null&&(ea=0);ra&&((z&255)==0?z!=0&&(z=0):(z&255)!=255&&(W.a16=W.__alpha16[z&255],z=((z>>>24&255)*W.a16>>16&255)<<24|((z>>>16&255)*W.a16>>16&255)<<16|((z>>>8&255)*W.a16>>16&255)<<8|z&255));switch(ea){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&&(W.a16=W.__alpha16[c&
255],c=((c>>>24&255)*W.a16>>16&255)<<24|((c>>>16&255)*W.a16>>16&255)<<16|((c>>>8&255)*W.a16>>16&255)<<8|c&255));b=new nh(a,b);for(var h,n=0,l=b.height;n<l;){g=n++;h=b.byteOffset+b.stride*g;for(var q=0,v=b.width;q<v;){g=q++;var w=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&&(W.a16=W.__alpha16[c&255],c=((c>>>24&255)*W.a16>>16&255)<<24|((c>>>16&255)*W.a16>>16&255)<<16|((c>>>8&255)*W.a16>>16&255)<<8|c&255));switch(z){case 0:f[w]=c>>>24&255;f[w+1]=c>>>16&255;f[w+
2]=c>>>8&255;f[w+3]=c&255;break;case 1:f[w]=c&255;f[w+1]=c>>>24&255;f[w+2]=c>>>16&255;f[w+3]=c>>>8&255;break;case 2:f[w]=c>>>8&255,f[w+1]=c>>>16&255,f[w+2]=c>>>24&255,f[w+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,v=h;v==null&&(v=!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}v&&(n&255)!=0&&(n&255)!=255&&(W.unmult=255/(n&255),n=(W.__clamp[Math.round((n>>>24&255)*W.unmult)]&255)<<24|(W.__clamp[Math.round((n>>>16&255)*W.unmult)]&255)<<16|(W.__clamp[Math.round((n>>>8&255)*W.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&&(W.a16=W.__alpha16[d&255],d=((d>>>24&255)*W.a16>>16&255)<<24|((d>>>16&255)*W.a16>>16&255)<<16|((d>>>8&255)*W.a16>>16&255)<<8|d&255));l=[0,-1,1,0];var w=[-1,0,0,1],z=-a.offsetX,r=-a.offsetY,G=z+a.width,J=r+a.height,L=[];L.push(b);L.push(c);for(var P,V,ia,ea=0;L.length>0;){c=L.pop();b=L.pop();for(var ra=0;ra<4;)if(q=ra++,P=b+l[q],V=c+w[q],!(P<z||V<r||P>=G||V>=J)){ia=(V*a.width+P)*4;q=f;v=h;v==null&&(v=!1);q==null&&(q=0);switch(q){case 0:ea=
(g[ia]&255)<<24|(g[ia+1]&255)<<16|(g[ia+2]&255)<<8|g[ia+3]&255;break;case 1:ea=(g[ia+1]&255)<<24|(g[ia+2]&255)<<16|(g[ia+3]&255)<<8|g[ia]&255;break;case 2:ea=(g[ia+2]&255)<<24|(g[ia+1]&255)<<16|(g[ia]&255)<<8|g[ia+3]&255}v&&(ea&255)!=0&&(ea&255)!=255&&(W.unmult=255/(ea&255),ea=(W.__clamp[Math.round((ea>>>24&255)*W.unmult)]&255)<<24|(W.__clamp[Math.round((ea>>>16&255)*W.unmult)]&255)<<16|(W.__clamp[Math.round((ea>>>8&255)*W.unmult)]&255)<<8|ea&255);if(ea==n){q=f;v=!1;v==null&&(v=!1);q==null&&(q=0);
v&&((d&255)==0?d!=0&&(d=0):(d&255)!=255&&(W.a16=W.__alpha16[d&255],d=((d>>>24&255)*W.a16>>16&255)<<24|((d>>>16&255)*W.a16>>16&255)<<16|((d>>>8&255)*W.a16>>16&255)<<8|d&255));switch(q){case 0:g[ia]=d>>>24&255;g[ia+1]=d>>>16&255;g[ia+2]=d>>>8&255;g[ia+3]=d&255;break;case 1:g[ia]=d&255;g[ia+1]=d>>>24&255;g[ia+2]=d>>>16&255;g[ia+3]=d>>>8&255;break;case 2:g[ia]=d>>>8&255,g[ia+1]=d>>>16&255,g[ia+2]=d>>>24&255,g[ia+3]=d&255}L.push(P);L.push(V)}}}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);hi.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 v=f++;var w=!1;for(var z=0,r=a.height;z<r;){var G=z++;w=a.getPixel32(v,G,0);if(w=d?(w&b)==c:(w&b)!=c){v<g&&(g=v);break}}if(w)break}f=0;for(q=a.width;f<q;){v=f++;v=a.width-1-v;w=!1;z=0;for(r=a.height;z<r;)if(G=z++,w=a.getPixel32(v,G,0),w=d?(w&b)==c:(w&b)!=c){v>h&&(h=v);break}if(w)break}f=
0;for(q=a.height;f<q;){G=f++;w=!1;z=0;for(r=a.width;z<r;)if(v=z++,w=a.getPixel32(v,G,0),w=d?(w&b)==c:(w&b)!=c){G<n&&(n=G);break}if(w)break}f=0;for(q=a.height;f<q;){G=f++;G=a.height-1-G;w=!1;z=0;for(r=a.width;z<r;)if(v=z++,w=a.getPixel32(v,G,0),w=d?(w&b)==c:(w&b)!=c){G>l&&(l=G);break}if(w)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 nf(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&&(W.unmult=255/(f&255),f=(W.__clamp[Math.round((f>>>24&255)*W.unmult)]&255)<<24|(W.__clamp[Math.round((f>>>16&255)*W.unmult)]&255)<<16|(W.__clamp[Math.round((f>>>
8&255)*W.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&&(W.unmult=255/(f&255),f=(W.__clamp[Math.round((f>>>24&255)*W.unmult)]&255)<<24|(W.__clamp[Math.round((f>>>16&255)*W.unmult)]&255)<<16|(W.__clamp[Math.round((f>>>8&255)*W.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 Na(new ArrayBuffer((b.width*b.height|0)*4)),f=a.buffer.data,g=a.buffer.format,h=a.buffer.premultiplied;a=new nh(a,b);for(var n,l,q=b=l=0,v=a.height;q<v;){n=q++;n=a.byteOffset+a.stride*n;for(var w=0,z=a.width;w<z;){w++;var r=g,G=h;G==null&&(G=!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}G&&(l&255)!=0&&(l&255)!=255&&(W.unmult=255/(l&255),l=(W.__clamp[Math.round((l>>>24&255)*W.unmult)]&255)<<24|(W.__clamp[Math.round((l>>>16&255)*W.unmult)]&255)<<16|(W.__clamp[Math.round((l>>>8&255)*W.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 nh(b,c);d=new nh(a,new nf(d.x,d.y,c.width,c.height));var l=b.buffer.data,q=a.buffer.data,v=b.buffer.format,w=a.buffer.format;b=b.buffer.premultiplied;for(var z=a.buffer.premultiplied,r,G,J=0,L=0,P=0,V=d.height;P<V;){G=P++;r=c.byteOffset+c.stride*G;G=d.byteOffset+d.stride*G;for(var ia=0,ea=d.width;ia<ea;){ia++;var ra=v,za=b;za==null&&(za=!1);ra==null&&(ra=0);switch(ra){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&&(W.unmult=255/(J&255),J=(W.__clamp[Math.round((J>>>24&255)*W.unmult)]&255)<<24|(W.__clamp[Math.round((J>>>16&255)*W.unmult)]&255)<<16|(W.__clamp[Math.round((J>>>8&255)*W.unmult)]&255)<<8|J&255);ra=w;za=z;za==null&&(za=!1);ra==null&&(ra=0);switch(ra){case 0:L=(q[G]&
255)<<24|(q[G+1]&255)<<16|(q[G+2]&255)<<8|q[G+3]&255;break;case 1:L=(q[G+1]&255)<<24|(q[G+2]&255)<<16|(q[G+3]&255)<<8|q[G]&255;break;case 2:L=(q[G+2]&255)<<24|(q[G+1]&255)<<16|(q[G]&255)<<8|q[G+3]&255}za&&(L&255)!=0&&(L&255)!=255&&(W.unmult=255/(L&255),L=(W.__clamp[Math.round((L>>>24&255)*W.unmult)]&255)<<24|(W.__clamp[Math.round((L>>>16&255)*W.unmult)]&255)<<16|(W.__clamp[Math.round((L>>>8&255)*W.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;ra=w;za=z;za==null&&(za=!1);ra==null&&(ra=0);za&&((L&255)==0?L!=0&&(L=0):(L&255)!=255&&(W.a16=W.__alpha16[L&255],L=((L>>>24&255)*W.a16>>16&255)<<24|((L>>>16&255)*W.a16>>16&255)<<16|((L>>>8&255)*W.a16>>16&
255)<<8|L&255));switch(ra){case 0:q[G]=L>>>24&255;q[G+1]=L>>>16&255;q[G+2]=L>>>8&255;q[G+3]=L&255;break;case 1:q[G]=L&255;q[G+1]=L>>>24&255;q[G+2]=L>>>16&255;q[G+3]=L>>>8&255;break;case 2:q[G]=L>>>8&255,q[G+1]=L>>>16&255,q[G+2]=L>>>24&255,q[G+3]=L&255}r+=4;G+=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&&(W.unmult=255/(d&255),d=(W.__clamp[Math.round((d>>>24&255)*W.unmult)]&255)<<24|(W.__clamp[Math.round((d>>>16&255)*W.unmult)]&255)<<16|(W.__clamp[Math.round((d>>>8&255)*W.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&&(W.a16=W.__alpha16[d&255],d=((d>>>24&255)*W.a16>>16&255)<<24|((d>>>16&255)*W.a16>>16&255)<<16|((d>>>8&255)*W.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 zj(f,b,c);for(var g=a.width,h=a.height,n=a.get_data(),l=f.data,q,v,w,z,r,G,J,L,P,V=0;V<c;)for(var ia=V++,ea=0,ra=b;ea<ra;)r=ea++,L=(r+.5)/b*g-.5,P=(ia+.5)/c*h-.5,G=L|0,J=P|0,q=(J*g+G)*4,v=G<g-1?q+4:q,w=J<h-1?q+g*4:q,z=v!=q?w+4:w,r=(ia*b+r)*4,G=L-G,J=P-J,P=1-G,L=1-J,l[r]=(Ua.toFloat(n[q])*P+Ua.toFloat(n[v])*G)*L+(Ua.toFloat(n[w])*P+Ua.toFloat(n[z])*G)*J|0,l[r+1]=(Ua.toFloat(n[q+1])*P+Ua.toFloat(n[v+1])*G)*L+(Ua.toFloat(n[w+1])*P+Ua.toFloat(n[z+1])*G)*J|
0,l[r+2]=(Ua.toFloat(n[q+2])*P+Ua.toFloat(n[v+2])*G)*L+(Ua.toFloat(n[w+2])*P+Ua.toFloat(n[z+2])*G)*J|0,l[r+3]=n[v+3]==0||n[w+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 v=l++,w=0,z=d.width;w<z;)n=w++,h=(v*d.width+n)*4,n=(v*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 v=2;var w=3;break;case 1:l=1;q=2;v=3;w=0;break;case 2:l=2,q=1,v=0,w=3}for(var z=0;z<d;){var r=
z++*4;var G=c[r+f];var J=c[r+g];var L=c[r+h];var P=c[r+n];c[r+l]=G;c[r+q]=J;c[r+v]=L;c[r+w]=P}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&&(W.unmult=255/(g&255),g=(W.__clamp[Math.round((g>>>24&255)*W.unmult)]&255)<<24|(W.__clamp[Math.round((g>>>16&255)*W.unmult)]&255)<<16|(W.__clamp[Math.round((g>>>8&255)*W.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&&(W.a16=W.__alpha16[d&255],d=((d>>>24&255)*W.a16>>16&255)<<24|((d>>>16&255)*W.a16>>16&255)<<16|((d>>>8&255)*W.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&&(W.a16=W.__alpha16[d&
255],d=((d>>>24&255)*W.a16>>16&255)<<24|((d>>>16&255)*W.a16>>16&255)<<16|((d>>>8&255)*W.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 nh(a,
b);var l=a.get_transparent(),q=c.bytes;c=c.offset;f=f!=tk.BIG_ENDIAN;for(var v=0,w=b.height;v<w;){var z=v++;z=b.byteOffset+b.stride*z;for(var r=0,G=b.width;r<G;){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 P=h,V=n;V==null&&(V=!1);P==null&&(P=
0);V&&((L&255)==0?L!=0&&(L=0):(L&255)!=255&&(W.a16=W.__alpha16[L&255],L=((L>>>24&255)*W.a16>>16&255)<<24|((L>>>16&255)*W.a16>>16&255)<<16|((L>>>8&255)*W.a16>>16&255)<<8|L&255));switch(P){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 v=
h;h=(v>>>16&255)<<24|(v>>>8&255)<<16|(v&255)<<8|v>>>24&255;v=n;n=(v>>>16&255)<<24|(v>>>8&255)<<16|(v&255)<<8|v>>>24&255;v=g;g=(v>>>16&255)<<24|(v>>>8&255)<<16|(v&255)<<8|v>>>24&255;break;case 2:v=h;h=(v>>>8&255)<<24|(v>>>16&255)<<16|(v>>>24&255)<<8|v&255;v=n;n=(v>>>8&255)<<24|(v>>>16&255)<<16|(v>>>24&255)<<8|v&255;v=g;g=(v>>>8&255)<<24|(v>>>16&255)<<16|(v>>>24&255)<<8|v&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;v=b.buffer.data;var w=a.buffer.data;if(v==null||w==null)return 0;var z=0;c=new nh(b,c);d=new nh(a,new nf(d.x,d.y,c.width,c.height));var r=b.buffer.format,G=a.buffer.format;b=b.buffer.premultiplied;for(var J=a.buffer.premultiplied,L,P,V=0,ia=0,ea=d.height;ia<ea;){P=ia++;L=c.byteOffset+c.stride*P;P=d.byteOffset+d.stride*P;for(var ra=0,za=d.width;ra<za;){ra++;q=r;var fb=b;fb==null&&(fb=!1);q==null&&(q=0);switch(q){case 0:V=(v[L]&255)<<24|(v[L+1]&255)<<16|(v[L+2]&
255)<<8|v[L+3]&255;break;case 1:V=(v[L+1]&255)<<24|(v[L+2]&255)<<16|(v[L+3]&255)<<8|v[L]&255;break;case 2:V=(v[L+2]&255)<<24|(v[L+1]&255)<<16|(v[L]&255)<<8|v[L+3]&255}fb&&(V&255)!=0&&(V&255)!=255&&(W.unmult=255/(V&255),V=(W.__clamp[Math.round((V>>>24&255)*W.unmult)]&255)<<24|(W.__clamp[Math.round((V>>>16&255)*W.unmult)]&255)<<16|(W.__clamp[Math.round((V>>>8&255)*W.unmult)]&255)<<8|V&255);q=V&n;fb=q>>>24&255;var eb=g>>>24&255;fb!=eb?q=Ua.gt(fb,eb)?1:-1:(fb=q>>>16&255,eb=g>>>16&255,fb!=eb?q=Ua.gt(fb,
eb)?1:-1:(fb=q>>>8&255,eb=g>>>8&255,fb!=eb?q=Ua.gt(fb,eb)?1:-1:(fb=q&255,eb=g&255,q=fb!=eb?Ua.gt(fb,eb)?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=G;fb=J;fb==null&&(fb=!1);q==null&&(q=0);fb&&((h&255)==0?h!=0&&(h=0):(h&255)!=255&&(W.a16=W.__alpha16[h&255],h=((h>>>24&255)*W.a16>>16&255)<<24|((h>>>16&255)*W.a16>>16&255)<<16|((h>>>8&255)*W.a16>>16&255)<<8|h&255));switch(q){case 0:w[P]=
h>>>24&255;w[P+1]=h>>>16&255;w[P+2]=h>>>8&255;w[P+3]=h&255;break;case 1:w[P]=h&255;w[P+1]=h>>>24&255;w[P+2]=h>>>16&255;w[P+3]=h>>>8&255;break;case 2:w[P]=h>>>8&255,w[P+1]=h>>>16&255,w[P+2]=h>>>24&255,w[P+3]=h&255}++z}else if(l)switch(q=G,fb=J,fb==null&&(fb=!1),q==null&&(q=0),fb&&((V&255)==0?V!=0&&(V=0):(V&255)!=255&&(W.a16=W.__alpha16[V&255],V=((V>>>24&255)*W.a16>>16&255)<<24|((V>>>16&255)*W.a16>>16&255)<<16|((V>>>8&255)*W.a16>>16&255)<<8|V&255)),q){case 0:w[P]=V>>>24&255;w[P+1]=V>>>16&255;w[P+2]=
V>>>8&255;w[P+3]=V&255;break;case 1:w[P]=V&255;w[P+1]=V>>>24&255;w[P+2]=V>>>16&255;w[P+3]=V>>>8&255;break;case 2:w[P]=V>>>8&255,w[P+1]=V>>>16&255,w[P+2]=V>>>24&255,w[P+3]=V&255}L+=4;P+=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&&(W.unmult=255/(d&255),d=(W.__clamp[Math.round((d>>>24&255)*W.unmult)]&255)<<24|(W.__clamp[Math.round((d>>>16&255)*W.unmult)]&255)<<16|(W.__clamp[Math.round((d>>>8&255)*W.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&&(W.a16=W.__alpha16[d&255],d=((d>>>24&255)*W.a16>>16&255)<<24|((d>>>
16&255)*W.a16>>16&255)<<16|((d>>>8&255)*W.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,v,w,z,r=0,G=c;r<G;){n=r++;l=n*=4;q=n+g*h;v=a[n];w=a[n+h*(d-1)];z=(g+1)*v;for(var J=0,L=g;J<L;){var P=J++;z+=a[n+P*h]}J=0;for(L=g+1;J<L;)J++,z+=a[q]-v,b[n]=Math.round(z*f),q+=h,n+=h;v=g+1;for(J=d-g;v<J;)v++,z+=a[q]-a[l],b[n]=Math.round(z*f),l+=h,q+=h,n+=h;q=d-g;for(v=d;q<v;)q++,z+=w-a[l],b[n]=Math.round(z*f),l+=h,n+=h}f=1/(g+g+1);h=c*4;r=0;for(G=c;r<G;){n=r++;l=n=n*4+1;q=n+g*h;v=a[n];w=a[n+h*(d-1)];z=(g+1)*v;J=0;for(L=g;J<L;)P=J++,z+=a[n+P*h];J=0;for(L=g+
1;J<L;)J++,z+=a[q]-v,b[n]=Math.round(z*f),q+=h,n+=h;v=g+1;for(J=d-g;v<J;)v++,z+=a[q]-a[l],b[n]=Math.round(z*f),l+=h,q+=h,n+=h;q=d-g;for(v=d;q<v;)q++,z+=w-a[l],b[n]=Math.round(z*f),l+=h,n+=h}f=1/(g+g+1);h=c*4;r=0;for(G=c;r<G;){n=r++;l=n=n*4+2;q=n+g*h;v=a[n];w=a[n+h*(d-1)];z=(g+1)*v;J=0;for(L=g;J<L;)P=J++,z+=a[n+P*h];J=0;for(L=g+1;J<L;)J++,z+=a[q]-v,b[n]=Math.round(z*f),q+=h,n+=h;v=g+1;for(J=d-g;v<J;)v++,z+=a[q]-a[l],b[n]=Math.round(z*f),l+=h,q+=h,n+=h;q=d-g;for(v=d;q<v;)q++,z+=w-a[l],b[n]=Math.round(z*
f),l+=h,n+=h}f=1/(g+g+1);h=c*4;r=0;for(G=c;r<G;){n=r++;l=n=n*4+3;q=n+g*h;v=a[n];w=a[n+h*(d-1)];z=(g+1)*v;J=0;for(L=g;J<L;)P=J++,z+=a[n+P*h];J=0;for(L=g+1;J<L;)J++,z+=a[q]-v,b[n]=Math.round(z*f),q+=h,n+=h;v=g+1;for(J=d-g;v<J;)v++,z+=a[q]-a[l],b[n]=Math.round(z*f),l+=h,q+=h,n+=h;q=d-g;for(v=d;q<v;)q++,z+=w-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,v,w,z,r=0;r<d;){l=n=r++*c;q=n+f;v=a[n*4+g];w=a[(n+c-1)*4+g];z=(f+1)*v;for(var G=0,J=f;G<J;){var L=
G++;z+=a[(n+L)*4+g]}G=0;for(J=f+1;G<J;)G++,z+=a[q*4+g]-v,b[n*4+g]=Math.round(z*h),++q,++n;v=f+1;for(G=c-f;v<G;)v++,z+=a[q*4+g]-a[l*4+g],b[n*4+g]=Math.round(z*h),++q,++l,++n;q=c-f;for(v=c;q<v;)q++,z+=w-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,v,w,z,r,G=0;G<c;){q=l=G++*4+g;v=l+f*n;w=a[l];z=a[l+n*(d-1)];r=(f+1)*w;for(var J=0,L=f;J<L;){var P=J++;r+=a[l+P*n]}J=0;for(L=f+1;J<L;)J++,r+=a[v]-w,b[l]=Math.round(r*h),v+=n,l+=n;w=f+1;for(J=
d-f;w<J;)w++,r+=a[v]-a[q],b[l]=Math.round(r*h),q+=n,v+=n,l+=n;v=d-f;for(w=d;v<w;)v++,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 Ua.gt(c,d)?1:-1;c=a>>>16&255;d=b>>>16&255;if(c!=d)return Ua.gt(c,d)?1:-1;c=a>>>8&255;d=b>>>8&255;if(c!=d)return Ua.gt(c,d)?1:-1;c=a&255;d=b&255;return c!=d?Ua.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=Ua.toFloat(a[b+3])*h|0,a[c+3]=h<0?0:h>255?255:h)};var nh=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"]=nh;nh.__name__="lime._internal.graphics._ImageDataUtil.ImageDataView";nh.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 nf);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__:nh};var hi=function(){};t["lime._internal.graphics.StackBlur"]=hi;hi.__name__="lime._internal.graphics.StackBlur";hi.blur=function(a,b,c,d,f,g,h){a.copyPixels(b,c,d);hi.__stackBlurCanvasRGBA(a,c.width|0,c.height|0,f,g,h)};hi.__stackBlurCanvasRGBA=function(a,b,c,d,f,g){d=Math.round(d)>>1;f=Math.round(f)>>1;if(hi.MUL_TABLE!=
null&&(d>=hi.MUL_TABLE.length&&(d=hi.MUL_TABLE.length-1),f>=hi.MUL_TABLE.length&&(f=hi.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,v=c-1,w=d+1,z=f+1,r=new jo,G=r;var J=1;for(var L=n;J<L;)J++,G=G.n=new jo;G.n=r;var P=n=new jo;J=1;for(L=l;J<L;)J++,P=P.n=new jo;P.n=n;for(var V=hi.MUL_TABLE[d],ia=hi.SHG_TABLE[d],ea=hi.MUL_TABLE[f],ra=hi.SHG_TABLE[f];g>0;){--g;var za=h=0;var fb=V,eb=ia;var Ra=c;do{var wb=a[h];l=w*wb;var cb=a[h+1];var Tb=w*
cb;var Ib=a[h+2];var Mb=w*Ib;J=a[h+3];var tc=w*J;G=r;P=w;do G.r=wb,G.g=cb,G.b=Ib,G.a=J,G=G.n;while(--P>-1);J=1;for(L=w;J<L;)P=J++,P=h+((q<P?q:P)<<2),l+=G.r=a[P],Tb+=G.g=a[P+1],Mb+=G.b=a[P+2],tc+=G.a=a[P+3],G=G.n;L=r;G=0;for(J=b;G<J;)P=G++,a[h++]=l*fb>>>eb,a[h++]=Tb*fb>>>eb,a[h++]=Mb*fb>>>eb,a[h++]=tc*fb>>>eb,P=P+d+1,P=za+(P<q?P:q)<<2,l-=L.r-(L.r=a[P]),Tb-=L.g-(L.g=a[P+1]),Mb-=L.b-(L.b=a[P+2]),tc-=L.a-(L.a=a[P+3]),L=L.n;za+=b}while(--Ra>0);fb=ea;eb=ra;Ra=0;for(za=b;Ra<za;){G=Ra++;h=G<<2;wb=a[h];l=
z*wb;cb=a[h+1];Tb=z*cb;Ib=a[h+2];Mb=z*Ib;J=a[h+3];tc=z*J;P=n;h=0;for(L=z;h<L;)h++,P.r=wb,P.g=cb,P.b=Ib,P.a=J,P=P.n;J=b;L=1;for(wb=f+1;L<wb;)cb=L++,h=J+G<<2,l+=P.r=a[h],Tb+=P.g=a[h+1],Mb+=P.b=a[h+2],tc+=P.a=a[h+3],P=P.n,cb<v&&(J+=b);h=G;L=n;if(g>0)for(wb=0,cb=c;wb<cb;)Ib=wb++,P=h<<2,J=tc*fb>>>eb,a[P+3]=J,J>0?(a[P]=l*fb>>>eb,a[P+1]=Tb*fb>>>eb,a[P+2]=Mb*fb>>>eb):a[P]=a[P+1]=a[P+2]=0,P=Ib+z,P=G+(P<v?P:v)*b<<2,l-=L.r-(L.r=a[P]),Tb-=L.g-(L.g=a[P+1]),Mb-=L.b-(L.b=a[P+2]),tc-=L.a-(L.a=a[P+3]),L=L.n,h+=b;
else for(var Bd=0,Qb=c;Bd<Qb;){var wd=Bd++;P=h<<2;J=tc*fb>>>eb;a[P+3]=J;J>0?(J=255/J,wb=(l*fb>>>eb)*J|0,cb=(Tb*fb>>>eb)*J|0,Ib=(Mb*fb>>>eb)*J|0,a[P]=wb>255?255:wb,a[P+1]=cb>255?255:cb,a[P+2]=Ib>255?255:Ib):a[P]=a[P+1]=a[P+2]=0;P=wd+z;P=G+(P<v?P:v)*b<<2;l-=L.r-(L.r=a[P]);Tb-=L.g-(L.g=a[P+1]);Mb-=L.b-(L.b=a[P+2]);tc-=L.a-(L.a=a[P+3]);L=L.n;h+=b}}}}};var jo=function(){this.a=this.b=this.g=this.r=0;this.n=null};t["lime._internal.graphics.BlurStack"]=jo;jo.__name__="lime._internal.graphics.BlurStack";
jo.prototype={r:null,g:null,b:null,a:null,n:null,__class__:jo};var aA=function(){};t["lime._internal.macros.AssetsMacro"]=aA;aA.__name__="lime._internal.macros.AssetsMacro";var Wy=function(){this.canceled=!1;this.__listeners=[];this.__priorities=[];this.__repeat=[]};t["lime.app.Event"]=Wy;Wy.__name__="lime.app.Event";Wy.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__:Wy};var Fc=function(a,b){if(a!=null)try{this.value=a(),this.isComplete=!0}catch(c){Pb.lastError=c,this.error=Z.caught(c).unwrap(),this.isError=!0}};t["lime.app.Future"]=Fc;Fc.__name__="lime.app.Future";Fc.ofEvents=function(a,b,c){var d=new Qf;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};
Fc.withError=function(a){var b=new Fc;b.isError=!0;b.error=a;return b};Fc.withValue=function(a){var b=new Fc;b.isComplete=!0;b.value=a;return b};Fc.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 Fc;b.isError=!0;b.error=
this.error;return b}var c=new Qf;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__:Fc};var Qf=function(){this.future=new Fc};t["lime.app.Promise"]=Qf;Qf.__name__="lime.app.Promise";Qf.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__:Qf,__properties__:{get_isError:"get_isError",get_isComplete:"get_isComplete"}};var Nx=function(){this.canceled=!1;this.__listeners=[];this.__priorities=[];this.__repeat=[]};t["lime.app._Event_Array_String__Void"]=Nx;Nx.__name__=
"lime.app._Event_Array_String__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){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__:Nx};var Ox=function(){this.canceled=!1;this.__listeners=[];this.__priorities=[];this.__repeat=[]};t["lime.app._Event_Float_Float_Float_Void"]=Ox;Ox.__name__="lime.app._Event_Float_Float_Float_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 Px=function(){this.canceled=!1;this.__listeners=[];this.__priorities=[];this.__repeat=[]};t["lime.app._Event_Float_Float_Int_Void"]=Px;Px.__name__="lime.app._Event_Float_Float_Int_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,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__:Px};var gq=function(){this.canceled=!1;this.__listeners=[];this.__priorities=[];this.__repeat=[]};t["lime.app._Event_Float_Float_Void"]=gq;gq.__name__="lime.app._Event_Float_Float_Void";
gq.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__:gq};var Qx=
function(){this.canceled=!1;this.__listeners=[];this.__priorities=[];this.__repeat=[]};t["lime.app._Event_Float_Float_lime_ui_MouseButton_Void"]=Qx;Qx.__name__="lime.app._Event_Float_Float_lime_ui_MouseButton_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,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__:Qx};var Rx=function(){this.canceled=!1;this.__listeners=[];this.__priorities=[];this.__repeat=[]};t["lime.app._Event_Float_Float_lime_ui_MouseWheelMode_Void"]=Rx;Rx.__name__="lime.app._Event_Float_Float_lime_ui_MouseWheelMode_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,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__:Rx};var Sx=function(){this.canceled=!1;this.__listeners=[];this.__priorities=[];this.__repeat=[]};t["lime.app._Event_Int_Float_Void"]=
Sx;Sx.__name__="lime.app._Event_Int_Float_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,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__:Sx};var iu=function(){this.canceled=!1;this.__listeners=[];this.__priorities=[];this.__repeat=[]};t["lime.app._Event_Int_Int_Void"]=iu;iu.__name__="lime.app._Event_Int_Int_Void";iu.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__:iu};var qm=function(){this.canceled=!1;this.__listeners=[];this.__priorities=[];this.__repeat=[]};t["lime.app._Event_Int_Void"]=qm;qm.__name__="lime.app._Event_Int_Void";qm.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__:qm};var Zv=function(){this.canceled=!1;this.__listeners=[];this.__priorities=[];this.__repeat=[]};t["lime.app._Event_Int_lime_system_Orientation_Void"]=Zv;Zv.__name__="lime.app._Event_Int_lime_system_Orientation_Void";
Zv.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__:Zv};var Tx=
function(){this.canceled=!1;this.__listeners=[];this.__priorities=[];this.__repeat=[]};t["lime.app._Event_Int_lime_ui_JoystickHatPosition_Void"]=Tx;Tx.__name__="lime.app._Event_Int_lime_ui_JoystickHatPosition_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,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__:Tx};var Ux=function(){this.canceled=!1;this.__listeners=[];this.__priorities=[];this.__repeat=[]};t["lime.app._Event_String_Int_Int_Void"]=Ux;Ux.__name__="lime.app._Event_String_Int_Int_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,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__:Ux};var ko=function(){this.canceled=!1;this.__listeners=[];this.__priorities=[];this.__repeat=[]};t["lime.app._Event_String_Void"]=ko;ko.__name__="lime.app._Event_String_Void";
ko.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__:ko};var kf=
function(){this.canceled=!1;this.__listeners=[];this.__priorities=[];this.__repeat=[]};t["lime.app._Event_Void_Void"]=kf;kf.__name__="lime.app._Event_Void_Void";kf.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__:kf};var Vx=function(){this.canceled=!1;this.__listeners=[];this.__priorities=[];this.__repeat=[]};t["lime.app._Event_haxe_Exception_Void"]=Vx;Vx.__name__="lime.app._Event_haxe_Exception_Void";Vx.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__:Vx};var ju=function(){this.canceled=!1;this.__listeners=[];this.__priorities=[];this.__repeat=[]};t["lime.app._Event_lime_graphics_RenderContext_Void"]=ju;ju.__name__="lime.app._Event_lime_graphics_RenderContext_Void";ju.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__:ju};var Yv=function(){this.canceled=!1;this.__listeners=
[];this.__priorities=[];this.__repeat=[]};t["lime.app._Event_lime_system_Orientation_Void"]=Yv;Yv.__name__="lime.app._Event_lime_system_Orientation_Void";Yv.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__:Yv};var Wx=function(){this.canceled=!1;this.__listeners=[];this.__priorities=[];this.__repeat=[]};t["lime.app._Event_lime_system_State_Void"]=Wx;Wx.__name__="lime.app._Event_lime_system_State_Void";Wx.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__:Wx};var Xx=function(){this.canceled=!1;this.__listeners=[];this.__priorities=[];this.__repeat=[]};t["lime.app._Event_lime_ui_GamepadAxis_Float_Void"]=Xx;Xx.__name__="lime.app._Event_lime_ui_GamepadAxis_Float_Void";Xx.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__:Xx};var ku=function(){this.canceled=
!1;this.__listeners=[];this.__priorities=[];this.__repeat=[]};t["lime.app._Event_lime_ui_GamepadButton_Void"]=ku;ku.__name__="lime.app._Event_lime_ui_GamepadButton_Void";ku.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__:ku};var Yx=function(){this.canceled=!1;this.__listeners=[];this.__priorities=[];this.__repeat=[]};t["lime.app._Event_lime_ui_Gamepad_Void"]=Yx;Yx.__name__="lime.app._Event_lime_ui_Gamepad_Void";Yx.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__:Yx};var Zx=function(){this.canceled=!1;this.__listeners=[];this.__priorities=[];this.__repeat=[]};t["lime.app._Event_lime_ui_Joystick_Void"]=Zx;Zx.__name__="lime.app._Event_lime_ui_Joystick_Void";Zx.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__:Zx};var lu=function(){this.canceled=!1;this.__listeners=[];this.__priorities=
[];this.__repeat=[]};t["lime.app._Event_lime_ui_KeyCode_lime_ui_KeyModifier_Void"]=lu;lu.__name__="lime.app._Event_lime_ui_KeyCode_lime_ui_KeyModifier_Void";lu.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__:lu};var lo=function(){this.canceled=!1;this.__listeners=[];this.__priorities=[];this.__repeat=[]};t["lime.app._Event_lime_ui_Touch_Void"]=lo;lo.__name__="lime.app._Event_lime_ui_Touch_Void";lo.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__:lo};var $v=function(){this.canceled=!1;this.__listeners=[];this.__priorities=[];this.__repeat=[]};t["lime.app._Event_lime_ui_Window_Void"]=$v;$v.__name__="lime.app._Event_lime_ui_Window_Void";
$v.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__:$v};var $x=
function(){this.canceled=!1;this.__listeners=[];this.__priorities=[];this.__repeat=[]};t["lime.app._Event_lime_utils_Resource_Void"]=$x;$x.__name__="lime.app._Event_lime_utils_Resource_Void";$x.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__:$x};var Xy=function(){this.canceled=!1;this.__listeners=[];this.__priorities=[];this.__repeat=[]};t["lime.app._Event_ofEvents_T_Void"]=Xy;Xy.__name__="lime.app._Event_ofEvents_T_Void";Xy.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__:Xy};var Nc=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=
ig.CANVAS,$b.__current.__worker!=null||$b.__isWorker)&&(h=ig.DATA);this.type=h;if(a==null){if(d>0&&f>0)switch(this.type._hx_index){case 0:this.buffer=new zj(null,d,f);zb.createCanvas(this,d,f);g!=null&&g!=0&&this.fillRect(new nf(0,0,d,f),g);break;case 1:a=d*f*4,a=a!=null?new Uint8Array(a):null,this.buffer=new zj(a,d,f),g!=null&&g!=0&&this.fillRect(new nf(0,0,d,f),g)}}else this.__fromImageBuffer(a)};t["lime.graphics.Image"]=Nc;Nc.__name__="lime.graphics.Image";Nc.fromBase64=function(a,b){if(a==null)return null;
var c=new Nc;c.__fromBase64(a,b);return c};Nc.fromBitmapData=function(a){return a==null?null:a.image};Nc.fromBytes=function(a){if(a==null)return null;var b=new Nc;return b.__fromBytes(a)?b:null};Nc.fromCanvas=function(a){if(a==null)return null;var b=new zj(null,a.width,a.height);b.set_src(a);a=new Nc(b);a.type=ig.CANVAS;return a};Nc.fromFile=function(a){if(a==null)return null;var b=new Nc;return b.__fromFile(a)?b:null};Nc.fromImageElement=function(a){if(a==null)return null;var b=new zj(null,a.width,
a.height);b.set_src(a);a=new Nc(b);a.type=ig.CANVAS;return a};Nc.loadFromBase64=function(a,b){return a==null||b==null?Fc.withValue(null):Zb.loadImage("data:"+b+";base64,"+a)};Nc.loadFromBytes=function(a){if(a==null)return Fc.withValue(null);if(Nc.__isPNG(a))var b="image/png";else if(Nc.__isJPG(a))b="image/jpeg";else if(Nc.__isGIF(a))b="image/gif";else if(Nc.__isWebP(a))b="image/webp";else return Fc.withValue(null);return Zb.loadImageFromBytes(a,b)};Nc.loadFromFile=function(a){return a==null?Fc.withValue(null):
Zb.loadImage(a)};Nc.__isGIF=function(a){if(a==null||a.length<6)return!1;a=a.getString(0,6);return a!="GIF87a"?a=="GIF89a":!0};Nc.__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};Nc.__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};Nc.__isWebP=function(a){return a==null||a.length<16?!1:a.getString(0,4)=="RIFF"?a.getString(8,4)==
"WEBP":!1};Nc.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==ig.CANVAS?zb.convertToCanvas(this):zb.convertToData(this);var a=new Nc(this.buffer.clone(),this.offsetX,this.offsetY,this.width,this.height,null,this.type);a.version=this.version;return a}return new Nc(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:zb.colorTransform(this,a,b);break;case 1:zb.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==Ii.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:zb.copyChannel(this,a,b,c,d,f);break;case 1:zb.convertToData(this);zb.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?(zb.convertToData(this),zb.convertToData(a),d!=null&&zb.convertToData(d),Ub.copyPixels(this,a,b,c,d,f,g)):(zb.convertToCanvas(this),zb.convertToCanvas(a),zb.copyPixels(this,a,b,c,d,f,g));break;case 1:zb.convertToData(this);zb.convertToData(a);d!=null&&zb.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 fq.encode(this);switch(a._hx_index){case 0:return Vy.encode(this);case 1:return fu.encode(this,b);case 2:return fq.encode(this)}},fillRect:function(a,b,c){a=this.__clipRect(a);if(this.buffer!=
null&&a!=null)switch(this.type._hx_index){case 0:zb.fillRect(this,a,b,c);break;case 1:zb.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:zb.floodFill(this,a,b,c,d);break;case 1:zb.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 zb.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 nf(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 zb.getPixel(this,a,b,c);case 1:return zb.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 zb.getPixel32(this,
a,b,c);case 1:return zb.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 zb.getPixels(this,
a,b);case 1:return zb.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:zb.convertToCanvas(this);zb.merge(this,a,b,c,d,f,g,h);break;case 1:zb.convertToData(this);zb.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:zb.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:zb.scroll(this,a,b);break;case 1:this.copyPixels(this,this.get_rect(),new Yf(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:zb.setPixel(this,a,b,c,d);break;case 1:zb.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:zb.setPixel32(this,a,b,c,d);break;case 1:zb.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=tk.BIG_ENDIAN),this.type._hx_index){case 0:zb.setPixels(this,a,b,c,d);break;case 1:zb.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 zb.convertToData(this),zb.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 zj(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(Nc.__isPNG(a))var c="image/png";else if(Nc.__isJPG(a))c="image/jpeg";else if(Nc.__isGIF(a))c="image/gif";else return!1;this.__fromBase64(yj.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 zj(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&&zb.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:zb.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:zb.convertToData(this),Ub.multiplyAlpha(this)}else!a&&this.buffer.premultiplied&&this.type._hx_index==1&&(zb.convertToData(this),Ub.unmultiplyAlpha(this));
return a},get_rect:function(){return new nf(0,0,this.width,this.height)},get_src:function(){this.buffer.__srcCanvas!=null||this.buffer.data==null&&this.type!=ig.DATA||zb.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__:Nc,__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 zj=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"]=
zj;zj.__name__="lime.graphics.ImageBuffer";zj.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 zj(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__:zj,__properties__:{get_stride:"get_stride",set_src:"set_src",
get_src:"get_src"}};var Ii=Q["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}};Ii.__constructs__=[Ii.RED,Ii.GREEN,Ii.BLUE,
Ii.ALPHA];var mu=Q["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}};mu.__constructs__=[mu.BMP,mu.JPEG,mu.PNG];var ig=Q["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}};ig.__constructs__=[ig.CANVAS,ig.DATA,ig.FLASH,ig.CUSTOM];var Mx=function(){};t["lime.graphics.RenderContext"]=Mx;Mx.__name__="lime.graphics.RenderContext";Mx.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__:Mx};var bA={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,v){q!=null?a.compressedTexSubImage2D(b,c,d,f,g,h,n,l,q,v):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,v){v!=null?a.texImage2D(b,c,d,f,g,h,n,l,q,v):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,v){v!=null?a.texSubImage2D(b,c,d,f,g,h,n,l,q,v):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}},Ad={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}},hq=function(a){};t["lime.graphics.cairo.Cairo"]=hq;hq.__name__="lime.graphics.cairo.Cairo";hq.__properties__={get_versionString:"get_versionString",get_version:"get_version"};hq.get_version=function(){return 0};hq.get_versionString=function(){return""};hq.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__:hq,__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 Yy=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"]=Yy;Yy.__name__="lime.graphics.cairo.CairoGlyph";Yy.prototype={index:null,x:null,y:null,__class__:Yy};var nA={__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 Ji.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}},ay={__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}},oA={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,Ji.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 v=A.context;l!=null?v.compressedTexSubImage2D(a,b,c,d,f,g,h,n,l,q):v.compressedTexSubImage2D(a,b,c,d,f,g,h,n)};A.compressedTexSubImage3DWEBGL=function(a,b,c,d,f,g,h,n,l,q,v,w){A.context.compressedTexSubImage3D(a,b,c,d,f,g,h,n,l,q,v,w)};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 Ji.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 v=A.context;q!=null?v.texImage2D(a,b,c,d,f,g,h,n,l,q):h!=null?v.texImage2D(a,b,c,d,f,g,h,n,l):v.texImage2D(a,b,c,d,f,g)};A.texImage3DWEBGL=function(a,b,c,d,f,g,h,n,l,q,v){A.context.texImage3D(a,b,c,d,f,g,h,n,l,q,v)};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 v=A.context;q!=null?v.texSubImage2D(a,b,c,d,f,g,h,n,l,q):n!=null?v.texSubImage2D(a,b,c,d,f,g,h,n,l):v.texSubImage2D(a,b,c,d,f,g,h)};A.texSubImage3DWEBGL=function(a,b,c,d,f,g,h,n,l,q,v,w){A.context.texSubImage3D(a,b,c,d,f,g,h,n,l,q,v,w)};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){bA.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 Zy=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"]=Zy;Zy.__name__="lime.graphics.opengl.ext.KHR_debug";Zy.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__:Zy};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=il.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}},mw=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"]=mw;mw.__name__="lime.math.CairoMatrix3";mw.prototype={a:null,b:null,c:null,d:null,tx:null,ty:null,__class__:mw};var xb={__properties__:{set_position:"set_position",
get_position:"get_position",get_determinant:"get_determinant"},_new:function(a){if(a==null||a.length!=16)a=xb.__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],v=a[2],w=a[6],z=a[10],r=a[14],G=a[3],J=a[7],L=a[11],P=a[15],V=xb.get(b,0),ia=xb.get(b,4),ea=xb.get(b,8),ra=xb.get(b,12),za=xb.get(b,1),fb=xb.get(b,5),eb=xb.get(b,9),Ra=xb.get(b,13),wb=xb.get(b,2),cb=xb.get(b,6),Tb=xb.get(b,10),Ib=xb.get(b,14),Mb=xb.get(b,
3),tc=xb.get(b,7),Bd=xb.get(b,11);b=xb.get(b,15);a[0]=c*V+h*ia+v*ea+G*ra;a[1]=c*za+h*fb+v*eb+G*Ra;a[2]=c*wb+h*cb+v*Tb+G*Ib;a[3]=c*Mb+h*tc+v*Bd+G*b;a[4]=d*V+n*ia+w*ea+J*ra;a[5]=d*za+n*fb+w*eb+J*Ra;a[6]=d*wb+n*cb+w*Tb+J*Ib;a[7]=d*Mb+n*tc+w*Bd+J*b;a[8]=f*V+l*ia+z*ea+L*ra;a[9]=f*za+l*fb+z*eb+L*Ra;a[10]=f*wb+l*cb+z*Tb+L*Ib;a[11]=f*Mb+l*tc+z*Bd+L*b;a[12]=g*V+q*ia+r*ea+P*ra;a[13]=g*za+q*fb+r*eb+P*Ra;a[14]=g*wb+q*cb+r*Tb+P*Ib;a[15]=g*Mb+q*tc+r*Bd+P*b},appendRotation:function(a,b,c,d){b=xb.__getAxisRotation(a,
c.x,c.y,c.z,b);d!=null&&xb.appendTranslation(b,d.x,d.y,d.z);xb.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;xb.append(a,xb._new(b))},appendTranslation:function(a,b,c,d){a[12]+=b;a[13]+=c;a[14]+=d},clone:function(a){a=il.toArrayBufferView(a);a=a!=null?new Float32Array(a):null;return xb._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:Xb.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:Xb.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:Xb.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:Xb.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 Z.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 ie);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=xb._new();xb.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=xb._new());for(var f=0;f<16;){var g=f++;xb.set(d,g,xb.get(a,g)+(xb.get(b,g)-xb.get(a,g))*c)}return d},interpolateTo:function(a,b,c){for(var d=0;d<16;){var f=d++;a[f]+=(xb.get(b,f)-a[f])*c}},invert:function(a){var b=xb.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],v=a[13],w=a[2],z=a[6],
r=a[10],G=a[14],J=a[3],L=a[7],P=a[11],V=a[15];a[0]=b*(l*(r*V-G*P)-q*(z*V-G*L)+v*(z*P-r*L));a[1]=-b*(n*(r*V-G*P)-q*(w*V-G*J)+v*(w*P-r*J));a[2]=b*(n*(z*V-G*L)-l*(w*V-G*J)+v*(w*L-z*J));a[3]=-b*(n*(z*P-r*L)-l*(w*P-r*J)+q*(w*L-z*J));a[4]=-b*(f*(r*V-G*P)-g*(z*V-G*L)+h*(z*P-r*L));a[5]=b*(d*(r*V-G*P)-g*(w*V-G*J)+h*(w*P-r*J));a[6]=-b*(d*(z*V-G*L)-f*(w*V-G*J)+h*(w*L-z*J));a[7]=b*(d*(z*P-r*L)-f*(w*P-r*J)+g*(w*L-z*J));a[8]=b*(f*(q*V-v*P)-g*(l*V-v*L)+h*(l*P-q*L));a[9]=-b*(d*(q*V-v*P)-g*(n*V-v*J)+h*(n*P-q*J));
a[10]=b*(d*(l*V-v*L)-f*(n*V-v*J)+h*(n*L-l*J));a[11]=-b*(d*(l*P-q*L)-f*(n*P-q*J)+g*(n*L-l*J));a[12]=-b*(f*(q*G-v*r)-g*(l*G-v*z)+h*(l*r-q*z));a[13]=b*(d*(q*G-v*r)-g*(n*G-v*w)+h*(n*r-q*w));a[14]=-b*(d*(l*G-v*z)-f*(n*G-v*w)+h*(n*z-l*w));a[15]=b*(d*(l*r-q*z)-f*(n*r-q*w)+g*(n*z-l*w))}return c},pointAt:function(a,b,c,d){c==null&&(c=new ie(0,0,1));d==null&&(d=new ie(0,1,0));var f=null;f==null&&(f=new ie);f.x=b.x-c.x;f.y=b.y-c.y;f.z=b.z-c.z;c=f;d=new ie(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 ie(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 ie);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 ie(-c.y,c.x,0):new ie(1,0,0);f=null;f==null&&(f=new ie);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=xb.get(b,0),d=xb.get(b,4),f=xb.get(b,8),g=xb.get(b,12),h=xb.get(b,1),n=xb.get(b,5),l=xb.get(b,9),q=xb.get(b,13),v=xb.get(b,2),w=xb.get(b,6),z=xb.get(b,10),r=xb.get(b,14),G=xb.get(b,3),J=xb.get(b,7),L=xb.get(b,11);b=xb.get(b,15);var P=a[0],V=a[4],ia=a[8],ea=a[12],ra=a[1],za=a[5],fb=
a[9],eb=a[13],Ra=a[2],wb=a[6],cb=a[10],Tb=a[14],Ib=a[3],Mb=a[7],tc=a[11],Bd=a[15];a[0]=c*P+h*V+v*ia+G*ea;a[1]=c*ra+h*za+v*fb+G*eb;a[2]=c*Ra+h*wb+v*cb+G*Tb;a[3]=c*Ib+h*Mb+v*tc+G*Bd;a[4]=d*P+n*V+w*ia+J*ea;a[5]=d*ra+n*za+w*fb+J*eb;a[6]=d*Ra+n*wb+w*cb+J*Tb;a[7]=d*Ib+n*Mb+w*tc+J*Bd;a[8]=f*P+l*V+z*ia+L*ea;a[9]=f*ra+l*za+z*fb+L*eb;a[10]=f*Ra+l*wb+z*cb+L*Tb;a[11]=f*Ib+l*Mb+z*tc+L*Bd;a[12]=g*P+q*V+r*ia+b*ea;a[13]=g*ra+q*za+r*fb+b*eb;a[14]=g*Ra+q*wb+r*cb+b*Tb;a[15]=g*Ib+q*Mb+r*tc+b*Bd},prependRotation:function(a,
b,c,d){b=xb.__getAxisRotation(a,c.x,c.y,c.z,b);d!=null&&xb.appendTranslation(b,d.x,d.y,d.z);xb.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;xb.prepend(a,xb._new(b))},prependTranslation:function(a,b,c,d){var f=xb._new();xb.set_position(f,new ie(b,c,d));xb.prepend(a,f)},transformVector:function(a,b,c){c==null&&(c=new ie);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=xb._new();b=new ie(b,c,d);f=Math.PI/
180*-f;d=Math.cos(f);f=Math.sin(f);c=1-d;xb.set(a,0,d+b.x*b.x*c);xb.set(a,5,d+b.y*b.y*c);xb.set(a,10,d+b.z*b.z*c);d=b.x*b.y*c;var g=b.z*f;xb.set(a,4,d+g);xb.set(a,1,d-g);d=b.x*b.z*c;g=b.y*f;xb.set(a,8,d-g);xb.set(a,2,d+g);d=b.y*b.z*c;g=b.x*f;xb.set(a,9,d+g);xb.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 ie(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}},W={__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&&(W.a16=W.__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&&(W.unmult=255/(a&255))},
set:function(a,b,c,d,f){},unmultiplyAlpha:function(a){(a&255)!=0&&(a&255)!=255&&(W.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&&(W.a16=W.__alpha16[a&255],a=((a>>>24&255)*W.a16>>16&255)<<24|((a>>>16&255)*W.a16>>16&255)<<16|((a>>>8&255)*W.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}},
nf=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"]=nf;nf.__name__="lime.math.Rectangle";nf.prototype={height:null,width:null,x:null,y:null,clone:function(){return new nf(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 nf);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 nf);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 Yf(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 Yf(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 Yf(this.x,
this.y)},set_topLeft:function(a){this.x=a.x;this.y=a.y;return a.clone()},__class__:nf,__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 Yf=function(a,b){b==null&&(b=0);a==null&&(a=0);this.x=a;this.y=b};
t["lime.math.Vector2"]=Yf;Yf.__name__="lime.math.Vector2";Yf.distance=function(a,b){var c=a.x-b.x;a=a.y-b.y;return Math.sqrt(c*c+a*a)};Yf.interpolate=function(a,b,c,d){d==null&&(d=new Yf);d.x=b.x+c*(a.x-b.x);d.y=b.y+c*(a.y-b.y);return d};Yf.polar=function(a,b,c){c==null&&(c=new Yf);var d=a*Math.sin(b);c.x=a*Math.cos(b);c.y=d;return c};Yf.prototype={x:null,y:null,add:function(a,b){b==null&&(b=new Yf);b.x=a.x+this.x;b.y=a.y+this.y;return b},clone:function(){return new Yf(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 Yf);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__:Yf,__properties__:{get_lengthSquared:"get_lengthSquared",
get_length:"get_length"}};var ie=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"]=ie;ie.__name__="lime.math.Vector4";ie.__properties__={get_Z_AXIS:"get_Z_AXIS",get_Y_AXIS:"get_Y_AXIS",get_X_AXIS:"get_X_AXIS"};ie.angleBetween=function(a,b){a=new ie(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 ie(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)};ie.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)};ie.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};ie.get_X_AXIS=function(){return new ie(1,0,0)};ie.get_Y_AXIS=function(){return new ie(0,1,0)};ie.get_Z_AXIS=function(){return new ie(0,0,1)};ie.prototype={w:null,x:null,y:null,z:null,add:function(a,b){b==null&&(b=new ie);b.x=this.x+a.x;b.y=this.y+a.y;b.z=this.z+a.z;
return b},clone:function(){return new ie(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 ie);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 ie);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__:ie,__properties__:{get_lengthSquared:"get_lengthSquared",get_length:"get_length"}};var re=function(){};
t["lime.media.AudioBuffer"]=re;re.__name__="lime.media.AudioBuffer";re.fromBase64=function(a){if(a==null)return null;a.indexOf(",")==-1&&(a="data:"+re.__getCodec(yj.decode(a))+";base64,"+a);var b=new re;b.set_src(new Howl({src:[a],html5:!0,preload:!1}));return b};re.fromBytes=function(a){if(a==null)return null;var b=new re;b.set_src(new Howl({src:["data:"+re.__getCodec(a)+";base64,"+yj.encode(a)],html5:!0,preload:!1}));return b};re.fromFile=function(a){if(a==null)return null;var b=new re;b.__srcHowl=
new Howl({src:[a],preload:!1});return b};re.fromFiles=function(a){var b=new re;b.__srcHowl=new Howl({src:a,preload:!1});return b};re.fromVorbisFile=function(a){return null};re.loadFromFile=function(a){var b=new Qf,c=re.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};re.loadFromFiles=function(a){var b=new Qf,c=re.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};re.__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"}}}Xb.error("Unsupported sound format",{fileName:"lime/media/AudioBuffer.hx",lineNumber:450,className:"lime.media.AudioBuffer",methodName:"__getCodec"});return null};re.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__:re,__properties__:{set_src:"set_src",get_src:"get_src"}};var lw=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 by,this.type="html5")}else this.type="custom"};t["lime.media.AudioContext"]=lw;lw.__name__="lime.media.AudioContext";
lw.prototype={custom:null,flash:null,html5:null,openal:null,type:null,web:null,__class__:lw};var jw=function(a,b,c,d){d==null&&(d=0);b==null&&(b=0);this.onComplete=new kf;this.buffer=a;this.offset=b;this.__backend=new Kx(this);c!=null&&c!=0&&this.set_length(c);this.set_loops(d);a!=null&&this.init()};t["lime.media.AudioSource"]=jw;jw.__name__="lime.media.AudioSource";jw.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__:jw,__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 $y=function(){};t["lime.media.FlashAudioContext"]=$y;$y.__name__="lime.media.FlashAudioContext";$y.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__:$y};var by=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"]=by;by.__name__="lime.media.HTML5AudioContext";
by.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 re;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__:by};var az=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"]=
az;az.__name__="lime.media.OpenALAudioContext";az.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){T.bufferData(a,b,c,d,f)},buffer3f:function(a,b,c,d,f){T.buffer3f(a,b,c,d,f)},buffer3i:function(a,
b,c,d,f){T.buffer3i(a,b,c,d,f)},bufferf:function(a,b,c){T.bufferf(a,b,c)},bufferfv:function(a,b,c){T.bufferfv(a,b,c)},bufferi:function(a,b,c){T.bufferi(a,b,c)},bufferiv:function(a,b,c){T.bufferiv(a,b,c)},closeDevice:function(a){return Oc.closeDevice(a)},createContext:function(a,b){return Oc.createContext(a,b)},createBuffer:function(){return T.createBuffer()},createSource:function(){return T.createSource()},deleteBuffer:function(a){T.deleteBuffer(a)},deleteBuffers:function(a){T.deleteBuffers(a)},deleteSource:function(a){T.deleteSource(a)},
deleteSources:function(a){T.deleteSources(a)},destroyContext:function(a){a!=null&&Oc.destroyContext(a)},disable:function(a){T.disable(a)},distanceModel:function(a){T.distanceModel(a)},dopplerFactor:function(a){T.dopplerFactor(a)},dopplerVelocity:function(a){T.dopplerVelocity(a)},enable:function(a){T.enable(a)},genSource:function(){return this.createSource()},genSources:function(a){return T.genSources(a)},genBuffer:function(){return this.createBuffer()},genBuffers:function(a){return T.genBuffers(a)},
getBoolean:function(a){return T.getBoolean(a)},getBooleanv:function(a,b){b==null&&(b=1);return T.getBooleanv(a,b)},getBuffer3f:function(a,b){return T.getBuffer3f(a,b)},getBuffer3i:function(a,b){return T.getBuffer3i(a,b)},getBufferf:function(a,b){return T.getBufferf(a,b)},getBufferfv:function(a,b,c){c==null&&(c=1);return T.getBufferfv(a,b,c)},getBufferi:function(a,b){return T.getBufferi(a,b)},getBufferiv:function(a,b,c){c==null&&(c=1);return T.getBufferiv(a,b,c)},getContextsDevice:function(a){return a==
null?null:Oc.getContextsDevice(a)},getCurrentContext:function(){return Oc.getCurrentContext()},getDouble:function(a){return T.getDouble(a)},getDoublev:function(a,b){b==null&&(b=1);return T.getDoublev(a,b)},getEnumValue:function(a){return T.getEnumValue(a)},getError:function(a){return a==null?T.getError():Oc.getError(a)},getErrorString:function(a){return a==null?T.getErrorString():Oc.getErrorString(a)},getFloat:function(a){return T.getFloat(a)},getFloatv:function(a,b){b==null&&(b=1);return T.getFloatv(a,
b)},getInteger:function(a){return T.getInteger(a)},getIntegerv:function(a,b,c){b==null&&(b=1);return c==null?T.getIntegerv(a,b):Oc.getIntegerv(c,a,b)},getListener3f:function(a){return T.getListener3f(a)},getListener3i:function(a){return T.getListener3i(a)},getListenerf:function(a){return T.getListenerf(a)},getListenerfv:function(a,b){b==null&&(b=1);return T.getListenerfv(a,b)},getListeneri:function(a){return T.getListeneri(a)},getListeneriv:function(a,b){b==null&&(b=1);return T.getListeneriv(a,b)},
getProcAddress:function(a){return T.getProcAddress(a)},getSource3f:function(a,b){return T.getSource3f(a,b)},getSourcef:function(a,b){return T.getSourcef(a,b)},getSource3i:function(a,b){return T.getSource3i(a,b)},getSourcefv:function(a,b,c){return T.getSourcefv(a,b)},getSourcei:function(a,b){return T.getSourcei(a,b)},getSourceiv:function(a,b,c){c==null&&(c=1);return T.getSourceiv(a,b,c)},getString:function(a,b){return b==null?T.getString(a):Oc.getString(b,a)},isBuffer:function(a){return T.isBuffer(a)},
isEnabled:function(a){return T.isEnabled(a)},isExtensionPresent:function(a){return T.isExtensionPresent(a)},isSource:function(a){return T.isSource(a)},listener3f:function(a,b,c,d){T.listener3f(a,b,c,d)},listener3i:function(a,b,c,d){T.listener3i(a,b,c,d)},listenerf:function(a,b){T.listenerf(a,b)},listenerfv:function(a,b){T.listenerfv(a,b)},listeneri:function(a,b){T.listeneri(a,b)},listeneriv:function(a,b){T.listeneriv(a,b)},makeContextCurrent:function(a){return Oc.makeContextCurrent(a)},openDevice:function(a){return Oc.openDevice(a)},
pauseDevice:function(a){Oc.pauseDevice(a)},processContext:function(a){Oc.processContext(a)},resumeDevice:function(a){Oc.resumeDevice(a)},source3f:function(a,b,c,d,f){T.source3f(a,b,c,d,f)},source3i:function(a,b,c,d,f){T.source3i(a,b,c,d,f)},sourcef:function(a,b,c){T.sourcef(a,b,c)},sourcefv:function(a,b,c){T.sourcefv(a,b,c)},sourcei:function(a,b,c){T.sourcei(a,b,c)},sourceiv:function(a,b,c){T.sourceiv(a,b,c)},sourcePlay:function(a){T.sourcePlay(a)},sourcePlayv:function(a){T.sourcePlayv(a)},sourceStop:function(a){T.sourceStop(a)},
sourceStopv:function(a){T.sourceStopv(a)},sourceRewind:function(a){T.sourceRewind(a)},sourceRewindv:function(a){T.sourceRewindv(a)},sourcePause:function(a){T.sourcePause(a)},sourcePausev:function(a){T.sourcePausev(a)},sourceQueueBuffer:function(a,b){T.sourceQueueBuffer(a,b)},sourceQueueBuffers:function(a,b,c){T.sourceQueueBuffers(a,b,c)},sourceUnqueueBuffer:function(a){return T.sourceUnqueueBuffer(a)},sourceUnqueueBuffers:function(a,b){return T.sourceUnqueueBuffers(a,b)},speedOfSound:function(a){T.speedOfSound(a)},
suspendContext:function(a){Oc.suspendContext(a)},__class__:az};var T=function(){};t["lime.media.openal.AL"]=T;T.__name__="lime.media.openal.AL";T.removeDirectFilter=function(a){};T.removeSend=function(a,b){};T.auxf=function(a,b,c){};T.auxfv=function(a,b,c){};T.auxi=function(a,b,c){};T.auxiv=function(a,b,c){};T.bufferData=function(a,b,c,d,f){};T.buffer3f=function(a,b,c,d,f){};T.buffer3i=function(a,b,c,d,f){};T.bufferf=function(a,b,c){};T.bufferfv=function(a,b,c){};T.bufferi=function(a,b,c){};T.bufferiv=
function(a,b,c){};T.createAux=function(){return null};T.createBuffer=function(){return null};T.createEffect=function(){return null};T.createFilter=function(){return null};T.createSource=function(){return null};T.deleteBuffer=function(a){};T.deleteBuffers=function(a){};T.deleteSource=function(a){};T.deleteSources=function(a){};T.disable=function(a){};T.distanceModel=function(a){};T.dopplerFactor=function(a){};T.dopplerVelocity=function(a){};T.effectf=function(a,b,c){};T.effectfv=function(a,b,c){};
T.effecti=function(a,b,c){};T.effectiv=function(a,b,c){};T.enable=function(a){};T.genSource=function(){return null};T.genSources=function(a){return null};T.genBuffer=function(){return null};T.genBuffers=function(a){return null};T.getBoolean=function(a){return!1};T.getBooleanv=function(a,b){return null};T.getBuffer3f=function(a,b){return null};T.getBuffer3i=function(a,b){return null};T.getBufferf=function(a,b){return 0};T.getBufferfv=function(a,b,c){return null};T.getBufferi=function(a,b){return 0};
T.getBufferiv=function(a,b,c){return null};T.getDouble=function(a){return 0};T.getDoublev=function(a,b){return null};T.getEnumValue=function(a){return 0};T.getError=function(){return 0};T.getErrorString=function(){switch(T.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""}};T.getFilteri=function(a,b){return 0};T.getFloat=function(a){return 0};T.getFloatv=function(a,b){return null};T.getInteger=function(a){return 0};T.getIntegerv=function(a,b){return null};T.getListener3f=function(a){return null};T.getListener3i=function(a){return null};T.getListenerf=function(a){return 0};T.getListenerfv=function(a,b){return null};T.getListeneri=function(a){return 0};T.getListeneriv=function(a,b){return null};T.getParameter=function(a){return null};T.getProcAddress=
function(a){return null};T.getSource3f=function(a,b){return null};T.getSourcef=function(a,b){return 0};T.getSource3i=function(a,b){return null};T.getSourcefv=function(a,b,c){return null};T.getSourcei=function(a,b){return 0};T.getSourceiv=function(a,b,c){return null};T.getString=function(a){return null};T.isBuffer=function(a){return!1};T.isEnabled=function(a){return!1};T.isExtensionPresent=function(a){return!1};T.isAux=function(a){return!1};T.isEffect=function(a){return!1};T.isFilter=function(a){return!1};
T.isSource=function(a){return!1};T.listener3f=function(a,b,c,d){};T.listener3i=function(a,b,c,d){};T.listenerf=function(a,b){};T.listenerfv=function(a,b){};T.listeneri=function(a,b){};T.listeneriv=function(a,b){};T.source3f=function(a,b,c,d,f){};T.source3i=function(a,b,c,d,f){};T.sourcef=function(a,b,c){};T.sourcefv=function(a,b,c){};T.sourcei=function(a,b,c){};T.filteri=function(a,b,c){};T.filterf=function(a,b,c){};T.sourceiv=function(a,b,c){};T.sourcePlay=function(a){};T.sourcePlayv=function(a){};
T.sourceStop=function(a){};T.sourceStopv=function(a){};T.sourceRewind=function(a){};T.sourceRewindv=function(a){};T.sourcePause=function(a){};T.sourcePausev=function(a){};T.sourceQueueBuffer=function(a,b){};T.sourceQueueBuffers=function(a,b,c){};T.sourceUnqueueBuffer=function(a){return 0};T.sourceUnqueueBuffers=function(a,b){return null};T.speedOfSound=function(a){};var Oc=function(){};t["lime.media.openal.ALC"]=Oc;Oc.__name__="lime.media.openal.ALC";Oc.closeDevice=function(a){return!1};Oc.createContext=
function(a,b){return null};Oc.destroyContext=function(a){};Oc.getContextsDevice=function(a){return null};Oc.getCurrentContext=function(){return null};Oc.getError=function(a){return 0};Oc.getErrorString=function(a){switch(Oc.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""}};Oc.getIntegerv=function(a,b,c){return null};Oc.getString=function(a,b){return null};Oc.makeContextCurrent=function(a){return!1};Oc.openDevice=function(a){return null};Oc.pauseDevice=function(a){};Oc.processContext=function(a){};Oc.resumeDevice=function(a){};Oc.suspendContext=function(a){};var bz=function(){};t["lime.media.vorbis.VorbisComment"]=bz;bz.__name__="lime.media.vorbis.VorbisComment";bz.prototype={userComments:null,vendor:null,__class__:bz};var nu=function(a){this.handle=
a};t["lime.media.vorbis.VorbisFile"]=nu;nu.__name__="lime.media.vorbis.VorbisFile";nu.fromBytes=function(a){return null};nu.fromFile=function(a){return null};nu.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 Jb(0,0)},pcmTotal:function(a){return new Jb(0,0)},rawSeek:function(a){return 0},rawSeekLap:function(a){return 0},rawTell:function(){return new Jb(0,0)},rawTotal:function(a){return new Jb(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__:nu};var cz=function(){};t["lime.media.vorbis.VorbisInfo"]=cz;cz.__name__="lime.media.vorbis.VorbisInfo";cz.prototype={bitrateLower:null,bitrateNominal:null,bitrateUpper:null,channels:null,rate:null,version:null,__class__:cz};var ou=function(){};t["lime.net._IHTTPRequest"]=ou;ou.__name__="lime.net._IHTTPRequest";ou.__isInterface__=!0;ou.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__:ou};var ii=function(a){this.uri=a;this.contentType="application/x-www-form-urlencoded";this.followRedirects=!0;this.enableResponseHeaders=!1;this.formData=new H;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"]=
ii;ii.__name__="lime.net._HTTPRequest.AbstractHTTPRequest";ii.__interfaces__=[ou];ii.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__:ii};var cy=function(a){ii.call(this,a)};t["lime.net.HTTPRequest"]=
cy;cy.__name__="lime.net.HTTPRequest";cy.__super__=ii;cy.prototype=I(ii.prototype,{__class__:cy});var uk=function(a){ii.call(this,a)};t["lime.net._HTTPRequest_Bytes"]=uk;uk.__name__="lime.net._HTTPRequest_Bytes";uk.__super__=ii;uk.prototype=I(ii.prototype,{fromBytes:function(a){return a},load:function(a){var b=this;a!=null&&(this.uri=a);var c=new Qf;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__:uk});var mo=function(a){ii.call(this,a)};t["lime.net._HTTPRequest_String"]=mo;mo.__name__="lime.net._HTTPRequest_String";mo.__super__=ii;mo.prototype=I(ii.prototype,{load:function(a){var b=this;a!=null&&(this.uri=a);var c=new Qf;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__:mo});var ho=function(a,b){this.error=a;this.responseData=b};t["lime.net._HTTPRequestErrorResponse"]=ho;ho.__name__="lime.net._HTTPRequestErrorResponse";ho.prototype={error:null,responseData:null,__class__:ho};var cu=function(a,b){b==null&&(b="");this.name=a;this.value=b};t["lime.net.HTTPRequestHeader"]=cu;cu.__name__="lime.net.HTTPRequestHeader";cu.prototype={name:null,value:null,__class__:cu};var pu=function(a){ii.call(this,a)};t["lime.net._HTTPRequest_lime_text_Font"]=
pu;pu.__name__="lime.net._HTTPRequest_lime_text_Font";pu.__super__=uk;pu.prototype=I(uk.prototype,{fromBytes:function(a){return yf.fromBytes(a)},__class__:pu});var qu=function(a){ii.call(this,a)};t["lime.net._HTTPRequest_lime_utils_Bytes"]=qu;qu.__name__="lime.net._HTTPRequest_lime_utils_Bytes";qu.__super__=uk;qu.prototype=I(uk.prototype,{fromBytes:function(a){return vg.fromBytes(a)},__class__:qu});var ru=function(a){ii.call(this,a)};t["lime.net._HTTPRequest_openfl_utils_ByteArray"]=ru;ru.__name__=
"lime.net._HTTPRequest_openfl_utils_ByteArray";ru.__super__=uk;ru.prototype=I(uk.prototype,{fromBytes:function(a){return lc.fromBytes(a)},__class__:ru});var vk=function(){};t["lime.system.CFFI"]=vk;vk.__name__="lime.system.CFFI";vk.load=function(a,b,c,d){d==null&&(d=!1);c==null&&(c=0);return vk.enabled?null:u.makeVarArgs(function(f){return{}})};vk.stringValue=function(a){return a};vk.__findNDLLFolder=function(){return""};vk.__loaderTrace=function(a){};vk.__sysName=function(){return null};vk.__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)}},Oe=function(){};t["lime.system.Clipboard"]=Oe;Oe.__name__="lime.system.Clipboard";Oe.__properties__={set_text:"set_text",get_text:"get_text"};Oe.__update=function(){var a=Oe._text;Oe._text=null;Oe._text=a;Oe.__updated=!0;Oe._text!=a&&Oe.onUpdate.dispatch()};Oe.get_text=
function(){Oe.__update();return Oe._text};Oe.set_text=function(a){var b=Oe._text;Oe._text=a;var c=Ma.current.__window;c!=null&&c.__backend.setClipboard(a);Oe._text!=b&&Oe.onUpdate.dispatch();return a};var dy=function(){};t["lime.system.Display"]=dy;dy.__name__="lime.system.Display";dy.prototype={bounds:null,currentMode:null,id:null,dpi:null,orientation:null,name:null,supportedModes:null,safeArea:null,__class__:dy};var ey=function(a,b,c,d){this.width=a;this.height=b;this.refreshRate=c;this.pixelFormat=
d};t["lime.system.DisplayMode"]=ey;ey.__name__="lime.system.DisplayMode";ey.prototype={height:null,pixelFormat:null,refreshRate:null,width:null,__class__:ey};var tk=Q["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}};tk.__constructs__=[tk.LITTLE_ENDIAN,tk.BIG_ENDIAN];var wg=function(){};t["lime.system.JNI"]=
wg;wg.__name__="lime.system.JNI";wg.transformClassName=function(a){var b=a.split(".");if(b.length<=1)return a;a="";(new Xa("^[A-Z]","")).match(b[b.length-2])&&(a="$"+b.pop());return b.join("/")+a};wg.callMember=function(a,b,c){return a.apply(null,[b].concat(c))};wg.callStatic=function(a,b){return a.apply(null,b)};wg.createMemberField=function(a,b,c){wg.init();return new fy(null)};wg.createMemberMethod=function(a,b,c,d,f){wg.init();return null};wg.createStaticField=function(a,b,c){wg.init();return new gy(null)};
wg.createStaticMethod=function(a,b,c,d,f){wg.init();return null};wg.getEnv=function(){wg.init();return null};wg.init=function(){wg.initialized||(wg.initialized=!0)};wg.onCallback=function(a,b,c){var d=u.field(a,b);if(d!=null)return c==null&&(c=[]),d.apply(a,c);ye.trace("onCallback - unknown field "+b,{fileName:"lime/system/JNI.hx",lineNumber:223,className:"lime.system.JNI",methodName:"onCallback"});return null};wg.postUICallback=function(a){a()};var fy=function(a){this.field=a};t["lime.system.JNIMemberField"]=
fy;fy.__name__="lime.system.JNIMemberField";fy.prototype={field:null,get:function(a){return null},set:function(a,b){return b},__class__:fy};var gy=function(a){this.field=a};t["lime.system.JNIStaticField"]=gy;gy.__name__="lime.system.JNIStaticField";gy.prototype={field:null,get:function(){return null},set:function(a){return a},__class__:gy};var dz=function(a){this.method=a};t["lime.system.JNIMethod"]=dz;dz.__name__="lime.system.JNIMethod";dz.prototype={method:null,callMember:function(a){return null},
callStatic:function(a){return null},getMemberMethod:function(a){return a?m(this,this.callMember):u.makeVarArgs(m(this,this.callMember))},getStaticMethod:function(a){return a?m(this,this.callStatic):u.makeVarArgs(m(this,this.callStatic))},__class__:dz};var Pz=function(){};t["lime.system.JNISafety"]=Pz;Pz.__name__="lime.system.JNISafety";Pz.__isInterface__=!0;var Qz=function(){};t["lime.system.JNISafetyTools"]=Qz;Qz.__name__="lime.system.JNISafetyTools";Qz.onMainThread=function(){return!0};var Mh={__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=Mh.get_language(a);a=Mh.get_region(a);var d=Mh.get_language(b);b=Mh.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(Mh.__systemLocale==null){var a=navigator.language;Mh.__systemLocale=
a!=null?a:"en-US";Mh.set_currentLocale(Mh.__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(){Mh.__init();
return Mh.currentLocale},set_currentLocale:function(a){Mh.__init();return Mh.currentLocale=a},get_systemLocale:function(){Mh.__init();return Mh.__systemLocale}},hj=function(a,b){this.onUpdate=new Ox;this.type=a;this.id=b};t["lime.system.Sensor"]=hj;hj.__name__="lime.system.Sensor";hj.getSensors=function(a){if(a==null)return hj.sensors.slice();for(var b=[],c=0,d=hj.sensors;c<d.length;){var f=d[c];++c;f.type==a&&b.push(f)}return b};hj.registerSensor=function(a,b){a=new hj(a,b);hj.sensors.push(a);return hj.sensorByID.h[b]=
a};hj.prototype={id:null,onUpdate:null,type:null,__class__:hj};var Nz=Q["lime.system.SensorType"]={__ename__:"lime.system.SensorType",__constructs__:null,ACCELEROMETER:{_hx_name:"ACCELEROMETER",_hx_index:0,__enum__:"lime.system.SensorType",toString:E}};Nz.__constructs__=[Nz.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: "+F.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(F.string(f.background),
"#",""),b.indexOf("0x")>-1?f.background=F.parseInt(b):f.background=F.parseInt("0x"+b)),f.element=g,f.width=c,f.height=d,Rb.__applicationEntryPoint.h[a](f))}};Rb.exit=function(a){var b=Ma.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 dy;a.id=0;a.name="Generic Display";a.dpi=96*window.devicePixelRatio;a.currentMode=new ey(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 nf(0,0,a.currentMode.width,a.currentMode.height);a.safeArea=new nf(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 vk.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=u.fields(b);c<d.length;){var f=d[c];++c;Object.prototype.hasOwnProperty.call(a,f)||(a[f]=u.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 H);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?tk.BIG_ENDIAN:
tk.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 ak=function(a){this.__activeJob=new iq;this.__jobComplete=new iq;this.__jobOutput=new jb;this.workIterations=new iq;this.workIterations.value=0;this.__jobComplete.value=!1;this.mode=a!=null&&a};t["lime.system.WorkOutput"]=ak;ak.__name__="lime.system.WorkOutput";ak.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__:ak,__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 su;this.__singleThreadedJobRunning=!1;this.__threads=[];this.__queuedExitEvents=0;this.__multiThreadedJobs=new su;this.workPriority=1;this.onUncaughtError=new Vx;this.onRun=new Wx;this.onProgress=new io;this.onError=new io;this.onComplete=new io;this.activeThreads=this.__idleThreads=0;if($b.__current.__worker!=null||$b.__isWorker)throw Z.thrown("Call new ThreadPool() only from the main thread.");ak.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 ak(!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 no(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;Lx.toFunction(c.doWork)(c.state,b)}}catch(n){c=Z.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__=ak;af.prototype=I(ak.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 Z.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 Z.thrown("Call run() only from the main thread.");c==null&&(c=this.mode);if(a==null){if(this.__doWork==null||c==1)throw Z.thrown("run() requires doWork argument.");a=this.__doWork}b==null&&(b={});a=new no(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);Ma.current==null||Ma.current.onUpdate.has(m(this,this.__update))||Ma.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 Z?this.onUncaughtError.__listeners.length>0?(this.onUncaughtError.dispatch(a.message),a=null):a=a.message.details():a=F.string(a.message);a!=null&&(this.__activeJob.value=null,Xb.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})):ak.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})):ak.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}):ak.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;Ma.current.__window!=null&&(b=Ma.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,Lx.toFunction(this.__activeJob.value.doWork)(this.__activeJob.value.state,this);while(!this.__jobComplete.value&&(new Date).getTime()/1E3<a)}catch(d){b=Z.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&&Ma.current.onUpdate.remove(m(this,this.__update))}},__onThreadIdle:function(a){if($b.__current.__worker!=
null||$b.__isWorker)throw Z.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 Z.thrown("Job "+a.id+" was already started!");Lx.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=ak.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(ak.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 su=function(){this.startIndex=0;this.jobs=[]};t["lime.system._ThreadPool.JobArray"]=su;su.__name__="lime.system._ThreadPool.JobArray";su.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 hy(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__:su,__properties__:{get_length:"get_length"}};var hy=function(a,b){this.jobs=a;this.index=b};t["lime.system._ThreadPool.JobArrayIterator"]=hy;hy.__name__="lime.system._ThreadPool.JobArrayIterator";hy.prototype={index:null,jobs:null,hasNext:function(){return this.index<this.jobs.length},next:function(){return this.jobs[this.index++]},__class__:hy};var no=
function(a,b,c){this.startTime=-1;this.duration=0;this.id=c!=null?c:no.nextID++;this.doWork=a;this.state=b};t["lime.system.JobData"]=no;no.__name__="lime.system.JobData";no.prototype={id:null,doWork:null,state:null,duration:null,startTime:null,get_started:function(){return this.startTime>=0},__class__:no,__properties__:{get_started:"get_started"}};var cA=function(){};t["lime.system.JSAsync"]=cA;cA.__name__="lime.system.JSAsync";var iq=function(){};t["lime.system.Tls"]=iq;iq.__name__="lime.system.Tls";
iq.prototype={value:null,__class__:iq};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?rb.isLocal(this.__fontID)&&this.__fromBytes(rb.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 Fc.withValue(yf.fromBytes(a))};yf.loadFromFile=function(a){return(new pu).load(a).then(function(b){return b!=null?Fc.withValue(b):Fc.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 Qf;this.name=a;var d=wa.navigator.userAgent.toLowerCase(),
f=d.indexOf(" safari/")>=0&&d.indexOf(" chrome/")<0;d=(new Xa("(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){Xb.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,v=0,w,z;q=window.setInterval(function(){v+=1;w=g.offsetWidth!=n||h.offsetWidth!=l;z=v*50>=3E3;if(w||z)window.clearInterval(q),g.parentNode.removeChild(g),h.parentNode.removeChild(h),h=g=null,z&&Xb.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 ez=function(){};t["lime.text.GlyphMetrics"]=
ez;ez.__name__="lime.text.GlyphMetrics";ez.prototype={advance:null,height:null,horizontalBearing:null,verticalBearing:null,__class__:ez};var Rz=function(){};t["lime.text.harfbuzz.HB"]=Rz;Rz.__name__="lime.text.harfbuzz.HB";Rz.shape=function(a,b,c){};var pA={__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}},fz=function(){};t["lime.text.harfbuzz.HBFeature"]=fz;fz.__name__="lime.text.harfbuzz.HBFeature";fz.prototype={__class__:fz};var gz=function(){};t["lime.text.harfbuzz.HBGlyphInfo"]=gz;gz.__name__="lime.text.harfbuzz.HBGlyphInfo";gz.prototype={codepoint:null,mask:null,cluster:null,__class__:gz};var hz=function(){};t["lime.text.harfbuzz.HBGlyphPosition"]=hz;hz.__name__="lime.text.harfbuzz.HBGlyphPosition";
hz.prototype={xAdvance:null,xOffset:null,yAdvance:null,yOffset:null,__class__:hz};var dA={_new:function(a){return null},toString:function(a){return null},fromString:function(a){return dA._new(a)}},iz=function(){};t["lime.text.harfbuzz.HBSegmentProperties"]=iz;iz.__name__="lime.text.harfbuzz.HBSegmentProperties";iz.prototype={__class__:iz};var jq=function(){this.onSelectMultiple=new Nx;this.onSelect=new ko;this.onSave=new ko;this.onOpen=new $x;this.onCancel=new kf};t["lime.ui.FileDialog"]=jq;jq.__name__=
"lime.ui.FileDialog";jq.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="";Nc.__isPNG(a)?(f="image/png",b=".png"):Nc.__isJPG(a)?(f="image/jpeg",b=".jpg"):Nc.__isGIF(a)?(f="image/gif",b=".gif"):Nc.__isWebP(a)&&(f="image/webp",b=".webp");
c=c!=null?Fg.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__:jq};var tu=Q["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}};tu.__constructs__=[tu.OPEN,tu.OPEN_MULTIPLE,tu.SAVE,tu.OPEN_DIRECTORY];var rf=function(a){this.onDisconnect=new kf;this.onButtonUp=new ku;this.onButtonDown=new ku;this.onAxisMove=new Xx;this.id=a;this.connected=!0;this.__jsGamepad=Se.__getDeviceData()[this.id]};t["lime.ui.Gamepad"]=rf;rf.__name__="lime.ui.Gamepad";rf.addMappings=function(a){};rf.__connect=function(a){if(!rf.devices.h.hasOwnProperty(a)){var b=
new rf(a);rf.devices.h[a]=b;rf.onConnect.dispatch(b)}};rf.__disconnect=function(a){var b=rf.devices.h[a];b!=null&&(b.connected=!1);rf.devices.remove(a);b!=null&&b.onDisconnect.dispatch()};rf.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__:rf,__properties__:{get_name:"get_name",get_guid:"get_guid"}};var Se=function(a){this.onHatMove=new Tx;this.onDisconnect=new kf;this.onButtonUp=new qm;this.onButtonDown=new qm;this.onAxisMove=new Sx;this.id=a;this.connected=!0};t["lime.ui.Joystick"]=Se;Se.__name__="lime.ui.Joystick";Se.__connect=
function(a){if(!Se.devices.h.hasOwnProperty(a)){var b=new Se(a);Se.devices.h[a]=b;Se.onConnect.dispatch(b)}};Se.__disconnect=function(a){var b=Se.devices.h[a];b!=null&&(b.connected=!1);Se.devices.remove(a);b!=null&&b.onDisconnect.dispatch()};Se.__getDeviceData=function(){var a=null;try{a=navigator.getGamepads?navigator.getGamepads():navigator.webkitGetGamepads?navigator.webkitGetGamepads():null}catch(b){Pb.lastError=b}return a};Se.prototype={connected:null,id:null,onAxisMove:null,onButtonDown:null,
onButtonUp:null,onDisconnect:null,onHatMove:null,get_guid:function(){return Se.__getDeviceData()[this.id].id},get_name:function(){return Se.__getDeviceData()[this.id].id},get_numAxes:function(){return Se.__getDeviceData()[this.id].axes.length},get_numButtons:function(){return Se.__getDeviceData()[this.id].buttons.length},get_numHats:function(){return 0},__class__:Se,__properties__:{get_numHats:"get_numHats",get_numButtons:"get_numButtons",get_numAxes:"get_numAxes",get_name:"get_name",get_guid:"get_guid"}};
var xc={__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}},fd=Q["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}};fd.__constructs__=[fd.ARROW,fd.CROSSHAIR,fd.DEFAULT,fd.MOVE,fd.POINTER,fd.RESIZE_NESW,fd.RESIZE_NS,fd.RESIZE_NWSE,fd.RESIZE_WE,fd.TEXT,fd.WAIT,fd.WAIT_ARROW,fd.CUSTOM];var am=Q["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}};am.__constructs__=[am.PIXELS,am.LINES,am.PAGES,am.UNKNOWN];var Te=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"]=Te;Te.__name__="lime.ui.Touch";Te.prototype={device:null,dx:null,dy:null,id:null,pressure:null,x:null,y:null,__class__:Te};var rm=function(a,b){this.__maxWidth=this.__maxHeight=2147483647;this.clickCount=this.__minWidth=
this.__minHeight=0;this.onTextInput=new ko;this.onTextEdit=new Ux;this.onShow=new kf;this.onRestore=new kf;this.onResize=new iu;this.onRenderContextRestored=new ju;this.onRenderContextLost=new kf;this.onRender=new ju;this.onMove=new gq;this.onMouseWheel=new Rx;this.onMouseUp=new Px;this.onMouseMoveRelative=new gq;this.onMouseMove=new gq;this.onMouseDown=new Qx;this.onMinimize=new kf;this.onMaximize=new kf;this.onLeave=new kf;this.onKeyUp=new lu;this.onKeyDown=new lu;this.onHide=new kf;this.onFullscreen=
new kf;this.onFocusOut=new kf;this.onFocusIn=new kf;this.onExpose=new kf;this.onEnter=new kf;this.onDropFile=new ko;this.onDeactivate=new kf;this.onClose=new kf;this.onActivate=new kf;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 uc(this)};t["lime.ui.Window"]=rm;rm.__name__="lime.ui.Window";rm.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__:rm,__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 eA=Q["lime.utils.TAError"]={__ename__:"lime.utils.TAError",
__constructs__:null,RangeError:{_hx_name:"RangeError",_hx_index:0,__enum__:"lime.utils.TAError",toString:E}};eA.__constructs__=[eA.RangeError];var Aj=function(){this.data=new H;this.paths=[]};t["lime.utils.AssetBundle"]=Aj;Aj.__name__="lime.utils.AssetBundle";Aj.fromBytes=function(a){a=new fo(a);return Aj.__extractBundle(a)};Aj.fromFile=function(a){return null};Aj.loadFromBytes=function(a){return Fc.withValue(Aj.fromBytes(a))};Aj.loadFromFile=function(a){return vg.loadFromFile(a).then(Aj.loadFromBytes)};
Aj.__extractBundle=function(a){var b=dq.readZip(a);a=new Aj;for(b=b.h;b!=null;){var c=b.item;b=b.next;if(c.compressed){var d=a.data,f=c.fileName,g=vg.decompress(c.data,wk.DEFLATE);d.h[f]=g}else a.data.h[c.fileName]=c.data;a.paths.push(c.fileName)}return a};Aj.prototype={data:null,paths:null,__class__:Aj};var iy=function(){this.enabled=!0;this.audio=new H;this.font=new H;this.image=new H;this.version=569218};t["lime.utils.AssetCache"]=iy;iy.__name__="lime.utils.AssetCache";iy.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 Nc))throw Z.thrown("Cannot cache non-Image asset: "+F.string(c)+" as Image");this.image.h[a]=
c;break;case "MUSIC":case "SOUND":if(!(c instanceof re))throw Z.thrown("Cannot cache non-AudioBuffer asset: "+F.string(c)+" as AudioBuffer");this.audio.h[a]=c;break;default:throw Z.thrown(b+" assets are not cachable");}},clear:function(a){if(a==null)this.audio=new H,this.font=new H,this.image=new H;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__:iy};var ld=function(){this.types=new H;this.sizes=new H;this.preload=new H;this.paths=new H;this.pathGroups=new H;this.classTypes=new H;this.cachedText=new H;this.cachedImages=new H;this.cachedFonts=new H;this.cachedBytes=
new H;this.cachedAudioBuffers=new H;this.onChange=new kf;this.bytesTotal=this.bytesLoaded=0};t["lime.utils.AssetLibrary"]=ld;ld.__name__="lime.utils.AssetLibrary";ld.fromBytes=function(a,b){return ld.fromManifest(Fe.fromBytes(a,b))};ld.fromFile=function(a,b){return ld.fromManifest(Fe.fromFile(a,b))};ld.fromBundle=function(a){if(Object.prototype.hasOwnProperty.call(a.data.h,"library.json")){var b=Fe.fromBytes(a.data.h["library.json"]);if(b!=null){if(b.libraryType==null)var c=new ld;else if(c=t[b.libraryType],
c!=null)c=Eb.createInstance(c,b.libraryArgs);else return Xb.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 ld,c.__fromBundle(a),c;return null};ld.fromManifest=function(a){if(a==null)return null;if(a.libraryType==null)var b=new ld;else if(b=t[a.libraryType],b!=null)b=Eb.createInstance(b,a.libraryArgs);else return Xb.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};ld.loadFromBytes=function(a,b){return Fe.loadFromBytes(a,b).then(function(c){return ld.loadFromManifest(c)})};ld.loadFromFile=function(a,b){return Fe.loadFromFile(a,b).then(function(c){return ld.loadFromManifest(c)})};ld.loadFromManifest=function(a){a=ld.fromManifest(a);return a!=null?a.load():Fc.withError("Could not load asset manifest")};
ld.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?x.__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 Z.thrown("Not sure how to get template: "+a);case "TEXT":return this.getText(a);default:throw Z.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)?re.fromBytes(x.__cast(Eb.createInstance(this.classTypes.h[a],[]),Na)):re.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=vg.ofString(this.cachedText.h[a]);return this.cachedBytes.h[a]=b}return Object.prototype.hasOwnProperty.call(this.classTypes.h,a)?x.__cast(Eb.createInstance(this.classTypes.h[a],[]),Na):vg.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)?x.__cast(Eb.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)?x.__cast(Eb.createInstance(this.classTypes.h[a],[]),Nc):Nc.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=x.__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?x.__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 Z.thrown("Not sure how to load template: "+
a);case "TEXT":return this.loadText(a);default:throw Z.thrown("Unknown asset type: "+b);}},load:function(){if(this.loaded)return Fc.withValue(this);if(this.promise==null){this.promise=new Qf;this.bytesLoadedCache=new H;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]){Xb.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)?Fc.withValue(this.cachedAudioBuffers.h[a]):Object.prototype.hasOwnProperty.call(this.classTypes.h,a)?Fc.withValue(re.fromBytes(x.__cast(Eb.createInstance(this.classTypes.h[a],
[]),Na))):Object.prototype.hasOwnProperty.call(this.pathGroups.h,a)?re.loadFromFiles(this.pathGroups.h[a]):re.loadFromFile(this.paths.h[a])},loadBytes:function(a){return Object.prototype.hasOwnProperty.call(this.cachedBytes.h,a)?Fc.withValue(this.cachedBytes.h[a]):Object.prototype.hasOwnProperty.call(this.classTypes.h,a)?Fc.withValue(Eb.createInstance(this.classTypes.h[a],[])):vg.loadFromFile(this.getPath(a))},loadFont:function(a){return Object.prototype.hasOwnProperty.call(this.cachedFonts.h,a)?
Fc.withValue(this.cachedFonts.h[a]):Object.prototype.hasOwnProperty.call(this.classTypes.h,a)?(a=Eb.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)?Fc.withValue(this.cachedImages.h[a]):Object.prototype.hasOwnProperty.call(this.classTypes.h,a)?Fc.withValue(Eb.createInstance(this.classTypes.h[a],[])):Object.prototype.hasOwnProperty.call(this.cachedBytes.h,
a)?Nc.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 Fc.withValue(c)}):Nc.loadFromFile(this.getPath(a))},loadText:function(a){if(Object.prototype.hasOwnProperty.call(this.cachedText.h,a))return Fc.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 Fc.withValue(null);
b=b.getString(0,b.length);this.cachedText.h[a]=b;return Fc.withValue(b)}return(new mo).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&&Xb.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 rb.__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?F.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+F.string(u.field(g,"path"))));l.h[n]=
q}if(Object.prototype.hasOwnProperty.call(g,"pathGroup")){l=u.field(g,"pathGroup");q=0;for(var v=l.length;q<v;){var w=q++;l[w]=this.__cacheBreak(this.__resolvePath(c+l[w]))}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]=u.field(g,"preload"));Object.prototype.hasOwnProperty.call(g,"className")&&(h=u.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=U.substr(a,0,b)+N.replace(U.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!=""?Xb.warn('Could not load "'+
a+'": '+F.string(b),{fileName:"lime/utils/AssetLibrary.hx",lineNumber:883,className:"lime.utils.AssetLibrary",methodName:"loadAudioBuffer_onError"}):Xb.warn('Could not load "'+a+'"',{fileName:"lime/utils/AssetLibrary.hx",lineNumber:887,className:"lime.utils.AssetLibrary",methodName:"loadAudioBuffer_onError"});this.loadAudioBuffer_onComplete(a,new re)},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+'": '+F.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__:ld};var Fe=function(){this.assets=[];this.libraryArgs=[];this.version=2};t["lime.utils.AssetManifest"]=Fe;Fe.__name__="lime.utils.AssetManifest";Fe.fromBytes=function(a,b){return a!=null?Fe.parse(a.getString(0,a.length),b):null};Fe.fromFile=function(a,b){a=Fe.__resolvePath(a);b=Fe.__resolveRootPath(b,a);return a==null?null:Fe.fromBytes(vg.fromFile(a),
b)};Fe.loadFromBytes=function(a,b){return Fc.withValue(Fe.fromBytes(a,b))};Fe.loadFromFile=function(a,b){a=Fe.__resolvePath(a);b=Fe.__resolveRootPath(b,a);return a==null?null:vg.loadFromFile(a).then(function(c){return Fc.withValue(Fe.fromBytes(c,b))})};Fe.parse=function(a,b){if(a==null||a=="")return null;a=(new In(a)).doParse();var c=new Fe;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=Rg.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};Fe.__resolvePath=function(a){if(a==null)return null;var b=a.indexOf("?");var c=b>-1?U.substr(a,0,b):a;for(c=N.replace(c,"\\","/");N.endsWith(c,
"/");)c=U.substr(c,0,c.length-1);return N.endsWith(c,".bundle")?b>-1?c+"/library.json"+U.substr(a,b,null):c+"/library.json":a};Fe.__resolveRootPath=function(a,b){if(a!=null)return a;a=b.indexOf("?");a=a>-1?U.substr(b,0,a):b;for(a=N.replace(a,"\\","/");N.endsWith(a,"/");){if(a=="/")return a;a=U.substr(a,0,a.length-1)}return N.endsWith(a,".bundle")?a:Fg.directory(a)};Fe.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=Eg.run(this.assets);a.rootPath=this.rootPath;return Bg.print(a,null,null)},__class__:Fe};var rb=function(){};t["lime.utils.Assets"]=rb;rb.__name__="lime.utils.Assets";rb.exists=function(a,b){b==null&&(b="BINARY");var c=a.indexOf(":"),d=a.substring(0,c);a=a.substring(c+1);d=rb.getLibrary(d);return d!=null?d.exists(a,b):!1};rb.getAsset=function(a,b,c){if(c&&rb.cache.enabled)switch(b){case "FONT":var d=
rb.cache.font.h[a];if(d!=null)return d;break;case "IMAGE":d=rb.cache.image.h[a];if(rb.isValidImage(d))return d;break;case "MUSIC":case "SOUND":d=rb.cache.audio.h[a];if(rb.isValidAudio(d))return d;break;case "TEMPLATE":throw Z.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=rb.getLibrary(d);if(g!=null)if(g.exists(f,b)){if(g.isLocal(f,b))return d=g.getAsset(f,b),c&&rb.cache.enabled&&
rb.cache.set(a,b,d),d;Xb.error(b+' asset "'+a+'" exists, but only asynchronously',{fileName:"lime/utils/Assets.hx",lineNumber:133,className:"lime.utils.Assets",methodName:"getAsset"})}else Xb.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 Xb.error(rb.__libraryNotFound(d),{fileName:"lime/utils/Assets.hx",lineNumber:143,className:"lime.utils.Assets",methodName:"getAsset"});return null};
rb.getAudioBuffer=function(a,b){b==null&&(b=!0);return rb.getAsset(a,"SOUND",b)};rb.getBytes=function(a){return rb.getAsset(a,"BINARY",!1)};rb.getFont=function(a,b){b==null&&(b=!0);return rb.getAsset(a,"FONT",b)};rb.getImage=function(a,b){b==null&&(b=!0);return rb.getAsset(a,"IMAGE",b)};rb.getLibrary=function(a){if(a==null||a=="")a="default";return rb.libraries.h[a]};rb.getPath=function(a){var b=a.indexOf(":"),c=a.substring(0,b);b=a.substring(b+1);var d=rb.getLibrary(c);if(d!=null){if(d.exists(b,
null))return d.getPath(b);Xb.error('There is no asset with an ID of "'+a+'"',{fileName:"lime/utils/Assets.hx",lineNumber:240,className:"lime.utils.Assets",methodName:"getPath"})}else Xb.error(rb.__libraryNotFound(c),{fileName:"lime/utils/Assets.hx",lineNumber:245,className:"lime.utils.Assets",methodName:"getPath"});return null};rb.getText=function(a){return rb.getAsset(a,"TEXT",!1)};rb.hasLibrary=function(a){if(a==null||a=="")a="default";return Object.prototype.hasOwnProperty.call(rb.libraries.h,
a)};rb.isLocal=function(a,b,c){c==null&&(c=!0);if(c&&rb.cache.enabled&&rb.cache.exists(a,b))return!0;var d=a.indexOf(":");c=a.substring(0,d);a=a.substring(d+1);c=rb.getLibrary(c);return c!=null?c.isLocal(a,b):!1};rb.isValidAudio=function(a){return a!=null};rb.isValidImage=function(a){return a!=null?a.buffer!=null:!1};rb.list=function(a){for(var b=[],c=rb.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};rb.loadAsset=function(a,b,c){if(c&&
rb.cache.enabled)switch(b){case "FONT":var d=rb.cache.font.h[a];if(d!=null)return Fc.withValue(d);break;case "IMAGE":d=rb.cache.image.h[a];if(rb.isValidImage(d))return Fc.withValue(d);break;case "MUSIC":case "SOUND":d=rb.cache.audio.h[a];if(rb.isValidAudio(d))return Fc.withValue(d);break;case "TEMPLATE":throw Z.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=rb.getLibrary(d);if(g!=
null){if(g.exists(f,b)){d=g.loadAsset(f,b);if(c&&rb.cache.enabled)d.onComplete(function(h){rb.cache.set(a,b,h)});return d}return Fc.withError("There is no "+b+' asset with an ID of "'+a+'"')}return Fc.withError(rb.__libraryNotFound(d))};rb.loadAudioBuffer=function(a,b){b==null&&(b=!0);return rb.loadAsset(a,"SOUND",b)};rb.loadBytes=function(a){return rb.loadAsset(a,"BINARY",!1)};rb.loadFont=function(a,b){b==null&&(b=!0);return rb.loadAsset(a,"FONT",b)};rb.loadImage=function(a,b){b==null&&(b=!0);return rb.loadAsset(a,
"IMAGE",b)};rb.loadLibrary=function(a){var b=new Qf,c=rb.getLibrary(a);if(c!=null)return c.load();c=a;var d=null;if(Object.prototype.hasOwnProperty.call(rb.bundlePaths.h,a))Aj.loadFromFile(rb.bundlePaths.h[a]).onComplete(function(f){f==null?b.error('Cannot load bundle for library "'+a+'"'):(f=ld.fromBundle(f),f==null?b.error('Cannot open library "'+a+'"'):(rb.libraries.h[a]=f,f.onChange.add((B=rb.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(rb.libraryPaths.h,a)?(c=rb.libraryPaths.h[a],d=Fg.directory(c)):(N.endsWith(c,".bundle")?(d=c,c+="/library.json"):d=Fg.directory(c),c=rb.__cacheBreak(c)),Fe.loadFromFile(c,d).onComplete(function(f){f==null?b.error('Cannot parse asset manifest for library "'+a+'"'):(f=ld.fromManifest(f),f==null?b.error('Cannot open library "'+a+'"'):(rb.libraries.h[a]=f,f.onChange.add((B=rb.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};rb.loadText=function(a){return rb.loadAsset(a,"TEXT",!1)};rb.registerLibrary=function(a,b){if(a==null||a=="")a="default";if(Object.prototype.hasOwnProperty.call(rb.libraries.h,a)){if(rb.libraries.h[a]==b)return;rb.unloadLibrary(a)}b!=null&&b.onChange.add(rb.library_onChange);rb.libraries.h[a]=b};rb.unloadLibrary=function(a){rb.removeLibrary(a,!0)};rb.removeLibrary=function(a,b){b==null&&(b=!0);if(a==null||a=="")a="default";var c=rb.libraries.h[a];c!=null&&(rb.cache.clear(a+
":"),c.onChange.remove(rb.library_onChange),b&&c.unload());b=rb.libraries;Object.prototype.hasOwnProperty.call(b.h,a)&&delete b.h[a]};rb.__cacheBreak=function(a){rb.cache.version>0&&(a=a.indexOf("?")>-1?a+("&"+rb.cache.version):a+("?"+rb.cache.version));return a};rb.__libraryNotFound=function(a){if(a==null||a=="")a="default";return Ma.current==null||Ma.current.__preloader==null||Ma.current.__preloader.complete?'There is no asset library named "'+a+'"':'There is no asset library named "'+a+'", or it is not yet preloaded'};
rb.library_onChange=function(){rb.cache.clear();rb.onChange.dispatch()};var jz=function(a){var b=a.indexOf(":");this.libraryName=a.substring(0,b);this.symbolName=a.substring(b+1);this.library=rb.getLibrary(this.libraryName)};t["lime.utils._Assets.LibrarySymbol"]=jz;jz.__name__="lime.utils._Assets.LibrarySymbol";jz.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__:jz};var qA={_new:function(a,b){b==null&&(b=0);return new Bj(a,b)},set:function(a,b,c,d,f){d!=null&&(b=Na.ofData(d));b!=null||c==null?(a.bytes=b,a.offset=f!=null?f:0):(a.bytes=Na.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 Bj(Na.ofData(a.buffer),a.byteOffset)},fromArrayBuffer:function(a){return a==
null?null:new Bj(Na.ofData(a),0)},fromBytes:function(a){return new Bj(a,0)},fromBytesData:function(a){return a==null?new Bj(null,0):new Bj(Na.ofData(a),0)},fromFile:function(a){return new Bj(vg.fromFile(a),0)},fromLimeBytes:function(a){return new Bj(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}},Bj=function(a,b){this.bytes=a;this.offset=b};t["lime.utils.BytePointerData"]=Bj;Bj.__name__="lime.utils.BytePointerData";Bj.prototype={bytes:null,offset:null,__class__:Bj};var vg={_new:function(a,b){b=new Na(b);b.length=a;return b},alloc:function(a){return new Na(new ArrayBuffer(a))},compress:function(a,
b){switch(b._hx_index){case 0:return du.compress(a);case 1:return eu.compress(a);case 2:return gu.compress(a);case 3:return hu.compress(a)}},decompress:function(a,b){switch(b._hx_index){case 0:return du.decompress(a);case 1:return eu.decompress(a);case 2:return gu.decompress(a);case 3:return hu.decompress(a)}},fastGet:function(a,b){return a.bytes[b]},fromBytes:function(a){return a==null?null:vg._new(a.length,a.b.bufferValue)},fromFile:function(a){return null},loadFromBytes:function(a){return Fc.withValue(vg.fromBytes(a))},
loadFromFile:function(a){return(new qu).load(a)},ofData:function(a){a=Na.ofData(a);return vg._new(a.length,a.b.bufferValue)},ofString:function(a){a=Na.ofString(a);return vg._new(a.length,a.b.bufferValue)}},wk=Q["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}};wk.__constructs__=[wk.DEFLATE,wk.GZIP,wk.LZMA,wk.ZLIB];var Ji={_new:function(a){return a},fromFloat:function(a){return a},fromBytesPointer:function(a){return Ji.fromFloat(0)},fromArrayBufferView:function(a){return Ji.fromFloat(0)},fromArrayBuffer:function(a){return Ji.fromFloat(0)},fromBytes:function(a){return Ji.fromFloat(0)},fromBytesData:function(a){return Ji.fromFloat(0)},
fromLimeBytes:function(a){return Ji.fromBytes(a)},fromCFFIPointer:function(a){return Ji.fromFloat(0)},fromFile:function(a){return Ji.fromFloat(0)},__withOffset:function(a,b){return Ji.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 Ji.__withOffset(a,b)},plusPointer:function(a,b){return Ji.__withOffset(a,b|0)},minus:function(a,b){return Ji.__withOffset(a,-b)},minusPointer:function(a,b){return Ji.__withOffset(a,-(b|0))}},il={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 Na(new Uint8Array(a.buffer))},toString:function(a){return a!=null?"Float32Array [byteLength:"+a.byteLength+", length:"+a.length+"]":null}},Xb=function(){};t["lime.utils.Log"]=Xb;Xb.__name__="lime.utils.Log";Xb.debug=function(a,b){Xb.level>=4&&console.debug("["+b.className+"] "+F.string(a))};Xb.error=
function(a,b){if(Xb.level>=1){a="["+b.className+"] ERROR: "+F.string(a);if(Xb.throwErrors)throw Z.thrown(a);console.error(a)}};Xb.info=function(a,b){Xb.level>=3&&console.info("["+b.className+"] "+F.string(a))};Xb.print=function(a){console.log(a)};Xb.println=function(a){console.log(a)};Xb.verbose=function(a,b){Xb.level>=5&&(a="["+b.className+"] "+F.string(a),console.log(a))};Xb.warn=function(a,b){Xb.level>=2&&console.warn("["+b.className+"] WARNING: "+F.string(a))};var aw=function(){this.bytesTotalCache=
new H;this.bytesLoadedCache2=new H;this.bytesLoadedCache=new Ta;this.onProgress=new iu;this.onComplete=new kf;this.bytesTotal=this.bytesLoaded=0;this.libraries=[];this.libraryNames=[];this.onProgress.add(m(this,this.update))};t["lime.utils.Preloader"]=aw;aw.__name__="lime.utils.Preloader";aw.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,Xb.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){Xb.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?Xb.verbose("Loaded asset library: "+a+" ["+b+"/"+c+"]",{fileName:"lime/utils/Preloader.hx",lineNumber:197,className:"lime.utils.Preloader",methodName:"loadedAssetLibrary"}):Xb.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(){this.simulateProgress||this.onProgress.dispatch(this.bytesLoaded,this.bytesTotal);this.simulateProgress||this.loadedLibraries!=this.libraries.length+this.libraryNames.length||(this.preloadComplete||(this.preloadComplete=!0,Xb.verbose("Preload complete",{fileName:"lime/utils/Preloader.hx",lineNumber:306,className:"lime.utils.Preloader",methodName:"updateProgress"})),this.start())},__class__:aw};var ft=function(){Dc.call(this);this.set_selectable(!1);
this.set_backgroundSkin(null);this.set_disabledBackgroundSkin(null)};t["moonshine.editor.text._TextEditor.TextEditorListView"]=ft;ft.__name__="moonshine.editor.text._TextEditor.TextEditorListView";ft.__super__=Dc;ft.prototype=I(Dc.prototype,{get_tabEnabled:function(){return this._enabled?this.get_rawTabEnabled():!1},__class__:ft});var Ln=function(a,b){b==null&&(b=0);a==null&&(a=0);this.line=a;this.character=b};t["moonshine.editor.text.TextEditorPosition"]=Ln;Ln.__name__="moonshine.editor.text.TextEditorPosition";
Ln.prototype={line:null,character:null,__class__:Ln};var kq=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"]=kq;kq.__name__="moonshine.editor.text.TextEditorSearchResult";kq.prototype={selectedIndex:null,current:null,results:null,replaced:null,didWrap:null,search:null,backwards:null,allowWrap:null,__class__:kq};
var jy=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"]=jy;jy.__name__="moonshine.editor.text.SearchResultItem";jy.prototype={index:null,length:null,startLine:null,startChar:null,endLine:null,endChar:null,__class__:jy};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 Ld=function(a,b,c){na.call(this,a);this.changes=b;this.origin=c!=null?c:Ld.ORIGIN_LOCAL};t["moonshine.editor.text.events.TextEditorChangeEvent"]=Ld;Ld.__name__="moonshine.editor.text.events.TextEditorChangeEvent";Ld.__super__=na;Ld.prototype=I(na.prototype,{changes:null,origin:null,clone:function(){return new Ld(this.type,this.changes,this.origin)},__class__:Ld});var Ol=function(a){na.call(this,a)};t["moonshine.editor.text.events.TextEditorEvent"]=Ol;Ol.__name__=
"moonshine.editor.text.events.TextEditorEvent";Ol.__super__=na;Ol.prototype=I(na.prototype,{clone:function(){return new Ol(this.type)},__class__:Ol});var wf=function(a,b){na.call(this,a);this.lineIndex=b};t["moonshine.editor.text.events.TextEditorLineEvent"]=wf;wf.__name__="moonshine.editor.text.events.TextEditorLineEvent";wf.__super__=na;wf.prototype=I(na.prototype,{lineIndex:null,clone:function(){return new wf(this.type,this.lineIndex)},__class__:wf});var Nl=function(a,b){this.styleRanges=null;
this.caretIndex=-1;ma.call(this);this.text=a;this.lineIndex=b};t["moonshine.editor.text.lines.TextLineModel"]=Nl;Nl.__name__="moonshine.editor.text.lines.TextLineModel";Nl.__super__=ma;Nl.prototype=I(ma.prototype,{lineIndex:null,caretIndex:null,text:null,debuggerStoppedAtLine:null,styleRanges:null,__class__:Nl});var bi=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=[];kz.initialize();da.call(this);this._caretTimer=new lq(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"]=bi;bi.__name__="moonshine.editor.text.lines.TextLineRenderer";bi.__super__=da;bi.prototype=I(da.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(y.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(y.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(y.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(y.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(y.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(y.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(y.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(y.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(y.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(y.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(y.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(y.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(y.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(y.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(y.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(y.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(y.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(y.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(y.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(y.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(y.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(y.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 Ha(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 Ic,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 Ic,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(y.DATA);this.isInvalid(y.SCROLL);var b=this.isInvalid(y.SIZE),c=this.isInvalid(y.STATE),d=this.isInvalid(y.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=F.string(this.get_lineIndex()+1),b=Math.max(this._minLineNumberCharacters,F.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=tg.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&&(x.__implements(a,sb)&&x.__cast(a,sb).set_uiContext(null),this.removeChild(a)),this._currentBackgroundSkin!=null&&(this.addChildAt(this._currentBackgroundSkin,
0),x.__implements(this._currentBackgroundSkin,sb)&&x.__cast(this._currentBackgroundSkin,sb).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&&(x.__implements(this._currentBreakpointSkin,ba)&&x.__cast(this._currentBreakpointSkin,ba).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&&(x.__implements(a,sb)&&x.__cast(a,sb).set_uiContext(null),this.removeChild(a)),this._currentGutterBackgroundSkin!=null&&(this.addChildAt(this._currentGutterBackgroundSkin,this.getChildIndex(this._lineNumberTextField)),x.__implements(this._currentGutterBackgroundSkin,sb)&&
x.__cast(this._currentGutterBackgroundSkin,sb).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 ab(vb.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(vb.SolidColor(a))},refreshBreakpointSkin:function(){var a=this._currentBreakpointSkin;this._currentBreakpointSkin=this.getCurrentBreakpointSkin();a!=this._currentBreakpointSkin&&(a!=null&&(x.__implements(a,sb)&&x.__cast(a,sb).set_uiContext(null),this.removeChild(a)),this._currentBreakpointSkin!=null&&(this.addChild(this._currentBreakpointSkin),
x.__implements(this._currentBreakpointSkin,sb)&&x.__cast(this._currentBreakpointSkin,sb).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();
x.__implements(d,sb)&&x.__cast(d,sb).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),x.__implements(d,sb)&&x.__cast(d,sb).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();
x.__implements(c,sb)&&x.__cast(c,sb).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,v=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>v&&(g=v),h=this._selectionStartIndex<this._selectionEndIndex?this._selectionEndIndex:this._selectionStartIndex,h>v&&(h=v),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(),x.__implements(c,sb)&&x.__cast(c,sb).set_uiContext(null),this.removeChild(c);if(l!=0){var w=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,w),x.__implements(c,sb)&&x.__cast(c,sb).set_uiContext(this);else if(d.parent==null)c=d,this._selectedTextBackgroundSkins[r]=c,this.addChildAt(c,w),x.__implements(c,sb)&&x.__cast(c,sb).set_uiContext(this);else continue;l=v>0?q:0;this._wordWrap&&v>0&&(l=this._mainTextField.getLineLength(n+r));r=g;r<z&&(r=z);var G=z+l,J=h;J>G&&(J=G);var L=!1;J>=G&&(L=!0,J=l>0?G-1:0);G=this._mainTextField.getCharBoundaries(r);
G==null&&r>0&&(G=this._mainTextField.getCharBoundaries(r-1),G!=null&&(G.x+=G.width,G.width=0));var P=this._mainTextField.getCharBoundaries(J);P==null&&J>0&&(P=this._mainTextField.getCharBoundaries(J-1),P!=null&&(P.x+=P.width,P.width=0));G==null||P==null?c.set_visible(!1):(L=L?P.width:0,c.set_x(this._gutterWidth+G.x),c.set_y(this._mainTextField.get_y()+G.y),L=P.x+L-G.x,l==0&&r==J&&(L=this._mainTextField.get_width()),c.set_width(L),c.set_height(P.y+P.height-G.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),x.__implements(this._currentBreakpointSkin,ba)&&x.__cast(this._currentBreakpointSkin,
ba).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=zd.get_cursor();zd.set_cursor("ibeam")},textLineRenderer_mainTextField_rollOutHandler:function(a){zd.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=x.__cast(a.currentTarget,wi);this._oldScrollX!=a.get_scrollX()&&this.setInvalid(y.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(y.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(y.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(y.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(y.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(y.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(y.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(y.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(y.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(y.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(y.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(y.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(y.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(y.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(y.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(y.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(y.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(y.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(y.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(y.STYLES);return this.__highlightAllFindResults},clearStyle_highlightAllFindResults:function(){this.set_highlightAllFindResults(!1);return this.get_highlightAllFindResults()},get_styleContext:function(){return bi},__class__:bi,__properties__:I(da.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 mx=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"]=
mx;mx.__name__="moonshine.editor.text.managers.ClipboardManager";mx.prototype={_textEditor:null,copy:function(){this._textEditor.get_hasSelection()&&aj.get_generalClipboard().setData(2,this._textEditor.get_selectedText(),!1)},cut:function(){if(this._textEditor.get_readOnly())throw new pb("Cannot cut when editor is read-only");this.copy();if(this._textEditor.get_hasSelection()){var a=Tm.deleteSelection(this._textEditor);a!=null&&this._textEditor.dispatchEvent(new Ld(Ld.TEXT_CHANGE,[a]))}},paste:function(){if(this._textEditor.get_readOnly())throw new pb("Cannot paste when editor is read-only");
if(aj.get_generalClipboard().hasFormat(2)){var a=aj.get_generalClipboard().getData(2);a=Tm.deleteSelection(this._textEditor,a==null?null:F.string(a));a!=null&&this._textEditor.dispatchEvent(new Ld(Ld.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__:mx};var kp=function(a){this._listening=!1;this._ranges=[];this._textEditor=a;this._textEditor.addEventListener(Ld.TEXT_CHANGE,m(this,this.colorManager_textEditor_textChangeHandler),!1,0,!0)};t["moonshine.editor.text.managers.ColorManager"]=kp;kp.__name__="moonshine.editor.text.managers.ColorManager";kp.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 ky(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=La.getTimer()+kp.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(La.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 Xa("\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__:kp,__properties__:{set_parser:"set_parser",get_parser:"get_parser"}};var ky=function(a,
b){this.start=a;this.end=b};t["moonshine.editor.text.managers._ColorManager.LineRange"]=ky;ky.__name__="moonshine.editor.text.managers._ColorManager.LineRange";ky.prototype={start:null,end:null,__class__:ky};var kx=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(Ld.TEXT_CHANGE,m(this,this.editManager_textEditor_textChangePriorityHandler),!1,100,!0);this._textEditor.addEventListener(Ld.TEXT_CHANGE,m(this,this.editManager_textEditor_textChangeHandler),!1,0,!0);this._textEditor.addEventListener(Ol.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"]=kx;kx.__name__="moonshine.editor.text.managers.EditManager";kx.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 Xa("^\\s*"+a.replace(Xa.escapeRe,"\\$&"),""),n=c,l=d+1;n<l;){var q=n++,v=this._textEditor.get_lines().get(q).text;h.match(v)?b!=null&&(g=v.lastIndexOf(b),g==-1&&(f=!1)):f=!1}h=this._textEditor.get_selectionStartLineIndex();var w=this._textEditor.get_selectionStartCharIndex(),
z=this._textEditor.get_selectionEndLineIndex(),r=this._textEditor.get_selectionEndCharIndex();w==-1&&(h=this._textEditor.get_caretLineIndex(),w=this._textEditor.get_caretCharIndex(),z=h,r=w);var G=2147483647;n=c;for(l=d+1;n<l;){q=n++;v=this._textEditor.get_lines().get(q).text;var J=Md.getIndentCountAtStartOfLine(v,this._textEditor.get_tabWidth());G>J&&(G=J)}var L=new Xa("^\\s*",""),P=[];n=c;for(l=d+1;n<l;)if(q=n++,v=this._textEditor.get_lines().get(q).text,L.match(v))if(c=L.matched(0).length,f)J=
a.length,v.charAt(c+J)==" "&&++J,P.push(new Af(q,c,q,c+J)),b!=null&&P.push(new Af(q,g,q,g+b.length)),q==h&&(w-=J),q==z&&(r-=J);else{J=Md.getIndentCountAtStartOfLine(v,this._textEditor.get_tabWidth());if(J>G){d=c-1;for(var V=0;d>=0&&J>G;)v.charAt(d)=="\t"?(--J,--c):(++V,V==this._textEditor.get_tabWidth()&&(--J,c-=V,V=0),--d)}P.push(new Af(q,c,q,c,a+" "));b!=null&&P.push(new Af(q,v.length,q,v.length," "+b));v=a.length+1;q==h&&(w+=v);q==z&&(r+=v)}this.dispatchChanges(P);this._textEditor.setSelection(h,
w,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,v=l.lastIndexOf(g,c);if(v!=-1){var w=q.indexOf(a,f);w!=-1&&(h=v,n=w+a.length)}v=c;w=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)),v-=c,b==d&&(w-=c)):(v+=g.length+1,w+=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,v,d,w)}},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 Xa("^[ \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 v=Md.getIndentCountAtStartOfLine(q,this._textEditor.get_tabWidth(),!0);if(v>
0){l=this.getIndentString();var w="",z=0;for(--v;z<v;)z++,w+=l;b.push(new Af(n,0,n,q.length,w));n==c&&(f-=q.length,f<0&&(f=0),f+=w.length);n==d&&(g-=q.length,g<0&&(g=0),g+=w.length)}}else{w=Md.getIndentCountAtStartOfLine(q,this._textEditor.get_tabWidth());l=Math.ceil(w);l==w&&++l;w=this.getIndentString();z="";for(v=0;v<l;)v++,z+=w;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 Xa("^\\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?Md.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 v=b.charAt(h.length);if(q==v){if(h+=q,h==b)return!0}else h=""}if(c!=null)if(v=c.charAt(n.length),q==v){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=
Tm.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=U.substr(n,g-l,l)+h)}if(d.open==h&&(h=U.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 Tm.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?Md.wordBoundaryForward(this._textEditor.get_lines().get(c).text.substring(f)):
1:f-=b?Md.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=Md.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 Ld(Ld.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 Xa("[^\\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 Xa("\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 Nl(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 xe("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 Db("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!=Ld.ORIGIN_UNDO&&(Kf.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=Tm.deleteSelection(this._textEditor);a!=null&&this._textEditor.dispatchEvent(new Ld(Ld.TEXT_CHANGE,[a]))},__class__:kx};var nx=function(a){this._textEditor=a;this._textEditor.addEventListener(Ld.TEXT_CHANGE,m(this,this.findReplaceManager_textEditor_textChangeHandler))};t["moonshine.editor.text.managers.FindReplaceManager"]=nx;nx.__name__="moonshine.editor.text.managers.FindReplaceManager";nx.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 Xa?a:null;g==null&&a!=null&&(a=a==null?"null":F.string(a),a.length>0&&(g=new Xa(a.replace(Xa.escapeRe,"\\$&"),"i")));f=this.findInternal(f,g);this._findResult=new kq(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 kq(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 kq(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 Ld(Ld.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=Md.charIdx2LineCharIdx(a,f.pos,this._textEditor.get_lineDelimiter());
c.push(new jy(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=Md.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,v=g.length;q<v;)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__:nx};var Eh=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(Ld.TEXT_CHANGE,m(this,this.selectionManager_textEditor_textChangePriorityHandler),!1,100,
!0);this._textEditor.addEventListener(Ld.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"]=Eh;Eh.__name__="moonshine.editor.text.managers.SelectionManager";Eh.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 Xa("\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-Md.wordBoundaryBackward(this._textEditor.get_lines().get(d).text.substring(0,h)):(f=h+Md.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 lq(Eh.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=Md.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=Md.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=Md.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=Md.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!=Ld.ORIGIN_REMOTE&&
(this._savedCaretLineIndex=this._textEditor.get_caretLineIndex(),this._savedCaretCharIndex=this._textEditor.get_caretCharIndex())},selectionManager_textEditor_textChangeHandler:function(a){a.origin!=Ld.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 Ca(this._textEditor.get_mouseX(),this._textEditor.get_mouseY());if(this._textEditor.getViewPortVisibleBounds().containsPoint(b)){this._clickCount>0&&La.getTimer()-this._lastClickTime<300&&Ca.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-Md.wordBoundaryBackward(this._textEditor.get_lines().get(f).text.substring(0,c.character)),c=c.character+Md.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=La.getTimer()}}},selectionManager_stage_mouseMoveHandler:function(a){this._dragLocalPoint=
a=new Ca(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+Eh.SCROLL_THRESHOLD?this._dragScrollDeltaX=Math.ceil(a.x-(c+Eh.SCROLL_THRESHOLD)):a.x>=d-Eh.SCROLL_THRESHOLD&&(this._dragScrollDeltaX=Math.ceil(a.x-(d-Eh.SCROLL_THRESHOLD)));a.y<=Eh.SCROLL_THRESHOLD?this._dragScrollDeltaY=Math.ceil((a.y-Eh.SCROLL_THRESHOLD)/
Eh.SCROLL_THRESHOLD):a.y>=b-Eh.SCROLL_THRESHOLD&&(this._dragScrollDeltaY=Math.ceil((a.y-(b-Eh.SCROLL_THRESHOLD))/Eh.SCROLL_THRESHOLD));this._dragScrollDeltaX==0&&this._dragScrollDeltaY==0?(this.stopDragScroll(),this.updateDragSelect()):this._dragScrollTimer==null&&this.startDragScroll()},selectionManager_stage_mouseUpHandler:function(a){a=x.__cast(a.currentTarget,dd);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__:Eh};var lx=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(Ld.TEXT_CHANGE,m(this,this.undoManager_textEditor_textChangeHandler),!1,10,!0)};t["moonshine.editor.text.managers.UndoManager"]=lx;lx.__name__="moonshine.editor.text.managers.UndoManager";lx.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 Ld(Ld.TEXT_CHANGE,a.undo,Ld.ORIGIN_UNDO))}},redo:function(){if(this._redoStack.length!=0){var a=this._redoStack.pop();this._undoStack.push(a);this._textEditor.dispatchEvent(new Ld(Ld.TEXT_CHANGE,
a.redo,Ld.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 Xa("\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(),v=h.get_endLine()+1;q<v;){var w=q++,z=this._textEditor.get_lines().get(w),r=w==h.get_startLine()?h.get_startChar():0,G=w==h.get_endLine()?h.get_endChar():z.text.length;w>h.get_startLine()&&(n+="\n",++l);n+=z.text.substring(r,G)}}q=h.get_startLine();v=h.get_startChar();w=h.get_endLine();z=h.get_endChar();h=h.get_newText()!=
null?(new Xa("\r?\n|\r","g")).split(h.get_newText()):[""];n!=null&&(l==1?z-=n.length:w-=l-h.length);h.length>0&&(w=q+h.length-1,z=h[h.length-1].length,w==q&&(z+=v));b[g]=new Af(q,v,w,z,n)}this._undoStack.length<this._savedAt&&(this._savedAt=-1);this._redoStack.length=0;this._undoStack.push(new ly(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==Ld.ORIGIN_LOCAL&&this.collectChanges(a.changes)},__class__:lx,__properties__:{get_edited:"get_edited"}};var ly=function(a,b){this.undo=a;this.redo=b};t["moonshine.editor.text.managers._UndoManager.UndoRedoChanges"]=ly;ly.__name__="moonshine.editor.text.managers._UndoManager.UndoRedoChanges";ly.prototype={undo:null,redo:null,__class__:ly};var px=
function(){};t["moonshine.editor.text.syntax.format.CSSSyntaxFormatBuilder"]=px;px.__name__="moonshine.editor.text.syntax.format.CSSSyntaxFormatBuilder";px.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 rj);this._fontSettings==null&&(this._fontSettings=new Nn);var a=new Qd,b=this.getTextFormat(this._colorSettings.typeNameColor);
a.h[yb.CSS_TEXT]=b;b=this.getTextFormat(this._colorSettings.fieldNameColor);a.h[yb.CSS_PROPERTY]=b;b=this.getTextFormat(this._colorSettings.valueColor);a.h[yb.CSS_VALUE]=b;b=this.getTextFormat(this._colorSettings.colorColor);a.h[yb.CSS_COLOR]=b;b=this.getTextFormat(this._colorSettings.numberColor);a.h[yb.CSS_NUMBER]=b;b=this.getTextFormat(this._colorSettings.keywordColor);a.h[yb.CSS_MEDIA]=b;b=this.getTextFormat(this._colorSettings.foregroundColor);a.h[yb.CSS_BRACEOPEN]=b;b=this.getTextFormat(this._colorSettings.foregroundColor);
a.h[yb.CSS_BRACECLOSE]=b;b=this.getTextFormat(this._colorSettings.foregroundColor);a.h[yb.CSS_COLON1]=b;b=this.getTextFormat(this._colorSettings.foregroundColor);a.h[yb.CSS_COLON2]=b;b=this.getTextFormat(this._colorSettings.foregroundColor);a.h[yb.CSS_COLON3]=b;b=this.getTextFormat(this._colorSettings.stringColor);a.h[yb.CSS_STRING1]=b;b=this.getTextFormat(this._colorSettings.stringColor);a.h[yb.CSS_STRING2]=b;b=this.getTextFormat(this._colorSettings.stringColor);a.h[yb.CSS_STRING3]=b;b=this.getTextFormat(this._colorSettings.stringColor);
a.h[yb.CSS_STRING4]=b;b=this.getTextFormat(this._colorSettings.commentColor);a.h[yb.CSS_COMMENT1]=b;b=this.getTextFormat(this._colorSettings.commentColor);a.h[yb.CSS_COMMENT2]=b;b=this.getTextFormat(this._colorSettings.commentColor);a.h[yb.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__:px};var qx=function(){};t["moonshine.editor.text.syntax.format.JSSyntaxFormatBuilder"]=
qx;qx.__name__="moonshine.editor.text.syntax.format.JSSyntaxFormatBuilder";qx.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 rj);this._fontSettings==null&&(this._fontSettings=new Nn);var a=new Qd,b=this.getTextFormat(this._colorSettings.invalidColor);a.h[0]=b;b=this.getTextFormat(this._colorSettings.foregroundColor);
a.h[$c.JS_CODE]=b;b=this.getTextFormat(this._colorSettings.stringColor);a.h[$c.JS_STRING1]=b;b=this.getTextFormat(this._colorSettings.stringColor);a.h[$c.JS_STRING2]=b;b=this.getTextFormat(this._colorSettings.commentColor);a.h[$c.JS_COMMENT]=b;b=this.getTextFormat(this._colorSettings.commentColor);a.h[$c.JS_MULTILINE_COMMENT]=b;b=this.getTextFormat(this._colorSettings.regExpColor);a.h[$c.JS_REGULAR_EXPRESSION]=b;b=this.getTextFormat(this._colorSettings.keywordColor);a.h[$c.JS_BOOLEAN_KEYWORD]=b;b=
this.getTextFormat(this._colorSettings.keywordColor);a.h[$c.JS_UNDEFINED_KEYWORD]=b;b=this.getTextFormat(this._colorSettings.keywordColor);a.h[$c.JS_NULL_KEYWORD]=b;b=this.getTextFormat(this._colorSettings.keywordColor);a.h[$c.JS_KEYWORD]=b;b=this.getTextFormat(this._colorSettings.fieldKeywordColor);a.h[$c.JS_VAR_KEYWORD]=b;b=this.getTextFormat(this._colorSettings.methodKeywordColor);a.h[$c.JS_FUNCTION_KEYWORD]=b;b=this.getTextFormat(this._colorSettings.typeKeywordColor);a.h[$c.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__:qx};var ox=function(){};t["moonshine.editor.text.syntax.format.PlainTextFormatBuilder"]=ox;ox.__name__="moonshine.editor.text.syntax.format.PlainTextFormatBuilder";ox.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 rj);this._fontSettings==null&&(this._fontSettings=new Nn);var a=new Qd,b=this.getTextFormat(this._colorSettings.foregroundColor);a.h[Mn.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__:ox};var rj=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"]=rj;rj.__name__=
"moonshine.editor.text.syntax.format.SyntaxColorSettings";rj.monokai=function(){var a=new rj;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};rj.defaultDark=function(){var a=new rj;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};rj.defaultLight=function(){return new rj};rj.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__:rj};var Nn=
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"]=Nn;Nn.__name__="moonshine.editor.text.syntax.format.SyntaxFontSettings";Nn.prototype={fontFamily:null,fontSize:null,tabStops:null,__class__:Nn};var oo=function(){};t["moonshine.editor.text.syntax.parser.ILineParser"]=oo;oo.__name__="moonshine.editor.text.syntax.parser.ILineParser";oo.__isInterface__=
!0;oo.prototype={get_defaultContext:null,setContext:null,parse:null,__class__:oo,__properties__:{get_defaultContext:"get_defaultContext"}};var Um=function(){this.context=this._defaultContext=0;ma.call(this)};t["moonshine.editor.text.syntax.parser.context.ContextSwitchLineParser"]=Um;Um.__name__="moonshine.editor.text.syntax.parser.context.ContextSwitchLineParser";Um.__interfaces__=[oo];Um.__super__=ma;Um.prototype=I(ma.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 Xa("^\\s+","");if(q.match(h)){q=q.matchedPos();if(q.len==h.length)break;n+=q.len;h=U.substr(a,n,null)}var v=this.context!=0?this.context:this._defaultContext;if(this.parserManager!=null){var w=this.parserManager.getParser(v);w!=null&&(v=w.contextMask)}q=this.switchManager.getSwitches(v);if(q!=null)for(var z=
0;z<q.length;){var r=q[z];++z;r.pattern!=null?r.pattern.match(h)&&(v=r.pattern.matchedPos(),l==null||v.pos<l.index)&&(l={swtch:r,index:v.pos,length:v.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=U.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;){v=g[l];w=this.parserManager.getParser(v);if(w!=null){q=g[l-1];z=w.contextMask;r=l<g.length-1?g[l+1]:a.length;h=a.substring(q,r)+"\n";w.parser.setContext(v&~z);h=w.parser.parse(h,b,c,d,f);g.splice(l-1,2);for(v=0;v<h.length;){n=h[v]+q;if(r<0||n<r)w=l-1+v,g.splice(w,0,n),++w,g.splice(w,0,h[v+1]|z);v+=2}this.context=g[g.length-1]}l-=
2}return g},__class__:Um,__properties__:{get_defaultContext:"get_defaultContext"}});var yb=function(){Um.call(this);this._defaultContext=this.context=yb.CSS_TEXT;this.switchManager=new my([new Od([yb.CSS_TEXT],yb.CSS_COMMENT1,new Xa("/\\*","")),new Od([yb.CSS_COMMENT1],yb.CSS_TEXT,new Xa("\\*/",""),!0),new Od([yb.CSS_PROPERTY],yb.CSS_COMMENT2,new Xa("/\\*","")),new Od([yb.CSS_COMMENT2],yb.CSS_PROPERTY,new Xa("\\*/",""),!0),new Od([yb.CSS_VALUE],yb.CSS_COMMENT3,new Xa("/\\*","")),new Od([yb.CSS_COMMENT3],
yb.CSS_VALUE,new Xa("\\*/",""),!0),new Od([yb.CSS_TEXT],yb.CSS_MEDIA,new Xa("@media(?=[;{\\s])",""),!0),new Od([yb.CSS_MEDIA],yb.CSS_TEXT,new Xa("[{\r\n]","")),new Od([yb.CSS_TEXT,yb.CSS_MEDIA],yb.CSS_COLON1,new Xa(";","")),new Od([yb.CSS_COLON1],yb.CSS_TEXT),new Od([yb.CSS_TEXT],yb.CSS_BRACEOPEN,new Xa("\\{","")),new Od([yb.CSS_BRACEOPEN],yb.CSS_PROPERTY),new Od([yb.CSS_PROPERTY,yb.CSS_VALUE],yb.CSS_BRACECLOSE,new Xa("\\}","")),new Od([yb.CSS_BRACECLOSE],yb.CSS_TEXT,new Xa("(?=.)","")),new Od([yb.CSS_PROPERTY],
yb.CSS_COLON2,new Xa(":","")),new Od([yb.CSS_COLON2],yb.CSS_VALUE),new Od([yb.CSS_VALUE],yb.CSS_PROPERTY,new Xa("[\r\n]","")),new Od([yb.CSS_VALUE],yb.CSS_COLON3,new Xa(";","")),new Od([yb.CSS_COLON3],yb.CSS_PROPERTY),new Od([yb.CSS_VALUE],yb.CSS_COLOR,new Xa("#[0-9a-fA-F]{3,8}","")),new Od([yb.CSS_COLOR],yb.CSS_VALUE),new Od([yb.CSS_VALUE],yb.CSS_NUMBER,new Xa("\\-?((\\.[0-9]+)|([0-9]+(\\.[0-9]+)?))","")),new Od([yb.CSS_NUMBER],yb.CSS_VALUE),new Od([yb.CSS_TEXT],yb.CSS_STRING1,new Xa('"',"")),new Od([yb.CSS_TEXT],
yb.CSS_STRING2,new Xa("'","")),new Od([yb.CSS_STRING1],yb.CSS_STRING1,new Xa('\\\\["\r\n]',"")),new Od([yb.CSS_STRING2],yb.CSS_STRING2,new Xa("\\\\['\r\n]","")),new Od([yb.CSS_STRING1],yb.CSS_TEXT,new Xa('"|(?=[\r\n])',""),!0),new Od([yb.CSS_STRING2],yb.CSS_TEXT,new Xa("'|(?=[\r\n])",""),!0),new Od([yb.CSS_VALUE],yb.CSS_STRING3,new Xa('"',"")),new Od([yb.CSS_VALUE],yb.CSS_STRING4,new Xa("'","")),new Od([yb.CSS_STRING3],yb.CSS_STRING3,new Xa('\\\\["\r\n]',"")),new Od([yb.CSS_STRING4],yb.CSS_STRING4,
new Xa("\\\\['\r\n]","")),new Od([yb.CSS_STRING3],yb.CSS_VALUE,new Xa('"|(?=[\r\n])',""),!0),new Od([yb.CSS_STRING4],yb.CSS_VALUE,new Xa("'|(?=[\r\n])",""),!0)])};t["moonshine.editor.text.syntax.parser.CSSLineParser"]=yb;yb.__name__="moonshine.editor.text.syntax.parser.CSSLineParser";yb.__super__=Um;yb.prototype=I(Um.prototype,{__class__:yb});var lz=function(a,b){this.contextMask=a;this.parser=b};t["moonshine.editor.text.syntax.parser.InlineParser"]=lz;lz.__name__="moonshine.editor.text.syntax.parser.InlineParser";
lz.prototype={contextMask:null,parser:null,__class__:lz};var Vm=function(){this.context=this._defaultContext=1;this.keywordSet=new H;this.caseSensitiveKeywords=!0;ma.call(this)};t["moonshine.editor.text.syntax.parser.LineParser"]=Vm;Vm.__name__="moonshine.editor.text.syntax.parser.LineParser";Vm.__interfaces__=[oo];Vm.__super__=ma;Vm.prototype=I(ma.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(U.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 Xa("^\\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__:Vm,__properties__:{get_defaultContext:"get_defaultContext"}});var $c=function(){Vm.call(this);
this._defaultContext=this.context=$c.JS_CODE;this.wordBoundaries=new Xa("([\\s,(){}\\[\\]\\-+*%/=\"'~!&|<>?:;.]+)","g");this.patterns=[new xk($c.JS_STRING1,new Xa('^"(?:\\\\\\\\|\\\\"|[^\n])*?(?:"|\\\\\n|(?=\n))',"")),new xk($c.JS_STRING2,new Xa("^'(?:\\\\\\\\|\\\\'|[^\n])*?(?:'|\\\\\n|(?=\n))","")),new xk($c.JS_COMMENT,new Xa("^//.*","")),new xk($c.JS_MULTILINE_COMMENT,new Xa("^/\\*.*?(?:\\*/|\n)","")),new xk($c.JS_REGULAR_EXPRESSION,new Xa("^/(?:\\\\\\\\|\\\\/|\\[(?:\\\\\\\\|\\\\\\]|.)+?\\]|[^*/])(?:\\\\\\\\|\\\\/|\\[(?:\\\\\\\\|\\\\\\]|.)+?\\]|.)*?/[gismx]*",
""))];this.endPatterns=[new xk($c.JS_STRING1,new Xa('(?:^|[^\\\\])("|(?=\n))',"")),new xk($c.JS_STRING2,new Xa("(?:^|[^\\\\])('|(?=\n))","")),new xk($c.JS_MULTILINE_COMMENT,new Xa("\\*/",""))];var a=new Qd;a.h[$c.JS_NULL_KEYWORD]=["null"];a.h[$c.JS_UNDEFINED_KEYWORD]=["undefined"];a.h[$c.JS_BOOLEAN_KEYWORD]=["true","false"];a.h[$c.JS_VAR_KEYWORD]=["var","const","let"];a.h[$c.JS_FUNCTION_KEYWORD]=["function"];a.h[$c.JS_TYPE_KEYWORD]=["class"];a.h[$c.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"]=$c;$c.__name__="moonshine.editor.text.syntax.parser.JSLineParser";$c.__super__=Vm;$c.prototype=I(Vm.prototype,{__class__:$c});var xk=function(a,b){this.type=a;this.expression=b};t["moonshine.editor.text.syntax.parser.LineParserPattern"]=xk;xk.__name__="moonshine.editor.text.syntax.parser.LineParserPattern";xk.prototype={type:null,expression:null,__class__:xk};var Mn=function(){};t["moonshine.editor.text.syntax.parser.PlainTextLineParser"]=
Mn;Mn.__name__="moonshine.editor.text.syntax.parser.PlainTextLineParser";Mn.__interfaces__=[oo];Mn.prototype={get_defaultContext:function(){return 0},setContext:function(a){},parse:function(a,b,c,d,f){return[0,0,a.length]},__class__:Mn,__properties__:{get_defaultContext:"get_defaultContext"}};var Od=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"]=Od;Od.__name__="moonshine.editor.text.syntax.parser.context.ContextSwitch";
Od.prototype={from:null,to:null,pattern:null,post:null,__class__:Od};var my=function(a){this.switches=new Qd;for(var b=0;b<a.length;){var c=a[b];++b;this.addSwitch(c)}};t["moonshine.editor.text.syntax.parser.context.ContextSwitchManager"]=my;my.__name__="moonshine.editor.text.syntax.parser.context.ContextSwitchManager";my.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__:my};var mz=function(a){this.parsers=new Qd;for(var b=0;b<a.length;){var c=a[b];++b;this.addParser(c)}};t["moonshine.editor.text.syntax.parser.context.InlineParserManager"]=mz;mz.__name__="moonshine.editor.text.syntax.parser.context.InlineParserManager";mz.prototype={parsers:null,addParser:function(a){this.parsers.h[a.contextMask]=a},getParser:function(a){return this.parsers.h[a&61440]},__class__:mz};var Py=function(){};
t["moonshine.editor.text.theme.TextEditorStyles"]=Py;Py.__name__="moonshine.editor.text.theme.TextEditorStyles";Py.initialize=function(a){if(a==null){var b=ac.get_fallbackTheme();a=b instanceof wc?b:null}if(a!=null){var c=a.styleProvider;c.getStyleFunction(wi,null)==null&&c.setStyleFunction(wi,null,function(d){var f=a.get_darkMode();d.get_backgroundSkin()==null&&(f=new ab(vb.SolidColor(f?1973790:16777214)),f.set_width(10),f.set_height(10),d.set_backgroundSkin(f))});c.getStyleFunction(Dc,wi.CHILD_VARIANT_LIST_VIEW)==
null&&c.setStyleFunction(Dc,wi.CHILD_VARIANT_LIST_VIEW,function(d){c.getStyleFunction(Dc,null)(d)})}};var kz=function(){};t["moonshine.editor.text.theme.TextLineRendererStyles"]=kz;kz.__name__="moonshine.editor.text.theme.TextLineRendererStyles";kz.initialize=function(a){if(a==null){var b=ac.get_fallbackTheme();a=b instanceof wc?b:null}a!=null&&(b=a.styleProvider,b.getStyleFunction(bi,null)==null&&b.setStyleFunction(bi,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 ab(vb.SolidColor(d?1973790:16777214));f.set_height(16);c.set_backgroundSkin(f)}c.get_focusedBackgroundSkin()==null&&c.set_focusedBackgroundSkin(new ab(vb.SolidColor(d?3026478:15596539)));c.get_debuggerStoppedBackgroundSkin()==null&&c.set_debuggerStoppedBackgroundSkin(new ab(vb.SolidColor(d?5131822:16777164)));c.get_selectedTextBackgroundSkinFactory()==null&&c.set_selectedTextBackgroundSkinFactory(function(){return new ab(vb.SolidColor(d?
5131886:13623799,.85))});c.get_selectedTextUnfocusedBackgroundSkinFactory()==null&&c.set_selectedTextUnfocusedBackgroundSkinFactory(function(){return new ab(vb.SolidColor(d?5131886:13623799,.75))});c.get_gutterBackgroundSkin()==null&&(f=new ab(vb.SolidColor(d?1973790:16777214)),f.set_height(16),c.set_gutterBackgroundSkin(f));c.get_searchResultBackgroundSkinFactory()==null&&c.set_searchResultBackgroundSkinFactory(function(){return new ab(vb.SolidColor(16378290,.75),nc.SolidColor(1,16378290,.95))});
c.get_breakpointSkin()==null&&(f=new Ei(vb.SolidColor(15012864)),f.set_width(10),f.set_height(10),c.set_breakpointSkin(f));c.get_unverifiedBreakpointSkin()==null&&(f=new Ei(vb.SolidColor(8684676)),f.set_width(10),f.set_height(10),c.set_unverifiedBreakpointSkin(f))}))};var Xi=function(a,b){this.open=a;this.close=b};t["moonshine.editor.text.utils.AutoClosingPair"]=Xi;Xi.__name__="moonshine.editor.text.utils.AutoClosingPair";Xi.prototype={open:null,close:null,__class__:Xi};var Tm=function(){};t["moonshine.editor.text.utils.TextEditorUtil"]=
Tm;Tm.__name__="moonshine.editor.text.utils.TextEditorUtil";Tm.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)};Tm.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 Xa("\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 Md=function(){};t["moonshine.editor.text.utils.TextUtil"]=Md;Md.__name__=
"moonshine.editor.text.utils.TextUtil";Md.isWordCharacter=function(a,b){if(a.length!=1)throw new Db("Length of character must be 1");b==null&&(b=Md.DEFAULT_NON_WORD_CHARACTERS);return b.indexOf(a)==-1};Md.startOfWord=function(a,b,c){c==null&&(c=Md.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};Md.endOfWord=function(a,b,c){c==null&&(c=Md.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};Md.wordBoundaryForward=function(a){return a.length-a.replace(RegExp("^(?:\\s+|[^\\s,(){}\\[\\]\\-+*%/=\"'~!&|<>?:;.]+\\s*|[,(){}\\[\\]\\-+*%/=\"'~!&|<>?:;.]+\\s*)",""),"").length};Md.wordBoundaryBackward=function(a){return a.length-a.replace(RegExp("(?:\\s+|[^\\s,(){}\\[\\]\\-+*%/=\"'~!&|<>?:;.]+\\s*|[,(){}\\[\\]\\-+*%/=\"'~!&|<>?:;.]+\\s*)$",""),"").length};Md.indentAmount=function(a){a=a.length-a.replace(RegExp("^\t+",""),"").length;return a>0?a:0};Md.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}};Md.repeatStr=function(a,b){var c=[];c.length=b+1;return c.join(a)};Md.charIdx2LineCharIdx=function(a,b,c){var d=U.substr(a,0,b).split(c).length-1;a=d>0?b-a.lastIndexOf(c,b-1)-c.length:b;return new Ln(d,a)};Md.lineCharIdx2charIdx=function(a,b,c,d){return a.split(d).slice(0,b).join("").length+b*d.length+
c};Md.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""};Md.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};Md.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 Pe=function(){};t["motion.easing.IEasing"]=Pe;Pe.__name__="motion.easing.IEasing";Pe.__isInterface__=!0;Pe.prototype={calculate:null,ease:null,__class__:Pe};var uu=function(){};t["motion.easing._Expo.ExpoEaseIn"]=uu;uu.__name__="motion.easing._Expo.ExpoEaseIn";uu.__interfaces__=[Pe];uu.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__:uu};var vu=function(){};t["motion.easing._Expo.ExpoEaseInOut"]=vu;vu.__name__="motion.easing._Expo.ExpoEaseInOut";vu.__interfaces__=[Pe];vu.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__:vu};var wu=function(){};t["motion.easing._Expo.ExpoEaseOut"]=wu;wu.__name__="motion.easing._Expo.ExpoEaseOut";wu.__interfaces__=[Pe];wu.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__:wu};var mk=function(){};t["motion.easing.Expo"]=mk;mk.__name__="motion.easing.Expo";var xa=function(){};t["motion.Actuate"]=xa;xa.__name__=
"motion.Actuate";xa.apply=function(a,b,c){xa.stop(a,b);c==null&&(c=xa.defaultActuator);a=Eb.createInstance(c,[a,0,b]);a.apply();return a};xa.effects=function(a,b,c){c==null&&(c=!0);return new ny(a,b,c)};xa.getLibrary=function(a,b){b==null&&(b=!0);xa.targetLibraries.h.__keys__[a.__id__]==null&&b&&xa.targetLibraries.set(a,[]);return xa.targetLibraries.h[a.__id__]};xa.isActive=function(){for(var a=!1,b=xa.targetLibraries.iterator();b.hasNext();){b.next();a=!0;break}return a};xa.motionPath=function(a,
b,c,d){d==null&&(d=!0);return xa.tween(a,b,c,d,xu)};xa.pause=function(a){if(x.__implements(a,fl))a.pause();else{var b=xa.getLibrary(a,!1);if(b!=null)for(var c=0;c<b.length;)a=b[c],++c,a.pause()}};xa.pauseAll=function(){for(var a=xa.targetLibraries.iterator();a.hasNext();)for(var b=a.next(),c=0;c<b.length;){var d=b[c];++c;d.pause()}};xa.reset=function(){for(var a=xa.targetLibraries.iterator();a.hasNext();)for(var b=a.next(),c=b.length-1;c>=0;)b[c].stop(null,!1,!1),--c;xa.targetLibraries=new Ta};xa.resume=
function(a){if(x.__implements(a,fl))a.resume();else{var b=xa.getLibrary(a,!1);if(b!=null)for(var c=0;c<b.length;)a=b[c],++c,a.resume()}};xa.resumeAll=function(){for(var a=xa.targetLibraries.iterator();a.hasNext();)for(var b=a.next(),c=0;c<b.length;){var d=b[c];++c;d.resume()}};xa.stop=function(a,b,c,d){d==null&&(d=!0);c==null&&(c=!1);if(a!=null)if(x.__implements(a,fl))a.stop(null,c,d);else if(a=xa.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=x.__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}};xa.timer=function(a,b){return xa.tween(new yu(0),a,new yu(1),!1,b)};xa.transform=function(a,b,c){c==null&&(c=!0);b==null&&(b=0);return new oy(a,b,c)};xa.tween=function(a,b,c,d,f){d==null&&(d=!0);if(a!=null){if(b>0){f==null&&(f=xa.defaultActuator);a=Eb.createInstance(f,[a,b,c]);b=xa.getLibrary(a.target);if(d){for(d=b.length-1;d>=0;)b[d].stop(a.properties,!1,!1),--d;b=xa.getLibrary(a.target)}b.push(a);
a.move();return a}return xa.apply(a,c,f)}return null};xa.unload=function(a){var b=a.target;xa.targetLibraries.h.__keys__[b.__id__]!=null&&(U.remove(xa.targetLibraries.h[b.__id__],a),xa.targetLibraries.h[b.__id__].length==0&&xa.targetLibraries.remove(b))};xa.update=function(a,b,c,d,f){f==null&&(f=!0);return xa.tween(a,b,{start:c,end:d},f,Om)};var ny=function(a,b,c){this.target=a;this.duration=b;this.overwrite=c};t["motion._Actuate.EffectsOptions"]=ny;ny.__name__="motion._Actuate.EffectsOptions";ny.prototype=
{duration:null,overwrite:null,target:null,filter:function(a,b){b.filter=a;return xa.tween(this.target,this.duration,b,this.overwrite,zu)},__class__:ny};var oy=function(a,b,c){this.target=a;this.duration=b;this.overwrite=c};t["motion._Actuate.TransformOptions"]=oy;oy.__name__="motion._Actuate.TransformOptions";oy.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 xa.tween(this.target,
this.duration,a,this.overwrite,mq)},sound:function(a,b){var c={};a!=null&&(c.soundVolume=a);b!=null&&(c.soundPan=b);return xa.tween(this.target,this.duration,c,this.overwrite,mq)},__class__:oy};var yu=function(a){this.progress=a};t["motion._Actuate.TweenTimer"]=yu;yu.__name__="motion._Actuate.TweenTimer";yu.prototype={progress:null,__class__:yu};var nz=function(){this._x=new jl;this._y=new jl;this._rotation=null};t["motion.MotionPath"]=nz;nz.__name__="motion.MotionPath";nz.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 po(a,c,f));this._y.addPath(new po(b,d,f));return this},bezierSpline:function(a,b,c){c==null&&(c=1);this._x.addPath(new nq(a,c));this._y.addPath(new nq(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 Au(this._x,this._y));return this._rotation},
get_x:function(){return this._x},get_y:function(){return this._y},__class__:nz,__properties__:{get_y:"get_y",get_x:"get_x",get_rotation:"get_rotation"}};var kl=function(){};t["motion.IComponentPath"]=kl;kl.__name__="motion.IComponentPath";kl.__isInterface__=!0;kl.prototype={get_start:null,set_start:null,get_end:null,end:null,strength:null,calculate:null,__class__:kl,__properties__:{get_end:"get_end",set_start:"set_start",get_start:"get_start"}};var jl=function(){this.paths=[];this.strength=0};t["motion._MotionPath.ComponentPath"]=
jl;jl.__name__="motion._MotionPath.ComponentPath";jl.__interfaces__=[kl];jl.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__:jl,__properties__:{get_end:"get_end",set_start:"set_start",get_start:"get_start"}};var po=function(a,b,c){this._end=a;this.control=b;this.strength=c};t["motion._MotionPath.BezierPath"]=po;po.__name__="motion._MotionPath.BezierPath";po.__interfaces__=[kl];po.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__:po,__properties__:{get_end:"get_end",set_start:"set_start",get_start:"get_start"}};var nq=function(a,b){jl.call(this);this.through=a;this.strength=b};t["motion._MotionPath.BezierSplinePath"]=nq;nq.__name__="motion._MotionPath.BezierSplinePath";nq.__super__=jl;nq.prototype=I(jl.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 v=g[q]/h[q-1];h[q]-=v*n[q-1];l[q]-=v*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 po(this.through[g],b[g],c))}}return jl.prototype.set_start.call(this,a)},get_end:function(){return this.through[this.through.length-1]},__class__:nq});var Au=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"]=Au;Au.__name__="motion._MotionPath.RotationPath";
Au.__interfaces__=[kl];Au.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__:Au,__properties__:{set_start:"set_start",get_start:"get_start",get_end:"get_end"}};
var zu=function(a,b,c){this.filterIndex=-1;Vd.call(this,a,b,c);if(x.__instanceof(c.filter,qw))for(this.filterClass=c.filter,a.get_filters().length==0&&a.set_filters([Eb.createInstance(this.filterClass,[])]),b=0,a=a.get_filters();b<a.length;)c=a[b],++b,x.__instanceof(c,this.filterClass)&&(this.filter=c);else this.filterIndex=c.filter,this.filter=a.get_filters()[this.filterIndex]};t["motion.actuators.FilterActuator"]=zu;zu.__name__="motion.actuators.FilterActuator";zu.__super__=Vd;zu.prototype=I(Vd.prototype,
{filter:null,filterClass:null,filterIndex:null,apply:function(){for(var a=0,b=u.fields(this.properties);a<b.length;){var c=b[a];++a;c!="filter"&&u.setProperty(this.filter,c,u.field(this.properties,c))}this.setFilter()},initialize:function(){for(var a,b,c=0,d=u.fields(this.properties);c<d.length;)a=d[c],++c,a!="filter"&&(b=this.filter,b=Object.prototype.hasOwnProperty.call(b,a)?u.field(b,a):u.getProperty(b,a),a=new Wj(this.filter,a,b,u.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++;x.__instanceof(a[d],this.filterClass)&&(a[d]=this.filter)}b=this.target;!Object.prototype.hasOwnProperty.call(b,"filters")||b.__properties__&&b.__properties__.set_filters?u.setProperty(b,"filters",a):b.filters=a},update:function(a){Vd.prototype.update.call(this,
a);this.setFilter()},__class__:zu});var xu=function(a,b,c){Vd.call(this,a,b,c)};t["motion.actuators.MotionPathActuator"]=xu;xu.__name__="motion.actuators.MotionPathActuator";xu.__super__=Vd;xu.prototype=I(Vd.prototype,{apply:function(){for(var a=0,b=u.fields(this.properties);a<b.length;){var c=b[a];++a;Object.prototype.hasOwnProperty.call(this.target,c)?this.target[c]=x.__cast(u.field(this.properties,c),kl).get_end():u.setProperty(this.target,c,x.__cast(u.field(this.properties,c),kl).get_end())}},
initialize:function(){for(var a,b=0,c=u.fields(this.properties);b<c.length;){var d=c[b];++b;a=x.__cast(u.field(this.properties,d),kl);if(a!=null){var f=!0;Object.prototype.hasOwnProperty.call(this.target,d)?a.set_start(u.field(this.target,d)):(f=!1,a.set_start(u.getProperty(this.target,d)));a=new yk(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(x.__cast(d,yk).path.calculate(c)):u.setProperty(d.target,d.propertyName,Math.round(x.__cast(d,yk).path.calculate(c))):d.isField?d.target[d.propertyName]=x.__cast(d,yk).path.calculate(c):u.setProperty(d.target,d.propertyName,x.__cast(d,yk).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]=x.__cast(d,yk).path.calculate(c):u.setProperty(d.target,d.propertyName,x.__cast(d,yk).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")?u.field(a,"alpha"):u.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?
u.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__:xu});var Wj=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"]=
Wj;Wj.__name__="motion.actuators.PropertyDetails";Wj.prototype={change:null,isField:null,propertyName:null,start:null,target:null,__class__:Wj};var yk=function(a,b,c,d){d==null&&(d=!0);Wj.call(this,a,b,0,0,d);this.path=c};t["motion.actuators.PropertyPathDetails"]=yk;yk.__name__="motion.actuators.PropertyPathDetails";yk.__super__=Wj;yk.prototype=I(Wj.prototype,{path:null,__class__:yk});var mq=function(a,b,c){Vd.call(this,a,b,c)};t["motion.actuators.TransformActuator"]=mq;mq.__name__="motion.actuators.TransformActuator";
mq.__super__=Vd;mq.prototype=I(Vd.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")?u.field(a,"transform"):u.getProperty(a,"transform");b=this.endColorTransform;!Object.prototype.hasOwnProperty.call(a,"colorTransform")||a.__properties__&&a.__properties__.set_colorTransform?u.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?u.setProperty(a,"soundTransform",b):a.soundTransform=b)},initialize:function(){Object.prototype.hasOwnProperty.call(this.properties,"colorValue")&&this.target instanceof ka&&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 id;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")?u.field(d,"alpha"):u.getProperty(d,"alpha");this.endColorTransform.alphaMultiplier=f}d=this.target;c=f=Object.prototype.hasOwnProperty.call(d,"transform")?u.field(d,"transform"):u.getProperty(d,"transform");c=f=Object.prototype.hasOwnProperty.call(c,"colorTransform")?u.field(c,"colorTransform"):u.getProperty(c,"colorTransform");this.tweenColorTransform=new id;for(b=0;b<a.length;){var g=a[b];++b;f=Object.prototype.hasOwnProperty.call(c,
g)?u.field(c,g):u.getProperty(c,g);var h=this.tweenColorTransform;d=this.endColorTransform;d=Object.prototype.hasOwnProperty.call(d,g)?u.field(d,g):u.getProperty(d,g);g=new Wj(h,g,f,d-f);this.propertyDetails.push(g)}},initializeSound:function(){var a=this.target;var b=Object.prototype.hasOwnProperty.call(a,"soundTransform")?u.field(a,"soundTransform"):u.getProperty(a,"soundTransform");b==null&&(a=this.target,b=new ri,!Object.prototype.hasOwnProperty.call(a,"soundTransform")||a.__properties__&&a.__properties__.set_soundTransform?
u.setProperty(a,"soundTransform",b):a.soundTransform=b);a=this.target;var c=b=Object.prototype.hasOwnProperty.call(a,"soundTransform")?u.field(a,"soundTransform"):u.getProperty(a,"soundTransform");a=this.target;this.endSoundTransform=b=Object.prototype.hasOwnProperty.call(a,"soundTransform")?u.field(a,"soundTransform"):u.getProperty(a,"soundTransform");this.tweenSoundTransform=new ri;Object.prototype.hasOwnProperty.call(this.properties,"soundVolume")&&(this.endSoundTransform.volume=this.properties.soundVolume,
this.propertyDetails.push(new Wj(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 Wj(this.tweenSoundTransform,"pan",c.pan,this.endSoundTransform.pan-c.pan)))},update:function(a){Vd.prototype.update.call(this,a);if(this.endColorTransform!=null){var b=this.target;b=a=Object.prototype.hasOwnProperty.call(b,"transform")?
u.field(b,"transform"):u.getProperty(b,"transform");a=this.tweenColorTransform;!Object.prototype.hasOwnProperty.call(b,"colorTransform")||b.__properties__&&b.__properties__.set_colorTransform?u.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?u.setProperty(b,"soundTransform",a):b.soundTransform=a)},__class__:mq});
var oq=function(){};t["motion.easing._Bounce.BounceEaseIn"]=oq;oq.__name__="motion.easing._Bounce.BounceEaseIn";oq.__interfaces__=[Pe];oq._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};oq.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__:oq};var Bu=function(){};t["motion.easing._Bounce.BounceEaseInOut"]=Bu;Bu.__name__="motion.easing._Bounce.BounceEaseInOut";
Bu.__interfaces__=[Pe];Bu.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__:Bu};var pq=function(){};
t["motion.easing._Bounce.BounceEaseOut"]=pq;pq.__name__="motion.easing._Bounce.BounceEaseOut";pq.__interfaces__=[Pe];pq._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};pq.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__:pq};var Uk=function(){};t["motion.easing.Bounce"]=Uk;Uk.__name__="motion.easing.Bounce";var Cu=function(){};t["motion.easing._Cubic.CubicEaseIn"]=Cu;Cu.__name__=
"motion.easing._Cubic.CubicEaseIn";Cu.__interfaces__=[Pe];Cu.prototype={calculate:function(a){return a*a*a},ease:function(a,b,c,d){return c*(a/=d)*a*a+b},__class__:Cu};var Du=function(){};t["motion.easing._Cubic.CubicEaseInOut"]=Du;Du.__name__="motion.easing._Cubic.CubicEaseInOut";Du.__interfaces__=[Pe];Du.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__:Du};var Eu=function(){};t["motion.easing._Cubic.CubicEaseOut"]=
Eu;Eu.__name__="motion.easing._Cubic.CubicEaseOut";Eu.__interfaces__=[Pe];Eu.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__:Eu};var Vk=function(){};t["motion.easing.Cubic"]=Vk;Vk.__name__="motion.easing.Cubic";var qq=function(a,b){this.a=a;this.p=b};t["motion.easing._Elastic.ElasticEaseIn"]=qq;qq.__name__="motion.easing._Elastic.ElasticEaseIn";qq.__interfaces__=[Pe];qq.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__:qq};var rq=function(a,b){this.a=a;this.p=b};t["motion.easing._Elastic.ElasticEaseInOut"]=
rq;rq.__name__="motion.easing._Elastic.ElasticEaseInOut";rq.__interfaces__=[Pe];rq.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__:rq};var sq=function(a,b){this.a=a;this.p=b};t["motion.easing._Elastic.ElasticEaseOut"]=sq;sq.__name__="motion.easing._Elastic.ElasticEaseOut";sq.__interfaces__=[Pe];sq.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__:sq};var oj=function(){};t["motion.easing.Elastic"]=oj;oj.__name__="motion.easing.Elastic";oj.easeInWith=function(a,b){return new qq(a,b)};
oj.easeInOutWith=function(a,b){return new rq(a,b)};oj.easeOutWith=function(a,b){return new sq(a,b)};var qg=function(){};t["motion.easing.Linear"]=qg;qg.__name__="motion.easing.Linear";qg.__properties__={get_easeNone:"get_easeNone"};qg.get_easeNone=function(){return new Fu};var Fu=function(){};t["motion.easing.LinearEaseNone"]=Fu;Fu.__name__="motion.easing.LinearEaseNone";Fu.__interfaces__=[Pe];Fu.prototype={calculate:function(a){return a},ease:function(a,b,c,d){return c*a/d+b},__class__:Fu};var Gu=
function(){};t["motion.easing._Quad.QuadEaseIn"]=Gu;Gu.__name__="motion.easing._Quad.QuadEaseIn";Gu.__interfaces__=[Pe];Gu.prototype={calculate:function(a){return a*a},ease:function(a,b,c,d){return c*(a/=d)*a+b},__class__:Gu};var Hu=function(){};t["motion.easing._Quad.QuadEaseInOut"]=Hu;Hu.__name__="motion.easing._Quad.QuadEaseInOut";Hu.__interfaces__=[Pe];Hu.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__:Hu};var Iu=function(){};t["motion.easing._Quad.QuadEaseOut"]=Iu;Iu.__name__="motion.easing._Quad.QuadEaseOut";Iu.__interfaces__=[Pe];Iu.prototype={calculate:function(a){return-a*(a-2)},ease:function(a,b,c,d){return-c*(a/=d)*(a-2)+b},__class__:Iu};var Ui=function(){};t["motion.easing.Quad"]=Ui;Ui.__name__="motion.easing.Quad";var Ju=function(){};t["motion.easing._Quart.QuartEaseIn"]=Ju;Ju.__name__="motion.easing._Quart.QuartEaseIn";Ju.__interfaces__=[Pe];Ju.prototype={calculate:function(a){return a*
a*a*a},ease:function(a,b,c,d){return c*(a/=d)*a*a*a+b},__class__:Ju};var Ku=function(){};t["motion.easing._Quart.QuartEaseInOut"]=Ku;Ku.__name__="motion.easing._Quart.QuartEaseInOut";Ku.__interfaces__=[Pe];Ku.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__:Ku};var Lu=function(){};t["motion.easing._Quart.QuartEaseOut"]=Lu;Lu.__name__="motion.easing._Quart.QuartEaseOut";Lu.__interfaces__=
[Pe];Lu.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__:Lu};var Ah=function(){};t["motion.easing.Quart"]=Ah;Ah.__name__="motion.easing.Quart";var Mu=function(){};t["motion.easing._Quint.QuintEaseIn"]=Mu;Mu.__name__="motion.easing._Quint.QuintEaseIn";Mu.__interfaces__=[Pe];Mu.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__:Mu};var Nu=function(){};t["motion.easing._Quint.QuintEaseInOut"]=
Nu;Nu.__name__="motion.easing._Quint.QuintEaseInOut";Nu.__interfaces__=[Pe];Nu.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__:Nu};var Ou=function(){};t["motion.easing._Quint.QuintEaseOut"]=Ou;Ou.__name__="motion.easing._Quint.QuintEaseOut";Ou.__interfaces__=[Pe];Ou.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__:Ou};var Wk=function(){};t["motion.easing.Quint"]=Wk;Wk.__name__="motion.easing.Quint";var Pu=function(){};t["motion.easing._Sine.SineEaseIn"]=Pu;Pu.__name__="motion.easing._Sine.SineEaseIn";Pu.__interfaces__=[Pe];Pu.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__:Pu};var Qu=function(){};t["motion.easing._Sine.SineEaseInOut"]=Qu;Qu.__name__="motion.easing._Sine.SineEaseInOut";Qu.__interfaces__=[Pe];
Qu.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__:Qu};var Ru=function(){};t["motion.easing._Sine.SineEaseOut"]=Ru;Ru.__name__="motion.easing._Sine.SineEaseOut";Ru.__interfaces__=[Pe];Ru.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__:Ru};var Xk=function(){};t["motion.easing.Sine"]=Xk;Xk.__name__="motion.easing.Sine";var fA=
{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 H},toIntMap:function(a,b){return new Qd},toFloatMap:function(a,b){return new qo},toEnumValueMapMap:function(a,b){return new cf},toObjectMap:function(a,b){return new Ta},toUtilsObjectMap:function(a,
b){return new ro},toClassMap:function(a,b){return new so},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}},La=function(){};t["openfl.Lib"]=La;La.__name__="openfl.Lib";La.__properties__={get_current:"get_current",get_application:"get_application"};La.as=function(a,b){return x.__instanceof(a,b)?a:null};La.attach=function(a){return new ik};
La.clearInterval=function(a){La.__timers.h.hasOwnProperty(a)&&(La.__timers.h[a].stop(),La.__timers.remove(a))};La.clearTimeout=function(a){La.__timers.h.hasOwnProperty(a)&&(La.__timers.h[a].stop(),La.__timers.remove(a))};La.getDefinitionByName=function(a){if(a==null)return null;a=N.replace(a,"::",".");return t[a]};La.getQualifiedClassName=function(a){if(a==null)return null;var b=x.__instanceof(a,qw)?a:x.getClass(a);return b==null?typeof a=="boolean"||a==fw?"Bool":typeof a=="number"&&(a|0)===a||a==
pw?"Int":typeof a=="number"||a==Oz?"Float":null:b.__name__};La.getQualifiedSuperclassName=function(a){if(a==null)return null;a=x.__instanceof(a,qw)?a:x.getClass(a);if(a==null)return null;a=a.__super__;return a==null?null:a.__name__};La.getTimer=function(){return Rb.getTimer()};La.describeType=function(a){La.notImplemented({fileName:"openfl/Lib.hx",lineNumber:272,className:"openfl.Lib",methodName:"describeType"});return null};La.getURL=function(a,b){La.navigateToURL(a,b)};La.navigateToURL=function(a,
b){b==null&&(b="_blank");var c=a.url;if(Eb.typeof(a.data)==Pa.TObject){for(var d="",f=u.fields(a.data),g=0;g<f.length;){var h=f[g];++g;d.length>0&&(d+="&");var n=encodeURIComponent(h)+"=";h=F.string(u.field(a.data,h));d+=n+encodeURIComponent(h)}c=c.indexOf("?")>-1?c+("&"+d):c+("?"+d)}Rb.openURL(c,b)};La.encodeURIComponent=function(a){return encodeURIComponent(a)};La.decodeURIComponent=function(a){return decodeURIComponent(a.split("+").join(" "))};La.notImplemented=function(a){var b=a.className+"."+
a.methodName;Object.prototype.hasOwnProperty.call(La.__sentWarnings.h,b)||(La.__sentWarnings.h[b]=!0,Xb.warn(a.methodName+" is not implemented",a))};La.preventDefaultTouchMove=function(){window.document.addEventListener("touchmove",function(a){a.preventDefault()},!1)};La.sendToURL=function(a){(new mj).load(a)};La.setInterval=function(a,b,c){var d=++La.__lastTimerID;b=new Ec(b);La.__timers.h[d]=b;b.run=function(){if(La.get_current()!=null&&La.get_current().stage!=null&&La.get_current().stage.__uncaughtErrorEvents.__enabled)try{a.apply(a,
c==null?[]:c)}catch(g){Pb.lastError=g;var f=Z.caught(g).unwrap();La.get_current().stage.__handleError(f)}else a.apply(a,c==null?[]:c)};return d};La.setTimeout=function(a,b,c){var d=++La.__lastTimerID,f=La.__timers;b=Ec.delay(function(){La.__timers.remove(d);if(La.get_current()!=null&&La.get_current().stage!=null&&La.get_current().stage.__uncaughtErrorEvents.__enabled)try{a.apply(a,c==null?[]:c)}catch(h){Pb.lastError=h;var g=Z.caught(h).unwrap();La.get_current().stage.__handleError(g)}else a.apply(a,
c==null?[]:c)},b);f.h[d]=b;return d};La.trace=function(a){ye.trace(a,{fileName:"openfl/Lib.hx",lineNumber:672,className:"openfl.Lib",methodName:"trace"})};La.isXMLName=function(a){return a!=null&&(new Xa("^[a-zA-Z_]","")).match(a)&&!(new Xa("^[xX][mM][lL]","")).match(a)&&(new Xa("^[a-zA-Z0-9_\\-\\.]+$","")).match(a)?!0:!1};La.getClassByAlias=function(a){if(!Object.prototype.hasOwnProperty.call(La.__registeredClassAliases.h,a))throw new Ud("Class "+a+" could not be found.");return La.__registeredClassAliases.h[a]};
La.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");La.__registeredClassAliases.h[a]=b;La.__registeredClasses.set(b,a)};La.get_application=function(){return jd.application};La.get_current=function(){jd.current==null&&(jd.current=new ik);return jd.current};var ll=function(){};t["openfl._Vector.IVector"]=ll;ll.__name__="openfl._Vector.IVector";ll.__isInterface__=!0;ll.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__:ll,__properties__:{set_length:"set_length",get_length:"get_length"}};var ij=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"]=
ij;ij.__name__="openfl._Vector.BoolVector";ij.__interfaces__=[ll];ij.prototype={fixed:null,__array:null,__tempIndex:null,concat:function(a){return a==null?new ij(0,!1,this.__array.slice()):a.__array.length>0?new ij(0,!1,this.__array.concat(a.__array)):new ij(0,!1,this.__array.slice())},copy:function(){return new ij(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 ij(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 Ag(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 ij(0,!1,
this.__array.slice(a,b))},sort:function(a){this.__array.sort(a)},splice:function(a,b){return new ij(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__:ij,__properties__:{set_length:"set_length",get_length:"get_length"}};var kj=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"]=kj;kj.__name__="openfl._Vector.FloatVector";kj.__interfaces__=[ll];kj.prototype={fixed:null,__array:null,
__tempIndex:null,concat:function(a){return a==null?new kj(0,!1,this.__array.slice()):a.__array.length>0?new kj(0,!1,this.__array.concat(a.__array)):new kj(0,!1,this.__array.slice())},copy:function(){return new kj(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 kj(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 Ag(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 kj(0,!1,this.__array.slice(a,b))},sort:function(a){this.__array.sort(a)},splice:function(a,b){return new kj(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__:kj,__properties__:{set_length:"set_length",get_length:"get_length"}};var lj=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"]=lj;lj.__name__="openfl._Vector.FunctionVector";lj.__interfaces__=[ll];lj.prototype={fixed:null,__array:null,__tempIndex:null,concat:function(a){return a==null?new lj(0,!1,this.__array.slice()):a.__array.length>0?new lj(0,!1,this.__array.concat(a.__array)):new lj(0,!1,this.__array.slice())},copy:function(){return new lj(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 lj(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 Ag(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 lj(0,!1,this.__array.slice(a,b))},sort:function(a){this.__array.sort(a)},splice:function(a,b){return new lj(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__:lj,__properties__:{set_length:"set_length",get_length:"get_length"}};var jj=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"]=jj;jj.__name__="openfl._Vector.IntVector";jj.__interfaces__=[ll];jj.prototype={fixed:null,__array:null,__tempIndex:null,
concat:function(a){return a==null?new jj(0,!1,this.__array.slice()):a.__array.length>0?new jj(0,!1,this.__array.concat(a.__array)):new jj(0,!1,this.__array.slice())},copy:function(){return new jj(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 jj(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 Ag(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 jj(0,!1,this.__array.slice(a,b))},sort:function(a){this.__array.sort(a)},splice:function(a,b){return new jj(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__:jj,__properties__:{set_length:"set_length",get_length:"get_length"}};var Mi=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"]=Mi;Mi.__name__="openfl._Vector.ObjectVector";Mi.__interfaces__=[ll];Mi.prototype={fixed:null,__array:null,__tempIndex:null,concat:function(a){return a==null?new Mi(0,!1,this.__array.slice()):a.__array.length>0?new Mi(0,!1,this.__array.concat(a.__array)):new Mi(0,!1,this.__array.slice())},copy:function(){return new Mi(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 Mi(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 Ag(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 Mi(0,!1,this.__array.slice(a,b))},sort:function(a){this.__array.sort(a)},splice:function(a,b){return new Mi(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__:Mi,__properties__:{set_length:"set_length",get_length:"get_length"}};var aj=function(){};t["openfl.desktop.Clipboard"]=aj;aj.__name__="openfl.desktop.Clipboard";aj.__properties__={get_generalClipboard:"get_generalClipboard"};aj.get_generalClipboard=function(){aj.__generalClipboard==null&&(aj.__generalClipboard=new aj,aj.__generalClipboard.__systemClipboard=
!0);return aj.__generalClipboard};aj.prototype={__htmlText:null,__richText:null,__systemClipboard:null,__text:null,clear:function(){this.__systemClipboard?Oe.set_text(null):this.__text=this.__richText=this.__htmlText=null},clearData:function(a){if(this.__systemClipboard)switch(a){case 0:case 1:case 2:Oe.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 Oe.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 Oe.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,Oe.set_text(a==
null?null:F.string(a)),!0;default:return!1}switch(a){case 0:return a=b,this.__htmlText=a==null?null:F.string(a),!0;case 1:return a=b,this.__richText=a==null?null:F.string(a),!0;case 2:return a=b,this.__text=a==null?null:F.string(a),!0;default:return!1}},setDataHandler:function(a,b,c){jd.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__:aj,__properties__:{get_formats:"get_formats"}};var Oo=function(){Ma.call(this);jd.application==null&&(jd.application=this);jd.current==null&&(jd.current=new ik);jd.current.__loaderInfo=bk.create(null);jd.current.__loaderInfo.content=jd.current};t["openfl.display.Application"]=Oo;Oo.__name__="openfl.display.Application";Oo.__super__=Ma;Oo.prototype=I(Ma.prototype,{createWindow:function(a){var b=new tq(this,a);jd.current.__loaderInfo.width==
-1&&(jd.current.__loaderInfo.width=b.__width,jd.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 Ma.prototype.exec.call(this)},__checkForAllWindowsClosed:function(){this.__windows.length>
0||Ma.prototype.__checkForAllWindowsClosed.call(this)},__onModuleExit:function(a){this.onExit.canceled||(jd.application==this&&(jd.application=null),Ma.prototype.__onModuleExit.call(this,a))},__class__:Oo});var Oa=function(a,b,c){c==null&&(c=!1);ka.call(this);this.__drawableType=2;this.__bitmapData=a;this.pixelSnapping=b;this.smoothing=c;b==null&&(this.pixelSnapping=1)};t["openfl.display.Bitmap"]=Oa;Oa.__name__="openfl.display.Bitmap";Oa.__super__=ka;Oa.prototype=I(ka.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=Ha.__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);Ha.__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__:Oa,__properties__:I(ka.prototype.__properties__,{set_bitmapData:"set_bitmapData",get_bitmapData:"get_bitmapData"})});var Ha=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"]=Ha;Ha.__name__="openfl.geom.Rectangle";Ha.prototype={height:null,width:null,x:null,y:null,clone:function(){return new Ha(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 Ha;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 Ha:new Ha(b,d,c-b,a-d)},intersectionToOutput:function(a,b){b==null&&(b=new Ha);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 Ha(b,d,c-b,a-d)},unionToOutput:function(a,b){b==null&&(b=new Ha);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(){Ha.__limeRectangle==null&&(Ha.__limeRectangle=new nf);Ha.__limeRectangle.setTo(this.x,this.y,this.width,this.height);return Ha.__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 Ca(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 Ca(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 Ca(this.x,this.y)},set_topLeft:function(a){this.x=a.x;this.y=a.y;return a.clone()},__class__:Ha,__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 yc=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 Ha(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 Nc(null,0,0,a,b,d<<8|d>>>24&255),this.image.set_transparent(c),this.readable=this.__isValid=!0);this.__renderTransform=new hb;this.__worldAlpha=1;this.__worldTransform=new hb;this.__worldColorTransform=new id;this.__renderable=!0;this.__asset=!1};t["openfl.display.BitmapData"]=yc;yc.__name__="openfl.display.BitmapData";yc.__interfaces__=[jc];yc.fromBase64=function(a,b){return null};
yc.fromBytes=function(a,b){return null};yc.fromCanvas=function(a,b){b==null&&(b=!0);if(a==null)return null;var c=new yc(0,0,b,0);c.__fromImage(Nc.fromCanvas(a));c.image.set_transparent(b);return c};yc.fromFile=function(a){return null};yc.fromImage=function(a,b){b==null&&(b=!0);if(a==null||a.buffer==null)return null;var c=new yc(0,0,b,0);c.__fromImage(a);c.image.set_transparent(b);return c.image!=null?c:null};yc.fromTexture=function(a){if(a==null)return null;var b=new yc(a.__width,a.__height,!0,0);
b.readable=!1;b.__texture=a;b.__textureContext=a.__textureContext;b.image=null;return b};yc.loadFromBase64=function(a,b){return Nc.loadFromBase64(a,b).then(function(c){return Fc.withValue(yc.fromImage(c))})};yc.loadFromBytes=function(a,b){return Nc.loadFromBytes(lc.toBytes(a)).then(function(c){c=yc.fromImage(c);b!=null&&c.__applyAlpha(b);return Fc.withValue(c)})};yc.loadFromFile=function(a){return Nc.loadFromFile(a).then(function(b){return Fc.withValue(yc.fromImage(b))})};yc.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 yc(this.width,this.height,!0,0):this;f&&(g=new yc(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=yc.fromImage(this.image.clone(),this.transparent);else a=new yc(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 yc(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 v=this.getPixel32(q,h);var w=a.getPixel32(q,h);d=0;if(v!=w){var z=(v>>>16&
255)-(w>>>16&255),r=(v>>>8&255)-(w>>>8&255),G=(v&255)-(w&255);z<0&&(z*=-1);r<0&&(r*=-1);G<0&&(G*=-1);z==0&&r==0&&G==0?(v=(v>>>24&255)-(w>>>24&255),v!=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=(v&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|G&255,d=-16777216|(d>>>16&255)<<16|(d>>>8&255)<<8|d&255,c=!0)}c&&(b==null&&(b=new yc(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=Ii.RED;break;case 2:d=Ii.GREEN;break;case 4:d=Ii.BLUE;break;case 8:d=Ii.ALPHA;break;default:return}switch(f){case 1:f=Ii.RED;break;case 2:f=Ii.GREEN;break;case 4:f=Ii.BLUE;break;case 8:f=Ii.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&&(yc.__tempVector.x=f.x,yc.__tempVector.y=f.y),this.image.copyPixels(a.image,b.__toLimeRectangle(),c.__toLimeVector2(),d!=null?d.image:null,f!=null?yc.__tempVector:null,g))},dispose:function(){if(this.image!=null&&this.image.type==ig.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 ka&&(n=x.__cast(a,ka),n.get_visible()||(h=!1,n.set_visible(!0)));a.__update(!1,!0);var l=hb.__pool.get();l.copyFrom(a.__renderTransform);l.invert();b!=null&&
l.concat(b);b=null;f!=null&&(b=hb.__pool.get(),b.copyFrom(l),b.invert());var q=new id;q.__copyFrom(a.__worldColorTransform);q.__invert();if(this.readable||La.get_current().stage.context3D==null){if(c!=null){var v=Ha.__pool.get(),w=hb.__pool.get();a.__getBounds(v,w);var z=Math.ceil(v.width),r=Math.ceil(v.height);w.tx=-v.x;w.ty=-v.y;z=new yc(z,r,!0,0);z.draw(a,w);z.colorTransform(z.rect,c);z.__renderTransform.identity();z.__renderTransform.tx=v.x;z.__renderTransform.ty=v.y;z.__renderTransform.concat(a.__renderTransform);
z.__worldAlpha=a.__worldAlpha;z.__worldColorTransform.__copyFrom(a.__worldColorTransform);a=z;Ha.__pool.release(v);hb.__pool.release(w)}zb.convertToCanvas(this.image);c=new ml(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=Ma.current.__window.context),c!=null&&q.__combine(c),c=new vc(La.get_current().stage.context3D,
this),c.__allowSmoothing=g,c.__pixelRatio=La.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(),hb.__pool.release(b));hb.__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 Vc(0));var d=this.image;if(!a.equals(this.rect)){var f=hb.__pool.get();f.tx=Math.round(-a.x);f.ty=Math.round(-a.y);a=new yc(Math.ceil(a.width),Math.ceil(a.height),!0,0);a.draw(this,f);d=a.image;hb.__pool.release(f)}return b instanceof py?(c.writeBytes(lc.fromBytes(d.encode(mu.PNG)),0,0),c):b instanceof Su?(c.writeBytes(lc.fromBytes(d.encode(mu.JPEG,x.__cast(b,Su).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 Ha);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 Ha(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 Ha);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 v=l/c.get_scaleY();l=c.get_width()/c.get_scaleX()-g-n;n=c.get_height()/c.get_scaleY()-h-v;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(),v=l/c.get_scaleY(),n=c.get_height()/c.get_scaleY()-h-v,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(il.toArrayBufferView(this.__vertexBufferData))}return this.__vertexBuffer},getColorBoundsRect:function(a,b,c){c==null&&(c=!0);if(!this.readable)return new Ha(0,0,this.width,this.height);a=this.image.getColorBoundsRect(a,
b,c,1);return new Ha(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=lc.fromBytes(this.image.getPixels(a.__toLimeRectangle(),1));a.__endian=0;return a},getSurface:function(){if(!this.readable)return null;this.__surface==null&&(this.__surface=nA.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;zb.sync(this.image,!1);this.image!=null&&this.image.version>this.__textureVersion&&(this.__surface!=null&&oA.flush(this.__surface),a=this.image,nd.__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=Ua.toFloat(lc.get_length(a))/Ua.toFloat(4)|0,c=ub.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 Ha(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=lc.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 Oa&&(c=x.__cast(c,Oa).__bitmapData);if(c instanceof Ca){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 yc){h=c;d==null?g=c=0:(c=Math.round(d.x-a.x),g=Math.round(d.y-
a.y));d=Ha.__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(Ua.gt(h>>>24&255,b)&&Ua.gt(l>>>24&255,f))return Ha.__pool.release(d),!0}}Ha.__pool.release(d)}else if(c instanceof
Ha){f=Ha.__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=Ua.toFloat(lc.get_length(a))/Ua.toFloat(4)|0,c=0,n=h;c<n;)if(c++,h=a.readUnsignedInt(),Ua.gt(h>>>24&255,b))return Ha.__pool.release(f),!0;Ha.__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,v=this.height;q<v;)for(var w=q++,z=0,r=this.width;z<r;){var G=z++,J=0,L=0,P=0,V=255;f?(J=P=L=b+g()%c,V=255):(h&&(J=b+g()%c),n&&(P=b+g()%c),l&&(L=b+g()%c),d&&(V=b+g()%c));V=(V<<8)+J;V=(V<<8)+P;V=(V<<8)+L;this.setPixel32(G,w,V)}}},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 v=b++;var w=a.readUnsignedInt();var z=h==null?w&-16777216:h[w>>24&255];var r=d==null?w&16711680:d[w>>16&255];var G=f==null?w&65280:f[w>>8&255];w=g==null?w&255:g[w&255];r=z+r+G+w;a.position=v*4;a.writeUnsignedInt(r)}a.position=0;d=Ha.__pool.get();d.setTo(c.x,c.y,n,l);this.setPixels(d,a);Ha.__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 Wm(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(Ua.toFloat(b.length-b.position)<c)throw new Ud("End of file was encountered.",2030);this.image.setPixels(a.__toLimeRectangle(),lc.toBytePointer(b),1,Sz.toLimeEndian(b.__endian))}},setVector:function(a,b){var c=
new Vc(0);lc.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){zb.convertToCanvas(this.image);zb.createImageData(this.image);
for(var b=this.image.buffer.data,c=0,d=lc.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&&La.get_current().stage.__renderer.__type=="opengl"){c=La.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),v=a.width>0?Math.ceil(a.get_right())-l:0,w=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),v=a.width>0?Math.ceil(a.get_right()/c.__stage.window.__scale)-l:
0,w=a.height>0?Math.ceil(a.get_bottom()/c.__stage.window.__scale)-q:0);yc.__fillRectRectangle.setTo(l,q,v,w);c.setScissorRectangle(yc.__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=Nc.fromBase64(a,b);this.__fromImage(a)},__fromBytes:function(a,
b){a=Nc.fromBytes(lc.toBytes(a));this.__fromImage(a);b!=null&&this.__applyAlpha(b)},__fromFile:function(a){a=Nc.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 Ha(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=Ha.__pool.get();this.rect.__transform(c,b);a.__expand(c.x,c.y,c.width,c.height);Ha.__pool.release(c)},
__loadFromBase64:function(a,b){var c=this;return Nc.loadFromBase64(a,b).then(function(d){c.__fromImage(d);return Fc.withValue(c)})},__loadFromBytes:function(a,b){var c=this;return Nc.loadFromBytes(lc.toBytes(a)).then(function(d){c.__fromImage(d);b!=null&&c.__applyAlpha(b);return Fc.withValue(c)})},__loadFromFile:function(a){var b=this;return Nc.loadFromFile(a).then(function(c){b.__fromImage(c);return Fc.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 Ha);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(il.toArrayBufferView(this.__vertexBufferData))}},__sync:function(){zb.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__:yc};var Nh=function(){ma.call(this);this.__allowSmoothing=!0;this.__pixelRatio=1;this.__tempColorTransform=new id;this.__worldAlpha=1;this.__blendMode=10};t["openfl.display.DisplayObjectRenderer"]=Nh;Nh.__name__="openfl.display.DisplayObjectRenderer";Nh.__super__=ma;Nh.prototype=I(ma.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&&!Ga.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=id.__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 v=l[h];++h;if(v.__renderDirty){b=!0;break}if(q&&v instanceof Hf){a.__cacheBitmapData=null;b=!0;break}}}a.__cacheBitmapMatrix==null&&(a.__cacheBitmapMatrix=new hb);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 w=q=a.__cacheBitmapMatrix.ty=0,z=0,r=0,G=v=0;l=this.__pixelRatio;if(g||b)f=Ha.__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,v=f.x>0?Math.ceil(f.x):Math.floor(f.x),G=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)),w=Math.ceil(Math.max(r*1.25,a.__cacheBitmapData.height)),b=!0):(q=a.__cacheBitmapData.width,w=a.__cacheBitmapData.height):(q=z,w=r);if(b)if(g=!0,a.__cacheBitmapBackground=a.opaqueBackground,z>=.5&&r>=.5){var J=a.opaqueBackground!=null&&
(q!=z||w!=r),L=a.opaqueBackground!=null?-16777216|a.opaqueBackground:0,P=J?0:L,V=this.__type=="opengl";a.__cacheBitmapData==null||q>a.__cacheBitmapData.width||w>a.__cacheBitmapData.height?(a.__cacheBitmapData=new yc(q,w,!0,P),a.__cacheBitmap==null&&(a.__cacheBitmap=new Oa),a.__cacheBitmap.__bitmapData=a.__cacheBitmapData,a.__cacheBitmapRenderer=null):a.__cacheBitmapData.__fillRect(a.__cacheBitmapData.rect,P,V);J&&(f.setTo(0,0,z,r),a.__cacheBitmapData.__fillRect(f,L,V))}else return id.__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+v,a.__cacheBitmap.__renderTransform.ty=a.__renderTransform.ty+G):(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+=v,a.__cacheBitmap.__renderTransform.ty+=
G);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 vc(x.__cast(this,vc).__context3D,a.__cacheBitmapData):(a.__cacheBitmapData.image==null&&(a.__cacheBitmapData=
new yc(q,w,!0,a.opaqueBackground!=null?-16777216|a.opaqueBackground:0),a.__cacheBitmap.__bitmapData=a.__cacheBitmapData),zb.convertToCanvas(a.__cacheBitmapData.image),a.__cacheBitmapRenderer=new ml(a.__cacheBitmapData.image.buffer.__srcContext)),a.__cacheBitmapRenderer.__worldTransform=new hb,a.__cacheBitmapRenderer.__worldColorTransform=new id;a.__cacheBitmapColorTransform==null&&(a.__cacheBitmapColorTransform=new id);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-=v;a.__cacheBitmapRenderer.__worldTransform.ty-=G;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;P=L.__state.renderToTexture;V=L.__state.renderToTextureDepthStencil;var ia=L.__state.renderToTextureAntiAlias,ea=L.__state.renderToTextureSurfaceSelector,ra=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;)v=l[h],++h,v.__preserveObject&&(za=!0);c=a.__cacheBitmapData;G=null;a.__cacheBitmapData2==null||q>a.__cacheBitmapData2.width||w>a.__cacheBitmapData2.height?a.__cacheBitmapData2=new yc(q,w,!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||w>a.__cacheBitmapData3.height?a.__cacheBitmapData3=new yc(q,w,!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),G=a.__cacheBitmapData3);J.__setBlendMode(10);J.__worldAlpha=1;J.__worldTransform.identity();
J.__worldColorTransform.__identity();h=0;for(l=a.__filters;h<l.length;){v=l[h];++h;v.__preserveObject&&(J.__setRenderTarget(G),J.__renderFilterPass(c,J.__defaultDisplayShader,v.__smooth));w=0;for(z=v.__numShaderPasses;w<z;)q=w++,q=v.__initShader(J,q,v.__preserveObject?G:null),J.__setBlendMode(v.__shaderBlendMode),J.__setRenderTarget(n),J.__renderFilterPass(c,q,v.__smooth),q=c,c=n,n=q;v.__renderDirty=!1}a.__cacheBitmap.__bitmapData=c}this.__blendMode=10;this.__setBlendMode(ra);this.__copyShader(J);
P!=null?L.setRenderToTexture(P,V,ia,ea):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;)v=l[h],++h,v.__needSecondBitmapData&&(z=!0),v.__preserveObject&&(za=!0);c=a.__cacheBitmapData;G=null;z?(a.__cacheBitmapData2==null||a.__cacheBitmapData2.image==null||q>a.__cacheBitmapData2.width||w>a.__cacheBitmapData2.height?a.__cacheBitmapData2=
new yc(q,w,!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||w>a.__cacheBitmapData3.height?a.__cacheBitmapData3=new yc(q,w,!0,0):a.__cacheBitmapData3.fillRect(a.__cacheBitmapData3.rect,0),G=a.__cacheBitmapData3);a.__tempPoint==null&&(a.__tempPoint=new Ca);w=a.__tempPoint;h=0;for(l=a.__filters;h<l.length;)v=l[h],++h,v.__preserveObject&&G.copyPixels(c,c.rect,w),
q=v.__applyFilter(n,c,c.rect,w),v.__preserveObject&&q.draw(G,null,a.__objectTransform!=null?a.__objectTransform.__colorTransform:null),v.__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)&&Ha.__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);id.__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 Hf},__class__:Nh});var Tu=function(a){Nh.call(this)};t["openfl.display.CairoRenderer"]=Tu;Tu.__name__="openfl.display.CairoRenderer";Tu.__super__=Nh;Tu.prototype=I(Nh.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__:Tu});var ml=function(a){Nh.call(this);this.context=a;this.__tempMatrix=new hb;this.__type="canvas"};t["openfl.display.CanvasRenderer"]=ml;ml.__name__="openfl.display.CanvasRenderer";ml.__super__=Nh;ml.prototype=I(Nh.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:Uu.renderDrawable(a,this);break;case 2:to.renderDrawable(a,this);break;case 3:bm.renderDrawable(a,this);break;case 4:case 5:Vu.renderDrawable(a,this);break;case 6:Wu.renderDrawable(a,this);break;case 7:oa.renderDrawable(a,this);break;case 8:Xm.renderDrawable(a,
this);break;case 9:Cj.renderDrawable(a,this)}},__renderDrawableMask:function(a){if(a!=null)switch(a.__drawableType){case 0:Uu.renderDrawableMask(a,this);break;case 2:to.renderDrawableMask(a,this);break;case 3:bm.renderDrawableMask(a,this);break;case 4:case 5:Vu.renderDrawableMask(a,this);break;case 6:Wu.renderDrawableMask(a,this);break;case 7:oa.renderDrawableMask(a,this);break;case 8:Xm.renderDrawableMask(a,this);break;case 9:Cj.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__:ml});var oz={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}}},Xu=function(a){ka.call(this);this.__drawableType=10;this.__element=
a};t["openfl.display.DOMElement"]=Xu;Xu.__name__="openfl.display.DOMElement";Xu.__super__=ka;Xu.prototype=I(ka.prototype,{__active:null,__element:null,__class__:Xu});var uq=function(a){Nh.call(this);this.element=a;ka.__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 ml(null);this.__canvasRenderer.__isDOM=!0};t["openfl.display.DOMRenderer"]=uq;uq.__name__="openfl.display.DOMRenderer";uq.__super__=Nh;uq.prototype=I(Nh.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 Ha);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:ae.renderDrawable(a,this);break;case 3:oh.renderDrawable(a,this);break;case 4:case 5:Yu.renderDrawable(a,this);break;case 6:Zu.renderDrawable(a,this);break;case 7:ph.renderDrawable(a,this);break;case 8:nl.renderDrawable(a,this);break;case 9:zk.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),oh.renderDrawable(a,this)}},__renderDrawableClear:function(a){if(a!=null)switch(a.__drawableType){case 2:ae.renderDrawableClear(a,this);break;case 3:oh.renderDrawableClear(a,this);break;case 4:case 5:Yu.renderDrawableClear(a,this);break;case 6:Zu.renderDrawableClear(a,this);break;case 7:ph.renderDrawableClear(a,this);break;case 8:nl.renderDrawableClear(a,
this);break;case 9:zk.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 Ha);var b=Ha.__pool.get(),c=hb.__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);Ha.__pool.release(b);hb.__pool.release(c)}},__class__:uq});var $u=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}");
Yh.call(this,a);this.__isGenerated=!0;this.__initGL()};t["openfl.display.DisplayObjectShader"]=$u;$u.__name__="openfl.display.DisplayObjectShader";$u.__super__=Yh;$u.prototype=I(Yh.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__:$u});var Ic=function(){this.__renderedOnCanvasWhileOnDOM=this.__forceCachedBitmapUpdate=!1;
this.__mouseScrollVCounter=0;this.condenseWhite=!1;Ia.call(this);this.__wordSelection=!1;this.__drawableType=7;this.__selectionIndex=this.__caretIndex=0;this.__displayAsPassword=!1;this.__passwordChar="*";this.__graphics=new Th(this);this.__graphics.__commands.clear();this.__textEngine=new Uc(this);this.__layoutDirty=!0;this.__offsetY=this.__offsetX=0;this.__mouseWheelEnabled=!0;this.__text="";Ic.__defaultTextFormat==null&&(Ic.__defaultTextFormat=new ef("Times New Roman",12,0,!1,!1,!1,"","",3,0,0,
0,0),Ic.__defaultTextFormat.blockIndent=0,Ic.__defaultTextFormat.bullet=!1,Ic.__defaultTextFormat.letterSpacing=0,Ic.__defaultTextFormat.kerning=!1);this.__textFormat=Ic.__defaultTextFormat.clone();this.__textEngine.textFormatRanges.push(new Oh(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"]=Ic;Ic.__name__="openfl.text.TextField";Ic.__super__=Ia;Ic.prototype=I(Ia.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 Ha;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 qy(g,a,f,b,c,d)},getLineOffset:function(a){this.__updateLayout();if(a<0)throw new xe;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 xe;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 xe("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 xe;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 Oh(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 Oh(f.format.clone(),
b,c),g.format.__merge(a),this.__textEngine.textFormatRanges.insertAt(d+1,g)):(g=new Oh(f.format.clone(),b,c),g.format.__merge(a),this.__textEngine.textFormatRanges.insertAt(d+1,g),g=new Oh(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 Oh(f.format.clone(),
b,c),g.format.__merge(a),this.__textEngine.textFormatRanges.insertAt(d+1,g),f.end=b,d+=2):(++d,Xb.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();
Ia.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 Gg("link",!0,!1,U.substr(b,6,null))):La.getURL(new ne(b))))}return Ia.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 nf(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=Ha.__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);Ha.__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=U.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?Xb.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 Oh(this.get_defaultTextFormat().clone(),
0,c.length)):a==b&&this.__textEngine.textFormatRanges.get(0).start>0?this.__textEngine.textFormatRanges.unshift(new Oh(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 Oh(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=Ec.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);(ka.__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(){(ka.__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=Ha.__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;Ha.__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){ka.__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||ka.__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){Ia.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=ic.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 na("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 na("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;ka.__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(),ka.__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()||Oe.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(),ka.__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 na("change",!0))):(this.__stopCursorTimer(),
this.__startCursorTimer());break;case 97:this.get_selectable()&&(xc.get_metaKey(b)||xc.get_ctrlKey(b))&&this.setSelection(0,this.__text.length);break;case 99:if(xc.get_metaKey(b)||xc.get_ctrlKey(b))this.__caretIndex==this.__selectionIndex||this.get_displayAsPassword()||Oe.set_text(this.__text.substring(this.__caretIndex,this.__selectionIndex));break;case 120:!xc.get_metaKey(b)&&!xc.get_ctrlKey(b)||this.__caretIndex==this.__selectionIndex||this.get_displayAsPassword()||(Oe.set_text(this.__text.substring(this.__caretIndex,
this.__selectionIndex)),this.replaceSelectedText(""),this.dispatchEvent(new na("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 na("change",!0))):(this.__stopCursorTimer(),this.__startCursorTimer());break;case 1073741898:this.get_selectable()&&(xc.get_metaKey(b)||
xc.get_ctrlKey(b)?this.__caretIndex=0:this.__caretBeginningOfLine(),xc.get_shiftKey(b)||(this.__selectionIndex=this.__caretIndex),this.setSelection(this.__selectionIndex,this.__caretIndex));break;case 1073741901:this.get_selectable()&&(xc.get_metaKey(b)||xc.get_ctrlKey(b)?this.__caretIndex=this.__text.length:this.__caretEndOfLine(),xc.get_shiftKey(b)||(this.__selectionIndex=this.__caretIndex),this.setSelection(this.__selectionIndex,this.__caretIndex));break;case 1073741903:this.get_selectable()&&
(xc.get_metaKey(b)||xc.get_ctrlKey(b)?this.__caretBeginningOfNextLine():this.__caretNextCharacter(),xc.get_shiftKey(b)||(this.__selectionIndex=this.__caretIndex),this.setSelection(this.__selectionIndex,this.__caretIndex));break;case 1073741904:this.get_selectable()&&(xc.get_metaKey(b)||xc.get_ctrlKey(b)?this.__caretBeginningOfPreviousLine():this.__caretPreviousCharacter(),xc.get_shiftKey(b)||(this.__selectionIndex=this.__caretIndex),this.setSelection(this.__selectionIndex,this.__caretIndex));break;
case 1073741905:this.get_selectable()&&(xc.get_metaKey(b)||xc.get_ctrlKey(b)?this.__caretIndex=this.__text.length:this.__caretNextLine(),xc.get_shiftKey(b)||(this.__selectionIndex=this.__caretIndex),this.setSelection(this.__selectionIndex,this.__caretIndex));break;case 1073741906:this.get_selectable()&&(xc.get_metaKey(b)||xc.get_ctrlKey(b)?this.__caretIndex=0:this.__caretPreviousLine(),xc.get_shiftKey(b)||(this.__selectionIndex=this.__caretIndex),this.setSelection(this.__selectionIndex,this.__caretIndex));
break;case 13:case 1073741912:this.__textEngine.multiline?(a=new Gg("textInput",!0,!0,"\n"),this.dispatchEvent(a),a.isDefaultPrevented()||(this.__replaceSelectedText("\n",!0),this.dispatchEvent(new na("change",!0)))):(this.__stopCursorTimer(),this.__startCursorTimer())}},window_onTextInput:function(a){this.__replaceSelectedText(a,!0);this.dispatchEvent(new na("change",!0))},__class__:Ic,__properties__:I(Ia.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 av=function(a,b,c){c==null&&(c=0);b==null&&(b=10);a==null&&(a=10);this.lastText=null;Ic.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"]=av;av.__name__="openfl.display.FPS";av.__super__=Ic;av.prototype=I(Ic.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__:av});var ry=function(a,b){ma.call(this);this.name=a;this.frame=b};t["openfl.display.FrameLabel"]=ry;ry.__name__="openfl.display.FrameLabel";ry.__super__=ma;ry.prototype=I(ma.prototype,{frame:null,name:null,__class__:ry});var pz=function(a,b){this.script=a;this.frame=b};t["openfl.display.FrameScript"]=pz;pz.__name__="openfl.display.FrameScript";
pz.prototype={frame:null,script:null,__class__:pz};var Th=function(a){this.__dirty=!0;this.__owner=a;this.__commands=new qh;this.__positionY=this.__positionX=this.__strokePadding=0;this.__renderTransform=new hb;this.__usedShaderBuffers=new jb;this.__worldTransform=new hb;this.__height=this.__width=0;this.__bitmapScaleY=this.__bitmapScaleX=1;this.__shaderBufferPool=new dc(function(){return new bv});this.moveTo(0,0)};t["openfl.display.Graphics"]=Th;Th.__name__="openfl.display.Graphics";Th.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 v=l++;d.push(Math.ceil(v/(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=Ha.__pool.get(),l=hb.__pool.get(),q=Infinity,v=Infinity,w=-Infinity,z=-Infinity,r,G=0;G<h;){var J=G++;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),v>n.y&&(v=n.y),w<n.get_right()&&(w=n.get_right()),z<n.get_bottom()&&(z=n.get_bottom())))}this.__inflateBounds(q,v);this.__inflateBounds(w,z);this.__commands.drawQuads(a,b,c);this.set___dirty(!0);this.__visible=!0;Ha.__pool.release(n);
hb.__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 v=n*c,w=n*d;this.moveTo(l,q-n);this.curveTo(l,q-w,l-v,q-v);this.curveTo(l-w,q,l-n,q);v=h*
c;w=h*d;this.lineTo(a+h,q);this.curveTo(a+w,q,a+v,q-v);this.curveTo(a,q-w,a,q-h);v=f*c;w=f*d;this.lineTo(a,b+f);this.curveTo(a,b+w,a+v,b+v);this.curveTo(a+w,b,a+f,b);v=g*c;w=g*d;this.lineTo(l-g,b);this.curveTo(l-w,b,l-v,b+v);this.curveTo(l,b+w,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 Db("Not enough vertices to close a triangle.");b=ub.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,v=-Infinity,w=-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),v<f&&(v=f),w<n&&(w=n);this.__inflateBounds(l,q);this.__inflateBounds(v,w);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 v=l++;d.push(Math.ceil(v/(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=ub.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=Ha.__pool.get();this.__bounds.__transform(c,b);a.__expand(c.x,
c.y,c.width,c.height);Ha.__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 Ha(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 Dj(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 uo);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=ya.BEGIN_BITMAP_FILL;d=b;a.push(new cv(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=ya.BEGIN_FILL;d=b;a.push(new vq(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=ya.BEGIN_GRADIENT_FILL;d=b;a.push(new dv(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=ya.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=ya.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=ya.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=ya.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=ya.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=ya.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=ya.END_FILL;a.push(new ev);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=ya.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=ya.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=ya.LINE_STYLE;var h=b;d=new fv(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 vq(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=ya.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=ya.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{Th.maxTextureWidth!=null&&a>Th.maxTextureWidth&&(a=Th.maxTextureWidth);Th.maxTextureWidth!=null&&d>Th.maxTextureHeight&&(d=Th.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__:Th,__properties__:{set___dirty:"set___dirty"}};var cm=function(){};t["openfl.display.IGraphicsFill"]=cm;cm.__name__="openfl.display.IGraphicsFill";
cm.__isInterface__=!0;cm.prototype={__graphicsFillType:null,__class__:cm};var Ej=function(){};t["openfl.display.IGraphicsData"]=Ej;Ej.__name__="openfl.display.IGraphicsData";Ej.__isInterface__=!0;Ej.prototype={__graphicsDataType:null,__class__:Ej};var cv=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"]=cv;cv.__name__="openfl.display.GraphicsBitmapFill";
cv.__interfaces__=[cm,Ej];cv.prototype={bitmapData:null,matrix:null,repeat:null,smooth:null,__graphicsDataType:null,__graphicsFillType:null,__class__:cv};var ev=function(){this.__graphicsDataType=5;this.__graphicsFillType=3};t["openfl.display.GraphicsEndFill"]=ev;ev.__name__="openfl.display.GraphicsEndFill";ev.__interfaces__=[cm,Ej];ev.prototype={__graphicsDataType:null,__graphicsFillType:null,__class__:ev};var dv=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"]=dv;dv.__name__="openfl.display.GraphicsGradientFill";dv.__interfaces__=[cm,Ej];dv.prototype={alphas:null,colors:null,focalPointRatio:null,interpolationMethod:null,matrix:null,ratios:null,spreadMethod:null,type:null,__graphicsDataType:null,__graphicsFillType:null,__class__:dv};
var gv=function(){};t["openfl.display.IGraphicsPath"]=gv;gv.__name__="openfl.display.IGraphicsPath";gv.__isInterface__=!0;var uo=function(a,b,c){c==null&&(c=0);this.commands=a;this.data=b;this.winding=c;this.__graphicsDataType=3};t["openfl.display.GraphicsPath"]=uo;uo.__name__="openfl.display.GraphicsPath";uo.__interfaces__=[gv,Ej];uo.prototype={commands:null,data:null,winding:null,__graphicsDataType:null,cubicCurveTo:function(a,b,c,d,f,g){this.commands==null&&(this.commands=ub.toIntVector(null));
this.data==null&&(this.data=ub.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=ub.toIntVector(null));this.data==null&&(this.data=ub.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=ub.toIntVector(null));this.data==
null&&(this.data=ub.toFloatVector(null));this.commands.push(2);this.data.push(a);this.data.push(b)},moveTo:function(a,b){this.commands==null&&(this.commands=ub.toIntVector(null));this.data==null&&(this.data=ub.toFloatVector(null));this.commands.push(1);this.data.push(a);this.data.push(b)},wideLineTo:function(a,b){this.commands==null&&(this.commands=ub.toIntVector(null));this.data==null&&(this.data=ub.toFloatVector(null));this.commands.push(2);this.data.push(a);this.data.push(b)},wideMoveTo:function(a,
b){this.commands==null&&(this.commands=ub.toIntVector(null));this.data==null&&(this.data=ub.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__:uo};var sy=function(a,b,c){this.rects=a;this.indices=
b;this.transforms=c;this.__graphicsDataType=6};t["openfl.display.GraphicsQuadPath"]=sy;sy.__name__="openfl.display.GraphicsQuadPath";sy.__interfaces__=[gv,Ej];sy.prototype={indices:null,rects:null,transforms:null,__graphicsDataType:null,__class__:sy};var ty=function(a,b){this.shader=a;this.matrix=b;this.__graphicsDataType=8;this.__graphicsFillType=4};t["openfl.display.GraphicsShaderFill"]=ty;ty.__name__="openfl.display.GraphicsShaderFill";ty.__interfaces__=[cm,Ej];ty.prototype={matrix:null,shader:null,
__graphicsDataType:null,__graphicsFillType:null,__class__:ty};var vq=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"]=vq;vq.__name__="openfl.display.GraphicsSolidFill";vq.__interfaces__=[cm,Ej];vq.prototype={alpha:null,color:null,__graphicsDataType:null,__graphicsFillType:null,__class__:vq};var qz=function(){};t["openfl.display.IGraphicsStroke"]=qz;qz.__name__="openfl.display.IGraphicsStroke";
qz.__isInterface__=!0;var fv=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"]=fv;fv.__name__="openfl.display.GraphicsStroke";fv.__interfaces__=[qz,Ej];fv.prototype={caps:null,fill:null,joints:null,miterLimit:null,pixelHinting:null,scaleMode:null,thickness:null,
__graphicsDataType:null,__class__:fv};var uy=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"]=uy;uy.__name__="openfl.display.GraphicsTrianglePath";uy.__interfaces__=[gv,Ej];uy.prototype={culling:null,indices:null,uvtData:null,vertices:null,__graphicsDataType:null,__class__:uy};var vo=function(){};t["openfl.display.IDisplayObjectLoader"]=vo;vo.__name__="openfl.display.IDisplayObjectLoader";
vo.__isInterface__=!0;vo.prototype={load:null,loadBytes:null,__class__:vo};var wq=function(){};t["openfl.display.ITileContainer"]=wq;wq.__name__="openfl.display.ITileContainer";wq.__isInterface__=!0;wq.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__:wq,__properties__:{get_numTiles:"get_numTiles"}};var Su=
function(a){a==null&&(a=80);this.quality=a};t["openfl.display.JPEGEncoderOptions"]=Su;Su.__name__="openfl.display.JPEGEncoderOptions";Su.prototype={quality:null,__class__:Su};var rz={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}}},hv=function(){};t["openfl.display._internal.BitmapDataLoader"]=
hv;hv.__name__="openfl.display._internal.BitmapDataLoader";hv.__interfaces__=[vo];hv.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 yc.loadFromFile(a.url).then(function(h){h=new Oa(h);return Fc.withValue(h)});var f=new Qf,g=new mj;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 yc.loadFromBytes(a).then(function(d){d=new Oa(d);return Fc.withValue(d)})},__class__:hv};var iv=function(){};t["openfl.display._internal.ScriptLoader"]=iv;iv.__name__="openfl.display._internal.ScriptLoader";iv.__interfaces__=[vo];iv.prototype={load:function(a,b,c){if(c.contentType!=null&&(c.contentType.indexOf("/javascript")>-1||c.contentType.indexOf("/ecmascript")>
-1)){var d=new Qf,f=new mj;f.dataFormat=1;f.addEventListener("complete",function(g){eval("(function () {"+F.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__:iv};var jv=function(){};t["openfl.display._internal.AssetManifestLoader"]=jv;jv.__name__="openfl.display._internal.AssetManifestLoader";
jv.__interfaces__=[vo];jv.prototype={load:function(a,b,c){if(c.contentType!=null&&c.contentType.indexOf("/json")>-1){var d=new Qf,f=new mj;f.dataFormat=1;f.addEventListener("complete",function(g){g=a.url;var h=g.indexOf("?");h>-1&&(g=g.substring(0,h));var n=Fe.parse(f.data,Fg.directory(g));if(n==null)d.error("Cannot parse asset manifest");else{var l=ld.fromManifest(n);if(l==null)d.error("Cannot open library");else if(l instanceof Bf)l.load().onComplete(function(q){c.assetLibrary=l;Hb.registerLibrary(c.url,
l);n.name==null||Hb.hasLibrary(n.name)||Hb.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__:jv};var If=function(){Ab.call(this);this.__drawableType=4;this.contentLoaderInfo=
bk.create(this);this.uncaughtErrorEvents=this.contentLoaderInfo.uncaughtErrorEvents;this.__unloaded=!0};t["openfl.display.Loader"]=If;If.__name__="openfl.display.Loader";If.__registerDefaultLoaders=function(){var a=[new hv,new iv,new jv];If.__registeredLoaders=If.__registeredLoaders==null?a:a.concat(If.__registeredLoaders)};If.registerLoader=function(a){a!=null&&(If.__registeredLoaders==null&&(If.__registeredLoaders=[]),U.remove(If.__registeredLoaders,a),If.__registeredLoaders.push(a))};If.__super__=
Ab;If.prototype=I(Ab.prototype,{content:null,contentLoaderInfo:null,uncaughtErrorEvents:null,__library:null,__unloaded:null,addChild:function(a){throw new Ud("Error #2069: The Loader class does not implement this method.",2069);},addChildAt:function(a,b){throw new Ud("Error #2069: The Loader class does not implement this method.",2069);},close:function(){jd.notImplemented({fileName:"openfl/display/Loader.hx",lineNumber:245,className:"openfl.display.Loader",methodName:"close"})},load:function(a,b){this.unload();
var c=new na("open");this.contentLoaderInfo.dispatchEvent(c);this.contentLoaderInfo.loaderURL=La.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=If.__registeredLoaders.length;c>0&&(--c,d=If.__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=If.__registeredLoaders.length;d>0&&(--d,c=If.__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 Ab.prototype.removeChild.call(this,this.content);throw new Ud("Error #2069: The Loader class does not implement this method.",2069);},removeChildAt:function(a){throw new Ud("Error #2069: The Loader class does not implement this method.",2069);},setChildIndex:function(a,b){throw new Ud("Error #2069: The Loader class does not implement this method.",2069);},unload:function(){this.__unloaded||(this.content!=null&&this.content.parent==this&&Ab.prototype.removeChild.call(this,
this.content),this.__library!=null&&(Hb.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 na("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 na)this.contentLoaderInfo.dispatchEvent(a);else{var b=new Vh("ioError");b.text=F.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}Ab.prototype.addChildAt.call(this,a,0);this.contentLoaderInfo.dispatchEvent(new na("complete"))}},Loader_onError:function(a){this.__dispatchError(a)},Loader_onProgress:function(a,b){var c=new zh("progress");c.bytesLoaded=a;c.bytesTotal=b;this.contentLoaderInfo.dispatchEvent(c)},__class__:If});var bk=function(){this.frameRate=this.height=this.width=-1;ma.call(this);this.applicationDomain=wo.currentDomain;this.bytesTotal=
this.bytesLoaded=0;this.childAllowsParent=!0;this.parameters={}};t["openfl.display.LoaderInfo"]=bk;bk.__name__="openfl.display.LoaderInfo";bk.create=function(a){var b=new bk;b.uncaughtErrorEvents=new kv;a!=null?b.loader=a:b.url=bk.__rootURL;return b};bk.__super__=ma;bk.prototype=I(ma.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 na("complete")))},__update:function(a,b){this.bytesLoaded=a;this.bytesTotal=b;this.dispatchEvent(new zh("progress",!1,!1,a,b))},__class__:bk});var ik=function(){Da.call(this);this.__enabled=
!0};t["openfl.display.MovieClip"]=ik;ik.__name__="openfl.display.MovieClip";ik.fromTimeline=function(a){var b=new ik;b.attachTimeline(a);return b};ik.__super__=Da;ik.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&&(Je.__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 vy("",[],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__:ik,__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 vc=function(a,b){Nh.call(this);this.__context3D=a;this.__context=a.__context;this.__gl=this.gl=a.__context.webgl;this.__defaultRenderTarget=b;this.__flipped=this.__defaultRenderTarget==null;Th.maxTextureWidth==null&&(Th.maxTextureWidth=Th.maxTextureHeight=
this.__gl.getParameter(this.__gl.MAX_TEXTURE_SIZE));this.__matrix=xb._new();this.__values=[];this.__softwareRenderer=new ml(null);this.__type="opengl";this.__setBlendMode(10);this.__context3D.__setGLBlend(!0);this.__clipRects=[];this.__maskObjects=[];this.__numClipRects=0;this.__projection=xb._new();this.__projectionFlipped=xb._new();this.__stencilReference=0;this.__tempRect=new Ha;vc.__staticDefaultDisplayShader==null&&(vc.__staticDefaultDisplayShader=new $u);vc.__staticDefaultGraphicsShader==null&&
(vc.__staticDefaultGraphicsShader=new $f);vc.__staticMaskShader==null&&(vc.__staticMaskShader=new Ym);this.__defaultDisplayShader=vc.__staticDefaultDisplayShader;this.__defaultGraphicsShader=vc.__staticDefaultGraphicsShader;this.__defaultShader=this.__defaultDisplayShader;this.__initShader(this.__defaultShader);this.__scrollRectMasks=new dc(function(){return new Jd});this.__maskShader=vc.__staticMaskShader};t["openfl.display.OpenGLRenderer"]=vc;vc.__name__="openfl.display.OpenGLRenderer";vc.__super__=
Nh;vc.prototype=I(Nh.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){vc.__alphaValue[0]=a*this.__worldAlpha;this.__currentShaderBuffer!=null?this.__currentShaderBuffer.addFloatOverride("openfl_Alpha",vc.__alphaValue):this.__currentShader!=null&&this.__currentShader.__alpha!=null&&(this.__currentShader.__alpha.value=vc.__alphaValue)},applyBitmapData:function(a,b,c){c==
null&&(c=!1);this.__currentShaderBuffer!=null?a!=null&&(vc.__textureSizeValue[0]=a.__textureWidth,vc.__textureSizeValue[1]=a.__textureHeight,this.__currentShaderBuffer.addFloatOverride("openfl_TextureSize",vc.__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?(vc.__textureSizeValue[0]=a.__textureWidth,vc.__textureSizeValue[1]=a.__textureHeight,this.__currentShader.__textureSize.value=vc.__textureSizeValue):this.__currentShader.__textureSize.value=null))},applyColorTransform:function(a){var b=a!=null&&!a.__isDefault(!0);
this.applyHasColorTransform(b);b?(a.__setArrays(vc.__colorMultipliersValue,vc.__colorOffsetsValue),this.__currentShaderBuffer!=null?(this.__currentShaderBuffer.addFloatOverride("openfl_ColorMultiplier",vc.__colorMultipliersValue),this.__currentShaderBuffer.addFloatOverride("openfl_ColorOffset",vc.__colorOffsetsValue)):this.__currentShader!=null&&(this.__currentShader.__colorMultiplier!=null&&(this.__currentShader.__colorMultiplier.value=vc.__colorMultipliersValue),this.__currentShader.__colorOffset!=
null&&(this.__currentShader.__colorOffset.value=vc.__colorOffsetsValue))):this.__currentShaderBuffer!=null?(this.__currentShaderBuffer.addFloatOverride("openfl_ColorMultiplier",vc.__emptyColorValue),this.__currentShaderBuffer.addFloatOverride("openfl_ColorOffset",vc.__emptyColorValue)):this.__currentShader!=null&&(this.__currentShader.__colorMultiplier!=null&&(this.__currentShader.__colorMultiplier.value=vc.__emptyColorValue),this.__currentShader.__colorOffset!=null&&(this.__currentShader.__colorOffset.value=
vc.__emptyColorValue))},applyHasColorTransform:function(a){vc.__hasColorTransformValue[0]=a;this.__currentShaderBuffer!=null?this.__currentShaderBuffer.addBoolOverride("openfl_HasColorTransform",vc.__hasColorTransformValue):this.__currentShader!=null&&this.__currentShader.__hasColorTransform!=null&&(this.__currentShader.__hasColorTransform.value=vc.__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),xb.set(this.__matrix,0,a[0]),xb.set(this.__matrix,1,a[1]),xb.set(this.__matrix,2,a[2]),xb.set(this.__matrix,3,a[3]),xb.set(this.__matrix,4,a[4]),xb.set(this.__matrix,5,a[5]),xb.set(this.__matrix,6,a[6]),xb.set(this.__matrix,7,a[7]),xb.set(this.__matrix,8,a[8]),xb.set(this.__matrix,9,a[9]),xb.set(this.__matrix,10,a[10]),xb.set(this.__matrix,11,a[11]),xb.set(this.__matrix,
12,a[12]),xb.set(this.__matrix,13,a[13]),xb.set(this.__matrix,14,a[14]),xb.set(this.__matrix,15,a[15])):(xb.identity(this.__matrix),xb.set(this.__matrix,0,a.a),xb.set(this.__matrix,1,a.b),xb.set(this.__matrix,4,a.c),xb.set(this.__matrix,5,a.d),xb.set(this.__matrix,12,a.tx),xb.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=hb.__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);xb.identity(this.__matrix);xb.set(this.__matrix,0,c.a);xb.set(this.__matrix,1,c.b);xb.set(this.__matrix,4,c.c);xb.set(this.__matrix,5,c.d);xb.set(this.__matrix,12,c.tx);xb.set(this.__matrix,13,c.ty);xb.append(this.__matrix,this.__flipped?this.__projectionFlipped:this.__projection);this.__values[0]=xb.get(this.__matrix,0);this.__values[1]=xb.get(this.__matrix,1);this.__values[2]=xb.get(this.__matrix,
2);this.__values[3]=xb.get(this.__matrix,3);this.__values[4]=xb.get(this.__matrix,4);this.__values[5]=xb.get(this.__matrix,5);this.__values[6]=xb.get(this.__matrix,6);this.__values[7]=xb.get(this.__matrix,7);this.__values[8]=xb.get(this.__matrix,8);this.__values[9]=xb.get(this.__matrix,9);this.__values[10]=xb.get(this.__matrix,10);this.__values[11]=xb.get(this.__matrix,11);this.__values[12]=xb.get(this.__matrix,12);this.__values[13]=xb.get(this.__matrix,13);this.__values[14]=xb.get(this.__matrix,
14);this.__values[15]=xb.get(this.__matrix,15);hb.__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 Ha);var c=hb.__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);
hb.__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?vc.__scissorRectangle.setTo(this.__offsetX/
this.__pixelRatio,this.__offsetY/this.__pixelRatio,this.__displayWidth/this.__pixelRatio,this.__displayHeight/this.__pixelRatio):vc.__scissorRectangle.setTo(this.__offsetX,this.__offsetY,this.__displayWidth,this.__displayHeight),this.__context3D.setScissorRectangle(vc.__scissorRectangle),this.__upscaled=this.__worldTransform.a!=1||this.__worldTransform.d!=1,this.__renderDrawable(a),this.__offsetX>0||this.__offsetY>0)this.__offsetX>0&&(vc.__scissorRectangle.setTo(0,0,this.__offsetX,this.__height),
this.__context3D.setScissorRectangle(vc.__scissorRectangle),this.__context3D.__flushGL(),this.__gl.clearColor(0,0,0,1),this.__gl.clear(this.__gl.COLOR_BUFFER_BIT),vc.__scissorRectangle.setTo(this.__offsetX+this.__displayWidth,0,this.__width,this.__height),this.__context3D.setScissorRectangle(vc.__scissorRectangle),this.__context3D.__flushGL(),this.__gl.clearColor(0,0,0,1),this.__gl.clear(this.__gl.COLOR_BUFFER_BIT)),this.__offsetY>0&&(vc.__scissorRectangle.setTo(0,0,this.__width,this.__offsetY),this.__context3D.setScissorRectangle(vc.__scissorRectangle),
this.__context3D.__flushGL(),this.__gl.clearColor(0,0,0,1),this.__gl.clear(this.__gl.COLOR_BUFFER_BIT),vc.__scissorRectangle.setTo(0,this.__offsetY+this.__displayHeight,this.__width,this.__height),this.__context3D.setScissorRectangle(vc.__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?vc.__scissorRectangle.setTo(this.__offsetX/
this.__pixelRatio,this.__offsetY/this.__pixelRatio,this.__displayWidth/this.__pixelRatio,this.__displayHeight/this.__pixelRatio):vc.__scissorRectangle.setTo(this.__offsetX,this.__offsetY,this.__displayWidth,this.__displayHeight);this.__context3D.setScissorRectangle(vc.__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:lv.renderDrawable(a,
this);break;case 2:bj.renderDrawable(a,this);break;case 3:ol.renderDrawable(a,this);break;case 4:case 5:mv.renderDrawable(a,this);break;case 6:nv.renderDrawable(a,this);break;case 7:pl.renderDrawable(a,this);break;case 8:cj.renderDrawable(a,this);break;case 9:Ja.renderDrawable(a,this)}},__renderDrawableMask:function(a){if(a!=null)switch(a.__drawableType){case 0:lv.renderDrawableMask(a,this);break;case 2:bj.renderDrawableMask(a,this);break;case 3:ol.renderDrawableMask(a,this);break;case 4:case 5:mv.renderDrawableMask(a,
this);break;case 6:nv.renderDrawableMask(a,this);break;case 7:pl.renderDrawableMask(a,this);break;case 8:cj.renderDrawableMask(a,this);break;case 9:Ja.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;xb.createOrtho(this.__projection,0,this.__displayWidth+this.__offsetX*2,0,this.__displayHeight+this.__offsetY*2,-1E3,1E3);xb.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);vc.__scissorRectangle.setTo(b,c,d,f);this.__context3D.setScissorRectangle(vc.__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__:vc});var py=function(a){a==null&&(a=!1);this.fastCompression=a};t["openfl.display.PNGEncoderOptions"]=py;py.__name__="openfl.display.PNGEncoderOptions";py.prototype={fastCompression:null,__class__:py};var Wq=function(a){this.onComplete=new kf;this.display=a;a!=null&&(a.addEventListener("unload",m(this,this.display_onUnload)),La.get_current().addChild(a))};t["openfl.display.Preloader"]=Wq;Wq.__name__="openfl.display.Preloader";Wq.prototype={onComplete:null,complete:null,display:null,
ready:null,start:function(){this.ready=!0;La.get_current().get_loaderInfo().__complete();if(this.display!=null){var a=new na("complete",!0,!0);this.display.dispatchEvent(a);a.isDefaultPrevented()||this.display.dispatchEvent(new na("unload"))}else this.complete||(this.complete=!0,this.onComplete.dispatch())},update:function(a,b){La.get_current().get_loaderInfo().__update(a,b);this.display!=null&&this.display.dispatchEvent(new zh("progress",!0,!0,a,b))},display_onUnload:function(a){this.display!=null&&
(this.display.removeEventListener("unload",m(this,this.display_onUnload)),this.display.parent==La.get_current()&&La.get_current().removeChild(this.display),La.get_current().stage.set_focus(null),this.display=null);this.ready&&!this.complete&&(this.complete=!0,this.onComplete.dispatch())},__class__:Wq};var ov=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 Jd;
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 Jd;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=La.getTimer()+100;this.endAnimation=this.startAnimation+
1E3;this.addEventListener("addedToStage",m(this,this.this_onAddedToStage))};t["openfl.display.DefaultPreloader"]=ov;ov.__name__="openfl.display.DefaultPreloader";ov.__super__=Da;ov.prototype=I(Da.prototype,{endAnimation:null,outline:null,progress:null,startAnimation:null,getBackgroundColor:function(){var a=La.get_current().stage.window.context.attributes;return Object.prototype.hasOwnProperty.call(a,"background")&&a.background!=null?a.background:0},getHeight:function(){var a=La.get_current().stage.window.__height;
return a>0?a:La.get_current().stage.stageHeight},getWidth:function(){var a=La.get_current().stage.window.__width;return a>0?a:La.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 na("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=(La.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__:ov});var vy=function(a,b,c){this.name=a;this.labels=b;this.numFrames=c};t["openfl.display.Scene"]=vy;vy.__name__="openfl.display.Scene";vy.prototype={labels:null,name:null,numFrames:null,__class__:vy};var Yz={_new:function(a){return{}}},Ys=function(){this.channels=0;this.filter=5;this.index=this.height=
0;this.mipFilter=2;this.wrap=this.width=0};t["openfl.display.ShaderInput"]=Ys;Ys.__name__="openfl.display.ShaderInput";Ys.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__:Ys};var Hn=function(){this.index=0};t["openfl.display.ShaderParameter"]=Hn;Hn.__name__="openfl.display.ShaderParameter";Hn.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];Ad.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];Ad.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],Ad.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;Ad.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;Ad.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,Ad.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];Ad.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];Ad.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],Ad.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__:Hn,__properties__:{set_name:"set_name"}};var Jd=function(){ka.call(this);this.__drawableType=3};t["openfl.display.Shape"]=
Jd;Jd.__name__="openfl.display.Shape";Jd.__super__=ka;Jd.prototype=I(ka.prototype,{get_graphics:function(){this.__graphics==null&&(this.__graphics=new Th(this));return this.__graphics},__class__:Jd,__properties__:I(ka.prototype.__properties__,{get_graphics:"get_graphics"})});var xo=function(a,b,c,d){Ia.call(this);this.__drawableType=6;this.enabled=!0;this.trackAsMenu=!1;this.useHandCursor=!0;this.__upState=a!=null?a:new ka;this.__overState=b;this.__downState=c;this.set_hitTestState(d!=null?d:new ka);
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);xo.__constructor!=null&&(a=xo.__constructor,xo.__constructor=null,a(this))};t["openfl.display.SimpleButton"]=xo;xo.__name__="openfl.display.SimpleButton";xo.__super__=Ia;xo.prototype=
I(Ia.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){Ia.prototype.__getBounds.call(this,a,b);var c=hb.__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);hb.__pool.release(c)},__getRenderBounds:function(a,b){if(this.__scrollRect!=null)Ia.prototype.__getRenderBounds.call(this,a,b);else if(Ia.prototype.__getBounds.call(this,a,b),this.__currentState!=null){var c=hb.__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);hb.__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){Ia.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(){Ia.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){Ia.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){Ia.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 ri);return new ri(this.__soundTransform.volume,this.__soundTransform.pan)},set_soundTransform:function(a){this.__soundTransform=new ri(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);ka.__supportDOM&&this.__previousStates==null&&(this.__previousStates=ub.toObjectVector(null));if(a!=this.__currentState){if(ka.__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__:xo,__properties__:I(Ia.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 dd=function(a,b){this.__oldStageOrientation=3;Ab.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 hb;this.__displayRect=new Ha;this.__renderDirty=!0;this.stage3Ds=ub.toObjectVector(null);this.stage3Ds.push(new Zm(this));this.stage3Ds.push(new Zm(this));this.stage3Ds.push(new Zm(this));this.stage3Ds.push(new Zm(this));this.stage=this;this.align=6;this.allowsFullScreenInteractive=this.allowsFullScreen=!0;this.__quality=1;this.__scaleMode=
2;this.showDefaultContextMenu=!0;this.softKeyboardRect=new Ha;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 Qd;La.get_current().__loaderInfo==null&&(La.get_current().__loaderInfo=bk.create(null),La.get_current().__loaderInfo.content=La.get_current());this.__uncaughtErrorEvents=
La.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();La.get_current().stage==null&&this.stage.addChild(La.get_current())};t["openfl.display.Stage"]=dd;dd.__name__="openfl.display.Stage";dd.__interfaces__=[qa];dd.__properties__={get_supportsOrientationChange:"get_supportsOrientationChange"};dd.get_supportsOrientationChange=function(){return!1};dd.__super__=
Ab;dd.prototype=I(Ab.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(ka.__broadcastEvents.h,a.type))for(var b=ka.__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=Z.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 ml(this.window.context.canvas2D);break;case "dom":this.__renderer=new uq(this.window.context.dom);
break;case "opengl":case "opengles":case "webgl":this.context3D=new Yc(this),this.context3D.configureBackBuffer(this.stageWidth,this.stageHeight,0,!0,!0,!0),this.context3D.present(),this.__renderer=new vc(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=
Ab.prototype.__dispatchEvent.call(this,a)}catch(c){Pb.lastError=c,a=Z.caught(c).unwrap(),this.__handleError(a),b=!1}else b=Ab.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=Z.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=Z.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 Bl("uncaughtError",!0,!0,a);La.get_current().__loaderInfo.uncaughtErrorEvents.dispatchEvent(b);if(!b.__preventDefault){b=Gi.toString(Gi.exceptionStack());console.log(b);b=F.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=Gi.toString(Gi.callStack());console.log(c)}}catch(d){Pb.lastError=d}throw a;}},__onKey:function(a,b,c){this.__dispatchPendingMouseEvent();
Hc.__altKey=xc.get_altKey(c);Hc.__commandKey=xc.get_metaKey(c);Hc.__controlKey=xc.get_ctrlKey(c);Hc.__ctrlKey=this.__macKeyboard?xc.get_ctrlKey(c)||xc.get_metaKey(c):xc.get_ctrlKey(c);Hc.__shiftKey=xc.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=Cb.__getCharCode(b,xc.get_shiftKey(c),xc.get_capsLock(c));if(a=="keyUp"&&(b==32||b==13)&&this.__focus instanceof Da){var h=x.__cast(this.__focus,Da);if(h.get_buttonMode()&&h.focusRect==1){var n=Ca.__pool.get(),l=Ca.__pool.get();l.x=this.__mouseX;l.y=this.__mouseY;h=Hc.__create("click",0,0,this.__mouseX,this.__mouseY,h.__globalToLocal(l,n),h);this.__dispatchStack(h,d);h.__updateAfterEventFlag&&this.__renderAfterEvent();Ca.__pool.release(l);Ca.__pool.release(n)}}f=new $m(a,
!0,!0,g,b,f,this.__macKeyboard?xc.get_ctrlKey(c)||xc.get_metaKey(c):xc.get_ctrlKey(c),xc.get_altKey(c),xc.get_shiftKey(c),xc.get_ctrlKey(c),xc.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=xc.get_shiftKey(c)?-1:1;if(d.length>1){Kf.sort(d,function(q,v){return q.get_tabIndex()-v.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;xc.get_shiftKey(c)?l>=0:l<g.get_numChildren();){h=g.getChildAt(l);if(h instanceof Ia&&(n=x.__cast(h,Ia),n=d.indexOf(n),n!=-1)){b=0;break}l+=b}}else xc.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 Fj("keyFocusChange",!0,!0,a,xc.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 Ic)&&(this.__macKeyboard?xc.get_ctrlKey(c)||xc.get_metaKey(c):xc.get_ctrlKey(c))&&!xc.get_altKey(c)&&!xc.get_shiftKey(c))switch(b){case 65:c=new na("selectAll",!0,!0);this.get_focus().dispatchEvent(c);break;case 67:c=new na("copy",!0,!0);this.get_focus().dispatchEvent(c);break;case 86:c=new na("paste",!0,!0);this.get_focus().dispatchEvent(c);break;case 88:c=new na("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 v=this;a.onFullscreen.add(function(){v.__onLimeWindowFullscreen(a)});var w=this;g=function(Ra,wb){w.__onLimeKeyDown(a,Ra,wb)};a.onKeyDown.add(g);var z=this;g=function(Ra,wb){z.__onLimeKeyUp(a,Ra,wb)};a.onKeyUp.add(g);var r=this;a.onLeave.add(function(){r.__onLimeWindowLeave(a)});var G=this;a.onMinimize.add(function(){G.__onLimeWindowMinimize(a)});
var J=this;g=function(Ra,wb,cb){J.__onLimeMouseDown(a,Ra,wb,cb)};a.onMouseDown.add(g);var L=this;g=function(Ra,wb){L.__onLimeMouseMove(a,Ra,wb)};a.onMouseMove.add(g);var P=this;g=function(Ra,wb){P.__onLimeMouseMoveRelative(a,Ra,wb)};a.onMouseMoveRelative.add(g);var V=this;g=function(Ra,wb,cb){V.__onLimeMouseUp(a,Ra,wb,cb)};a.onMouseUp.add(g);var ia=this;g=function(Ra,wb,cb){ia.__onLimeMouseWheel(a,Ra,wb,cb)};a.onMouseWheel.add(g);var ea=this;g=function(Ra,wb){ea.__onLimeWindowMove(a,Ra,wb)};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 ra=this;g=function(Ra,wb){ra.__onLimeWindowResize(a,Ra,wb)};a.onResize.add(g);var za=this;a.onRestore.add(function(){za.__onLimeWindowRestore(a)});var fb=this;g=function(Ra,wb,cb){fb.__onLimeTextEdit(a,Ra,wb,cb)};a.onTextEdit.add(g);var eb=this;g=function(Ra){eb.__onLimeTextInput(a,Ra)};a.onTextInput.add(g);this.__onLimeWindowCreate(a)}},
__onLimeGamepadAxisMove:function(a,b,c){if(this.__uncaughtErrorEvents.__enabled)try{Sc.__onGamepadAxisMove(a,b,c)}catch(d){Pb.lastError=d,a=Z.caught(d).unwrap(),this.__handleError(a)}else Sc.__onGamepadAxisMove(a,b,c)},__onLimeGamepadButtonDown:function(a,b){if(this.__uncaughtErrorEvents.__enabled)try{Sc.__onGamepadButtonDown(a,b)}catch(c){Pb.lastError=c,a=Z.caught(c).unwrap(),this.__handleError(a)}else Sc.__onGamepadButtonDown(a,b)},__onLimeGamepadButtonUp:function(a,b){if(this.__uncaughtErrorEvents.__enabled)try{Sc.__onGamepadButtonUp(a,
b)}catch(c){Pb.lastError=c,a=Z.caught(c).unwrap(),this.__handleError(a)}else Sc.__onGamepadButtonUp(a,b)},__onLimeGamepadConnect:function(a){if(this.__uncaughtErrorEvents.__enabled)try{Sc.__onGamepadConnect(a)}catch(h){Pb.lastError=h;var b=Z.caught(h).unwrap();this.__handleError(b)}else Sc.__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{Sc.__onGamepadDisconnect(a)}catch(b){Pb.lastError=b,a=Z.caught(b).unwrap(),this.__handleError(a)}else Sc.__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 na("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==
am.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 an("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 na("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 na("enterFrame")),this.__broadcastEvent(new na("frameConstructed")),this.__broadcastEvent(new na("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 Gg("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 na("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 na("activate"),this.__broadcastEvent(a),
this.set_focus(this.__cacheFocus))},__onLimeWindowFocusOut:function(a){this.window!=null&&this.window==a&&(this.__primaryTouch=null,a=new na("deactivate"),this.__broadcastEvent(a),a=this.get_focus(),this.set_focus(null),this.__cacheFocus=a,Hc.__altKey=!1,Hc.__commandKey=!1,Hc.__ctrlKey=!1,Hc.__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 Lj("fullScreen",
!1,!1,!0,!0))))},__onLimeWindowLeave:function(a){this.window==null||this.window!=a||Hc.__buttonDown||(this.__dispatchPendingMouseEvent(),a=new na("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 Lj("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 Lj("fullScreen",!1,!1,!1,!0)))},__onMouse:function(a,b,c,d){if(!(d>2)){this.__untransformedMouseX=b;this.__untransformedMouseY=c;var f=Ca.__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 Fj("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=Hc.__buttonDown=!0;break;case "mouseUp":this.__mouseDownLeft!=null&&(Hc.__buttonDown=!1,this.__mouseDownLeft==g?h="click":(n=Hc.__create("releaseOutside",1,0,this.__mouseX,this.__mouseY,new Ca(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=Ca.__pool.get();a!=null&&(n=Hc.__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=Hc.__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=La.getTimer(),a-this.__lastClickTime<500&&g==this.__lastClickTarget?(n=Hc.__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(zd.__cursor=="auto"&&!zd.__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(hh.toLimeCursor(n));break}n==null&&this.window!=null&&this.window.set_cursor(fd.ARROW)}g!=this.__mouseOverTarget&&this.__mouseOverTarget!=null&&(n=Hc.__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?(U.remove(this.__rollOutStack,h),h.hasEventListener("rollOut")&&(n=Hc.__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=Hc.__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=Hc.__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);Ca.__pool.release(f);Ca.__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=Ca.__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=Hc.__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();
Ca.__pool.release(c)},__onTouch:function(a,b,c){var d=Ca.__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=bn.__pool.get(),q.reset(),q.touch=b,this.__touchData.h[l]=q;var v=null,w=!1;switch(a){case "touchBegin":q.touchDownTarget=n;break;case "touchEnd":q.touchDownTarget==n&&(v="touchTap"),q.touchDownTarget=null,w=!0}var z=Ca.__pool.get();a=Wf.__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();v!=null&&(a=Wf.__create(v,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());v=q.touchOverTarget;n!=v&&v!=null&&(a=Wf.__create("touchOut",null,f,g,v.__globalToLocal(d,z),v),a.touchPointID=l,a.isPrimaryTouchPoint=c,a.pressure=b.pressure,this.__dispatchTarget(v,a),a.__updateAfterEventFlag&&this.__renderAfterEvent());for(var r=q.rollOutStack,G,J=0;J<r.length;)G=r[J],h.indexOf(G)==-1?(U.remove(r,G),a=Wf.__create("touchRollOut",null,
f,g,v.__globalToLocal(d,z),v),a.touchPointID=l,a.isPrimaryTouchPoint=c,a.bubbles=!1,a.pressure=b.pressure,this.__dispatchTarget(G,a),a.__updateAfterEventFlag&&this.__renderAfterEvent()):++J;for(J=0;J<h.length;)G=h[J],++J,r.indexOf(G)==-1&&(G.hasEventListener("touchRollOver")&&(a=Wf.__create("touchRollOver",null,f,g,v.__globalToLocal(d,z),G),a.touchPointID=l,a.isPrimaryTouchPoint=c,a.bubbles=!1,a.pressure=b.pressure,this.__dispatchTarget(G,a),a.__updateAfterEventFlag&&this.__renderAfterEvent()),G.hasEventListener("touchRollOut")&&
r.push(G));n!=v&&(n!=null&&(a=Wf.__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);Ca.__pool.release(d);Ca.__pool.release(z);w&&(this.__touchData.remove(l),q.reset(),bn.__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=rf.devices.iterator();a.hasNext();){var b=a.next();this.__onLimeGamepadConnect(b)}rf.onConnect.add(m(this,this.__onLimeGamepadConnect));Te.onStart.add(m(this,this.__onLimeTouchStart));Te.onMove.add(m(this,this.__onLimeTouchMove));Te.onEnd.add(m(this,this.__onLimeTouchEnd));Te.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 na("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 Ha;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=Ca.__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,Ca.__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));rf.onConnect.remove(m(this,this.__onLimeGamepadConnect));Te.onStart.remove(m(this,this.__onLimeTouchStart));Te.onMove.remove(m(this,this.__onLimeTouchMove));Te.onEnd.remove(m(this,this.__onLimeTouchEnd));Te.onCancel.remove(m(this,this.__onLimeTouchCancel))},__update:function(a,b){a?this.__transformDirty&&
(Ab.prototype.__update.call(this,!0,b),b&&(this.__transformDirty=!1)):this.__transformDirty||this.__renderDirty?(Ab.prototype.__update.call(this,!1,b),b&&ka.__supportDOM&&(this.__wasDirty=!0)):!this.__renderDirty&&this.__wasDirty&&(Ab.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 Fj("focusOut",!0,!1,a,!1,0),d=[];b.__getInteractive(d);d.reverse();this.__dispatchStack(c,d)}a!=null&&(c=new Fj("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 ub.toNullVector(null)},get_tabEnabled:function(){return!1},set_tabEnabled:function(a){throw new pb("Error: The Stage class does not implement this property or method.");},get_tabIndex:function(){return-1},set_tabIndex:function(a){throw new pb("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__:dd,__properties__:I(Ab.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 Zm=function(a){ma.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"]=Zm;Zm.__name__="openfl.display.Stage3D";Zm.__super__=ma;Zm.prototype=I(ma.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,Ec.delay(m(this,this.__dispatchCreate),1)):this.__contextRequested||(this.__contextRequested=!0,Ec.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 Yc(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=Ty.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 Yc(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 Yc(a,a.context3D.__contextState,this));this.__dispatchCreate()}else this.__dispatchError()},__dispatchError:function(){this.__contextRequested=!1;this.dispatchEvent(new xg("error",!1,!1,"Context3D not available"))},__dispatchCreate:function(){this.__contextRequested&&(this.__contextRequested=!1,this.dispatchEvent(new na("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(ub.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__:Zm,__properties__:{set_y:"set_y",get_y:"get_y",set_x:"set_x",get_x:"get_x"}});var dm=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 hb;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"]=dm;dm.__name__="openfl.display.Tile";dm.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 dm(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 Ha;this.__findTileRect(b);var c=hb.__pool.get();
if(a!=null&&a!=this){c.copyFrom(this.__getWorldTransform());var d=hb.__pool.get();d.copyFrom(a.__getWorldTransform());d.invert();c.concat(d);hb.__pool.release(d)}else c.identity();this.__getBounds(b,c);hb.__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 xq?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=Ha.__pool.get();this.__findTileRect(a);this.__getBounds(a,this.get_matrix());var b=a.height;Ha.__pool.release(a);return b},set_height:function(a){var b=Ha.__pool.get();this.__findTileRect(b);b.height!=0&&this.set_scaleY(a/b.height);Ha.__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=Ha.__pool.get();this.__findTileRect(a);this.__getBounds(a,this.get_matrix());var b=a.width;Ha.__pool.release(a);return b},set_width:function(a){var b=Ha.__pool.get();this.__findTileRect(b);b.width!=0&&this.set_scaleX(a/b.width);Ha.__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__:dm,__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 yo=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);dm.call(this,-1,a,b,c,d,f,g,h);this.__tiles=[];this.__length=0};t["openfl.display.TileContainer"]=yo;yo.__name__="openfl.display.TileContainer";yo.__interfaces__=[wq];yo.__super__=dm;yo.prototype=I(dm.prototype,{__tiles:null,addTile:function(a){if(a==null)return null;a.parent==this&&(U.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&&(U.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 yo,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 Ha,
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,U.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&&(U.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=Ha.__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;Ha.__pool.release(a);return c},set_height:function(a){for(var b=Ha.__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);Ha.__pool.release(b);return a},get_width:function(){for(var a=Ha.__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;Ha.__pool.release(a);return c},set_width:function(a){for(var b=Ha.__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);Ha.__pool.release(b);return a},__class__:yo,__properties__:I(dm.prototype.__properties__,{get_numTiles:"get_numTiles"})});var xq=function(a,b,c,d){d==null&&(d=!0);ka.call(this);this.__drawableType=9;this.__tileset=c;this.smoothing=d;this.tileColorTransformEnabled=this.tileBlendModeEnabled=
this.tileAlphaEnabled=!0;this.__group=new yo;this.__group.set_tileset(c);this.__width=a;this.__height=b};t["openfl.display.Tilemap"]=xq;xq.__name__="openfl.display.Tilemap";xq.__interfaces__=[wq];xq.__super__=ka;xq.prototype=I(ka.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=Ha.__pool.get();c.setTo(0,0,this.__width,this.__height);c.__transform(c,b);a.__expand(c.x,c.y,c.width,c.height);Ha.__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__:xq,__properties__:I(ka.prototype.__properties__,{set_tileset:"set_tileset",get_tileset:"get_tileset",get_numTiles:"get_numTiles"})});var wy=function(a,b){this.__bitmapData=a;this.rectData=ub.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"]=
wy;wy.__name__="openfl.display.Tileset";wy.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 pv(a);a.__update(this.__bitmapData);this.__data.push(a);return this.__data.length-1},clone:function(){for(var a=new wy(this.__bitmapData,null),b=Ha.__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)}Ha.__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 Ha(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__:wy,__properties__:{get_numRects:"get_numRects",set_bitmapData:"set_bitmapData",get_bitmapData:"get_bitmapData"}};var pv=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"]=pv;pv.__name__="openfl.display.TileData";pv.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__:pv};var sz=function(){this.__totalFrames=this.__framesLoaded=1;this.__currentLabels=[];this.__currentFrame=1;this.__lastFrameUpdate=this.__lastFrameScriptEval=-1};t["openfl.display.Timeline"]=sz;sz.__name__="openfl.display.Timeline";
sz.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 Qd),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 Qd,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 Db("Error #2109: Frame label "+a+" not found in scene.");}throw Z.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__:sz};var tq=function(a,b){rm.call(this,a,b);this.stage=new dd(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"]=tq;tq.__name__="openfl.display.Window";tq.__super__=rm;tq.prototype=I(rm.prototype,{close:function(){rm.prototype.close.call(this);this.onClose.canceled||this.stage==null||(this.application.removeModule(this.stage),
this.stage=null)},__class__:tq});var zo=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"]=zo;zo.__name__="openfl.display._internal.AbstractNoise";zo.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 v=a.getPixel32(h-c,d),w=v>>8&255,z=v&255;f=(h-c)/f;l=this.mixI(v>>16&255,l,f);q=this.mixI(w,q,f);b=this.mixI(z,b,f)}n-g<d&&(v=a.getPixel32(c,n-d),w=v>>8&255,z=v&255,f=(n-d)/g,l=this.mixI(v>>16&255,l,f),q=this.mixI(w,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__:zo};var qv=function(){};t["openfl.display._internal.CairoBitmap"]=qv;qv.__name__="openfl.display._internal.CairoBitmap";qv.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=ay.createForSurface(f),ay.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)}}};qv.renderDrawable=function(a,b){};qv.renderDrawableMask=function(a,b){b.cairo.rectangle(0,0,a.get_width(),a.get_height())};var tz=function(){};t["openfl.display._internal.CairoBitmapData"]=tz;tz.__name__="openfl.display._internal.CairoBitmapData";tz.renderDrawable=function(a,b){};
tz.renderDrawableMask=function(a,b){};var rv=function(){};t["openfl.display._internal.CairoDisplayObject"]=rv;rv.__name__="openfl.display._internal.CairoDisplayObject";rv.render=function(a,b){};rv.renderDrawable=function(a,b){};rv.renderDrawableMask=function(a,b){};var uz=function(){};t["openfl.display._internal.CairoDisplayObjectContainer"]=uz;uz.__name__="openfl.display._internal.CairoDisplayObjectContainer";uz.renderDrawable=function(a,b){};uz.renderDrawableMask=function(a,b){};var sv=function(){};
t["openfl.display._internal.CairoGraphics"]=sv;sv.__name__="openfl.display._internal.CairoGraphics";sv.hitTest=function(a,b,c){return!1};sv.render=function(a,b){};sv.renderMask=function(a,b){};var vz=function(){this.scale9MinX=this.scale9MinY=this.scale9MaxX=this.scale9MaxY=this.unscaledMinX=this.unscaledMinY=this.unscaledMaxX=this.unscaledMaxY=null};t["openfl.display._internal._CairoGraphics.Scale9GridBounds"]=vz;vz.__name__="openfl.display._internal._CairoGraphics.Scale9GridBounds";vz.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__:vz};var tv=function(){};t["openfl.display._internal.CairoShape"]=tv;tv.__name__="openfl.display._internal.CairoShape";tv.render=function(a,b){};tv.renderDrawable=function(a,b){};tv.renderDrawableMask=function(a,b){};var wz=function(){};t["openfl.display._internal.CairoSimpleButton"]=
wz;wz.__name__="openfl.display._internal.CairoSimpleButton";wz.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))};wz.renderDrawableMask=function(a,b){b.__renderDrawableMask(a.__currentState)};var uv=function(){};t["openfl.display._internal.CairoTextField"]=uv;uv.__name__="openfl.display._internal.CairoTextField";uv.render=function(a,b,c){};uv.renderDrawable=function(a,
b){};uv.renderDrawableMask=function(a,b){};var cn=function(){};t["openfl.display._internal.CairoTilemap"]=cn;cn.__name__="openfl.display._internal.CairoTilemap";cn.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=Ha.__pool.get();d.setTo(0,0,a.__width,a.__height);b.__pushMaskRect(d,a.__renderTransform);cn.renderTileContainer(a.__group,b,a.__renderTransform,a.__tileset,
b.__allowSmoothing&&a.smoothing,a.tileAlphaEnabled,c,a.tileBlendModeEnabled,a.__worldBlendMode,null,null,null,d,uf._new());b.__popMaskRect();b.__popMaskObject(a);Ha.__pool.release(d)}}};cn.renderTileContainer=function(a,b,c,d,f,g,h,n,l,q,v,w,z,r){var G=b.cairo,J=hb.__pool.get();a=a.__tiles;for(var L,P,V,ia=null,ea,ra=0;ra<a.length;)if(ea=a[ra],++ra,J.setTo(1,0,0,1,-ea.get_originX(),-ea.get_originY()),J.concat(ea.get_matrix()),J.concat(c),L=ea.get_tileset()!=null?ea.get_tileset():d,P=ea.get_alpha()*
h,(V=ea.get_visible())&&!(P<=0))if(g||(P=1),n&&(ia=ea.__blendMode!=null?ea.__blendMode:l),ea.__length>0)cn.renderTileContainer(ea,b,J,L,f,g,P,n,ia,q,v,w,z,r);else if(L!=null){V=ea.get_id();if(V==-1){if(ea=ea.__rect,ea==null||ea.width<=0||ea.height<=0)continue}else{ea=L.__data[V];if(ea==null)continue;z.setTo(ea.x,ea.y,ea.width,ea.height);ea=z}L=L.__bitmapData;L!=null&&L.image!=null&&(L!=q&&(v=L.getSurface(),w=ay.createForSurface(v),ay.set_filter(w,f?1:3),G.set_source(w),q=L),n&&b.__setBlendMode(ia),
b.applyMatrix(J,G),r[6]=ea.x,r[7]=ea.y,ay.set_matrix(w,r),G.set_source(w),G.save(),G.newPath(),G.rectangle(0,0,ea.width,ea.height),G.clip(),P==1?G.paint():G.paintWithAlpha(P),G.restore())}hb.__pool.release(J)};cn.renderDrawable=function(a,b){};cn.renderDrawableMask=function(a,b){};var to=function(){};t["openfl.display._internal.CanvasBitmap"]=to;to.__name__="openfl.display._internal.CanvasBitmap";to.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);zb.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)}}};to.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=hb.__pool.get(),n.scale(1/c.__bitmapScaleX,1/c.__bitmapScaleY),n.concat(h),b.setTransform(n,l),l.drawImage(g,0,0,d,f),hb.__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),zb.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);zb.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)};to.renderDrawableMask=function(a,b){b.context.rect(0,0,a.get_width(),a.get_height())};var Uu=function(){};t["openfl.display._internal.CanvasBitmapData"]=Uu;Uu.__name__="openfl.display._internal.CanvasBitmapData";Uu.renderDrawable=function(a,b){if(a.readable){var c=a.image;c.type==ig.DATA&&zb.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)}};Uu.renderDrawableMask=function(a,b){};var bm=function(){};t["openfl.display._internal.CanvasDisplayObject"]=bm;bm.__name__="openfl.display._internal.CanvasDisplayObject";bm.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=hb.__pool.get(),c.scale(1/f.__bitmapScaleX,1/f.__bitmapScaleY),c.concat(l),b.setTransform(c,d),d.drawImage(n,0,0,g,h),hb.__pool.release(c),b.__popMaskObject(a)}}}}};bm.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);zb.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=hb.__pool.get(),d.scale(1/c.__bitmapScaleX,1/c.__bitmapScaleY),d.concat(q),b.setTransform(d,
f),f.drawImage(l,0,0,h,n),hb.__pool.release(d),b.__popMaskObject(a)}}b.__renderEvent(a)};bm.renderDrawableMask=function(a,b){a.__graphics!=null&&C.renderMask(a.__graphics,b)};var Vu=function(){};t["openfl.display._internal.CanvasDisplayObjectContainer"]=Vu;Vu.__name__="openfl.display._internal.CanvasDisplayObjectContainer";Vu.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))&&(bm.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)}};Vu.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 qh=function(){qh.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"]=qh;qh.__name__="openfl.display._internal.DrawCommandBuffer";qh.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 Dj(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=ya.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=ya.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=ya.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=ya.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=ya.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=ya.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=ya.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=ya.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=ya.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=ya.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=ya.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=ya.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=ya.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=ya.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=ya.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=ya.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=ya.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=ya.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=ya.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=ya.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=ya.WINDING_NON_ZERO;this.windingNonZero()}}b.destroy();return a},beginBitmapFill:function(a,b,c,d){this.prepareWrite();this.types.push(ya.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(ya.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(ya.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(ya.BEGIN_SHADER_FILL);this.o.push(a)},clear:function(){this.types=qh.empty.types;this.b=
qh.empty.b;this.i=qh.empty.i;this.f=qh.empty.f;this.o=qh.empty.o;this.ff=qh.empty.ff;this.ii=qh.empty.ii;this.copyOnWrite=!0},copy:function(){var a=new qh;a.append(this);return a},cubicCurveTo:function(a,b,c,d,f,g){this.prepareWrite();this.types.push(ya.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(ya.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(ya.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(ya.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(ya.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(ya.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(ya.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(ya.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(ya.END_FILL)},lineBitmapStyle:function(a,b,c,d){this.prepareWrite();
this.types.push(ya.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(ya.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(ya.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(ya.LINE_TO);this.f.push(a);this.f.push(b)},moveTo:function(a,b){this.prepareWrite();this.types.push(ya.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(ya.OVERRIDE_BLEND_MODE);this.o.push(a)},overrideMatrix:function(a){this.prepareWrite();this.types.push(ya.OVERRIDE_MATRIX);this.o.push(a)},windingEvenOdd:function(){this.prepareWrite();this.types.push(ya.WINDING_EVEN_ODD)},windingNonZero:function(){this.prepareWrite();this.types.push(ya.WINDING_NON_ZERO)},get_length:function(){return this.types.length},__class__:qh,__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=hb.__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);hb.__pool.release(c)}}C.context.stroke();a&&C.context.closePath();C.context.beginPath()}};C.createBitmapFill=function(a,b,c){zb.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=hb.__pool.get(),f.identity(),h=!0);switch(a){case 0:if(g==0){a=Ca.__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=Ca.__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 v=b.length;l<v;){var w=l++;g=d[w]/255;g<0?g=0:g>1&&(g=1);n.addColorStop(g,C.getRGBA(b[w],c[w]))}a!=null&&Ca.__pool.release(a);
q!=null&&Ca.__pool.release(q);h&&hb.__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(v=b.length;l<v;)w=l++,g=d[w]/255,g=z+g*r,g<0?g=0:g>1&&(g=1),n.addColorStop(g,C.getRGBA(b[w],c[w]));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(v=b.length;l<v;)w=l++,g=d[w]/255,g=z+g*r,g<0?g=0:g>1&&(g=.999),n.addColorStop(g,C.getRGBA(b[w],c[w]));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 hb;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=Ca.__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=Ca.__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=Ca.__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;Ca.__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(v=b.length;l<v;)w=l++,g=d[w]/255,g<0?g=0:g>1&&(g=1),n.addColorStop(g,C.getRGBA(b[w],c[w]));a!=null&&Ca.__pool.release(a);q!=null&&Ca.__pool.release(q);h&&hb.__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":F.string(Ua.toFloat(c)))+", "+(d==null?"null":F.string(Ua.toFloat(d)))+", "+(a==null?"null":F.string(Ua.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,v){g==null&&(g=f);f*=.5;g*=.5;f>c/2&&(f=c/2);g>d/2&&(g=d/2);if(h!=null){var w=C.toScale9Position(a,h.x,h.width,n,q),z=C.toScale9Position(b,h.y,h.height,l,v),r=C.toScale9Position(a+c,h.x,h.width,n,q),G=C.toScale9Position(b+d,h.y,
h.height,l,v);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(w),C.applyScale9GridScaledY(z),C.applyScale9GridScaledX(r),C.applyScale9GridScaledY(G);var J=C.toScale9Position(a+f,h.x,h.width,n,q),L=C.toScale9Position(b+g,h.y,h.height,l,v);a=C.toScale9Position(a+c-f,h.x,h.width,n,q);b=C.toScale9Position(b+
d-g,h.y,h.height,l,v);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,G,a,G);C.context.lineTo(J,G);C.context.quadraticCurveTo(w,G,w,b);C.context.lineTo(w,L);C.context.quadraticCurveTo(w,z,J,z)}else w=a+c,d=b+d,z=-f+f*.7071067811865476,r=-f+f*.41421356237309503,G=-g+g*.7071067811865476,J=-g+g*.41421356237309503,C.context.moveTo(w,d-g),C.context.quadraticCurveTo(w,d+J,w+z,d+G),C.context.quadraticCurveTo(w+r,d,w-f,d),
C.context.lineTo(a+f,d),C.context.quadraticCurveTo(a-r,d,a-z,d+G),C.context.quadraticCurveTo(a,d+J,a,d-g),C.context.lineTo(a,b+g),C.context.quadraticCurveTo(a,b-J,a-z,b-G),C.context.quadraticCurveTo(a-r,b,a+f,b),C.context.lineTo(w-f,b),C.context.quadraticCurveTo(w+r,b,w+z,b-G),C.context.quadraticCurveTo(w,b-J,w,b+g),C.context.lineTo(w,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 Dj(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==ya.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=ya.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==ya.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=ya.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==ya.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=ya.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=ya.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=ya.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=ya.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=ya.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=ya.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=ya.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=ya.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=ya.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=ya.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=ya.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=ya.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=ya.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=ya.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=ub.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 v=!1,w=C.graphics.__owner.__scale9Grid,z=w!=null&&!C.graphics.__owner.__isMask&&C.graphics.__worldTransform.b==
0&&C.graphics.__worldTransform.c==0;z||(w=null,C.fillScale9Bounds!=null&&C.fillScale9Bounds.clear(),C.strokeScale9Bounds!=null&&C.strokeScale9Bounds.clear());var r=new Dj(a),G,J,L,P=null,V=null,ia=0,ea=a.types;a:for(;ia<ea.length;){var ra=ea[ia];++ia;switch(ra._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=ya.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 fb=N.hex(0,6);C.context.fillStyle="#"+fb;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 vv);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=ya.BEGIN_FILL;var eb=r;if(eb.buffer.f[eb.fPos]<.005)C.hasFill=!1;else{if(eb.buffer.f[eb.fPos]==1){var Ra=N.hex(eb.buffer.i[eb.iPos]&16777215,6);C.context.fillStyle="#"+Ra}else{var wb=(eb.buffer.i[eb.iPos]&16711680)>>>16;var cb=(eb.buffer.i[eb.iPos]&65280)>>>8;var Tb=eb.buffer.i[eb.iPos]&255;C.context.fillStyle="rgba("+wb+", "+cb+", "+Tb+", "+eb.buffer.f[eb.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=ya.BEGIN_GRADIENT_FILL;var Ib=r;C.context.fillStyle=C.createGradientPattern(Ib.buffer.o[Ib.oPos],Ib.buffer.ii[Ib.iiPos],Ib.buffer.ff[Ib.ffPos],Ib.buffer.ii[Ib.iiPos+1],Ib.buffer.o[Ib.oPos+1],Ib.buffer.o[Ib.oPos+2],Ib.buffer.o[Ib.oPos+3],Ib.buffer.f[Ib.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=ya.BEGIN_SHADER_FILL;var Mb=r,tc=Mb.buffer.o[Mb.oPos];if(tc.inputCount>0){C.bitmapFill=tc.inputs[0];if(C.bitmapFill.readable)C.context.fillStyle=C.createBitmapFill(C.bitmapFill,tc.inputWrap[0]!=0,tc.inputFilter[0]!=5);else{var Bd=N.hex(0,6);C.context.fillStyle="#"+Bd}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=ya.CUBIC_CURVE_TO;var Qb=r;v=!0;if(z){var wd=C.toScale9Position(Qb.buffer.f[Qb.fPos],w.x,w.width,C.bounds.width,C.graphics.__owner.get_scaleX()),Ae=C.toScale9Position(Qb.buffer.f[Qb.fPos+1],w.y,w.height,C.bounds.height,C.graphics.__owner.get_scaleY()),eg=C.toScale9Position(Qb.buffer.f[Qb.fPos+2],w.x,w.width,C.bounds.width,C.graphics.__owner.get_scaleX()),Df=C.toScale9Position(Qb.buffer.f[Qb.fPos+3],w.y,w.height,C.bounds.height,C.graphics.__owner.get_scaleY()),
Ug=C.toScale9Position(Qb.buffer.f[Qb.fPos+4],w.x,w.width,C.bounds.width,C.graphics.__owner.get_scaleX()),Rf=C.toScale9Position(Qb.buffer.f[Qb.fPos+5],w.y,w.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(Ug),C.applyScale9GridScaledY(Rf);C.context.bezierCurveTo(wd-c,Ae-
d,eg-c,Df-d,Ug-c,Rf-d);f=Ug;g=Rf}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=ya.CURVE_TO;var je=r;v=!0;if(z){var ke=C.toScale9Position(je.buffer.f[je.fPos],w.x,w.width,C.bounds.width,C.graphics.__owner.get_scaleX()),
ql=C.toScale9Position(je.buffer.f[je.fPos+1],w.y,w.height,C.bounds.height,C.graphics.__owner.get_scaleY()),rd=C.toScale9Position(je.buffer.f[je.fPos+2],w.x,w.width,C.bounds.width,C.graphics.__owner.get_scaleX()),pe=C.toScale9Position(je.buffer.f[je.fPos+3],w.y,w.height,C.bounds.height,C.graphics.__owner.get_scaleY());if(C.fillScale9Bounds!=null&&C.bitmapFill!=null||C.strokeScale9Bounds!=null&&C.bitmapStroke!=null)C.applyScale9GridUnscaledX(je.buffer.f[je.fPos+2]),C.applyScale9GridUnscaledY(je.buffer.f[je.fPos+
3]),C.applyScale9GridScaledX(rd),C.applyScale9GridScaledY(pe);C.context.quadraticCurveTo(ke-c,ql-d,rd-c,pe-d);f=rd;g=pe}else C.context.quadraticCurveTo(je.buffer.f[je.fPos]-c,je.buffer.f[je.fPos+1]-d,je.buffer.f[je.fPos+2]-c,je.buffer.f[je.fPos+3]-d),f=je.buffer.f[je.fPos+2],g=je.buffer.f[je.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=ya.DRAW_CIRCLE;var Lc=r;v=!0;if(z){var Ak=C.toScale9Position(Lc.buffer.f[Lc.fPos]-Lc.buffer.f[Lc.fPos+
2],w.x,w.width,C.bounds.width,C.graphics.__owner.get_scaleX()),Xc=C.toScale9Position(Lc.buffer.f[Lc.fPos+1]-Lc.buffer.f[Lc.fPos+2],w.y,w.height,C.bounds.height,C.graphics.__owner.get_scaleY()),gd=C.toScale9Position(Lc.buffer.f[Lc.fPos]+Lc.buffer.f[Lc.fPos+2],w.x,w.width,C.bounds.width,C.graphics.__owner.get_scaleX()),be=C.toScale9Position(Lc.buffer.f[Lc.fPos+1]+Lc.buffer.f[Lc.fPos+2],w.y,w.height,C.bounds.height,C.graphics.__owner.get_scaleY());if(C.fillScale9Bounds!=null&&C.bitmapFill!=null||C.strokeScale9Bounds!=
null&&C.bitmapStroke!=null)C.applyScale9GridUnscaledX(Lc.buffer.f[Lc.fPos]-Lc.buffer.f[Lc.fPos+2]),C.applyScale9GridUnscaledY(Lc.buffer.f[Lc.fPos+1]-Lc.buffer.f[Lc.fPos+2]),C.applyScale9GridUnscaledX(Lc.buffer.f[Lc.fPos]+Lc.buffer.f[Lc.fPos+2]),C.applyScale9GridUnscaledY(Lc.buffer.f[Lc.fPos+1]+Lc.buffer.f[Lc.fPos+2]),C.applyScale9GridScaledX(Ak),C.applyScale9GridScaledY(Xc),C.applyScale9GridScaledX(gd),C.applyScale9GridScaledY(be);var Mc=Ak-c;var Wd=Xc-d;var lf=gd-Ak;var jg=be-Xc;if(lf!=0||jg!=0){var Vg=
lf/2*.5522848;var qf=jg/2*.5522848;var Bk=Mc+lf;var Ck=Wd+jg;var bf=Mc+lf/2;var kg=Wd+jg/2;C.context.moveTo(Mc,kg);C.context.bezierCurveTo(Mc,kg-qf,bf-Vg,Wd,bf,Wd);C.context.bezierCurveTo(bf+Vg,Wd,Bk,kg-qf,Bk,kg);C.context.bezierCurveTo(Bk,kg+qf,bf+Vg,Ck,bf,Ck);C.context.bezierCurveTo(bf-Vg,Ck,Mc,kg+qf,Mc,kg)}}else Lc.buffer.f[Lc.fPos+2]!=0&&(C.context.moveTo(Lc.buffer.f[Lc.fPos]-c+Lc.buffer.f[Lc.fPos+2],Lc.buffer.f[Lc.fPos+1]-d),C.context.arc(Lc.buffer.f[Lc.fPos]-c,Lc.buffer.f[Lc.fPos+1]-d,Lc.buffer.f[Lc.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=ya.DRAW_ELLIPSE;var md=r;v=!0;if(z){var rh=C.toScale9Position(md.buffer.f[md.fPos],w.x,w.width,C.bounds.width,C.graphics.__owner.get_scaleX()),em=C.toScale9Position(md.buffer.f[md.fPos+1],w.y,w.height,C.bounds.height,C.graphics.__owner.get_scaleY()),rl=C.toScale9Position(md.buffer.f[md.fPos]+md.buffer.f[md.fPos+2],w.x,w.width,C.bounds.width,C.graphics.__owner.get_scaleX()),
Ao=C.toScale9Position(md.buffer.f[md.fPos+1]+md.buffer.f[md.fPos+3],w.y,w.height,C.bounds.height,C.graphics.__owner.get_scaleY());if(C.fillScale9Bounds!=null&&C.bitmapFill!=null||C.strokeScale9Bounds!=null&&C.bitmapStroke!=null)C.applyScale9GridUnscaledX(md.buffer.f[md.fPos]),C.applyScale9GridUnscaledY(md.buffer.f[md.fPos+1]),C.applyScale9GridUnscaledX(md.buffer.f[md.fPos]+md.buffer.f[md.fPos+2]),C.applyScale9GridUnscaledY(md.buffer.f[md.fPos+1]+md.buffer.f[md.fPos+3]),C.applyScale9GridScaledX(rh),
C.applyScale9GridScaledY(em),C.applyScale9GridScaledX(rl),C.applyScale9GridScaledY(Ao);Mc=rh;Wd=em;lf=rl-rh;jg=Ao-em}else Mc=md.buffer.f[md.fPos],Wd=md.buffer.f[md.fPos+1],lf=md.buffer.f[md.fPos+2],jg=md.buffer.f[md.fPos+3];if(lf!=0||jg!=0)Mc-=c,Wd-=d,Vg=lf/2*.5522848,qf=jg/2*.5522848,Bk=Mc+lf,Ck=Wd+jg,bf=Mc+lf/2,kg=Wd+jg/2,C.context.moveTo(Mc,kg),C.context.bezierCurveTo(Mc,kg-qf,bf-Vg,Wd,bf,Wd),C.context.bezierCurveTo(bf+Vg,Wd,Bk,kg-qf,Bk,kg),C.context.bezierCurveTo(Bk,kg+qf,bf+Vg,Ck,bf,Ck),C.context.bezierCurveTo(bf-
Vg,Ck,Mc,kg+qf,Mc,kg);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=ya.DRAW_QUADS;var Dk=r,ji=Dk.buffer.o[Dk.oPos],sl=Dk.buffer.o[Dk.oPos+1],ve=Dk.buffer.o[Dk.oPos+2],tl=sl!=null,fm=!1,Qe=!1,ck=tl?sl.get_length():Math.floor(ji.get_length()/4);if(ck==0)return;ve!=null&&(ve.get_length()>=ck*6?Qe=fm=!0:ve.get_length()>=ck*4?fm=!0:ve.get_length()>=ck*2&&(Qe=!0));var Ge=Ha.__pool.get(),He=hb.__pool.get(),gm=C.graphics.__renderTransform;
C.context.save();for(var hm=0,dn=ck;hm<dn;){var Ek=hm++;var Ki=tl?sl.get(Ek)*4:Ek*4;if(!(Ki<0||(Ge.setTo(ji.get(Ki),ji.get(Ki+1),ji.get(Ki+2),ji.get(Ki+3)),Ge.width<=0||Ge.height<=0))){if(fm&&Qe){var Sf=Ek*6;He.setTo(ve.get(Sf),ve.get(Sf+1),ve.get(Sf+2),ve.get(Sf+3),ve.get(Sf+4),ve.get(Sf+5))}else fm?(Sf=Ek*4,He.setTo(ve.get(Sf),ve.get(Sf+1),ve.get(Sf+2),ve.get(Sf+3),Ge.x,Ge.y)):Qe?(Sf=Ek*2,He.tx=ve.get(Sf),He.ty=ve.get(Sf+1)):(He.tx=Ge.x,He.ty=Ge.y);He.tx+=f-c;He.ty+=g-d;He.concat(gm);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)}}Ha.__pool.release(Ge);hb.__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=ya.DRAW_RECT;var ec=r;var ul=!1;if(C.bitmapFill!=null&&C.bitmapFill.readable&&!C.hitTesting&&!z){var Fk=
L=J=G=0;var yg=!0;if(C.pendingMatrix!=null)if(C.pendingMatrix.b!=0||C.pendingMatrix.c!=0)yg=!1;else{P==null&&(P=Ca.__pool.get());V==null&&(V=Ca.__pool.get());P.setTo(ec.buffer.f[ec.fPos],ec.buffer.f[ec.fPos+1]);var vl=C.inversePendingMatrix,en=P.x,dk=P.y;P.x=en*vl.a+dk*vl.c+vl.tx;P.y=en*vl.b+dk*vl.d+vl.ty;V.setTo(ec.buffer.f[ec.fPos]+ec.buffer.f[ec.fPos+2],ec.buffer.f[ec.fPos+1]+ec.buffer.f[ec.fPos+3]);var Wg=C.inversePendingMatrix,zg=V.x,Bo=V.y;V.x=zg*Wg.a+Bo*Wg.c+Wg.tx;V.y=zg*Wg.b+Bo*Wg.d+Wg.ty;
G=P.y;Fk=P.x;L=V.y;J=V.x}else G=ec.buffer.f[ec.fPos+1],Fk=ec.buffer.f[ec.fPos],L=ec.buffer.f[ec.fPos+1]+ec.buffer.f[ec.fPos+3],J=ec.buffer.f[ec.fPos]+ec.buffer.f[ec.fPos+2];yg&&G>=0&&Fk>=0&&J<=C.bitmapFill.width&&L<=C.bitmapFill.height&&(ul=!0,C.hitTesting||C.context.drawImage(C.bitmapFill.image.get_src(),Fk,G,J-Fk,L-G,ec.buffer.f[ec.fPos]-c,ec.buffer.f[ec.fPos+1]-d,ec.buffer.f[ec.fPos+2],ec.buffer.f[ec.fPos+3]))}if(!ul)if(v=!0,z){var mf=C.toScale9Position(ec.buffer.f[ec.fPos],w.x,w.width,C.bounds.width,
C.graphics.__owner.get_scaleX()),wl=C.toScale9Position(ec.buffer.f[ec.fPos+1],w.y,w.height,C.bounds.height,C.graphics.__owner.get_scaleY()),yq=C.toScale9Position(ec.buffer.f[ec.fPos]+ec.buffer.f[ec.fPos+2],w.x,w.width,C.bounds.width,C.graphics.__owner.get_scaleX()),xl=C.toScale9Position(ec.buffer.f[ec.fPos+1]+ec.buffer.f[ec.fPos+3],w.y,w.height,C.bounds.height,C.graphics.__owner.get_scaleY());if(C.fillScale9Bounds!=null&&C.bitmapFill!=null||C.strokeScale9Bounds!=null&&C.bitmapStroke!=null)C.applyScale9GridUnscaledX(ec.buffer.f[ec.fPos]),
C.applyScale9GridUnscaledY(ec.buffer.f[ec.fPos+1]),C.applyScale9GridUnscaledX(ec.buffer.f[ec.fPos]+ec.buffer.f[ec.fPos+2]),C.applyScale9GridUnscaledY(ec.buffer.f[ec.fPos+1]+ec.buffer.f[ec.fPos+3]),C.applyScale9GridScaledX(mf),C.applyScale9GridScaledY(wl),C.applyScale9GridScaledX(yq),C.applyScale9GridScaledY(xl);var Hg=yq-mf,Gk=xl-wl;Hg==0&&Gk==0||C.context.rect(mf-c,wl-d,Hg,Gk)}else ec.buffer.f[ec.fPos+2]==0&&ec.buffer.f[ec.fPos+3]==0||C.context.rect(ec.buffer.f[ec.fPos]-c,ec.buffer.f[ec.fPos+1]-
d,ec.buffer.f[ec.fPos+2],ec.buffer.f[ec.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=ya.DRAW_ROUND_RECT;var Ig=r;v=!0;C.drawRoundRect(Ig.buffer.f[Ig.fPos]-c,Ig.buffer.f[Ig.fPos+1]-d,Ig.buffer.f[Ig.fPos+2],Ig.buffer.f[Ig.fPos+3],Ig.buffer.f[Ig.fPos+4],Ig.buffer.o[Ig.oPos],w,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=ya.DRAW_TRIANGLES;var ki=r,ce=ki.buffer.o[ki.oPos],dj=ki.buffer.o[ki.oPos+1],Ph=ki.buffer.o[ki.oPos+2],Qh=null,Hk=C.bitmapFill==null;if(Hk&&Ph!=null)break a;if(!Hk&&Ph!=null){var wv=Ph.get_length()!=ce.get_length(),zq=C.normalizeUVT(Ph,wv),xv=zq.max;Ph=zq.uvt;Qh=xv>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 Gj=
0,Aq=dj.get_length(),Hj,im,Ij,we,Jg,ek,li,ej,Ik,Rh,Xg,Kg,Yg,sh,lg,fk,gk,Tf,th,mg,Lg,Jj,Bq,Cq,xy,xz,Co,Ie;Gj<Aq;){Hj=Gj;im=Gj+1;Ij=Gj+2;we=dj.get(Hj)*2;Jg=dj.get(Hj)*2+1;ek=dj.get(im)*2;li=dj.get(im)*2+1;ej=dj.get(Ij)*2;Ik=dj.get(Ij)*2+1;if(z){var yz=C.toScale9Position(ce.get(we),w.x,w.width,C.bounds.width,C.graphics.__owner.get_scaleX()),zz=C.toScale9Position(ce.get(Jg),w.y,w.height,C.bounds.height,C.graphics.__owner.get_scaleY()),Az=C.toScale9Position(ce.get(ek),w.x,w.width,C.bounds.width,C.graphics.__owner.get_scaleX()),
Bz=C.toScale9Position(ce.get(li),w.y,w.height,C.bounds.height,C.graphics.__owner.get_scaleY()),Dq=C.toScale9Position(ce.get(ej),w.x,w.width,C.bounds.width,C.graphics.__owner.get_scaleX()),yy=C.toScale9Position(ce.get(Ik),w.y,w.height,C.bounds.height,C.graphics.__owner.get_scaleY());if(C.fillScale9Bounds!=null&&C.bitmapFill!=null||C.strokeScale9Bounds!=null&&C.bitmapStroke!=null)C.applyScale9GridUnscaledX(ce.get(we)),C.applyScale9GridUnscaledY(ce.get(Jg)),C.applyScale9GridUnscaledX(ce.get(ek)),C.applyScale9GridUnscaledY(ce.get(li)),
C.applyScale9GridUnscaledX(ce.get(ej)),C.applyScale9GridUnscaledY(ce.get(Ik)),C.applyScale9GridScaledX(yz),C.applyScale9GridScaledY(zz),C.applyScale9GridScaledX(Az),C.applyScale9GridScaledY(Bz),C.applyScale9GridScaledX(Dq),C.applyScale9GridScaledY(yy);Rh=yz-c;Xg=zz-d;Kg=Az-c;Yg=Bz-d;sh=Dq-c;lg=yy-d}else Rh=ce.get(we)-c,Xg=ce.get(Jg)-d,Kg=ce.get(ek)-c,Yg=ce.get(li)-d,sh=ce.get(ej)-c,lg=ce.get(Ik)-d;switch(ki.buffer.o[ki.oPos+3]){case 0:if((Kg-Rh)*(lg-Xg)-(Yg-Xg)*(sh-Rh)<0){Gj+=3;continue}break;case 2:if(!((Kg-
Rh)*(lg-Xg)-(Yg-Xg)*(sh-Rh)<0)){Gj+=3;continue}}if(Hk||Ph==null){C.context.beginPath();C.context.moveTo(Rh,Xg);C.context.lineTo(Kg,Yg);C.context.lineTo(sh,lg);C.context.closePath();var Eq=0,Fq=0,Sh=1,jm=1;if(!C.hitTesting&&z&&C.fillScale9Bounds!=null&&C.bitmapFill!=null){var ng=C.fillScale9Bounds.getScaleX(),Mg=C.fillScale9Bounds.getScaleY();if(ng>0&&Mg>0){C.context.scale(ng,Mg);Sh=1/ng;jm=1/Mg;var zy=C.fillScale9Bounds.unscaledMinX%C.bitmapFill.width,Gq=C.fillScale9Bounds.unscaledMinY%C.bitmapFill.height,
Hq=C.fillScale9Bounds.scale9MinX%(C.bitmapFill.width*ng)/ng,yv=C.fillScale9Bounds.scale9MinY%(C.bitmapFill.height*Mg)/Mg,km=Hq-zy,fn=yv-Gq;C.context.translate(km,fn);Eq=-km;Fq=-fn}}C.hitTesting||C.context.fill(C.windingRule);!C.hitTesting&&z&&C.fillScale9Bounds!=null&&C.bitmapFill!=null&&(C.context.translate(Eq,Fq),C.context.scale(Sh,jm));Gj+=3}else fk=Ph.get(we)*Qh.width,Tf=Ph.get(ek)*Qh.width,mg=Ph.get(ej)*Qh.width,gk=Ph.get(Jg)*Qh.height,th=Ph.get(li)*Qh.height,Lg=Ph.get(Ik)*Qh.height,Jj=fk*(Lg-
th)-Tf*Lg+mg*th+(Tf-mg)*gk,Jj==0?(Gj+=3,C.context.restore()):(C.context.save(),C.context.beginPath(),C.context.moveTo(Rh,Xg),C.context.lineTo(Kg,Yg),C.context.lineTo(sh,lg),C.context.closePath(),C.context.clip(),Bq=-(gk*(sh-Kg)-th*sh+Lg*Kg+(th-Lg)*Rh)/Jj,Cq=(th*lg+gk*(Yg-lg)-Lg*Yg+(Lg-th)*Xg)/Jj,xy=(fk*(sh-Kg)-Tf*sh+mg*Kg+(Tf-mg)*Rh)/Jj,xz=-(Tf*lg+fk*(Yg-lg)-mg*Yg+(mg-Tf)*Xg)/Jj,Co=(fk*(Lg*Kg-th*sh)+gk*(Tf*sh-mg*Kg)+(mg*th-Tf*Lg)*Rh)/Jj,Ie=(fk*(Lg*Yg-th*lg)+gk*(Tf*lg-mg*Yg)+(mg*th-Tf*Lg)*Xg)/Jj,C.context.transform(Bq,
Cq,xy,xz,Co,Ie),C.context.drawImage(Qh,0,0,Qh.width,Qh.height),C.context.restore(),Gj+=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=ya.LINE_BITMAP_STYLE;var Zg=r;b&&C.hasStroke&&C.closePath(!0);C.context.moveTo(f-c,g-d);if(Zg.buffer.o[Zg.oPos].readable)C.strokePattern=C.createBitmapFill(Zg.buffer.o[Zg.oPos],Zg.buffer.b[Zg.bPos],Zg.buffer.b[Zg.bPos+1]),C.context.strokeStyle=C.strokePattern,C.bitmapStroke=Zg.buffer.o[Zg.oPos],
C.bitmapStrokeMatrix=Zg.buffer.o[Zg.oPos+1];else{var Ay=N.hex(0,6);C.context.strokeStyle="#"+Ay;C.strokePattern=null;C.bitmapStroke=null;C.bitmapStrokeMatrix=null}C.strokeScale9Bounds!=null?C.strokeScale9Bounds.clear():z&&C.bitmapStroke!=null&&(C.strokeScale9Bounds=new vv);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=ya.LINE_GRADIENT_STYLE;var uh=r;b&&C.hasStroke&&C.closePath(!0);C.context.moveTo(f-c,g-d);C.strokePattern=
C.createGradientPattern(uh.buffer.o[uh.oPos],uh.buffer.ii[uh.iiPos],uh.buffer.ff[uh.ffPos],uh.buffer.ii[uh.iiPos+1],uh.buffer.o[uh.oPos+1],uh.buffer.o[uh.oPos+2],uh.buffer.o[uh.oPos+3],uh.buffer.f[uh.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=ya.LINE_STYLE;var Pd=r;b&&C.hasStroke&&C.closePath(!0);C.context.moveTo(f-
c,g-d);if(Pd.buffer.o[Pd.oPos]==null)C.hasStroke=!1;else{C.hasStroke=!0;C.context.lineWidth=Pd.buffer.o[Pd.oPos]>0?Pd.buffer.o[Pd.oPos]:1;var Cz=Pd.buffer.o[Pd.oPos+3]==null?"round":(Pd.buffer.o[Pd.oPos+3]==null?"null":rz.toString(Pd.buffer.o[Pd.oPos+3])).toLowerCase();C.context.lineJoin=Cz;var lm=Pd.buffer.o[Pd.oPos+2]==null?"round":Pd.buffer.o[Pd.oPos+2]==0?"butt":(Pd.buffer.o[Pd.oPos+2]==null?"null":oz.toString(Pd.buffer.o[Pd.oPos+2])).toLowerCase();C.context.lineCap=lm;C.context.miterLimit=Pd.buffer.f[Pd.fPos+
1];if(Pd.buffer.f[Pd.fPos]==1){var yl=N.hex(Pd.buffer.i[Pd.iPos]&16777215,6);C.context.strokeStyle="#"+yl}else wb=(Pd.buffer.i[Pd.iPos]&16711680)>>>16,cb=(Pd.buffer.i[Pd.iPos]&65280)>>>8,Tb=Pd.buffer.i[Pd.iPos]&255,C.context.strokeStyle="rgba("+wb+", "+cb+", "+Tb+", "+Pd.buffer.f[Pd.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=ya.LINE_TO;
var Ef=r;v=!0;if(z){var gn=C.toScale9Position(Ef.buffer.f[Ef.fPos],w.x,w.width,C.bounds.width,C.graphics.__owner.get_scaleX()),hn=C.toScale9Position(Ef.buffer.f[Ef.fPos+1],w.y,w.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(gn),C.applyScale9GridScaledY(hn);f==gn&&g==hn||
C.context.lineTo(gn-c,hn-d);f=gn;g=hn}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=ya.MOVE_TO;var vh=r;if(z){var By=C.toScale9Position(vh.buffer.f[vh.fPos],w.x,w.width,C.bounds.width,C.graphics.__owner.get_scaleX()),jn=C.toScale9Position(vh.buffer.f[vh.fPos+
1],w.y,w.height,C.bounds.height,C.graphics.__owner.get_scaleY());if(C.fillScale9Bounds!=null&&C.bitmapFill!=null||C.strokeScale9Bounds!=null&&C.bitmapStroke!=null)C.applyScale9GridUnscaledX(vh.buffer.f[vh.fPos]),C.applyScale9GridUnscaledY(vh.buffer.f[vh.fPos+1]),C.applyScale9GridScaledX(By),C.applyScale9GridScaledY(jn);C.context.moveTo(By-c,jn-d);f=By;g=jn}else C.context.moveTo(vh.buffer.f[vh.fPos]-c,vh.buffer.f[vh.fPos+1]-d),f=vh.buffer.f[vh.fPos],g=vh.buffer.f[vh.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=ra}}P!=null&&Ca.__pool.release(P);V!=null&&Ca.__pool.release(V);r.destroy();if(v){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 mi=hb.__pool.get();C.bitmapStrokeMatrix!=null?mi.copyFrom(C.bitmapStrokeMatrix):mi.identity();z&&C.strokeScale9Bounds!=null&&C.bitmapStroke!=null&&(ng=C.strokeScale9Bounds.getScaleX(),Mg=C.strokeScale9Bounds.getScaleY(),ng>0&&Mg>0&&mi.scale(ng,Mg));var zv=new DOMMatrix([mi.a,mi.b,mi.c,mi.d,mi.tx,mi.ty]);C.strokePattern.setTransform(zv);hb.__pool.release(mi)}C.hitTesting||C.context.stroke()}b||!C.hasFill&&C.bitmapFill==null||(C.context.translate(-C.bounds.x,-C.bounds.y),
Fq=Eq=0,jm=Sh=1,!C.hitTesting&&z&&C.fillScale9Bounds!=null&&C.bitmapFill!=null&&(ng=C.fillScale9Bounds.getScaleX(),Mg=C.fillScale9Bounds.getScaleY(),ng>0&&Mg>0&&(C.context.scale(ng,Mg),Sh=1/ng,jm=1/Mg,zy=C.fillScale9Bounds.unscaledMinX%C.bitmapFill.width,Gq=C.fillScale9Bounds.unscaledMinY%C.bitmapFill.height,Hq=C.fillScale9Bounds.scale9MinX%(C.bitmapFill.width*ng)/ng,yv=C.fillScale9Bounds.scale9MinY%(C.bitmapFill.height*Mg)/Mg,km=Hq-zy,fn=yv-Gq,C.context.translate(km,fn),Eq=-km,Fq=-fn)),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(Eq,Fq),C.context.scale(Sh,
jm)),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 Dj(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==ya.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=ya.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==ya.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=ya.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==ya.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=ya.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=ya.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=ya.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=ya.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=ya.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=ya.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=ya.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=ya.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=ya.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=ya.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=ya.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=ya.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=ya.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=ya.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=ya.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=ya.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=ya.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=ya.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=ya.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=yc.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=yc.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 Dj(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=ya.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=ya.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=ya.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=ya.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 v=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,v,h,v);C.context.bezierCurveTo(h-f,v,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=ya.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=ya.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=ya.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=ya.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 vv=function(){this.scale9MinX=this.scale9MinY=this.scale9MaxX=this.scale9MaxY=this.unscaledMinX=this.unscaledMinY=this.unscaledMaxX=this.unscaledMaxY=null};t["openfl.display._internal._CanvasGraphics.Scale9GridBounds"]=vv;vv.__name__="openfl.display._internal._CanvasGraphics.Scale9GridBounds";
vv.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__:vv};var Dz=function(){};t["openfl.display._internal.CanvasShape"]=Dz;Dz.__name__="openfl.display._internal.CanvasShape";Dz.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=hb.__pool.get(),c.scale(1/d.__bitmapScaleX,1/d.__bitmapScaleY),c.concat(n),b.setTransform(c,l),l.drawImage(h,0,0,f,g),hb.__pool.release(c),b.__popMaskObject(a)}}}}};var Wu=function(){};t["openfl.display._internal.CanvasSimpleButton"]=Wu;Wu.__name__="openfl.display._internal.CanvasSimpleButton";
Wu.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))};Wu.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 Ha);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=hb.__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);hb.__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 v=N.hex(d.backgroundColor&16777215,6);oa.context.fillStyle="#"+v;oa.context.fill()}d.border&&(oa.context.lineWidth=1,v=N.hex(d.borderColor&16777215,6),oa.context.strokeStyle="#"+v,oa.context.stroke())}oa.context.textBaseline="alphabetic";oa.context.textAlign="start";b=-a.get_scrollH();var w=h=0;for(v=a.get_scrollV()-1;w<v;){var z=w++;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 G="#"+N.hex(q.format.color&16777215,6);oa.context.font=Uc.getFont(q.format);oa.context.fillStyle=G;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){w=r=0;for(v=a.__caretIndex-q.startIndex;w<v;){z=w++;if(q.positions.length<=
z)break;r+=q.positions[z]}w=0;v=a.get_scrollV();for(z=q.lineIndex+1;v<z;){var J=v++;w+=d.lineHeights.get(J-1)}oa.context.beginPath();v=N.hex(q.format.color&16777215,6);oa.context.strokeStyle="#"+v;oa.context.moveTo(q.offsetX+r-a.get_scrollH()-g.x,w+2-g.y);oa.context.lineWidth=1;oa.context.lineTo(q.offsetX+r-a.get_scrollH()-g.x,w+Uc.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,w=Math.max(a.__selectionIndex,a.__caretIndex)|0,q.startIndex>r&&(r=q.startIndex),q.endIndex<w&&(w=q.endIndex),z=a.getCharBoundaries(r),w>=q.endIndex?(v=a.getCharBoundaries(q.endIndex-1),v!=null&&(v.x+=v.width+2)):v=a.getCharBoundaries(w),z!=null&&v!=null&&(oa.context.fillStyle="#000000",
oa.context.fillRect(z.x+b-g.x,z.y+h,v.x-z.x,q.height),oa.context.fillStyle="#FFFFFF",oa.context.fillText(f.substring(r,w),b+z.x-g.x,q.offsetY+q.ascent+h));q.format.underline&&(oa.context.beginPath(),oa.context.strokeStyle=G,oa.context.lineWidth=1,r=q.offsetX+b-g.x,w=Math.ceil(q.offsetY+h+q.ascent-g.y)+Math.floor(q.ascent*.185)+.5,oa.context.moveTo(r,w),oa.context.lineTo(r+q.width,w),oa.context.stroke(),oa.context.closePath());q.format.strikethrough&&(oa.context.beginPath(),oa.context.strokeStyle=
G,oa.context.lineWidth=1,G=q.offsetX+b-g.x,r=Math.ceil(q.offsetY+h+2*q.ascent/3-g.y),oa.context.moveTo(G,r),oa.context.lineTo(G+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&&(v=N.hex(d.backgroundColor&16777215,6),oa.context.fillStyle="#"+v,oa.context.fill()),d.border&&(oa.context.lineWidth=1,oa.context.lineCap="square",v=N.hex(d.borderColor&16777215,6),
oa.context.strokeStyle="#"+v,oa.context.stroke());if(a.__caretIndex>-1&&d.selectable&&a.__showCursor){b=-a.get_scrollH()+(f?0:h);w=h=0;for(v=a.get_scrollV()-1;w<v;)z=w++,h+=d.lineHeights.get(z);oa.context.beginPath();v=N.hex(a.get_defaultTextFormat().color&16777215,6);oa.context.strokeStyle="#"+v;oa.context.moveTo(b+2.5,h+2.5);oa.context.lineWidth=1;oa.context.lineTo(b+2.5,h+Uc.getFormatHeight(a.get_defaultTextFormat())-1);oa.context.stroke();oa.context.closePath()}}c.__bitmap==null?c.__bitmap=yc.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=yc.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(ic.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 Ha);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=hb.__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);hb.__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 v=N.hex(c.backgroundColor&
16777215,6);oa.context.fillStyle="#"+v;oa.context.fill()}c.border&&(oa.context.lineWidth=1,v=N.hex(c.borderColor&16777215,6),oa.context.strokeStyle="#"+v,oa.context.stroke())}oa.context.textBaseline="alphabetic";oa.context.textAlign="start";q=-a.get_scrollH();var w=d=0;for(v=a.get_scrollV()-1;w<v;){var z=w++;d-=c.lineHeights.get(z)}var r;for(h=c.layoutGroups.iterator();h.hasNext();){var G=h.next();if(!(G.lineIndex<a.get_scrollV()-1)){if(G.lineIndex>c.get_bottomScrollV()-1)break;var J="#"+N.hex(G.format.color&
16777215,6);oa.context.font=Uc.getFont(G.format);oa.context.fillStyle=J;oa.context.fillText(n.substring(G.startIndex,G.endIndex),G.offsetX+q-f.x,G.offsetY+G.ascent+d-f.y);if(a.__caretIndex>-1&&c.selectable)if(a.__selectionIndex==a.__caretIndex){if(a.__showCursor&&G.startIndex<=a.__caretIndex&&G.endIndex>=a.__caretIndex){w=r=0;for(v=a.__caretIndex-G.startIndex;w<v;){z=w++;if(G.positions.length<=z)break;r+=G.positions[z]}w=0;v=a.get_scrollV();for(z=G.lineIndex+1;v<z;){var L=v++;w+=c.lineHeights.get(L-
1)}oa.context.beginPath();v=N.hex(G.format.color&16777215,6);oa.context.strokeStyle="#"+v;oa.context.moveTo(G.offsetX+r-a.get_scrollH()-f.x,w+2-f.y);oa.context.lineWidth=1;oa.context.lineTo(G.offsetX+r-a.get_scrollH()-f.x,w+Uc.getFormatHeight(a.get_defaultTextFormat())-1-f.y);oa.context.stroke();oa.context.closePath()}}else if(G.startIndex<=a.__caretIndex&&G.endIndex>=a.__caretIndex||G.startIndex<=a.__selectionIndex&&G.endIndex>=a.__selectionIndex||G.startIndex>a.__caretIndex&&G.endIndex<a.__selectionIndex||
G.startIndex>a.__selectionIndex&&G.endIndex<a.__caretIndex)r=Math.min(a.__selectionIndex,a.__caretIndex)|0,w=Math.max(a.__selectionIndex,a.__caretIndex)|0,G.startIndex>r&&(r=G.startIndex),G.endIndex<w&&(w=G.endIndex),z=a.getCharBoundaries(r),w>=G.endIndex?(v=a.getCharBoundaries(G.endIndex-1),v!=null&&(v.x+=v.width+2)):v=a.getCharBoundaries(w),z!=null&&v!=null&&(oa.context.fillStyle="#000000",oa.context.fillRect(z.x+q-f.x,z.y+d,v.x-z.x,G.height),oa.context.fillStyle="#FFFFFF",oa.context.fillText(n.substring(r,
w),q+z.x-f.x,G.offsetY+G.ascent+d));G.format.underline&&(oa.context.beginPath(),oa.context.strokeStyle=J,oa.context.lineWidth=1,r=G.offsetX+q-f.x,w=Math.ceil(G.offsetY+d+G.ascent-f.y)+Math.floor(G.ascent*.185)+.5,oa.context.moveTo(r,w),oa.context.lineTo(r+G.width,w),oa.context.stroke(),oa.context.closePath());G.format.strikethrough&&(oa.context.beginPath(),oa.context.strokeStyle=J,oa.context.lineWidth=1,J=G.offsetX+q-f.x,r=Math.ceil(G.offsetY+d+2*G.ascent/3-f.y),oa.context.moveTo(J,r),oa.context.lineTo(J+
G.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&&(v=N.hex(c.backgroundColor&16777215,6),oa.context.fillStyle="#"+v,oa.context.fill()),c.border&&(oa.context.lineWidth=1,oa.context.lineCap="square",v=N.hex(c.borderColor&16777215,6),oa.context.strokeStyle="#"+v,oa.context.stroke());if(a.__caretIndex>-1&&c.selectable&&a.__showCursor){q=-a.get_scrollH()+(d?0:h);
w=d=0;for(v=a.get_scrollV()-1;w<v;)z=w++,d+=c.lineHeights.get(z);oa.context.beginPath();v=N.hex(a.get_defaultTextFormat().color&16777215,6);oa.context.strokeStyle="#"+v;oa.context.moveTo(q+2.5,d+2.5);oa.context.lineWidth=1;oa.context.lineTo(q+2.5,d+Uc.getFormatHeight(a.get_defaultTextFormat())-1);oa.context.stroke();oa.context.closePath()}}g.__bitmap==null?g.__bitmap=yc.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=yc.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,G=a.__scrollRect,
G==null||G.width>0&&G.height>0)))))))||(b.__setBlendMode(a.__worldBlendMode),b.__pushMaskObject(a),c.globalAlpha=h,h=hb.__pool.get(),h.scale(1/g.__bitmapScaleX,1/g.__bitmapScaleY),h.concat(l),b.setTransform(h,c),c.drawImage(d,0,0,n,q),hb.__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),zb.convertToCanvas(a.__bitmapData.image),c.globalAlpha=h,G=a.__scrollRect,b.setTransform(a.__renderTransform,c),b.__allowSmoothing&&a.smoothing||(c.imageSmoothingEnabled=!1),G==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(),G.x,G.y,G.width,G.height,G.x,G.y,G.width,G.height),b.__allowSmoothing&&a.smoothing||(c.imageSmoothingEnabled=!0),b.__popMaskObject(a,!1)))};oa.renderDrawableMask=
function(a,b){bm.renderDrawableMask(a,b)};var Cj=function(){};t["openfl.display._internal.CanvasTilemap"]=Cj;Cj.__name__="openfl.display._internal.CanvasTilemap";Cj.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=Ha.__pool.get();f.setTo(0,0,a.__width,a.__height);b.__pushMaskRect(f,a.__renderTransform);b.__allowSmoothing&&a.smoothing||(d.imageSmoothingEnabled=
!1);Cj.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);Ha.__pool.release(f)}}};Cj.renderTileContainer=function(a,b,c,d,f,g,h,n,l,q,v,w){var z=b.context,r=b.__roundPixels,G=hb.__pool.get(),J=a.__tiles,L,P=null,V=0;for(a=a.__length;V<a;){var ia=V++;var ea=J[ia];G.setTo(1,0,0,1,
-ea.get_originX(),-ea.get_originY());G.concat(ea.get_matrix());G.concat(c);r&&(G.tx=Math.round(G.tx),G.ty=Math.round(G.ty));var ra=ea.get_tileset()!=null?ea.get_tileset():d;ia=ea.get_alpha()*h;if((L=ea.get_visible())&&!(ia<=0))if(g||(ia=1),n&&(P=ea.__blendMode!=null?ea.__blendMode:l),ea.__length>0)Cj.renderTileContainer(ea,b,G,ra,f,g,ia,n,P,q,v,w);else if(ra!=null){L=ea.get_id();if(L==-1){if(ea=ea.__rect,ea==null||ea.width<=0||ea.height<=0)continue}else{ea=ra.__data[L];if(ea==null)continue;w.setTo(ea.x,
ea.y,ea.width,ea.height);ea=w}ra=ra.__bitmapData;ra!=null&&ra.image!=null&&(ra!=q&&(ra.image.buffer.__srcImage==null&&zb.convertToCanvas(ra.image),v=ra.image.get_src(),q=ra),z.globalAlpha=ia,n&&b.__setBlendMode(P),b.setTransform(G,z),z.drawImage(v,ea.x,ea.y,ea.width,ea.height,0,0,ea.width,ea.height))}}hb.__pool.release(G)};Cj.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=hb.__pool.get(),n.scale(1/c.__bitmapScaleX,1/c.__bitmapScaleY),n.concat(h),b.setTransform(n,l),l.drawImage(g,0,0,d,f),hb.__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=Ha.__pool.get(),c.setTo(0,0,a.__width,a.__height),b.__pushMaskRect(c,a.__renderTransform),b.__allowSmoothing&&a.smoothing||(l.imageSmoothingEnabled=!1),Cj.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),Ha.__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);zb.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)};Cj.renderDrawableMask=function(a,b){};var Xm=function(){};t["openfl.display._internal.CanvasVideo"]=Xm;Xm.__name__="openfl.display._internal.CanvasVideo";Xm.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)}}}};Xm.renderDrawable=function(a,b){Xm.render(a,b);b.__renderEvent(a)};Xm.renderDrawableMask=function(a,b){};
var bj=function(){};t["openfl.display._internal.Context3DBitmap"]=bj;bj.__name__="openfl.display._internal.Context3DBitmap";bj.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)}};bj.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=Ha.__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);Ha.__pool.release(d)}a.__graphics!=null&&Kj.render(a,b)}bj.render(a,b)}else bj.render(a.__cacheBitmap,b);b.__renderEvent(a)};bj.renderDrawableMask=function(a,b){bj.renderMask(a,b)};bj.renderMask=function(a,b){if(a.__bitmapData!=null&&a.__bitmapData.__isValid){var c=b.__context3D,d=b.__maskShader;b.setShader(d);b.applyBitmapData(Ym.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 lv=function(){};t["openfl.display._internal.Context3DBitmapData"]=lv;lv.__name__="openfl.display._internal.Context3DBitmapData";lv.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()};lv.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 mm=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"]=mm;mm.__name__=
"openfl.display._internal.Context3DBuffer";mm.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(il.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__:mm};var Av=Q["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}};Av.__constructs__=[Av.QUADS,Av.TRIANGLES,Av.TRIANGLE_INDICES];var ol=function(){};t["openfl.display._internal.Context3DDisplayObject"]=ol;ol.__name__="openfl.display._internal.Context3DDisplayObject";ol.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=Ha.__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);Ha.__pool.release(d)}a.__graphics!=null&&
Kj.render(a,b)}};ol.renderDrawable=function(a,b){b.__updateCacheBitmap(a,!1);if(a.__cacheBitmap!=null&&!a.__isCacheBitmapRender)bj.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=Ha.__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);Ha.__pool.release(d)}a.__graphics!=null&&Kj.render(a,b)}b.__renderEvent(a)};ol.renderDrawableMask=function(a,b){a.__graphics!=null&&Kj.renderMask(a,b)};ol.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&&Kj.renderMask(a,b)};var mv=function(){};
t["openfl.display._internal.Context3DDisplayObjectContainer"]=mv;mv.__name__="openfl.display._internal.Context3DDisplayObjectContainer";mv.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)&&(ol.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)}};mv.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&&Kj.renderMask(a,b);c=0;for(a=a.__children;c<a.length;)d=a[c],++c,b.__renderDrawableMask(d)};var Ga=function(){};
t["openfl.display._internal.Context3DGraphics"]=Ga;Ga.__name__="openfl.display._internal.Context3DGraphics";Ga.buildBuffer=function(a,b){var c=0,d=0,f=0,g=a.__bounds,h=new Dj(a.__commands),n=b.__context3D,l=Ha.__pool.get(),q=hb.__pool.get(),v=null,w=a.__owner.__scale9Grid,z=w!=null&&!a.__owner.__isMask&&a.__worldTransform.b==0&&a.__worldTransform.c==0;z||(w=null);for(var r=0,G=a.__commands.types;r<G.length;){var J=G[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=ya.BEGIN_BITMAP_FILL;var L=h;v=L.buffer.o[L.oPos];break;case 1:v=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:v=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=ya.BEGIN_SHADER_FILL;var P=h,V=P.buffer.o[P.oPos];
v=null;if(V!=null)for(var ia=0,ea=V.inputCount;ia<ea;){var ra=ia++;if(V.inputRefs[ra].name=="bitmap"){v=V.inputs[ra];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=ya.DRAW_CIRCLE;var za=h,fb=za.buffer.f[za.fPos],eb=za.buffer.f[za.fPos+1],Ra=za.buffer.f[za.fPos+2],wb=a.__owner.get_scaleX(),cb=a.__owner.get_scaleY();kn.buildEllipseVerticesAndIndices(fb-Ra,eb-Ra,Ra,Ra,wb,cb,Ga.tempVerticesVector,Ga.tempIndicesVector);var Tb=
Ga.tempVerticesVector,Ib=Ga.tempIndicesVector,Mb=null;if(z){Ga.tempScale9VerticesVector==null?Ga.tempScale9VerticesVector=ub.toFloatVector(null,Tb.get_length()):Ga.tempScale9VerticesVector.set_length(Tb.get_length());for(var tc=0,Bd=Tb.get_length(),Qb=!0;tc<Bd;)Qb?Ga.tempScale9VerticesVector.set(tc,Ga.toScale9Position(Tb.get(tc),w.x,w.width,g.width,a.__owner.get_scaleX())/a.__owner.get_scaleX()):Ga.tempScale9VerticesVector.set(tc,Ga.toScale9Position(Tb.get(tc),w.y,w.height,g.height,a.__owner.get_scaleY())/
a.__owner.get_scaleY()),++tc,Qb=!Qb;Tb=Ga.tempScale9VerticesVector}v!=null&&Mb==null&&(Mb=Ga.tempUvtVector,Ga.populateUvtVector(Tb,v,Mb));var wd=Ib!=null,Ae=Math.floor(Tb.get_length()/2),eg=wd?Ib.get_length():Ae,Df=Mb!=null,Ug=Df&&Mb.get_length()>=Ae*3,Rf=Ug?4:2,je=Ug?3:2,ke=Rf+2,ql=Ug?f:d;Ga.resizeVertexBuffer(a,Ug,ql+eg*ke);for(var rd=Ug?a.__vertexBufferDataUVT:a.__vertexBufferData,pe,Lc,Ak,Xc,gd=0,be=eg;gd<be;){var Mc=gd++;pe=ql+Mc*ke;Lc=wd?Ib.get(Mc)*2:Mc*2;Ak=wd?Ib.get(Mc)*je:Mc*je;Ug?(Xc=Mb.get(Ak+
2),rd[pe]=Tb.get(Lc)/Xc,rd[pe+1]=Tb.get(Lc+1)/Xc,rd[pe+2]=0,rd[pe+3]=1/Xc):(rd[pe]=Tb.get(Lc),rd[pe+1]=Tb.get(Lc+1));rd[pe+Rf]=Df?Mb.get(Ak):0;rd[pe+Rf+1]=Df?Mb.get(Ak+1):0}Ug?f+=eg*ke:d+=eg*ke;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=ya.DRAW_ELLIPSE;var Wd=h,lf=Wd.buffer.f[Wd.fPos],jg=Wd.buffer.f[Wd.fPos+1],Vg=Wd.buffer.f[Wd.fPos+2]/2,qf=Wd.buffer.f[Wd.fPos+3]/2,Bk=a.__owner.get_scaleX(),Ck=a.__owner.get_scaleY();kn.buildEllipseVerticesAndIndices(lf,
jg,Vg,qf,Bk,Ck,Ga.tempVerticesVector,Ga.tempIndicesVector);var bf=Ga.tempVerticesVector,kg=Ga.tempIndicesVector,md=null;if(z){Ga.tempScale9VerticesVector==null?Ga.tempScale9VerticesVector=ub.toFloatVector(null,bf.get_length()):Ga.tempScale9VerticesVector.set_length(bf.get_length());for(var rh=0,em=bf.get_length(),rl=!0;rh<em;)rl?Ga.tempScale9VerticesVector.set(rh,Ga.toScale9Position(bf.get(rh),w.x,w.width,g.width,a.__owner.get_scaleX())/a.__owner.get_scaleX()):Ga.tempScale9VerticesVector.set(rh,Ga.toScale9Position(bf.get(rh),
w.y,w.height,g.height,a.__owner.get_scaleY())/a.__owner.get_scaleY()),++rh,rl=!rl;bf=Ga.tempScale9VerticesVector}v!=null&&md==null&&(md=Ga.tempUvtVector,Ga.populateUvtVector(bf,v,md));var Ao=kg!=null,Dk=Math.floor(bf.get_length()/2),ji=Ao?kg.get_length():Dk,sl=md!=null,ve=sl&&md.get_length()>=Dk*3,tl=ve?4:2,fm=ve?3:2,Qe=tl+2,ck=ve?f:d;Ga.resizeVertexBuffer(a,ve,ck+ji*Qe);for(var Ge=ve?a.__vertexBufferDataUVT:a.__vertexBufferData,He,gm,hm,dn,Ek=0,Ki=ji;Ek<Ki;){var Sf=Ek++;He=ck+Sf*Qe;gm=Ao?kg.get(Sf)*
2:Sf*2;hm=Ao?kg.get(Sf)*fm:Sf*fm;ve?(dn=md.get(hm+2),Ge[He]=bf.get(gm)/dn,Ge[He+1]=bf.get(gm+1)/dn,Ge[He+2]=0,Ge[He+3]=1/dn):(Ge[He]=bf.get(gm),Ge[He+1]=bf.get(gm+1));Ge[He+tl]=sl?md.get(hm):0;Ge[He+tl+1]=sl?md.get(hm+1):0}ve?f+=ji*Qe:d+=ji*Qe;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=ya.DRAW_QUADS;var ec=h,ul=ec.buffer.o[ec.oPos],Fk=ec.buffer.o[ec.oPos+1],yg=ec.buffer.o[ec.oPos+2],vl=Fk!=null,en=!1,dk=!1,Wg=vl?Fk.get_length():Math.floor(ul.get_length()/
4);if(Wg==0)return;yg!=null&&(yg.get_length()>=Wg*6?dk=en=!0:yg.get_length()>=Wg*4?en=!0:yg.get_length()>=Wg*2&&(dk=!0));a.__quadBuffer==null?a.__quadBuffer=new mm(n,Av.QUADS,Wg,4):a.__quadBuffer.resize(c+Wg,4);var zg=a.__quadBuffer.vertexBufferData,Bo=1,mf=1;v!=null&&(Bo=v.width,mf=v.height);for(var wl=0,yq=Wg;wl<yq;){var xl=wl++;var Hg=(c+xl)*16;var Gk=vl?Fk.get(xl)*4:xl*4;if(!(Gk<0)){l.setTo(ul.get(Gk),ul.get(Gk+1),ul.get(Gk+2),ul.get(Gk+3));var Ig=l.width;var ki=l.height;if(!(Ig<=0||ki<=0)){if(en&&
dk){var ce=xl*6;q.setTo(yg.get(ce),yg.get(ce+1),yg.get(ce+2),yg.get(ce+3),yg.get(ce+4),yg.get(ce+5))}else en?(ce=xl*4,q.setTo(yg.get(ce),yg.get(ce+1),yg.get(ce+2),yg.get(ce+3),l.x,l.y)):dk?(ce=xl*2,q.tx=yg.get(ce),q.ty=yg.get(ce+1)):(q.tx=l.x,q.ty=l.y);var dj=l.x/Bo;var Ph=l.y/mf;var Qh=l.get_right()/Bo;var Hk=l.get_bottom()/mf;var wv=0*q.a+0*q.c+q.tx;var zq=0*q.b+0*q.d+q.ty;var xv=Ig*q.a+0*q.c+q.tx;var Gj=Ig*q.b+0*q.d+q.ty;var Aq=0*q.a+ki*q.c+q.tx;var Hj=0*q.b+ki*q.d+q.ty;var im=Ig*q.a+ki*q.c+q.tx;
var Ij=Ig*q.b+ki*q.d+q.ty;zg[Hg]=wv;zg[Hg+1]=zq;zg[Hg+2]=dj;zg[Hg+3]=Ph;zg[Hg+4]=xv;zg[Hg+4+1]=Gj;zg[Hg+4+2]=Qh;zg[Hg+4+3]=Ph;zg[Hg+8]=Aq;zg[Hg+8+1]=Hj;zg[Hg+8+2]=dj;zg[Hg+8+3]=Hk;zg[Hg+12]=im;zg[Hg+12+1]=Ij;zg[Hg+12+2]=Qh;zg[Hg+12+3]=Hk}}}c+=Wg;break;case 9:if(v!=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=ya.DRAW_RECT;var we=h;Ga.tempVerticesVector.set_length(8);Ga.tempVerticesVector.set(0,we.buffer.f[we.fPos]);Ga.tempVerticesVector.set(1,
we.buffer.f[we.fPos+1]);Ga.tempVerticesVector.set(2,we.buffer.f[we.fPos]+we.buffer.f[we.fPos+2]);Ga.tempVerticesVector.set(3,we.buffer.f[we.fPos+1]);Ga.tempVerticesVector.set(4,we.buffer.f[we.fPos]);Ga.tempVerticesVector.set(5,we.buffer.f[we.fPos+1]+we.buffer.f[we.fPos+3]);Ga.tempVerticesVector.set(6,we.buffer.f[we.fPos]+we.buffer.f[we.fPos+2]);Ga.tempVerticesVector.set(7,we.buffer.f[we.fPos+1]+we.buffer.f[we.fPos+3]);Ga.tempIndicesVector.set_length(6);Ga.tempIndicesVector.set(0,0);Ga.tempIndicesVector.set(1,
1);Ga.tempIndicesVector.set(2,2);Ga.tempIndicesVector.set(3,1);Ga.tempIndicesVector.set(4,2);Ga.tempIndicesVector.set(5,3);var Jg=Ga.tempVerticesVector,ek=Ga.tempIndicesVector,li=null;if(z){Ga.tempScale9VerticesVector==null?Ga.tempScale9VerticesVector=ub.toFloatVector(null,Jg.get_length()):Ga.tempScale9VerticesVector.set_length(Jg.get_length());for(var ej=0,Ik=Jg.get_length(),Rh=!0;ej<Ik;)Rh?Ga.tempScale9VerticesVector.set(ej,Ga.toScale9Position(Jg.get(ej),w.x,w.width,g.width,a.__owner.get_scaleX())/
a.__owner.get_scaleX()):Ga.tempScale9VerticesVector.set(ej,Ga.toScale9Position(Jg.get(ej),w.y,w.height,g.height,a.__owner.get_scaleY())/a.__owner.get_scaleY()),++ej,Rh=!Rh;Jg=Ga.tempScale9VerticesVector}v!=null&&li==null&&(li=Ga.tempUvtVector,Ga.populateUvtVector(Jg,v,li));var Xg=ek!=null,Kg=Math.floor(Jg.get_length()/2),Yg=Xg?ek.get_length():Kg,sh=li!=null,lg=sh&&li.get_length()>=Kg*3,fk=lg?4:2,gk=lg?3:2,Tf=fk+2,th=lg?f:d;Ga.resizeVertexBuffer(a,lg,th+Yg*Tf);for(var mg=lg?a.__vertexBufferDataUVT:
a.__vertexBufferData,Lg,Jj,Bq,Cq,xy=0,xz=Yg;xy<xz;){var Co=xy++;Lg=th+Co*Tf;Jj=Xg?ek.get(Co)*2:Co*2;Bq=Xg?ek.get(Co)*gk:Co*gk;lg?(Cq=li.get(Bq+2),mg[Lg]=Jg.get(Jj)/Cq,mg[Lg+1]=Jg.get(Jj+1)/Cq,mg[Lg+2]=0,mg[Lg+3]=1/Cq):(mg[Lg]=Jg.get(Jj),mg[Lg+1]=Jg.get(Jj+1));mg[Lg+fk]=sh?li.get(Bq):0;mg[Lg+fk+1]=sh?li.get(Bq+1):0}lg?f+=Yg*Tf:d+=Yg*Tf}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=ya.DRAW_ROUND_RECT;var Ie=h,yz=Ie.buffer.f[Ie.fPos],zz=Ie.buffer.f[Ie.fPos+
1],Az=Ie.buffer.f[Ie.fPos+2],Bz=Ie.buffer.f[Ie.fPos+3],Dq=Ie.buffer.f[Ie.fPos+4]/2,yy=(Ie.buffer.o[Ie.oPos]!=null?Ie.buffer.o[Ie.oPos]:Ie.buffer.f[Ie.fPos+4])/2,Eq=z&&Ie.buffer.f[Ie.fPos]+Dq<=w.x&&Ie.buffer.f[Ie.fPos]+Ie.buffer.f[Ie.fPos+2]-Dq>=w.x+w.width?1:a.__owner.get_scaleX(),Fq=z&&Ie.buffer.f[Ie.fPos+1]+yy<=w.y&&Ie.buffer.f[Ie.fPos+1]+Ie.buffer.f[Ie.fPos+3]-Dq>=w.y+w.height?1:a.__owner.get_scaleY();kn.buildRoundRectVerticesAndIndices(yz,zz,Az,Bz,Dq,yy,Eq,Fq,Ga.tempVerticesVector,Ga.tempIndicesVector);
var Sh=Ga.tempVerticesVector,jm=Ga.tempIndicesVector,ng=null;if(z){Ga.tempScale9VerticesVector==null?Ga.tempScale9VerticesVector=ub.toFloatVector(null,Sh.get_length()):Ga.tempScale9VerticesVector.set_length(Sh.get_length());for(var Mg=0,zy=Sh.get_length(),Gq=!0;Mg<zy;)Gq?Ga.tempScale9VerticesVector.set(Mg,Ga.toScale9Position(Sh.get(Mg),w.x,w.width,g.width,a.__owner.get_scaleX())/a.__owner.get_scaleX()):Ga.tempScale9VerticesVector.set(Mg,Ga.toScale9Position(Sh.get(Mg),w.y,w.height,g.height,a.__owner.get_scaleY())/
a.__owner.get_scaleY()),++Mg,Gq=!Gq;Sh=Ga.tempScale9VerticesVector}v!=null&&ng==null&&(ng=Ga.tempUvtVector,Ga.populateUvtVector(Sh,v,ng));var Hq=jm!=null,yv=Math.floor(Sh.get_length()/2),km=Hq?jm.get_length():yv,fn=ng!=null,Zg=fn&&ng.get_length()>=yv*3,Ay=Zg?4:2,uh=Zg?3:2,Pd=Ay+2,Cz=Zg?f:d;Ga.resizeVertexBuffer(a,Zg,Cz+km*Pd);for(var lm=Zg?a.__vertexBufferDataUVT:a.__vertexBufferData,yl,Ef,gn,hn,vh=0,By=km;vh<By;){var jn=vh++;yl=Cz+jn*Pd;Ef=Hq?jm.get(jn)*2:jn*2;gn=Hq?jm.get(jn)*uh:jn*uh;Zg?(hn=ng.get(gn+
2),lm[yl]=Sh.get(Ef)/hn,lm[yl+1]=Sh.get(Ef+1)/hn,lm[yl+2]=0,lm[yl+3]=1/hn):(lm[yl]=Sh.get(Ef),lm[yl+1]=Sh.get(Ef+1));lm[yl+Ay]=fn?ng.get(gn):0;lm[yl+Ay+1]=fn?ng.get(gn+1):0}Zg?f+=km*Pd:d+=km*Pd;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=ya.DRAW_TRIANGLES;var mi=h,zv=mi.buffer.o[mi.oPos+1],Jk=mi.buffer.o[mi.oPos],Do=mi.buffer.o[mi.oPos+2];if(z){Ga.tempScale9VerticesVector==null?Ga.tempScale9VerticesVector=ub.toFloatVector(null,Jk.get_length()):
Ga.tempScale9VerticesVector.set_length(Jk.get_length());for(var Bv=0,rA=Jk.get_length(),Tz=!0;Bv<rA;)Tz?Ga.tempScale9VerticesVector.set(Bv,Ga.toScale9Position(Jk.get(Bv),w.x,w.width,g.width,a.__owner.get_scaleX())/a.__owner.get_scaleX()):Ga.tempScale9VerticesVector.set(Bv,Ga.toScale9Position(Jk.get(Bv),w.y,w.height,g.height,a.__owner.get_scaleY())/a.__owner.get_scaleY()),++Bv,Tz=!Tz;Jk=Ga.tempScale9VerticesVector}v!=null&&Do==null&&(Do=Ga.tempUvtVector,Ga.populateUvtVector(Jk,v,Do));var Uz=zv!=null,
gA=Math.floor(Jk.get_length()/2),Ez=Uz?zv.get_length():gA,Vz=Do!=null,Iq=Vz&&Do.get_length()>=gA*3,Wz=Iq?4:2,hA=Iq?3:2,Fz=Wz+2,iA=Iq?f:d;Ga.resizeVertexBuffer(a,Iq,iA+Ez*Fz);for(var Eo=Iq?a.__vertexBufferDataUVT:a.__vertexBufferData,ln,Cy,Gz,Hz,jA=0,sA=Ez;jA<sA;){var Dy=jA++;ln=iA+Dy*Fz;Cy=Uz?zv.get(Dy)*2:Dy*2;Gz=Uz?zv.get(Dy)*hA:Dy*hA;Iq?(Hz=Do.get(Gz+2),Eo[ln]=Jk.get(Cy)/Hz,Eo[ln+1]=Jk.get(Cy+1)/Hz,Eo[ln+2]=0,Eo[ln+3]=1/Hz):(Eo[ln]=Jk.get(Cy),Eo[ln+1]=Jk.get(Cy+1));Eo[ln+Wz]=Vz?Do.get(Gz):0;Eo[ln+
Wz+1]=Vz?Do.get(Gz+1):0}Iq?f+=Ez*Fz:d+=Ez*Fz;break;case 13:v=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 mn=a.__vertexBuffer;if(mn==null||d>a.__vertexBufferCount)mn=n.createVertexBuffer(d,4,0),a.__vertexBuffer=mn,a.__vertexBufferCount=d;mn.uploadFromTypedArray(il.toArrayBufferView(a.__vertexBufferData))}if(f>0){mn=a.__vertexBufferUVT;if(mn==null||f>a.__vertexBufferCountUVT)mn=
n.createVertexBuffer(f,6,0),a.__vertexBufferUVT=mn,a.__vertexBufferCountUVT=f;mn.uploadFromTypedArray(il.toArrayBufferView(a.__vertexBufferDataUVT))}Ha.__pool.release(l);hb.__pool.release(q)};Ga.isCompatible=function(a){if(a.__owner.__worldScale9Grid!=null)return!1;var b=new Dj(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=ya.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};Ga.render=function(a,b){if(a.__visible&&a.__commands.get_length()!=0){if(a.__bitmap!=null&&!a.__dirty||!Ga.isCompatible(a)){b.__softwareRenderer.__pixelRatio=b.__pixelRatio;var c=b.__softwareRenderer.__worldTransform;
b.__softwareRenderer.__worldTransform=a.__owner.__drawableType==7?hb.__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)&&Ga.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 Dj(a.__commands),q=b.__context3D,v=hb.__pool.get(),w=null,z=null,r=!1,G=!1,J=null,L=0,P=0,V=0,ia=0,ea=0,ra=a.__commands.types;ea<ra.length;){var za=ra[ea];++ea;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=ya.BEGIN_BITMAP_FILL;var fb=l;z=fb.buffer.o[fb.oPos];r=fb.buffer.b[fb.bPos];G=fb.buffer.b[fb.bPos+1];J=w=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=ya.BEGIN_FILL;var eb=l;J=(eb.buffer.i[eb.iPos]|0)&16777215|(eb.buffer.f[eb.fPos]*255|0)<<24;z=w=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=w=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=ya.BEGIN_SHADER_FILL;var Ra=l;w=Ra.buffer.o[Ra.oPos];P=0;z=w==null||w.shader==null||w.shader.__bitmap==
null?null:w.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=ya.DRAW_CIRCLE;var wb=l,cb=wb.buffer.f[wb.fPos+2],Tb=Math.PI*(cb+cb)/4|0;Tb<6&&(Tb=6);var Ib=Tb,Mb=Ib*2,tc=(Ib-2)*3,Bd=0;z!=null&&Bd==0&&(Bd=Mb);if(z!=null||w!=null||Bd==0&&J!=null){var Qb=Math.floor(Mb/2),wd=tc>0?tc:Qb,Ae=Bd>=Qb*3,eg=Ae?4:2,Df=eg+2,Ug=Ae?a.__vertexBufferUVT:a.__vertexBuffer,Rf=Ae?ia:V,je=b.__getMatrix(a.__owner.__renderTransform,
1);if(w==null||Ga.maskRender){if(z!=null){var ke=Ga.maskRender?b.__maskShader:b.__initGraphicsShader(null);b.setShader(ke);b.applyMatrix(je);b.applyBitmapData(z,G,r);b.applyAlpha(a.__owner.__worldAlpha);b.applyColorTransform(a.__owner.__worldColorTransform)}else{ke=Ga.maskRender?b.__maskShader:b.__initGraphicsShader(null);b.setShader(ke);b.applyMatrix(je);b.applyBitmapData(Ga.blankBitmapData,!0,r);var ql=J;Ga.tempColorTransform.redOffset=ql>>>16&255;Ga.tempColorTransform.greenOffset=ql>>>8&255;Ga.tempColorTransform.blueOffset=
ql&255;Ga.tempColorTransform.__combine(a.__owner.__worldColorTransform);b.applyAlpha((ql>>>24&255)/255*a.__owner.__worldAlpha);b.applyColorTransform(Ga.tempColorTransform)}b.updateShader()}else ke=b.__initShaderBuffer(w),b.__setShaderBuffer(w),b.applyMatrix(je),b.applyBitmapData(z,!1,r),b.applyAlpha(1),b.applyColorTransform(null),b.__updateShaderBuffer(P);ke.__position!=null&&q.setVertexBufferAt(ke.__position.index,Ug,Rf,Ae?4:2);ke.__textureCoord!=null&&q.setVertexBufferAt(ke.__textureCoord.index,
Ug,Rf+eg,2);q.setCulling(3);q.__drawTriangles(0,wd);P+=wd;Ae?ia+=Df*wd:V+=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=ya.DRAW_ELLIPSE;var rd=l,pe=rd.buffer.f[rd.fPos+2]/2,Lc=rd.buffer.f[rd.fPos+3]/2,Ak=a.__owner.get_scaleX(),Xc=a.__owner.get_scaleY(),gd=Math.PI*(pe*Ak+Lc*Xc)/4|0;gd<6&&(gd=6);var be=gd,Mc=be*2,Wd=(be-2)*3,lf=0;z!=null&&lf==0&&(lf=Mc);if(z!=null||w!=null||lf==0&&J!=null){var jg=
Math.floor(Mc/2),Vg=Wd>0?Wd:jg,qf=lf>=jg*3,Bk=qf?4:2,Ck=Bk+2,bf=qf?a.__vertexBufferUVT:a.__vertexBuffer,kg=qf?ia:V,md=b.__getMatrix(a.__owner.__renderTransform,1);if(w==null||Ga.maskRender){if(z!=null){var rh=Ga.maskRender?b.__maskShader:b.__initGraphicsShader(null);b.setShader(rh);b.applyMatrix(md);b.applyBitmapData(z,G,r);b.applyAlpha(a.__owner.__worldAlpha);b.applyColorTransform(a.__owner.__worldColorTransform)}else{rh=Ga.maskRender?b.__maskShader:b.__initGraphicsShader(null);b.setShader(rh);b.applyMatrix(md);
b.applyBitmapData(Ga.blankBitmapData,!0,r);var em=J;Ga.tempColorTransform.redOffset=em>>>16&255;Ga.tempColorTransform.greenOffset=em>>>8&255;Ga.tempColorTransform.blueOffset=em&255;Ga.tempColorTransform.__combine(a.__owner.__worldColorTransform);b.applyAlpha((em>>>24&255)/255*a.__owner.__worldAlpha);b.applyColorTransform(Ga.tempColorTransform)}b.updateShader()}else rh=b.__initShaderBuffer(w),b.__setShaderBuffer(w),b.applyMatrix(md),b.applyBitmapData(z,!1,r),b.applyAlpha(1),b.applyColorTransform(null),
b.__updateShaderBuffer(P);rh.__position!=null&&q.setVertexBufferAt(rh.__position.index,bf,kg,qf?4:2);rh.__textureCoord!=null&&q.setVertexBufferAt(rh.__textureCoord.index,bf,kg+Bk,2);q.setCulling(3);q.__drawTriangles(0,Vg);P+=Vg;qf?ia+=Ck*Vg:V+=Ck*Vg;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=ya.DRAW_QUADS;var rl=l,Ao=rl.buffer.o[rl.oPos],Dk=rl.buffer.o[rl.oPos+1],ji=Dk!=
null?Dk.get_length():Math.floor(Ao.get_length()/4),sl=b.__getMatrix(a.__owner.__renderTransform,1);if(w==null||Ga.maskRender){if(z!=null){var ve=Ga.maskRender?b.__maskShader:b.__initGraphicsShader(null);b.setShader(ve);b.applyMatrix(sl);b.applyBitmapData(z,G,r);b.applyAlpha(a.__owner.__worldAlpha);b.applyColorTransform(a.__owner.__worldColorTransform)}else{ve=Ga.maskRender?b.__maskShader:b.__initGraphicsShader(null);b.setShader(ve);b.applyMatrix(sl);b.applyBitmapData(Ga.blankBitmapData,!0,r);var tl=
J;Ga.tempColorTransform.redOffset=tl>>>16&255;Ga.tempColorTransform.greenOffset=tl>>>8&255;Ga.tempColorTransform.blueOffset=tl&255;Ga.tempColorTransform.__combine(a.__owner.__worldColorTransform);b.applyAlpha((tl>>>24&255)/255*a.__owner.__worldAlpha);b.applyColorTransform(Ga.tempColorTransform)}b.updateShader()}else ve=b.__initShaderBuffer(w),b.__setShaderBuffer(w),b.applyMatrix(sl),b.applyBitmapData(z,!1,r),b.applyAlpha(a.__owner.__worldAlpha),b.applyColorTransform(a.__owner.__worldColorTransform);
for(var fm=L+ji;L<fm;){ji=Math.min(fm-L,q.__quadIndexBufferElements)|0;if(ji<=0)break;w==null||Ga.maskRender||b.__updateShaderBuffer(P);ve.__position!=null&&q.setVertexBufferAt(ve.__position.index,a.__quadBuffer.vertexBuffer,L*16,2);ve.__textureCoord!=null&&q.setVertexBufferAt(ve.__textureCoord.index,a.__quadBuffer.vertexBuffer,L*16+2,2);q.drawTriangles(q.__quadIndexBuffer,0,ji*2);P+=ji*4;L+=ji}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=ya.DRAW_RECT;var Qe=l;if(z!=null){var ck=0;z!=null&&ck==0&&(ck=8);if(z!=null||w!=null||ck==0&&J!=null){var Ge=ck>=12,He=Ge?4:2,gm=He+2,hm=Ge?a.__vertexBufferUVT:a.__vertexBuffer,dn=Ge?ia:V,Ek=b.__getMatrix(a.__owner.__renderTransform,1);if(w==null||Ga.maskRender){if(z!=null){var Ki=Ga.maskRender?b.__maskShader:b.__initGraphicsShader(null);b.setShader(Ki);b.applyMatrix(Ek);b.applyBitmapData(z,G,r);b.applyAlpha(a.__owner.__worldAlpha);b.applyColorTransform(a.__owner.__worldColorTransform)}else{Ki=
Ga.maskRender?b.__maskShader:b.__initGraphicsShader(null);b.setShader(Ki);b.applyMatrix(Ek);b.applyBitmapData(Ga.blankBitmapData,!0,r);var Sf=J;Ga.tempColorTransform.redOffset=Sf>>>16&255;Ga.tempColorTransform.greenOffset=Sf>>>8&255;Ga.tempColorTransform.blueOffset=Sf&255;Ga.tempColorTransform.__combine(a.__owner.__worldColorTransform);b.applyAlpha((Sf>>>24&255)/255*a.__owner.__worldAlpha);b.applyColorTransform(Ga.tempColorTransform)}b.updateShader()}else Ki=b.__initShaderBuffer(w),b.__setShaderBuffer(w),
b.applyMatrix(Ek),b.applyBitmapData(z,!1,r),b.applyAlpha(1),b.applyColorTransform(null),b.__updateShaderBuffer(P);Ki.__position!=null&&q.setVertexBufferAt(Ki.__position.index,hm,dn,Ge?4:2);Ki.__textureCoord!=null&&q.setVertexBufferAt(Ki.__textureCoord.index,hm,dn+He,2);q.setCulling(3);q.__drawTriangles(0,6);P+=6;Ge?ia+=gm*6:V+=gm*6;q.setCulling(0);b.__clearShader()}}else if(J!=null){var ec=Qe.buffer.f[Qe.fPos],ul=Qe.buffer.f[Qe.fPos+1];f=Qe.buffer.f[Qe.fPos+2];g=Qe.buffer.f[Qe.fPos+3];if(n){var Fk=
Ga.toScale9Position(Qe.buffer.f[Qe.fPos],h.x,h.width,d.width,a.__owner.get_scaleX()),yg=Ga.toScale9Position(Qe.buffer.f[Qe.fPos+1],h.y,h.height,d.height,a.__owner.get_scaleY()),vl=Ga.toScale9Position(Qe.buffer.f[Qe.fPos]+Qe.buffer.f[Qe.fPos+2],h.x,h.width,d.width,a.__owner.get_scaleX()),en=Ga.toScale9Position(Qe.buffer.f[Qe.fPos+1]+Qe.buffer.f[Qe.fPos+3],h.y,h.height,d.height,a.__owner.get_scaleY());ec=Fk/a.__owner.get_scaleX();ul=yg/a.__owner.get_scaleY();f=(vl-Fk)/a.__owner.get_scaleX();g=(en-yg)/
a.__owner.get_scaleY()}v.identity();v.scale(f,g);v.tx=ec;v.ty=ul;v.concat(a.__owner.__renderTransform);var dk=Ga.maskRender?b.__maskShader:b.__initGraphicsShader(null);b.setShader(dk);b.applyMatrix(b.__getMatrix(v,1));b.applyBitmapData(Ga.blankBitmapData,!0,r);var Wg=J;Ga.tempColorTransform.redOffset=Wg>>>16&255;Ga.tempColorTransform.greenOffset=Wg>>>8&255;Ga.tempColorTransform.blueOffset=Wg&255;Ga.tempColorTransform.__combine(a.__owner.__worldColorTransform);b.applyAlpha((Wg>>>24&255)/255*a.__owner.__worldAlpha);
b.applyColorTransform(Ga.tempColorTransform);b.updateShader();var zg=Ga.blankBitmapData.getVertexBuffer(q);dk.__position!=null&&q.setVertexBufferAt(dk.__position.index,zg,0,3);dk.__textureCoord!=null&&q.setVertexBufferAt(dk.__textureCoord.index,zg,3,2);var Bo=Ga.blankBitmapData.getIndexBuffer(q);q.drawTriangles(Bo);P+=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=ya.DRAW_ROUND_RECT;var mf=l,wl=mf.buffer.f[mf.fPos+4]/2,
yq=(mf.buffer.o[mf.oPos]!=null?mf.buffer.o[mf.oPos]:mf.buffer.f[mf.fPos+4])/2,xl=n&&mf.buffer.f[mf.fPos]+wl<=h.x&&mf.buffer.f[mf.fPos]+mf.buffer.f[mf.fPos+2]-wl>=h.x+h.width?1:a.__owner.get_scaleX(),Hg=n&&mf.buffer.f[mf.fPos+1]+yq<=h.y&&mf.buffer.f[mf.fPos+1]+mf.buffer.f[mf.fPos+3]-wl>=h.y+h.height?1:a.__owner.get_scaleY(),Gk=Math.ceil(Math.PI*(wl*xl+yq*Hg)/8);Gk<3&&(Gk=3);var Ig=Gk*4,ki=Ig*2,ce=(Ig-2)*3,dj=0;z!=null&&dj==0&&(dj=ki);if(z!=null||w!=null||dj==0&&J!=null){var Ph=Math.floor(ki/2),Qh=
ce>0?ce:Ph,Hk=dj>=Ph*3,wv=Hk?4:2,zq=wv+2,xv=Hk?a.__vertexBufferUVT:a.__vertexBuffer,Gj=Hk?ia:V,Aq=b.__getMatrix(a.__owner.__renderTransform,1);if(w==null||Ga.maskRender){if(z!=null){var Hj=Ga.maskRender?b.__maskShader:b.__initGraphicsShader(null);b.setShader(Hj);b.applyMatrix(Aq);b.applyBitmapData(z,G,r);b.applyAlpha(a.__owner.__worldAlpha);b.applyColorTransform(a.__owner.__worldColorTransform)}else{Hj=Ga.maskRender?b.__maskShader:b.__initGraphicsShader(null);b.setShader(Hj);b.applyMatrix(Aq);b.applyBitmapData(Ga.blankBitmapData,
!0,r);var im=J;Ga.tempColorTransform.redOffset=im>>>16&255;Ga.tempColorTransform.greenOffset=im>>>8&255;Ga.tempColorTransform.blueOffset=im&255;Ga.tempColorTransform.__combine(a.__owner.__worldColorTransform);b.applyAlpha((im>>>24&255)/255*a.__owner.__worldAlpha);b.applyColorTransform(Ga.tempColorTransform)}b.updateShader()}else Hj=b.__initShaderBuffer(w),b.__setShaderBuffer(w),b.applyMatrix(Aq),b.applyBitmapData(z,!1,r),b.applyAlpha(1),b.applyColorTransform(null),b.__updateShaderBuffer(P);Hj.__position!=
null&&q.setVertexBufferAt(Hj.__position.index,xv,Gj,Hk?4:2);Hj.__textureCoord!=null&&q.setVertexBufferAt(Hj.__textureCoord.index,xv,Gj+wv,2);q.setCulling(3);q.__drawTriangles(0,Qh);P+=Qh;Hk?ia+=zq*Qh:V+=zq*Qh;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=ya.DRAW_TRIANGLES;var Ij=l,we=Ij.buffer.o[Ij.oPos+1],Jg=Ij.buffer.o[Ij.oPos+2],ek=Ij.buffer.o[Ij.oPos+3],li=Ij.buffer.o[Ij.oPos].get_length(),ej=we!=
null?we.get_length():0,Ik=Jg!=null?Jg.get_length():0;z!=null&&Ik==0&&(Ik=li);if(z!=null||w!=null||Ik==0&&J!=null){var Rh=Math.floor(li/2),Xg=ej>0?ej:Rh,Kg=Ik>=Rh*3,Yg=Kg?4:2,sh=Yg+2,lg=Kg?a.__vertexBufferUVT:a.__vertexBuffer,fk=Kg?ia:V,gk=b.__getMatrix(a.__owner.__renderTransform,1);if(w==null||Ga.maskRender){if(z!=null){var Tf=Ga.maskRender?b.__maskShader:b.__initGraphicsShader(null);b.setShader(Tf);b.applyMatrix(gk);b.applyBitmapData(z,G,r);b.applyAlpha(a.__owner.__worldAlpha);b.applyColorTransform(a.__owner.__worldColorTransform)}else{Tf=
Ga.maskRender?b.__maskShader:b.__initGraphicsShader(null);b.setShader(Tf);b.applyMatrix(gk);b.applyBitmapData(Ga.blankBitmapData,!0,r);var th=J;Ga.tempColorTransform.redOffset=th>>>16&255;Ga.tempColorTransform.greenOffset=th>>>8&255;Ga.tempColorTransform.blueOffset=th&255;Ga.tempColorTransform.__combine(a.__owner.__worldColorTransform);b.applyAlpha((th>>>24&255)/255*a.__owner.__worldAlpha);b.applyColorTransform(Ga.tempColorTransform)}b.updateShader()}else Tf=b.__initShaderBuffer(w),b.__setShaderBuffer(w),
b.applyMatrix(gk),b.applyBitmapData(z,!1,r),b.applyAlpha(1),b.applyColorTransform(null),b.__updateShaderBuffer(P);Tf.__position!=null&&q.setVertexBufferAt(Tf.__position.index,lg,fk,Kg?4:2);Tf.__textureCoord!=null&&q.setVertexBufferAt(Tf.__textureCoord.index,lg,fk+Yg,2);switch(ek){case 0:q.setCulling(0);break;case 1:q.setCulling(3);break;case 2:q.setCulling(1)}q.__drawTriangles(0,Xg);P+=Xg;Kg?ia+=sh*Xg:V+=sh*Xg;switch(ek){case 1:case 2:q.setCulling(0)}b.__clearShader()}break;case 13:w=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=ya.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=ya.OVERRIDE_BLEND_MODE;var mg=l;b.__setBlendMode(mg.buffer.o[mg.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}}hb.__pool.release(v)}a.set___dirty(!1)}a.__hardwareDirty=
!1}};Ga.renderMask=function(a,b){Ga.maskRender=!0;Ga.render(a,b);Ga.maskRender=!1};Ga.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)}};Ga.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)};Ga.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};Ga.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 kn=function(){};t["openfl.display._internal._Context3DGraphics.PolygonFunctions"]=kn;kn.__name__="openfl.display._internal._Context3DGraphics.PolygonFunctions";kn.getEllipseNumVertices=function(a,b){a=Math.PI*(a+b)/
4|0;a<6&&(a=6);return a};kn.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,v=f;q<v;){var w=q++;h.set(w*2,Math.cos(l)*c+a+c);h.set(w*2+1,Math.sin(l)*d+b+d);l+=g}n.set_length((f-2)*3);q=0;for(v=f-2;q<v;)w=q++,n.set(w*3,0),n.set(w*3+1,w+1),n.set(w*3+2,w+2)};kn.getRoundRectNumVertices=function(a,b){a=Math.ceil(Math.PI*(a+b)/8);a<3&&(a=3);return a*4};kn.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 v=n/4|0,w=Math.PI/2/(v-1),z=0,r=c-f-f,G=d-g-g,J=!0;l.set_length(n*2);var L=0,P=v;for(h=0;h<4;){for(h++;L<P;)l.set(L*2,r+Math.cos(z)*f+a+f),l.set(L*2+1,G+Math.sin(z)*g+b+g),z+=w,++L;z-=w;J?r=r==0?c-f-f:0:G=G==0?d-g-g:0;J=!J;P+=v}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 Ym=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}");Yh.call(this);this.__isGenerated=!0;this.__initGL()};t["openfl.display._internal.Context3DMaskShader"]=Ym;Ym.__name__="openfl.display._internal.Context3DMaskShader";
Ym.__super__=Yh;Ym.prototype=I(Yh.prototype,{openfl_Position:null,openfl_TextureCoord:null,openfl_Matrix:null,openfl_Texture:null,__class__:Ym});var Kj=function(){};t["openfl.display._internal.Context3DShape"]=Kj;Kj.__name__="openfl.display._internal.Context3DShape";Kj.render=function(a,b){if(a.__renderable&&!(a.__worldAlpha<=0)){var c=a.__graphics;if(c!=null){b.__setBlendMode(a.__worldBlendMode);b.__pushMaskObject(a);Ga.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=hb.__pool.get();g.scale(1/c.__bitmapScaleX,1/c.__bitmapScaleY);g.concat(c.__worldTransform);b.applyMatrix(b.__getMatrix(g,1));hb.__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)}}};Kj.renderMask=function(a,b){var c=a.__graphics;if(c!=null&&(Ga.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 nv=function(){};t["openfl.display._internal.Context3DSimpleButton"]=nv;nv.__name__="openfl.display._internal.Context3DSimpleButton";nv.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))};nv.renderDrawableMask=function(a,b){a.__currentState!=null&&b.__renderDrawableMask(a.__currentState)};var pl=function(){};t["openfl.display._internal.Context3DTextField"]=
pl;pl.__name__="openfl.display._internal.Context3DTextField";pl.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 Ha);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=hb.__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);hb.__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 v=N.hex(d.backgroundColor&16777215,6);oa.context.fillStyle="#"+v;oa.context.fill()}d.border&&(oa.context.lineWidth=1,v=N.hex(d.borderColor&16777215,6),oa.context.strokeStyle="#"+v,oa.context.stroke())}oa.context.textBaseline=
"alphabetic";oa.context.textAlign="start";c=-a.get_scrollH();var w=h=0;for(v=a.get_scrollV()-1;w<v;){var z=w++;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 G="#"+N.hex(q.format.color&16777215,6);oa.context.font=Uc.getFont(q.format);oa.context.fillStyle=G;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){w=r=0;for(v=a.__caretIndex-q.startIndex;w<v;){z=w++;if(q.positions.length<=z)break;r+=q.positions[z]}w=0;v=a.get_scrollV();for(z=q.lineIndex+1;v<z;){var J=v++;w+=d.lineHeights.get(J-1)}oa.context.beginPath();v=N.hex(q.format.color&16777215,6);oa.context.strokeStyle="#"+v;oa.context.moveTo(q.offsetX+r-a.get_scrollH()-g.x,w+2-g.y);oa.context.lineWidth=1;oa.context.lineTo(q.offsetX+
r-a.get_scrollH()-g.x,w+Uc.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,w=Math.max(a.__selectionIndex,a.__caretIndex)|0,q.startIndex>r&&(r=q.startIndex),
q.endIndex<w&&(w=q.endIndex),z=a.getCharBoundaries(r),w>=q.endIndex?(v=a.getCharBoundaries(q.endIndex-1),v!=null&&(v.x+=v.width+2)):v=a.getCharBoundaries(w),z!=null&&v!=null&&(oa.context.fillStyle="#000000",oa.context.fillRect(z.x+c-g.x,z.y+h,v.x-z.x,q.height),oa.context.fillStyle="#FFFFFF",oa.context.fillText(f.substring(r,w),c+z.x-g.x,q.offsetY+q.ascent+h));q.format.underline&&(oa.context.beginPath(),oa.context.strokeStyle=G,oa.context.lineWidth=1,r=q.offsetX+c-g.x,w=Math.ceil(q.offsetY+h+q.ascent-
g.y)+Math.floor(q.ascent*.185)+.5,oa.context.moveTo(r,w),oa.context.lineTo(r+q.width,w),oa.context.stroke(),oa.context.closePath());q.format.strikethrough&&(oa.context.beginPath(),oa.context.strokeStyle=G,oa.context.lineWidth=1,G=q.offsetX+c-g.x,r=Math.ceil(q.offsetY+h+2*q.ascent/3-g.y),oa.context.moveTo(G,r),oa.context.lineTo(G+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&&(v=N.hex(d.backgroundColor&16777215,6),oa.context.fillStyle="#"+v,oa.context.fill()),d.border&&(oa.context.lineWidth=1,oa.context.lineCap="square",v=N.hex(d.borderColor&16777215,6),oa.context.strokeStyle="#"+v,oa.context.stroke());if(a.__caretIndex>-1&&d.selectable&&a.__showCursor){c=-a.get_scrollH()+(f?0:h);w=h=0;for(v=a.get_scrollV()-1;w<v;)z=w++,h+=d.lineHeights.get(z);oa.context.beginPath();v=N.hex(a.get_defaultTextFormat().color&16777215,6);oa.context.strokeStyle="#"+v;oa.context.moveTo(c+
2.5,h+2.5);oa.context.lineWidth=1;oa.context.lineTo(c+2.5,h+Uc.getFormatHeight(a.get_defaultTextFormat())-1);oa.context.stroke();oa.context.closePath()}}b.__bitmap==null?b.__bitmap=yc.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=yc.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};pl.renderDrawable=function(a,b){b.__updateCacheBitmap(a,!1);if(a.__cacheBitmap==null||a.__isCacheBitmapRender){if(pl.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=Ha.__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);Ha.__pool.release(d)}a.__graphics!=null&&Kj.render(a,b)}}else bj.render(a.__cacheBitmap,b);b.__renderEvent(a)};pl.renderDrawableMask=function(a,b){pl.renderMask(a,b);ol.renderDrawableMask(a,b)};pl.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 Ha);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=hb.__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);hb.__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 v=N.hex(d.backgroundColor&
16777215,6);oa.context.fillStyle="#"+v;oa.context.fill()}d.border&&(oa.context.lineWidth=1,v=N.hex(d.borderColor&16777215,6),oa.context.strokeStyle="#"+v,oa.context.stroke())}oa.context.textBaseline="alphabetic";oa.context.textAlign="start";c=-a.get_scrollH();var w=h=0;for(v=a.get_scrollV()-1;w<v;){var z=w++;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 G="#"+N.hex(q.format.color&
16777215,6);oa.context.font=Uc.getFont(q.format);oa.context.fillStyle=G;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){w=r=0;for(v=a.__caretIndex-q.startIndex;w<v;){z=w++;if(q.positions.length<=z)break;r+=q.positions[z]}w=0;v=a.get_scrollV();for(z=q.lineIndex+1;v<z;){var J=v++;w+=d.lineHeights.get(J-
1)}oa.context.beginPath();v=N.hex(q.format.color&16777215,6);oa.context.strokeStyle="#"+v;oa.context.moveTo(q.offsetX+r-a.get_scrollH()-g.x,w+2-g.y);oa.context.lineWidth=1;oa.context.lineTo(q.offsetX+r-a.get_scrollH()-g.x,w+Uc.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,w=Math.max(a.__selectionIndex,a.__caretIndex)|0,q.startIndex>r&&(r=q.startIndex),q.endIndex<w&&(w=q.endIndex),z=a.getCharBoundaries(r),w>=q.endIndex?(v=a.getCharBoundaries(q.endIndex-1),v!=null&&(v.x+=v.width+2)):v=a.getCharBoundaries(w),z!=null&&v!=null&&(oa.context.fillStyle="#000000",oa.context.fillRect(z.x+c-g.x,z.y+h,v.x-z.x,q.height),oa.context.fillStyle="#FFFFFF",oa.context.fillText(f.substring(r,
w),c+z.x-g.x,q.offsetY+q.ascent+h));q.format.underline&&(oa.context.beginPath(),oa.context.strokeStyle=G,oa.context.lineWidth=1,r=q.offsetX+c-g.x,w=Math.ceil(q.offsetY+h+q.ascent-g.y)+Math.floor(q.ascent*.185)+.5,oa.context.moveTo(r,w),oa.context.lineTo(r+q.width,w),oa.context.stroke(),oa.context.closePath());q.format.strikethrough&&(oa.context.beginPath(),oa.context.strokeStyle=G,oa.context.lineWidth=1,G=q.offsetX+c-g.x,r=Math.ceil(q.offsetY+h+2*q.ascent/3-g.y),oa.context.moveTo(G,r),oa.context.lineTo(G+
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&&(v=N.hex(d.backgroundColor&16777215,6),oa.context.fillStyle="#"+v,oa.context.fill()),d.border&&(oa.context.lineWidth=1,oa.context.lineCap="square",v=N.hex(d.borderColor&16777215,6),oa.context.strokeStyle="#"+v,oa.context.stroke());if(a.__caretIndex>-1&&d.selectable&&a.__showCursor){c=-a.get_scrollH()+(f?0:h);
w=h=0;for(v=a.get_scrollV()-1;w<v;)z=w++,h+=d.lineHeights.get(z);oa.context.beginPath();v=N.hex(a.get_defaultTextFormat().color&16777215,6);oa.context.strokeStyle="#"+v;oa.context.moveTo(c+2.5,h+2.5);oa.context.lineWidth=1;oa.context.lineTo(c+2.5,h+Uc.getFormatHeight(a.get_defaultTextFormat())-1);oa.context.stroke();oa.context.closePath()}}b.__bitmap==null?b.__bitmap=yc.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=yc.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 Ja=function(){};t["openfl.display._internal.Context3DTilemap"]=Ja;Ja.__name__="openfl.display._internal.Context3DTilemap";Ja.buildBuffer=function(a,b){if(!a.__renderable||a.__group.__tiles.length==0||a.__worldAlpha<=0)a.__group.__dirty=!1;else{Ja.numTiles=0;Ja.vertexBufferData=a.__buffer!=
null?a.__buffer.vertexBufferData:null;Ja.vertexDataPosition=0;var c=Ha.__pool.get(),d=hb.__pool.get(),f=hb.__pool.get();Ja.dataPerVertex=4;a.tileAlphaEnabled&&Ja.dataPerVertex++;a.tileColorTransformEnabled&&(Ja.dataPerVertex+=8);Ja.buildBufferTileContainer(a,a.__group,b,f,a.__tileset,a.tileAlphaEnabled,a.__worldAlpha,a.tileColorTransformEnabled,a.__worldColorTransform,null,c,d);a.__buffer.flushVertexBufferData();Ha.__pool.release(c);hb.__pool.release(d);hb.__pool.release(f)}};Ja.buildBufferTileContainer=
function(a,b,c,d,f,g,h,n,l,q,v,w,z){z==null&&(z=!0);var r=hb.__pool.get(),G=c.__roundPixels,J=b.__tiles;z&&Ja.resizeBuffer(a,Ja.numTiles+Ja.getRecursiveLength(b));z=null;for(var L,P,V,ia,ea,ra,za,fb,eb,Ra,wb,cb=g?5:4,Tb=0;Tb<J.length;){ia=J[Tb];++Tb;r.setTo(1,0,0,1,-ia.get_originX(),-ia.get_originY());r.concat(ia.get_matrix());r.concat(d);G&&(r.tx=Math.round(r.tx),r.ty=Math.round(r.ty));var Ib=ia.get_tileset()!=null?ia.get_tileset():f;var Mb=ia.get_alpha()*h;var tc=ia.get_visible();ia.__dirty=!1;
if(tc&&!(Mb<=0))if(n&&(ia.get_colorTransform()!=null?l==null?z=ia.get_colorTransform():(Ja.cacheColorTransform==null&&(Ja.cacheColorTransform=new id),z=Ja.cacheColorTransform,z.redMultiplier=l.redMultiplier*ia.get_colorTransform().redMultiplier,z.greenMultiplier=l.greenMultiplier*ia.get_colorTransform().greenMultiplier,z.blueMultiplier=l.blueMultiplier*ia.get_colorTransform().blueMultiplier,z.alphaMultiplier=l.alphaMultiplier*ia.get_colorTransform().alphaMultiplier,z.redOffset=l.redOffset+ia.get_colorTransform().redOffset,
z.greenOffset=l.greenOffset+ia.get_colorTransform().greenOffset,z.blueOffset=l.blueOffset+ia.get_colorTransform().blueOffset,z.alphaOffset=l.alphaOffset+ia.get_colorTransform().alphaOffset):z=l),g||(Mb=1),ia.__length>0)Ja.buildBufferTileContainer(a,ia,c,r,Ib,g,Mb,n,z,q,v,w,!1);else if(Ib!=null&&(tc=ia.get_id(),L=Ib.__bitmapData,L!=null)){if(tc==-1){P=ia.__rect;if(P==null||P.width<=0||P.height<=0)continue;Ib=P.x/L.width;ia=P.y/L.height;tc=P.get_right()/L.width;ea=P.get_bottom()/L.height}else{L=Ib.__data[tc];
if(L==null)continue;v.setTo(L.x,L.y,L.width,L.height);P=v;Ib=L.__uvX;ia=L.__uvY;tc=L.__uvWidth;ea=L.__uvHeight}L=P.width;V=P.height;P=0*r.a+0*r.c+r.tx;ra=0*r.b+0*r.d+r.ty;za=L*r.a+0*r.c+r.tx;fb=L*r.b+0*r.d+r.ty;eb=0*r.a+V*r.c+r.tx;Ra=0*r.b+V*r.d+r.ty;wb=L*r.a+V*r.c+r.tx;V=L*r.b+V*r.d+r.ty;L=Ja.vertexDataPosition;Ja.vertexBufferData[L]=P;Ja.vertexBufferData[L+1]=ra;Ja.vertexBufferData[L+2]=Ib;Ja.vertexBufferData[L+3]=ia;Ja.vertexBufferData[L+Ja.dataPerVertex]=za;Ja.vertexBufferData[L+Ja.dataPerVertex+
1]=fb;Ja.vertexBufferData[L+Ja.dataPerVertex+2]=tc;Ja.vertexBufferData[L+Ja.dataPerVertex+3]=ia;Ja.vertexBufferData[L+Ja.dataPerVertex*2]=eb;Ja.vertexBufferData[L+Ja.dataPerVertex*2+1]=Ra;Ja.vertexBufferData[L+Ja.dataPerVertex*2+2]=Ib;Ja.vertexBufferData[L+Ja.dataPerVertex*2+3]=ea;Ja.vertexBufferData[L+Ja.dataPerVertex*3]=wb;Ja.vertexBufferData[L+Ja.dataPerVertex*3+1]=V;Ja.vertexBufferData[L+Ja.dataPerVertex*3+2]=tc;Ja.vertexBufferData[L+Ja.dataPerVertex*3+3]=ea;g&&(Ja.vertexBufferData[L+Ja.dataPerVertex*
0+4]=Mb,Ja.vertexBufferData[L+Ja.dataPerVertex+4]=Mb,Ja.vertexBufferData[L+Ja.dataPerVertex*2+4]=Mb,Ja.vertexBufferData[L+Ja.dataPerVertex*3+4]=Mb);if(n)if(z!=null)for(Mb=0;Mb<4;)Ib=Mb++,Ja.vertexBufferData[L+Ja.dataPerVertex*Ib+cb]=z.redMultiplier,Ja.vertexBufferData[L+Ja.dataPerVertex*Ib+cb+1]=z.greenMultiplier,Ja.vertexBufferData[L+Ja.dataPerVertex*Ib+cb+2]=z.blueMultiplier,Ja.vertexBufferData[L+Ja.dataPerVertex*Ib+cb+3]=z.alphaMultiplier,Ja.vertexBufferData[L+Ja.dataPerVertex*Ib+cb+4]=z.redOffset,
Ja.vertexBufferData[L+Ja.dataPerVertex*Ib+cb+5]=z.greenOffset,Ja.vertexBufferData[L+Ja.dataPerVertex*Ib+cb+6]=z.blueOffset,Ja.vertexBufferData[L+Ja.dataPerVertex*Ib+cb+7]=z.alphaOffset;else for(Mb=0;Mb<4;)Ib=Mb++,Ja.vertexBufferData[L+Ja.dataPerVertex*Ib+cb]=1,Ja.vertexBufferData[L+Ja.dataPerVertex*Ib+cb+1]=1,Ja.vertexBufferData[L+Ja.dataPerVertex*Ib+cb+2]=1,Ja.vertexBufferData[L+Ja.dataPerVertex*Ib+cb+3]=1,Ja.vertexBufferData[L+Ja.dataPerVertex*Ib+cb+4]=0,Ja.vertexBufferData[L+Ja.dataPerVertex*Ib+
cb+5]=0,Ja.vertexBufferData[L+Ja.dataPerVertex*Ib+cb+6]=0,Ja.vertexBufferData[L+Ja.dataPerVertex*Ib+cb+7]=0;Ja.vertexDataPosition+=Ja.dataPerVertex*4}}b.__dirty=!1;hb.__pool.release(r)};Ja.flush=function(a,b,c){Ja.currentShader==null&&(Ja.currentShader=b.__defaultDisplayShader);if(Ja.bufferPosition>Ja.lastFlushedPosition&&Ja.currentBitmapData!=null&&Ja.currentShader!=null){var d=b.__initDisplayShader(Ja.currentShader);b.setShader(d);b.applyBitmapData(Ja.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=Ja.lastFlushedPosition*Ja.dataPerVertex*4,g;Ja.lastFlushedPosition<Ja.bufferPosition;){g=Math.min(Ja.bufferPosition-Ja.lastFlushedPosition,Ja.context.__quadIndexBufferElements)|0;if(g<=0)break;d.__position!=
null&&Ja.context.setVertexBufferAt(d.__position.index,c,f,2);d.__textureCoord!=null&&Ja.context.setVertexBufferAt(d.__textureCoord.index,c,f+2,2);a.tileAlphaEnabled&&d.__alpha!=null&&Ja.context.setVertexBufferAt(d.__alpha.index,c,f+4,1);if(a.tileColorTransformEnabled){var h=a.tileAlphaEnabled?5:4;d.__colorMultiplier!=null&&Ja.context.setVertexBufferAt(d.__colorMultiplier.index,c,f+h,4);d.__colorOffset!=null&&Ja.context.setVertexBufferAt(d.__colorOffset.index,c,f+h+4,4)}Ja.context.drawTriangles(Ja.context.__quadIndexBuffer,
0,g*2);Ja.lastFlushedPosition+=g}b.__clearShader()}Ja.lastUsedBitmapData=Ja.currentBitmapData;Ja.lastUsedShader=Ja.currentShader};Ja.getRecursiveLength=function(a){a=a.__tiles;for(var b=0,c=0;c<a.length;){var d=a[c];++c;d.__length>0?b+=Ja.getRecursiveLength(d):++b}return b};Ja.render=function(a,b){if(a.__renderable&&!(a.__worldAlpha<=0)&&(Ja.context=b.__context3D,Ja.buildBuffer(a,b),Ja.numTiles!=0)){Ja.bufferPosition=0;Ja.lastFlushedPosition=0;Ja.lastUsedBitmapData=null;Ja.lastUsedShader=null;Ja.currentBitmapData=
null;Ja.currentShader=null;Ja.currentBlendMode=a.__worldBlendMode;a.tileBlendModeEnabled||b.__setBlendMode(Ja.currentBlendMode);b.__pushMaskObject(a);var c=Ha.__pool.get();c.setTo(0,0,a.__width,a.__height);b.__pushMaskRect(c,a.__renderTransform);Ja.renderTileContainer(a,b,a.__group,a.__worldShader,a.__tileset,a.__worldAlpha,a.tileBlendModeEnabled,Ja.currentBlendMode,null);Ja.flush(a,b,Ja.currentBlendMode);b.__popMaskRect();b.__popMaskObject(a);Ha.__pool.release(c)}};Ja.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=Ha.__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);Ha.__pool.release(d)}a.__graphics!=null&&Kj.render(a,b)}Ja.render(a,b)}else bj.render(a.__cacheBitmap,b);b.__renderEvent(a)};Ja.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&&Kj.renderMask(a,b);Ja.renderMask(a,b)};Ja.renderTileContainer=function(a,b,c,d,f,g,h,n,l){c=c.__tiles;for(var q,v,w,z=null,r,G=0;G<c.length;){var J=
c[G];++G;q=J.get_tileset()!=null?J.get_tileset():f;v=J.get_alpha()*g;if((w=J.get_visible())&&!(v<=0))if(w=J.get_shader()!=null?J.get_shader():d,h&&(z=J.__blendMode!=null?J.__blendMode:n),J.__length>0)Ja.renderTileContainer(a,b,J,w,q,v,h,z,l);else if(q!=null&&(r=J.get_id(),v=q.__bitmapData,v!=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;(Ja.bufferPosition-Ja.lastFlushedPosition>=16383||w!=Ja.currentShader||v!=Ja.currentBitmapData&&
Ja.currentBitmapData!=null||Ja.currentBlendMode!=z)&&Ja.flush(a,b,Ja.currentBlendMode);Ja.currentBitmapData=v;Ja.currentShader=w;Ja.currentBlendMode=z;Ja.bufferPosition++}}};Ja.renderMask=function(a,b){};Ja.resizeBuffer=function(a,b){Ja.numTiles=b;a.__buffer==null?a.__buffer=new mm(Ja.context,Av.QUADS,Ja.numTiles,Ja.dataPerVertex):a.__buffer.resize(Ja.numTiles,Ja.dataPerVertex);Ja.vertexBufferData=a.__buffer.vertexBufferData};var cj=function(){};t["openfl.display._internal.Context3DVideo"]=cj;cj.__name__=
"openfl.display._internal.Context3DVideo";cj.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&&
(cj.__textureSizeValue[0]=a.__stream!=null?a.__stream.__video.videoWidth:0,cj.__textureSizeValue[1]=a.__stream!=null?a.__stream.__video.videoHeight:0,f.__textureSize.value=cj.__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)}}};cj.renderDrawable=function(a,b){cj.render(a,b);b.__renderEvent(a)};cj.renderDrawableMask=function(a,b){cj.renderMask(a,b)};cj.renderMask=function(a,b){if(a.__stream!=null&&a.__stream.__video!=null){var c=b.__context3D,
d=b.__maskShader;b.setShader(d);b.applyBitmapData(Ym.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 ae=function(){};t["openfl.display._internal.DOMBitmap"]=ae;ae.__name__="openfl.display._internal.DOMBitmap";ae.clear=function(a,
b){oh.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)};ae.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:")?
ae.renderCanvas(a,b):ae.renderImage(a,b)}else ae.renderCanvas(a,b);b.__popMaskObject(a)}else ae.clear(a,b)};ae.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&&(zb.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)};ae.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)):fj.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 fj.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:")?ae.renderCanvas(a,b):ae.renderImage(a,b)):ae.renderCanvas(a,b),b.__popMaskObject(a)):ae.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:")?ae.renderCanvas(c,b):ae.renderImage(c,b)):ae.renderCanvas(c,b),b.__popMaskObject(c)):ae.clear(c,b);b.__renderEvent(a)};ae.renderDrawableClear=function(a,b){ae.clear(a,b)};
ae.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 oh=function(){};t["openfl.display._internal.DOMDisplayObject"]=oh;oh.__name__="openfl.display._internal.DOMDisplayObject";oh.clear=function(a,b){a.__cacheBitmap!=
null&&ae.clear(a.__cacheBitmap,b);fj.clear(a,b)};oh.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)):
fj.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 fj.clear(a,b)};oh.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)):fj.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 fj.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:")?
ae.renderCanvas(c,b):ae.renderImage(c,b)):ae.renderCanvas(c,b),b.__popMaskObject(c)):ae.clear(c,b);b.__renderEvent(a)};oh.renderDrawableClear=function(a,b){oh.clear(a,b)};var Yu=function(){};t["openfl.display._internal.DOMDisplayObjectContainer"]=Yu;Yu.__name__="openfl.display._internal.DOMDisplayObjectContainer";Yu.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);oh.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)}fj.clear(a,b);a.__cacheBitmap.stage=
a.stage}};Yu.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)}oh.clear(a,b)};var fj=function(){};t["openfl.display._internal.DOMShape"]=fj;fj.__name__="openfl.display._internal.DOMShape";fj.clear=function(a,
b){a.__canvas!=null&&(b.element.removeChild(a.__canvas),a.__canvas=null,a.__style=null)};fj.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)):fj.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 fj.clear(a,b)};var Zu=function(){};t["openfl.display._internal.DOMSimpleButton"]=Zu;Zu.__name__="openfl.display._internal.DOMSimpleButton";Zu.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)};Zu.renderDrawableClear=function(a,b){oh.renderDrawableClear(a,b)};var ph=function(){};t["openfl.display._internal.DOMTextField"]=ph;ph.__name__="openfl.display._internal.DOMTextField";ph.clear=function(a,b){oh.clear(a,b);a.__div!=null&&(b.element.removeChild(a.__div),a.__div=null,a.__style=null)};ph.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",Uc.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=F.string(b.width-4)+"px");b.__measuredHeight=c.clientHeight;a.__div==null&&window.document.body.removeChild(c)};ph.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(w){w.preventDefault();a.get_htmlText()!=a.__div.innerHTML&&(a.set_htmlText(a.__div.innerHTML),a.__dirty=!1,a.dispatchEvent(new Gg("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(ic.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: "+Uc.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 v="text-decoration: underline; ";q.format.color!=null&&(v+="color: #"+N.hex(q.format.color&16777215,6)+"; ");h+="<a style='"+v+"' 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 ph.clear(a,b)};ph.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(w){w.preventDefault();a.get_htmlText()!=a.__div.innerHTML&&(a.set_htmlText(a.__div.innerHTML),a.__dirty=!1,a.dispatchEvent(new Gg("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(ic.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: "+Uc.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 v="text-decoration: underline; ";q.format.color!=null&&
(v+="color: #"+N.hex(q.format.color&16777215,6)+"; ");h+="<a style='"+v+"' 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 ph.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:")?ae.renderCanvas(c,b):ae.renderImage(c,b)):ae.renderCanvas(c,b),b.__popMaskObject(c)):ae.clear(c,b);b.__renderEvent(a)};ph.renderDrawableClear=function(a,b){ph.clear(a,b)};ph.__getAttributeMatch=function(a){return a.matched(2)!=null?a.matched(2):a.matched(3)};
var zk=function(){};t["openfl.display._internal.DOMTilemap"]=zk;zk.__name__="openfl.display._internal.DOMTilemap";zk.clear=function(a,b){oh.clear(a,b);a.__canvas!=null&&(b.element.removeChild(a.__canvas),a.__canvas=null,a.__style=null)};zk.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=hb.__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 v=h.__worldTransform;g=d.context;var w=a.__scrollRect;if(w==null||w.width>0&&w.height>0)d.__setBlendMode(a.__worldBlendMode),d.__pushMaskObject(a),g.globalAlpha=f,
f=hb.__pool.get(),f.scale(1/h.__bitmapScaleX,1/h.__bitmapScaleY),f.concat(v),d.setTransform(f,g),g.drawImage(q,0,0,n,l),hb.__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=Ha.__pool.get(),h.setTo(0,0,a.__width,a.__height),d.__pushMaskRect(h,a.__renderTransform),d.__allowSmoothing&&a.smoothing||(g.imageSmoothingEnabled=!1),Cj.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),Ha.__pool.release(h)));a.__renderTransform=c;b.__canvasRenderer.context=null;b.__updateClip(a);b.__applyStyle(a,!0,!1,!0)}else zk.clear(a,b)};zk.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=hb.__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 v=h.__worldTransform;g=d.context;var w=a.__scrollRect;if(w==null||w.width>0&&w.height>0)d.__setBlendMode(a.__worldBlendMode),d.__pushMaskObject(a),g.globalAlpha=f,f=hb.__pool.get(),f.scale(1/h.__bitmapScaleX,1/h.__bitmapScaleY),f.concat(v),d.setTransform(f,g),g.drawImage(q,0,0,n,l),hb.__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=Ha.__pool.get(),h.setTo(0,0,a.__width,a.__height),d.__pushMaskRect(h,a.__renderTransform),d.__allowSmoothing&&a.smoothing||(g.imageSmoothingEnabled=!1),Cj.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),Ha.__pool.release(h)));
a.__renderTransform=c;b.__canvasRenderer.context=null;b.__updateClip(a);b.__applyStyle(a,!0,!1,!0)}else zk.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:")?ae.renderCanvas(c,b):
ae.renderImage(c,b)):ae.renderCanvas(c,b),b.__popMaskObject(c)):ae.clear(c,b);b.__renderEvent(a)};zk.renderDrawableClear=function(a,b){zk.clear(a,b)};var nl=function(){};t["openfl.display._internal.DOMVideo"]=nl;nl.__name__="openfl.display._internal.DOMVideo";nl.clear=function(a,b){oh.clear(a,b);a.__active&&(b.element.removeChild(a.__stream.__video),a.__active=!1)};nl.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)):nl.clear(a,b)};nl.renderDrawable=function(a,b){nl.render(a,b);b.__renderEvent(a)};nl.renderDrawableClear=function(a,b){oh.renderDrawableClear(a,b)};var Dj=function(a){this.buffer=a;this.bPos=this.iPos=this.fPos=this.oPos=this.ffPos=this.iiPos=this.tsPos=0;this.prev=ya.UNKNOWN};t["openfl.display._internal.DrawCommandReader"]=
Dj;Dj.__name__="openfl.display._internal.DrawCommandReader";Dj.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=ya.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=ya.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=ya.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=ya.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=ya.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=ya.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=ya.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=ya.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=ya.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=ya.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=ya.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=ya.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=ya.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=ya.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=ya.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=ya.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=ya.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=ya.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=ya.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=ya.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=ya.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=ya.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__:Dj};var ya=Q["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}};ya.__constructs__=[ya.BEGIN_BITMAP_FILL,ya.BEGIN_FILL,ya.BEGIN_GRADIENT_FILL,ya.BEGIN_SHADER_FILL,ya.CUBIC_CURVE_TO,ya.CURVE_TO,ya.DRAW_CIRCLE,
ya.DRAW_ELLIPSE,ya.DRAW_QUADS,ya.DRAW_RECT,ya.DRAW_ROUND_RECT,ya.DRAW_TILES,ya.DRAW_TRIANGLES,ya.END_FILL,ya.LINE_BITMAP_STYLE,ya.LINE_GRADIENT_STYLE,ya.LINE_STYLE,ya.LINE_TO,ya.MOVE_TO,ya.OVERRIDE_BLEND_MODE,ya.OVERRIDE_MATRIX,ya.WINDING_EVEN_ODD,ya.WINDING_NON_ZERO,ya.UNKNOWN];var nm=function(){};t["openfl.display._internal.FlashRenderer"]=nm;nm.__name__="openfl.display._internal.FlashRenderer";nm.register=function(a){nm.instances==null&&(nm.instances=fA.toObjectMap(null,!0),La.get_current().stage.addEventListener("enterFrame",
nm.render,!1,-2147483648));nm.instances.set(a,!0)};nm.render=function(a){for(a=nm.instances.keys();a.hasNext();)a.next().__renderFlash()};var Ey=function(){};t["openfl.display._internal.IDisplayObject"]=Ey;Ey.__name__="openfl.display._internal.IDisplayObject";Ey.__isInterface__=!0;Ey.prototype={__renderFlash:null,__class__:Ey};var nn=function(){};t["openfl.display._internal.FlashTilemap"]=nn;nn.__name__="openfl.display._internal.FlashTilemap";nn.render=function(a){};nn.renderTileContainer=function(a,
b,c,d,f,g,h,n,l,q,v,w){};var Wm=function(a,b,c,d,f,g,h){h==null&&(h=.05);g==null&&(g=!1);zo.call(this,a,b,c,d,f,g,h);this.p_perm=[];for(b=0;b<512;)c=b++,this.p_perm[c]=Wm.P[c&255];this.base_factor=.03125;this.setSeed(a)};t["openfl.display._internal.PerlinNoise"]=Wm;Wm.__name__="openfl.display._internal.PerlinNoise";Wm.__super__=zo;Wm.prototype=I(zo.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,v=(2&this.channels)==2,w=(4&this.channels)==4,z=0;q&&++z;v&&++z;w&&++z;var r=this.grayscale,G=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 P=0;P<g;){var V=P++;b=L;for(var ia=0,ea=f;ia<ea;){for(var ra=ia++,za=0,fb=0,eb=0,Ra=0,wb=h;Ra<wb;){var cb=Ra++,Tb=n[cb];cb=l[cb];za+=this.noise(b*Tb,c*Tb,d*Tb)*cb;r||(1<z&&(fb+=this.noise((b+
1)*Tb,(c+1)*Tb,d*Tb)*cb),2<z&&(eb+=this.noise((b+2)*Tb,(c+2)*Tb,d*Tb)*cb))}Ra=0;r?Ra=this.color(za,za,za):q&&v&&w?Ra=this.color(za,fb,eb):q&&v?Ra=this.color(za,fb,null):q&&w?Ra=this.color(za,null,fb):v&&w?Ra=this.color(null,za,fb):q?Ra=this.color(za,null,null):v?Ra=this.color(null,za,null):w&&(Ra=this.color(null,null,za));this.stitch&&(Ra=this.stitching(a,Ra,ra,V,G,J,f,g));a.setPixel32(ra,V,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,v=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 w=this.p_perm[n+1]+l,z=a-1,r=b-1,G=c-1,J=this.p_perm[w+1]&15;l=((J&1)==0?J<8?z:r:J<8?-z:-r)+((J&2)==0?J<4?r:J==12?z:G:J<4?-r:J==14?-z:-G);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:G:J<4?-r:J==14?-a:-G);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:G:J<4?-b:J==14?-z:-G);J=this.p_perm[v+1]&15;G=((J&1)==0?J<8?a:b:J<8?-a:-b)+((J&2)==0?J<4?b:J==12?a:G:J<4?-b:J==14?-a:-G);J=this.p_perm[w]&15;w=((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[v]&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);G+=g*(L-G);a+=g*(h-a);a+=f*(q+g*(w-q)-a);return a+d*(G+f*(n+g*(l-n)-G)-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__:Wm});var on=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"]=
on;on.__name__="openfl.display._internal.SamplerState";on.prototype={centroid:null,filter:null,ignoreSampler:null,lodBias:null,mipfilter:null,mipmapGenerated:null,textureAlpha:null,wrap:null,clone:function(){var a=new on(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__:on};var bv=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"]=bv;bv.__name__="openfl.display._internal.ShaderBuffer";bv.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 v=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?v==null?new Float32Array(l,0):new Float32Array(l,0,v):null}else this.paramDataLength>this.paramData.length&&(c=this.paramDataLength,v=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?v==null?new Float32Array(l,0):new Float32Array(l,0,v):null,c.set(this.paramData),this.paramData=c);c=v=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 w=0;w<q;){var z=w++;this.paramData[v]=f.value[z]?1:0;++v}}else if(f<b+g)for(f=this.paramRefs_Float[n],++n,w=0;w<q;)z=w++,this.paramData[v]=f.value[z],++v;else for(f=
this.paramRefs_Int[l],++l,w=0;w<q;)z=w++,this.paramData[v]=f.value[z],++v;this.shader=a}},__class__:bv};var Jq=function(){this.drawCallsCounter=this.currentDrawCallsNum=this.currentDrawCallsNum=this.drawCallsCounter=0};t["openfl.display._internal.stats.DrawCallCounter"]=Jq;Jq.__name__="openfl.display._internal.stats.DrawCallCounter";Jq.prototype={currentDrawCallsNum:null,drawCallsCounter:null,increment:function(){this.drawCallsCounter++},reset:function(){this.currentDrawCallsNum=this.drawCallsCounter;
this.drawCallsCounter=0},__class__:Jq};var hk=function(){};t["openfl.display._internal.stats.Context3DStats"]=hk;hk.__name__="openfl.display._internal.stats.Context3DStats";hk.incrementDrawCall=function(a){hk.drawCallsCounters.h[a].increment()};hk.resetDrawCalls=function(){for(var a=hk.drawCallsCounters.iterator();a.hasNext();)a.next().reset()};hk.totalDrawCalls=function(){for(var a=0,b=hk.drawCallsCounters.iterator();b.hasNext();){var c=b.next();a+=c.currentDrawCallsNum}return a};hk.contextDrawCalls=
function(a){return hk.drawCallsCounters.h[a].currentDrawCallsNum};var Yc=function(a,b,c){this.profile=3;this.driverInfo="OpenGL (Direct blitting)";this.backBufferHeight=this.backBufferWidth=0;ma.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 Kq);this.__state=new Kq;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 H;Yc.__glMaxViewportDims==-1&&(Yc.__glMaxViewportDims=this.gl.getParameter(this.gl.MAX_VIEWPORT_DIMS));this.maxBackBufferHeight=this.maxBackBufferWidth=Yc.__glMaxViewportDims;Yc.__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?(Yc.__glTextureMaxAnisotropy=a.TEXTURE_MAX_ANISOTROPY_EXT,Yc.__glMaxTextureMaxAnisotropy=this.gl.getParameter(a.MAX_TEXTURE_MAX_ANISOTROPY_EXT)):(Yc.__glTextureMaxAnisotropy=0,Yc.__glMaxTextureMaxAnisotropy=
0));Yc.__glDepthStencil==-1&&(Yc.__glDepthStencil=this.gl.DEPTH_STENCIL);Yc.__glMemoryTotalAvailable==-1&&(a=this.gl.getExtension("NVX_gpu_memory_info"),a!=null&&(Yc.__glMemoryTotalAvailable=a.GPU_MEMORY_INFO_DEDICATED_VIDMEM_NVX,Yc.__glMemoryCurrentAvailable=a.GPU_MEMORY_INFO_CURRENT_AVAILABLE_VIDMEM_NVX));Yc.__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),
Yc.__driverInfo="OpenGL Vendor="+a+" Version="+b+" Renderer="+c+" GLSL="+d);this.driverInfo=Yc.__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"]=Yc;Yc.__name__="openfl.display3D.Context3D";Yc.__super__=ma;Yc.prototype=I(ma.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=ub.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=ub.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 Fo(this,a,b,c,d)},createIndexBuffer:function(a,b){b==null&&(b=1);return new Fy(this,a,b)},createProgram:function(a){a==null&&(a=0);return new Gy(this,a)},createRectangleTexture:function(a,b,c,d){return new Lq(this,
a,b,Mq.toString(c),d)},createTexture:function(a,b,c,d,f){f==null&&(f=0);return new pn(this,a,b,c,d,f)},createVertexBuffer:function(a,b,c){c==null&&(c=1);return new Hy(this,a,b,Iz.toString(c))},createVideoTexture:function(){return new Cv(this)},dispose:function(a){this.gl=null;this.__dispose()},drawToBitmapData:function(a,b,c){if(a!=null)if(b=b!=null?b.__toLimeRectangle():new nf(0,0,this.backBufferWidth,this.backBufferHeight),c=c!=null?c.__toLimeVector2():new Yf,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 Nc(new zj(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=(lc.get_length(d)>>>2)-f);var g=(a=a==1)?this.__vertexConstants:this.__fragmentConstants;d=lc.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=Ua.toFloat(f)/Ua.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),Ad.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 on);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 pb;}},__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 pb;}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 pb;}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 Ud("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 on,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 pn?(b=this.__state.renderToTexture,a=b.__width,b=b.__height):this.__state.renderToTexture instanceof Lq?(b=this.__state.renderToTexture,a=b.__width,b=b.__height):this.__state.renderToTexture instanceof Fo&&(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 pb;}},__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 ta;c.assemble(Jz.toString(1),"m44 op, va0, vc0\nmov v0, va1");var d=new ta;d.assemble(Jz.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(Yc.__glMemoryCurrentAvailable!=-1){var a=this.gl.getParameter(Yc.__glMemoryCurrentAvailable),b=this.gl.getParameter(Yc.__glMemoryTotalAvailable);if(b>0)return(b-a)*1024}return 0},__class__:Yc,__properties__:{get_totalGPUMemory:"get_totalGPUMemory",
set_enableErrorChecking:"set_enableErrorChecking",get_enableErrorChecking:"get_enableErrorChecking"}});var Iz={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}}},Jz={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}}},Mq={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}}},Fy=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"]=Fy;Fy.__name__="openfl.display3D.IndexBuffer3D";Fy.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=lc.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),Ad.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__:Fy};var Gy=function(a,b){this.__context=a;this.__format=b;this.__format==0?(this.__agalSamplerUsageMask=0,this.__agalUniforms=new jb,this.__agalSamplerUniforms=new jb,this.__agalAlphaSamplerUniforms=new jb,this.__agalAlphaSamplerEnabled=[]):(this.__glslAttribNames=[],this.__glslAttribTypes=[],this.__glslSamplerNames=[],this.__glslUniformLocations=[],this.__glslUniformNames=[],this.__glslUniformTypes=[]);this.__samplerStates=[]};
t["openfl.display3D.Program3D"]=Gy;Gy.__name__="openfl.display3D.Program3D";Gy.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")?F.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")?F.parseInt(a.substring(2)):N.startsWith(a,"fc")?F.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=$g.convertToGLSL(a,null);b=$g.convertToGLSL(b,c);Xb.level==5&&(Xb.info(a,{fileName:"openfl/display3D/Program3D.hx",lineNumber:399,className:"openfl.display3D.Program3D",methodName:"upload"}),Xb.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 jb,d=new jb,f=0;f<b;){var g=f++,h=a.getActiveUniform(this.__glProgram,g),n=h.name,l=h.size,q=h.type;h=new Dv(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=F.parseInt(h.name.substring(2)),h.regData=this.__context.__vertexConstants,c.add(h);else if(N.startsWith(h.name,"fc"))h.regIndex=F.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=F.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=F.parseInt(h.name.substring(7,7+n))+4,this.__agalAlphaSamplerUniforms.add(h)):N.startsWith(h.name,"sampler")&&N.endsWith(h.name,"_alphaEnabled")&&(h.regIndex=F.parseInt(h.name.substring(7)),this.__agalAlphaSamplerEnabled[h.regIndex]=h);Xb.level==5&&Xb.verbose(""+g+" name:"+h.name+" type:"+h.type+
" size:"+h.size+" location:"+F.string(h.location),{fileName:"openfl/display3D/Program3D.hx",lineNumber:577,className:"openfl.display3D.Program3D",methodName:"__buildAGALUniformList"})}this.__agalVertexUniformMap=new Nq(kb.array(c));this.__agalFragmentUniformMap=new Nq(kb.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 pb("!!! 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 pb("!!! 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 Xa("uniform ([A-Za-z0-9]+) ([A-Za-z0-9_]+)",""):new Xa("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);Xb.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),Xb.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),Xb.error(d,{fileName:"openfl/display3D/Program3D.hx",lineNumber:922,className:"openfl.display3D.Program3D",methodName:"__uploadFromGLSL"}))},__class__:Gy};
var Dv=function(a){this.context=a;this.isDirty=!0;this.regDataPointer=new Bj(null,0)};t["openfl.display3D.Uniform"]=Dv;Dv.__name__="openfl.display3D.Uniform";Dv.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:bA.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:Ad.uniformMatrix2fv(a,this.location,!1,this.regData.subarray(b,b+this.size*2*2));break;case 35675:Ad.uniformMatrix3fv(a,this.location,!1,this.regData.subarray(b,b+this.size*3*3));break;case 35676:Ad.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__:Dv};var Nq=function(a){this.__uniforms=a;this.__uniforms.sort(function(h,n){return u.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=ub.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"]=Nq;Nq.__name__="openfl.display3D.UniformMap";Nq.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__:Nq};var Hy=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=Iz.fromString(d)==
0?a.DYNAMIC_DRAW:a.STATIC_DRAW};t["openfl.display3D.VertexBuffer3D"]=Hy;Hy.__name__="openfl.display3D.VertexBuffer3D";Hy.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=lc.toArrayBuffer(a);b==null&&(b=0);a=a!=null?d==null?new Float32Array(a,b):new Float32Array(a,
b,d):null;this.uploadFromTypedArray(il.toArrayBufferView(a))},uploadFromTypedArray:function(a,b){a!=null&&(b=this.__context.gl,this.__context.__bindGLArrayBuffer(this.__id),Ad.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(il.toArrayBufferView(this.__tempFloat32Array))}},__class__:Hy};var $g=function(){};t["openfl.display3D._internal.AGALConverter"]=$g;$g.__name__="openfl.display3D._internal.AGALConverter";$g.prefixFromType=function(a,b){switch(a){case 0:return"va";case 1:return b==Kk.VERTEX?"vc":"fc";case 2:return b==Kk.VERTEX?"vt":"ft";case 3:return"output_";case 4:return"v";case 5:return"sampler";default:throw new pb("Invalid data!");
}};$g.readUInt64=function(a){var b=a.readInt();a=a.readInt();return new Jb(a,b)};$g.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 pb("Magic value must be 0xA0, may not be AGAL");var d=a.readInt();if((a.readByte()&255)!=161)throw new pb("Shader type ID must be 0xA1");c=(a.readByte()&255)==0?Kk.VERTEX:Kk.FRAGMENT;for(var f=new Ev,g="";;){var h=a.position;if(!Ua.gt(lc.get_length(a),h))break;var n=a.readInt();h=a.readUnsignedInt();
var l=$g.readUInt64(a),q=$g.readUInt64(a);h=Go.parse(h,c);l=qn.parse(l,c,h.mask);var v=qn.parse(q,c,h.mask);g+="\t";switch(n){case 0:g+=F.string(h.toGLSL()+" = "+l.toGLSL()+"; // mov");f.addDR(h,mb.VECTOR_4);f.addSR(l,mb.VECTOR_4);break;case 1:g+=F.string(h.toGLSL()+" = "+l.toGLSL()+" + "+v.toGLSL()+"; // add");f.addDR(h,mb.VECTOR_4);f.addSR(l,mb.VECTOR_4);f.addSR(v,mb.VECTOR_4);break;case 2:g+=F.string(h.toGLSL()+" = "+l.toGLSL()+" - "+v.toGLSL()+"; // sub");f.addDR(h,mb.VECTOR_4);f.addSR(l,mb.VECTOR_4);
f.addSR(v,mb.VECTOR_4);break;case 3:g+=F.string(h.toGLSL()+" = "+l.toGLSL()+" * "+v.toGLSL()+"; // mul");f.addDR(h,mb.VECTOR_4);f.addSR(l,mb.VECTOR_4);f.addSR(v,mb.VECTOR_4);break;case 4:g+=F.string(h.toGLSL()+" = "+l.toGLSL()+" / "+v.toGLSL()+"; // div");f.addDR(h,mb.VECTOR_4);f.addSR(l,mb.VECTOR_4);f.addSR(v,mb.VECTOR_4);break;case 5:g=l.toGLSL().indexOf(".")>-1?g+F.string(h.toGLSL()+" = 1.0 / "+l.toGLSL()+"; // rcp"):g+F.string(h.toGLSL()+" = vec4(1) / "+l.toGLSL()+"; // rcp");f.addDR(h,mb.VECTOR_4);
f.addSR(l,mb.VECTOR_4);break;case 6:g+=F.string(h.toGLSL()+" = min("+l.toGLSL()+", "+v.toGLSL()+"); // min");f.addDR(h,mb.VECTOR_4);f.addSR(l,mb.VECTOR_4);f.addSR(v,mb.VECTOR_4);break;case 7:g+=F.string(h.toGLSL()+" = max("+l.toGLSL()+", "+v.toGLSL()+"); // max");f.addDR(h,mb.VECTOR_4);f.addSR(l,mb.VECTOR_4);f.addSR(v,mb.VECTOR_4);break;case 8:g+=F.string(h.toGLSL()+" = fract("+l.toGLSL()+"); // frc");f.addDR(h,mb.VECTOR_4);f.addSR(l,mb.VECTOR_4);break;case 9:g+=F.string(h.toGLSL()+" = sqrt("+l.toGLSL()+
"); // sqrt");f.addDR(h,mb.VECTOR_4);f.addSR(l,mb.VECTOR_4);break;case 10:g+=F.string(h.toGLSL()+" = inversesqrt("+l.toGLSL()+"); // rsq");f.addDR(h,mb.VECTOR_4);f.addSR(l,mb.VECTOR_4);break;case 11:g+=F.string(h.toGLSL()+" = pow("+l.toGLSL()+", "+v.toGLSL()+"); // pow");f.addDR(h,mb.VECTOR_4);f.addSR(l,mb.VECTOR_4);f.addSR(v,mb.VECTOR_4);break;case 12:g+=F.string(h.toGLSL()+" = log2("+l.toGLSL()+"); // log");f.addDR(h,mb.VECTOR_4);f.addSR(l,mb.VECTOR_4);break;case 13:g+=F.string(h.toGLSL()+" = exp2("+
l.toGLSL()+"); // exp");f.addDR(h,mb.VECTOR_4);f.addSR(l,mb.VECTOR_4);break;case 14:g+=F.string(h.toGLSL()+" = normalize("+l.toGLSL()+"); // normalize");f.addDR(h,mb.VECTOR_4);f.addSR(l,mb.VECTOR_4);break;case 15:g+=F.string(h.toGLSL()+" = sin("+l.toGLSL()+"); // sin");f.addDR(h,mb.VECTOR_4);f.addSR(l,mb.VECTOR_4);break;case 16:g+=F.string(h.toGLSL()+" = cos("+l.toGLSL()+"); // cos");f.addDR(h,mb.VECTOR_4);f.addSR(l,mb.VECTOR_4);break;case 17:l.sourceMask=v.sourceMask=7;g+=F.string(h.toGLSL()+" = cross(vec3("+
l.toGLSL()+"), vec3("+v.toGLSL()+")); // crs");f.addDR(h,mb.VECTOR_4);f.addSR(l,mb.VECTOR_4);f.addSR(v,mb.VECTOR_4);break;case 18:l.sourceMask=v.sourceMask=7;g+=F.string(h.toGLSL()+" = vec4(dot(vec3("+l.toGLSL()+"), vec3("+v.toGLSL()+")))"+h.getWriteMask()+"; // dp3");f.addDR(h,mb.VECTOR_4);f.addSR(l,mb.VECTOR_4);f.addSR(v,mb.VECTOR_4);break;case 19:l.sourceMask=v.sourceMask=15;g+=F.string(h.toGLSL()+" = vec4(dot(vec4("+l.toGLSL()+"), vec4("+v.toGLSL()+")))"+h.getWriteMask()+"; // dp4");f.addDR(h,
mb.VECTOR_4);f.addSR(l,mb.VECTOR_4);f.addSR(v,mb.VECTOR_4);break;case 20:g+=F.string(h.toGLSL()+" = abs("+l.toGLSL()+"); // abs");f.addDR(h,mb.VECTOR_4);f.addSR(l,mb.VECTOR_4);break;case 21:g+=F.string(h.toGLSL()+" = -"+l.toGLSL()+"; // neg");f.addDR(h,mb.VECTOR_4);f.addSR(l,mb.VECTOR_4);break;case 22:g+=F.string(h.toGLSL()+" = clamp("+l.toGLSL()+", 0.0, 1.0); // saturate");f.addDR(h,mb.VECTOR_4);f.addSR(l,mb.VECTOR_4);break;case 23:n=f.getRegisterUsage(v);n!=mb.VECTOR_4&&n!=mb.VECTOR_4_ARRAY?(g+=
F.string(h.toGLSL()+" = "+l.toGLSL()+" * mat3("+v.toGLSL(!1)+"); // m33"),f.addDR(h,mb.VECTOR_4),f.addSR(l,mb.VECTOR_4),f.addSR(v,mb.MATRIX_4_4)):(l.sourceMask=v.sourceMask=7,g+=F.string(h.toGLSL()+" = vec3(dot("+l.toGLSL(!0)+","+v.toGLSL(!0,0)+"), dot("+l.toGLSL(!0)+","+v.toGLSL(!0,1)+"),dot("+l.toGLSL(!0)+","+v.toGLSL(!0,2)+")); // m33"),f.addDR(h,mb.VECTOR_4),f.addSR(l,mb.VECTOR_4),f.addSR(v,mb.VECTOR_4,0),f.addSR(v,mb.VECTOR_4,1),f.addSR(v,mb.VECTOR_4,2));break;case 24:n=f.getRegisterUsage(v);
n!=mb.VECTOR_4&&n!=mb.VECTOR_4_ARRAY?(g+=F.string(h.toGLSL()+" = "+l.toGLSL()+" * "+v.toGLSL(!1)+"; // m44"),f.addDR(h,mb.VECTOR_4),f.addSR(l,mb.VECTOR_4),f.addSR(v,mb.MATRIX_4_4)):(l.sourceMask=v.sourceMask=15,g+=F.string(h.toGLSL()+" = vec4(dot("+l.toGLSL(!0)+","+v.toGLSL(!0,0)+"), dot("+l.toGLSL(!0)+","+v.toGLSL(!0,1)+"), dot("+l.toGLSL(!0)+","+v.toGLSL(!0,2)+"), dot("+l.toGLSL(!0)+","+v.toGLSL(!0,3)+")); // m44"),f.addDR(h,mb.VECTOR_4),f.addSR(l,mb.VECTOR_4),f.addSR(v,mb.VECTOR_4,0),f.addSR(v,
mb.VECTOR_4,1),f.addSR(v,mb.VECTOR_4,2),f.addSR(v,mb.VECTOR_4,3));break;case 25:h.mask&=7;n=f.getRegisterUsage(v);n!=mb.VECTOR_4&&n!=mb.VECTOR_4_ARRAY?(g+=F.string(h.toGLSL()+" = "+l.toGLSL()+" * "+v.toGLSL(!1)+"; // m34"),f.addDR(h,mb.VECTOR_4),f.addSR(l,mb.VECTOR_4),f.addSR(v,mb.MATRIX_4_4)):(l.sourceMask=v.sourceMask=15,g+=F.string(h.toGLSL()+" = vec3(dot("+l.toGLSL(!0)+","+v.toGLSL(!0,0)+"), dot("+l.toGLSL(!0)+","+v.toGLSL(!0,1)+"),dot("+l.toGLSL(!0)+","+v.toGLSL(!0,2)+")); // m34"),f.addDR(h,
mb.VECTOR_4),f.addSR(l,mb.VECTOR_4),f.addSR(v,mb.VECTOR_4,0),f.addSR(v,mb.VECTOR_4,1),f.addSR(v,mb.VECTOR_4,2));break;case 26:if(d<2)throw new pb("Version must be 2");g+=F.string(h.toGLSL()+" = ddx("+l.toGLSL()+"); // ddx");f.addDR(h,mb.VECTOR_4);f.addSR(l,mb.VECTOR_4);break;case 27:if(d<2)throw new pb("Version must be 2");g+=F.string(h.toGLSL()+" = ddy("+l.toGLSL()+"); // ddy");f.addDR(h,mb.VECTOR_4);f.addSR(l,mb.VECTOR_4);break;case 28:if(d<2)throw new pb("Version must be 2");l.sourceMask=v.sourceMask=
1;g+=F.string("if ("+l.toGLSL()+" == "+v.toGLSL()+") { // ife");f.addSR(l,mb.VECTOR_4);f.addSR(v,mb.VECTOR_4);break;case 29:if(d<2)throw new pb("Version must be 2");l.sourceMask=v.sourceMask=1;g+=F.string("if ("+l.toGLSL()+" != "+v.toGLSL()+") { // ine");f.addSR(l,mb.VECTOR_4);f.addSR(v,mb.VECTOR_4);break;case 30:if(d<2)throw new pb("Version must be 2");l.sourceMask=v.sourceMask=1;g+=F.string("if ("+l.toGLSL()+" >= "+v.toGLSL()+") { // ifg");f.addSR(l,mb.VECTOR_4);f.addSR(v,mb.VECTOR_4);break;case 31:if(d<
2)throw new pb("Version must be 2");l.sourceMask=v.sourceMask=1;g+=F.string("if ("+l.toGLSL()+" < "+v.toGLSL()+") { // ifl");f.addSR(l,mb.VECTOR_4);f.addSR(v,mb.VECTOR_4);break;case 32:if(d<2)throw new pb("Version must be 2");g+="} else { // els";break;case 33:if(d<2)throw new pb("Version must be 2");g+="} // eif";break;case 39:l.sourceMask=15;g+=F.string("if (any(lessThan("+l.toGLSL()+", vec4(0)))) discard;");f.addSR(l,mb.VECTOR_4);break;case 40:v=Ho.parse(q,c);switch(v.d){case 0:v.t==2?(l.sourceMask=
3,f.addSaR(v,mb.SAMPLER_2D_ALPHA),g+=F.string("if ("+v.toGLSL()+"_alphaEnabled) {\n"),g+=F.string("\t\t"+h.toGLSL()+" = vec4(texture2D("+v.toGLSL()+", "+l.toGLSL()+").xyz, texture2D("+v.toGLSL()+"_alpha, "+l.toGLSL()+").x); // tex + alpha\n"),g+="\t} else {\n",g+=F.string("\t\t"+h.toGLSL()+" = texture2D("+v.toGLSL()+", "+l.toGLSL()+"); // tex\n"),g+="\t}"):(l.sourceMask=3,f.addSaR(v,mb.SAMPLER_2D),g+=F.string(h.toGLSL()+" = texture2D("+v.toGLSL()+", "+l.toGLSL()+"); // tex"));break;case 1:v.t==2?
(l.sourceMask=7,f.addSaR(v,mb.SAMPLER_CUBE_ALPHA),g+=F.string("if ("+v.toGLSL()+"_alphaEnabled) {\n"),g+=F.string("\t\t"+h.toGLSL()+" = vec4(textureCube("+v.toGLSL()+", "+l.toGLSL()+").xyz, textureCube("+v.toGLSL()+"_alpha, "+l.toGLSL()+").x); // tex + alpha\n"),g+="\t} else {\n",g+=F.string("\t\t"+h.toGLSL()+" = textureCube("+v.toGLSL()+", "+l.toGLSL()+"); // tex"),g+="\t}"):(l.sourceMask=7,g+=F.string(h.toGLSL()+" = textureCube("+v.toGLSL()+", "+l.toGLSL()+"); // tex"),f.addSaR(v,mb.SAMPLER_CUBE))}f.addDR(h,
mb.VECTOR_4);f.addSR(l,mb.VECTOR_4);b!=null&&(b[v.n]=v.toSamplerState());break;case 41:l.sourceMask=v.sourceMask=15;g+=F.string(h.toGLSL()+" = vec4(greaterThanEqual("+l.toGLSL()+", "+v.toGLSL()+"))"+h.getWriteMask()+"; // ste");f.addDR(h,mb.VECTOR_4);f.addSR(l,mb.VECTOR_4);f.addSR(v,mb.VECTOR_4);break;case 42:l.sourceMask=v.sourceMask=15;g+=F.string(h.toGLSL()+" = vec4(lessThan("+l.toGLSL()+", "+v.toGLSL()+"))"+h.getWriteMask()+"; // slt");f.addDR(h,mb.VECTOR_4);f.addSR(l,mb.VECTOR_4);f.addSR(v,mb.VECTOR_4);
break;case 44:l.sourceMask=v.sourceMask=15;g+=F.string(h.toGLSL()+" = vec4(equal("+l.toGLSL()+", "+v.toGLSL()+"))"+h.getWriteMask()+"; // seq");f.addDR(h,mb.VECTOR_4);f.addSR(l,mb.VECTOR_4);f.addSR(v,mb.VECTOR_4);break;case 45:l.sourceMask=v.sourceMask=15;g+=F.string(h.toGLSL()+" = vec4(notEqual("+l.toGLSL()+", "+v.toGLSL()+"))"+h.getWriteMask()+"; // sne");f.addDR(h,mb.VECTOR_4);f.addSR(l,mb.VECTOR_4);f.addSR(v,mb.VECTOR_4);break;default:throw new pb("Opcode "+n);}g+="\n"}$g.limitedProfile==null&&
(d=A.context.getParameter(7938),$g.limitedProfile=d.indexOf("OpenGL ES")>-1||d.indexOf("WebGL")>-1);a=""+F.string("// AGAL "+(c==Kk.VERTEX?"vertex":"fragment")+" shader\n");a=$g.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+=F.string(f.toGLSL(!1));c==Kk.VERTEX&&(a+="uniform vec4 vcPositionScale;\n");a=a+"void main() {\n"+F.string(f.toGLSL(!0));a+=F.string(g);c==Kk.VERTEX&&(a+="\tgl_Position *= vcPositionScale;\n");
return a+"}\n"};var Go=function(){};t["openfl.display3D._internal._AGALConverter.DestRegister"]=Go;Go.__name__="openfl.display3D._internal._AGALConverter.DestRegister";Go.parse=function(a,b){var c=new Go;c.programType=b;c.type=a>>>24&15;c.mask=a>>>16&15;c.n=a&65535;return c};Go.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==Kk.VERTEX?"gl_Position":"gl_FragColor":$g.prefixFromType(this.type,this.programType)+this.n;a&&this.mask!=15&&(b+=this.getWriteMask());return b},__class__:Go};var Kk=Q["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}};Kk.__constructs__=[Kk.VERTEX,Kk.FRAGMENT];var Ev=function(){this.mEntries=[]};t["openfl.display3D._internal.RegisterMap"]=Ev;Ev.__name__="openfl.display3D._internal.RegisterMap";Ev.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 pb("Cannot use register in multiple ways yet (mat4/vec4)");return}}h=
new Iy;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,$g.prefixFromType(a.itype,a.programType)+a.n,a.n,mb.VECTOR_4),this.add(a.type,$g.prefixFromType(a.type,a.programType)+a.o,a.o,mb.VECTOR_4_ARRAY)):this.add(a.type,a.toGLSL(!1,c),a.n+c,b)},getRegisterUsage:function(a){return a.d!=0?mb.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 mb.UNUSED},toGLSL:function(a){this.mEntries.sort(function(g,h){return g.number-h.number});this.mEntries.sort(function(g,h){return x.__cast(g.type,pw)-x.__cast(h.type,pw)});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 pb;}switch(f.usage._hx_index){case 0:Xb.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==mb.SAMPLER_2D_ALPHA?
(b+="sampler2D ",b+=F.string(f.name),b+=";\n",b+="uniform ",b+="sampler2D ",b+=F.string(f.name+"_alpha"),b+=";\n",b+="uniform ",b+="bool ",b+=F.string(f.name+"_alphaEnabled")):f.usage==mb.SAMPLER_CUBE_ALPHA?(b+="samplerCube ",b+=F.string(f.name),b+=";\n",b+="uniform ",b+="samplerCube ",b+=F.string(f.name+"_alpha"),b+=";\n",b+="uniform ",b+="bool ",b+=F.string(f.name+"_alphaEnabled")):b=f.usage==mb.VECTOR_4_ARRAY?b+F.string(f.name+"[128]"):b+F.string(f.name);b+=";\n"}}return b},__class__:Ev};var Iy=
function(){};t["openfl.display3D._internal._AGALConverter.RegisterMapEntry"]=Iy;Iy.__name__="openfl.display3D._internal._AGALConverter.RegisterMapEntry";Iy.prototype={name:null,number:null,type:null,usage:null,__class__:Iy};var mb=Q["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}};mb.__constructs__=[mb.UNUSED,mb.VECTOR_4,mb.MATRIX_4_4,mb.SAMPLER_2D,mb.SAMPLER_2D_ALPHA,mb.SAMPLER_CUBE,mb.SAMPLER_CUBE_ALPHA,mb.VECTOR_4_ARRAY];
var Ho=function(){};t["openfl.display3D._internal._AGALConverter.SamplerRegister"]=Ho;Ho.__name__="openfl.display3D._internal._AGALConverter.SamplerRegister";Ho.parse=function(a,b){var c=new Ho;c.programType=b;b=60;b=b==0?new Jb(a.high,a.low):b<32?new Jb(a.high>>b,a.high<<32-b|a.low>>>b):new Jb(a.high>>31,a.high>>b-32);b=b.low&15;c.f=b;b=56;b=b==0?new Jb(a.high,a.low):b<32?new Jb(a.high>>b,a.high<<32-b|a.low>>>b):new Jb(a.high>>31,a.high>>b-32);b=b.low&15;c.m=b;b=52;b=b==0?new Jb(a.high,a.low):b<
32?new Jb(a.high>>b,a.high<<32-b|a.low>>>b):new Jb(a.high>>31,a.high>>b-32);b=b.low&15;c.w=b;b=48;b=b==0?new Jb(a.high,a.low):b<32?new Jb(a.high>>b,a.high<<32-b|a.low>>>b):new Jb(a.high>>31,a.high>>b-32);b=b.low&15;c.s=b;b=44;b=b==0?new Jb(a.high,a.low):b<32?new Jb(a.high>>b,a.high<<32-b|a.low>>>b):new Jb(a.high>>31,a.high>>b-32);b=b.low&15;c.d=b;b=40;b=b==0?new Jb(a.high,a.low):b<32?new Jb(a.high>>b,a.high<<32-b|a.low>>>b):new Jb(a.high>>31,a.high>>b-32);b=b.low&15;c.t=b;b=32;b=b==0?new Jb(a.high,
a.low):b<32?new Jb(a.high>>b,a.high<<32-b|a.low>>>b):new Jb(a.high>>31,a.high>>b-32);b=b.low&15;c.type=b;b=16;b=b==0?new Jb(a.high,a.low):b<32?new Jb(a.high>>b,a.high<<32-b|a.low>>>b):new Jb(a.high>>31,a.high>>b-32);b=b.low&255;c.b=b;b=a.low&65535;c.n=b;return c};Ho.prototype={b:null,d:null,f:null,m:null,n:null,programType:null,s:null,t:null,type:null,w:null,toGLSL:function(){return $g.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 pb;}switch(this.m){case 0:var b=2;break;case 1:b=1;break;case 2:b=0;break;default:throw new pb;}switch(this.w){case 0:var c=0;break;case 1:c=2;break;default:throw new pb;}return new on(c,a,b,(this.b<<24>>24)/8,(this.s&4)==4,(this.s&1)==1,this.t==2)},__class__:Ho};var qn=function(){};t["openfl.display3D._internal._AGALConverter.SourceRegister"]=qn;qn.__name__="openfl.display3D._internal._AGALConverter.SourceRegister";qn.parse=function(a,b,c){var d=new qn;d.programType=
b;b=63;b=b==0?new Jb(a.high,a.low):b<32?new Jb(a.high>>b,a.high<<32-b|a.low>>>b):new Jb(a.high>>31,a.high>>b-32);b=b.low&1;d.d=b;b=48;b=b==0?new Jb(a.high,a.low):b<32?new Jb(a.high>>b,a.high<<32-b|a.low>>>b):new Jb(a.high>>31,a.high>>b-32);b=b.low&3;d.q=b;b=40;b=b==0?new Jb(a.high,a.low):b<32?new Jb(a.high>>b,a.high<<32-b|a.low>>>b):new Jb(a.high>>31,a.high>>b-32);b=b.low&15;d.itype=b;b=32;b=b==0?new Jb(a.high,a.low):b<32?new Jb(a.high>>b,a.high<<32-b|a.low>>>b):new Jb(a.high>>31,a.high>>b-32);b=
b.low&15;d.type=b;b=24;b=b==0?new Jb(a.high,a.low):b<32?new Jb(a.high>>b,a.high<<32-b|a.low>>>b):new Jb(a.high>>31,a.high>>b-32);b=b.low&255;d.s=b;b=16;b=b==0?new Jb(a.high,a.low):b<32?new Jb(a.high>>b,a.high<<32-b|a.low>>>b):new Jb(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};qn.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==
Kk.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=$g.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=$g.prefixFromType(this.itype,this.programType)+this.n+"."+f;c+="[ int("+f+") +"+b+"]"}a&&d!=""&&(c+="."+d);return c},__class__:qn};var Oq=function(a,b){this.version=0;a.position=b;var c=a.readUTFBytes(3);a.position=b;if(c!="ATF")throw new pb("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(Ua.gt(x.__cast(b+c,pw),lc.get_length(a)))throw new pb("ATF length exceeds byte array length");this.data=a};t["openfl.display3D._internal.ATFReader"]=Oq;Oq.__name__="openfl.display3D._internal.ATFReader";Oq.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 pb("ATF Cube map not expected");if(c&&f!=1)throw new pb("ATF Cube map expected");this.cubeMap=c;this.atfFormat=d&127;this.atfFormat!=3&&this.atfFormat!=5&&Xb.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 pb("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 v=l++,w=this.version==0?this.__readUInt24(this.data):this.__readUInt32(this.data);if(Ua.gt(this.data.position+w,lc.get_length(this.data)))throw new pb("Block length exceeds ATF file length");if(Ua.gt(w,0)){var z=new Na(new ArrayBuffer(w)),
r=this.data,G=lc.fromBytes(z),J=0,L=w;L==null&&(L=0);J==null&&(J=0);r.readBytes(G,J,L);a(f,n,v,this.width>>n,this.height>>n,w,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__:Oq};var Kq=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 Ha;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"]=Kq;Kq.__name__="openfl.display3D._internal.Context3DState";Kq.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__:Kq};var nd=function(a){ma.call(this);this.__context=a;var b=this.__context.gl;this.__textureID=b.createTexture();this.__textureContext=this.__context.__context;if(nd.__supportsBGRA==null){nd.__textureInternalFormat=b.RGBA;nd.__supportsBGRA=!1;nd.__textureFormat=
b.RGBA;nd.__compressedFormats=new Qd;nd.__compressedFormatsAlpha=new Qd;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;nd.__compressedFormats.h[0]=d;d=a.COMPRESSED_RGBA_S3TC_DXT5_EXT;nd.__compressedFormatsAlpha.h[0]=d}c!=null&&(d=c.COMPRESSED_RGB_ETC1_WEBGL,nd.__compressedFormats.h[2]=d,d=c.COMPRESSED_RGB_ETC1_WEBGL,nd.__compressedFormatsAlpha.h[2]=
d);b!=null&&(d=b.COMPRESSED_RGB_PVRTC_4BPPV1_IMG,nd.__compressedFormats.h[1]=d,d=b.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG,nd.__compressedFormatsAlpha.h[1]=d)}this.__internalFormat=nd.__textureInternalFormat;this.__format=nd.__textureFormat};t["openfl.display3D.textures.TextureBase"]=nd;nd.__name__="openfl.display3D.textures.TextureBase";nd.__super__=ma;nd.prototype=I(ma.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&&Xb.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),Yc.__glDepthStencil!=0?(this.__glStencilRenderbuffer=this.__glDepthRenderbuffer=
b.createRenderbuffer(),b.bindRenderbuffer(b.RENDERBUFFER,this.__glDepthRenderbuffer),b.renderbufferStorage(b.RENDERBUFFER,Yc.__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&&Xb.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;zb.sync(b,!1);a=this.__context.gl;b.type==ig.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 Ud("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 Ud("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=nd.__textureInternalFormat,d=nd.__textureFormat;
this.__context.__bindGLTexture2D(this.__textureID);a.type==ig.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==ig.DATA?Ad.texImage2D(b,b.TEXTURE_2D,0,c,a.buffer.width,a.buffer.height,0,d,b.UNSIGNED_BYTE,a.get_data()):Ad.texImage2D(b,b.TEXTURE_2D,0,c,d,b.UNSIGNED_BYTE,a.get_src());this.__context.__bindGLTexture2D(null)}},__class__:nd});var Fo=function(a,b,c,d,f){nd.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"]=Fo;Fo.__name__="openfl.display3D.textures.CubeTexture";Fo.__super__=nd;Fo.prototype=I(nd.prototype,{__framebufferSurface:null,__size:null,__uploadedSides:null,uploadCompressedTextureFromByteArray:function(a,b,c){c==null&&(c=!1);var d=this;c?Ec.delay(function(){d.__uploadCompressedTextureFromByteArray(a,
b);var f=new na("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),Ad.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=lc.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);
Ad.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&&Xb.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 nd.prototype.__getGLFramebuffer.call(this,a,b,c)},__setSamplerState:function(a){if(nd.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(Yc.__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>Yc.__glMaxTextureMaxAnisotropy&&(a=Yc.__glMaxTextureMaxAnisotropy);b.texParameterf(b.TEXTURE_CUBE_MAP,Yc.__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 pb;}},__uploadCompressedTextureFromByteArray:function(a,b){var c=this;a=new Oq(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(v,w,z,r,G,J,L){var P=d?
nd.__compressedFormatsAlpha.h[z]:nd.__compressedFormats.h[z];if(P!=0)if(g=!0,v=c.__sideToTarget(v),c.__format=P,c.__internalFormat=P,d&&z==2){J=J/2|0;var V=z=null,ia=null,ea=null,ra=L.b.buffer,za=0;za==null&&(za=0);z=z!=null?new Uint8Array(z):V!=null?new Uint8Array(V):ia!=null?new Uint8Array(ia.__array):ea!=null?new Uint8Array(ea):ra!=null?J==null?new Uint8Array(ra,za):new Uint8Array(ra,za,J):null;Ad.compressedTexImage2D(f,v,w,c.__internalFormat,r,G,0,z);var fb=new Fo(c.__context,c.__size,3,c.__optimizeForRenderToTexture,
c.__streamingLevels);fb.__format=P;fb.__internalFormat=P;c.__context.__bindGLTextureCubeMap(fb.__textureID);ea=ia=V=z=null;ra=L.b.buffer;za=J;za==null&&(za=0);z=z!=null?new Uint8Array(z):V!=null?new Uint8Array(V):ia!=null?new Uint8Array(ia.__array):ea!=null?new Uint8Array(ea):ra!=null?J==null?new Uint8Array(ra,za):new Uint8Array(ra,za,J):null;Ad.compressedTexImage2D(f,v,w,fb.__internalFormat,r,G,0,z);c.__alphaTexture=fb}else ea=ia=V=z=null,ra=L.b.buffer,za=0,za==null&&(za=0),z=z!=null?new Uint8Array(z):
V!=null?new Uint8Array(V):ia!=null?new Uint8Array(ia.__array):ea!=null?new Uint8Array(ea):ra!=null?J==null?new Uint8Array(ra,za):new Uint8Array(ra,za,J):null,Ad.compressedTexImage2D(f,v,w,c.__internalFormat,r,G,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;Ad.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;Ad.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;Ad.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;Ad.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;Ad.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;Ad.texImage2D(f,this.__sideToTarget(5),0,this.__internalFormat,this.__size,this.__size,0,this.__format,f.UNSIGNED_BYTE,a)}this.__context.__bindGLTextureCubeMap(null)},__class__:Fo});var Lq=function(a,b,c,d,f){nd.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"]=Lq;Lq.__name__="openfl.display3D.textures.RectangleTexture";Lq.__super__=nd;Lq.prototype=I(nd.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);Ad.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=lc.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);Ad.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(nd.prototype.__setSamplerState.call(this,a)){var b=this.__context.gl;if(Yc.__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>Yc.__glMaxTextureMaxAnisotropy&&(a=Yc.__glMaxTextureMaxAnisotropy);b.texParameterf(b.TEXTURE_2D,Yc.__glTextureMaxAnisotropy,a)}return!0}return!1},__class__:Lq});var pn=function(a,b,c,d,f,g){nd.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);Ad.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"]=pn;pn.__name__="openfl.display3D.textures.Texture";pn.__super__=nd;pn.prototype=I(nd.prototype,{uploadCompressedTextureFromByteArray:function(a,
b,c){c==null&&(c=!1);var d=this;c?Ec.delay(function(){d.__uploadCompressedTextureFromByteArray(a,b);var f=new na("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 yc(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),Ad.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=lc.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),Ad.texImage2D(c,this.__textureTarget,b,this.__internalFormat,d,f,0,this.__format,c.UNSIGNED_BYTE,a),this.__context.__bindGLTexture2D(null)}},__setSamplerState:function(a){if(nd.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(Yc.__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>Yc.__glMaxTextureMaxAnisotropy&&(a=Yc.__glMaxTextureMaxAnisotropy);b.texParameterf(b.TEXTURE_2D,Yc.__glTextureMaxAnisotropy,a)}return!0}return!1},__uploadCompressedTextureFromByteArray:function(a,b){var c=this;a=new Oq(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,v,w,z){h=d?nd.__compressedFormatsAlpha.h[l]:nd.__compressedFormats.h[l];if(h!=0)if(g=!0,c.__format=h,c.__internalFormat=h,d&&l==2){w=w/2|0;var r=l=null,G=null,J=null,L=z.b.buffer,P=0;P==null&&(P=0);l=l!=null?new Uint8Array(l):r!=null?new Uint8Array(r):G!=null?new Uint8Array(G.__array):J!=null?new Uint8Array(J):L!=null?w==null?new Uint8Array(L,P):new Uint8Array(L,P,w):null;Ad.compressedTexImage2D(f,c.__textureTarget,
n,c.__internalFormat,q,v,0,l);var V=new pn(c.__context,c.__width,c.__height,3,c.__optimizeForRenderToTexture,c.__streamingLevels);V.__format=h;V.__internalFormat=h;c.__context.__bindGLTexture2D(V.__textureID);J=G=r=l=null;L=z.b.buffer;P=w;P==null&&(P=0);l=l!=null?new Uint8Array(l):r!=null?new Uint8Array(r):G!=null?new Uint8Array(G.__array):J!=null?new Uint8Array(J):L!=null?w==null?new Uint8Array(L,P):new Uint8Array(L,P,w):null;Ad.compressedTexImage2D(f,V.__textureTarget,n,V.__internalFormat,q,v,0,
l);c.__alphaTexture=V}else J=G=r=l=null,L=z.b.buffer,P=0,P==null&&(P=0),l=l!=null?new Uint8Array(l):r!=null?new Uint8Array(r):G!=null?new Uint8Array(G.__array):J!=null?new Uint8Array(J):L!=null?w==null?new Uint8Array(L,P):new Uint8Array(L,P,w):null,Ad.compressedTexImage2D(f,c.__textureTarget,n,c.__internalFormat,q,v,0,l)});g||(a=this.__width*this.__height*4,a=a!=null?new Uint8Array(a):null,Ad.texImage2D(f,this.__textureTarget,0,this.__internalFormat,this.__width,this.__height,0,this.__format,f.UNSIGNED_BYTE,
a));this.__context.__bindGLTexture2D(null)},__class__:pn});var Cv=function(a){nd.call(this,a);this.__textureTarget=this.__context.gl.TEXTURE_2D};t["openfl.display3D.textures.VideoTexture"]=Cv;Cv.__name__="openfl.display3D.textures.VideoTexture";Cv.__super__=nd;Cv.prototype=I(nd.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?Ec.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));nd.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);Ad.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 na("textureReady");this.dispatchEvent(a)},__class__:Cv});var Ud=function(a,b){b==null&&(b=0);a==null&&(a="");Z.call(this,a);this.errorID=b;this.name="Error";this.__skipStack++};t["openfl.errors.Error"]=Ud;Ud.__name__="openfl.errors.Error";Ud.__super__=Z;Ud.prototype=I(Z.prototype,
{errorID:null,name:null,getStackTrace:function(){return Gi.toString(Gi.exceptionStack())},toString:function(){return this.get_message()!=null?this.get_message():"Error"},__class__:Ud});var Db=function(a){a==null&&(a="");Ud.call(this,a);this.name="ArgumentError";this.__skipStack++};t["openfl.errors.ArgumentError"]=Db;Db.__name__="openfl.errors.ArgumentError";Db.__super__=Ud;Db.prototype=I(Ud.prototype,{__class__:Db});var xm=function(a){a==null&&(a="");Ud.call(this,a);this.name="IOError";this.__skipStack++};
t["openfl.errors.IOError"]=xm;xm.__name__="openfl.errors.IOError";xm.__super__=Ud;xm.prototype=I(Ud.prototype,{__class__:xm});var Lk=function(a,b){xm.call(this,"End of file was encountered");this.name="EOFError";this.errorID=2030;this.__skipStack++};t["openfl.errors.EOFError"]=Lk;Lk.__name__="openfl.errors.EOFError";Lk.__super__=xm;Lk.prototype=I(xm.prototype,{__class__:Lk});var pb=function(a){a==null&&(a="");Ud.call(this,a,0);this.name="IllegalOperationError";this.__skipStack++};t["openfl.errors.IllegalOperationError"]=
pb;pb.__name__="openfl.errors.IllegalOperationError";pb.__super__=Ud;pb.prototype=I(Ud.prototype,{__class__:pb});var xe=function(a){a==null&&(a="");Ud.call(this,a,0);this.name="RangeError";this.__skipStack++};t["openfl.errors.RangeError"]=xe;xe.__name__="openfl.errors.RangeError";xe.__super__=Ud;xe.prototype=I(Ud.prototype,{__class__:xe});var ut=function(a){a==null&&(a="");Ud.call(this,a,0);this.name="SecurityError";this.__skipStack++};t["openfl.errors.SecurityError"]=ut;ut.__name__="openfl.errors.SecurityError";
ut.__super__=Ud;ut.prototype=I(Ud.prototype,{__class__:ut});var Ce=function(a){a==null&&(a="");Ud.call(this,a,0);this.name="TypeError";this.__skipStack++};t["openfl.errors.TypeError"]=Ce;Ce.__name__="openfl.errors.TypeError";Ce.__super__=Ud;Ce.prototype=I(Ud.prototype,{__class__:Ce});var zl=function(a,b,c,d){d==null&&(d=!1);c==null&&(c=!1);b==null&&(b=!1);na.call(this,a,b,c);this.activating=d};t["openfl.events.ActivityEvent"]=zl;zl.__name__="openfl.events.ActivityEvent";zl.__super__=na;zl.prototype=
I(na.prototype,{activating:null,clone:function(){var a=new zl(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(){na.prototype.__init.call(this);this.activating=!1},__class__:zl});var Gg=function(a,b,c,d){d==null&&(d="");c==null&&(c=!1);b==null&&(b=!1);na.call(this,a,b,c);
this.text=d};t["openfl.events.TextEvent"]=Gg;Gg.__name__="openfl.events.TextEvent";Gg.__super__=na;Gg.prototype=I(na.prototype,{text:null,clone:function(){var a=new Gg(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(){na.prototype.__init.call(this);this.text=""},__class__:Gg});var xg=function(a,
b,c,d,f){f==null&&(f=0);d==null&&(d="");c==null&&(c=!1);b==null&&(b=!1);Gg.call(this,a,b,c,d);this.errorID=f};t["openfl.events.ErrorEvent"]=xg;xg.__name__="openfl.events.ErrorEvent";xg.__super__=Gg;xg.prototype=I(Gg.prototype,{errorID:null,clone:function(){var a=new xg(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(){Gg.prototype.__init.call(this);this.errorID=0},__class__:xg});var Pq=function(a,b,c,d,f){d==null&&(d="");c==null&&(c=!1);b==null&&(b=!1);xg.call(this,a,b,c);this.text=d;this.error=f};t["openfl.events.AsyncErrorEvent"]=Pq;Pq.__name__="openfl.events.AsyncErrorEvent";Pq.__super__=xg;Pq.prototype=I(xg.prototype,{error:null,clone:function(){var a=new Pq(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(){xg.prototype.__init.call(this);this.text="";this.error=null},__class__:Pq});var rn=function(a,b,c,d){d==null&&(d="");c==null&&(c=!1);b==null&&(b=!1);Gg.call(this,a,b,c);this.data=d};t["openfl.events.DataEvent"]=rn;rn.__name__="openfl.events.DataEvent";rn.__super__=Gg;rn.prototype=I(Gg.prototype,{data:null,clone:function(){var a=
new rn(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(){Gg.prototype.__init.call(this);this.data=""},__class__:rn});var Po=function(a){this.active=!1;this.reset(a)};t["openfl.events._EventDispatcher.DispatchIterator"]=Po;Po.__name__="openfl.events._EventDispatcher.DispatchIterator";Po.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__:Po};var sm=function(a,b,c,d){d&&sm.supportsWeakReference?this.weakRefCallback=new WeakRef(a):this.callback=a;this.useCapture=b;this.priority=c;this.useWeakReference=d};t["openfl.events._EventDispatcher.Listener"]=sm;sm.__name__="openfl.events._EventDispatcher.Listener";sm.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__:sm};var Fj=function(a,b,c,d,f,g){g==null&&(g=0);f==null&&(f=!1);c==null&&(c=!1);b==null&&(b=!1);na.call(this,a,b,c);this.keyCode=g;this.shiftKey=f;this.relatedObject=d};t["openfl.events.FocusEvent"]=Fj;Fj.__name__="openfl.events.FocusEvent";Fj.__super__=na;Fj.prototype=I(na.prototype,{keyCode:null,relatedObject:null,shiftKey:null,clone:function(){var a=new Fj(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(){na.prototype.__init.call(this);this.keyCode=0;this.shiftKey=!1;this.relatedObject=null},__class__:Fj});var Lj=function(a,b,c,d,f){f==null&&(f=!1);d==null&&(d=!1);c==null&&(c=!1);b==null&&(b=!1);zl.call(this,a,b,c);this.fullScreen=d;this.interactive=f};t["openfl.events.FullScreenEvent"]=
Lj;Lj.__name__="openfl.events.FullScreenEvent";Lj.__super__=zl;Lj.prototype=I(zl.prototype,{fullScreen:null,interactive:null,clone:function(){var a=new Lj(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(){zl.prototype.__init.call(this);this.interactive=
this.fullScreen=!1},__class__:Lj});var Mk=function(a,b,c,d){c==null&&(c=!1);b==null&&(b=!0);na.call(this,a,b,c);this.device=d};t["openfl.events.GameInputEvent"]=Mk;Mk.__name__="openfl.events.GameInputEvent";Mk.__super__=na;Mk.prototype=I(na.prototype,{device:null,clone:function(){var a=new Mk(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(){na.prototype.__init.call(this);this.bubbles=!0;this.device=null},__class__:Mk});var om=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;na.call(this,a,b,c)};t["openfl.events.HTTPStatusEvent"]=om;om.__name__="openfl.events.HTTPStatusEvent";om.__super__=na;om.prototype=I(na.prototype,{redirected:null,responseHeaders:null,responseURL:null,status:null,
clone:function(){var a=new om(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(){na.prototype.__init.call(this);this.status=0;this.redirected=!1},__class__:om});var Vh=function(a,b,c,d,f){f==null&&(f=0);d==null&&(d="");c==null&&(c=!1);b==null&&(b=!0);
xg.call(this,a,b,c,d,f)};t["openfl.events.IOErrorEvent"]=Vh;Vh.__name__="openfl.events.IOErrorEvent";Vh.__super__=xg;Vh.prototype=I(xg.prototype,{clone:function(){var a=new Vh(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__:Vh});var $m=function(a,b,c,d,f,g,h,n,l,q,v){v==
null&&(v=!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);na.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=v;this.__updateAfterEventFlag=!1};t["openfl.events.KeyboardEvent"]=$m;$m.__name__="openfl.events.KeyboardEvent";$m.__super__=na;$m.prototype=I(na.prototype,{altKey:null,charCode:null,commandKey:null,controlKey:null,
ctrlKey:null,keyCode:null,keyLocation:null,shiftKey:null,__updateAfterEventFlag:null,clone:function(){var a=new $m(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(){na.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__:$m});var Hc=function(a,b,c,d,f,g,h,n,l,q,v,w,z,r){r==null&&(r=0);z==null&&(z=!1);w==null&&(w=!1);v==null&&(v=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);na.call(this,a,b,c);this.shiftKey=l;this.altKey=n;this.ctrlKey=h;this.bubbles=b;this.relatedObject=g;this.delta=v;this.localX=d;this.localY=f;this.buttonDown=q;this.commandKey=w;this.controlKey=z;this.clickCount=r;this.isRelatedObjectInaccessible=!1;this.stageY=this.stageX=NaN;this.__updateAfterEventFlag=!1};t["openfl.events.MouseEvent"]=Hc;Hc.__name__="openfl.events.MouseEvent";Hc.__create=function(a,b,c,d,f,g,h,n){n==null&&(n=0);a=new Hc(a,!0,!1,g.x,g.y,null,Hc.__ctrlKey,Hc.__altKey,Hc.__shiftKey,
Hc.__buttonDown,n,Hc.__commandKey,Hc.__controlKey,c);a.stageX=d;a.stageY=f;a.target=h;return a};Hc.__super__=na;Hc.prototype=I(na.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 Hc(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(){na.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__:Hc});var sn=function(a,b,c,d){c==null&&(c=!1);b==null&&(b=!1);this.info=d;na.call(this,a,b,c)};t["openfl.events.NetStatusEvent"]=sn;sn.__name__="openfl.events.NetStatusEvent";sn.__super__=na;sn.prototype=I(na.prototype,{info:null,clone:function(){var a=
new sn(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(){na.prototype.__init.call(this);this.info=null},__class__:sn});var zh=function(a,b,c,d,f){f==null&&(f=0);d==null&&(d=0);c==null&&(c=!1);b==null&&(b=!1);na.call(this,a,b,c);this.bytesLoaded=d;this.bytesTotal=f};t["openfl.events.ProgressEvent"]=
zh;zh.__name__="openfl.events.ProgressEvent";zh.__super__=na;zh.prototype=I(na.prototype,{bytesLoaded:null,bytesTotal:null,clone:function(){var a=new zh(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(){na.prototype.__init.call(this);this.bytesTotal=
this.bytesLoaded=0},__class__:zh});var jk=function(a,b,c,d,f,g){g==null&&(g=!0);c==null&&(c=!1);b==null&&(b=!1);na.call(this,a,b,c);this.objectMatrix=d;this.objectColorTransform=f;this.allowSmoothing=g};t["openfl.events.RenderEvent"]=jk;jk.__name__="openfl.events.RenderEvent";jk.__super__=na;jk.prototype=I(na.prototype,{allowSmoothing:null,objectColorTransform:null,objectMatrix:null,renderer:null,clone:function(){var a=new jk(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(){na.prototype.__init.call(this);this.objectColorTransform=this.objectMatrix=null;this.allowSmoothing=!1;this.renderer=null},__class__:jk});var Io=function(a,b,c){c==null&&(c=!1);b==null&&(b=!1);na.call(this,a,b,c);this.data=new Vc(0);this.data.__endian=1;this.position=0};
t["openfl.events.SampleDataEvent"]=Io;Io.__name__="openfl.events.SampleDataEvent";Io.__super__=na;Io.prototype=I(na.prototype,{data:null,position:null,tempBuffer:null,leftChannel:null,rightChannel:null,clone:function(){var a=new Io(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(){na.prototype.__init.call(this);this.data=new Vc(0);this.data.__endian=1;this.position=0},getBufferSize:function(){var a=Ua.toFloat(lc.get_length(this.data))/Ua.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 Ud("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=
mA.fromBytes(lc.toBytes(this.data));this.leftChannel=a.outputBuffer.getChannelData(0);this.rightChannel=a.outputBuffer.getChannelData(1);for(var b=a=0,c=Ua.toFloat(lc.get_length(this.data))/Ua.toFloat(2)|0;b<c;){var d=b++;this.leftChannel[d]=this.tempBuffer[a++];this.rightChannel[d]=this.tempBuffer[a++]}},__class__:Io});var Em=function(a,b,c,d,f){f==null&&(f=0);d==null&&(d="");c==null&&(c=!1);b==null&&(b=!1);xg.call(this,a,b,c,d,f)};t["openfl.events.SecurityErrorEvent"]=Em;Em.__name__="openfl.events.SecurityErrorEvent";
Em.__super__=xg;Em.prototype=I(xg.prototype,{clone:function(){var a=new Em(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__:Em});var an=function(a,b,c,d,f){f==null&&(f=3);d==null&&(d=3);c==null&&(c=!1);b==null&&(b=!1);na.call(this,a,b,c);this.beforeOrientation=
d;this.afterOrientation=f};t["openfl.events.StageOrientationEvent"]=an;an.__name__="openfl.events.StageOrientationEvent";an.__super__=na;an.prototype=I(na.prototype,{beforeOrientation:null,afterOrientation:null,clone:function(){var a=new an(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__:an});var Al=function(a,b,c){c==null&&(c=!1);b==null&&(b=!1);na.call(this,a,b,c);this.__updateAfterEventFlag=!1};t["openfl.events.TimerEvent"]=Al;Al.__name__="openfl.events.TimerEvent";Al.__super__=na;Al.prototype=I(na.prototype,{__updateAfterEventFlag:null,clone:function(){var a=new Al(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__:Al});var Wf=function(a,b,c,d,f,g,h,n,l,q,v,w,z,r,G,J,L,P,V,ia){J==null&&(J=!1);G==null&&(G=!1);r==null&&(r=!1);z==null&&(z=!1);w==null&&(w=!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);na.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=v;this.ctrlKey=w;this.altKey=z;this.shiftKey=r;this.commandKey=G;this.controlKey=J;this.stageY=this.stageX=NaN;this.__updateAfterEventFlag=!1};t["openfl.events.TouchEvent"]=Wf;Wf.__name__="openfl.events.TouchEvent";Wf.__create=function(a,b,c,d,f,g){a=new Wf(a,!0,!1,0,!0,f.x,f.y,1,1,1);a.stageX=c;a.stageY=d;a.target=g;return a};Wf.__super__=na;Wf.prototype=I(na.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 Wf(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(){na.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__:Wf});var Bl=function(a,b,c,d){c==null&&(c=!0);b==null&&(b=!0);xg.call(this,a,b,c);this.error=d};t["openfl.events.UncaughtErrorEvent"]=Bl;Bl.__name__="openfl.events.UncaughtErrorEvent";Bl.__super__=xg;Bl.prototype=I(xg.prototype,{error:null,clone:function(){var a=new Bl(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(){xg.prototype.__init.call(this);this.cancelable=this.bubbles=!0;this.error=null},__class__:Bl});var kv=function(){this.__enabled=!0;ma.call(this)};t["openfl.events.UncaughtErrorEvents"]=kv;kv.__name__="openfl.events.UncaughtErrorEvents";kv.__super__=ma;kv.prototype=I(ma.prototype,{__enabled:null,addEventListener:function(a,b,c,d,f){f==
null&&(f=!1);d==null&&(d=0);c==null&&(c=!1);ma.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);ma.prototype.removeEventListener.call(this,a,b,c);Object.prototype.hasOwnProperty.call(this.__eventMap.h,"uncaughtError")||(this.__enabled=!1)},__class__:kv});var Jo=function(){};t["openfl.external.ExternalInterface"]=Jo;Jo.__name__="openfl.external.ExternalInterface";
Jo.__properties__={get_objectID:"get_objectID"};Jo.addCallback=function(a,b){jd.application.__window.element!=null&&(jd.application.__window.element[a]=b)};Jo.call=function(a,b,c,d,f,g){if(!(new Xa("^\\(.+\\)$","")).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 Eb.typeof(n)!=Pa.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)};Jo.get_objectID=function(){return jd.application!=
null&&jd.application.__window!=null&&jd.application.__window.element!=null?jd.application.__window.element.id:null};var ni=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"]=ni;ni.__name__="openfl.filters.BitmapFilter";ni.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 ni},__applyFilter:function(a,b,c,d){return b},__initShader:function(a,b,c){return null},__class__:ni};var Re=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}");Yh.call(this,a);this.__isGenerated=!0;this.__initGL()};t["openfl.filters.BitmapFilterShader"]=Re;Re.__name__="openfl.filters.BitmapFilterShader";
Re.__super__=Yh;Re.prototype=I(Yh.prototype,{openfl_Position:null,openfl_TextureCoord:null,openfl_Matrix:null,openfl_TextureSize:null,openfl_Texture:null,__class__:Re});var Fv=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}");
Re.call(this);this.uRadius.value=[0,0];this.__isGenerated=!0;this.__initGL()};t["openfl.filters._BlurFilter.BlurShader"]=Fv;Fv.__name__="openfl.filters._BlurFilter.BlurShader";Fv.__super__=Re;Fv.prototype=I(Re.prototype,{__update:function(){this.uTextureSize.value=[this.__texture.input.width,this.__texture.input.height];Re.prototype.__update.call(this)},uRadius:null,uTextureSize:null,__class__:Fv});var pj=function(a,b,c){c==null&&(c=1);b==null&&(b=4);a==null&&(a=4);ni.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"]=pj;pj.__name__="openfl.filters.BlurFilter";pj.__super__=ni;pj.prototype=I(ni.prototype,{__blurX:null,__blurY:null,__horizontalPasses:null,__quality:null,__verticalPasses:null,clone:function(){return new pj(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),pj.__blurShader.uRadius.value[0]=this.get_blurX()*a,pj.__blurShader.uRadius.value[1]=0):(a=Math.pow(.5,b-this.__horizontalPasses>>1),pj.__blurShader.uRadius.value[0]=0,pj.__blurShader.uRadius.value[1]=this.get_blurY()*a);return pj.__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__:pj,__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 Gv=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");
Re.call(this);this.offset.value=[0,0];this.__isGenerated=!0;this.__initGL()};t["openfl.filters._DropShadowFilter.HideShader"]=Gv;Gv.__name__="openfl.filters._DropShadowFilter.HideShader";Gv.__super__=Re;Gv.prototype=I(Re.prototype,{offset:null,sourceBitmap:null,__class__:Gv});var Il=function(a,b,c,d,f,g,h,n,l,q,v){v==null&&(v=!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);ni.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=v;this.__updateSize();this.__renderDirty=this.__preserveObject=this.__needSecondBitmapData=!0};t["openfl.filters.DropShadowFilter"]=Il;Il.__name__="openfl.filters.DropShadowFilter";Il.__super__=ni;Il.prototype=I(ni.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 Il(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 Ca(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 id(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 me.__invertAlphaShader;a=b-(this.__inner?1:0);b=this.__horizontalPasses+this.__verticalPasses;if(a<b){var d=me.__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=me.__innerCombineKnockoutShader,d.sourceBitmap.input=c,d.offset.value[0]=this.__offsetX,d.offset.value[1]=
this.__offsetY,d;d=me.__innerCombineShader}else{if(this.__knockout)return d=me.__combineKnockoutShader,d.sourceBitmap.input=c,d.offset.value[0]=this.__offsetX,d.offset.value[1]=this.__offsetY,d;if(this.__hideObject)return d=Il.__hideShader,d.sourceBitmap.input=c,d.offset.value[0]=this.__offsetX,d.offset.value[1]=this.__offsetY,d;d=me.__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__:Il,__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 Hv=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");
Re.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"]=Hv;Hv.__name__="openfl.filters._GlowFilter.BlurAlphaShader";Hv.__super__=Re;Hv.prototype=I(Re.prototype,{uRadius:null,uColor:null,uStrength:null,__class__:Hv});var Iv=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");Re.call(this);this.offset.value=[0,0];this.__isGenerated=
!0;this.__initGL()};t["openfl.filters._GlowFilter.CombineKnockoutShader"]=Iv;Iv.__name__="openfl.filters._GlowFilter.CombineKnockoutShader";Iv.__super__=Re;Iv.prototype=I(Re.prototype,{offset:null,sourceBitmap:null,__class__:Iv});var Jv=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");Re.call(this);this.offset.value=[0,0];this.__isGenerated=
!0;this.__initGL()};t["openfl.filters._GlowFilter.CombineShader"]=Jv;Jv.__name__="openfl.filters._GlowFilter.CombineShader";Jv.__super__=Re;Jv.prototype=I(Re.prototype,{offset:null,sourceBitmap:null,__class__:Jv});var Kv=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");Re.call(this);this.offset.value=[0,0];this.__isGenerated=
!0;this.__initGL()};t["openfl.filters._GlowFilter.InnerCombineKnockoutShader"]=Kv;Kv.__name__="openfl.filters._GlowFilter.InnerCombineKnockoutShader";Kv.__super__=Re;Kv.prototype=I(Re.prototype,{offset:null,sourceBitmap:null,__class__:Kv});var Lv=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");Re.call(this);this.offset.value=[0,0];this.__isGenerated=
!0;this.__initGL()};t["openfl.filters._GlowFilter.InnerCombineShader"]=Lv;Lv.__name__="openfl.filters._GlowFilter.InnerCombineShader";Lv.__super__=Re;Lv.prototype=I(Re.prototype,{offset:null,sourceBitmap:null,__class__:Lv});var Mv=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");Re.call(this);this.__isGenerated=!0;this.__initGL()};t["openfl.filters._GlowFilter.InvertAlphaShader"]=Mv;Mv.__name__="openfl.filters._GlowFilter.InvertAlphaShader";Mv.__super__=
Re;Mv.prototype=I(Re.prototype,{__class__:Mv});var me=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);ni.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"]=me;me.__name__="openfl.filters.GlowFilter";
me.__super__=ni;me.prototype=I(ni.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 me(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 id(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 me.__invertAlphaShader;a=b-(this.__inner?1:0);b=this.__horizontalPasses+this.__verticalPasses;if(a<b){var d=me.__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=me.__innerCombineKnockoutShader,d.sourceBitmap.input=c,d.offset.value[0]=0,d.offset.value[1]=0,d;d=me.__innerCombineShader}else{if(this.__knockout)return d=
me.__combineKnockoutShader,d.sourceBitmap.input=c,d.offset.value[0]=0,d.offset.value[1]=0,d;d=me.__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__:me,__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 Hf=function(a){this.blendMode=10;ni.call(this);this.shader=a;this.__numShaderPasses=1};t["openfl.filters.ShaderFilter"]=Hf;Hf.__name__="openfl.filters.ShaderFilter";Hf.__super__=ni;Hf.prototype=I(ni.prototype,{blendMode:null,
shader:null,clone:function(){var a=new Hf(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__:Hf,__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=ub.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(ub.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(ub.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(ub.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 de(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),v=this.rawData.get(6),w=this.rawData.get(10),z=this.rawData.get(14),r=this.rawData.get(3),G=this.rawData.get(7),
J=this.rawData.get(11),L=this.rawData.get(15),P=a.rawData.get(0),V=a.rawData.get(4),ia=a.rawData.get(8),ea=a.rawData.get(12),ra=a.rawData.get(1),za=a.rawData.get(5),fb=a.rawData.get(9),eb=a.rawData.get(13),Ra=a.rawData.get(2),wb=a.rawData.get(6),cb=a.rawData.get(10),Tb=a.rawData.get(14),Ib=a.rawData.get(3),Mb=a.rawData.get(7),tc=a.rawData.get(11);a=a.rawData.get(15);this.rawData.set(0,b*P+g*V+q*ia+r*ea);this.rawData.set(1,b*ra+g*za+q*fb+r*eb);this.rawData.set(2,b*Ra+g*wb+q*cb+r*Tb);this.rawData.set(3,
b*Ib+g*Mb+q*tc+r*a);this.rawData.set(4,c*P+h*V+v*ia+G*ea);this.rawData.set(5,c*ra+h*za+v*fb+G*eb);this.rawData.set(6,c*Ra+h*wb+v*cb+G*Tb);this.rawData.set(7,c*Ib+h*Mb+v*tc+G*a);this.rawData.set(8,d*P+n*V+w*ia+J*ea);this.rawData.set(9,d*ra+n*za+w*fb+J*eb);this.rawData.set(10,d*Ra+n*wb+w*cb+J*Tb);this.rawData.set(11,d*Ib+n*Mb+w*tc+J*a);this.rawData.set(12,f*P+l*V+z*ia+L*ea);this.rawData.set(13,f*ra+l*za+z*fb+L*eb);this.rawData.set(14,f*Ra+l*wb+z*cb+L*Tb);this.rawData.set(15,f*Ib+l*Mb+z*tc+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,v=b*b,w=l+q+v;if(w!=0){var z=Math.sqrt(w);h/=z;n/=z;b/=z;l/=w;q/=w;v/=w}w=1-a;z=new Cf;var r=z.rawData;r.set(0,l+(q+v)*a);r.set(1,h*n*w+b*c);r.set(2,h*b*w-n*c);r.set(4,h*n*w-b*c);r.set(5,q+(l+v)*a);r.set(6,n*b*w+h*c);r.set(8,h*b*w+n*c);r.set(9,n*b*w-h*c);r.set(10,v+(l+q)*a);r.set(12,(g*(q+v)-h*(f*n+d*b))*w+(f*b-d*n)*c);r.set(13,(f*(l+v)-n*(g*h+d*b))*w+(d*h-g*b)*c);r.set(14,
(d*(l+q)-b*(g*h+f*n))*w+(g*n-f*h)*c);this.append(z)},appendScale:function(a,b,c){this.append(new Cf(ub.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=ub.toObjectVector(null),c=this.clone().rawData.copy(),d=new de(c.get(12),c.get(13),c.get(14));c.set(12,0);c.set(13,0);c.set(14,0);var f=new de;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 de;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=ub.toObjectVector(null));var c=this.clone().rawData.copy(),d=b.get(0);d==null?d=new de(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 de);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 de);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 de(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 de(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=ub.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),v=this.rawData.get(2),w=this.rawData.get(6),z=this.rawData.get(10),r=this.rawData.get(14),G=this.rawData.get(3),J=this.rawData.get(7),L=this.rawData.get(11),P=this.rawData.get(15);this.rawData.set(0,a*(n*(z*P-r*L)-l*(w*P-r*J)+q*(w*L-z*J)));this.rawData.set(1,-a*(h*(z*P-r*L)-l*(v*P-r*G)+q*(v*L-z*G)));this.rawData.set(2,a*(h*
(w*P-r*J)-n*(v*P-r*G)+q*(v*J-w*G)));this.rawData.set(3,-a*(h*(w*L-z*J)-n*(v*L-z*G)+l*(v*J-w*G)));this.rawData.set(4,-a*(d*(z*P-r*L)-f*(w*P-r*J)+g*(w*L-z*J)));this.rawData.set(5,a*(c*(z*P-r*L)-f*(v*P-r*G)+g*(v*L-z*G)));this.rawData.set(6,-a*(c*(w*P-r*J)-d*(v*P-r*G)+g*(v*J-w*G)));this.rawData.set(7,a*(c*(w*L-z*J)-d*(v*L-z*G)+f*(v*J-w*G)));this.rawData.set(8,a*(d*(l*P-q*L)-f*(n*P-q*J)+g*(n*L-l*J)));this.rawData.set(9,-a*(c*(l*P-q*L)-f*(h*P-q*G)+g*(h*L-l*G)));this.rawData.set(10,a*(c*(n*P-q*J)-d*(h*P-
q*G)+g*(h*J-n*G)));this.rawData.set(11,-a*(c*(n*L-l*J)-d*(h*L-l*G)+f*(h*J-n*G)));this.rawData.set(12,-a*(d*(l*r-q*z)-f*(n*r-q*w)+g*(n*z-l*w)));this.rawData.set(13,a*(c*(l*r-q*z)-f*(h*r-q*v)+g*(h*z-l*v)));this.rawData.set(14,-a*(c*(n*r-q*w)-d*(h*r-q*v)+g*(h*w-n*v)));this.rawData.set(15,a*(c*(n*z-l*w)-d*(h*z-l*v)+f*(h*w-n*v)))}return b},pointAt:function(a,b,c){b==null&&(b=new de(0,0,-1));c==null&&(c=new de(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 de(-b.y,b.x,0):new de(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),v=a.rawData.get(6),w=a.rawData.get(10),z=a.rawData.get(14),r=a.rawData.get(3),G=a.rawData.get(7),J=a.rawData.get(11);a=a.rawData.get(15);var L=this.rawData.get(0),P=this.rawData.get(4),V=this.rawData.get(8),ia=this.rawData.get(12),ea=this.rawData.get(1),ra=this.rawData.get(5),za=this.rawData.get(9),
fb=this.rawData.get(13),eb=this.rawData.get(2),Ra=this.rawData.get(6),wb=this.rawData.get(10),cb=this.rawData.get(14),Tb=this.rawData.get(3),Ib=this.rawData.get(7),Mb=this.rawData.get(11),tc=this.rawData.get(15);this.rawData.set(0,b*L+g*P+q*V+r*ia);this.rawData.set(1,b*ea+g*ra+q*za+r*fb);this.rawData.set(2,b*eb+g*Ra+q*wb+r*cb);this.rawData.set(3,b*Tb+g*Ib+q*Mb+r*tc);this.rawData.set(4,c*L+h*P+v*V+G*ia);this.rawData.set(5,c*ea+h*ra+v*za+G*fb);this.rawData.set(6,c*eb+h*Ra+v*wb+G*cb);this.rawData.set(7,
c*Tb+h*Ib+v*Mb+G*tc);this.rawData.set(8,d*L+n*P+w*V+J*ia);this.rawData.set(9,d*ea+n*ra+w*za+J*fb);this.rawData.set(10,d*eb+n*Ra+w*wb+J*cb);this.rawData.set(11,d*Tb+n*Ib+w*Mb+J*tc);this.rawData.set(12,f*L+l*P+z*V+a*ia);this.rawData.set(13,f*ea+l*ra+z*za+a*fb);this.rawData.set(14,f*eb+l*Ra+z*wb+a*cb);this.rawData.set(15,f*Tb+l*Ib+z*Mb+a*tc)},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,
v=b*b,w=l+q+v;if(w!=0){var z=Math.sqrt(w);h/=z;n/=z;b/=z;l/=w;q/=w;v/=w}w=1-a;z=new Cf;var r=z.rawData;r.set(0,l+(q+v)*a);r.set(1,h*n*w+b*c);r.set(2,h*b*w-n*c);r.set(4,h*n*w-b*c);r.set(5,q+(l+v)*a);r.set(6,n*b*w+h*c);r.set(8,h*b*w+n*c);r.set(9,n*b*w-h*c);r.set(10,v+(l+q)*a);r.set(12,(g*(q+v)-h*(f*n+d*b))*w+(f*b-d*n)*c);r.set(13,(f*(l+v)-n*(g*h+d*b))*w+(d*h-g*b)*c);r.set(14,(d*(l+q)-b*(g*h+f*n))*w+(g*n-f*h)*c);this.prepend(z)},prependScale:function(a,b,c){this.prepend(new Cf(ub.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 de(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 de(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 de(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 de(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 Yq=function(a){this.__colorTransform=new id;this.concatenatedColorTransform=new id;this.pixelBounds=new Ha;this.__displayObject=a;this.__hasMatrix=!0};t["openfl.geom.Transform"]=Yq;Yq.__name__="openfl.geom.Transform";Yq.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(ub.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__:Yq,__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 de=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"]=de;de.__name__="openfl.geom.Vector3D";de.__properties__={get_Z_AXIS:"get_Z_AXIS",get_Y_AXIS:"get_Y_AXIS",get_X_AXIS:"get_X_AXIS"};de.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)};de.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)};de.get_X_AXIS=function(){return new de(1,0,0)};de.get_Y_AXIS=function(){return new de(0,1,0)};de.get_Z_AXIS=
function(){return new de(0,0,1)};de.prototype={w:null,x:null,y:null,z:null,add:function(a){return new de(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 de(this.x+a.x,this.y+a.y,this.z+a.z)},clone:function(){return new de(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 de(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 de(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 de(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 de(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__:de,__properties__:{get_lengthSquared:"get_lengthSquared",get_length:"get_length"}};var rp=function(a,b,c){c==null&&(c=1);b==null&&(b=1);this.requestedLocaleIDName=
a;this._normalizedRequestedLocaleIDName=tn.normalizeRequestedLocaleIDName(a);this.setDateTimeStyles(b,c);this.actualLocaleIDName=this.intlDateTimeFormat.resolvedOptions().locale;this.lastOperationStatus=7};t["openfl.globalization.DateTimeFormatter"]=rp;rp.__name__="openfl.globalization.DateTimeFormatter";rp.getAvailableLocaleIDNames=function(){return ub.toObjectVector(null)};rp.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=Jy.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;F.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 ub.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 ub.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=Jy.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=Z.caught(d).unwrap(),ye.trace("Date time tokenization error: "+F.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__:rp};var Jy=function(){};t["openfl.globalization._DateTimeFormatter.DateTimeFormatTokenizer"]=Jy;Jy.__name__=
"openfl.globalization._DateTimeFormatter.DateTimeFormatTokenizer";Jy.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=kc.Text(h+g),++f):(b.push(d),d=null):d=kc.Text(h+g)}else{switch(g){case "'":g=kc.Text("");break;case "D":g=kc.DayOfYear(1);break;case "E":g=kc.Weekday(1);break;case "F":g=kc.DayOfWeekOccurence;break;case "G":g=kc.Era(1);break;case "H":g=kc.Hour23(1);break;case "K":g=
kc.Hour11(1);break;case "M":g=kc.Month(1);break;case "Q":g=kc.Quarter(1);break;case "S":g=kc.Millisecond(1);break;case "W":g=kc.WeekOfMonth;break;case "Z":g=kc.TimeZoneOffset(1);break;case "a":g=kc.AMPM;break;case "d":g=kc.Date(1);break;case "h":g=kc.Hour12(1);break;case "k":g=kc.Hour24(1);break;case "m":g=kc.Minute(1);break;case "s":g=kc.Second(1);break;case "v":g=kc.TimeZone(1);break;case "w":g=kc.WeekOfYear(1);break;case "y":g=kc.Year(1);break;case "z":g=kc.TimeZoneDST(1);break;default:(new Xa("^[A-Za-z]$",
"")).match(g)?g=kc.Invalid(g):(c+=g,g=null)}g!=null&&c.length>0&&(b.push(kc.Text(c)),c="");if(d!=null&&g!=null&&Q[g.__enum__].__constructs__[g._hx_index]._hx_name==Q[d.__enum__].__constructs__[d._hx_index]._hx_name)switch(d._hx_index){case 0:d=kc.Invalid(d.text);break;case 1:d=kc.Invalid(d.text);break;case 2:d=kc.Weekday(Math.min(5,d.length+1)|0);break;case 3:d=kc.Era(Math.min(5,d.length+1)|0);break;case 4:d=kc.Year(Math.min(5,d.length+1)|0);break;case 5:d=kc.Month(Math.min(5,d.length+1)|0);break;
case 6:d=kc.Date(Math.min(2,d.length+1)|0);break;case 7:d=kc.Quarter(Math.min(4,d.length+1)|0);break;case 8:d=kc.WeekOfYear(Math.min(2,d.length+1)|0);break;case 9:d=kc.WeekOfMonth;break;case 10:d=kc.DayOfYear(Math.min(3,d.length+1)|0);break;case 11:d=kc.DayOfWeekOccurence;break;case 12:d=kc.AMPM;break;case 13:d=kc.Hour11(Math.min(2,d.length+1)|0);break;case 14:d=kc.Hour12(Math.min(2,d.length+1)|0);break;case 15:d=kc.Hour23(Math.min(2,d.length+1)|0);break;case 16:d=kc.Hour24(Math.min(2,d.length+1)|
0);break;case 17:d=kc.Minute(Math.min(2,d.length+1)|0);break;case 18:d=kc.Second(Math.min(2,d.length+1)|0);break;case 19:d=kc.Millisecond(Math.min(5,d.length+1)|0);break;case 20:d=kc.TimeZone(Math.min(4,d.length+1)|0);break;case 21:d=kc.TimeZoneDST(Math.min(4,d.length+1)|0);break;case 22:d=kc.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(kc.Text(c));return b};var kc=Q["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)};kc.__constructs__=[kc.Text,kc.Invalid,kc.Weekday,
kc.Era,kc.Year,kc.Month,kc.Date,kc.Quarter,kc.WeekOfYear,kc.WeekOfMonth,kc.DayOfYear,kc.DayOfWeekOccurence,kc.AMPM,kc.Hour11,kc.Hour12,kc.Hour23,kc.Hour24,kc.Minute,kc.Second,kc.Millisecond,kc.TimeZone,kc.TimeZoneDST,kc.TimeZoneOffset];var tn=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=u.field(b,"baseName");this.language=u.field(b,"language");this.region=u.field(b,
"region");this.script=u.field(b,"script");this.rtl=tn.RTL_LANGUAGES.indexOf(this.language)!=-1;this.lastOperationStatus=7}catch(c){Pb.lastError=c,this.lastOperationStatus=1}};t["openfl.globalization.LocaleID"]=tn;tn.__name__="openfl.globalization.LocaleID";tn.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()+U.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};tn.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__:tn};var kw=function(){};t["openfl.media.ID3Info"]=kw;kw.__name__="openfl.media.ID3Info";kw.prototype={album:null,artist:null,comment:null,genre:null,songName:null,track:null,year:null,__class__:kw};var Hs=function(a,b,c){this.__firstRun=!0;ma.call(this,this);this.__sound=a;this.rightPeak=this.leftPeak=1;this.__soundTransform=c!=null?c:new ri;this.__initAudioSource(b);ue.__registerSoundChannel(this)};t["openfl.media.SoundChannel"]=Hs;Hs.__name__=
"openfl.media.SoundChannel";Hs.__super__=ma;Hs.prototype=I(ma.prototype,{leftPeak:null,rightPeak:null,__sound:null,__isValid:null,__soundTransform:null,__audioSource:null,__sampleDataEvent:null,__processor:null,__firstRun:null,stop:function(){ue.__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 Io("sampleData");this.__sound.dispatchEvent(this.__sampleDataEvent);var c=this.__sampleDataEvent.getBufferSize();c==0?La.setTimeout(function(){a.stop();a.dispatchEvent(new na("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=ue.__soundTransform.pan+this.__soundTransform.pan;b<-1&&(b=-1);b>1&&(b=1);var c=ue.__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(){ue.__unregisterSoundChannel(this);this.__dispose();this.dispatchEvent(new na("soundComplete"))},onSample:function(a){if(this.__firstRun){var b=!0;this.__firstRun=!1}else lc.set_length(this.__sampleDataEvent.data,0),this.__sound.dispatchEvent(this.__sampleDataEvent),b=Ua.gt(lc.get_length(this.__sampleDataEvent.data),0);b?this.__sampleDataEvent.getSamples(a):(this.stop(),this.dispatchEvent(new na("soundComplete")))},
__class__:Hs,__properties__:{set_soundTransform:"set_soundTransform",get_soundTransform:"get_soundTransform",set_position:"set_position",get_position:"get_position"}});var Kz=function(a,b){b==null&&(b=!1);a==null&&(a=1E3);this.bufferTime=a;this.checkPolicyFile=b};t["openfl.media.SoundLoaderContext"]=Kz;Kz.__name__="openfl.media.SoundLoaderContext";Kz.prototype={bufferTime:null,checkPolicyFile:null,__class__:Kz};var ri=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"]=ri;ri.__name__="openfl.media.SoundTransform";ri.prototype={leftToLeft:null,leftToRight:null,pan:null,rightToLeft:null,rightToRight:null,volume:null,clone:function(){return new ri(this.volume,this.pan)},__class__:ri};var ue=function(){};t["openfl.media.SoundMixer"]=ue;ue.__name__="openfl.media.SoundMixer";ue.__properties__={set_soundTransform:"set_soundTransform",get_soundTransform:"get_soundTransform"};ue.areSoundsInaccessible=
function(){return!1};ue.stopAll=function(){for(var a=ue.__soundChannels.length;a>0;)--a,ue.__soundChannels[a].stop()};ue.__registerSoundChannel=function(a){ue.__soundChannels.push(a)};ue.__unregisterSoundChannel=function(a){U.remove(ue.__soundChannels,a)};ue.get_soundTransform=function(){return ue.__soundTransform};ue.__unregisterSoundChannelByBuffer=function(a){for(var b=ue.__soundChannels.length;b>0;){--b;var c=ue.__soundChannels[b];c.__audioSource.buffer==a&&c.stop()}};ue.set_soundTransform=function(a){ue.__soundTransform=
a.clone();for(var b=0,c=ue.__soundChannels;b<c.length;){var d=c[b];++b;d.__updateTransform()}return a};var Zo=function(a,b){b==null&&(b=240);a==null&&(a=320);ka.call(this);this.__drawableType=8;this.__width=a;this.__height=b;this.__textureTime=-1;this.smoothing=!1;this.deblocking=0};t["openfl.media.Video"]=Zo;Zo.__name__="openfl.media.Video";Zo.__super__=ka;Zo.prototype=I(ka.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=Ha.__pool.get();c.setTo(0,0,this.__width,this.__height);c.__transform(c,b);a.__expand(c.x,c.y,c.width,c.height);Ha.__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),Ad.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(il.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=Ca.__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;Ca.__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__:Zo,__properties__:I(ka.prototype.__properties__,{get_videoWidth:"get_videoWidth",get_videoHeight:"get_videoHeight"})});var hw=function(a,b,c){this.description=a;this.extension=b;this.macType=c};t["openfl.net.FileFilter"]=hw;hw.__name__="openfl.net.FileFilter";
hw.prototype={description:null,extension:null,macType:null,__class__:hw};var Vo=function(){this.__pendingDownload=!1;ma.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"]=Vo;Vo.__name__="openfl.net.FileReference";Vo.__super__=ma;Vo.prototype=I(ma.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 na("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=Fg.extension(g.name);b.type="."+h;b.name=Fg.withoutDirectory(g.name);b.__path=g.name;b.dispatchEvent(new na("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 mj;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 jq;a.onCancel.add(m(this,this.saveFileDialog_onCancel));a.onSelect.add(m(this,this.saveFileDialog_onSelect));a.browse(tu.SAVE,b!=null?Fg.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=lc.fromArrayBuffer(d.target.result);a.openFileDialog_onComplete()};c.onerror=function(d){a.dispatchEvent(new Vh("ioError"))};c.readAsArrayBuffer(b)},save:function(a,b){this.__path=this.__data=null;a!=null&&(a instanceof Vc?this.__data=a:(this.__data=new Vc(0),this.__data.writeUTFBytes(F.string(a))),a=new jq,a.onCancel.add(m(this,
this.saveFileDialog_onCancel)),a.onSave.add(m(this,this.saveFileDialog_onSave)),a.save(this.__data,b!=null?Fg.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=lc.fromArrayBuffer(f.target.result);d.__uploadFileBytes(a,b,f)};c.onerror=function(f){d.dispatchEvent(new Vh("ioError"))}},__uploadFileBytes:function(a,b,c){var d=Eb.typeof(a.data)==Pa.TObject;if(d&&a.method=="GET"){for(var f="",g=u.fields(a.data),h=a.url.lastIndexOf("?")==
-1?"?":"&",n=0;n<g.length;){var l=g[n];++n;var q=u.field(a.data,l);f+=f.length==0?h:"&";f+=l+"="+q}a.url+=f}f=new Vc(0);if(d&&a.method=="POST")for(g=u.fields(a.data),n=0;n<g.length;)l=g[n],++n,q=u.field(a.data,l),f.writeUTFBytes("------------KM7GI3GI3ae0GI3ae0cH2KM7Ef1cH2\r\n"),f.writeUTFBytes('Content-Disposition: form-data; name="'+l+'"\r\n\r\n'),f.writeUTFBytes(F.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 Qq("Accept","text/*"),new Qq("Cache-Control","no-cache")];b=new mj;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 na("cancel"))},openFileDialog_onComplete:function(){this.dispatchEvent(new na("complete"))},openFileDialog_onSelect:function(a){this.name=Fg.withoutDirectory(a);this.__path=a;this.dispatchEvent(new na("select"))},saveFileDialog_onCancel:function(){this.dispatchEvent(new na("cancel"))},
saveFileDialog_onSave:function(a){var b=this;Ec.delay(function(){b.dispatchEvent(new na("complete"))},1)},saveFileDialog_onSelect:function(a){this.dispatchEvent(new na("select"))},urlLoader_download_onComplete:function(a){this.__urlLoader.data instanceof Vc?this.__data=this.__urlLoader.data:(this.__data=new Vc(0),this.__data.writeUTFBytes(F.string(this.__urlLoader.data)));this.__pendingDownload&&((new jq).save(this.__data,this.__pendingDefaultFileName!=null?Fg.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 na("complete")):a.status!=0&&this.dispatchEvent(a)},urlLoader_upload_onComplete:function(a){this.dispatchEvent(new rn("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__:Vo,__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 Ky=function(){};t["openfl.net.IDynamicPropertyOutput"]=Ky;Ky.__name__="openfl.net.IDynamicPropertyOutput";Ky.__isInterface__=!0;Ky.prototype={writeDynamicProperty:null,__class__:Ky};var Ly=function(){};t["openfl.net.IDynamicPropertyWriter"]=Ly;Ly.__name__="openfl.net.IDynamicPropertyWriter";Ly.__isInterface__=!0;Ly.prototype={writeDynamicProperties:null,
__class__:Ly};var Cn=function(){ma.call(this)};t["openfl.net.NetConnection"]=Cn;Cn.__name__="openfl.net.NetConnection";Cn.__super__=ma;Cn.prototype=I(ma.prototype,{connect:function(a,b,c,d,f,g){if(a!=null)throw Z.thrown('Error: Can only connect in "HTTP streaming" mode');this.dispatchEvent(new sn("netStatus",!1,!0,{code:"NetConnection.Connect.Success"}))},__class__:Cn});var $o=function(a,b){ma.call(this);this.__connection=a;this.__soundTransform=new ri;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"]=$o;$o.__name__="openfl.net.NetStream";$o.__super__=ma;$o.prototype=I(ma.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=ue.__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 Ec(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 sn("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=ue.__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__:$o,__properties__:{set_speed:"set_speed",get_speed:"get_speed",set_soundTransform:"set_soundTransform",get_soundTransform:"get_soundTransform"}});var Xe=function(){ma.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 Ud("Error #2134: Cannot create SharedObject.");Xe.__sharedObjects==null&&(Xe.__sharedObjects=new H,Ma.current!=null&&Ma.current.onExit.add(Xe.application_onExit));c=b+"/"+a;if(!Object.prototype.hasOwnProperty.call(Xe.__sharedObjects.h,c)){d=null;try{var h=hl.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 Rg(d);n.setResolver({resolveEnum:Eb.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){jd.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=U.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__=ma;Xe.prototype=I(ma.prototype,{client:null,data:null,fps:null,objectEncoding:null,__localPath:null,
__name:null,clear:function(){this.data={};try{var a=hl.getLocalStorage();a!=null&&a.removeItem(this.__localPath+":"+this.__name)}catch(b){Pb.lastError=b}},close:function(){},connect:function(a,b){jd.notImplemented({fileName:"openfl/net/SharedObject.hx",lineNumber:392,className:"openfl.net.SharedObject",methodName:"connect"})},flush:function(a){if(u.fields(this.data).length==0)return 0;a=Eg.run(this.data);try{var b=hl.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){jd.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=Eg.run(this.data);return Na.ofString(a).length}catch(b){return Pb.lastError=b,0}},__class__:Xe,__properties__:{get_size:"get_size"}});var mj=function(a){ma.call(this);this.bytesTotal=
this.bytesLoaded=0;this.dataFormat=1;a!=null&&this.load(a)};t["openfl.net.URLLoader"]=mj;mj.__name__="openfl.net.URLLoader";mj.__super__=ma;mj.prototype=I(ma.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 na("open");this.dispatchEvent(c);this.dataFormat==0?(c=new ru,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 na("complete");b.dispatchEvent(d)})):(c=new mo,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?vm._new(d):d;d=new na("complete");b.dispatchEvent(d)}))},__dispatchResponseStatus:function(){var a=new om("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 Qq(f.name,f.value))}a.responseHeaders=b;this.dispatchEvent(a)},__dispatchStatus:function(){var a=new om("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(Eb.typeof(b.data)==Pa.TObject){var c=u.fields(b.data);for(a=0;a<c.length;){var d=c[a];++a;this.__httpRequest.formData.h[d]=u.field(b.data,d)}}else this.__httpRequest.data=b.data instanceof Na?b.data:Na.ofString(F.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 cu(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 uk?this.data=this.__httpRequest.responseData:this.__httpRequest instanceof mo&&(this.data=this.__httpRequest.responseData);var b=a==403?
new Em("securityError"):new Vh("ioError");b.text=F.string(a);this.dispatchEvent(b)},httpRequest_onProgress:function(a,b){var c=new zh("progress");c.bytesLoaded=a;c.bytesTotal=b;this.dispatchEvent(c)},__class__:mj});var ne=function(a){this.withCredentials=!1;a!=null&&(this.url=a);this.contentType=null;this.followRedirects=pm.followRedirects;this.idleTimeout=pm.idleTimeout>0?pm.idleTimeout:3E4;this.manageCookies=pm.manageCookies;this.method="GET";this.requestHeaders=[];this.userAgent=pm.userAgent};
t["openfl.net.URLRequest"]=ne;ne.__name__="openfl.net.URLRequest";ne.prototype={contentType:null,data:null,followRedirects:null,idleTimeout:null,manageCookies:null,withCredentials:null,method:null,requestHeaders:null,url:null,userAgent:null,__class__:ne};var pm=function(){};t["openfl.net.URLRequestDefaults"]=pm;pm.__name__="openfl.net.URLRequestDefaults";var Qq=function(a,b){b==null&&(b="");a==null&&(a="");this.name=a;this.value=b};t["openfl.net.URLRequestHeader"]=Qq;Qq.__name__="openfl.net.URLRequestHeader";
Qq.prototype={name:null,value:null,__class__:Qq};var vm={_new:function(a){var b={};a!=null&&vm.decode(b,a);return b},decode:function(a,b){for(var c=u.fields(a),d=0;d<c.length;){var f=c[d];++d;u.deleteField(a,f)}c=b.split("&");for(d=0;d<c.length;)if(f=c[d],++d,b=f.indexOf("="),b>0){var g=U.substr(f,0,b);g=decodeURIComponent(g.split("+").join(" "));f=U.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=u.fields(a),d=0;d<c.length;){var f=c[d];++d;var g=u.field(a,f);if(f.indexOf("[]")>-1&&g instanceof Array){var h=[];for(g=Ka(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=F.string(g),b.push(f+encodeURIComponent(h))}return b.join("&")},__get:function(a,b){return u.field(a,b)},__set:function(a,b,c){a[b]=c}},wo=function(a){this.parentDomain=a!=null?a:wo.currentDomain};t["openfl.system.ApplicationDomain"]=
wo;wo.__name__="openfl.system.ApplicationDomain";wo.prototype={parentDomain:null,getDefinition:function(a){return t[a]},hasDefinition:function(a){return t[a]!=null},__class__:wo};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=Mh.get_language(Mh.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=Mh.get_region(Mh.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=jd.application!=null?jd.application.__window:null,b=72;a!=null&&(b*=a.__scale);return b};vd.get_screenResolutionX=
function(){var a=jd.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=jd.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 Lz=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"]=Lz;Lz.__name__="openfl.system.LoaderContext";Lz.prototype={allowCodeImport:null,allowLoadBytesCodeExecution:null,applicationDomain:null,checkPolicyFile:null,securityDomain:null,__class__:Lz};var Rq=function(){};t["openfl.system.SecurityDomain"]=Rq;Rq.__name__="openfl.system.SecurityDomain";Rq.prototype={__class__:Rq};
var oe=function(a){yf.call(this,a)};t["openfl.text.Font"]=oe;oe.__name__="openfl.text.Font";oe.enumerateFonts=function(a){return oe.__registeredFonts};oe.fromBytes=function(a){var b=new oe;b.__fromBytes(lc.toBytes(a));return b};oe.fromFile=function(a){if(a==null)return null;var b=new oe;b.__fromFile(a);return b};oe.loadFromBytes=function(a){return yf.loadFromBytes(lc.toBytes(a)).then(function(b){var c=new oe;c.__fromLimeFont(b);return Fc.withValue(c)})};oe.loadFromFile=function(a){return yf.loadFromFile(a).then(function(b){var c=
new oe;c.__fromLimeFont(b);return Fc.withValue(c)})};oe.loadFromName=function(a){return yf.loadFromName(a).then(function(b){var c=new oe;c.__fromLimeFont(b);return Fc.withValue(c)})};oe.registerFont=function(a){a=x.getClass(a)==null?x.__cast(Eb.createInstance(a,[]),oe):x.__cast(a,oe);a!=null&&(oe.__registeredFonts.push(a),oe.__fontByName.h[a.name]=a)};oe.__super__=yf;oe.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__:oe,__properties__:{set_fontName:"set_fontName",get_fontName:"get_fontName"}});var ef=function(a,b,c,d,f,g,h,n,l,q,v,w,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=v;this.indent=w;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+F.string(this.bold)+F.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 Qk={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}}},qy=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"]=qy;qy.__name__="openfl.text.TextLineMetrics";qy.prototype={ascent:null,descent:null,height:null,leading:null,width:null,x:null,__class__:qy};var nw=function(a){this.importRegex=new Xa("@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 Xa("([\\s\\S]*?){([\\s\\S]*?)*}","ig");this.keyframeStatements=[];this.importStatements=[]};t["openfl.text._internal.CSSParser"]=nw;nw.__name__="openfl.text._internal.CSSParser";
nw.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 Xa("(\\*?[-#/\\*\\\\\\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 H;n.h.type="declaration";n.h.property=a;n.h.value=h;d.push(n)}}else U.substr(N.trim(h),0,7)=="base64,"?(a=h+N.trim(h),d[d.length-1].h.value=a):h.length>0&&(a=new H,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]):x.__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 H;c.h.selector=a.h.selector;c.h.rules=[];var d=c;new H;new H;var f=x.__cast(a.h.rules,Array).length;var g=x.__cast(b.h.rules,Array).length;c=0;for(var h=f;c<h;){c++;f=x.__cast(a.h.rules,Array)[1];var n=this.findCorrespondingRule(b.h.rules,
a.h.directive,a.h.value);n==null?x.__cast(d.h.rules,Array).push(f):f.h.value!=n.h.value&&x.__cast(d.h.rules,Array).push(f)}c=0;for(h=g;c<h;)c++,n=x.__cast(a.h.rules,Array)[1],f=this.findCorrespondingRule(a.h.rules,b.h.directive),f==null&&(n.h.type="DELETED",x.__cast(d.h.rules,Array).push(n));return x.__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=x.__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 H;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 Xa(this.keyframeRegex,"gi");f.match(a);){d=this.getMatches(f,a);if(d==null)break;g=new H;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 Xa(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 Xa("^([^{]+)","");if(h.match(d[n]))h.matched(0)!=null&&(a=N.trim(h.matched(0).split("\r\n").join("\n"))),b=new Xa(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 H,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 H,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 H;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__:nw};var Sq=function(a,b){this.__collisions=[];this.__wordMap=new Qd;this.set(a,b)};t["openfl.text._internal.CacheMeasurement"]=
Sq;Sq.__name__="openfl.text._internal.CacheMeasurement";Sq.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__:Sq};var My=function(a,
b,c){this.glyph=a;this.advance=b;this.offset=c!=null?c:new Yf};t["openfl.text._internal.GlyphPosition"]=My;My.__name__="openfl.text._internal.GlyphPosition";My.prototype={advance:null,glyph:null,offset:null,__class__:My};var ic=function(){};t["openfl.text._internal.HTMLParser"]=ic;ic.__name__="openfl.text._internal.HTMLParser";ic.parse=function(a,b,c,d,f){a=b?a.replace(ic.__regexBreakTag.r,"\n"):a.replace(ic.__regexBreakTag.r,"");a=a.replace(ic.__regexEntityNbsp.r," ");a=ic.__regexCharEntity.map(a,
function(V){var ia=V.matched(1),ea=V.matched(2);return ia!=null&&(ia=F.parseInt(ia),ia!=null)?String.fromCodePoint(ia):ea!=null&&(ea=F.parseInt("0"+ea),ea!=null)?String.fromCodePoint(ea):V.matched(0)});var g=a.split("<");if(g.length==1){a=ic.__htmlUnescape(a.replace(ic.__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 v=g[l];++l;if(v!=""){var w=U.substr(v,0,1)=="/",z=v.indexOf(">"),r=z+1,G=v.indexOf(" ");G=v.substring(w?1:0,G>-1&&G<z?G:z).toLowerCase();if(w)n.length!=0&&G==n[n.length-1]&&(n.pop(),h.pop(),w=h[h.length-1].clone(),(G=="p"||G=="li")&&f.get_length()>0&&(b&&(a+="\n"),q=!0),r<v.length&&(q=ic.__htmlUnescape(U.substr(v,
r,null)),f.push(new Oh(w,a.length,a.length+q.length)),a+=q,q=!1));else if(w=h[h.length-1].clone(),z>-1){c!=null&&(c.__applyStyle(G,w),ic.__regexClass.match(v)&&(c.__applyStyle("."+ic.__getAttributeMatch(ic.__regexClass),w),c.__applyStyle(G+"."+ic.__getAttributeMatch(ic.__regexClass),w)));switch(G){case "a":c!=null&&c.__applyStyle("a:link",w);ic.__regexHref.match(v)&&(w.url=ic.__getAttributeMatch(ic.__regexHref));break;case "b":w.set_bold(!0);break;case "em":case "i":w.set_italic(!0);break;case "font":ic.__regexFace.match(v)&&
w.set_font(ic.__getAttributeMatch(ic.__regexFace));ic.__regexColor.match(v)&&(w.color=F.parseInt("0x"+ic.__getAttributeMatch(ic.__regexColor)));if(ic.__regexSize.match(v)){z=ic.__getAttributeMatch(ic.__regexSize);var J=U.cca(z,0);J==43||J==45?w.set_size((h.length>=2?h[h.length-2]:d).size+F.parseInt(z)):w.set_size(F.parseInt(z))}break;case "li":f.get_length()>0&&!q&&(a+="\n");z=w.clone();z.underline=!1;f.push(new Oh(z,a.length,a.length+2));a+="\u2022 ";break;case "p":f.get_length()>0&&!q&&(a+="\n");
ic.__regexAlign.match(v)&&(z=ic.__getAttributeMatch(ic.__regexAlign).toLowerCase(),w.align=Qk.fromString(z));break;case "textformat":ic.__regexBlockIndent.match(v)&&(w.blockIndent=F.parseInt(ic.__getAttributeMatch(ic.__regexBlockIndent)));ic.__regexIndent.match(v)&&(w.indent=F.parseInt(ic.__getAttributeMatch(ic.__regexIndent)));ic.__regexLeading.match(v)&&(w.leading=F.parseInt(ic.__getAttributeMatch(ic.__regexLeading)));ic.__regexLeftMargin.match(v)&&(w.leftMargin=F.parseInt(ic.__getAttributeMatch(ic.__regexLeftMargin)));
ic.__regexRightMargin.match(v)&&(w.rightMargin=F.parseInt(ic.__getAttributeMatch(ic.__regexRightMargin)));if(ic.__regexTabStops.match(v)){z=ic.__getAttributeMatch(ic.__regexTabStops).split(" ");J=[];for(var L=0;L<z.length;){var P=z[L];++L;J.push(F.parseInt(P))}w.tabStops=J}break;case "u":w.underline=!0}h.push(w);n.push(G);r<v.length&&(q=ic.__htmlUnescape(v.substring(r)),f.push(new Oh(w,a.length,a.length+q.length)),a+=q,q=!1)}else q=ic.__htmlUnescape(v),f.push(new Oh(w,a.length,a.length+q.length)),
a+=q,q=!1}}f.get_length()==0&&f.push(new Oh(h[0],0,0))}return a};ic.__getAttributeMatch=function(a){return a.matched(2)!=null?a.matched(2):a.matched(3)};ic.__htmlUnescape=function(a){a=a.replace(ic.__regexEntityApos.r,"'");return N.htmlUnescape(a)};var Ko=function(){this.__shortWordMap=new H;this.__longWordMap=new H};t["openfl.text._internal.ShapeCache"]=Ko;Ko.__name__="openfl.text._internal.ShapeCache";Ko.hashFunction=function(a){for(var b=0,c,d=0,f=a.length;d<f;)c=d++,c=U.cca(a,c),b=(b<<5)-b+c,
b|=0;return b};Ko.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 H,f=c(),d.h[a]=f,this.__shortWordMap.h[b]=d;return c()},__cacheLongWord:function(a,b,c){var d=
Ko.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 Sq(a,c()),f.h[d]=g}else f=new Qd,g=new Sq(a,c()),g.hash=d,f.h[d]=g,this.__longWordMap.h[b]=f;return c()},__class__:Ko};var Uc=function(a){this.__shapeCache=new Ko;this.textField=a;this.height=this.width=100;this.set_text("");this.bounds=new Ha(0,0,0,0);this.textBounds=new Ha(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=ub.toFloatVector(null);this.lineBreaks=ub.toIntVector(null);this.lineDescents=ub.toFloatVector(null);this.lineLeadings=ub.toFloatVector(null);this.lineHeights=ub.toFloatVector(null);this.lineWidths=ub.toFloatVector(null);
this.layoutGroups=ub.toObjectVector(null);this.textFormatRanges=ub.toObjectVector(null);Uc.__context==null&&(Uc.__context=window.document.createElement("canvas").getContext("2d"))};t["openfl.text._internal.TextEngine"]=Uc;Uc.__name__="openfl.text._internal.TextEngine";Uc.findFont=function(a){return oe.__fontByName.h[a]};Uc.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(oe.__fontByName.h,
d+" Bold Italic")?Uc.findFont(d+" Bold Italic"):c&&Object.prototype.hasOwnProperty.call(oe.__fontByName.h,d+" Bold")?Uc.findFont(d+" Bold"):a&&Object.prototype.hasOwnProperty.call(oe.__fontByName.h,d+" Italic")?Uc.findFont(d+" Italic"):Uc.findFont(b)};Uc.getDefaultFont=function(a,b,c){Uc.__defaultFonts==null&&(Uc.__defaultFonts=new H);a=Uc.__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};Uc.getFormatHeight=function(a){var b=
Uc.getFont(a);Uc.__context.font=b;b=Uc.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};Uc.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(oe.__fontByName.h,f+" Bold Italic")?(b=f+" Bold Italic",
d=c=!1):c&&Object.prototype.hasOwnProperty.call(oe.__fontByName.h,f+" Bold")?(b=f+" Bold",c=!1):d&&Object.prototype.hasOwnProperty.call(oe.__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};Uc.getFontInstance=function(a){return Uc.findFontVariant(a)};Uc.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 Xa("\\^([^\\^]+)","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 Xa("("+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=Uc.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=Ic.__defaultTextFormat.clone(),g=0,h=0,n=0,l=0,q=3,v=0,w=0,z=0,r=0,G=!0,J=null,L=null,P=0,V=0,ia=0,ea=-2,ra=-1,za=this.text.indexOf(" "),fb=0,eb=fb<this.lineBreaks.get_length()?this.lineBreaks.get(fb):-1,Ra=0,wb=0,cb=0,Tb=0,Ib=function(Xc,gd,be){var Mc=
function(){var Wd=[];if(a.__useIntAdvances==null){var lf=new Xa("Trident/7.0","");a.__useIntAdvances=lf.match(wa.navigator.userAgent)}if(a.__useIntAdvances){var jg=0;lf=gd;for(var Vg=be;lf<Vg;){var qf=lf++;qf=a.measureText(Xc.substring(gd,qf+1));Wd.push(qf-jg);jg=qf}}else for(lf=gd,Vg=be;lf<Vg;)qf=lf++,qf<Xc.length-1?(jg=a.measureText(Xc.charAt(qf+1)),jg=a.measureText(U.substr(Xc,qf,2))-jg):jg=Uc.__context.measureText(Xc.charAt(qf)).width,Wd.push(jg);return Wd};return f.align==2?Mc():a.__shapeCache.cache(c,
Mc,Xc.substring(gd,be))},Mb=function(Xc){for(var gd=0,be=0;be<Xc.length;){var Mc=Xc[be];++be;gd+=Mc}return gd},tc=function(){return 2+z+v+(G?w:0)},Bd=function(){return a.width-2-r-tc()},Qb=function(Xc,gd){J==null||J.startIndex!=J.endIndex?(J=new Nv(c.format,Xc,gd),a.layoutGroups.push(J)):(J.format=c.format,J.startIndex=Xc,J.endIndex=gd)},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;V=Math.ceil(h+l+g);V>ia&&(ia=V);h>n&&(n=h)},Ae=function(){G=!0;q=f.align!=null?f.align:3;v=f.blockIndent!=null?f.blockIndent:0;w=f.indent!=null?f.indent:0;z=f.leftMargin!=null?f.leftMargin:0;r=f.rightMargin!=null?f.rightMargin:0},eg=function(){if(b<a.textFormatRanges.get_length()-1){b+=1;c=a.textFormatRanges.get(b);f.__merge(c.format);var Xc=Uc.getFont(f);Uc.__context.font=Xc;d=Uc.getFontInstance(f);return!0}return!1},Df=function(Xc,gd){if(Xc>=gd)L=[],
P=0;else if(gd<=c.end)L=Ib(a.text,Xc,gd),P=Mb(L);else{var be=Xc;Xc=c.end;var Mc=0;L=[];for(P=0;;)if(be!=Xc&&(be=Ib(a.text,be,Xc),L=L.concat(be)),Xc!=gd){if(!eg()){Xb.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}be=Xc;Xc=gd<c.end?gd:c.end;++Mc}else{P=Mb(L);break}b-=Mc+1;
eg()}},Ug=function(Xc){if(Xc<=c.end){L=Ib(a.text,cb,Xc);P=Mb(L);Qb(cb,Xc);J.positions=L;var gd=Ra,be=tc();J.offsetX=gd+be;J.ascent=h;J.descent=l;J.leading=g;J.lineIndex=Tb;J.offsetY=wb+2;J.width=P;J.height=V;Ra+=P;Xc==c.end&&(J=null,eg(),wd())}else for(;;){var Mc=Xc<c.end?Xc:c.end;cb!=Mc&&(L=Ib(a.text,cb,Mc),P=Mb(L),Qb(cb,Mc),J.positions=L,gd=Ra,be=tc(),J.offsetX=gd+be,J.ascent=h,J.descent=l,J.leading=g,J.lineIndex=Tb,J.offsetY=wb+2,J.width=P,J.height=V,Ra+=P,cb=Mc);Mc==c.end&&(J=null);if(Mc==Xc)break;
if(!eg()){Xb.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()}cb=Xc},Rf=function(){wd();for(var Xc=a.layoutGroups.get_length();--Xc>-1;){var gd=a.layoutGroups.get(Xc);if(gd.lineIndex<Tb)break;gd.lineIndex>Tb||(gd.ascent=n,gd.height=ia)}wb+=ia;ia=n=0;Tb+=1;Ra=0;G=!1},je=
function(Xc){if(a.width>=4&&a.wordWrap){var gd=L;var be=Mb(gd);for(var Mc=gd.length-1;Mc>=0;){var Wd=U.cca(a.text,cb+Mc);if(Wd!=32&&Wd!=9)break;be-=gd[Mc];--Mc}for(;gd.length>0&&Ra+be>Bd();){for(Wd=Mc=be=0;Ra+Wd<Bd();){var lf=gd[Mc];lf==0?(++Mc,++be):(Wd+=lf,++Mc)}if(Mc==be)Mc=be+1;else for(;Mc>1&&Ra+Wd>Bd();)--Mc,Mc-be>0?(Df(cb,cb+Mc-be),Wd=P):(Mc=1,be=0,Df(cb,cb+1),Wd=0);gd=cb+Mc-be;Ug(gd);Rf();Df(gd,Xc);gd=L;be=P}}Ug(Xc)};eg();Ae();wd();for(var ke,ql=this.text.length+1;cb<ql;)if(eb>-1&&(za==-1||
eb<za))cb<=eb?(Df(cb,eb),je(eb),J=null):J!=null&&J.startIndex!=J.endIndex&&(J.endIndex==za&&(J.width-=J.positions[J.positions.length-1]),J=null),Rf(),c.end==eb&&(eg(),wd()),cb=eb+1,ra=eb,++fb,eb=fb<this.lineBreaks.get_length()?this.lineBreaks.get(fb):-1,Ae();else if(za>-1)for(J!=null&&J.startIndex!=J.endIndex&&(J=null),ke=!1;cb<this.text.length;){var rd=-1;za==-1?rd=eb:(rd=za+1,eb>-1&&eb<rd&&(rd=eb));rd==-1&&(rd=this.text.length);Df(cb,rd);if(q==2){if(L.length>0&&cb==ea){cb+=1;var pe=L.shift();P-=
pe;Ra+=pe}L.length>0&&rd==za+1&&(--rd,pe=L.pop(),P-=pe)}this.wordWrap&&Ra+P>Bd()&&(ke=!0,L.length>0&&rd==za+1&&Ra+P-L[L.length-1]<=Bd()&&(ke=!1));if(ke){q!=2&&(J!=null||this.layoutGroups.get_length()>0)&&(ke=J,ke==null&&(ke=this.layoutGroups.get(this.layoutGroups.get_length()-1)),ke.width-=ke.positions[ke.positions.length-1],ke.endIndex--);ke=this.layoutGroups.get_length()-1;for(pe=0;ke>=0;){J=this.layoutGroups.get(ke);if(ke>0&&J.startIndex>ea)++pe;else break;--ke}cb==ea+1&&Rf();Ra=0;if(pe>0){ke=
this.layoutGroups.get(this.layoutGroups.get_length()-pe).offsetX;pe=this.layoutGroups.get_length()-pe;for(var Lc=this.layoutGroups.get_length();pe<Lc;){var Ak=pe++;J=this.layoutGroups.get(Ak);J.offsetX-=ke;J.offsetY=wb+2;J.lineIndex=Tb;Ra+=J.width}}je(rd);ke=!1}else J!=null&&cb==za&&ea!=za-1?(q!=2&&(J.endIndex=za,J.positions=J.positions.concat(L),J.width+=P),Ra+=P,cb=rd):J==null||q==2?(je(rd),rd==this.text.length&&Rf()):(pe=rd<c.end?rd:c.end,pe<rd&&(L=Ib(this.text,cb,pe),P=Mb(L)),J.endIndex=pe,J.positions=
J.positions.concat(L),J.width+=P,Ra+=P,pe==c.end&&(J=null,eg(),wd(),cb=pe,pe!=rd&&Ug(rd)),eb==rd&&++rd,cb=rd,rd==this.text.length&&(Rf(),eb!=-1&&(ra=eb,++fb,eb=fb<this.lineBreaks.get_length()?this.lineBreaks.get(fb):-1)));rd=this.text.indexOf(" ",cb);eb==ea&&(J.endIndex=eb,eb-J.startIndex-J.positions.length<0&&J.positions.push(0),cb=eb+1);ea=za;za=rd;if(eb>-1&&eb<=cb&&(za>eb||za==-1)||cb>this.text.length)break}else cb<this.text.length&&(Df(cb,this.text.length),je(this.text.length),Rf()),cb+=1;ra==
cb-2&&ra>-1&&(Qb(cb-1,cb-1),J.positions=[],J.ascent=h,J.descent=l,J.leading=g,J.lineIndex=Tb,J.offsetX=tc(),J.offsetY=wb+2,J.width=0,J.height=V)}},measureText:function(a){return Uc.__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 v=l++;if(this.layoutGroups.get(v).lineIndex==a)v!=0&&U.cca(this.text,this.layoutGroups.get(v).startIndex-1)!=32||++d;else break}if(d>1&&(c=this.layoutGroups.get(n+d-1),l=U.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=U.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__:Uc,__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 Mz=function(a,b,c,d){this.normal=a;this.bold=b;this.italic=c;this.boldItalic=d};t["openfl.text._internal._TextEngine.DefaultFontSet"]=Mz;Mz.__name__="openfl.text._internal._TextEngine.DefaultFontSet";Mz.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__:Mz};var Oh=function(a,b,c){this.format=a;this.start=b;this.end=c};t["openfl.text._internal.TextFormatRange"]=Oh;Oh.__name__="openfl.text._internal.TextFormatRange";Oh.prototype={end:null,format:null,start:null,__class__:Oh};var Uf=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"]=Uf;Uf.__name__="openfl.text._internal.TextLayout";Uf.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=
pA._new(),dA._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__:Uf,__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 Nv=function(a,b,c){this.format=a;this.startIndex=b;this.endIndex=c};t["openfl.text._internal.TextLayoutGroup"]=Nv;Nv.__name__="openfl.text._internal.TextLayoutGroup";Nv.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__:Nv};var Sc=function(){ma.call(this);Sc.__instances.push(this)};t["openfl.ui.GameInput"]=Sc;Sc.__name__="openfl.ui.GameInput";Sc.getDeviceAt=function(a){return a>=0&&a<Sc.__deviceList.length?Sc.__deviceList[a]:null};Sc.__getDevice=function(a){if(a==null)return null;if(Sc.__devices.h.__keys__[a.__id__]==null){var b=new Ov(a.__jsGamepad.id,a.__jsGamepad.id);
Sc.__deviceList.push(b);Sc.__devices.set(a,b);Sc.numDevices=Sc.__deviceList.length}return Sc.__devices.h[a.__id__]};Sc.__onGamepadAxisMove=function(a,b,c){a=Sc.__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 gj(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 na("change"))}};Sc.__onGamepadButtonDown=function(a,b){a=Sc.__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 gj(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 na("change"))}};Sc.__onGamepadButtonUp=function(a,b){a=Sc.__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 gj(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 na("change"))}};Sc.__onGamepadConnect=function(a){a=Sc.__getDevice(a);
if(a!=null)for(var b=0,c=Sc.__instances;b<c.length;){var d=c[b];++b;d.dispatchEvent(new Mk("deviceAdded",!0,!1,a))}};Sc.__onGamepadDisconnect=function(a){var b=Sc.__devices.h[a.__id__];if(b!=null){Sc.__devices.h.__keys__[a.__id__]!=null&&(U.remove(Sc.__deviceList,Sc.__devices.h[a.__id__]),Sc.__devices.remove(a));Sc.numDevices=Sc.__deviceList.length;a=0;for(var c=Sc.__instances;a<c.length;){var d=c[a];++a;d.dispatchEvent(new Mk("deviceRemoved",!0,!1,b))}}};Sc.__super__=ma;Sc.prototype=I(ma.prototype,
{addEventListener:function(a,b,c,d,f){f==null&&(f=!1);d==null&&(d=0);c==null&&(c=!1);ma.prototype.addEventListener.call(this,a,b,c,d,f);if(a=="deviceAdded")for(a=0,b=Sc.__deviceList;a<b.length;)c=b[a],++a,this.dispatchEvent(new Mk("deviceAdded",!0,!1,c))},__class__:Sc});var gj=function(a,b,c,d,f){f==null&&(f=0);ma.call(this);this.device=a;this.id=b;this.minValue=c;this.maxValue=d;this.value=f};t["openfl.ui.GameInputControl"]=gj;gj.__name__="openfl.ui.GameInputControl";gj.__super__=ma;gj.prototype=
I(ma.prototype,{device:null,id:null,maxValue:null,minValue:null,value:null,__class__:gj});var Ov=function(a,b){this.__controls=[];this.__button=new Qd;this.__axis=new Qd;this.id=a;this.name=b;a=new gj(this,"AXIS_0",-1,1);this.__axis.h[0]=a;this.__controls.push(a);a=new gj(this,"AXIS_1",-1,1);this.__axis.h[1]=a;this.__controls.push(a);a=new gj(this,"AXIS_2",-1,1);this.__axis.h[2]=a;this.__controls.push(a);a=new gj(this,"AXIS_3",-1,1);this.__axis.h[3]=a;this.__controls.push(a);a=new gj(this,"AXIS_4",
-1,1);this.__axis.h[4]=a;this.__controls.push(a);a=new gj(this,"AXIS_5",-1,1);this.__axis.h[5]=a;this.__controls.push(a);for(b=0;b<15;){var c=b++;a=new gj(this,"BUTTON_"+c,0,1);this.__button.h[c]=a;this.__controls.push(a)}};t["openfl.ui.GameInputDevice"]=Ov;Ov.__name__="openfl.ui.GameInputDevice";Ov.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__:Ov,__properties__:{get_numControls:"get_numControls"}};var Cb=function(){};t["openfl.ui.Keyboard"]=Cb;Cb.__name__="openfl.ui.Keyboard";Cb.isAccessible=function(){return!1};Cb.__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}};Cb.__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};Cb.__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 zd=function(){};t["openfl.ui.Mouse"]=zd;zd.__name__="openfl.ui.Mouse";zd.__properties__={set_cursor:"set_cursor",get_cursor:"get_cursor"};zd.hide=function(){zd.__hidden=!0;for(var a=0,b=Ma.current.__windows;a<b.length;){var c=b[a];++a;c.set_cursor(null)}};zd.show=function(){zd.__hidden=!1;var a=zd.__cursor;zd.__cursor=null;zd.set_cursor(a)};
zd.get_cursor=function(){return zd.__cursor};zd.set_cursor=function(a){a==null&&(a="auto");var b=null;switch(a){case "arrow":b=fd.ARROW;break;case "button":b=fd.POINTER;break;case "crosshair":b=fd.CROSSHAIR;break;case "custom":b=fd.CUSTOM;break;case "hand":b=fd.MOVE;break;case "ibeam":b=fd.TEXT;break;case "resize_nesw":b=fd.RESIZE_NESW;break;case "resize_ns":b=fd.RESIZE_NS;break;case "resize_nwse":b=fd.RESIZE_NWSE;break;case "resize_we":b=fd.RESIZE_WE;break;case "wait":b=fd.WAIT;break;case "waitarrow":b=
fd.WAIT_ARROW}if(b!=null&&!zd.__hidden)for(var c=0,d=Ma.current.__windows;c<d.length;){var f=d[c];++c;f.set_cursor(b)}return zd.__cursor=a};var hh={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 fd.ARROW;
case "auto":return fd.DEFAULT;case "button":return fd.POINTER;case "crosshair":return fd.CROSSHAIR;case "custom":return fd.CUSTOM;case "hand":return fd.MOVE;case "ibeam":return fd.TEXT;case "resize_nesw":return fd.RESIZE_NESW;case "resize_ns":return fd.RESIZE_NS;case "resize_nwse":return fd.RESIZE_NWSE;case "resize_we":return fd.RESIZE_WE;case "wait":return fd.WAIT;case "waitarrow":return fd.WAIT_ARROW;default:return fd.DEFAULT}}},Lo=function(){};t["openfl.ui.Multitouch"]=Lo;Lo.__name__="openfl.ui.Multitouch";
Lo.__properties__={get_supportsTouchEvents:"get_supportsTouchEvents"};Lo.get_supportsTouchEvents=function(){return"ontouchstart"in document.documentElement||window.DocumentTouch&&document instanceof DocumentTouch?!0:!1};var ta=function(a){a==null&&(a=!1);this.debugEnabled=!1;this.debugEnabled=a;ta.initialized||ta.init()};t["openfl.utils.AGALMiniAssembler"]=ta;ta.__name__="openfl.utils.AGALMiniAssembler";ta.init=function(){ta.initialized=!0;var a=ta.OPMAP,b=new hd("mov",2,0,0);a.h.mov=b;a=ta.OPMAP;
b=new hd("add",3,1,0);a.h.add=b;a=ta.OPMAP;b=new hd("sub",3,2,0);a.h.sub=b;a=ta.OPMAP;b=new hd("mul",3,3,0);a.h.mul=b;a=ta.OPMAP;b=new hd("div",3,4,0);a.h.div=b;a=ta.OPMAP;b=new hd("rcp",2,5,0);a.h.rcp=b;a=ta.OPMAP;b=new hd("min",3,6,0);a.h.min=b;a=ta.OPMAP;b=new hd("max",3,7,0);a.h.max=b;a=ta.OPMAP;b=new hd("frc",2,8,0);a.h.frc=b;a=ta.OPMAP;b=new hd("sqt",2,9,0);a.h.sqt=b;a=ta.OPMAP;b=new hd("rsq",2,10,0);a.h.rsq=b;a=ta.OPMAP;b=new hd("pow",3,11,0);a.h.pow=b;a=ta.OPMAP;b=new hd("log",2,12,0);a.h.log=
b;a=ta.OPMAP;b=new hd("exp",2,13,0);a.h.exp=b;a=ta.OPMAP;b=new hd("nrm",2,14,0);a.h.nrm=b;a=ta.OPMAP;b=new hd("sin",2,15,0);a.h.sin=b;a=ta.OPMAP;b=new hd("cos",2,16,0);a.h.cos=b;a=ta.OPMAP;b=new hd("crs",3,17,0);a.h.crs=b;a=ta.OPMAP;b=new hd("dp3",3,18,0);a.h.dp3=b;a=ta.OPMAP;b=new hd("dp4",3,19,0);a.h.dp4=b;a=ta.OPMAP;b=new hd("abs",2,20,0);a.h.abs=b;a=ta.OPMAP;b=new hd("neg",2,21,0);a.h.neg=b;a=ta.OPMAP;b=new hd("sat",2,22,0);a.h.sat=b;a=ta.OPMAP;b=new hd("m33",3,23,16);a.h.m33=b;a=ta.OPMAP;b=new hd("m44",
3,24,16);a.h.m44=b;a=ta.OPMAP;b=new hd("m34",3,25,16);a.h.m34=b;a=ta.OPMAP;b=new hd("ddx",2,26,288);a.h.ddx=b;a=ta.OPMAP;b=new hd("ddy",2,27,288);a.h.ddy=b;a=ta.OPMAP;b=new hd("ife",2,28,897);a.h.ife=b;a=ta.OPMAP;b=new hd("ine",2,29,897);a.h.ine=b;a=ta.OPMAP;b=new hd("ifg",2,30,897);a.h.ifg=b;a=ta.OPMAP;b=new hd("ifl",2,31,897);a.h.ifl=b;a=ta.OPMAP;b=new hd("els",0,32,1921);a.h.els=b;a=ta.OPMAP;b=new hd("eif",0,33,1409);a.h.eif=b;a=ta.OPMAP;b=new hd("kil",1,39,160);a.h.kil=b;a=ta.OPMAP;b=new hd("tex",
3,40,40);a.h.tex=b;a=ta.OPMAP;b=new hd("sge",3,41,0);a.h.sge=b;a=ta.OPMAP;b=new hd("slt",3,42,0);a.h.slt=b;a=ta.OPMAP;b=new hd("sgn",2,43,0);a.h.sgn=b;a=ta.OPMAP;b=new hd("seq",3,44,0);a.h.seq=b;a=ta.OPMAP;b=new hd("sne",3,45,0);a.h.sne=b;a=ta.SAMPLEMAP;b=new Be("rgba",8,0);a.h.rgba=b;a=ta.SAMPLEMAP;b=new Be("compressed",8,1);a.h.compressed=b;a=ta.SAMPLEMAP;b=new Be("compressedalpha",8,2);a.h.compressedalpha=b;a=ta.SAMPLEMAP;b=new Be("dxt1",8,1);a.h.dxt1=b;a=ta.SAMPLEMAP;b=new Be("dxt5",8,2);a.h.dxt5=
b;a=ta.SAMPLEMAP;b=new Be("video",8,3);a.h.video=b;a=ta.SAMPLEMAP;b=new Be("2d",12,0);a.h["2d"]=b;a=ta.SAMPLEMAP;b=new Be("3d",12,2);a.h["3d"]=b;a=ta.SAMPLEMAP;b=new Be("cube",12,1);a.h.cube=b;a=ta.SAMPLEMAP;b=new Be("mipnearest",24,1);a.h.mipnearest=b;a=ta.SAMPLEMAP;b=new Be("miplinear",24,2);a.h.miplinear=b;a=ta.SAMPLEMAP;b=new Be("mipnone",24,0);a.h.mipnone=b;a=ta.SAMPLEMAP;b=new Be("nomip",24,0);a.h.nomip=b;a=ta.SAMPLEMAP;b=new Be("nearest",28,0);a.h.nearest=b;a=ta.SAMPLEMAP;b=new Be("linear",
28,1);a.h.linear=b;a=ta.SAMPLEMAP;b=new Be("anisotropic2x",28,2);a.h.anisotropic2x=b;a=ta.SAMPLEMAP;b=new Be("anisotropic4x",28,3);a.h.anisotropic4x=b;a=ta.SAMPLEMAP;b=new Be("anisotropic8x",28,4);a.h.anisotropic8x=b;a=ta.SAMPLEMAP;b=new Be("anisotropic16x",28,5);a.h.anisotropic16x=b;a=ta.SAMPLEMAP;b=new Be("centroid",16,1);a.h.centroid=b;a=ta.SAMPLEMAP;b=new Be("single",16,2);a.h.single=b;a=ta.SAMPLEMAP;b=new Be("ignoresampler",16,4);a.h.ignoresampler=b;a=ta.SAMPLEMAP;b=new Be("repeat",20,1);a.h.repeat=
b;a=ta.SAMPLEMAP;b=new Be("wrap",20,1);a.h.wrap=b;a=ta.SAMPLEMAP;b=new Be("clamp",20,0);a.h.clamp=b;a=ta.SAMPLEMAP;b=new Be("clamp_u_repeat_v",20,2);a.h.clamp_u_repeat_v=b;a=ta.SAMPLEMAP;b=new Be("repeat_u_clamp_v",20,3);a.h.repeat_u_clamp_v=b};ta.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=La.getTimer();this.agalcode=new Vc(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 Xa("<.*>","g"),n=new Xa("([\\w\\.\\-\\+]+)","gi"),l=new Xa("^\\w{3}","ig"),q=new Xa("vc\\[([vofi][acostdip]?[d]?)(\\d*)?(\\.[xyzw](\\+\\d{1,3})?)?\\](\\.[xyzw]{1,4})?|([vofi][acostdip]?[d]?)(\\d*)?(\\.[xyzw]{1,4})?",
"gi"),v=new Xa("\\[.*\\]","ig"),w=new Xa("^\\b[A-Za-z]{1,3}","ig"),z=new Xa("\\d+",""),r=new Xa("(\\.[xyzw]{1,4})",""),G=new Xa("[A-Za-z]{1,3}","ig"),J=new Xa("(\\.[xyzw]{1,1})",""),L=new Xa("\\+\\d{1,3}","ig"),P=0;P<d&&this.error=="";){var V=N.trim(a[P]),ia=V.indexOf("//");ia!=-1&&(V=U.substr(V,0,ia));var ea=h.match(V)?h.matchedPos().pos:-1;ia=null;ea!=-1&&(ia=this.match(U.substr(V,ea,null),n),V=U.substr(V,0,ea));var ra=null;l.match(V)&&(ea=l.matched(0),ra=ta.OPMAP.h[ea]);if(ra==null)V.length>=3&&
Xb.warn("warning: bad line "+P+": "+a[P],{fileName:"openfl/utils/AGALMiniAssembler.hx",lineNumber:262,className:"openfl.utils.AGALMiniAssembler",methodName:"assemble"});else if(this.debugEnabled&&Xb.info(ra,{fileName:"openfl/utils/AGALMiniAssembler.hx",lineNumber:272,className:"openfl.utils.AGALMiniAssembler",methodName:"assemble"}),ra==null)V.length>=3&&Xb.warn("warning: bad line "+P+": "+a[P],{fileName:"openfl/utils/AGALMiniAssembler.hx",lineNumber:279,className:"openfl.utils.AGALMiniAssembler",
methodName:"assemble"});else{V=U.substr(V,V.indexOf(ra.name)+ra.name.length,null);if((ra.flags&256)!=0&&c<2){this.error="error: opcode requires version 2.";break}if((ra.flags&64)!=0&&g){this.error="error: opcode is only allowed in vertex programs.";break}if((ra.flags&32)!=0&&!g){this.error="error: opcode is only allowed in fragment programs.";break}this.verbose&&Xb.info("emit opcode="+F.string(ra),{fileName:"openfl/utils/AGALMiniAssembler.hx",lineNumber:308,className:"openfl.utils.AGALMiniAssembler",
methodName:"assemble"});this.agalcode.writeUnsignedInt(ra.emitCode);++b;if(b>4096){this.error="error: too many opcodes. maximum is 4096.";break}var za=this.match(V,q);if(za.length!=ra.numRegister){this.error="error: wrong number of operands. found "+za.length+" but expected "+ra.numRegister+".";break}var fb=!1,eb=160;V=0;for(ea=za.length;V<ea;){var Ra=V++,wb=!1,cb=this.match(za[Ra],v);cb.length>0&&(za[Ra]=N.replace(za[Ra],cb[0],"0"),this.verbose&&Xb.info("IS REL",{fileName:"openfl/utils/AGALMiniAssembler.hx",
lineNumber:344,className:"openfl.utils.AGALMiniAssembler",methodName:"assemble"}),wb=!0);var Tb=this.match(za[Ra],w);if(Tb.length==0){this.error="error: could not parse operand "+Ra+" ("+za[Ra]+").";fb=!0;break}var Ib=ta.REGMAP.h[Tb[0]];this.debugEnabled&&Xb.info(Ib,{fileName:"openfl/utils/AGALMiniAssembler.hx",lineNumber:363,className:"openfl.utils.AGALMiniAssembler",methodName:"assemble"});if(Ib==null){this.error="error: could not find register name for operand "+Ra+" ("+za[Ra]+").";fb=!0;break}if(g){if((Ib.flags&
32)==0){this.error="error: register operand "+Ra+" ("+za[Ra]+") only allowed in vertex programs.";fb=!0;break}if(wb){this.error="error: register operand "+Ra+" ("+za[Ra]+") relative adressing not allowed in fragment programs.";fb=!0;break}}else if((Ib.flags&64)==0){this.error="error: register operand "+Ra+" ("+za[Ra]+") only allowed in fragment programs.";fb=!0;break}za[Ra]=U.substr(za[Ra],za[Ra].indexOf(Ib.name)+Ib.name.length,null);var Mb=wb?this.match(cb[0],z):this.match(za[Ra],z);Tb=0;Mb.length>
0&&(Tb=F.parseInt(Mb[0]));if(Ua.gt(Tb,Ib.range)){V=Ib.range+1;this.error="error: register operand "+Ra+" ("+za[Ra]+") index exceeds limit of "+(V==null?"null":F.string(Ua.toFloat(V)))+".";fb=!0;break}var tc=this.match(za[Ra],r),Bd=Ra==0&&(ra.flags&128)==0,Qb=Ra==2&&(ra.flags&8)!=0,wd=0,Ae=0,eg=0;if(Bd&&wb){this.error="error: relative can not be destination";fb=!0;break}if(tc.length>0){for(var Df=Mb=0,Ug=tc[0].length,Rf=1;Rf<Ug;)Df=U.cca(tc[0],Rf)-120,Ua.gt(Df,2)&&(Df=3),Mb=Bd?Mb|1<<Df:Mb|Df<<(Rf-
1<<1),++Rf;if(!Bd)for(;Rf<=4;)Mb|=Df<<(Rf-1<<1),++Rf}else Mb=Bd?15:228;if(wb){tc=this.match(cb[0],G);wd=ta.REGMAP.h[tc[0]];if(wd==null){this.error="error: bad index register";fb=!0;break}wd=wd.emitCode;Df=this.match(cb[0],J);if(Df.length==0){this.error="error: bad index register select";fb=!0;break}Ae=U.cca(Df[0],1)-120;Ua.gt(Ae,2)&&(Ae=3);cb=this.match(cb[0],L);cb.length>0&&(eg=F.parseInt(cb[0]));if(eg<0||eg>255){this.error="error: index offset "+eg+" out of bounds. [0..255]";fb=!0;break}this.verbose&&
Xb.info("RELATIVE: type="+wd+"=="+tc[0]+" sel="+(Ae==null?"null":F.string(Ua.toFloat(Ae)))+"=="+Df[0]+" idx="+(Tb==null?"null":F.string(Ua.toFloat(Tb)))+" offset="+eg,{fileName:"openfl/utils/AGALMiniAssembler.hx",lineNumber:518,className:"openfl.utils.AGALMiniAssembler",methodName:"assemble"})}this.verbose&&Xb.info("  emit argcode="+F.string(Ib)+"["+(Tb==null?"null":F.string(Ua.toFloat(Tb)))+"]["+Mb+"]",{fileName:"openfl/utils/AGALMiniAssembler.hx",lineNumber:525,className:"openfl.utils.AGALMiniAssembler",
methodName:"assemble"});if(Bd)this.agalcode.writeShort(Tb),this.agalcode.writeByte(Mb),this.agalcode.writeByte(Ib.emitCode),eb-=32;else{if(Qb){this.verbose&&Xb.info("  emit sampler",{fileName:"openfl/utils/AGALMiniAssembler.hx",lineNumber:541,className:"openfl.utils.AGALMiniAssembler",methodName:"assemble"});Ra=5;cb=wb=0;for(Ib=ia==null?0:ia.length;cb<Ib;)Mb=cb++,this.verbose&&Xb.info("    opt: "+ia[Mb],{fileName:"openfl/utils/AGALMiniAssembler.hx",lineNumber:552,className:"openfl.utils.AGALMiniAssembler",
methodName:"assemble"}),Bd=ta.SAMPLEMAP.h[ia[Mb]],Bd==null?(wb=parseFloat(ia[Mb]),this.verbose&&Xb.info("    bias: "+wb,{fileName:"openfl/utils/AGALMiniAssembler.hx",lineNumber:565,className:"openfl.utils.AGALMiniAssembler",methodName:"assemble"})):(Bd.flag!=16&&(Ra&=~(15<<Bd.flag)),Ra|=Bd.mask<<Bd.flag);this.agalcode.writeShort(Tb);this.agalcode.writeByte(wb*8|0);this.agalcode.writeByte(0);this.agalcode.writeUnsignedInt(Ra);this.verbose&&Xb.info("    bits: "+(Ra-5),{fileName:"openfl/utils/AGALMiniAssembler.hx",
lineNumber:586,className:"openfl.utils.AGALMiniAssembler",methodName:"assemble"})}else Ra==0&&(this.agalcode.writeUnsignedInt(0),eb-=32),this.agalcode.writeShort(Tb),this.agalcode.writeByte(eg),this.agalcode.writeByte(Mb),this.agalcode.writeByte(Ib.emitCode),this.agalcode.writeByte(wd),this.agalcode.writeShort(wb?Ae|32768:0);eb-=64}}for(V=0;V<eb;)this.agalcode.writeByte(0),V+=8;if(fb)break}++P}this.error!=""&&(this.error+="\n  at line "+P+" "+a[P],lc.set_length(this.agalcode,0),Xb.info(this.error,
{fileName:"openfl/utils/AGALMiniAssembler.hx",lineNumber:631,className:"openfl.utils.AGALMiniAssembler",methodName:"assemble"}));if(this.debugEnabled){c="generated bytecode:";g=lc.get_length(this.agalcode);V=0;for(ea=g;V<ea;)g=V++,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;Xb.info(c,{fileName:"openfl/utils/AGALMiniAssembler.hx",lineNumber:662,className:"openfl.utils.AGALMiniAssembler",methodName:"assemble"})}this.verbose&&Xb.info("AGALMiniAssembler.assemble time: "+
(La.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=ta.REGMAP,d=new Li("va","vertex attribute",0,b?1024:a==1||a==2?7:15,66);c.h.va=d;c=ta.REGMAP;d=new Li("vc","vertex constant",1,b?1024:a==1?127:249,66);c.h.vc=d;c=ta.REGMAP;d=new Li("vt","vertex temporary",2,b?1024:a==1?7:25,67);c.h.vt=d;c=ta.REGMAP;d=new Li("vo","vertex output",3,b?1024:0,65);
c.h.vo=d;c=ta.REGMAP;d=new Li("vi","varying",4,b?1024:a==1?7:9,99);c.h.vi=d;c=ta.REGMAP;d=new Li("fc","fragment constant",1,b?1024:a==1?27:a==2?63:199,34);c.h.fc=d;c=ta.REGMAP;d=new Li("ft","fragment temporary",2,b?1024:a==1?7:25,35);c.h.ft=d;c=ta.REGMAP;d=new Li("fs","texture sampler",5,b?1024:7,34);c.h.fs=d;c=ta.REGMAP;d=new Li("fo","fragment output",3,b?1024:a==1?0:3,33);c.h.fo=d;c=ta.REGMAP;d=new Li("fd","fragment depth output",6,b?1024:a==1?-1:0,33);c.h.fd=d;c=ta.REGMAP;d=new Li("iid","instance id",
7,b?1024:0,66);c.h.iid=d;d=ta.REGMAP.h.vo;ta.REGMAP.h.op=d;d=ta.REGMAP.h.vi;ta.REGMAP.h.i=d;d=ta.REGMAP.h.vi;ta.REGMAP.h.v=d;d=ta.REGMAP.h.fo;ta.REGMAP.h.oc=d;d=ta.REGMAP.h.fd;ta.REGMAP.h.od=d;d=ta.REGMAP.h.vi;ta.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__:ta};var hd=function(a,b,c,d){this.name=a;this.numRegister=b;this.emitCode=c;this.flags=d};t["openfl.utils._AGALMiniAssembler.OpCode"]=hd;hd.__name__=
"openfl.utils._AGALMiniAssembler.OpCode";hd.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__:hd};var Li=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"]=Li;Li.__name__="openfl.utils._AGALMiniAssembler.Register";Li.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":F.string(Ua.toFloat(this.emitCode)))+", range="+(this.range==null?"null":F.string(Ua.toFloat(this.range)))+", flags="+(this.flags==null?"null":F.string(Ua.toFloat(this.flags)))+"]"},__class__:Li};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":F.string(Ua.toFloat(this.flag)))+'", mask='+(this.mask==null?"null":F.string(Ua.toFloat(this.mask)))+"]"},__class__:Be};var Pv=function(){};t["openfl.utils.IAssetCache"]=Pv;Pv.__name__="openfl.utils.IAssetCache";Pv.__isInterface__=!0;Pv.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__:Pv,__properties__:{set_enabled:"set_enabled",get_enabled:"get_enabled"}};var Qv=function(){this.__enabled=!0;this.bitmapData=new H;this.font=new H;this.sound=new H};t["openfl.utils.AssetCache"]=Qv;Qv.__name__="openfl.utils.AssetCache";Qv.__interfaces__=[Pv];Qv.prototype={bitmapData:null,font:null,sound:null,__enabled:null,clear:function(a){if(a==null)this.bitmapData=new H,this.font=
new H,this.sound=new H;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=rb.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=rb.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=rb.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__:Qv,__properties__:{set_enabled:"set_enabled",get_enabled:"get_enabled"}};var Bf=function(){ld.call(this)};t["openfl.utils.AssetLibrary"]=Bf;Bf.__name__="openfl.utils.AssetLibrary";Bf.fromBundle=function(a){a=ld.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(Fe.fromBytes(lc.toLimeBytes(a),b))};Bf.fromFile=function(a,b){return Bf.fromManifest(Fe.fromFile(a,b))};Bf.fromManifest=function(a){a=
ld.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 Fe.loadFromBytes(lc.toLimeBytes(a),b).then(function(c){return Bf.loadFromManifest(c)})};Bf.loadFromFile=function(a,b){return Fe.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 Fc.withValue(b)}):Fc.withError("Could not load asset manifest")};
Bf.__super__=ld;Bf.prototype=I(ld.prototype,{__proxy:null,bind:function(a,b){return!1},exists:function(a,b){return this.__proxy!=null?this.__proxy.exists(a,b):ld.prototype.exists.call(this,a,b)},getAsset:function(a,b){return this.__proxy!=null?this.__proxy.getAsset(a,b):ld.prototype.getAsset.call(this,a,b)},getAudioBuffer:function(a){return this.__proxy!=null?this.__proxy.getAudioBuffer(a):ld.prototype.getAudioBuffer.call(this,a)},getBytes:function(a){return this.__proxy!=null?this.__proxy.getBytes(a):
ld.prototype.getBytes.call(this,a)},getFont:function(a){return this.__proxy!=null?this.__proxy.getFont(a):ld.prototype.getFont.call(this,a)},getImage:function(a){return this.__proxy!=null?this.__proxy.getImage(a):ld.prototype.getImage.call(this,a)},getMovieClip:function(a){return null},getPath:function(a){return this.__proxy!=null?this.__proxy.getPath(a):ld.prototype.getPath.call(this,a)},getText:function(a){return this.__proxy!=null?this.__proxy.getText(a):ld.prototype.getText.call(this,a)},isLocal:function(a,
b){return this.__proxy!=null?this.__proxy.isLocal(a,b):ld.prototype.isLocal.call(this,a,b)},list:function(a){return this.__proxy!=null?this.__proxy.list(a):ld.prototype.list.call(this,a)},loadAsset:function(a,b){return this.__proxy!=null?this.__proxy.loadAsset(a,b):ld.prototype.loadAsset.call(this,a,b)},load:function(){return this.__proxy!=null?this.__proxy.load():ld.prototype.load.call(this)},loadAudioBuffer:function(a){return this.__proxy!=null?this.__proxy.loadAudioBuffer(a):ld.prototype.loadAudioBuffer.call(this,
a)},loadBytes:function(a){return this.__proxy!=null?this.__proxy.loadBytes(a):ld.prototype.loadBytes.call(this,a)},loadFont:function(a){return this.__proxy!=null?this.__proxy.loadFont(a):ld.prototype.loadFont.call(this,a)},loadImage:function(a){return this.__proxy!=null?this.__proxy.loadImage(a):ld.prototype.loadImage.call(this,a)},loadMovieClip:function(a){return Fc.withValue(this.getMovieClip(a))},loadText:function(a){return this.__proxy!=null?this.__proxy.loadText(a):ld.prototype.loadText.call(this,
a)},unload:function(){this.__proxy!=null?this.__proxy.unload():ld.prototype.unload.call(this)},__class__:Bf});var Hb=function(){};t["openfl.utils.Assets"]=Hb;Hb.__name__="openfl.utils.Assets";Hb.addEventListener=function(a,b,c,d,f){f==null&&(f=!1);d==null&&(d=0);c==null&&(c=!1);rb.onChange.has(Hb.LimeAssets_onChange)||rb.onChange.add(Hb.LimeAssets_onChange);Hb.dispatcher.addEventListener(a,b,c,d,f)};Hb.dispatchEvent=function(a){return Hb.dispatcher.dispatchEvent(a)};Hb.exists=function(a,b){return rb.exists(a,
b)};Hb.getBitmapData=function(a,b){b==null&&(b=!0);if(b&&Hb.cache.get_enabled()&&Hb.cache.hasBitmapData(a)){var c=Hb.cache.getBitmapData(a);if(Hb.isValidBitmapData(c))return c}c=rb.getImage(a,!1);return c!=null?(c=yc.fromImage(c),c.__asset=!0,b&&Hb.cache.get_enabled()&&Hb.cache.setBitmapData(a,c),c):null};Hb.getBytes=function(a){return lc.fromLimeBytes(rb.getBytes(a))};Hb.getFont=function(a,b){b==null&&(b=!0);if(b&&Hb.cache.get_enabled()&&Hb.cache.hasFont(a))return Hb.cache.getFont(a);var c=rb.getFont(a,
!1);if(c!=null){var d=new oe;d.__fromLimeFont(c);b&&Hb.cache.get_enabled()&&Hb.cache.setFont(a,d);return d}return new oe};Hb.getLibrary=function(a){return rb.getLibrary(a)};Hb.getMovieClip=function(a){var b=a.substring(0,a.indexOf(":")),c=U.substr(a,a.indexOf(":")+1,null),d=Hb.getLibrary(b);if(d!=null){if(d instanceof Bf&&d.exists(c,"MOVIE_CLIP")){if(d.isLocal(c,"MOVIE_CLIP"))return d.getMovieClip(c);Xb.error('MovieClip asset "'+a+'" exists, but only asynchronously',{fileName:"openfl/utils/Assets.hx",
lineNumber:261,className:"openfl.utils.Assets",methodName:"getMovieClip"});return null}Xb.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 Xb.error('There is no asset library named "'+b+'"',{fileName:"openfl/utils/Assets.hx",lineNumber:271,className:"openfl.utils.Assets",methodName:"getMovieClip"});return null};Hb.getMusic=function(a,b){b==null&&(b=!0);return Hb.getSound(a,b)};
Hb.getPath=function(a){return rb.getPath(a)};Hb.getSound=function(a,b){b==null&&(b=!0);if(b&&Hb.cache.get_enabled()&&Hb.cache.hasSound(a)){var c=Hb.cache.getSound(a);if(Hb.isValidSound(c))return c}c=rb.getAudioBuffer(a,!1);return c!=null?(c=td.fromAudioBuffer(c),b&&Hb.cache.get_enabled()&&Hb.cache.setSound(a,c),c):null};Hb.getText=function(a){return rb.getText(a)};Hb.hasEventListener=function(a){return Hb.dispatcher.hasEventListener(a)};Hb.hasLibrary=function(a){return rb.hasLibrary(a)};Hb.initBinding=
function(a,b){if(Object.prototype.hasOwnProperty.call(Hb.libraryBindings.h,a)){var c=Hb.libraryBindings.h[a];b==null?Da.__constructor=function(d){d.__bind(c,a)}:(Da.__constructor=null,b.__bind(c,a))}else Xb.warn('No asset is registered as "'+a+'"',{fileName:"openfl/utils/Assets.hx",lineNumber:434,className:"openfl.utils.Assets",methodName:"initBinding"})};Hb.isLocal=function(a,b,c){c==null&&(c=!0);if(c&&Hb.cache.get_enabled()&&((b=="IMAGE"||b==null)&&Hb.cache.hasBitmapData(a)||(b=="FONT"||b==null)&&
Hb.cache.hasFont(a)||(b=="SOUND"||b=="MUSIC"||b==null)&&Hb.cache.hasSound(a)))return!0;c=a.substring(0,a.indexOf(":"));a=U.substr(a,a.indexOf(":")+1,null);c=Hb.getLibrary(c);return c!=null?c.isLocal(a,b):!1};Hb.isValidBitmapData=function(a){return a!=null&&a.image!=null};Hb.isValidSound=function(a){return!0};Hb.list=function(a){return rb.list(a)};Hb.loadBitmapData=function(a,b){b==null&&(b=!0);b==null&&(b=!0);var c=new Qf;if(b&&Hb.cache.get_enabled()&&Hb.cache.hasBitmapData(a)){var d=Hb.cache.getBitmapData(a);
if(Hb.isValidBitmapData(d))return c.complete(d),c.future}rb.loadImage(a,!1).onComplete(function(f){f!=null?(f=yc.fromImage(f),f.__asset=!0,b&&Hb.cache.get_enabled()&&Hb.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};Hb.loadBytes=function(a){var b=new Qf;a=rb.loadBytes(a);a.onComplete(function(c){b.complete(lc.fromLimeBytes(c))});a.onProgress(function(c,d){b.progress(c,d)});a.onError(function(c){b.error(c)});
return b.future};Hb.loadFont=function(a,b){b==null&&(b=!0);b==null&&(b=!0);var c=new Qf;if(b&&Hb.cache.get_enabled()&&Hb.cache.hasFont(a))return c.complete(Hb.cache.getFont(a)),c.future;rb.loadFont(a).onComplete(function(d){var f=new oe;f.__fromLimeFont(d);b&&Hb.cache.get_enabled()&&Hb.cache.setFont(a,f);c.complete(f)}).onError(m(c,c.error)).onProgress(m(c,c.progress));return c.future};Hb.loadLibrary=function(a){return rb.loadLibrary(a).then(function(b){var c=null;b!=null&&(b instanceof Bf?c=b:(c=
rb.libraries,Object.prototype.hasOwnProperty.call(c.h,a)&&delete c.h[a],c=new Bf,c.__proxy=b,rb.registerLibrary(a,c)));return Fc.withValue(c)})};Hb.loadMusic=function(a,b){b==null&&(b=!0);b==null&&(b=!0);return new Fc(function(){return Hb.getMusic(a,b)})};Hb.loadMovieClip=function(a){var b=new Qf,c=a.substring(0,a.indexOf(":")),d=U.substr(a,a.indexOf(":")+1,null),f=Hb.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};Hb.loadSound=function(a,b){b==null&&(b=!0);b==null&&(b=!0);var c=new Qf;rb.loadAudioBuffer(a,b).onComplete(function(d){d!=null?(d=td.fromAudioBuffer(d),b&&Hb.cache.get_enabled()&&Hb.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};Hb.loadText=function(a){return rb.loadText(a)};Hb.registerBinding=function(a,
b){Hb.libraryBindings.h[a]=b};Hb.registerLibrary=function(a,b){rb.registerLibrary(a,b)};Hb.removeEventListener=function(a,b,c){c==null&&(c=!1);Hb.dispatcher.removeEventListener(a,b,c)};Hb.resolveClass=function(a){return t[a]};Hb.resolveEnum=function(a){return Q[a]};Hb.unloadLibrary=function(a){rb.unloadLibrary(a)};Hb.unregisterBinding=function(a,b){Object.prototype.hasOwnProperty.call(Hb.libraryBindings.h,a)&&Hb.libraryBindings.h[a]==b&&(b=Hb.libraryBindings,Object.prototype.hasOwnProperty.call(b.h,
a)&&delete b.h[a])};Hb.LimeAssets_onChange=function(){Hb.dispatchEvent(new na("change"))};var lc={__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 Vc(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:Vc.fromBytes(Na.ofData(a))},fromBytes:function(a){return a==null?null:a instanceof Vc?a:Vc.fromBytes(a)},fromBytesData:function(a){return a==null?null:Vc.fromBytes(Na.ofData(a))},fromFile:function(a){return lc.fromLimeBytes(vg.fromFile(a))},fromLimeBytes:function(a){return lc.fromBytes(a)},get:function(a,b){return a.b[b]},inflate:function(a){a.inflate()},loadFromBytes:function(a){return vg.loadFromBytes(a).then(function(b){b=
lc.fromLimeBytes(b);return Fc.withValue(b)})},loadFromFile:function(a){return vg.loadFromFile(a).then(function(b){b=lc.fromLimeBytes(b);return Fc.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){qA.set(lc.__bytePointer,a,null,null,a.position);return lc.__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(){Vc.__defaultEndian==
null&&(Rb.get_endianness()==tk.LITTLE_ENDIAN?Vc.__defaultEndian=1:Vc.__defaultEndian=0);return Vc.__defaultEndian},set_defaultEndian:function(a){return Vc.__defaultEndian=a},get_defaultObjectEncoding:function(){return Vc.defaultObjectEncoding},set_defaultObjectEncoding:function(a){return Vc.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}},Rv=function(){};t["openfl.utils.IDataOutput"]=Rv;Rv.__name__="openfl.utils.IDataOutput";Rv.__isInterface__=!0;Rv.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__:Rv,__properties__:{set_endian:"set_endian",get_endian:"get_endian"}};var Tq=function(){};t["openfl.utils.IDataInput"]=Tq;Tq.__name__="openfl.utils.IDataInput";Tq.__isInterface__=!0;Tq.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__:Tq,__properties__:{set_endian:"set_endian",get_endian:"get_endian",get_bytesAvailable:"get_bytesAvailable"}};var Vc=function(a){a==null&&(a=0);var b=new Na(new ArrayBuffer(a));Na.call(this,b.b.buffer);this.__allocated=a;Vc.__defaultEndian==null&&(Rb.get_endianness()==tk.LITTLE_ENDIAN?Vc.__defaultEndian=1:Vc.__defaultEndian=0);this.__endian=Vc.__defaultEndian;this.objectEncoding=
Vc.defaultObjectEncoding;this.position=0};t["openfl.utils.ByteArrayData"]=Vc;Vc.__name__="openfl.utils.ByteArrayData";Vc.__interfaces__=[Rv,Tq];Vc.__properties__={set_defaultEndian:"set_defaultEndian",get_defaultEndian:"get_defaultEndian"};Vc.fromBytes=function(a){var b=new Vc;b.__fromBytes(a);return b};Vc.get_defaultEndian=function(){Vc.__defaultEndian==null&&(Rb.get_endianness()==tk.LITTLE_ENDIAN?Vc.__defaultEndian=1:Vc.__defaultEndian=0);return Vc.__defaultEndian};Vc.set_defaultEndian=function(a){return Vc.__defaultEndian=
a};Vc.__super__=Na;Vc.prototype=I(Na.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 Na(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=vg.compress(this,wk.DEFLATE);break;case 1:a=vg.compress(this,wk.LZMA);
break;default:a=vg.compress(this,wk.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 Lk;},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 Lk;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 Lk;this.position+=8;return this.getDouble(this.position-8)}var a=this.readInt(),b=this.readInt();return pf.i64ToDouble(b,a)},readFloat:function(){if(this.__endian==1){if(this.position+4>this.length)throw new Lk;this.position+=4;return this.getFloat(this.position-4)}return pf.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 Lk;if(this.__endian==1){var a=this.readUnsignedInt();var b=this.readUnsignedInt()}else b=this.readUnsignedInt(),a=this.readUnsignedInt();return new Jb(b,a)},readMultiByte:function(a,b){return this.readUTFBytes(a)},readObject:function(){switch(this.objectEncoding){case 0:var a=
new fo(this,this.position),b=new Sv(a);b=oi.unwrapValue(b.read());this.position=a.pos;return b;case 3:return a=new fo(this,this.position),b=new Tv(a,this.__amf3Reader),b=Bc.decode(b.read()),this.position=a.pos,b;case 10:return b=this.readUTF(),Rg.run(b);case 11:return b=this.readLargeUTF(),Rg.run(b);case 12:return b=this.readUTF(),(new In(b)).doParse();case 13:return b=this.readLargeUTF(),(new In(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 Lk;},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 Lk;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 Na(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=
vg.decompress(this,wk.DEFLATE);break;case 1:a=vg.decompress(this,wk.LZMA);break;default:a=vg.decompress(this,wk.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);lc.get_length(a)!=0&&(c==0&&(c=lc.get_length(a)-b),this.__resize(this.position+c),this.blit(this.position,
a,b,c),this.position+=c)},writeDouble:function(a){a=pf.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=pf.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=oi.encode(a);var b=new cq,c=new Ny(b);c.write(a);this.writeBytes(lc.fromBytes(b.getBytes()));
break;case 3:b=new cq;c=new Oy(b);a instanceof Vc?c.write(Pc.AByteArray(a)):(a=Bc.encode(a),c.write(a));this.writeBytes(lc.fromBytes(b.getBytes()));break;case 10:a=Eg.run(a);this.writeUTF(a);break;case 11:a=Eg.run(a);this.writeLargeUTF(a);break;case 12:a=Bg.print(a,null,null);this.writeUTF(a);break;case 13:a=Bg.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=Na.ofString(a);if(a.length>65535)throw new xe("Length is out of range");this.writeShort(a.length);this.writeBytes(lc.fromBytes(a))},writeLargeUTF:function(a){a=Na.ofString(a);this.writeUnsignedInt(a.length);this.writeBytes(lc.fromBytes(a))},writeUTFBytes:function(a){a=Na.ofString(a);this.writeBytes(lc.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 Na(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__:Vc,__properties__:{set___length:"set___length",get___length:"get___length",set_endian:"set_endian",get_endian:"get_endian",get_bytesAvailable:"get_bytesAvailable"}});var so=function(){this.types=new H;this.values=new H};t["openfl.utils._Dictionary.ClassMap"]=so;so.__name__="openfl.utils._Dictionary.ClassMap";so.__interfaces__=[ha];so.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 so,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 Cl(this)},keys:function(){return new $p(this.types.h)},iterator:function(){return new $p(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 H.stringify(this.values.h)},__class__:so};var qo=function(){this.floatKeys=[];this.values=[]};t["openfl.utils._Dictionary.FloatMap"]=qo;qo.__name__="openfl.utils._Dictionary.FloatMap";qo.__interfaces__=[ha];qo.prototype={floatKeys:null,values:null,clear:function(){this.floatKeys=
[];this.values=[]},copy:function(){for(var a=new qo,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 Cl(this)},keys:function(){return new Ag(this.floatKeys.slice())},iterator:function(){return new Ag(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__:qo};var ro=function(){this.map=new Ta};t["openfl.utils._Dictionary.UtilsObjectMap"]=ro;ro.__name__="openfl.utils._Dictionary.UtilsObjectMap";ro.__interfaces__=[ha];ro.prototype={map:null,clear:function(){this.map.h={__keys__:{}}},copy:function(){for(var a=new ro,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 Cl(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__:ro};var Sz={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 tk.BIG_ENDIAN;case 1:return tk.LITTLE_ENDIAN;default:return null}},toString:function(a){switch(a){case 0:return"bigEndian";case 1:return"littleEndian";default:return null}}},Je={_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=x.getClass(a);a!=null;){if(a==b)return!0;a=a.__super__}return!1},iterator:function(a){if(a instanceof Array)return new Ag(a);var b=u.fields(a);b==null&&(b=[]);if(a instanceof Ab)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 Ag(b)},propertyIsEnumerable:function(a,b){return a!=null&&Object.prototype.hasOwnProperty.call(a,b)?x.__implements(u.field(a,b),Uq):!1},toLocaleString:function(a){return a==null?null:F.string(a)},
toString:function(a){return a==null?null:F.string(a)},valueOf:function(a){return a},__fieldRead:function(a,b){return Je.__get(a,b)},__fieldWrite:function(a,b,c){a!=null&&u.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 u.field(a,b);if(a instanceof Ab){var c=a.getChildByName(b);if(c!=null)return c}b=u.getProperty(a,b);u.isFunction(b)&&(b=Function.prototype.bind.call(b,a));return b},__set:function(a,b,c){a!=null&&
u.setProperty(a,b,c);return c},__getArray:function(a,b){return a==null?null:x.__cast(a,Array)[b]},__setArray:function(a,b,c){return a==null?c:x.__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:F.string(c)}b==null?b="null":(c=b,b=c==null?null:F.string(c));return a+b}return a+b},__addString:function(a,b){return(a==null?"null":a==null?null:F.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 Je.__lte(a,b)},__intLte:function(a,b){return Je.__lte(a,b)},__lteFloat:function(a,b){return Je.__lte(a,b)},__floatLte:function(a,
b){return Je.__lte(a,b)},__gt:function(a,b){return a>b},__gtInt:function(a,b){return Je.__gt(a,b)},__intGt:function(a,b){return a>b},__gtFloat:function(a,b){return Je.__gt(a,b)},__floatGt:function(a,b){return a>b},__gte:function(a,b){return a>=b},__gteInt:function(a,b){return Je.__gte(a,b)},__intGte:function(a,b){return a>=b},__gteFloat:function(a,b){return Je.__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}},Uv=function(){};t["haxe.lang.Iterator"]=Uv;Uv.__name__=
"haxe.lang.Iterator";Uv.__isInterface__=!0;Uv.prototype={hasNext:null,next:null,__class__:Uv};var Uq=function(){};t["haxe.lang.Iterable"]=Uq;Uq.__name__="haxe.lang.Iterable";Uq.__isInterface__=!0;Uq.prototype={iterator:null,__class__:Uq};var lq=function(a,b){b==null&&(b=0);if(isNaN(a)||a<0)throw new Ud("The delay specified is negative or not a finite number");ma.call(this);this.__delay=a;this.__repeatCount=b;this.running=!1;this.currentCount=0};t["openfl.utils.Timer"]=lq;lq.__name__="openfl.utils.Timer";
lq.__super__=ma;lq.prototype=I(ma.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(){La.get_current()!=null&&La.get_current().stage!=null&&La.get_current().stage.__renderAfterEvent()},timer_onTimer:function(){this.currentCount++;if(this.__repeatCount>0&&this.currentCount>=this.__repeatCount){this.stop();var a=new Al("timer");
this.dispatchEvent(a);a.__updateAfterEventFlag&&this.__handleUpdateAfterEvent();a=new Al("timerComplete")}else a=new Al("timer");this.dispatchEvent(a);a.__updateAfterEventFlag&&this.__handleUpdateAfterEvent()},__class__:lq,__properties__:{set_repeatCount:"set_repeatCount",get_repeatCount:"get_repeatCount",set_delay:"set_delay",get_delay:"get_delay"}});var jd=function(){};t["openfl.utils._internal.Lib"]=jd;jd.__name__="openfl.utils._internal.Lib";jd.notImplemented=function(a){var b=a.className+"."+
a.methodName;Object.prototype.hasOwnProperty.call(jd.__sentWarnings.h,b)||(jd.__sentWarnings.h[b]=!0,Xb.warn(a.methodName+" is not implemented",a))};var bn=function(){this.rollOutStack=[]};t["openfl.utils._internal.TouchData"]=bn;bn.__name__="openfl.utils._internal.TouchData";bn.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__:bn};
var Sv=function(a){this.i=a;a.set_bigEndian(!0)};t["openfl.utils._internal.format.amf.AMFReader"]=Sv;Sv.__name__="openfl.utils._internal.format.amf.AMFReader";Sv.prototype={i:null,readObject:function(){for(var a=new H;;){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 Z.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 Z.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 Z.thrown("Unknown AMF "+a);}},read:function(){return this.readWithCode(this.i.readByte())},__class__:Sv};var oi=function(){};t["openfl.utils._internal.format.amf.AMFTools"]=oi;oi.__name__="openfl.utils._internal.format.amf.AMFTools";oi.encode=function(a){var b=Eb.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 H;for(var c=0,d=u.fields(a);c<d.length;){var f=d[c];++c;var g=oi.encode(u.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(oi.encode(g));return Ff.AArray(f);case String:return Ff.AString(a);case H:b=new H;c=Object.keys(a.h);d=c.length;for(var h=0;h<d;)f=c[h++],g=oi.encode(a.h[f]),b.h[f]=g;return Ff.AObject(b);default:throw Z.thrown("Can't encode instance of "+b.__name__);}break;default:throw Z.thrown("Can't encode "+
F.string(a));}};oi.number=function(a){return a==null?null:a._hx_index==0?a.f:null};oi.string=function(a){return a==null?null:a._hx_index==2?a.s:null};oi.object=function(a){return a==null?null:a._hx_index==3?a.fields:null};oi.abool=function(a){return a==null?null:a._hx_index==1?a.b:null};oi.array=function(a){return a==null?null:a._hx_index==7?a.values:null};oi.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]=oi.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=oi.unwrapValue;d=Array(c.length);b=0;for(f=c.length;b<f;)g=b++,d[g]=a(c[g]);return d}};var Ff=Q["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 Ny=function(a){this.o=a;a.set_bigEndian(!0)};t["openfl.utils._internal.format.amf.AMFWriter"]=Ny;Ny.__name__="openfl.utils._internal.format.amf.AMFWriter";Ny.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__:Ny};var Vv=function(a,b){this.a=a;this.extra=b};t["openfl.utils._internal.format.amf3.AMF3Array"]=Vv;Vv.__name__="openfl.utils._internal.format.amf3.AMF3Array";Vv.prototype={a:null,extra:null,__class__:Vv};var Mo=Q["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)};Mo.__constructs__=[Mo.HReference,Mo.HTraits,Mo.HExternal];var Tv=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"]=Tv;Tv.__name__="openfl.utils._internal.format.amf3.AMF3Reader";Tv.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 H;b=Pc.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=Bc.decode(this.readString());if(d=="")break;c=this.read();a.h[d]=c}break;case 2:b=Bc.object(Pc.AObject(null,null,a.className)),b!=null&&x.__implements(b,ao)?(b.readExternal(new Wv(this)),b=Pc.AExternal(b)):b=Pc.ANull}this.complexObjectsTable.push(b);
return b},readObjectHeader:function(a){var b=this.readInt();if((b&1)==0)return Mo.HReference(this.complexObjectsTable[b>>1]);if((b&3)==1)return Mo.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:Bc.decode(this.readString()),sealedMemberNames:c};for(b=0;b<d;)b++,c.push(Bc.decode(this.readString()));this.objectTraitsTable.push(a);return Mo.HTraits(a)}if((b&7)==7)return Mo.HExternal(a!=null?a:Bc.decode(this.readString()));
throw Z.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=Pc.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 H,d=Pc.AArray(b,c);this.complexObjectsTable.push(d);for(var f=Bc.decode(this.readString());f.length!=0;){var g=
this.read();c.h[f]=g;f=Bc.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=ub.toIntVector(null,a);c.fixed=b;for(b=0;b<a;){var d=b++;c.set(d,this.i.readInt32())}a=Pc.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=ub.toFloatVector(null,a);c.fixed=b;for(b=0;b<a;){var d=b++;c.set(d,this.i.readDouble())}a=Pc.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=Bc.decode(this.readString()),d=ub.toNullVector(null,b);d.fixed=a;var f=Pc.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:ye.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 Na(new ArrayBuffer(a)),c=0;c<a;){var d=c++,f=this.i.readByte();
b.b[d]=f}b=lc.fromBytes(b);b.__endian=0;b.__amf3Reader=this;b=Pc.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 Pc.AString("");a=Pc.AString(this.i.readString(a,Zp.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=Pc.ADate(a);this.complexObjectsTable.push(a);return a},readXml:function(){var a=this.readInt();if((a&1)==0)return this.complexObjectsTable[a>>1];a=ib.parse(Bc.decode(this.readStringNoHeader(a>>
1)));a=Pc.AXml(a);this.complexObjectsTable.push(a);return a},readWithCode:function(a){var b=this.i;switch(a){case 0:return Pc.AUndefined;case 1:return Pc.ANull;case 2:return Pc.ABool(!1);case 3:return Pc.ABool(!0);case 4:return Pc.AInt(this.readInt(!0));case 5:return Pc.ANumber(b.readDouble());case 6:return this.readString();case 7:throw Z.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 Z.thrown("Unknown AMF "+a);}},read:function(){var a=this.i.readByte();return this.readWithCode(a)},__class__:Tv};var Wv=function(a){this.i=a.i;this.r=a;this.objectEncoding=3};t["openfl.utils._internal.format.amf3.AMF3ReaderInput"]=Wv;Wv.__name__="openfl.utils._internal.format.amf3.AMF3ReaderInput";Wv.__interfaces__=[Tq];Wv.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(lc.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 Sv(this.i);return a=oi.unwrapValue(a.read());
case 3:return a=new Tv(this.i,this.r),a=Bc.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__:Wv,__properties__:{set_endian:"set_endian",get_endian:"get_endian",get_bytesAvailable:"get_bytesAvailable"}};var Bc=function(){};t["openfl.utils._internal.format.amf3.AMF3Tools"]=Bc;Bc.__name__="openfl.utils._internal.format.amf3.AMF3Tools";Bc.encode=function(a){var b=
Eb.typeof(a);switch(b._hx_index){case 0:return Pc.ANull;case 1:return Pc.AInt(a);case 2:return Pc.ANumber(a);case 3:return Pc.ABool(a);case 4:for(var c=new H,d=0,f=u.fields(a);d<f.length;){var g=f[d];++d;b=Bc.encode(u.field(a,g));c.h[g]=b}return Pc.AObject(c,null,null);case 5:return Pc.ANull;case 6:switch(b.c){case Array:g=[];for(b=0;b<a.length;)c=a[b],++b,g.push(Bc.encode(c));return Pc.AArray(g);case Date:return Pc.ADate(a);case String:return Pc.AString(a);case ib:return Pc.AXml(a);case Qd:case Ta:case H:c=
new cf;f=Object.keys(a.h);d=f.length;for(b=0;b<d;)g=f[b++],c.set(Bc.encode(g),Bc.encode(a.h[g]));return Pc.AMap(c);case Na:return Pc.AByteArray(lc.fromBytes(a));case Vc:return Pc.AByteArray(a);case Vv:g=[];f=new H;b=0;for(d=a.a;b<d.length;)c=d[b],++b,g.push(Bc.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=Bc.encode(a.extra.h[l]);f.h[l]=c}return Pc.AArray(g,f);default:return x.__implements(a,ao)?Pc.AExternal(a):Pc.ANull}break;default:throw Z.thrown("Can't encode "+
F.string(a));}};Bc.decode=function(a){if(a==null)return null;switch(a._hx_index){case 0:return Bc.undefined(a);case 1:return Bc.anull(a);case 2:return Bc.bool(a);case 3:return Bc.int(a);case 4:return Bc.number(a);case 5:return Bc.string(a);case 6:return Bc.date(a);case 7:return Bc.object(a);case 8:return Bc.external(a);case 9:return Bc.array(a);case 10:return Bc.intVector(a);case 11:return Bc.floatVector(a);case 12:return Bc.objectVector(a);case 13:return Bc.xml(a);case 14:return Bc.byteArray(a);
case 15:return Bc.map(a)}};Bc.undefined=function(a){return null};Bc.anull=function(a){return null};Bc.bool=function(a){return a==null?null:a._hx_index==2?a.b:null};Bc.int=function(a){return a==null?null:a._hx_index==3?a.i:null};Bc.number=function(a){return a==null?null:a._hx_index==4?a.f:null};Bc.string=function(a){return a==null?null:a._hx_index==5?a.s:null};Bc.date=function(a){return a==null?null:a._hx_index==6?a.d:null};Bc.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(Bc.decode(d))}return b}return null};Bc.intVector=function(a){return a==null?null:a._hx_index==10?a.v:null};Bc.floatVector=function(a){return a==null?null:a._hx_index==11?a.v:null};Bc.objectVector=function(a){if(a!=null&&a._hx_index==12){a=a.v;for(var b=ub.toObjectVector(null,a.get_length(),a.fixed),c=0,d=a.get_length();c<d;){var f=c++;b.set(f,Bc.decode(a.get(f)))}return b}return null};Bc.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=La.getClassByAlias(c);d==null&&(d=t[c]);d!=null&&(a=Eb.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++];u.setProperty(a,g,Bc.decode(b.h[g]))}}return a}return null};Bc.external=function(a){return a==null?null:a._hx_index==8?a.o:null};Bc.xml=function(a){return a==null?null:a._hx_index==13?a.x:null};Bc.byteArray=function(a){return a==null?null:a._hx_index==14?a.ba:null};Bc.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 Qd;for(var c=a.keys();c.hasNext();){var d=c.next(),f=Bc.decode(d);d=Bc.decode(a.get(d));b.h[f]=d}}else if(typeof b=="string")for(b=new H,c=a.keys();c.hasNext();)d=c.next(),f=Bc.decode(d),d=Bc.decode(a.get(d)),b.h[f]=d;else for(b=new Ta,c=a.keys();c.hasNext();)f=c.next(),b.set(Bc.decode(f),Bc.decode(a.get(f)));break}return new Ta}return null};var Pc=Q["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)};Pc.__constructs__=[Pc.AUndefined,Pc.ANull,Pc.ABool,Pc.AInt,Pc.ANumber,Pc.AString,Pc.ADate,Pc.AObject,Pc.AExternal,Pc.AArray,Pc.AIntVector,Pc.AFloatVector,Pc.AObjectVector,Pc.AXml,Pc.AByteArray,Pc.AMap];var Oy=function(a){this.o=a;a.set_bigEndian(!0)};t["openfl.utils._internal.format.amf3.AMF3Writer"]=Oy;Oy.__name__="openfl.utils._internal.format.amf3.AMF3Writer";Oy.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;Ua.gt(d,0)&&(d>>>=1,this.o.writeByte(d|128),a-=d<<b,++b,c=!0);b-=8;d=a>>>b;if(c||Ua.gt(d,0))this.o.writeByte(d|128),a-=d<<b,c=!0;b-=7;d=a>>>b;if(c||Ua.gt(d,0))this.o.writeByte(d|128),a-=d<<b;this.o.writeByte(a)},writeString:function(a){a=Na.ofString(a,Zp.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=x.getClass(a),c=null;La.__registeredClasses.exists(b)&&(c=La.__registeredClasses.get(b));c==null&&(c=b.__name__);this.writeString(c);
b=new Vc(0);b.__endian=0;a.writeExternal(b);this.o.writeBytes(lc.toBytes(b),0,lc.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(wn.print(c));break;case 14:c=a.ba;b.writeByte(12);this.writeUInt(lc.get_length(c),!0);b.write(lc.toBytes(c));break;case 15:for(c=a.m,b.writeByte(17),this.writeUInt(kb.count(c),!0),b.writeByte(0),b=c.keys();b.hasNext();)a=b.next(),this.write(a),this.write(c.get(a))}},__class__:Oy};var Ro=function(){this._useF8=!0;this._varType="string";this._intPos=3;Ke.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"]=Ro;Ro.__name__="plugins.DebugPlugin";Ro.__super__=Ke;Ro.prototype=I(Ke.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){Ke.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;Ke.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;ye.trace(this._access.parser.parseString(c),{fileName:"Source/plugins/DebugPlugin.hx",lineNumber:642,className:"plugins.DebugPlugin",methodName:"acTrace"})}return!0},acTraceStrings:function(a){ye.trace(Bg.print({string:this._access.varString},null,null),{fileName:"Source/plugins/DebugPlugin.hx",lineNumber:652,className:"plugins.DebugPlugin",methodName:"acTraceStrings"});return!0},acTraceFloats:function(a){ye.trace(Bg.print({float:this._access.varFloat},
null,null),{fileName:"Source/plugins/DebugPlugin.hx",lineNumber:664,className:"plugins.DebugPlugin",methodName:"acTraceFloats"});return!0},acTraceInts:function(a){ye.trace(Bg.print({int:this._access.varInt},null,null),{fileName:"Source/plugins/DebugPlugin.hx",lineNumber:676,className:"plugins.DebugPlugin",methodName:"acTraceInts"});return!0},acTraceBools:function(a){ye.trace(Bg.print({bool:this._access.varBool},null,null),{fileName:"Source/plugins/DebugPlugin.hx",lineNumber:688,className:"plugins.DebugPlugin",
methodName:"acTraceBools"});return!0},acTraceVars:function(a){ye.trace(Bg.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> => "+F.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 Ic;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 Ic;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 Ic;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();ye.trace(hk.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){ye.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 av(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(Bg.print({ac:"movie.load",param:[this._movieInput.get_text()]},null,null))},onLoadScene:function(a){this._sceneInput.get_text()!=""&&this._access.parser.run(Bg.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){ye.trace(Bg.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__:Ro});var To=function(){this._firstsent=!1;Ke.call(this,"google-analytics","Google Analytics","GoogleAnalytics",!0,!1)};t["plugins.GoogleAnalyticsPlugin"]=
To;To.__name__="plugins.GoogleAnalyticsPlugin";To.__super__=Ke;To.prototype=I(Ke.prototype,{_confWindow:null,_firstsent:null,initialize:function(a){Ke.prototype.initialize.call(this,a);this.addMenu("Analytics",m(this,this.onAnalytics));this._confWindow=new ep("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(){Ke.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__:To});var qe=function(){Ke.call(this,"overlay","Overlay","Overlay",!0,!0)};t["plugins.OverlayPlugin"]=qe;qe.__name__="plugins.OverlayPlugin";qe.overlay_return=Sa.overlay_return=function(){if(qe.overlayInfo!=null){var a=p.ws,b=new H;b.h.key=qe.overlayInfo.key;a.send("Overlay/LoadKey",b,qe.onkeyLoaded)}};qe.onkeyLoaded=
function(a,b){if(a)if(b.map.h.e==0)if(b.map.h.key!=""){if(b.map.h.ret!="")if(a=Fa.jsonParse(b.map.h.ret),a==0)qe.overlayInfo.onerror!=null&&qe.overlayInfo.parser.run(qe.overlayInfo.onerror,!0);else{b=0;for(var c=u.fields(a);b<c.length;){var d=c[b];++b;var f=u.field(a,d);if(Object.prototype.hasOwnProperty.call(f,"t")&&Object.prototype.hasOwnProperty.call(f,"v"))switch(u.field(f,"t")){case "B":qe.overlayInfo.parser.setBool(d,u.field(f,"v"));break;case "F":qe.overlayInfo.parser.setFloat(d,u.field(f,
"v"));break;case "I":qe.overlayInfo.parser.setInt(d,u.field(f,"v"));break;case "S":qe.overlayInfo.parser.setString(d,u.field(f,"v"))}}}qe.overlayInfo.onsuccess!=null&&qe.overlayInfo.parser.run(qe.overlayInfo.onsuccess,!0)}else qe.overlayInfo.onerror!=null&&qe.overlayInfo.parser.run(qe.overlayInfo.onerror,!0);else qe.overlayInfo.onerror!=null&&qe.overlayInfo.parser.run(qe.overlayInfo.onerror,!0);else qe.overlayInfo.onerror!=null&&qe.overlayInfo.parser.run(qe.overlayInfo.onerror,!0);qe.overlayInfo=
null};qe.__super__=Ke;qe.prototype=I(Ke.prototype,{_confWindow:null,initialize:function(a){Ke.prototype.initialize.call(this,a);this.addMenu("Overlay",m(this,this.onOverlay));this._confWindow=new ep("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(){Ke.prototype.kill.call(this);this._confWindow.kill();this._confWindow=null},getKey:function(a,b){if(a.length>=2){qe.overlayInfo=null;var c="0";a.length>=3&&this._access.parser.parseBool(a[2])&&(c="1");var d=new H;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 H;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=Fa.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!=""){qe.overlayInfo={key:b.map.h.key,onerror:c.onerror,onsuccess:c.onsuccess,parser:this._access.parser};a=F.string(b.map.h.url)+"?key="+F.string(b.map.h.key);if(b.map.h.addget=="1"){c=Fa.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__:qe});var Uo=function(){Ke.call(this,
"server-call","Server Call","ServerCall",!1,!0)};t["plugins.ServerCallPlugin"]=Uo;Uo.__name__="plugins.ServerCallPlugin";Uo.__super__=Ke;Uo.prototype=I(Ke.prototype,{initialize:function(a){Ke.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(){Ke.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 H;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 H;a=this._access.parser.parseString(a[0]);d.h.url=a;a=Fa.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 H;c=Fa.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=Fa.jsonParse(b.map.h.resp),a==0)c.onerror!=null&&this._access.parser.run(c.onerror,!0);else{b=0;for(var d=u.fields(a);b<d.length;){var f=d[b];++b;var g=u.field(a,f);if(Object.prototype.hasOwnProperty.call(g,"t")&&Object.prototype.hasOwnProperty.call(g,"v"))switch(u.field(g,"t")){case "B":this._access.parser.setBool(f,u.field(g,"v"));break;case "F":this._access.parser.setFloat(f,u.field(g,"v"));break;case "I":this._access.parser.setInt(f,u.field(g,"v"));break;case "S":this._access.parser.setString(f,
u.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=u.fields(b.json);a<d.length;){var f=d[a];++a;var g=u.field(b.json,f);if(Object.prototype.hasOwnProperty.call(g,"t")&&Object.prototype.hasOwnProperty.call(g,"v"))switch(u.field(g,"t")){case "B":this._access.parser.setBool(f,u.field(g,"v"));
break;case "F":this._access.parser.setFloat(f,u.field(g,"v"));break;case "I":this._access.parser.setInt(f,u.field(g,"v"));break;case "S":this._access.parser.setString(f,u.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__:Uo});var So=function(){Ke.call(this,"original.share","Share")};t["plugins.SharePlugin"]=So;So.__name__="plugins.SharePlugin";So.__super__=Ke;So.prototype=I(Ke.prototype,{_overlay:null,initialize:function(a){Ke.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;Ke.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 ne("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 ne("https://www.facebook.com/sharer/sharer.php?u="+encodeURIComponent(a)));a.method="GET";La.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 ne("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 ne("https://www.linkedin.com/shareArticle?mini=true&url="+encodeURIComponent(a)));a.method="GET";La.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 ne("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 ne("https://pinterest.com/pin/create/button/?url="+encodeURIComponent(a)));a.method="GET";La.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 ne("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 ne("https://www.reddit.com/submit?url="+encodeURIComponent(a)));a.method="GET";La.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 ne("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 ne("https://twitter.com/intent/tweet?url="+encodeURIComponent(a)));a.method="GET";La.getURL(a);
return!0},__class__:So});wa.$haxeUID|=0;typeof performance!="undefined"&&typeof performance.now=="function"&&(U.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 pw={},kA={},Oz=Number,fw=Boolean,qw={},Xz={};x.__toStr={}.toString;ArrayBuffer.prototype.slice==null&&(ArrayBuffer.prototype.slice=Uy.sliceImpl);typeof window=="undefined"&&(wa.onmessage=function(a){a=a.data;try{wa.onmessage=(B=$b.__current,m(B,B.dispatchMessage)),Lx.toFunction(a)()}catch(b){Pb.lastError=b,$b.__current.destroy()}});W.__alpha16=new Uint32Array(256);for(var No=0;No<256;){var Vq=No++;W.__alpha16[Vq]=Math.ceil(Vq*257.00392156862745)}W.__clamp=new Uint8Array(511);
for(No=0;No<255;)Vq=No++,W.__clamp[Vq]=Vq;for(No=255;No<511;)Vq=No++,W.__clamp[Vq]=255;vk.available=!1;vk.enabled=!1;Xb.level=3;typeof console=="undefined"&&(console={});console.log==null&&(console.log=function(){});If.__registerDefaultLoaders();C.hitTestCanvas=hl.get_supported()?window.document.createElement("canvas"):null;C.hitTestContext=hl.get_supported()?C.hitTestCanvas.getContext("2d"):null;Lo.maxTouchPoints=2;Lo.supportedGestures=null;Lo.supportsGestureEvents=!1;Lo.inputMode=2;ub.__meta__=
{statics:{toNullVector:{SuppressWarnings:["checkstyle:Dynamic"]}}};ka.__meta__={fields:{__cairo:{SuppressWarnings:["checkstyle:Dynamic"]},addEventListener:{SuppressWarnings:["checkstyle:Dynamic"]},removeEventListener:{SuppressWarnings:["checkstyle:Dynamic"]}}};ka.__broadcastEvents=new H;ka.__instanceCount=0;ka.__tempStack=new dc(function(){return ub.toObjectVector(null)},function(a){a.set_length(0)});da.__meta__={fields:{layoutData:{style:null},disabledAlpha:{style:null},focusRectSkin:{style:null},
focusPaddingTop:{style:null},focusPaddingRight:{style:null},focusPaddingBottom:{style:null},focusPaddingLeft:{style:null}}};qb.__meta__={obj:{defaultXmlProperty:["xmlContent"]}};qb.VARIANT_TOOL_BAR="toolBar";ua.iniVars=new H;ua.moviePath="";ua.assetsPath="";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(" ");
Xa.escapeRe=RegExp("[.*+?^${}()|[\\]\\\\]","g");ib.Element=0;ib.PCData=1;ib.CData=2;ib.Comment=3;ib.DocType=4;ib.ProcessingInstruction=5;ib.Document=6;Ve.__meta__={obj:{defaultXmlProperty:["content"]}};Ve.MAX_CLICK_DISTANCE_FOR_CLOSE=6;og.ORIENTATION_LANDSCAPE="landscape";og.ORIENTATION_PORTRAIT="portrait";og.MODE_PLAYER="player";og.MODE_EDITOR="editor";og.MODE_EDPLAYERWAIT="editorplayerwait";og.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 H;k.temp=new H;k.displayType="landscape";k.sceneToLoad="";k.kfToLoad=-1;k.copy=new Kb;k.testActions="";k.testDelay=0;Ca.__pool=new dc(function(){return new Ca},function(a){a.setTo(0,0)});hb.__meta__={fields:{equals:{SuppressWarnings:["checkstyle:FieldDocComment"]},to3DString:{SuppressWarnings:["checkstyle:FieldDocComment"]},toMozString:{SuppressWarnings:["checkstyle:FieldDocComment"]}}};
hb.__identity=new hb;hb.__pool=new dc(function(){return new hb},function(a){a.identity()});hb.__matrix3=uf._new();id.__pool=new dc(function(){return new id},function(a){a.__identity()});Yd.__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.shaders="none deuteranotopia protonatopia tritanotopia contrast grayscale".split(" ");
p.currentShader=0;p.focusMode=!1;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 H;p.style=new Yd;p.contraptions=new Gl;p.narrative=new yd;p.mvActions=new H;p.contentPosition=new Ca;p.contentWidth=0;p.contentHeight=0;p.usingTarget=0;p.cursorVisible=!0;p.canTrigger=!0;p.history=[];na.ACTIVATE="activate";na.ADDED="added";na.ADDED_TO_STAGE="addedToStage";na.CANCEL="cancel";na.CHANGE="change";na.CLEAR="clear";
na.CLOSING="closing";na.CLOSE="close";na.COMPLETE="complete";na.CONNECT="connect";na.CONTEXT3D_CREATE="context3DCreate";na.COPY="copy";na.CUT="cut";na.DEACTIVATE="deactivate";na.ENTER_FRAME="enterFrame";na.EXIT_FRAME="exitFrame";na.EXITING="exiting";na.FRAME_CONSTRUCTED="frameConstructed";na.FRAME_LABEL="frameLabel";na.FULLSCREEN="fullScreen";na.ID3="id3";na.INIT="init";na.MOUSE_LEAVE="mouseLeave";na.OPEN="open";na.PASTE="paste";na.REMOVED="removed";na.REMOVED_FROM_STAGE="removedFromStage";na.RENDER=
"render";na.RESIZE="resize";na.SCROLL="scroll";na.SELECT="select";na.SELECT_ALL="selectAll";na.SOUND_COMPLETE="soundComplete";na.TAB_CHILDREN_CHANGE="tabChildrenChange";na.TAB_ENABLED_CHANGE="tabEnabledChange";na.TAB_INDEX_CHANGE="tabIndexChange";na.TEXTURE_READY="textureReady";na.UNLOAD="unload";Ok.MOVIE_LOADED="movie_loaded";Ok.SCENE_LOADED="scene_loaded";Ok.EVENT="event";El.VORIENTATION="vertical";El.HORIENTATION="horizontal";El.SORIENTATION="square";Oj.MOVIELOAD="movieload";Oj.SCENELOAD="sceneload";
Oj.KEYFRAMELOAD="keyframeload";Oj.DISPLAYRESIZE="displayresize";si.__meta__={fields:{setSkinForState:{style:null}}};Wb.__meta__={obj:{defaultXmlProperty:["text"]},fields:{setTextFormatForState:{style:null},setIconForState:{style:null}}};Wb.VARIANT_PRIMARY="primary";Wb.VARIANT_DANGER="danger";Zf.INVALIDATION_FLAG_DECREMENT_BUTTON_FACTORY=y.CUSTOM("decrementButtonFactory");Zf.INVALIDATION_FLAG_INCREMENT_BUTTON_FACTORY=y.CUSTOM("incrementButtonFactory");Zf.defaultDecrementButtonFactory=Kc.withClass(Wb);
Zf.defaultIncrementButtonFactory=Kc.withClass(Wb);fh.CHILD_VARIANT_DECREMENT_BUTTON="hScrollBar_decrementButton";fh.CHILD_VARIANT_INCREMENT_BUTTON="hScrollBar_incrementButton";eh.CHILD_VARIANT_DECREMENT_BUTTON="vScrollBar_decrementButton";eh.CHILD_VARIANT_INCREMENT_BUTTON="vScrollBar_incrementButton";Bb.INVALIDATION_FLAG_SCROLLER_FACTORY=y.CUSTOM("scrollerFactory");Bb.INVALIDATION_FLAG_SCROLL_BAR_FACTORY=y.CUSTOM("scrollBarFactory");Bb.defaultScrollBarXFactory=Kc.withClass(fh);Bb.defaultScrollBarYFactory=
Kc.withClass(eh);le.__meta__={obj:{defaultXmlProperty:["xmlContent"]}};Yh.__meta__={fields:{glProgram:{SuppressWarnings:["checkstyle:Dynamic"]}}};va.graphics=new H;va.texts=new H;hf.__meta__={obj:{defaultXmlProperty:["xmlContent"]}};hf.POINTER_ID_MOUSE=-1E3;hf.defaultDividerFactory=Kc.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});Hl.MODEWARN="warn";Hl.MODECONFIRM="confirm";wi.CHILD_VARIANT_LIST_VIEW=
"textEditor_listView";fa.__meta__={obj:{defaultXmlProperty:["text"]}};fa.VARIANT_HEADING="heading";fa.VARIANT_DETAIL="detail";fa.VARIANT_DANGER="danger";Dc.__meta__={obj:{defaultXmlProperty:["dataProvider"]}};Dc.VARIANT_BORDERLESS="borderless";Dc.VARIANT_BORDER="border";Dc.VARIANT_POP_UP="popUp";Dc.CHILD_VARIANT_ITEM_RENDERER="listView_itemRenderer";Dc.DEFAULT_DRAG_FORMAT_ITEMS="items";Dc.INVALIDATION_FLAG_ITEM_RENDERER_FACTORY=y.CUSTOM("itemRendererFactory");Dc.RESET_ITEM_STATE=new Pl;fe.__meta__=
{obj:{defaultXmlProperty:["dataProvider"]}};fe.INVALIDATION_FLAG_BUTTON_FACTORY=y.CUSTOM("buttonFactory");fe.INVALIDATION_FLAG_LIST_VIEW_FACTORY=y.CUSTOM("listViewFactory");fe.CHILD_VARIANT_BUTTON="popUpListView_button";fe.CHILD_VARIANT_LIST_VIEW="popUpListView_listView";fe.defaultButtonFactory=Kc.withClass(Wb);fe.defaultListViewFactory=Kc.withClass(Dc);Zd.__meta__={obj:{defaultXmlProperty:["content"]}};Zd.INVALIDATION_FLAG_ORIGIN=y.CUSTOM("origin");Ye.__meta__={obj:{defaultXmlProperty:["text"]}};
Ye.VARIANT_DANGER="danger";pd.__meta__={obj:{defaultXmlProperty:["text"]},fields:{setSkinForState:{style:null},setTextFormatForState:{style:null}}};pd.INVALIDATION_FLAG_ERROR_CALLOUT_FACTORY=y.CUSTOM("errorCalloutFactory");pd.VARIANT_SEARCH="search";pd.CHILD_VARIANT_ERROR_CALLOUT="textInput_errorCallout";pd.defaultErrorCalloutFactory=Kc.withClass(Ye);Ze.__meta__={obj:{defaultXmlProperty:["dataProvider"]}};Ze.INVALIDATION_FLAG_BUTTON_FACTORY=y.CUSTOM("buttonFactory");Ze.CHILD_VARIANT_BUTTON="buttonBar_button";
Ze.RESET_BUTTON_STATE=new op;Hd.INVALIDATION_FLAG_BUTTON_BAR_FACTORY=y.CUSTOM("buttonBarFactory");Hd.INVALIDATION_FLAG_HEADER_FACTORY=y.CUSTOM("headerFactory");Hd.INVALIDATION_FLAG_MESSAGE_LABEL_FACTORY=y.CUSTOM("messageLabelFactory");Hd.CHILD_VARIANT_HEADER="alert_header";Hd.CHILD_VARIANT_MESSAGE_LABEL="alert_messageLabel";Hd.CHILD_VARIANT_BUTTON_BAR="alert_buttonBar";Hd.defaultButtonBarFactory=Kc.withClass(Ze);Hd.defaultHeaderFactory=Kc.withClass(Si);Hd.defaultMessageLabelFactory=Kc.withClass(fa);
zi.__meta__={fields:{setSkinForState:{style:null}}};ed.__meta__={obj:{defaultXmlProperty:["text"]},fields:{setTextFormatForState:{style:null},setIconForState:{style:null}}};Hh.__meta__={obj:{defaultXmlProperty:["content"]}};Hh.INVALIDATION_FLAG_HEADER_FACTORY=y.CUSTOM("headerFactory");Hh.CHILD_VARIANT_HEADER="collapsible_header";Hh.defaultHeaderFactory=Kc.withClass(ed);Sd.__meta__={obj:{defaultXmlProperty:["dataProvider"]}};Sd.INVALIDATION_FLAG_BUTTON_FACTORY=y.CUSTOM("buttonFactory");Sd.INVALIDATION_FLAG_TEXT_INPUT_FACTORY=
y.CUSTOM("textInputFactory");Sd.INVALIDATION_FLAG_LIST_VIEW_FACTORY=y.CUSTOM("listViewFactory");Sd.CHILD_VARIANT_BUTTON="comboBox_button";Sd.CHILD_VARIANT_TEXT_INPUT="comboBox_textInput";Sd.CHILD_VARIANT_LIST_VIEW="comboBox_listView";Sd.defaultButtonFactory=Kc.withClass(Wb);Sd.defaultTextInputFactory=Kc.withClass(pd);Sd.defaultListViewFactory=Kc.withClass(Dc);Lb.INVALIDATION_FLAG_MONTH_TITLE_VIEW_FACTORY=y.CUSTOM("monthTitleViewFactory");Lb.INVALIDATION_FLAG_DECREMENT_MONTH_BUTTON_FACTORY=y.CUSTOM("decrementMonthButtonFactory");
Lb.INVALIDATION_FLAG_INCREMENT_MONTH_BUTTON_FACTORY=y.CUSTOM("incrementMonthButtonFactory");Lb.INVALIDATION_FLAG_DECREMENT_YEAR_BUTTON_FACTORY=y.CUSTOM("decrementYearButtonFactory");Lb.INVALIDATION_FLAG_INCREMENT_YEAR_BUTTON_FACTORY=y.CUSTOM("incrementYearButtonFactory");Lb.INVALIDATION_FLAG_DATE_RENDERER_FACTORY=y.CUSTOM("dateRendererFactory");Lb.INVALIDATION_FLAG_WEEKDAY_LABEL_FACTORY=y.CUSTOM("weekdayLabelFactory");Lb.RESET_ITEM_STATE=new vt;Lb.CHILD_VARIANT_DATE_RENDERER="datePicker_dateRenderer";
Lb.CHILD_VARIANT_MUTED_DATE_RENDERER="datePicker_mutedDateRenderer";Lb.CHILD_VARIANT_DECREMENT_MONTH_BUTTON="datePicker_decrementMonthButton";Lb.CHILD_VARIANT_INCREMENT_MONTH_BUTTON="datePicker_incrementMonthButton";Lb.CHILD_VARIANT_DECREMENT_YEAR_BUTTON="datePicker_decrementYearButton";Lb.CHILD_VARIANT_INCREMENT_YEAR_BUTTON="datePicker_incrementYearButton";Lb.CHILD_VARIANT_MONTH_TITLE_VIEW="datePicker_monthTitleView";Lb.CHILD_VARIANT_WEEKDAY_LABEL="datePicker_weekdayLabel";Lb.defaultDecrementMonthButtonFactory=
Kc.withClass(Wb);Lb.defaultIncrementMonthButtonFactory=Kc.withClass(Wb);Lb.defaultDecrementYearButtonFactory=Kc.withClass(Wb);Lb.defaultIncrementYearButtonFactory=Kc.withClass(Wb);Lb.defaultMonthTitleViewFactory=Kc.withClass(fa);Lb.defaultWeekdayLabelFactory=Kc.withClass(fa);$i.__meta__={obj:{defaultXmlProperty:["content"]}};rc.__meta__={obj:{defaultXmlProperty:["dataProvider"]}};rc.VARIANT_BORDERLESS="borderless";rc.VARIANT_BORDER="border";rc.CHILD_VARIANT_CELL_RENDERER="gridView_cellRenderer";rc.CHILD_VARIANT_HEADER_RENDERER=
"gridView_headerRenderer";rc.CHILD_VARIANT_HEADER_DIVIDER="gridView_headerDivider";rc.CHILD_VARIANT_COLUMN_DIVIDER="gridView_columnDivider";rc.DEFAULT_DRAG_FORMAT_ITEMS="items";rc.INVALIDATION_FLAG_ROW_RENDERER_FACTORY=y.CUSTOM("rowRendererFactory");rc.INVALIDATION_FLAG_HEADER_RENDERER_FACTORY=y.CUSTOM("headerRendererFactory");rc.INVALIDATION_FLAG_HEADER_DIVIDER_FACTORY=y.CUSTOM("headerDividerFactory");rc.INVALIDATION_FLAG_COLUMN_DIVIDER_FACTORY=y.CUSTOM("columnDividerFactory");rc.RESET_HEADER_STATE=
new xt;rc.RESET_ROW_STATE=new yt;rc.POINTER_ID_MOUSE=-1E3;Wc.__meta__={obj:{defaultXmlProperty:["dataProvider"]}};Wc.CHILD_VARIANT_HEADER_RENDERER="groupListView_headerRenderer";Wc.CHILD_VARIANT_ITEM_RENDERER="groupListView_itemRenderer";Wc.VARIANT_BORDERLESS="borderless";Wc.VARIANT_BORDER="border";Wc.INVALIDATION_FLAG_ITEM_RENDERER_FACTORY=y.CUSTOM("itemRendererFactory");Wc.INVALIDATION_FLAG_HEADER_RENDERER_FACTORY=y.CUSTOM("headerRendererFactory");Wc.RESET_ITEM_STATE=new vp;qd.INVALIDATION_FLAG_DECREMENT_BUTTON_FACTORY=
y.CUSTOM("decrementButtonFactory");qd.INVALIDATION_FLAG_INCREMENT_BUTTON_FACTORY=y.CUSTOM("incrementButtonFactory");qd.INVALIDATION_FLAG_TEXT_INPUT_FACTORY=y.CUSTOM("textInputFactory");qd.CHILD_VARIANT_DECREMENT_BUTTON="numericStepper_decrementButton";qd.CHILD_VARIANT_INCREMENT_BUTTON="numericStepper_incrementButton";qd.CHILD_VARIANT_TEXT_INPUT="numericStepper_textInput";qd.defaultDecrementButtonFactory=Kc.withClass(Wb);qd.defaultIncrementButtonFactory=Kc.withClass(Wb);qd.defaultTextInputFactory=
Kc.withClass(pd);jh.INVALIDATION_FLAG_TOGGLE_BUTTON_FACTORY=y.CUSTOM("toggleButtonFactory");jh.CHILD_VARIANT_TOGGLE_BUTTON="pageIndicator_toggleButton";$d.INVALIDATION_FLAG_BUTTON_FACTORY=y.CUSTOM("buttonFactory");$d.INVALIDATION_FLAG_TEXT_INPUT_FACTORY=y.CUSTOM("textInputFactory");$d.INVALIDATION_FLAG_DATE_PICKER_FACTORY=y.CUSTOM("datePickerFactory");$d.CHILD_VARIANT_BUTTON="popUpDatePicker_button";$d.CHILD_VARIANT_TEXT_INPUT="popUpDatePicker_textInput";$d.CHILD_VARIANT_DATE_PICKER="popUpDatePicker_datePicker";
$d.defaultButtonFactory=Kc.withClass(Wb);$d.defaultTextInputFactory=Kc.withClass(pd);$d.defaultDatePickerFactory=Kc.withClass(Lb);vj.defaultRadioGroup=new yp;Ne.__meta__={obj:{defaultXmlProperty:["dataProvider"]}};Ne.INVALIDATION_FLAG_TAB_FACTORY=y.CUSTOM("tabFactory");Ne.CHILD_VARIANT_TAB="tabBar_tab";Ne.RESET_TAB_STATE=new zp;sf.__meta__={obj:{defaultXmlProperty:["text"]},fields:{setSkinForState:{style:null},setTextFormatForState:{style:null}}};sf.INVALIDATION_FLAG_ERROR_CALLOUT_FACTORY=y.CUSTOM("errorCalloutFactory");
sf.CHILD_VARIANT_ERROR_CALLOUT="textArea_errorCallout";sf.defaultErrorCalloutFactory=Kc.withClass(Ye);Ac.__meta__={obj:{defaultXmlProperty:["dataProvider"]}};Ac.VARIANT_BORDERLESS="borderless";Ac.VARIANT_BORDER="border";Ac.CHILD_VARIANT_CELL_RENDERER="treeGridView_cellRenderer";Ac.CHILD_VARIANT_HEADER_RENDERER="treeGridView_headerRenderer";Ac.CHILD_VARIANT_HEADER_DIVIDER="treeGridView_headerDivider";Ac.CHILD_VARIANT_COLUMN_DIVIDER="treeGridView_columnDivider";Ac.INVALIDATION_FLAG_ROW_RENDERER_FACTORY=
y.CUSTOM("rowRendererFactory");Ac.INVALIDATION_FLAG_HEADER_RENDERER_FACTORY=y.CUSTOM("headerRendererFactory");Ac.INVALIDATION_FLAG_HEADER_DIVIDER_FACTORY=y.CUSTOM("headerDividerFactory");Ac.INVALIDATION_FLAG_COLUMN_DIVIDER_FACTORY=y.CUSTOM("columnDividerFactory");Ac.RESET_HEADER_STATE=new Bt;Ac.RESET_ROW_STATE=new Ct;Ac.POINTER_ID_MOUSE=-1E3;he.__meta__={obj:{defaultXmlProperty:["dataProvider"]}};he.VARIANT_BORDERLESS="borderless";he.VARIANT_BORDER="border";he.CHILD_VARIANT_ITEM_RENDERER="treeView_itemRenderer";
he.INVALIDATION_FLAG_ITEM_RENDERER_FACTORY=y.CUSTOM("itemRendererFactory");he.RESET_ITEM_STATE=new Cp;gg.INVALIDATION_FLAG_CELL_RENDERER_FACTORY=y.CUSTOM("cellRendererFactory");gg.RESET_CELL_STATE=new Ep;Rc.__meta__={fields:{setSecondaryTextFormatForState:{style:null}}};Mf.INVALIDATION_FLAG_DISCLOSURE_BUTTON_FACTORY=y.CUSTOM("disclosureButtonFactory");Mf.defaultDisclosureButtonFactory=Kc.withClass(ed);Mf.VARIANT_FILE_SYSTEM="fileSystem";Mf.CHILD_VARIANT_DISCLOSURE_BUTTON="hierarchicalItemRenderer_disclosureButton";
Tl.__meta__={fields:{setSkinForState:{style:null}}};bg.INVALIDATION_FLAG_CELL_RENDERER_FACTORY=y.CUSTOM("cellRendererFactory");bg.RESET_CELL_STATE=new Hm;Dg.internalIDCounter=0;Jh.__meta__={obj:{defaultXmlProperty:["dataProvider"]}};Jh.INVALIDATION_FLAG_PAGE_INDICATOR_FACTORY=y.CUSTOM("pageIndicatorFactory");Jh.CHILD_VARIANT_PAGE_INDICATOR="pageNavigator_pageIndicator";Jh.defaultPageIndicatorFactory=Kc.withClass(jh);sg.internalIDCounter=0;gh.__meta__={obj:{defaultXmlProperty:["dataProvider"]}};gh.INVALIDATION_FLAG_TAB_BAR_FACTORY=
y.CUSTOM("tabBarFactory");gh.CHILD_VARIANT_TAB_BAR="tabNavigator_tabBar";gh.defaultTabBarFactory=Kc.withClass(Ne);Vl.WRAP_OBJECT_HIGH_TAB_INDEX=2147483647;el.CHILD_VARIANT_TOOL_TIP="toolTip";Ed.stageToManager=new Ta;Ed._focusManagerFactory=Ed.defaultFocusManagerFactory;Aa.stageToManager=new Ta;ee._toolTipManagerFactory=ee.defaultToolTipManagerFactory;ee.stageToManager=new Ta;kk.STAGE_TO_VALIDATION_QUEUE=new Ta;fg.__meta__={obj:{defaultXmlProperty:["array"]}};gb._dropTargetLocalX=0;gb._dropTargetLocalY=
0;gb._dragAvatarOffsetX=0;gb.dragAvatarOffsetX=1;gb.dragAvatarOffsetY=1;gb.dropAccepted=!1;gb._oldDragAvatarMouseEnabled=!1;gb._oldDragAvatarMouseChildren=!1;Tj.ITEM_TRIGGER="itemTrigger";Tj._pool=new dc(function(){return new Tj(null,null)},function(a){a.target=null;a.currentTarget=null;a.__preventDefault=!1;a.__isCanceled=!1;a.__isCanceledNow=!1;a.state=null});Zi.ITEM_TRIGGER="itemTrigger";Zi._pool=new dc(function(){return new Zi(null,null)},function(a){a.target=null;a.currentTarget=null;a.__preventDefault=
!1;a.__isCanceled=!1;a.__isCanceledNow=!1;a.state=null});cg.DRAG_START="dragStart";cg.DRAG_COMPLETE="dragComplete";cg.DRAG_ENTER="dragEnter";cg.DRAG_MOVE="dragMove";cg.DRAG_EXIT="dragExit";cg.DRAG_DROP="dragDrop";cg._pool=new dc(function(){return new cg(null,null,!1)},function(a){a.target=null;a.currentTarget=null;a.__preventDefault=!1;a.__isCanceled=!1;a.__isCanceledNow=!1});X.INITIALIZE="initialize";X.CREATION_COMPLETE="creationComplete";X.LAYOUT_DATA_CHANGE="layoutDataChange";X.STATE_CHANGE="stateChange";
X.OPENING="opening";X.CLOSING="closing";X.ENABLE="enable";X.DISABLE="disable";X._pool=new dc(function(){return new X(null,!1,!1)},function(a){a.target=null;a.currentTarget=null;a.__preventDefault=!1;a.__isCanceled=!1;a.__isCanceledNow=!1});Nd.ADD_ITEM="addItem";Nd.REMOVE_ITEM="removeItem";Nd.REPLACE_ITEM="replaceItem";Nd.UPDATE_ITEM="updateItem";Nd.UPDATE_ALL="updateAll";Nd.RESET="reset";Nd.REMOVE_ALL="removeAll";Nd.FILTER_CHANGE="filterChange";Nd.SORT_CHANGE="sortChange";Nd._pool=new dc(function(){return new Nd(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});Uj.SUBMIT="submit";Uj._pool=new dc(function(){return new Uj(null)},function(a){a.target=null;a.currentTarget=null;a.__preventDefault=!1;a.__isCanceled=!1;a.__isCanceledNow=!1});Lf.CELL_TRIGGER="cellTrigger";Lf.HEADER_TRIGGER="headerTrigger";Lf._cellPool=new dc(function(){return new Lf(null,null)},function(a){a.target=null;a.currentTarget=null;
a.__preventDefault=!1;a.__isCanceled=!1;a.__isCanceledNow=!1;a.state=null});Lf._headerPool=new dc(function(){return new Lf(null,null)},function(a){a.target=null;a.currentTarget=null;a.__preventDefault=!1;a.__isCanceled=!1;a.__isCanceledNow=!1;a.state=null});Ai.ITEM_TRIGGER="itemTrigger";Ai._pool=new dc(function(){return new Ai(null,null)},function(a){a.target=null;a.currentTarget=null;a.__preventDefault=!1;a.__isCanceled=!1;a.__isCanceledNow=!1;a.state=null});Pg.ADD_ITEM="addItem";Pg.REMOVE_ITEM=
"removeItem";Pg.REPLACE_ITEM="replaceItem";Pg.UPDATE_ITEM="updateItem";Pg.UPDATE_ALL="updateAll";Pg.RESET="reset";Pg.REMOVE_ALL="removeAll";Pg.FILTER_CHANGE="filterChange";Pg.SORT_CHANGE="sortChange";Pg._pool=new dc(function(){return new Pg(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});di.ITEM_TRIGGER="itemTrigger";di._pool=new dc(function(){return new di(null,null)},
function(a){a.target=null;a.currentTarget=null;a.__preventDefault=!1;a.__isCanceled=!1;a.__isCanceledNow=!1;a.state=null});Kd.SCROLL_START="scrollStart";Kd.SCROLL_COMPLETE="scrollComplete";Kd.SCROLL="scroll";Kd._pool=new dc(function(){return new Kd(null,!1,!1)},function(a){a.target=null;a.currentTarget=null;a.__preventDefault=!1;a.__isCanceled=!1;a.__isCanceledNow=!1});Ch.STYLES_CHANGE="stylesChange";Ch._pool=new dc(function(){return new Ch(null,null)},function(a){a.target=null;a.currentTarget=null;
a.__preventDefault=!1;a.__isCanceled=!1;a.__isCanceledNow=!1;a.affectsTarget=null});Vj.ITEM_TRIGGER="itemTrigger";Vj._pool=new dc(function(){return new Vj(null,null)},function(a){a.target=null;a.currentTarget=null;a.__preventDefault=!1;a.__isCanceled=!1;a.__isCanceledNow=!1;a.state=null});ei.TRANSITION_START="transitionStart";ei.TRANSITION_COMPLETE="transitionComplete";ei.TRANSITION_CANCEL="transitionCancel";ei._pool=new dc(function(){return new ei(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});Og.ITEM_TRIGGER="itemTrigger";Og.BRANCH_OPEN="branchOpen";Og.BRANCH_CLOSE="branchClose";Og._pool=new dc(function(){return new Og(null,null)},function(a){a.target=null;a.currentTarget=null;a.__preventDefault=!1;a.__isCanceled=!1;a.__isCanceledNow=!1;a.state=null});of.TRIGGER="trigger";of._pool=new dc(function(){return new of(null)},function(a){a.target=null;a.currentTarget=
null;a.__preventDefault=!1;a.__isCanceled=!1;a.__isCanceledNow=!1;a.relatedObject=null});Vd.actuators=[];Vd.actuatorsLength=0;Vd.addedEvent=!1;wj.VIEW_REQUIRED_ERROR="Cannot transition if both old view and new view are null.";bl.MONTH_NUMBER_OF_DAYS=[31,28,31,30,31,30,31,31,30,31,30,31];bl.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)";pg.MINIMUM_VELOCITY=.02;pg.POINTER_ID_MOUSE=
-1E3;Rd.stageToObject=new Ta;Vi.MINIMUM_VELOCITY=.02;Vi.POINTER_ID_MOUSE=-1E3;Zz._mul=Math.imul!=null?Math.imul:function(a,b){return a*(b&65535)+(a*(b>>>16)<<16|0)|0};Eg.USE_CACHE=!1;Eg.USE_ENUM_INDEX=!1;Eg.BASE64="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789%:";Rg.DEFAULT_RESOLVER=new Ot;Rg.BASE64="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789%:";mc.BLOCK_SIZE=16;pi.CHARS="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";pi.BYTES=Na.ofString(pi.CHARS);
Lh.BLOCK_SIZE=16;cc.AES_BLOCK_SIZE=16;cc.NONCE_SIZE=12;cc.E=new Jb(-520093696,0);pf.i64tmp=new Jb(0,0);pf.helper=new DataView(new ArrayBuffer(8));Dl.escapes=function(a){a=new H;a.h.lt="<";a.h.gt=">";a.h.amp="&";a.h.quot='"';a.h.apos="'";return a}(this);Sg.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];Sg.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];Sg.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];Sg.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];Sg.CODE_LENGTHS_POS=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];An.p1=0;An.tokenMin=0;An.tokenMax=0;Zb.OPTION_REVOKE_URL=1;Zb.activeRequests=0;Zb.requestLimit=17;Zb.requestQueue=new jb;Rm.PROTOTYPE_FIELD="__prototype__";Rm.SKIP_FIELD="__skipPrototype__";Rm.RESTORE_FIELD="__restoreFlag__";$b.__current=new $b(wa.location.href);
$b.__isWorker=typeof window=="undefined";$b.__messages=new jb;$b.__resolveMethods=new jb;$b.__workerCount=0;uc.dummyCharacter="\u007f";uc.windowID=0;yj.DICTIONARY="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");yj.EXTENDED_DICTIONARY=function(a){a=[];for(var b=0,c=yj.DICTIONARY;b<c.length;){var d=c[b];++b;for(var f=0,g=yj.DICTIONARY;f<g.length;){var h=g[f];++f;a.push(d+h)}}return a}(this);hi.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];hi.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];xb.__identity=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];T.NONE=0;T.FALSE=0;T.TRUE=1;T.SOURCE_RELATIVE=514;T.CONE_INNER_ANGLE=4097;T.CONE_OUTER_ANGLE=4098;T.PITCH=4099;T.POSITION=4100;T.DIRECTION=4101;T.VELOCITY=4102;T.LOOPING=4103;T.BUFFER=4105;T.GAIN=4106;T.MIN_GAIN=
4109;T.MAX_GAIN=4110;T.ORIENTATION=4111;T.SOURCE_STATE=4112;T.INITIAL=4113;T.PLAYING=4114;T.PAUSED=4115;T.STOPPED=4116;T.BUFFERS_QUEUED=4117;T.BUFFERS_PROCESSED=4118;T.REFERENCE_DISTANCE=4128;T.ROLLOFF_FACTOR=4129;T.CONE_OUTER_GAIN=4130;T.MAX_DISTANCE=4131;T.SEC_OFFSET=4132;T.SAMPLE_OFFSET=4133;T.BYTE_OFFSET=4134;T.SOURCE_TYPE=4135;T.STATIC=4136;T.STREAMING=4137;T.UNDETERMINED=4144;T.FORMAT_MONO8=4352;T.FORMAT_MONO16=4353;T.FORMAT_STEREO8=4354;T.FORMAT_STEREO16=4355;T.FREQUENCY=8193;T.BITS=8194;T.CHANNELS=
8195;T.SIZE=8196;T.NO_ERROR=0;T.INVALID_NAME=40961;T.INVALID_ENUM=40962;T.INVALID_VALUE=40963;T.INVALID_OPERATION=40964;T.OUT_OF_MEMORY=40965;T.VENDOR=45057;T.VERSION=45058;T.RENDERER=45059;T.EXTENSIONS=45060;T.DOPPLER_FACTOR=49152;T.SPEED_OF_SOUND=49155;T.DOPPLER_VELOCITY=49153;T.DISTANCE_MODEL=53248;T.INVERSE_DISTANCE=53249;T.INVERSE_DISTANCE_CLAMPED=53250;T.LINEAR_DISTANCE=53251;T.LINEAR_DISTANCE_CLAMPED=53252;T.EXPONENT_DISTANCE=53253;T.EXPONENT_DISTANCE_CLAMPED=53254;T.METERS_PER_UNIT=131076;
T.DIRECT_FILTER=131077;T.AUXILIARY_SEND_FILTER=131078;T.AIR_ABSORPTION_FACTOR=131079;T.ROOM_ROLLOFF_FACTOR=131080;T.CONE_OUTER_GAINHF=131081;T.DIRECT_FILTER_GAINHF_AUTO=131082;T.AUXILIARY_SEND_FILTER_GAIN_AUTO=131083;T.AUXILIARY_SEND_FILTER_GAINHF_AUTO=131084;T.REVERB_DENSITY=1;T.REVERB_DIFFUSION=2;T.REVERB_GAIN=3;T.REVERB_GAINHF=4;T.REVERB_DECAY_TIME=5;T.REVERB_DECAY_HFRATIO=6;T.REVERB_REFLECTIONS_GAIN=7;T.REVERB_REFLECTIONS_DELAY=8;T.REVERB_LATE_REVERB_GAIN=9;T.REVERB_LATE_REVERB_DELAY=10;T.REVERB_AIR_ABSORPTION_GAINHF=
11;T.REVERB_ROOM_ROLLOFF_FACTOR=12;T.REVERB_DECAY_HFLIMIT=13;T.EAXREVERB_DENSITY=1;T.EAXREVERB_DIFFUSION=2;T.EAXREVERB_GAIN=3;T.EAXREVERB_GAINHF=4;T.EAXREVERB_GAINLF=5;T.EAXREVERB_DECAY_TIME=6;T.EAXREVERB_DECAY_HFRATIO=7;T.EAXREVERB_DECAY_LFRATIO=8;T.EAXREVERB_REFLECTIONS_GAIN=9;T.EAXREVERB_REFLECTIONS_DELAY=10;T.EAXREVERB_REFLECTIONS_PAN=11;T.EAXREVERB_LATE_REVERB_GAIN=12;T.EAXREVERB_LATE_REVERB_DELAY=13;T.EAXREVERB_LATE_REVERB_PAN=14;T.EAXREVERB_ECHO_TIME=15;T.EAXREVERB_ECHO_DEPTH=16;T.EAXREVERB_MODULATION_TIME=
17;T.EAXREVERB_MODULATION_DEPTH=18;T.EAXREVERB_AIR_ABSORPTION_GAINHF=19;T.EAXREVERB_HFREFERENCE=20;T.EAXREVERB_LFREFERENCE=21;T.EAXREVERB_ROOM_ROLLOFF_FACTOR=22;T.EAXREVERB_DECAY_HFLIMIT=23;T.CHORUS_WAVEFORM=1;T.CHORUS_PHASE=2;T.CHORUS_RATE=3;T.CHORUS_DEPTH=4;T.CHORUS_FEEDBACK=5;T.CHORUS_DELAY=6;T.DISTORTION_EDGE=1;T.DISTORTION_GAIN=2;T.DISTORTION_LOWPASS_CUTOFF=3;T.DISTORTION_EQCENTER=4;T.DISTORTION_EQBANDWIDTH=5;T.ECHO_DELAY=1;T.ECHO_LRDELAY=2;T.ECHO_DAMPING=3;T.ECHO_FEEDBACK=4;T.ECHO_SPREAD=5;
T.FLANGER_WAVEFORM=1;T.FLANGER_PHASE=2;T.FLANGER_RATE=3;T.FLANGER_DEPTH=4;T.FLANGER_FEEDBACK=5;T.FLANGER_DELAY=6;T.FREQUENCY_SHIFTER_FREQUENCY=1;T.FREQUENCY_SHIFTER_LEFT_DIRECTION=2;T.FREQUENCY_SHIFTER_RIGHT_DIRECTION=3;T.VOCAL_MORPHER_PHONEMEA=1;T.VOCAL_MORPHER_PHONEMEA_COARSE_TUNING=2;T.VOCAL_MORPHER_PHONEMEB=3;T.VOCAL_MORPHER_PHONEMEB_COARSE_TUNING=4;T.VOCAL_MORPHER_WAVEFORM=5;T.VOCAL_MORPHER_RATE=6;T.PITCH_SHIFTER_COARSE_TUNE=1;T.PITCH_SHIFTER_FINE_TUNE=2;T.RING_MODULATOR_FREQUENCY=1;T.RING_MODULATOR_HIGHPASS_CUTOFF=
2;T.RING_MODULATOR_WAVEFORM=3;T.AUTOWAH_ATTACK_TIME=1;T.AUTOWAH_RELEASE_TIME=2;T.AUTOWAH_RESONANCE=3;T.AUTOWAH_PEAK_GAIN=4;T.COMPRESSOR_ONOFF=1;T.EQUALIZER_LOW_GAIN=1;T.EQUALIZER_LOW_CUTOFF=2;T.EQUALIZER_MID1_GAIN=3;T.EQUALIZER_MID1_CENTER=4;T.EQUALIZER_MID1_WIDTH=5;T.EQUALIZER_MID2_GAIN=6;T.EQUALIZER_MID2_CENTER=7;T.EQUALIZER_MID2_WIDTH=8;T.EQUALIZER_HIGH_GAIN=9;T.EQUALIZER_HIGH_CUTOFF=10;T.EFFECT_FIRST_PARAMETER=0;T.EFFECT_LAST_PARAMETER=32768;T.EFFECT_TYPE=32769;T.EFFECT_NULL=0;T.EFFECT_EAXREVERB=
32768;T.EFFECT_REVERB=1;T.EFFECT_CHORUS=2;T.EFFECT_DISTORTION=3;T.EFFECT_ECHO=4;T.EFFECT_FLANGER=5;T.EFFECT_FREQUENCY_SHIFTER=6;T.EFFECT_VOCAL_MORPHER=7;T.EFFECT_PITCH_SHIFTER=8;T.EFFECT_RING_MODULATOR=9;T.FFECT_AUTOWAH=10;T.EFFECT_AUTOWAH=10;T.EFFECT_COMPRESSOR=11;T.EFFECT_EQUALIZER=12;T.EFFECTSLOT_EFFECT=1;T.EFFECTSLOT_GAIN=2;T.EFFECTSLOT_AUXILIARY_SEND_AUTO=3;T.LOWPASS_GAIN=1;T.LOWPASS_GAINHF=2;T.HIGHPASS_GAIN=1;T.HIGHPASS_GAINLF=2;T.BANDPASS_GAIN=1;T.BANDPASS_GAINLF=2;T.BANDPASS_GAINHF=3;T.FILTER_FIRST_PARAMETER=
0;T.FILTER_LAST_PARAMETER=32768;T.FILTER_TYPE=32769;T.FILTER_NULL=0;T.FILTER_LOWPASS=1;T.FILTER_HIGHPASS=2;T.FILTER_BANDPASS=3;Oc.FALSE=0;Oc.TRUE=1;Oc.FREQUENCY=4103;Oc.REFRESH=4104;Oc.SYNC=4105;Oc.MONO_SOURCES=4112;Oc.STEREO_SOURCES=4113;Oc.NO_ERROR=0;Oc.INVALID_DEVICE=40961;Oc.INVALID_CONTEXT=40962;Oc.INVALID_ENUM=40963;Oc.INVALID_VALUE=40964;Oc.OUT_OF_MEMORY=40965;Oc.ATTRIBUTES_SIZE=4098;Oc.ALL_ATTRIBUTES=4099;Oc.DEFAULT_DEVICE_SPECIFIER=4100;Oc.DEVICE_SPECIFIER=4101;Oc.EXTENSIONS=4102;Oc.ENUMERATE_ALL_EXT=
1;Oc.DEFAULT_ALL_DEVICES_SPECIFIER=4114;Oc.ALL_DEVICES_SPECIFIER=4115;Oe.onUpdate=new kf;Oe.__updated=!1;wg.alreadyCreated=new H;wg.initialized=!1;hj.sensorByID=new Qd;hj.sensors=[];Rb.__directories=new Qd;af.workLoad=.5;af.__totalWorkPriority=0;no.nextID=0;rf.devices=new Qd;rf.onConnect=new Yx;Se.devices=new Qd;Se.onConnect=new Zx;xc.NONE=0;xc.LEFT_SHIFT=1;xc.RIGHT_SHIFT=2;xc.LEFT_CTRL=64;xc.RIGHT_CTRL=128;xc.LEFT_ALT=256;xc.RIGHT_ALT=512;xc.LEFT_META=1024;xc.RIGHT_META=2048;xc.NUM_LOCK=4096;xc.CAPS_LOCK=
8192;xc.MODE=16384;xc.CTRL=192;xc.SHIFT=3;xc.ALT=768;xc.META=3072;Te.onCancel=new lo;Te.onEnd=new lo;Te.onMove=new lo;Te.onStart=new lo;rb.cache=new iy;rb.onChange=new kf;rb.bundlePaths=new H;rb.libraries=new H;rb.libraryPaths=new H;il.BYTES_PER_ELEMENT=4;Xb.throwErrors=!0;Ld.TEXT_CHANGE="textChange";Ld.ORIGIN_LOCAL="local";Ld.ORIGIN_UNDO="undo";Ld.ORIGIN_REMOTE="remote";Ol.SELECTION_CHANGE="selectionChange";wf.TOGGLE_BREAKPOINT="toggleBreakpoint";wf.SELECT_LINE="selectLine";kp.CHUNK_TIMESPAN=16;
Eh.SCROLL_THRESHOLD=10;Eh.SCROLL_INTERVAL=60;yb.CSS_TEXT=0;yb.CSS_PROPERTY=1;yb.CSS_VALUE=2;yb.CSS_STRING1=3;yb.CSS_STRING2=4;yb.CSS_STRING3=5;yb.CSS_STRING4=6;yb.CSS_COMMENT1=7;yb.CSS_COMMENT2=8;yb.CSS_COMMENT3=9;yb.CSS_MEDIA=10;yb.CSS_BRACEOPEN=11;yb.CSS_BRACECLOSE=12;yb.CSS_COLON1=13;yb.CSS_COLON2=14;yb.CSS_COLON3=15;yb.CSS_COLOR=16;yb.CSS_NUMBER=17;$c.JS_CODE=1;$c.JS_STRING1=2;$c.JS_STRING2=3;$c.JS_COMMENT=4;$c.JS_MULTILINE_COMMENT=5;$c.JS_REGULAR_EXPRESSION=6;$c.JS_NULL_KEYWORD=7;$c.JS_UNDEFINED_KEYWORD=
8;$c.JS_BOOLEAN_KEYWORD=7;$c.JS_KEYWORD=10;$c.JS_VAR_KEYWORD=11;$c.JS_FUNCTION_KEYWORD=12;$c.JS_TYPE_KEYWORD=13;Mn.TEXT=0;Md.DEFAULT_NON_WORD_CHARACTERS=" \t.:;,?+-*/%=!&|()[]{}<>".split("");mk.easeIn=new uu;mk.easeInOut=new vu;mk.easeOut=new wu;xa.defaultActuator=Vd;xa.defaultEase=mk.easeOut;xa.targetLibraries=new Ta;Uk.easeIn=new oq;Uk.easeInOut=new Bu;Uk.easeOut=new pq;Vk.easeIn=new Cu;Vk.easeInOut=new Du;Vk.easeOut=new Eu;oj.easeIn=new qq(.1,.4);oj.easeInOut=new rq(.1,.4);oj.easeOut=new sq(.1,
.4);Ui.easeIn=new Gu;Ui.easeInOut=new Hu;Ui.easeOut=new Iu;Ah.easeIn=new Ju;Ah.easeInOut=new Ku;Ah.easeOut=new Lu;Wk.easeIn=new Mu;Wk.easeInOut=new Nu;Wk.easeOut=new Ou;Xk.easeIn=new Pu;Xk.easeInOut=new Qu;Xk.easeOut=new Ru;La.__lastTimerID=0;La.__sentWarnings=new H;La.__timers=new Qd;La.__registeredClassAliases=new H;La.__registeredClasses=fA.toUtilsObjectMap(null);ll.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};ij.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]},
fields:{toJSON:{SuppressWarnings:["checkstyle:Dynamic"]}}};kj.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]},fields:{toJSON:{SuppressWarnings:["checkstyle:Dynamic"]},_:{SuppressWarnings:["checkstyle:Dynamic"]}}};lj.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]},fields:{toJSON:{SuppressWarnings:["checkstyle:Dynamic"]}}};jj.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]},fields:{toJSON:{SuppressWarnings:["checkstyle:Dynamic"]}}};Mi.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]},
fields:{concat:{SuppressWarnings:["checkstyle:Dynamic"]},toJSON:{SuppressWarnings:["checkstyle:Dynamic"]},_:{SuppressWarnings:["checkstyle:Dynamic"]}}};aj.__meta__={fields:{setDataHandler:{SuppressWarnings:["checkstyle:Dynamic"]}}};Oo.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};Ha.__pool=new dc(function(){return new Ha},function(a){a.setTo(0,0,0,0)});yc.__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"]}}};yc.VERTEX_BUFFER_STRIDE=14;yc.__tempVector=new Yf;yc.__fillRectRectangle=new Ha;Nh.__meta__={fields:{__context:{SuppressWarnings:["checkstyle:Dynamic"]},
__type:{SuppressWarnings:["checkstyle:Dynamic"]}}};Tu.__meta__={fields:{cairo:{SuppressWarnings:["checkstyle:Dynamic"]},__matrix3:{SuppressWarnings:["checkstyle:Dynamic"]},applyMatrix:{SuppressWarnings:["checkstyle:Dynamic"]},__setBlendModeCairo:{SuppressWarnings:["checkstyle:Dynamic"]},_:{SuppressWarnings:["checkstyle:Dynamic"]}}};ml.__meta__={fields:{context:{SuppressWarnings:["checkstyle:Dynamic"]},applySmoothing:{SuppressWarnings:["checkstyle:Dynamic"]},setTransform:{SuppressWarnings:["checkstyle:Dynamic"]},
__setBlendModeContext:{SuppressWarnings:["checkstyle:Dynamic"]},_:{SuppressWarnings:["checkstyle:Dynamic"]}}};oz.NONE=0;oz.ROUND=1;oz.SQUARE=2;Xu.__meta__={fields:{__element:{SuppressWarnings:["checkstyle:Dynamic"]},_:{SuppressWarnings:["checkstyle:Dynamic"]}}};uq.__meta__={fields:{element:{SuppressWarnings:["checkstyle:Dynamic"]},applyStyle:{SuppressWarnings:["checkstyle:Dynamic"]},clearStyle:{SuppressWarnings:["checkstyle:Dynamic"]},_:{SuppressWarnings:["checkstyle:Dynamic"]}}};Ic.__missingFontWarning=
new H;Th.__meta__={fields:{overrideBlendMode:{SuppressWarnings:["checkstyle:FieldDocComment"]}}};uo.SIN45=.7071067811865476;uo.TAN22=.41421356237309503;rz.BEVEL=0;rz.MITER=1;rz.ROUND=2;If.__meta__={fields:{__dispatchError:{SuppressWarnings:["checkstyle:Dynamic"]},Loader_onError:{SuppressWarnings:["checkstyle:Dynamic"]}}};bk.__meta__={statics:{create:{SuppressWarnings:["checkstyle:FieldDocComment"]}},fields:{parameters:{SuppressWarnings:["checkstyle:Dynamic"]}}};bk.__rootURL=hl.get_supported()?window.document.URL:
"";vc.__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"]}}};vc.__alphaValue=[1];vc.__colorMultipliersValue=[0,0,0,0];vc.__colorOffsetsValue=[0,0,0,0];vc.__defaultColorMultipliersValue=[1,1,1,1];vc.__emptyColorValue=[0,0,0,0];
vc.__emptyAlphaValue=[1];vc.__hasColorTransformValue=[!1];vc.__scissorRectangle=new Ha;vc.__textureSizeValue=[0,0];Wq.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]},fields:{onComplete:{SuppressWarnings:["checkstyle:Dynamic"]}}};ov.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};Ys.__meta__={fields:{index:{SuppressWarnings:["checkstyle:Dynamic"]},name:{SuppressWarnings:["checkstyle:FieldDocComment"]}}};Hn.__meta__={fields:{index:{SuppressWarnings:["checkstyle:Dynamic"]},
name:{SuppressWarnings:["checkstyle:FieldDocComment"]}}};dd.__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"]}}};dm.__meta__={fields:{data:{SuppressWarnings:["checkstyle:Dynamic"]}}};pv.__meta__=
{obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};tq.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]},fields:{_:{SuppressWarnings:["checkstyle:Dynamic"]}}};zo.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};qv.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};rv.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};sv.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};tv.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};
uv.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};cn.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]},statics:{renderTileContainer:{SuppressWarnings:["checkstyle:Dynamic"]}}};to.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};bm.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};qh.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]},fields:{o:{SuppressWarnings:["checkstyle:Dynamic"]}}};qh.empty=new qh;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 qh;C.strokeCommands=new qh;Dz.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};oa.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};Cj.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]},statics:{renderTileContainer:{SuppressWarnings:["checkstyle:Dynamic"]}}};
Xm.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};bj.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};mm.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};mm.MAX_INDEX_BUFFER_LENGTH=65535;mm.MAX_QUADS_PER_INDEX_BUFFER=10922;mm.MAX_QUAD_INDEX_BUFFER_LENGTH=65532;ol.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};Ga.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};Ga.blankBitmapData=new yc(1,1,!1,0);Ga.tempColorTransform=
new id(1,1,1,1,0,0,0,0);Ga.tempVerticesVector=ub.toFloatVector(null);Ga.tempIndicesVector=ub.toIntVector(null);Ga.tempUvtVector=ub.toFloatVector(null);Ym.opaqueBitmapData=new yc(1,1,!1,0);Kj.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};pl.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};Ja.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};cj.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};cj.__textureSizeValue=[0,0];ae.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};
oh.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};fj.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};ph.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};ph.__regexColor=new Xa("color=(\"#([^\"]+)\"|'#([^']+)')","i");ph.__regexFace=new Xa("face=(\"([^\"]+)\"|'([^']+)')","i");ph.__regexFont=new Xa("<font ([^>]+)>","gi");ph.__regexCloseFont=new Xa("</font>","gi");ph.__regexSize=new Xa("size=(\"([^\"]+)\"|'([^']+)')","i");zk.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};
nl.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};Dj.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]},fields:{obj:{SuppressWarnings:["checkstyle:Dynamic"]}}};nm.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};nn.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};nn.alphaColorTransform=new id;nn.bitmap=new Oa;nn.destPoint=new Ca;nn.sourceRect=new Ha;Wm.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]},statics:{P:{SuppressWarnings:["checkstyle:ConstantName"]}}};
Wm.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];on.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};bv.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]},fields:{overrideIntValues:{SuppressWarnings:["checkstyle:Dynamic"]}}};
Jq.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};hk.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};hk.drawCallsCounters=function(a){a=new Qd;var b=new Jq;a.h[0]=b;b=new Jq;a.h[1]=b;return a}(this);Yc.supportsVideoTexture=!0;Yc.__glDepthStencil=-1;Yc.__glMaxTextureMaxAnisotropy=-1;Yc.__glMaxViewportDims=-1;Yc.__glMemoryCurrentAvailable=-1;Yc.__glMemoryTotalAvailable=-1;Yc.__glTextureMaxAnisotropy=-1;Iz.DYNAMIC_DRAW=0;Iz.STATIC_DRAW=1;Jz.FRAGMENT=0;Jz.VERTEX=1;Mq.BGR_PACKED=
0;Mq.BGRA=1;Mq.BGRA_PACKED=2;Mq.COMPRESSED=3;Mq.COMPRESSED_ALPHA=4;Mq.RGBA_HALF_FLOAT=5;Dv.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};Nq.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};$g.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};$g.limitedProfile=!0;Go.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};Ev.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};Ho.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};
qn.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};Oq.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};Kq.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};nd.__meta__={fields:{__textureContext:{SuppressWarnings:["checkstyle:Dynamic"]},__getGLFramebuffer:{SuppressWarnings:["checkstyle:Dynamic"]}}};pn.__lowMemoryMode=!1;Ud.DEFAULT_TO_STRING="Error";zl.ACTIVITY="activity";Gg.LINK="link";Gg.TEXT_INPUT="textInput";xg.ERROR="error";Pq.ASYNC_ERROR="asyncError";
rn.DATA="data";rn.UPLOAD_COMPLETE_DATA="uploadCompleteData";Po.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};sm.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};sm.supportsWeakReference=Object.prototype.hasOwnProperty.call(wa,"WeakRef");Fj.FOCUS_IN="focusIn";Fj.FOCUS_OUT="focusOut";Fj.KEY_FOCUS_CHANGE="keyFocusChange";Fj.MOUSE_FOCUS_CHANGE="mouseFocusChange";Lj.FULL_SCREEN="fullScreen";Lj.FULL_SCREEN_INTERACTIVE_ACCEPTED="fullScreenInteractiveAccepted";Mk.DEVICE_ADDED=
"deviceAdded";Mk.DEVICE_REMOVED="deviceRemoved";Mk.DEVICE_UNUSABLE="deviceUnusable";om.HTTP_RESPONSE_STATUS="httpResponseStatus";om.HTTP_STATUS="httpStatus";Vh.IO_ERROR="ioError";$m.KEY_DOWN="keyDown";$m.KEY_UP="keyUp";Hc.CLICK="click";Hc.DOUBLE_CLICK="doubleClick";Hc.MIDDLE_CLICK="middleClick";Hc.MIDDLE_MOUSE_DOWN="middleMouseDown";Hc.MIDDLE_MOUSE_UP="middleMouseUp";Hc.MOUSE_DOWN="mouseDown";Hc.MOUSE_MOVE="mouseMove";Hc.MOUSE_OUT="mouseOut";Hc.MOUSE_OVER="mouseOver";Hc.MOUSE_UP="mouseUp";Hc.MOUSE_WHEEL=
"mouseWheel";Hc.RELEASE_OUTSIDE="releaseOutside";Hc.RIGHT_CLICK="rightClick";Hc.RIGHT_MOUSE_DOWN="rightMouseDown";Hc.RIGHT_MOUSE_UP="rightMouseUp";Hc.ROLL_OUT="rollOut";Hc.ROLL_OVER="rollOver";sn.NET_STATUS="netStatus";zh.PROGRESS="progress";zh.SOCKET_DATA="socketData";jk.CLEAR_DOM="clearDOM";jk.RENDER_CAIRO="renderCairo";jk.RENDER_CANVAS="renderCanvas";jk.RENDER_DOM="renderDOM";jk.RENDER_OPENGL="renderOpenGL";Io.SAMPLE_DATA="sampleData";Em.SECURITY_ERROR="securityError";an.ORIENTATION_CHANGE="orientationChange";
an.ORIENTATION_CHANGING="orientationChanging";Al.TIMER="timer";Al.TIMER_COMPLETE="timerComplete";Wf.__meta__={fields:{delta:{SuppressWarnings:["checkstyle:FieldDocComment"]}}};Wf.TOUCH_BEGIN="touchBegin";Wf.TOUCH_END="touchEnd";Wf.TOUCH_MOVE="touchMove";Wf.TOUCH_OUT="touchOut";Wf.TOUCH_OVER="touchOver";Wf.TOUCH_ROLL_OUT="touchRollOut";Wf.TOUCH_ROLL_OVER="touchRollOver";Wf.TOUCH_TAP="touchTap";Bl.UNCAUGHT_ERROR="uncaughtError";Jo.available=!0;Jo.marshallExceptions=!1;pj.__blurShader=new Fv;Il.__hideShader=
new Gv;me.__invertAlphaShader=new Mv;me.__blurAlphaShader=new Hv;me.__combineShader=new Jv;me.__innerCombineShader=new Lv;me.__combineKnockoutShader=new Iv;me.__innerCombineKnockoutShader=new Kv;Hf.__meta__={fields:{blendMode:{SuppressWarnings:["checkstyle:FieldDocComment"]}}};Cf.__meta__={statics:{create2D:{SuppressWarnings:["checkstyle:FieldDocComment"]},createABCD:{SuppressWarnings:["checkstyle:FieldDocComment"]},createOrtho:{SuppressWarnings:["checkstyle:FieldDocComment"]}}};tn.DEFAULT="i-default";
tn.RTL_LANGUAGES="ae ar arc bcc bqi ckb dv fa glk he ku mzn nqo pnb ps sd ug ur yi".split(" ");ri.__meta__={fields:{clone:{SuppressWarnings:["checkstyle:FieldDocComment"]}}};ue.MAX_ACTIVE_CHANNELS=32;ue.__soundChannels=[];ue.__soundTransform=new ri;Zo.VERTEX_BUFFER_STRIDE=5;Cn.__meta__={statics:{CONNECT_SUCCESS:{SuppressWarnings:["checkstyle:FieldDocComment"]}}};Cn.CONNECT_SUCCESS="NetConnection.Connect.Success";$o.__meta__={fields:{audioCodec:{SuppressWarnings:["checkstyle:FieldDocComment"]},decodedFrames:{SuppressWarnings:["checkstyle:FieldDocComment"]},
speed:{SuppressWarnings:["checkstyle:FieldDocComment"]},requestVideoStatus:{SuppressWarnings:["checkstyle:FieldDocComment"]}}};Xe.defaultObjectEncoding=10;pm.followRedirects=!0;pm.idleTimeout=0;pm.manageCookies=!0;vm.__meta__={statics:{__get:{SuppressWarnings:["checkstyle:FieldDocComment"]},__set:{SuppressWarnings:["checkstyle:FieldDocComment"]}}};wo.currentDomain=new wo(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];Rq.__meta__={obj:{SuppressWarnings:["checkstyle:UnnecessaryConstructor"]}};
Rq.currentDomain=new Rq;oe.__fontByName=new H;oe.__registeredFonts=[];ef.__meta__={fields:{clone:{SuppressWarnings:["checkstyle:FieldDocComment"]}}};Qk.CENTER=0;Qk.END=1;Qk.JUSTIFY=2;Qk.LEFT=3;Qk.RIGHT=4;Qk.START=5;Sq.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};My.__meta__={obj:{SuppressWarnings:[["checkstyle:FieldDocComment","checkstyle:Dynamic"]]}};ic.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};ic.__regexAlign=new Xa("align\\s?=\\s?(\"([^\"]+)\"|'([^']+)')",
"i");ic.__regexBreakTag=new Xa("<br\\s*/?>","gi");ic.__regexBlockIndent=new Xa("blockindent\\s?=\\s?(\"([^\"]+)\"|'([^']+)')","i");ic.__regexClass=new Xa("class\\s?=\\s?(\"([^\"]+)\"|'([^']+)')","i");ic.__regexColor=new Xa("color\\s?=\\s?(\"#([^\"]+)\"|'#([^']+)')","i");ic.__regexEntityApos=new Xa("&apos;","g");ic.__regexEntityNbsp=new Xa("&nbsp;","g");ic.__regexCharEntity=new Xa("&#(?:([0-9]+)|(x[0-9a-fA-F]+));","g");ic.__regexFace=new Xa("face\\s?=\\s?(\"([^\"]+)\"|'([^']+)')","i");ic.__regexHTMLTag=
new Xa("<.*?>","g");ic.__regexHref=new Xa("href\\s?=\\s?(\"([^\"]+)\"|'([^']+)')","i");ic.__regexIndent=new Xa(" indent\\s?=\\s?(\"([^\"]+)\"|'([^']+)')","i");ic.__regexLeading=new Xa("leading\\s?=\\s?(\"([^\"]+)\"|'([^']+)')","i");ic.__regexLeftMargin=new Xa("leftmargin\\s?=\\s?(\"([^\"]+)\"|'([^']+)')","i");ic.__regexRightMargin=new Xa("rightmargin\\s?=\\s?(\"([^\"]+)\"|'([^']+)')","i");ic.__regexSize=new Xa("size\\s?=\\s?(\"([^\"]+)\"|'([^']+)')","i");ic.__regexTabStops=new Xa("tabstops\\s?=\\s?(\"([^\"]+)\"|'([^']+)')",
"i");Ko.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};Uc.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]},fields:{__cairoFont:{SuppressWarnings:["checkstyle:Dynamic"]}}};Uc.GUTTER=2;Uc.UTF8_TAB=9;Uc.UTF8_ENDLINE=10;Uc.UTF8_SPACE=32;Uc.UTF8_HYPHEN=45;Uf.__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"]}}};Uf.FT_LOAD_DEFAULT=0;Uf.FT_LOAD_NO_SCALE=1;Uf.FT_LOAD_NO_HINTING=2;Uf.FT_LOAD_RENDER=4;Uf.FT_LOAD_NO_BITMAP=8;Uf.FT_LOAD_VERTICAL_LAYOUT=16;Uf.FT_LOAD_FORCE_AUTOHINT=32;Uf.FT_LOAD_CROP_BITMAP=64;Uf.FT_LOAD_PEDANTIC=128;Uf.FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH=256;Uf.FT_LOAD_NO_RECURSE=512;Uf.FT_LOAD_IGNORE_TRANSFORM=1024;Uf.FT_LOAD_MONOCHROME=2048;Uf.FT_LOAD_LINEAR_DESIGN=4096;Uf.FT_LOAD_NO_AUTOHINT=
8192;Uf.FT_LOAD_COLOR=16384;Uf.FT_LOAD_COMPUTE_METRICS=32768;Uf.FT_LOAD_BITMAP_METRICS_ONLY=65536;Uf.FT_LOAD_TARGET_NORMAL=0;Uf.FT_LOAD_TARGET_LIGHT=0;Nv.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};Sc.__meta__={fields:{addEventListener:{SuppressWarnings:["checkstyle:Dynamic"]}}};Sc.isSupported=!0;Sc.numDevices=0;Sc.__deviceList=[];Sc.__instances=[];Sc.__devices=new Ta;Ov.MAX_BUFFER_SIZE=32E3;Cb.__meta__={statics:{BREAK:{SuppressWarnings:["checkstyle:FieldDocComment"]},NUMLOCK:{SuppressWarnings:["checkstyle:FieldDocComment"]}}};
Cb.NUMBER_0=48;Cb.NUMBER_1=49;Cb.NUMBER_2=50;Cb.NUMBER_3=51;Cb.NUMBER_4=52;Cb.NUMBER_5=53;Cb.NUMBER_6=54;Cb.NUMBER_7=55;Cb.NUMBER_8=56;Cb.NUMBER_9=57;Cb.A=65;Cb.B=66;Cb.C=67;Cb.D=68;Cb.E=69;Cb.F=70;Cb.G=71;Cb.H=72;Cb.I=73;Cb.J=74;Cb.K=75;Cb.L=76;Cb.M=77;Cb.N=78;Cb.O=79;Cb.P=80;Cb.Q=81;Cb.R=82;Cb.S=83;Cb.T=84;Cb.U=85;Cb.V=86;Cb.W=87;Cb.X=88;Cb.Y=89;Cb.Z=90;Cb.NUMPAD_0=96;Cb.NUMPAD_1=97;Cb.NUMPAD_2=98;Cb.NUMPAD_3=99;Cb.NUMPAD_4=100;Cb.NUMPAD_5=101;Cb.NUMPAD_6=102;Cb.NUMPAD_7=103;Cb.NUMPAD_8=104;Cb.NUMPAD_9=
105;Cb.NUMPAD_MULTIPLY=106;Cb.NUMPAD_ADD=107;Cb.NUMPAD_ENTER=108;Cb.NUMPAD_SUBTRACT=109;Cb.NUMPAD_DECIMAL=110;Cb.NUMPAD_DIVIDE=111;Cb.F1=112;Cb.F2=113;Cb.F3=114;Cb.F4=115;Cb.F5=116;Cb.F6=117;Cb.F7=118;Cb.F8=119;Cb.F9=120;Cb.F10=121;Cb.F11=122;Cb.F12=123;Cb.F13=124;Cb.F14=125;Cb.F15=126;Cb.BACKSPACE=8;Cb.TAB=9;Cb.ALTERNATE=18;Cb.ENTER=13;Cb.COMMAND=15;Cb.SHIFT=16;Cb.CONTROL=17;Cb.BREAK=19;Cb.CAPS_LOCK=20;Cb.NUMPAD=21;Cb.ESCAPE=27;Cb.SPACE=32;Cb.PAGE_UP=33;Cb.PAGE_DOWN=34;Cb.END=35;Cb.HOME=36;Cb.LEFT=
37;Cb.RIGHT=39;Cb.UP=38;Cb.DOWN=40;Cb.INSERT=45;Cb.DELETE=46;Cb.NUMLOCK=144;Cb.SEMICOLON=186;Cb.EQUAL=187;Cb.COMMA=188;Cb.MINUS=189;Cb.PERIOD=190;Cb.SLASH=191;Cb.BACKQUOTE=192;Cb.LEFTBRACKET=219;Cb.BACKSLASH=220;Cb.RIGHTBRACKET=221;Cb.QUOTE=222;zd.supportsCursor=!0;zd.supportsNativeCursor=!0;zd.__cursor="auto";hh.ARROW="arrow";hh.AUTO="auto";hh.BUTTON="button";hh.HAND="hand";hh.IBEAM="ibeam";hh.__CROSSHAIR="crosshair";hh.__CUSTOM="custom";hh.__MOVE="move";hh.__RESIZE_NESW="resize_nesw";hh.__RESIZE_NS=
"resize_ns";hh.__RESIZE_NWSE="resize_nwse";hh.__RESIZE_WE="resize_we";hh.__WAIT="wait";hh.__WAIT_ARROW="waitarrow";ta.__meta__={obj:{SuppressWarnings:[["checkstyle:ConstantName","checkstyle:FieldDocComment"]]}};ta.OPMAP=new H;ta.REGMAP=new H;ta.SAMPLEMAP=new H;ta.MAX_NESTING=4;ta.MAX_OPCODES=4096;ta.FRAGMENT="fragment";ta.VERTEX="vertex";ta.SAMPLER_TYPE_SHIFT=8;ta.SAMPLER_DIM_SHIFT=12;ta.SAMPLER_SPECIAL_SHIFT=16;ta.SAMPLER_REPEAT_SHIFT=20;ta.SAMPLER_MIPMAP_SHIFT=24;ta.SAMPLER_FILTER_SHIFT=28;ta.REG_WRITE=
1;ta.REG_READ=2;ta.REG_FRAG=32;ta.REG_VERT=64;ta.OP_SCALAR=1;ta.OP_SPECIAL_TEX=8;ta.OP_SPECIAL_MATRIX=16;ta.OP_FRAG_ONLY=32;ta.OP_VERT_ONLY=64;ta.OP_NO_DEST=128;ta.OP_VERSION2=256;ta.OP_INCNEST=512;ta.OP_DECNEST=1024;ta.MOV="mov";ta.ADD="add";ta.SUB="sub";ta.MUL="mul";ta.DIV="div";ta.RCP="rcp";ta.MIN="min";ta.MAX="max";ta.FRC="frc";ta.SQT="sqt";ta.RSQ="rsq";ta.POW="pow";ta.LOG="log";ta.EXP="exp";ta.NRM="nrm";ta.SIN="sin";ta.COS="cos";ta.CRS="crs";ta.DP3="dp3";ta.DP4="dp4";ta.ABS="abs";ta.NEG="neg";
ta.SAT="sat";ta.M33="m33";ta.M44="m44";ta.M34="m34";ta.DDX="ddx";ta.DDY="ddy";ta.IFE="ife";ta.INE="ine";ta.IFG="ifg";ta.IFL="ifl";ta.IEG="ieg";ta.IEL="iel";ta.ELS="els";ta.EIF="eif";ta.TED="ted";ta.KIL="kil";ta.TEX="tex";ta.SGE="sge";ta.SLT="slt";ta.SGN="sgn";ta.SEQ="seq";ta.SNE="sne";ta.VA="va";ta.VC="vc";ta.VT="vt";ta.VO="vo";ta.VI="vi";ta.FC="fc";ta.FT="ft";ta.FS="fs";ta.FO="fo";ta.FD="fd";ta.IID="iid";ta.D2="2d";ta.D3="3d";ta.CUBE="cube";ta.MIPNEAREST="mipnearest";ta.MIPLINEAR="miplinear";ta.MIPNONE=
"mipnone";ta.NOMIP="nomip";ta.NEAREST="nearest";ta.LINEAR="linear";ta.ANISOTROPIC2X="anisotropic2x";ta.ANISOTROPIC4X="anisotropic4x";ta.ANISOTROPIC8X="anisotropic8x";ta.ANISOTROPIC16X="anisotropic16x";ta.CENTROID="centroid";ta.SINGLE="single";ta.IGNORESAMPLER="ignoresampler";ta.REPEAT="repeat";ta.WRAP="wrap";ta.CLAMP="clamp";ta.REPEAT_U_CLAMP_V="repeat_u_clamp_v";ta.CLAMP_U_REPEAT_V="clamp_u_repeat_v";ta.RGBA="rgba";ta.COMPRESSED="compressed";ta.COMPRESSEDALPHA="compressedalpha";ta.DXT1="dxt1";ta.DXT5=
"dxt5";ta.VIDEO="video";ta.initialized=!1;hd.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};Li.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};Be.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};Hb.cache=new Qv;Hb.dispatcher=new ma;Hb.libraryBindings=new H;lc.__bytePointer=new Bj(null,0);Vc.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};Vc.defaultObjectEncoding=10;so.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};
qo.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};ro.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};Sz.BIG_ENDIAN=0;Sz.LITTLE_ENDIAN=1;Je.__meta__={statics:{iterator:{SuppressWarnings:["checkstyle:FieldDocComment"]},__get:{SuppressWarnings:["checkstyle:FieldDocComment"]},__set:{SuppressWarnings:["checkstyle:FieldDocComment"]},__getArray:{SuppressWarnings:["checkstyle:FieldDocComment"]},__setArray:{SuppressWarnings:["checkstyle:FieldDocComment"]}}};Uv.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};
Uq.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};jd.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]},statics:{notImplemented:{SuppressWarnings:["checkstyle:NullableParameter"]}}};jd.__sentWarnings=new H;bn.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]},fields:{touch:{SuppressWarnings:["checkstyle:Dynamic"]}}};bn.__pool=new dc(function(){return new bn},function(a){a.reset()});Vv.__meta__={fields:{extra:{optional:null}}};hc.main()})(typeof Va!="undefined"?
Va: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")?lb({},Y):(Ob.lime=Ob.lime||{},Ob.lime.$scripts=Ob.lime.$scripts||{},Ob.lime.$scripts.TilBuci=lb,Ob.lime.embed=function(Va){var Qa={},Sa=Ob.lime.$scripts[Va];if(!Sa)throw Error('Cannot find project name "'+Va+'"');Sa(Qa,Y);for(var wa in Qa)Ob[wa]=Ob[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 Ob.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 Ob=function(){this.init()};Ob.prototype={init:function(){var t=this||Y;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||Y;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,Y.ctx.currentTime);for(var Q=0;Q<E._howls.length;Q++)if(!E._howls[Q]._webAudio)for(var B=E._howls[Q]._getSoundIds(),qa=0;qa<B.length;qa++){var sa=E._howls[Q]._soundById(B[qa]);sa&&sa._node&&(sa._node.volume=sa._volume*t)}return E}return E._volume},mute:function(t){var E=this||Y;E.ctx||m();E._muted=t;E.usingWebAudio&&E.masterGain.gain.setValueAtTime(t?0:
E._volume,Y.ctx.currentTime);for(var Q=0;Q<E._howls.length;Q++)if(!E._howls[Q]._webAudio)for(var B=E._howls[Q]._getSoundIds(),qa=0;qa<B.length;qa++){var sa=E._howls[Q]._soundById(B[qa]);sa&&sa._node&&(sa._node.muted=!!t||sa._muted)}return E},stop:function(){for(var t=this||Y,E=0;E<t._howls.length;E++)t._howls[E].stop();return t},unload:function(){for(var t=this||Y,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||Y)._codecs[t.replace(/^x-/,"")]},_setup:function(){var t=this||Y;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(Q){t.noAudio=!0}else t.noAudio=!0;try{E=new Audio,E.muted&&(t.noAudio=!0)}catch(Q){}return t.noAudio||t._setupCodecs(),t},_setupCodecs:function(){var t=this||Y,E=null;try{E="undefined"!=typeof Audio?new Audio:
null}catch(Ba){return t}if(!E||"function"!=typeof E.canPlayType)return t;var Q=E.canPlayType("audio/mpeg;").replace(/^no$/,""),B=t._navigator?t._navigator.userAgent:"",qa=B.match(/OPR\/(\d+)/g);qa=qa&&parseInt(qa[0].split("/")[1],10)<33;var sa=-1!==B.indexOf("Safari")&&-1===B.indexOf("Chrome");B=B.match(/Version\/(.*?) /);B=sa&&B&&parseInt(B[1],10)<15;return t._codecs={mp3:!(qa||!Q&&!E.canPlayType("audio/mp3;").replace(/^no$/,"")),mpeg:!!Q,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||Y;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(Q){for(;t._html5AudioPool.length<t.html5PoolSize;)try{var B=new Audio;B._unlocked=!0;t._releaseHtml5Audio(B)}catch(Ma){t.noAudio=!0;break}for(Q=0;Q<t._howls.length;Q++)if(!t._howls[Q]._webAudio){B=t._howls[Q]._getSoundIds();for(var qa=0;qa<B.length;qa++){var sa=t._howls[Q]._soundById(B[qa]);
sa&&sa._node&&!sa._node._unlocked&&(sa._node._unlocked=!0,sa._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 Ma=0;Ma<t._howls.length;Ma++)t._howls[Ma]._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||Y;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||Y;return t._unlocked&&E._html5AudioPool.push(t),E},_autoSuspend:function(){var t=this;if(t.autoSuspend&&t.ctx&&void 0!==t.ctx.suspend&&Y.usingWebAudio){for(var E=0;E<t._howls.length;E++)if(t._howls[E]._webAudio)for(var Q=0;Q<t._howls[E]._sounds.length;Q++)if(!t._howls[E]._sounds[Q]._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&&Y.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 Y=new Ob,lb=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)};lb.prototype={init:function(t){var E=this;return Y.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=Y.usingWebAudio&&!E._html5,void 0!==Y.ctx&&Y.ctx&&Y.autoUnlock&&Y._unlockAudio(),Y._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(Y.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 Q;if(this._format&&this._format[E])var B=this._format[E];else{if("string"!=
typeof(Q=this._src[E])){this._emit("loaderror",null,"Non-string found in selected audio sources - ignoring.");continue}(B=/^data:audio\/([^;,]+);/i.exec(Q))||(B=/\.([^.]+)$/.exec(Q.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&&Y.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 Va(this),this._webAudio&&Sa(this),this):void this._emit("loaderror",null,"No codec support for selected audio sources.")},play:function(t,E){var Q=this,B=null;if("number"==typeof t)B=t,t=null;else{if("string"==typeof t&&"loaded"===Q._state&&!Q._sprite[t])return null;if(void 0===t&&(t="__default",!Q._playLock)){for(var qa=0,sa=0;sa<Q._sounds.length;sa++)Q._sounds[sa]._paused&&!Q._sounds[sa]._ended&&(qa++,B=Q._sounds[sa]._id);1===qa?t=null:B=null}}var Ba=B?Q._soundById(B):Q._inactiveSound();
if(!Ba)return null;if(B&&!t&&(t=Ba._sprite||"__default"),"loaded"!==Q._state){Ba._sprite=t;Ba._ended=!1;var Ma=Ba._id;return Q._queue.push({event:"play",action:function(){Q.play(Ma)}}),Ma}if(B&&!Ba._paused)return E||Q._loadQueue("play"),Ba._id;Q._webAudio&&Y._autoResume();var hc=Math.max(0,Ba._seek>0?Ba._seek:Q._sprite[t][0]/1E3),Fb=Math.max(0,(Q._sprite[t][0]+Q._sprite[t][1])/1E3-hc),ma=1E3*Fb/Math.abs(Ba._rate),jc=Q._sprite[t][0]/1E3,ub=(Q._sprite[t][0]+Q._sprite[t][1])/1E3;Ba._sprite=t;Ba._ended=
!1;var dc=function(){Ba._paused=!1;Ba._seek=hc;Ba._start=jc;Ba._stop=ub;Ba._loop=!(!Ba._loop&&!Q._sprite[t][2])};if(hc>=ub)return void Q._ended(Ba);var ha=Ba._node;if(Q._webAudio)B=function(){Q._playLock=!1;dc();Q._refreshBuffer(Ba);ha.gain.setValueAtTime(Ba._muted||Q._muted?0:Ba._volume,Y.ctx.currentTime);Ba._playStart=Y.ctx.currentTime;void 0===ha.bufferSource.start?Ba._loop?ha.bufferSource.noteGrainOn(0,hc,86400):ha.bufferSource.noteGrainOn(0,hc,Fb):Ba._loop?ha.bufferSource.start(0,hc,86400):ha.bufferSource.start(0,
hc,Fb);ma!==1/0&&(Q._endTimers[Ba._id]=setTimeout(Q._ended.bind(Q,Ba),ma));E||setTimeout(function(){Q._emit("play",Ba._id);Q._loadQueue()},0)},"running"===Y.state&&"interrupted"!==Y.ctx.state?B():(Q._playLock=!0,Q.once("resume",B),Q._clearTimer(Ba._id));else{var Ta=function(){ha.currentTime=hc;ha.muted=Ba._muted||Q._muted||Y._muted||ha.muted;ha.volume=Ba._volume*Y.volume();ha.playbackRate=Ba._rate;try{var ka=ha.play();if(ka&&"undefined"!=typeof Promise&&(ka instanceof Promise||"function"==typeof ka.then)?
(Q._playLock=!0,dc(),ka.then(function(){Q._playLock=!1;ha._unlocked=!0;E?Q._loadQueue():Q._emit("play",Ba._id)}).catch(function(){Q._playLock=!1;Q._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||(Q._playLock=!1,dc(),Q._emit("play",Ba._id)),ha.playbackRate=Ba._rate,ha.paused)return void Q._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?Q._endTimers[Ba._id]=setTimeout(Q._ended.bind(Q,Ba),ma):(Q._endTimers[Ba._id]=function(){Q._ended(Ba);ha.removeEventListener("ended",Q._endTimers[Ba._id],!1)},ha.addEventListener("ended",Q._endTimers[Ba._id],!1))}catch(Ia){Q._emit("playerror",Ba._id,Ia)}};"data:audio/wav;base64,UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA"===ha.src&&(ha.src=Q._src,ha.load());B=window&&window.ejecta||!ha.readyState&&Y._navigator.isCocoonJS;if(ha.readyState>=3||B)Ta();else{Q._playLock=
!0;Q._state="loading";var jb=function(){Q._state="loaded";Ta();ha.removeEventListener(Y._canPlayEvent,jb,!1)};ha.addEventListener(Y._canPlayEvent,jb,!1);Q._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 Q=E._getSoundIds(t),B=0;B<Q.length;B++){E._clearTimer(Q[B]);var qa=E._soundById(Q[B]);if(qa&&!qa._paused&&(qa._seek=E.seek(Q[B]),qa._rateSeek=0,qa._paused=!0,E._stopFade(Q[B]),
qa._node))if(E._webAudio){if(!qa._node.bufferSource)continue;void 0===qa._node.bufferSource.stop?qa._node.bufferSource.noteOff(0):qa._node.bufferSource.stop(0);E._cleanBuffer(qa._node)}else isNaN(qa._node.duration)&&qa._node.duration!==1/0||qa._node.pause();arguments[1]||E._emit("pause",qa?qa._id:null)}return E},stop:function(t,E){var Q=this;if("loaded"!==Q._state||Q._playLock)return Q._queue.push({event:"stop",action:function(){Q.stop(t)}}),Q;for(var B=Q._getSoundIds(t),qa=0;qa<B.length;qa++){Q._clearTimer(B[qa]);
var sa=Q._soundById(B[qa]);sa&&(sa._seek=sa._start||0,sa._rateSeek=0,sa._paused=!0,sa._ended=!0,Q._stopFade(B[qa]),sa._node&&(Q._webAudio?sa._node.bufferSource&&(void 0===sa._node.bufferSource.stop?sa._node.bufferSource.noteOff(0):sa._node.bufferSource.stop(0),Q._cleanBuffer(sa._node)):isNaN(sa._node.duration)&&sa._node.duration!==1/0||(sa._node.currentTime=sa._start||0,sa._node.pause(),sa._node.duration===1/0&&Q._clearSound(sa._node))),E||Q._emit("stop",sa._id))}return Q},mute:function(t,E){var Q=
this;if("loaded"!==Q._state||Q._playLock)return Q._queue.push({event:"mute",action:function(){Q.mute(t,E)}}),Q;if(void 0===E){if("boolean"!=typeof t)return Q._muted;Q._muted=t}for(var B=Q._getSoundIds(E),qa=0;qa<B.length;qa++){var sa=Q._soundById(B[qa]);sa&&(sa._muted=t,sa._interval&&Q._stopFade(sa._id),Q._webAudio&&sa._node?sa._node.gain.setValueAtTime(t?0:sa._volume,Y.ctx.currentTime):sa._node&&(sa._node.muted=!!Y._muted||t),Q._emit("mute",sa._id))}return Q},volume:function(){var t,E,Q=this,B=arguments;
if(0===B.length)return Q._volume;1===B.length||2===B.length&&void 0===B[1]?Q._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 qa;if(!(void 0!==t&&t>=0&&t<=1))return qa=E?Q._soundById(E):Q._sounds[0],qa?qa._volume:0;if("loaded"!==Q._state||Q._playLock)return Q._queue.push({event:"volume",action:function(){Q.volume.apply(Q,B)}}),Q;void 0===E&&(Q._volume=t);E=Q._getSoundIds(E);for(var sa=0;sa<E.length;sa++)(qa=Q._soundById(E[sa]))&&
(qa._volume=t,B[2]||Q._stopFade(E[sa]),Q._webAudio&&qa._node&&!qa._muted?qa._node.gain.setValueAtTime(t,Y.ctx.currentTime):qa._node&&!qa._muted&&(qa._node.volume=t*Y.volume()),Q._emit("volume",qa._id));return Q},fade:function(t,E,Q,B){var qa=this;if("loaded"!==qa._state||qa._playLock)return qa._queue.push({event:"fade",action:function(){qa.fade(t,E,Q,B)}}),qa;t=Math.min(Math.max(0,parseFloat(t)),1);E=Math.min(Math.max(0,parseFloat(E)),1);Q=parseFloat(Q);qa.volume(t,B);for(var sa=qa._getSoundIds(B),
Ba=0;Ba<sa.length;Ba++){var Ma=qa._soundById(sa[Ba]);if(Ma){if(B||qa._stopFade(sa[Ba]),qa._webAudio&&!Ma._muted){var hc=Y.ctx.currentTime,Fb=hc+Q/1E3;Ma._volume=t;Ma._node.gain.setValueAtTime(t,hc);Ma._node.gain.linearRampToValueAtTime(E,Fb)}qa._startFadeInterval(Ma,t,E,Q,sa[Ba],void 0===B)}}return qa},_startFadeInterval:function(t,E,Q,B,qa,sa){var Ba=this,Ma=E,hc=Q-E;qa=Math.abs(hc/.01);qa=Math.max(4,qa>0?B/qa:B);var Fb=Date.now();t._fadeTo=Q;t._interval=setInterval(function(){var ma=(Date.now()-
Fb)/B;Fb=Date.now();Ma+=hc*ma;Ma=Math.round(100*Ma)/100;Ma=hc<0?Math.max(Q,Ma):Math.min(Q,Ma);Ba._webAudio?t._volume=Ma:Ba.volume(Ma,t._id,!0);sa&&(Ba._volume=Ma);(Q<E&&Ma<=Q||Q>E&&Ma>=Q)&&(clearInterval(t._interval),t._interval=null,t._fadeTo=null,Ba.volume(Q,t._id),Ba._emit("fade",t._id))},qa)},_stopFade:function(t){var E=this._soundById(t);return E&&E._interval&&(this._webAudio&&E._node.gain.cancelScheduledValues(Y.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,Q,B=arguments;if(0===B.length)return this._loop;if(1===B.length){if("boolean"!=typeof B[0])return!!(Q=this._soundById(parseInt(B[0],10)))&&Q._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++)(Q=this._soundById(E[B]))&&(Q._loop=t,this._webAudio&&Q._node&&Q._node.bufferSource&&(Q._node.bufferSource.loop=t,t&&(Q._node.bufferSource.loopStart=Q._start||0,Q._node.bufferSource.loopEnd=
Q._stop,this.playing(E[B])&&(this.pause(E[B],!0),this.play(E[B],!0)))));return this},rate:function(){var t,E,Q=this,B=arguments;0===B.length?E=Q._sounds[0]._id:1===B.length?Q._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 qa;if("number"!=typeof t)return qa=Q._soundById(E),qa?qa._rate:Q._rate;if("loaded"!==Q._state||Q._playLock)return Q._queue.push({event:"rate",action:function(){Q.rate.apply(Q,B)}}),Q;void 0===E&&(Q._rate=
t);E=Q._getSoundIds(E);for(var sa=0;sa<E.length;sa++)if(qa=Q._soundById(E[sa])){Q.playing(E[sa])&&(qa._rateSeek=Q.seek(E[sa]),qa._playStart=Q._webAudio?Y.ctx.currentTime:qa._playStart);qa._rate=t;Q._webAudio&&qa._node&&qa._node.bufferSource?qa._node.bufferSource.playbackRate.setValueAtTime(t,Y.ctx.currentTime):qa._node&&(qa._node.playbackRate=t);var Ba=Q.seek(E[sa]);Ba=1E3*((Q._sprite[qa._sprite][0]+Q._sprite[qa._sprite][1])/1E3-Ba)/Math.abs(qa._rate);!Q._endTimers[E[sa]]&&qa._paused||(Q._clearTimer(E[sa]),
Q._endTimers[E[sa]]=setTimeout(Q._ended.bind(Q,qa),Ba));Q._emit("rate",qa._id)}return Q},seek:function(){var t,E,Q=this,B=arguments;0===B.length?Q._sounds.length&&(E=Q._sounds[0]._id):1===B.length?Q._getSoundIds().indexOf(B[0])>=0?E=parseInt(B[0],10):Q._sounds.length&&(E=Q._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"!==Q._state||Q._playLock))return Q._queue.push({event:"seek",action:function(){Q.seek.apply(Q,
B)}}),Q;var qa=Q._soundById(E);if(qa){if(!("number"==typeof t&&t>=0))return Q._webAudio?(t=Q.playing(E)?Y.ctx.currentTime-qa._playStart:0,qa._seek+((qa._rateSeek?qa._rateSeek-qa._seek:0)+t*Math.abs(qa._rate))):qa._node.currentTime;var sa=Q.playing(E);sa&&Q.pause(E,!0);qa._seek=t;qa._ended=!1;Q._clearTimer(E);Q._webAudio||!qa._node||isNaN(qa._node.duration)||(qa._node.currentTime=t);var Ba=function(){sa&&Q.play(E,!0);Q._emit("seek",E)};if(sa&&!Q._webAudio){var Ma=function(){Q._playLock?setTimeout(Ma,
0):Ba()};setTimeout(Ma,0)}else Ba()}return Q},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(Y._canPlayEvent,t[E]._loadFn,!1),t[E]._node.removeEventListener("ended",t[E]._endFn,!1),Y._releaseHtml5Audio(t[E]._node)),delete t[E]._node,this._clearTimer(t[E]._id);E=Y._howls.indexOf(this);E>=0&&Y._howls.splice(E,1);t=!0;for(E=0;E<Y._howls.length;E++)if(Y._howls[E]._src===this._src||this._src.indexOf(Y._howls[E]._src)>=0){t=!1;break}return Qa&&t&&delete Qa[this._src],Y.noAudio=!1,this._state="unloaded",this._sounds=
[],null},on:function(t,E,Q,B){t=this["_on"+t];return"function"==typeof E&&t.push(B?{id:Q,fn:E,once:B}:{id:Q,fn:E}),this},off:function(t,E,Q){var B=this["_on"+t];if("number"==typeof E&&(Q=E,E=null),E||Q)for(t=0;t<B.length;t++){var qa=Q===B[t].id;if(E===B[t].fn&&qa||!E&&qa){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,Q){return this.on(t,E,Q,1),this},
_emit:function(t,E,Q){for(var B=this["_on"+t],qa=B.length-1;qa>=0;qa--)B[qa].id&&B[qa].id!==E&&"load"!==t||(setTimeout(function(sa){sa.call(this,E,Q)}.bind(this,B[qa].fn),0),B[qa].once&&this.off(t,B[qa].fn,B[qa].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=Y.ctx.currentTime;var Q=1E3*(t._stop-t._start)/Math.abs(t._rate);this._endTimers[t._id]=setTimeout(this._ended.bind(this,t),Q)}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),Y._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 Va(this)},_drain:function(){var t=this._pool,E=0,Q;if(!(this._sounds.length<t)){for(Q=0;Q<this._sounds.length;Q++)this._sounds[Q]._ended&&E++;for(Q=this._sounds.length-1;Q>=0&&!(E<=t);Q--)this._sounds[Q]._ended&&(this._webAudio&&this._sounds[Q]._node&&this._sounds[Q]._node.disconnect(0),this._sounds.splice(Q,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=Y.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,Y.ctx.currentTime),this},_cleanBuffer:function(t){var E=Y._navigator&&Y._navigator.vendor.indexOf("Apple")>=
0;if(!t.bufferSource)return this;if(Y._scratchBuffer&&t.bufferSource&&(t.bufferSource.onended=null,t.bufferSource.disconnect(0),E))try{t.bufferSource.buffer=Y._scratchBuffer}catch(Q){}return t.bufferSource=null,this},_clearSound:function(t){/MSIE |Trident\//.test(Y._navigator&&Y._navigator.userAgent)||(t.src="data:audio/wav;base64,UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA")}};var Va=function(t){this._parent=t;this.init()};Va.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=++Y._counter,t._sounds.push(this),this.create(),this},create:function(){var t=this._parent,E=Y._muted||this._muted||this._parent._muted?0:this._volume;return t._webAudio?(this._node=void 0===Y.ctx.createGain?Y.ctx.createGainNode():Y.ctx.createGain(),this._node.gain.setValueAtTime(E,Y.ctx.currentTime),this._node.paused=!0,this._node.connect(Y.masterGain)):
Y.noAudio||(this._node=Y._obtainHtml5Audio(),this._errorFn=this._errorListener.bind(this),this._node.addEventListener("error",this._errorFn,!1),this._loadFn=this._loadListener.bind(this),this._node.addEventListener(Y._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*Y.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=++Y._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(Y._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 Ka(t);if(/^data:[^;]+;base64,/.test(E)){for(var Q=atob(E.split(",")[1]),B=new Uint8Array(Q.length),qa=0;qa<Q.length;++qa)B[qa]=Q.charCodeAt(qa);I(B.buffer,t)}else{var sa=new XMLHttpRequest;sa.open(t._xhr.method,E,!0);sa.withCredentials=t._xhr.withCredentials;sa.responseType="arraybuffer";t._xhr.headers&&Object.keys(t._xhr.headers).forEach(function(Ba){sa.setRequestHeader(Ba,t._xhr.headers[Ba])});sa.onload=function(){var Ba=(sa.status+"")[0];if("0"!==Ba&&"2"!==Ba&&"3"!==Ba)return void t._emit("loaderror",
null,"Failed loading audio file with status: "+sa.status+".");I(sa.response,t)};sa.onerror=function(){t._webAudio&&(t._html5=!0,t._webAudio=!1,t._sounds=[],delete Qa[E],t.load())};wa(sa)}},wa=function(t){try{t.send()}catch(E){t.onerror()}},I=function(t,E){var Q=function(){E._emit("loaderror",null,"Decoding audio data failed.")},B=function(qa){qa&&E._sounds.length>0?(Qa[E._src]=qa,Ka(E,qa)):Q()};"undefined"!=typeof Promise&&1===Y.ctx.decodeAudioData.length?Y.ctx.decodeAudioData(t).then(B).catch(Q):
Y.ctx.decodeAudioData(t,B,Q)},Ka=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(Y.usingWebAudio){try{"undefined"!=typeof AudioContext?Y.ctx=new AudioContext:"undefined"!=typeof webkitAudioContext?Y.ctx=new webkitAudioContext:Y.usingWebAudio=!1}catch(Q){Y.usingWebAudio=!1}Y.ctx||(Y.usingWebAudio=!1);var t=/iP(hone|od|ad)/.test(Y._navigator&&
Y._navigator.platform),E=Y._navigator&&Y._navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/);E=E?parseInt(E[1],10):null;t&&E&&E<9&&(t=/safari/.test(Y._navigator&&Y._navigator.userAgent.toLowerCase()),Y._navigator&&!t&&(Y.usingWebAudio=!1));Y.usingWebAudio&&(Y.masterGain=void 0===Y.ctx.createGain?Y.ctx.createGainNode():Y.ctx.createGain(),Y.masterGain.gain.setValueAtTime(Y._muted?0:Y._volume,Y.ctx.currentTime),Y.masterGain.connect(Y.ctx.destination));Y._setup()}};"function"==typeof define&&define.amd&&
define([],function(){return{Howler:Y,Howl:lb}});"undefined"!=typeof exports&&(exports.Howler=Y,exports.Howl=lb);"undefined"!=typeof global?(global.HowlerGlobal=Ob,global.Howler=Y,global.Howl=lb,global.Sound=Va):"undefined"!=typeof window&&(window.HowlerGlobal=Ob,window.Howler=Y,window.Howl=lb,window.Sound=Va)}(),!function(){HowlerGlobal.prototype._pos=[0,0,0];HowlerGlobal.prototype._orientation=[0,0,-1,0,1,0];HowlerGlobal.prototype.stereo=function(Y){if(!this.ctx||!this.ctx.listener)return this;for(var lb=
this._howls.length-1;lb>=0;lb--)this._howls[lb].stereo(Y);return this};HowlerGlobal.prototype.pos=function(Y,lb,Va){return this.ctx&&this.ctx.listener?(lb="number"!=typeof lb?this._pos[1]:lb,Va="number"!=typeof Va?this._pos[2]:Va,"number"!=typeof Y?this._pos:(this._pos=[Y,lb,Va],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(Y,lb,Va,Qa,Sa,wa){if(!this.ctx||!this.ctx.listener)return this;var I=this._orientation;return lb="number"!=typeof lb?I[1]:lb,Va="number"!=typeof Va?I[2]:Va,Qa="number"!=typeof Qa?I[3]:Qa,Sa="number"!=typeof Sa?I[4]:Sa,wa="number"!=typeof wa?I[5]:wa,"number"!=typeof Y?I:(this._orientation=[Y,lb,Va,Qa,Sa,wa],void 0!==this.ctx.listener.forwardX?(this.ctx.listener.forwardX.setTargetAtTime(Y,
Howler.ctx.currentTime,.1),this.ctx.listener.forwardY.setTargetAtTime(lb,Howler.ctx.currentTime,.1),this.ctx.listener.forwardZ.setTargetAtTime(Va,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(Y,lb,Va,Qa,Sa,wa),this)};Howl.prototype.init=function(Y){return function(lb){return this._orientation=
lb.orientation||[1,0,0],this._stereo=lb.stereo||null,this._pos=lb.pos||null,this._pannerAttr={coneInnerAngle:void 0!==lb.coneInnerAngle?lb.coneInnerAngle:360,coneOuterAngle:void 0!==lb.coneOuterAngle?lb.coneOuterAngle:360,coneOuterGain:void 0!==lb.coneOuterGain?lb.coneOuterGain:0,distanceModel:void 0!==lb.distanceModel?lb.distanceModel:"inverse",maxDistance:void 0!==lb.maxDistance?lb.maxDistance:1E4,panningModel:void 0!==lb.panningModel?lb.panningModel:"HRTF",refDistance:void 0!==lb.refDistance?lb.refDistance:
1,rolloffFactor:void 0!==lb.rolloffFactor?lb.rolloffFactor:1},this._onstereo=lb.onstereo?[{fn:lb.onstereo}]:[],this._onpos=lb.onpos?[{fn:lb.onpos}]:[],this._onorientation=lb.onorientation?[{fn:lb.onorientation}]:[],Y.call(this,lb)}}(Howl.prototype.init);Howl.prototype.stereo=function(Y,lb){var Va=this;if(!Va._webAudio)return Va;if("loaded"!==Va._state)return Va._queue.push({event:"stereo",action:function(){Va.stereo(Y,lb)}}),Va;var Qa=void 0===Howler.ctx.createStereoPanner?"spatial":"stereo";if(void 0===
lb){if("number"!=typeof Y)return Va._stereo;Va._stereo=Y;Va._pos=[Y,0,0]}for(var Sa=Va._getSoundIds(lb),wa=0;wa<Sa.length;wa++){var I=Va._soundById(Sa[wa]);if(I){if("number"!=typeof Y)return I._stereo;I._stereo=Y;I._pos=[Y,0,0];I._node&&(I._pannerAttr.panningModel="equalpower",I._panner&&I._panner.pan||Ob(I,Qa),"spatial"===Qa?void 0!==I._panner.positionX?(I._panner.positionX.setValueAtTime(Y,Howler.ctx.currentTime),I._panner.positionY.setValueAtTime(0,Howler.ctx.currentTime),I._panner.positionZ.setValueAtTime(0,
Howler.ctx.currentTime)):I._panner.setPosition(Y,0,0):I._panner.pan.setValueAtTime(Y,Howler.ctx.currentTime));Va._emit("stereo",I._id)}}return Va};Howl.prototype.pos=function(Y,lb,Va,Qa){var Sa=this;if(!Sa._webAudio)return Sa;if("loaded"!==Sa._state)return Sa._queue.push({event:"pos",action:function(){Sa.pos(Y,lb,Va,Qa)}}),Sa;if(lb="number"!=typeof lb?0:lb,Va="number"!=typeof Va?-.5:Va,void 0===Qa){if("number"!=typeof Y)return Sa._pos;Sa._pos=[Y,lb,Va]}for(var wa=Sa._getSoundIds(Qa),I=0;I<wa.length;I++){var Ka=
Sa._soundById(wa[I]);if(Ka){if("number"!=typeof Y)return Ka._pos;Ka._pos=[Y,lb,Va];Ka._node&&(Ka._panner&&!Ka._panner.pan||Ob(Ka,"spatial"),void 0!==Ka._panner.positionX?(Ka._panner.positionX.setValueAtTime(Y,Howler.ctx.currentTime),Ka._panner.positionY.setValueAtTime(lb,Howler.ctx.currentTime),Ka._panner.positionZ.setValueAtTime(Va,Howler.ctx.currentTime)):Ka._panner.setPosition(Y,lb,Va));Sa._emit("pos",Ka._id)}}return Sa};Howl.prototype.orientation=function(Y,lb,Va,Qa){var Sa=this;if(!Sa._webAudio)return Sa;
if("loaded"!==Sa._state)return Sa._queue.push({event:"orientation",action:function(){Sa.orientation(Y,lb,Va,Qa)}}),Sa;if(lb="number"!=typeof lb?Sa._orientation[1]:lb,Va="number"!=typeof Va?Sa._orientation[2]:Va,void 0===Qa){if("number"!=typeof Y)return Sa._orientation;Sa._orientation=[Y,lb,Va]}for(var wa=Sa._getSoundIds(Qa),I=0;I<wa.length;I++){var Ka=Sa._soundById(wa[I]);if(Ka){if("number"!=typeof Y)return Ka._orientation;Ka._orientation=[Y,lb,Va];Ka._node&&(Ka._panner||(Ka._pos||(Ka._pos=Sa._pos||
[0,0,-.5]),Ob(Ka,"spatial")),void 0!==Ka._panner.orientationX?(Ka._panner.orientationX.setValueAtTime(Y,Howler.ctx.currentTime),Ka._panner.orientationY.setValueAtTime(lb,Howler.ctx.currentTime),Ka._panner.orientationZ.setValueAtTime(Va,Howler.ctx.currentTime)):Ka._panner.setOrientation(Y,lb,Va));Sa._emit("orientation",Ka._id)}}return Sa};Howl.prototype.pannerAttr=function(){var Y,lb,Va=arguments;if(!this._webAudio)return this;if(0===Va.length)return this._pannerAttr;if(1===Va.length){if("object"!=
typeof Va[0])return lb=this._soundById(parseInt(Va[0],10)),lb?lb._pannerAttr:this._pannerAttr;var Qa=Va[0];void 0===Y&&(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===Va.length&&(Qa=Va[0],Y=parseInt(Va[1],10));Y=this._getSoundIds(Y);for(Va=0;Va<Y.length;Va++)if(lb=this._soundById(Y[Va])){var Sa=lb._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=lb._panner;wa||(lb._pos||(lb._pos=this._pos||[0,0,-.5]),Ob(lb,"spatial"),wa=lb._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(Y){return function(){var lb=this._parent;this._orientation=lb._orientation;this._stereo=lb._stereo;this._pos=lb._pos;this._pannerAttr=lb._pannerAttr;Y.call(this);this._stereo?lb.stereo(this._stereo):this._pos&&
lb.pos(this._pos[0],this._pos[1],this._pos[2],this._id)}}(Sound.prototype.init);Sound.prototype.reset=function(Y){return function(){var lb=this._parent;return this._orientation=lb._orientation,this._stereo=lb._stereo,this._pos=lb._pos,this._pannerAttr=lb._pannerAttr,this._stereo?lb.stereo(this._stereo):this._pos?lb.pos(this._pos[0],this._pos[1],this._pos[2],this._id):this._panner&&(this._panner.disconnect(0),this._panner=void 0,lb._refreshBuffer(this)),Y.call(this)}}(Sound.prototype.reset);var Ob=
function(Y,lb){"spatial"===(lb||"spatial")?(Y._panner=Howler.ctx.createPanner(),Y._panner.coneInnerAngle=Y._pannerAttr.coneInnerAngle,Y._panner.coneOuterAngle=Y._pannerAttr.coneOuterAngle,Y._panner.coneOuterGain=Y._pannerAttr.coneOuterGain,Y._panner.distanceModel=Y._pannerAttr.distanceModel,Y._panner.maxDistance=Y._pannerAttr.maxDistance,Y._panner.refDistance=Y._pannerAttr.refDistance,Y._panner.rolloffFactor=Y._pannerAttr.rolloffFactor,Y._panner.panningModel=Y._pannerAttr.panningModel,void 0!==Y._panner.positionX?
(Y._panner.positionX.setValueAtTime(Y._pos[0],Howler.ctx.currentTime),Y._panner.positionY.setValueAtTime(Y._pos[1],Howler.ctx.currentTime),Y._panner.positionZ.setValueAtTime(Y._pos[2],Howler.ctx.currentTime)):Y._panner.setPosition(Y._pos[0],Y._pos[1],Y._pos[2]),void 0!==Y._panner.orientationX?(Y._panner.orientationX.setValueAtTime(Y._orientation[0],Howler.ctx.currentTime),Y._panner.orientationY.setValueAtTime(Y._orientation[1],Howler.ctx.currentTime),Y._panner.orientationZ.setValueAtTime(Y._orientation[2],
Howler.ctx.currentTime)):Y._panner.setOrientation(Y._orientation[0],Y._orientation[1],Y._orientation[2])):(Y._panner=Howler.ctx.createStereoPanner(),Y._panner.pan.setValueAtTime(Y._stereo,Howler.ctx.currentTime));Y._panner.connect(Y._node);Y._paused||Y._parent.pause(Y._id,!0).play(Y._id,!0)}}());
!function(Ob){"object"==typeof exports&&"undefined"!=typeof module?module.exports=Ob():"function"==typeof define&&define.amd?define([],Ob):("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).pako=Ob()}(function(){return function Qa(Y,lb,Va){function Sa(Ka,m){if(!lb[Ka]){if(!Y[Ka]){var t="function"==typeof require&&require;if(!m&&t)return t(Ka,!0);if(wa)return wa(Ka,!0);m=Error("Cannot find module '"+Ka+"'");throw m.code="MODULE_NOT_FOUND",m;}m=
lb[Ka]={exports:{}};Y[Ka][0].call(m.exports,function(E){var Q=Y[Ka][1][E];return Sa(Q?Q:E)},m,m.exports,Qa,Y,lb,Va)}return lb[Ka].exports}for(var wa="function"==typeof require&&require,I=0;I<Va.length;I++)Sa(Va[I]);return Sa}({1:[function(Y,lb,Va){function Qa(Ba){if(!(this instanceof Qa))return new Qa(Ba);Ba=this.options=I.assign({level:B,method:sa,chunkSize:16384,windowBits:15,memLevel:8,strategy:qa,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 Ma=wa.deflateInit2(this.strm,Ba.level,Ba.method,Ba.windowBits,Ba.memLevel,Ba.strategy);if(Ma!==Q)throw Error(m[Ma]);if(Ba.header&&wa.deflateSetHeader(this.strm,Ba.header),Ba.dictionary){var hc;if(hc="string"==typeof Ba.dictionary?Ka.string2buf(Ba.dictionary):"[object ArrayBuffer]"===E.call(Ba.dictionary)?new Uint8Array(Ba.dictionary):Ba.dictionary,Ma=wa.deflateSetDictionary(this.strm,
hc),Ma!==Q)throw Error(m[Ma]);this._dict_set=!0}}function Sa(Ba,Ma){Ma=new Qa(Ma);if(Ma.push(Ba,!0),Ma.err)throw Ma.msg;return Ma.result}var wa=Y("./zlib/deflate"),I=Y("./utils/common"),Ka=Y("./utils/strings"),m=Y("./zlib/messages"),t=Y("./zlib/zstream"),E=Object.prototype.toString,Q=0,B=-1,qa=0,sa=8;Qa.prototype.push=function(Ba,Ma){var hc,Fb=this.strm,ma=this.options.chunkSize;if(this.ended)return!1;Ma=Ma===~~Ma?Ma:Ma===!0?4:0;"string"==typeof Ba?Fb.input=Ka.string2buf(Ba):"[object ArrayBuffer]"===
E.call(Ba)?Fb.input=new Uint8Array(Ba):Fb.input=Ba;Fb.next_in=0;Fb.avail_in=Fb.input.length;do{if(0===Fb.avail_out&&(Fb.output=new I.Buf8(ma),Fb.next_out=0,Fb.avail_out=ma),hc=wa.deflate(Fb,Ma),hc!==1&&hc!==Q)return this.onEnd(hc),this.ended=!0,!1;0!==Fb.avail_out&&(0!==Fb.avail_in||Ma!==4&&Ma!==2)||("string"===this.options.to?this.onData(Ka.buf2binstring(I.shrinkBuf(Fb.output,Fb.next_out))):this.onData(I.shrinkBuf(Fb.output,Fb.next_out)))}while((Fb.avail_in>0||0===Fb.avail_out)&&hc!==1);return Ma===
4?(hc=wa.deflateEnd(this.strm),this.onEnd(hc),this.ended=!0,hc===Q):Ma!==2||(this.onEnd(Q),Fb.avail_out=0,!0)};Qa.prototype.onData=function(Ba){this.chunks.push(Ba)};Qa.prototype.onEnd=function(Ba){Ba===Q&&("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};Va.Deflate=Qa;Va.deflate=Sa;Va.deflateRaw=function(Ba,Ma){return Ma=Ma||{},Ma.raw=!0,Sa(Ba,Ma)};Va.gzip=function(Ba,Ma){return Ma=Ma||{},Ma.gzip=
!0,Sa(Ba,Ma)}},{"./utils/common":3,"./utils/strings":4,"./zlib/deflate":8,"./zlib/messages":13,"./zlib/zstream":15}],2:[function(Y,lb,Va){function Qa(qa){if(!(this instanceof Qa))return new Qa(qa);var sa=this.options=I.assign({chunkSize:16384,windowBits:0,to:""},qa||{});sa.raw&&sa.windowBits>=0&&sa.windowBits<16&&(sa.windowBits=-sa.windowBits,0===sa.windowBits&&(sa.windowBits=-15));!(sa.windowBits>=0&&sa.windowBits<16)||qa&&qa.windowBits||(sa.windowBits+=32);sa.windowBits>15&&sa.windowBits<48&&0===
(15&sa.windowBits)&&(sa.windowBits|=15);this.err=0;this.msg="";this.ended=!1;this.chunks=[];this.strm=new E;this.strm.avail_out=0;qa=wa.inflateInit2(this.strm,sa.windowBits);if(qa!==m.Z_OK)throw Error(t[qa]);this.header=new Q;wa.inflateGetHeader(this.strm,this.header)}function Sa(qa,sa){sa=new Qa(sa);if(sa.push(qa,!0),sa.err)throw sa.msg;return sa.result}var wa=Y("./zlib/inflate"),I=Y("./utils/common"),Ka=Y("./utils/strings"),m=Y("./zlib/constants"),t=Y("./zlib/messages"),E=Y("./zlib/zstream"),Q=
Y("./zlib/gzheader"),B=Object.prototype.toString;Qa.prototype.push=function(qa,sa){var Ba,Ma,hc,Fb,ma,jc=this.strm,ub=this.options.chunkSize,dc=this.options.dictionary,ha=!1;if(this.ended)return!1;sa=sa===~~sa?sa:sa===!0?m.Z_FINISH:m.Z_NO_FLUSH;"string"==typeof qa?jc.input=Ka.binstring2buf(qa):"[object ArrayBuffer]"===B.call(qa)?jc.input=new Uint8Array(qa):jc.input=qa;jc.next_in=0;jc.avail_in=jc.input.length;do{if(0===jc.avail_out&&(jc.output=new I.Buf8(ub),jc.next_out=0,jc.avail_out=ub),Ba=wa.inflate(jc,
m.Z_NO_FLUSH),Ba===m.Z_NEED_DICT&&dc&&(ma="string"==typeof dc?Ka.string2buf(dc):"[object ArrayBuffer]"===B.call(dc)?new Uint8Array(dc):dc,Ba=wa.inflateSetDictionary(this.strm,ma)),Ba===m.Z_BUF_ERROR&&ha===!0&&(Ba=m.Z_OK,ha=!1),Ba!==m.Z_STREAM_END&&Ba!==m.Z_OK)return this.onEnd(Ba),this.ended=!0,!1;jc.next_out&&(0!==jc.avail_out&&Ba!==m.Z_STREAM_END&&(0!==jc.avail_in||sa!==m.Z_FINISH&&sa!==m.Z_SYNC_FLUSH)||("string"===this.options.to?(Ma=Ka.utf8border(jc.output,jc.next_out),hc=jc.next_out-Ma,Fb=Ka.buf2string(jc.output,
Ma),jc.next_out=hc,jc.avail_out=ub-hc,hc&&I.arraySet(jc.output,jc.output,Ma,hc,0),this.onData(Fb)):this.onData(I.shrinkBuf(jc.output,jc.next_out))));0===jc.avail_in&&0===jc.avail_out&&(ha=!0)}while((jc.avail_in>0||0===jc.avail_out)&&Ba!==m.Z_STREAM_END);return Ba===m.Z_STREAM_END&&(sa=m.Z_FINISH),sa===m.Z_FINISH?(Ba=wa.inflateEnd(this.strm),this.onEnd(Ba),this.ended=!0,Ba===m.Z_OK):sa!==m.Z_SYNC_FLUSH||(this.onEnd(m.Z_OK),jc.avail_out=0,!0)};Qa.prototype.onData=function(qa){this.chunks.push(qa)};
Qa.prototype.onEnd=function(qa){qa===m.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=I.flattenChunks(this.chunks));this.chunks=[];this.err=qa;this.msg=this.strm.msg};Va.Inflate=Qa;Va.inflate=Sa;Va.inflateRaw=function(qa,sa){return sa=sa||{},sa.raw=!0,Sa(qa,sa)};Va.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(Y,lb,Va){Y="undefined"!=typeof Uint8Array&&
"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;Va.assign=function(wa){for(var I=Array.prototype.slice.call(arguments,1);I.length;){var Ka=I.shift();if(Ka){if("object"!=typeof Ka)throw new TypeError(Ka+"must be non-object");for(var m in Ka)Ka.hasOwnProperty(m)&&(wa[m]=Ka[m])}}return wa};Va.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,Ka,m,t){if(I.subarray&&wa.subarray)return void wa.set(I.subarray(Ka,
Ka+m),t);for(var E=0;E<m;E++)wa[t+E]=I[Ka+E]},flattenChunks:function(wa){var I,Ka;var m=Ka=0;for(I=wa.length;m<I;m++)Ka+=wa[m].length;var t=new Uint8Array(Ka);m=Ka=0;for(I=wa.length;m<I;m++){var E=wa[m];t.set(E,Ka);Ka+=E.length}return t}},Sa={arraySet:function(wa,I,Ka,m,t){for(var E=0;E<m;E++)wa[t+E]=I[Ka+E]},flattenChunks:function(wa){return[].concat.apply([],wa)}};Va.setTyped=function(wa){wa?(Va.Buf8=Uint8Array,Va.Buf16=Uint16Array,Va.Buf32=Int32Array,Va.assign(Va,Qa)):(Va.Buf8=Array,Va.Buf16=Array,
Va.Buf32=Array,Va.assign(Va,Sa))};Va.setTyped(Y)},{}],4:[function(Y,lb,Va){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="",Q=0;Q<t;Q++)E+=String.fromCharCode(m[Q]);return E}var Sa=Y("./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 Ka=new Sa.Buf8(256);for(Y=0;Y<256;Y++)Ka[Y]=Y>=252?6:Y>=248?5:Y>=240?4:Y>=224?3:Y>=192?
2:1;Ka[254]=Ka[254]=1;Va.string2buf=function(m){var t,E,Q,B=m.length,qa=0;for(E=0;E<B;E++){var sa=m.charCodeAt(E);55296===(64512&sa)&&E+1<B&&(t=m.charCodeAt(E+1),56320===(64512&t)&&(sa=65536+(sa-55296<<10)+(t-56320),E++));qa+=sa<128?1:sa<2048?2:sa<65536?3:4}var Ba=new Sa.Buf8(qa);for(E=Q=0;Q<qa;E++)sa=m.charCodeAt(E),55296===(64512&sa)&&E+1<B&&(t=m.charCodeAt(E+1),56320===(64512&t)&&(sa=65536+(sa-55296<<10)+(t-56320),E++)),sa<128?Ba[Q++]=sa:sa<2048?(Ba[Q++]=192|sa>>>6,Ba[Q++]=128|63&sa):sa<65536?
(Ba[Q++]=224|sa>>>12,Ba[Q++]=128|sa>>>6&63,Ba[Q++]=128|63&sa):(Ba[Q++]=240|sa>>>18,Ba[Q++]=128|sa>>>12&63,Ba[Q++]=128|sa>>>6&63,Ba[Q++]=128|63&sa);return Ba};Va.buf2binstring=function(m){return Qa(m,m.length)};Va.binstring2buf=function(m){for(var t=new Sa.Buf8(m.length),E=0,Q=t.length;E<Q;E++)t[E]=m.charCodeAt(E);return t};Va.buf2string=function(m,t){var E,Q,B,qa=t||m.length,sa=Array(2*qa);for(t=E=0;t<qa;)if(Q=m[t++],Q<128)sa[E++]=Q;else if(B=Ka[Q],B>4)sa[E++]=65533,t+=B-1;else{for(Q&=2===B?31:3===
B?15:7;B>1&&t<qa;)Q=Q<<6|63&m[t++],B--;B>1?sa[E++]=65533:Q<65536?sa[E++]=Q:(Q-=65536,sa[E++]=55296|Q>>10&1023,sa[E++]=56320|1023&Q)}return Qa(sa,E)};Va.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+Ka[m[E]]>t?E:t}},{"./common":3}],5:[function(Y,lb,Va){lb.exports=function(Qa,Sa,wa,I){var Ka=65535&Qa|0;Qa=Qa>>>16&65535|0;for(var m;0!==wa;){m=wa>2E3?2E3:wa;wa-=m;do Ka=Ka+Sa[I++]|0,Qa=Qa+Ka|0;while(--m);Ka%=65521;Qa%=
65521}return Ka|Qa<<16|0}},{}],6:[function(Y,lb,Va){lb.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(Y,lb,Va){var Qa=function(){for(var Sa,
wa=[],I=0;I<256;I++){Sa=I;for(var Ka=0;Ka<8;Ka++)Sa=1&Sa?3988292384^Sa>>>1:Sa>>>1;wa[I]=Sa}return wa}();lb.exports=function(Sa,wa,I,Ka){I=Ka+I;for(Sa^=-1;Ka<I;Ka++)Sa=Sa>>>8^Qa[255&(Sa^wa[Ka])];return Sa^-1}},{}],8:[function(Y,lb,Va){function Qa(M,kb){return M.msg=dc[kb],kb}function Sa(M){for(var kb=M.length;--kb>=0;)M[kb]=0}function wa(M){var kb=M.state,S=kb.pending;S>M.avail_out&&(S=M.avail_out);0!==S&&(Fb.arraySet(M.output,kb.pending_buf,kb.pending_out,S,M.next_out),M.next_out+=S,kb.pending_out+=
S,M.total_out+=S,M.avail_out-=S,kb.pending-=S,0===kb.pending&&(kb.pending_out=0))}function I(M,kb){ma._tr_flush_block(M,M.block_start>=0?M.block_start:-1,M.strstart-M.block_start,kb);M.block_start=M.strstart;wa(M.strm)}function Ka(M,kb){M.pending_buf[M.pending++]=kb}function m(M,kb){M.pending_buf[M.pending++]=kb>>>8&255;M.pending_buf[M.pending++]=255&kb}function t(M,kb){var S,u,F=M.max_chain_length,Za=M.strstart,N=M.prev_length,Pa=M.nice_match,Eb=M.strstart>M.w_size-qb?M.strstart-(M.w_size-qb):0,
Ua=M.window,bc=M.w_mask,ib=M.prev,bh=M.strstart+da,Gf=Ua[Za+N-1],Ve=Ua[Za+N];M.prev_length>=M.good_match&&(F>>=2);Pa>M.lookahead&&(Pa=M.lookahead);do if(S=kb,Ua[S+N]===Ve&&Ua[S+N-1]===Gf&&Ua[S]===Ua[Za]&&Ua[++S]===Ua[Za+1]){Za+=2;for(S++;Ua[++Za]===Ua[++S]&&Ua[++Za]===Ua[++S]&&Ua[++Za]===Ua[++S]&&Ua[++Za]===Ua[++S]&&Ua[++Za]===Ua[++S]&&Ua[++Za]===Ua[++S]&&Ua[++Za]===Ua[++S]&&Ua[++Za]===Ua[++S]&&Za<bh;);if(u=da-(bh-Za),Za=bh-da,u>N){if(M.match_start=kb,N=u,u>=Pa)break;Gf=Ua[Za+N-1];Ve=Ua[Za+N]}}while((kb=
ib[kb&bc])>Eb&&0!==--F);return N<=M.lookahead?N:M.lookahead}function E(M){var kb,S,u=M.w_size;do{if(S=M.window_size-M.lookahead-M.strstart,M.strstart>=u+(u-qb)){Fb.arraySet(M.window,M.window,u,u,0);M.match_start-=u;M.strstart-=u;M.block_start-=u;var F=kb=M.hash_size;do{var Za=M.head[--F];M.head[F]=Za>=u?Za-u:0}while(--kb);F=kb=u;do Za=M.prev[--F],M.prev[F]=Za>=u?Za-u:0;while(--kb);S+=u}if(0===M.strm.avail_in)break;F=M.strm;Za=M.window;var N=M.strstart+M.lookahead,Pa=F.avail_in;if(kb=(Pa>S&&(Pa=S),
0===Pa?0:(F.avail_in-=Pa,Fb.arraySet(Za,F.input,F.next_in,Pa,N),1===F.state.wrap?F.adler=jc(F.adler,Za,Pa,N):2===F.state.wrap&&(F.adler=ub(F.adler,Za,Pa,N)),F.next_in+=Pa,F.total_in+=Pa,Pa)),M.lookahead+=kb,M.lookahead+M.insert>=Ea)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+Ea-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<Ea)););
}while(M.lookahead<qb&&0!==M.strm.avail_in)}function Q(M,kb){for(var S,u;;){if(M.lookahead<qb){if(E(M),M.lookahead<qb&&kb===ha)return ua;if(0===M.lookahead)break}if(S=0,M.lookahead>=Ea&&(M.ins_h=(M.ins_h<<M.hash_shift^M.window[M.strstart+Ea-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-qb&&(M.match_length=t(M,S)),M.match_length>=Ea)if(u=ma._tr_tally(M,M.strstart-M.match_start,M.match_length-Ea),M.lookahead-=M.match_length,M.match_length<=
M.max_lazy_match&&M.lookahead>=Ea){M.match_length--;do M.strstart++,M.ins_h=(M.ins_h<<M.hash_shift^M.window[M.strstart+Ea-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 u=ma._tr_tally(M,0,M.window[M.strstart]),M.lookahead--,M.strstart++;if(u&&(I(M,!1),0===M.strm.avail_out))return ua}return M.insert=
M.strstart<Ea-1?M.strstart:Ea-1,kb===Ta?(I(M,!0),0===M.strm.avail_out?qc:Xa):M.last_lit&&(I(M,!1),0===M.strm.avail_out)?ua:Vf}function B(M,kb){for(var S,u,F;;){if(M.lookahead<qb){if(E(M),M.lookahead<qb&&kb===ha)return ua;if(0===M.lookahead)break}if(S=0,M.lookahead>=Ea&&(M.ins_h=(M.ins_h<<M.hash_shift^M.window[M.strstart+Ea-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=Ea-1,0!==S&&M.prev_length<
M.max_lazy_match&&M.strstart-S<=M.w_size-qb&&(M.match_length=t(M,S),M.match_length<=5&&(M.strategy===Ab||M.match_length===Ea&&M.strstart-M.match_start>4096)&&(M.match_length=Ea-1)),M.prev_length>=Ea&&M.match_length<=M.prev_length){F=M.strstart+M.lookahead-Ea;u=ma._tr_tally(M,M.strstart-1-M.prev_match,M.prev_length-Ea);M.lookahead-=M.prev_length-1;M.prev_length-=2;do++M.strstart<=F&&(M.ins_h=(M.ins_h<<M.hash_shift^M.window[M.strstart+Ea-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=Ea-1,M.strstart++,u&&(I(M,!1),0===M.strm.avail_out))return ua}else if(M.match_available){if(u=ma._tr_tally(M,0,M.window[M.strstart-1]),u&&I(M,!1),M.strstart++,M.lookahead--,0===M.strm.avail_out)return ua}else M.match_available=1,M.strstart++,M.lookahead--}return M.match_available&&(ma._tr_tally(M,0,M.window[M.strstart-1]),M.match_available=0),M.insert=M.strstart<Ea-1?M.strstart:Ea-1,kb===Ta?(I(M,!0),0===M.strm.avail_out?
qc:Xa):M.last_lit&&(I(M,!1),0===M.strm.avail_out)?ua:Vf}function qa(M,kb,S,u,F){this.good_length=M;this.max_lazy=kb;this.nice_length=S;this.max_chain=u;this.func=F}function sa(){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=Xd;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 Fb.Buf16(2*Dd);this.dyn_dtree=new Fb.Buf16(2*(2*Cd+1));this.bl_tree=new Fb.Buf16(2*(2*R+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 Fb.Buf16(kd+1);
this.heap=new Fb.Buf16(2*tb+1);Sa(this.heap);this.heap_max=this.heap_len=0;this.depth=new Fb.Buf16(2*tb+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 kb;return M&&M.state?(M.total_in=M.total_out=0,M.data_type=ba,kb=M.state,kb.pending=0,kb.pending_out=0,kb.wrap<0&&(kb.wrap=-kb.wrap),kb.status=kb.wrap?Nb:Wa,M.adler=2===kb.wrap?0:1,kb.last_flush=ha,ma._tr_init(kb),jb):Qa(M,ka)}
function Ma(M){var kb=Ba(M);kb===jb&&(M=M.state,M.window_size=2*M.w_size,Sa(M.head),M.max_lazy_match=U[M.level].max_lazy,M.good_match=U[M.level].good_length,M.nice_match=U[M.level].nice_length,M.max_chain_length=U[M.level].max_chain,M.strstart=0,M.block_start=0,M.lookahead=0,M.insert=0,M.match_length=M.prev_length=Ea-1,M.match_available=0,M.ins_h=0);return kb}function hc(M,kb,S,u,F,Za){if(!M)return ka;var N=1;if(kb===Ia&&(kb=6),u<0?(N=0,u=-u):u>15&&(N=2,u-=16),F<1||F>bd||S!==Xd||u<8||u>15||kb<0||
kb>9||Za<0||Za>Da)return Qa(M,ka);8===u&&(u=9);var Pa=new sa;return M.state=Pa,Pa.strm=M,Pa.wrap=N,Pa.gzhead=null,Pa.w_bits=u,Pa.w_size=1<<Pa.w_bits,Pa.w_mask=Pa.w_size-1,Pa.hash_bits=F+7,Pa.hash_size=1<<Pa.hash_bits,Pa.hash_mask=Pa.hash_size-1,Pa.hash_shift=~~((Pa.hash_bits+Ea-1)/Ea),Pa.window=new Fb.Buf8(2*Pa.w_size),Pa.head=new Fb.Buf16(Pa.hash_size),Pa.prev=new Fb.Buf16(Pa.w_size),Pa.lit_bufsize=1<<F+6,Pa.pending_buf_size=4*Pa.lit_bufsize,Pa.pending_buf=new Fb.Buf8(Pa.pending_buf_size),Pa.d_buf=
1*Pa.lit_bufsize,Pa.l_buf=3*Pa.lit_bufsize,Pa.level=kb,Pa.strategy=Za,Pa.method=S,Ma(M)}var Fb=Y("../utils/common"),ma=Y("./trees"),jc=Y("./adler32"),ub=Y("./crc32"),dc=Y("./messages"),ha=0,Ta=4,jb=0,ka=-2,Ia=-1,Ab=1,Da=4,ba=2,Xd=8,bd=9,tb=286,Cd=30,R=19,Dd=2*tb+1,kd=15,Ea=3,da=258,qb=da+Ea+1,Nb=42,Wa=113,ua=1,Vf=2,qc=3,Xa=4;var U=[new qa(0,0,0,0,function(M,kb){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&&kb===ha)return ua;if(0===
M.lookahead)break}M.strstart+=M.lookahead;M.lookahead=0;var u=M.block_start+S;if((0===M.strstart||M.strstart>=u)&&(M.lookahead=M.strstart-u,M.strstart=u,I(M,!1),0===M.strm.avail_out)||M.strstart-M.block_start>=M.w_size-qb&&(I(M,!1),0===M.strm.avail_out))return ua}return M.insert=0,kb===Ta?(I(M,!0),0===M.strm.avail_out?qc:Xa):(M.strstart>M.block_start&&I(M,!1),ua)}),new qa(4,4,8,4,Q),new qa(4,5,16,8,Q),new qa(4,6,32,32,Q),new qa(4,4,16,16,B),new qa(8,16,32,32,B),new qa(8,16,128,128,B),new qa(8,32,
128,256,B),new qa(32,128,258,1024,B),new qa(32,258,258,4096,B)];Va.deflateInit=function(M,kb){return hc(M,kb,Xd,15,8,0)};Va.deflateInit2=hc;Va.deflateReset=Ma;Va.deflateResetKeep=Ba;Va.deflateSetHeader=function(M,kb){return M&&M.state?2!==M.state.wrap?ka:(M.state.gzhead=kb,jb):ka};Va.deflate=function(M,kb){var S,u;if(!M||!M.state||kb>5||kb<0)return M?Qa(M,ka):ka;if(u=M.state,!M.output||!M.input&&0!==M.avail_in||u.status===666&&kb!==Ta)return Qa(M,0===M.avail_out?-5:ka);if(u.strm=M,S=u.last_flush,
u.last_flush=kb,u.status===Nb)if(2===u.wrap)M.adler=0,Ka(u,31),Ka(u,139),Ka(u,8),u.gzhead?(Ka(u,(u.gzhead.text?1:0)+(u.gzhead.hcrc?2:0)+(u.gzhead.extra?4:0)+(u.gzhead.name?8:0)+(u.gzhead.comment?16:0)),Ka(u,255&u.gzhead.time),Ka(u,u.gzhead.time>>8&255),Ka(u,u.gzhead.time>>16&255),Ka(u,u.gzhead.time>>24&255),Ka(u,9===u.level?2:u.strategy>=2||u.level<2?4:0),Ka(u,255&u.gzhead.os),u.gzhead.extra&&u.gzhead.extra.length&&(Ka(u,255&u.gzhead.extra.length),Ka(u,u.gzhead.extra.length>>8&255)),u.gzhead.hcrc&&
(M.adler=ub(M.adler,u.pending_buf,u.pending,0)),u.gzindex=0,u.status=69):(Ka(u,0),Ka(u,0),Ka(u,0),Ka(u,0),Ka(u,0),Ka(u,9===u.level?2:u.strategy>=2||u.level<2?4:0),Ka(u,3),u.status=Wa);else{var F=Xd+(u.w_bits-8<<4)<<8;F|=(u.strategy>=2||u.level<2?0:u.level<6?1:6===u.level?2:3)<<6;0!==u.strstart&&(F|=32);u.status=Wa;m(u,F+(31-F%31));0!==u.strstart&&(m(u,M.adler>>>16),m(u,65535&M.adler));M.adler=1}if(u.status===69)if(u.gzhead.extra){for(F=u.pending;u.gzindex<(65535&u.gzhead.extra.length)&&(u.pending!==
u.pending_buf_size||(u.gzhead.hcrc&&u.pending>F&&(M.adler=ub(M.adler,u.pending_buf,u.pending-F,F)),wa(M),F=u.pending,u.pending!==u.pending_buf_size));)Ka(u,255&u.gzhead.extra[u.gzindex]),u.gzindex++;u.gzhead.hcrc&&u.pending>F&&(M.adler=ub(M.adler,u.pending_buf,u.pending-F,F));u.gzindex===u.gzhead.extra.length&&(u.gzindex=0,u.status=73)}else u.status=73;if(u.status===73)if(u.gzhead.name){F=u.pending;do{if(u.pending===u.pending_buf_size&&(u.gzhead.hcrc&&u.pending>F&&(M.adler=ub(M.adler,u.pending_buf,
u.pending-F,F)),wa(M),F=u.pending,u.pending===u.pending_buf_size)){var Za=1;break}Za=u.gzindex<u.gzhead.name.length?255&u.gzhead.name.charCodeAt(u.gzindex++):0;Ka(u,Za)}while(0!==Za);u.gzhead.hcrc&&u.pending>F&&(M.adler=ub(M.adler,u.pending_buf,u.pending-F,F));0===Za&&(u.gzindex=0,u.status=91)}else u.status=91;if(u.status===91)if(u.gzhead.comment){F=u.pending;do{if(u.pending===u.pending_buf_size&&(u.gzhead.hcrc&&u.pending>F&&(M.adler=ub(M.adler,u.pending_buf,u.pending-F,F)),wa(M),F=u.pending,u.pending===
u.pending_buf_size)){Za=1;break}Za=u.gzindex<u.gzhead.comment.length?255&u.gzhead.comment.charCodeAt(u.gzindex++):0;Ka(u,Za)}while(0!==Za);u.gzhead.hcrc&&u.pending>F&&(M.adler=ub(M.adler,u.pending_buf,u.pending-F,F));0===Za&&(u.status=103)}else u.status=103;if(u.status===103&&(u.gzhead.hcrc?(u.pending+2>u.pending_buf_size&&wa(M),u.pending+2<=u.pending_buf_size&&(Ka(u,255&M.adler),Ka(u,M.adler>>8&255),M.adler=0,u.status=Wa)):u.status=Wa),0!==u.pending){if(wa(M),0===M.avail_out)return u.last_flush=
-1,jb}else if(0===M.avail_in&&(kb<<1)-(kb>4?9:0)<=(S<<1)-(S>4?9:0)&&kb!==Ta)return Qa(M,-5);if(u.status===666&&0!==M.avail_in)return Qa(M,-5);if(0!==M.avail_in||0!==u.lookahead||kb!==ha&&u.status!==666){if(u.strategy===2)a:{for(var N;;){if(0===u.lookahead&&(E(u),0===u.lookahead)){if(kb===ha){var Pa=ua;break a}break}if(u.match_length=0,N=ma._tr_tally(u,0,u.window[u.strstart]),u.lookahead--,u.strstart++,N&&(I(u,!1),0===u.strm.avail_out)){Pa=ua;break a}}Pa=(u.insert=0,kb===Ta?(I(u,!0),0===u.strm.avail_out?
qc:Xa):u.last_lit&&(I(u,!1),0===u.strm.avail_out)?ua:Vf)}else if(u.strategy===3)a:{var Eb,Ua;for(N=u.window;;){if(u.lookahead<=da){if(E(u),u.lookahead<=da&&kb===ha){Pa=ua;break a}if(0===u.lookahead)break}if(u.match_length=0,u.lookahead>=Ea&&u.strstart>0&&(Ua=u.strstart-1,Eb=N[Ua],Eb===N[++Ua]&&Eb===N[++Ua]&&Eb===N[++Ua])){for(S=u.strstart+da;Eb===N[++Ua]&&Eb===N[++Ua]&&Eb===N[++Ua]&&Eb===N[++Ua]&&Eb===N[++Ua]&&Eb===N[++Ua]&&Eb===N[++Ua]&&Eb===N[++Ua]&&Ua<S;);u.match_length=da-(S-Ua);u.match_length>
u.lookahead&&(u.match_length=u.lookahead)}if(u.match_length>=Ea?(Pa=ma._tr_tally(u,1,u.match_length-Ea),u.lookahead-=u.match_length,u.strstart+=u.match_length,u.match_length=0):(Pa=ma._tr_tally(u,0,u.window[u.strstart]),u.lookahead--,u.strstart++),Pa&&(I(u,!1),0===u.strm.avail_out)){Pa=ua;break a}}Pa=(u.insert=0,kb===Ta?(I(u,!0),0===u.strm.avail_out?qc:Xa):u.last_lit&&(I(u,!1),0===u.strm.avail_out)?ua:Vf)}else Pa=U[u.level].func(u,kb);if(Pa!==qc&&Pa!==Xa||(u.status=666),Pa===ua||Pa===qc)return 0===
M.avail_out&&(u.last_flush=-1),jb;if(Pa===Vf&&(kb===1?ma._tr_align(u):kb!==5&&(ma._tr_stored_block(u,0,0,!1),kb===3&&(Sa(u.head),0===u.lookahead&&(u.strstart=0,u.block_start=0,u.insert=0))),wa(M),0===M.avail_out))return u.last_flush=-1,jb}return kb!==Ta?jb:u.wrap<=0?1:(2===u.wrap?(Ka(u,255&M.adler),Ka(u,M.adler>>8&255),Ka(u,M.adler>>16&255),Ka(u,M.adler>>24&255),Ka(u,255&M.total_in),Ka(u,M.total_in>>8&255),Ka(u,M.total_in>>16&255),Ka(u,M.total_in>>24&255)):(m(u,M.adler>>>16),m(u,65535&M.adler)),wa(M),
u.wrap>0&&(u.wrap=-u.wrap),0!==u.pending?jb:1)};Va.deflateEnd=function(M){var kb;return M&&M.state?(kb=M.state.status,kb!==Nb&&kb!==69&&kb!==73&&kb!==91&&kb!==103&&kb!==Wa&&kb!==666?Qa(M,ka):(M.state=null,kb===Wa?Qa(M,-3):jb)):ka};Va.deflateSetDictionary=function(M,kb){var S,u,F;var Za=kb.length;if(!M||!M.state||(S=M.state,u=S.wrap,2===u||1===u&&S.status!==Nb||S.lookahead))return ka;1===u&&(M.adler=jc(M.adler,kb,Za,0));S.wrap=0;Za>=S.w_size&&(0===u&&(Sa(S.head),S.strstart=0,S.block_start=0,S.insert=
0),F=new Fb.Buf8(S.w_size),Fb.arraySet(F,kb,Za-S.w_size,S.w_size,0),kb=F,Za=S.w_size);F=M.avail_in;var N=M.next_in;var Pa=M.input;M.avail_in=Za;M.next_in=0;M.input=kb;for(E(S);S.lookahead>=Ea;){kb=S.strstart;Za=S.lookahead-(Ea-1);do S.ins_h=(S.ins_h<<S.hash_shift^S.window[kb+Ea-1])&S.hash_mask,S.prev[kb&S.w_mask]=S.head[S.ins_h],S.head[S.ins_h]=kb,kb++;while(--Za);S.strstart=kb;S.lookahead=Ea-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=Ea-1,S.match_available=0,M.next_in=N,M.input=Pa,M.avail_in=F,S.wrap=u,jb};Va.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":3,"./adler32":5,"./crc32":7,"./messages":13,"./trees":14}],9:[function(Y,lb,Va){lb.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(Y,lb,Va){lb.exports=function(Qa,Sa){var wa,I,Ka;var m=Qa.state;var t=Qa.next_in;var E=Qa.input;
var Q=t+(Qa.avail_in-5);var B=Qa.next_out;var qa=Qa.output;Sa=B-(Sa-Qa.avail_out);var sa=B+(Qa.avail_out-257);var Ba=m.dmax;var Ma=m.wsize;var hc=m.whave;var Fb=m.wnext;var ma=m.window;var jc=m.hold;var ub=m.bits;var dc=m.lencode;var ha=m.distcode;var Ta=(1<<m.lenbits)-1;var jb=(1<<m.distbits)-1;a:do{ub<15&&(jc+=E[t++]<<ub,ub+=8,jc+=E[t++]<<ub,ub+=8);var ka=dc[jc&Ta];b:for(;;){if(wa=ka>>>24,jc>>>=wa,ub-=wa,wa=ka>>>16&255,0===wa)qa[B++]=65535&ka;else{if(!(16&wa)){if(0===(64&wa)){ka=dc[(65535&ka)+(jc&
(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 Ia=65535&ka;(wa&=15)&&(ub<wa&&(jc+=E[t++]<<ub,ub+=8),Ia+=jc&(1<<wa)-1,jc>>>=wa,ub-=wa);ub<15&&(jc+=E[t++]<<ub,ub+=8,jc+=E[t++]<<ub,ub+=8);ka=ha[jc&jb];c:for(;;){if(wa=ka>>>24,jc>>>=wa,ub-=wa,wa=ka>>>16&255,!(16&wa)){if(0===(64&wa)){ka=ha[(65535&ka)+(jc&(1<<wa)-1)];continue c}Qa.msg="invalid distance code";m.mode=30;break a}if(I=65535&ka,wa&=15,ub<wa&&(jc+=E[t++]<<ub,ub+=8,ub<wa&&(jc+=E[t++]<<
ub,ub+=8)),I+=jc&(1<<wa)-1,I>Ba){Qa.msg="invalid distance too far back";m.mode=30;break a}if(jc>>>=wa,ub-=wa,wa=B-Sa,I>wa){if(wa=I-wa,wa>hc&&m.sane){Qa.msg="invalid distance too far back";m.mode=30;break a}if(ka=0,Ka=ma,0===Fb){if(ka+=Ma-wa,wa<Ia){Ia-=wa;do qa[B++]=ma[ka++];while(--wa);ka=B-I;Ka=qa}}else if(Fb<wa){if(ka+=Ma+Fb-wa,wa-=Fb,wa<Ia){Ia-=wa;do qa[B++]=ma[ka++];while(--wa);if(ka=0,Fb<Ia){wa=Fb;Ia-=wa;do qa[B++]=ma[ka++];while(--wa);ka=B-I;Ka=qa}}}else if(ka+=Fb-wa,wa<Ia){Ia-=wa;do qa[B++]=
ma[ka++];while(--wa);ka=B-I;Ka=qa}for(;Ia>2;)qa[B++]=Ka[ka++],qa[B++]=Ka[ka++],qa[B++]=Ka[ka++],Ia-=3;Ia&&(qa[B++]=Ka[ka++],Ia>1&&(qa[B++]=Ka[ka++]))}else{ka=B-I;do qa[B++]=qa[ka++],qa[B++]=qa[ka++],qa[B++]=qa[ka++],Ia-=3;while(Ia>2);Ia&&(qa[B++]=qa[ka++],Ia>1&&(qa[B++]=qa[ka++]))}break}}break}}while(t<Q&&B<sa);Ia=ub>>3;t-=Ia;ub-=Ia<<3;Qa.next_in=t;Qa.next_out=B;Qa.avail_in=t<Q?5+(Q-t):5-(t-Q);Qa.avail_out=B<sa?257+(sa-B):257-(B-sa);m.hold=jc&(1<<ub)-1;m.bits=ub}},{}],11:[function(Y,lb,Va){function Qa(ha){return(ha>>>
24&255)+(ha>>>8&65280)+((65280&ha)<<8)+((255&ha)<<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(ha){var Ta;return ha&&ha.state?(Ta=ha.state,ha.total_in=ha.total_out=Ta.total=0,ha.msg="",Ta.wrap&&(ha.adler=1&Ta.wrap),Ta.mode=ma,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(jc),Ta.distcode=Ta.distdyn=new B.Buf32(ub),Ta.sane=1,Ta.back=-1,hc):Fb}function I(ha){var Ta;return ha&&ha.state?(Ta=ha.state,Ta.wsize=0,Ta.whave=0,Ta.wnext=0,wa(ha)):Fb}function Ka(ha,Ta){var jb,ka;return ha&&ha.state?(ka=
ha.state,Ta<0?(jb=0,Ta=-Ta):(jb=(Ta>>4)+1,Ta<48&&(Ta&=15)),Ta&&(Ta<8||Ta>15)?Fb:(null!==ka.window&&ka.wbits!==Ta&&(ka.window=null),ka.wrap=jb,ka.wbits=Ta,I(ha))):Fb}function m(ha,Ta){var jb,ka;return ha?(ka=new Sa,ha.state=ka,ka.window=null,jb=Ka(ha,Ta),jb!==hc&&(ha.state=null),jb):Fb}function t(ha,Ta,jb,ka){var Ia;ha=ha.state;return null===ha.window&&(ha.wsize=1<<ha.wbits,ha.wnext=0,ha.whave=0,ha.window=new B.Buf8(ha.wsize)),ka>=ha.wsize?(B.arraySet(ha.window,Ta,jb-ha.wsize,ha.wsize,0),ha.wnext=
0,ha.whave=ha.wsize):(Ia=ha.wsize-ha.wnext,Ia>ka&&(Ia=ka),B.arraySet(ha.window,Ta,jb-ka,Ia,ha.wnext),ka-=Ia,ka?(B.arraySet(ha.window,Ta,jb-ka,ka,0),ha.wnext=ka,ha.whave=ha.wsize):(ha.wnext+=Ia,ha.wnext===ha.wsize&&(ha.wnext=0),ha.whave<ha.wsize&&(ha.whave+=Ia))),0}var E,Q,B=Y("../utils/common"),qa=Y("./adler32"),sa=Y("./crc32"),Ba=Y("./inffast"),Ma=Y("./inftrees"),hc=0,Fb=-2,ma=1,jc=852,ub=592,dc=!0;Va.inflateReset=I;Va.inflateReset2=Ka;Va.inflateResetKeep=wa;Va.inflateInit=function(ha){return m(ha,
15)};Va.inflateInit2=m;Va.inflate=function(ha,Ta){var jb,ka,Ia,Ab,Da,ba,Xd,bd=0,tb=new B.Buf8(4),Cd=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!ha||!ha.state||!ha.output||!ha.input&&0!==ha.avail_in)return Fb;var R=ha.state;R.mode===12&&(R.mode=13);var Dd=ha.next_out;var kd=ha.output;var Ea=ha.avail_out;var da=ha.next_in;var qb=ha.input;var Nb=ha.avail_in;var Wa=R.hold;var ua=R.bits;var Vf=Nb;var qc=Ea;var Xa=hc;a:for(;;)switch(R.mode){case ma:if(0===R.wrap){R.mode=13;break}for(;ua<16;){if(0===
Nb)break a;Nb--;Wa+=qb[da++]<<ua;ua+=8}if(2&R.wrap&&35615===Wa){R.check=0;tb[0]=255&Wa;tb[1]=Wa>>>8&255;R.check=sa(R.check,tb,2,0);ua=Wa=0;R.mode=2;break}if(R.flags=0,R.head&&(R.head.done=!1),!(1&R.wrap)||(((255&Wa)<<8)+(Wa>>8))%31){ha.msg="incorrect header check";R.mode=30;break}if((15&Wa)!==8){ha.msg="unknown compression method";R.mode=30;break}if(Wa>>>=4,ua-=4,ba=(15&Wa)+8,0===R.wbits)R.wbits=ba;else if(ba>R.wbits){ha.msg="invalid window size";R.mode=30;break}R.dmax=1<<ba;ha.adler=R.check=1;R.mode=
512&Wa?10:12;ua=Wa=0;break;case 2:for(;ua<16;){if(0===Nb)break a;Nb--;Wa+=qb[da++]<<ua;ua+=8}if(R.flags=Wa,(255&R.flags)!==8){ha.msg="unknown compression method";R.mode=30;break}if(57344&R.flags){ha.msg="unknown header flags set";R.mode=30;break}R.head&&(R.head.text=Wa>>8&1);512&R.flags&&(tb[0]=255&Wa,tb[1]=Wa>>>8&255,R.check=sa(R.check,tb,2,0));ua=Wa=0;R.mode=3;case 3:for(;ua<32;){if(0===Nb)break a;Nb--;Wa+=qb[da++]<<ua;ua+=8}R.head&&(R.head.time=Wa);512&R.flags&&(tb[0]=255&Wa,tb[1]=Wa>>>8&255,tb[2]=
Wa>>>16&255,tb[3]=Wa>>>24&255,R.check=sa(R.check,tb,4,0));ua=Wa=0;R.mode=4;case 4:for(;ua<16;){if(0===Nb)break a;Nb--;Wa+=qb[da++]<<ua;ua+=8}R.head&&(R.head.xflags=255&Wa,R.head.os=Wa>>8);512&R.flags&&(tb[0]=255&Wa,tb[1]=Wa>>>8&255,R.check=sa(R.check,tb,2,0));ua=Wa=0;R.mode=5;case 5:if(1024&R.flags){for(;ua<16;){if(0===Nb)break a;Nb--;Wa+=qb[da++]<<ua;ua+=8}R.length=Wa;R.head&&(R.head.extra_len=Wa);512&R.flags&&(tb[0]=255&Wa,tb[1]=Wa>>>8&255,R.check=sa(R.check,tb,2,0));ua=Wa=0}else R.head&&(R.head.extra=
null);R.mode=6;case 6:if(1024&R.flags&&(jb=R.length,jb>Nb&&(jb=Nb),jb&&(R.head&&(ba=R.head.extra_len-R.length,R.head.extra||(R.head.extra=Array(R.head.extra_len)),B.arraySet(R.head.extra,qb,da,jb,ba)),512&R.flags&&(R.check=sa(R.check,qb,jb,da)),Nb-=jb,da+=jb,R.length-=jb),R.length))break a;R.length=0;R.mode=7;case 7:if(2048&R.flags){if(0===Nb)break a;jb=0;do ba=qb[da+jb++],R.head&&ba&&R.length<65536&&(R.head.name+=String.fromCharCode(ba));while(ba&&jb<Nb);if(512&R.flags&&(R.check=sa(R.check,qb,jb,
da)),Nb-=jb,da+=jb,ba)break a}else R.head&&(R.head.name=null);R.length=0;R.mode=8;case 8:if(4096&R.flags){if(0===Nb)break a;jb=0;do ba=qb[da+jb++],R.head&&ba&&R.length<65536&&(R.head.comment+=String.fromCharCode(ba));while(ba&&jb<Nb);if(512&R.flags&&(R.check=sa(R.check,qb,jb,da)),Nb-=jb,da+=jb,ba)break a}else R.head&&(R.head.comment=null);R.mode=9;case 9:if(512&R.flags){for(;ua<16;){if(0===Nb)break a;Nb--;Wa+=qb[da++]<<ua;ua+=8}if(Wa!==(65535&R.check)){ha.msg="header crc mismatch";R.mode=30;break}ua=
Wa=0}R.head&&(R.head.hcrc=R.flags>>9&1,R.head.done=!0);ha.adler=R.check=0;R.mode=12;break;case 10:for(;ua<32;){if(0===Nb)break a;Nb--;Wa+=qb[da++]<<ua;ua+=8}ha.adler=R.check=Qa(Wa);ua=Wa=0;R.mode=11;case 11:if(0===R.havedict)return ha.next_out=Dd,ha.avail_out=Ea,ha.next_in=da,ha.avail_in=Nb,R.hold=Wa,R.bits=ua,2;ha.adler=R.check=1;R.mode=12;case 12:if(Ta===5||Ta===6)break a;case 13:if(R.last){Wa>>>=7&ua;ua-=7&ua;R.mode=27;break}for(;ua<3;){if(0===Nb)break a;Nb--;Wa+=qb[da++]<<ua;ua+=8}switch(R.last=
1&Wa,Wa>>>=1,--ua,3&Wa){case 0:R.mode=14;break;case 1:var U=R;if(dc){E=new B.Buf32(512);Q=new B.Buf32(32);for(Ia=0;Ia<144;)U.lens[Ia++]=8;for(;Ia<256;)U.lens[Ia++]=9;for(;Ia<280;)U.lens[Ia++]=7;for(;Ia<288;)U.lens[Ia++]=8;Ma(1,U.lens,0,288,E,0,U.work,{bits:9});for(Ia=0;Ia<32;)U.lens[Ia++]=5;Ma(2,U.lens,0,32,Q,0,U.work,{bits:5});dc=!1}U.lencode=E;U.lenbits=9;U.distcode=Q;U.distbits=5;if(R.mode=20,Ta===6){Wa>>>=2;ua-=2;break a}break;case 2:R.mode=17;break;case 3:ha.msg="invalid block type",R.mode=30}Wa>>>=
2;ua-=2;break;case 14:Wa>>>=7&ua;for(ua-=7&ua;ua<32;){if(0===Nb)break a;Nb--;Wa+=qb[da++]<<ua;ua+=8}if((65535&Wa)!==(Wa>>>16^65535)){ha.msg="invalid stored block lengths";R.mode=30;break}if(R.length=65535&Wa,Wa=0,ua=0,R.mode=15,Ta===6)break a;case 15:R.mode=16;case 16:if(jb=R.length){if(jb>Nb&&(jb=Nb),jb>Ea&&(jb=Ea),0===jb)break a;B.arraySet(kd,qb,da,jb,Dd);Nb-=jb;da+=jb;Ea-=jb;Dd+=jb;R.length-=jb;break}R.mode=12;break;case 17:for(;ua<14;){if(0===Nb)break a;Nb--;Wa+=qb[da++]<<ua;ua+=8}if(R.nlen=(31&
Wa)+257,Wa>>>=5,ua-=5,R.ndist=(31&Wa)+1,Wa>>>=5,ua-=5,R.ncode=(15&Wa)+4,Wa>>>=4,ua-=4,R.nlen>286||R.ndist>30){ha.msg="too many length or distance symbols";R.mode=30;break}R.have=0;R.mode=18;case 18:for(;R.have<R.ncode;){for(;ua<3;){if(0===Nb)break a;Nb--;Wa+=qb[da++]<<ua;ua+=8}R.lens[Cd[R.have++]]=7&Wa;Wa>>>=3;ua-=3}for(;R.have<19;)R.lens[Cd[R.have++]]=0;if(R.lencode=R.lendyn,R.lenbits=7,Xd={bits:R.lenbits},Xa=Ma(0,R.lens,0,19,R.lencode,0,R.work,Xd),R.lenbits=Xd.bits,Xa){ha.msg="invalid code lengths set";
R.mode=30;break}R.have=0;R.mode=19;case 19:for(;R.have<R.nlen+R.ndist;){for(;bd=R.lencode[Wa&(1<<R.lenbits)-1],Ab=bd>>>24,U=65535&bd,!(Ab<=ua);){if(0===Nb)break a;Nb--;Wa+=qb[da++]<<ua;ua+=8}if(U<16)Wa>>>=Ab,ua-=Ab,R.lens[R.have++]=U;else{if(16===U){for(Ia=Ab+2;ua<Ia;){if(0===Nb)break a;Nb--;Wa+=qb[da++]<<ua;ua+=8}if(Wa>>>=Ab,ua-=Ab,0===R.have){ha.msg="invalid bit length repeat";R.mode=30;break}ba=R.lens[R.have-1];jb=3+(3&Wa);Wa>>>=2;ua-=2}else if(17===U){for(Ia=Ab+3;ua<Ia;){if(0===Nb)break a;Nb--;
Wa+=qb[da++]<<ua;ua+=8}Wa>>>=Ab;ua-=Ab;ba=0;jb=3+(7&Wa);Wa>>>=3;ua-=3}else{for(Ia=Ab+7;ua<Ia;){if(0===Nb)break a;Nb--;Wa+=qb[da++]<<ua;ua+=8}Wa>>>=Ab;ua-=Ab;ba=0;jb=11+(127&Wa);Wa>>>=7;ua-=7}if(R.have+jb>R.nlen+R.ndist){ha.msg="invalid bit length repeat";R.mode=30;break}for(;jb--;)R.lens[R.have++]=ba}}if(R.mode===30)break;if(0===R.lens[256]){ha.msg="invalid code -- missing end-of-block";R.mode=30;break}if(R.lenbits=9,Xd={bits:R.lenbits},Xa=Ma(1,R.lens,0,R.nlen,R.lencode,0,R.work,Xd),R.lenbits=Xd.bits,
Xa){ha.msg="invalid literal/lengths set";R.mode=30;break}if(R.distbits=6,R.distcode=R.distdyn,Xd={bits:R.distbits},Xa=Ma(2,R.lens,R.nlen,R.ndist,R.distcode,0,R.work,Xd),R.distbits=Xd.bits,Xa){ha.msg="invalid distances set";R.mode=30;break}if(R.mode=20,Ta===6)break a;case 20:R.mode=21;case 21:if(Nb>=6&&Ea>=258){ha.next_out=Dd;ha.avail_out=Ea;ha.next_in=da;ha.avail_in=Nb;R.hold=Wa;R.bits=ua;Ba(ha,qc);Dd=ha.next_out;kd=ha.output;Ea=ha.avail_out;da=ha.next_in;qb=ha.input;Nb=ha.avail_in;Wa=R.hold;ua=R.bits;
R.mode===12&&(R.back=-1);break}for(R.back=0;bd=R.lencode[Wa&(1<<R.lenbits)-1],Ab=bd>>>24,Ia=bd>>>16&255,U=65535&bd,!(Ab<=ua);){if(0===Nb)break a;Nb--;Wa+=qb[da++]<<ua;ua+=8}if(Ia&&0===(240&Ia)){var M=Ab;var kb=Ia;for(Da=U;bd=R.lencode[Da+((Wa&(1<<M+kb)-1)>>M)],Ab=bd>>>24,Ia=bd>>>16&255,U=65535&bd,!(M+Ab<=ua);){if(0===Nb)break a;Nb--;Wa+=qb[da++]<<ua;ua+=8}Wa>>>=M;ua-=M;R.back+=M}if(Wa>>>=Ab,ua-=Ab,R.back+=Ab,R.length=U,0===Ia){R.mode=26;break}if(32&Ia){R.back=-1;R.mode=12;break}if(64&Ia){ha.msg="invalid literal/length code";
R.mode=30;break}R.extra=15&Ia;R.mode=22;case 22:if(R.extra){for(Ia=R.extra;ua<Ia;){if(0===Nb)break a;Nb--;Wa+=qb[da++]<<ua;ua+=8}R.length+=Wa&(1<<R.extra)-1;Wa>>>=R.extra;ua-=R.extra;R.back+=R.extra}R.was=R.length;R.mode=23;case 23:for(;bd=R.distcode[Wa&(1<<R.distbits)-1],Ab=bd>>>24,Ia=bd>>>16&255,U=65535&bd,!(Ab<=ua);){if(0===Nb)break a;Nb--;Wa+=qb[da++]<<ua;ua+=8}if(0===(240&Ia)){M=Ab;kb=Ia;for(Da=U;bd=R.distcode[Da+((Wa&(1<<M+kb)-1)>>M)],Ab=bd>>>24,Ia=bd>>>16&255,U=65535&bd,!(M+Ab<=ua);){if(0===
Nb)break a;Nb--;Wa+=qb[da++]<<ua;ua+=8}Wa>>>=M;ua-=M;R.back+=M}if(Wa>>>=Ab,ua-=Ab,R.back+=Ab,64&Ia){ha.msg="invalid distance code";R.mode=30;break}R.offset=U;R.extra=15&Ia;R.mode=24;case 24:if(R.extra){for(Ia=R.extra;ua<Ia;){if(0===Nb)break a;Nb--;Wa+=qb[da++]<<ua;ua+=8}R.offset+=Wa&(1<<R.extra)-1;Wa>>>=R.extra;ua-=R.extra;R.back+=R.extra}if(R.offset>R.dmax){ha.msg="invalid distance too far back";R.mode=30;break}R.mode=25;case 25:if(0===Ea)break a;if(jb=qc-Ea,R.offset>jb){if(jb=R.offset-jb,jb>R.whave&&
R.sane){ha.msg="invalid distance too far back";R.mode=30;break}jb>R.wnext?(jb-=R.wnext,ka=R.wsize-jb):ka=R.wnext-jb;jb>R.length&&(jb=R.length);Ia=R.window}else Ia=kd,ka=Dd-R.offset,jb=R.length;jb>Ea&&(jb=Ea);Ea-=jb;R.length-=jb;do kd[Dd++]=Ia[ka++];while(--jb);0===R.length&&(R.mode=21);break;case 26:if(0===Ea)break a;kd[Dd++]=R.length;Ea--;R.mode=21;break;case 27:if(R.wrap){for(;ua<32;){if(0===Nb)break a;Nb--;Wa|=qb[da++]<<ua;ua+=8}if(qc-=Ea,ha.total_out+=qc,R.total+=qc,qc&&(ha.adler=R.check=R.flags?
sa(R.check,kd,qc,Dd-qc):qa(R.check,kd,qc,Dd-qc)),qc=Ea,(R.flags?Wa:Qa(Wa))!==R.check){ha.msg="incorrect data check";R.mode=30;break}ua=Wa=0}R.mode=28;case 28:if(R.wrap&&R.flags){for(;ua<32;){if(0===Nb)break a;Nb--;Wa+=qb[da++]<<ua;ua+=8}if(Wa!==(4294967295&R.total)){ha.msg="incorrect length check";R.mode=30;break}ua=Wa=0}R.mode=29;case 29:Xa=1;break a;case 30:Xa=-3;break a;case 31:return-4;default:return Fb}return ha.next_out=Dd,ha.avail_out=Ea,ha.next_in=da,ha.avail_in=Nb,R.hold=Wa,R.bits=ua,(R.wsize||
qc!==ha.avail_out&&R.mode<30&&(R.mode<27||Ta!==4))&&t(ha,ha.output,ha.next_out,qc-ha.avail_out)?(R.mode=31,-4):(Vf-=ha.avail_in,qc-=ha.avail_out,ha.total_in+=Vf,ha.total_out+=qc,R.total+=qc,R.wrap&&qc&&(ha.adler=R.check=R.flags?sa(R.check,kd,qc,ha.next_out-qc):qa(R.check,kd,qc,ha.next_out-qc)),ha.data_type=R.bits+(R.last?64:0)+(R.mode===12?128:0)+(R.mode===20||R.mode===15?256:0),(0===Vf&&0===qc||Ta===4)&&Xa===hc&&(Xa=-5),Xa)};Va.inflateEnd=function(ha){if(!ha||!ha.state)return Fb;var Ta=ha.state;
return Ta.window&&(Ta.window=null),ha.state=null,hc};Va.inflateGetHeader=function(ha,Ta){var jb;return ha&&ha.state?(jb=ha.state,0===(2&jb.wrap)?Fb:(jb.head=Ta,Ta.done=!1,hc)):Fb};Va.inflateSetDictionary=function(ha,Ta){var jb,ka,Ia=Ta.length;return ha&&ha.state?(jb=ha.state,0!==jb.wrap&&jb.mode!==11?Fb:jb.mode===11&&(ka=1,ka=qa(ka,Ta,Ia,0),ka!==jb.check)?-3:t(ha,Ta,Ia,Ia)?(jb.mode=31,-4):(jb.havedict=1,hc)):Fb};Va.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":3,"./adler32":5,
"./crc32":7,"./inffast":10,"./inftrees":12}],12:[function(Y,lb,Va){var Qa=Y("../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],Ka=[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];lb.exports=function(m,t,E,Q,B,qa,sa,Ba){var Ma,hc,Fb,ma,jc,ub,dc=Ba.bits,ha,Ta,jb,ka,Ia,Ab=0,Da,ba=null,Xd=0,bd=new Qa.Buf16(16);var tb=new Qa.Buf16(16);var Cd=null,R=0;for(ha=0;ha<=15;ha++)bd[ha]=0;for(Ta=0;Ta<Q;Ta++)bd[t[E+Ta]]++;var Dd=dc;for(jb=15;jb>=1&&0===bd[jb];jb--);if(Dd>jb&&(Dd=jb),0===jb)return B[qa++]=20971520,B[qa++]=20971520,Ba.bits=1,0;for(dc=1;dc<jb&&0===bd[dc];dc++);Dd<dc&&(Dd=dc);for(ha=Ma=1;ha<=15;ha++)if(Ma<<=1,Ma-=bd[ha],Ma<0)return-1;if(Ma>0&&(m===0||1!==jb))return-1;
tb[1]=0;for(ha=1;ha<15;ha++)tb[ha+1]=tb[ha]+bd[ha];for(Ta=0;Ta<Q;Ta++)0!==t[E+Ta]&&(sa[tb[t[E+Ta]]++]=Ta);if(m===0?(ba=Cd=sa,ma=19):m===1?(ba=Sa,Xd-=257,Cd=wa,R-=257,ma=256):(ba=I,Cd=Ka,ma=-1),Da=0,Ta=0,ha=dc,tb=qa,ka=Dd,Ia=0,Fb=-1,Ab=1<<Dd,Q=Ab-1,m===1&&Ab>852||m===2&&Ab>592)return 1;for(var kd=0;;){kd++;var Ea=ha-Ia;sa[Ta]<ma?(jc=0,ub=sa[Ta]):sa[Ta]>ma?(jc=Cd[R+sa[Ta]],ub=ba[Xd+sa[Ta]]):(jc=96,ub=0);Ma=1<<ha-Ia;dc=hc=1<<ka;do hc-=Ma,B[tb+(Da>>Ia)+hc]=Ea<<24|jc<<16|ub|0;while(0!==hc);for(Ma=1<<ha-
1;Da&Ma;)Ma>>=1;if(0!==Ma?(Da&=Ma-1,Da+=Ma):Da=0,Ta++,0===--bd[ha]){if(ha===jb)break;ha=t[E+sa[Ta]]}if(ha>Dd&&(Da&Q)!==Fb){0===Ia&&(Ia=Dd);tb+=dc;ka=ha-Ia;for(Ma=1<<ka;ka+Ia<jb&&(Ma-=bd[ka+Ia],!(Ma<=0));)ka++,Ma<<=1;if(Ab+=1<<ka,m===1&&Ab>852||m===2&&Ab>592)return 1;Fb=Da&Q;B[Fb]=Dd<<24|ka<<16|tb-qa|0}}return 0!==Da&&(B[tb+Da]=ha-Ia<<24|4194304),Ba.bits=Dd,0}},{"../utils/common":3}],13:[function(Y,lb,Va){lb.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(Y,lb,Va){function Qa(S){for(var u=S.length;--u>=0;)S[u]=0}function Sa(S,u,F,Za,N){this.static_tree=S;this.extra_bits=u;this.extra_base=F;this.elems=Za;this.max_length=N;this.has_stree=S&&S.length}function wa(S,u){this.dyn_tree=S;this.max_code=0;this.stat_desc=u}function I(S,u){S.pending_buf[S.pending++]=255&u;S.pending_buf[S.pending++]=u>>>8&255}function Ka(S,u,F){S.bi_valid>Xd-F?(S.bi_buf|=u<<S.bi_valid&
65535,I(S,S.bi_buf),S.bi_buf=u>>Xd-S.bi_valid,S.bi_valid+=F-Xd):(S.bi_buf|=u<<S.bi_valid&65535,S.bi_valid+=F)}function m(S,u,F){Ka(S,F[2*u],F[2*u+1])}function t(S,u){var F=0;do F|=1&S,S>>>=1,F<<=1;while(--u>0);return F>>>1}function E(S,u,F){var Za,N=Array(ba+1),Pa=0;for(Za=1;Za<=ba;Za++)N[Za]=Pa=Pa+F[Za-1]<<1;for(F=0;F<=u;F++)Za=S[2*F+1],0!==Za&&(S[2*F]=t(N[Za]++,Za))}function Q(S){var u;for(u=0;u<ka;u++)S.dyn_ltree[2*u]=0;for(u=0;u<Ia;u++)S.dyn_dtree[2*u]=0;for(u=0;u<Ab;u++)S.bl_tree[2*u]=0;S.dyn_ltree[2*
bd]=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 qa(S,u,F,Za){var N=2*u,Pa=2*F;return S[N]<S[Pa]||S[N]===S[Pa]&&Za[u]<=Za[F]}function sa(S,u,F){for(var Za=S.heap[F],N=F<<1;N<=S.heap_len&&(N<S.heap_len&&qa(u,S.heap[N+1],S.heap[N],S.depth)&&N++,!qa(u,Za,S.heap[N],S.depth));)S.heap[F]=S.heap[N],F=N,N<<=1;S.heap[F]=Za}function Ba(S,u,F){var Za,N,Pa=0;if(0!==S.last_lit){do{var Eb=
S.pending_buf[S.d_buf+2*Pa]<<8|S.pending_buf[S.d_buf+2*Pa+1];var Ua=S.pending_buf[S.l_buf+Pa];Pa++;0===Eb?m(S,Ua,u):(Za=ua[Ua],m(S,Za+jb+1,u),N=Dd[Za],0!==N&&(Ua-=Vf[Za],Ka(S,Ua,N)),Eb--,Za=Eb<256?Wa[Eb]:Wa[256+(Eb>>>7)],m(S,Za,F),N=kd[Za],0!==N&&(Eb-=qc[Za],Ka(S,Eb,N)))}while(Pa<S.last_lit)}m(S,bd,u)}function Ma(S,u){var F,Za=u.dyn_tree;var N=u.stat_desc.static_tree;var Pa=u.stat_desc.has_stree,Eb=u.stat_desc.elems,Ua=-1;S.heap_len=0;S.heap_max=Da;for(F=0;F<Eb;F++)0!==Za[2*F]?(S.heap[++S.heap_len]=
Ua=F,S.depth[F]=0):Za[2*F+1]=0;for(;S.heap_len<2;){var bc=S.heap[++S.heap_len]=Ua<2?++Ua:0;Za[2*bc]=1;S.depth[bc]=0;S.opt_len--;Pa&&(S.static_len-=N[2*bc+1])}u.max_code=Ua;for(F=S.heap_len>>1;F>=1;F--)sa(S,Za,F);bc=Eb;do F=S.heap[1],S.heap[1]=S.heap[S.heap_len--],sa(S,Za,1),N=S.heap[1],S.heap[--S.heap_max]=F,S.heap[--S.heap_max]=N,Za[2*bc]=Za[2*F]+Za[2*N],S.depth[bc]=(S.depth[F]>=S.depth[N]?S.depth[F]:S.depth[N])+1,Za[2*F+1]=Za[2*N+1]=bc,S.heap[1]=bc++,sa(S,Za,1);while(S.heap_len>=2);S.heap[--S.heap_max]=
S.heap[1];var ib,bh;F=u.dyn_tree;bc=u.max_code;Eb=u.stat_desc.static_tree;var Gf=u.stat_desc.has_stree,Ve=u.stat_desc.extra_bits,lk=u.stat_desc.extra_base,og=u.stat_desc.max_length,xh=0;for(Pa=0;Pa<=ba;Pa++)S.bl_count[Pa]=0;F[2*S.heap[S.heap_max]+1]=0;for(u=S.heap_max+1;u<Da;u++)N=S.heap[u],Pa=F[2*F[2*N+1]+1]+1,Pa>og&&(Pa=og,xh++),F[2*N+1]=Pa,N>bc||(S.bl_count[Pa]++,ib=0,N>=lk&&(ib=Ve[N-lk]),bh=F[2*N],S.opt_len+=bh*(Pa+ib),Gf&&(S.static_len+=bh*(Eb[2*N+1]+ib)));if(0!==xh){do{for(Pa=og-1;0===S.bl_count[Pa];)Pa--;
S.bl_count[Pa]--;S.bl_count[Pa+1]+=2;S.bl_count[og]--;xh-=2}while(xh>0);for(Pa=og;0!==Pa;Pa--)for(N=S.bl_count[Pa];0!==N;)ib=S.heap[--u],ib>bc||(F[2*ib+1]!==Pa&&(S.opt_len+=(Pa-F[2*ib+1])*F[2*ib],F[2*ib+1]=Pa),N--)}E(Za,Ua,S.bl_count)}function hc(S,u,F){var Za,N=-1,Pa=u[1],Eb=0,Ua=7,bc=4;0===Pa&&(Ua=138,bc=3);u[2*(F+1)+1]=65535;for(Za=0;Za<=F;Za++){var ib=Pa;Pa=u[2*(Za+1)+1];++Eb<Ua&&ib===Pa||(Eb<bc?S.bl_tree[2*ib]+=Eb:0!==ib?(ib!==N&&S.bl_tree[2*ib]++,S.bl_tree[2*tb]++):Eb<=10?S.bl_tree[2*Cd]++:
S.bl_tree[2*R]++,Eb=0,N=ib,0===Pa?(Ua=138,bc=3):ib===Pa?(Ua=6,bc=3):(Ua=7,bc=4))}}function Fb(S,u,F){var Za,N,Pa=-1,Eb=u[1],Ua=0,bc=7,ib=4;0===Eb&&(bc=138,ib=3);for(Za=0;Za<=F;Za++)if(N=Eb,Eb=u[2*(Za+1)+1],!(++Ua<bc&&N===Eb)){if(Ua<ib){do m(S,N,S.bl_tree);while(0!==--Ua)}else 0!==N?(N!==Pa&&(m(S,N,S.bl_tree),Ua--),m(S,tb,S.bl_tree),Ka(S,Ua-3,2)):Ua<=10?(m(S,Cd,S.bl_tree),Ka(S,Ua-3,3)):(m(S,R,S.bl_tree),Ka(S,Ua-11,7));Ua=0;Pa=N;0===Eb?(bc=138,ib=3):N===Eb?(bc=6,ib=3):(bc=7,ib=4)}}function ma(S){var u,
F=4093624447;for(u=0;u<=31;u++,F>>>=1)if(1&F&&0!==S.dyn_ltree[2*u])return dc;if(0!==S.dyn_ltree[18]||0!==S.dyn_ltree[20]||0!==S.dyn_ltree[26])return ha;for(u=32;u<jb;u++)if(0!==S.dyn_ltree[2*u])return ha;return dc}function jc(S,u,F,Za){Ka(S,(Ta<<1)+(Za?1:0),3);B(S);I(S,F);I(S,~F);ub.arraySet(S.pending_buf,S.window,u,F,S.pending);S.pending+=F}var ub=Y("../utils/common"),dc=0,ha=1,Ta=0,jb=256,ka=jb+1+29,Ia=30,Ab=19,Da=2*ka+1,ba=15,Xd=16,bd=256,tb=16,Cd=17,R=18,Dd=[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],kd=[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],Ea=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],da=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],qb=Array(2*(ka+2));Qa(qb);var Nb=Array(2*Ia);Qa(Nb);var Wa=Array(512);Qa(Wa);var ua=Array(256);Qa(ua);var Vf=Array(29);Qa(Vf);var qc=Array(Ia);Qa(qc);var Xa,U,M,kb=!1;Va._tr_init=function(S){if(!kb){var u,F,Za,N=Array(ba+1);for(Za=F=0;Za<28;Za++)for(Vf[Za]=F,u=0;u<1<<Dd[Za];u++)ua[F++]=Za;ua[F-1]=Za;for(Za=
F=0;Za<16;Za++)for(qc[Za]=F,u=0;u<1<<kd[Za];u++)Wa[F++]=Za;for(F>>=7;Za<Ia;Za++)for(qc[Za]=F<<7,u=0;u<1<<kd[Za]-7;u++)Wa[256+F++]=Za;for(u=0;u<=ba;u++)N[u]=0;for(u=0;u<=143;)qb[2*u+1]=8,u++,N[8]++;for(;u<=255;)qb[2*u+1]=9,u++,N[9]++;for(;u<=279;)qb[2*u+1]=7,u++,N[7]++;for(;u<=287;)qb[2*u+1]=8,u++,N[8]++;E(qb,ka+1,N);for(u=0;u<Ia;u++)Nb[2*u+1]=5,Nb[2*u]=t(u,5);Xa=new Sa(qb,Dd,jb+1,ka,ba);U=new Sa(Nb,kd,0,Ia,ba);M=new Sa([],Ea,0,Ab,7);kb=!0}S.l_desc=new wa(S.dyn_ltree,Xa);S.d_desc=new wa(S.dyn_dtree,
U);S.bl_desc=new wa(S.bl_tree,M);S.bi_buf=0;S.bi_valid=0;Q(S)};Va._tr_stored_block=jc;Va._tr_flush_block=function(S,u,F,Za){var N=0;if(S.level>0){S.strm.data_type===2&&(S.strm.data_type=ma(S));Ma(S,S.l_desc);Ma(S,S.d_desc);hc(S,S.dyn_ltree,S.l_desc.max_code);hc(S,S.dyn_dtree,S.d_desc.max_code);Ma(S,S.bl_desc);for(N=Ab-1;N>=3&&0===S.bl_tree[2*da[N]+1];N--);N=(S.opt_len+=3*(N+1)+5+5+4,N);var Pa=S.opt_len+3+7>>>3;var Eb=S.static_len+3+7>>>3;Eb<=Pa&&(Pa=Eb)}else Pa=Eb=F+5;if(F+4<=Pa&&u!==-1)jc(S,u,F,
Za);else if(S.strategy===4||Eb===Pa)Ka(S,2+(Za?1:0),3),Ba(S,qb,Nb);else{Ka(S,4+(Za?1:0),3);u=S.l_desc.max_code+1;F=S.d_desc.max_code+1;N+=1;Ka(S,u-257,5);Ka(S,F-1,5);Ka(S,N-4,4);for(Pa=0;Pa<N;Pa++)Ka(S,S.bl_tree[2*da[Pa]+1],3);Fb(S,S.dyn_ltree,u-1);Fb(S,S.dyn_dtree,F-1);Ba(S,S.dyn_ltree,S.dyn_dtree)}Q(S);Za&&B(S)};Va._tr_tally=function(S,u,F){return S.pending_buf[S.d_buf+2*S.last_lit]=u>>>8&255,S.pending_buf[S.d_buf+2*S.last_lit+1]=255&u,S.pending_buf[S.l_buf+S.last_lit]=255&F,S.last_lit++,0===u?
S.dyn_ltree[2*F]++:(S.matches++,u--,S.dyn_ltree[2*(ua[F]+jb+1)]++,S.dyn_dtree[2*(u<256?Wa[u]:Wa[256+(u>>>7)])]++),S.last_lit===S.lit_bufsize-1};Va._tr_align=function(S){Ka(S,2,3);m(S,bd,qb);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(Y,lb,Va){lb.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(Y,lb,Va){Va=Y("./lib/utils/common").assign;var Qa=Y("./lib/deflate"),Sa=Y("./lib/inflate");Y=Y("./lib/zlib/constants");var wa={};Va(wa,Qa,Sa,Y);lb.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 Ob(D){var K=[];return K[D-1]=void 0,K}function Y(D,K){return Qa(D[0]+K[0],D[1]+K[1])}function lb(D,K){var O=~~Math.max(Math.min(D[1]/Xf,2147483647),-2147483648)&~~Math.max(Math.min(K[1]/Xf,2147483647),-2147483648);D=wa(D)&wa(K);var ja,la;return ja=O*Xf,la=D,0>D&&(la+=Xf),[la,ja]}function Va(D,K){var O,ja;return D[0]==K[0]&&D[1]==K[1]?0:(O=0>D[1],ja=0>K[1],O&&!ja?-1:!O&&ja?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 O=K%Xf;var ja=Math.floor(D/Xf)*Xf;K=K-O+ja;for(D=D-ja+O;0>D;)D+=Xf,K-=Xf;for(;D>4294967295;)D-=Xf,K+=Xf;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+Xf,-Xf]}function wa(D){return D[0]>=2147483648?~~Math.max(Math.min(D[0]-Xf,2147483647),-2147483648):~~Math.max(Math.min(D[0],2147483647),-2147483648)}
function I(D){return 30>=D?1<<D:I(30)*I(D-30)}function Ka(D,K){var O,ja,la,aa;if(K&=63,D[0]==Fl[0]&&D[1]==Fl[1])return K?ch:D;if(0>D[1])throw Error("Neg");return aa=I(K),ja=D[1]*aa%1.8446744073709552E19,la=D[0]*aa,O=la-la%Xf,ja+=O,la-=O,ja>=0x7fffffffffffffff&&(ja-=1.8446744073709552E19),[la,ja]}function m(D,K){var O;return K&=63,O=I(K),Qa(Math.floor(D[0]/O),D[1]/O)}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 Q(D){return D.Mc=Ob(32),
D.Yb=0,D}function B(D){var K=D.Mc;return K.length=D.Yb,K}function qa(D,K,O,ja,la){for(var aa=0;la>aa;++aa)O[ja+aa]=D[K+aa]}function sa(D,K,O){D.Nb=Q({});var ja=t({},K),la=D.Nb,aa=Sa(K.length);if(Va(aa,Qi)<0)throw Error("invalid length "+aa);D.Tb=aa;K={};var Ya;K.v=Ob(4);K.a=[];K.d={};K.C=Ob(192);K.bb=Ob(12);K.hb=Ob(12);K.Ub=Ob(12);K.vc=Ob(12);K._=Ob(192);K.K=[];K.Sb=Ob(114);K.S=Za({},4);K.$=Xa({});K.i=Xa({});K.A={};K.m=[];K.P=[];K.lb=[];K.nc=Ob(16);K.x=Ob(4);K.Q=Ob(4);K.Xb=[ch];K.uc=[ch];K.Kc=[0];
K.fc=Ob(5);K.yc=Ob(128);K.vb=0;K.X=1;K.D=0;K.Hb=-1;for(Ya=K.mb=0;4096>Ya;++Ya)K.a[Ya]={};for(Ya=0;4>Ya;++Ya)K.K[Ya]=Za({},6);Ya=1<<O.s;K.ab=Ya;for(var db=0;Ya>1<<db;++db);K.$b=2*db;K.n=O.f;Ya=K.X;K.X=O.m;K.b&&Ya!=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(O=0;4>O;++O)K.fc[1+O]=K.ab>>8*O<<24>>24;qa(K.fc,0,la.Mc,la.Yb,5);la.Yb+=5;for(O=0;64>O;O+=8)Ya=la,db=255&wa(m(aa,O)),Ya.Mc[Ya.Yb++]=db<<24>>24;K.W=0;K.oc=ja;K.pc=0;K.b||
(ja={},aa=4,K.X||(aa=2),ja.qb=aa>2,ja.qb?(ja.w=0,ja.xb=4,ja.R=66560):(ja.w=2,ja.xb=3,ja.R=0),K.b=ja);ja=K.A;aa=K.eb;O=K.fb;if(null==ja.V||ja.u!=O||ja.I!=aa)for(ja.I=aa,ja.qc=(1<<aa)-1,ja.u=O,O=1<<ja.u+ja.I,ja.V=Ob(O),aa=0;O>aa;++aa){Ya=ja.V;db=aa;var bb={};bb=(bb.tb=Ob(768),bb);Ya[db]=bb}if(K.ab!=K.wb||K.Hb!=K.n)ja=K.b,aa=K.ab,O=K.n,1073741567>aa&&(ja.Fc=16+(O>>1),db=aa+4096,Ya=O+274,ja.Bc=db,ja._b=Ya,db=db+Ya+(~~((aa+4096+O+274)/2)+256),(null==ja.c||ja.Kb!=db)&&(ja.c=null,ja.Kb=db,ja.c=Ob(ja.Kb)),
ja.H=ja.Kb-Ya,ja.ob=O,O=aa+1,ja.p!=O&&(ja.L=Ob(2*(ja.p=O))),O=65536,ja.qb&&(O=aa-1,O|=O>>1,O|=O>>2,O|=O>>4,O|=O>>8,O>>=1,O|=65535,O>16777216&&(O>>=1),ja.Ec=O,++O,O+=ja.R),O!=ja.rc&&(ja.ub=Ob(ja.rc=O))),K.wb=K.ab,K.Hb=K.n;K.d.Ab=la;K.l=0;for(la=K.J=0;4>la;++la)K.v[la]=0;la=K.d;la.mc=ch;la.xc=ch;la.E=-1;la.Jb=1;la.Oc=0;bc(K.C);bc(K._);bc(K.bb);bc(K.hb);bc(K.Ub);bc(K.vc);bc(K.Sb);la=K.A;aa=1<<la.u+la.I;for(ja=0;aa>ja;++ja)bc(la.V[ja].tb);for(la=0;4>la;++la)bc(K.K[la].G);ua(K.$,1<<K.Y);ua(K.i,1<<K.Y);
bc(K.S.G);K.N=0;K.jb=0;K.q=0;K.s=0;R(K);Cd(K);K.$.rb=K.n+1-2;U(K.$,1<<K.Y);K.i.rb=K.n+1-2;U(K.i,1<<K.Y);K.g=ch;la={};K=(la.cb=K,la.Z=null,la.zc=1,la);D.yb=K;return D}function Ba(D,K){D.Nb=Q({});var O=t({},K),ja=D.Nb,la,aa,Ya,db="",bb=[];for(la=0;5>la;++la){if(aa=E(O),-1==aa)throw Error("truncated input");bb[la]=aa<<24>>24}K={B:{},e:{}};K.Gb=Ob(192);K.Zb=Ob(12);K.Cb=Ob(12);K.Db=Ob(12);K.Eb=Ob(12);K.pb=Ob(192);K.kb=Ob(4);K.kc=Ob(114);K.Fb=u({},4);K.Rb=Xd({});K.sb=Xd({});K.gb={};for(la=0;4>la;++la)K.kb[la]=
u({},6);var Kb;if(5>bb.length)la=0;else{la=255&bb[0];var ob=la%9;la=~~(la/9);var Gc=la%5;var Gb=~~(la/5);for(Kb=la=0;4>Kb;++Kb)la+=(255&bb[1+Kb])<<8*Kb;if(!(bb=la>99999999)){if(ob>8||Gc>4||Gb>4)Gb=0;else{bb=K.gb;if(null==bb.V||bb.u!=ob||bb.I!=Gc)for(bb.I=Gc,bb.qc=(1<<Gc)-1,bb.u=ob,Gc=1<<bb.u+bb.I,bb.V=Ob(Gc),ob=0;Gc>ob;++ob){Kb=bb.V;var k=ob;var Ca={};Ca=(Ca.Ib=Ob(768),Ca);Kb[k]=Ca}Gb=1<<Gb;Gb=(Da(K.Rb,Gb),Da(K.sb,Gb),K.Dc=Gb-1,1)}bb=!Gb}bb?la=0:0>la?la=0:(K.Ob!=la&&(K.Ob=la,K.nb=Math.max(K.Ob,1),
la=K.B,Gb=Math.max(K.nb,4096),null!=la.Lb&&la.M==Gb||(la.Lb=Ob(Gb)),la.M=Gb,la.o=0,la.h=0),la=1)}if(!la)throw Error("corrupted input");for(la=0;64>la;la+=8){if(aa=E(O),-1==aa)throw Error("truncated input");aa=aa.toString(16);1==aa.length&&(aa="0"+aa);db=aa+""+db}/^0+$|^f+$/i.test(db)?D.Tb=Qi:(Ya=parseInt(db,16),D.Tb=Ya>4294967295?Qi:Sa(Ya));aa=D.Tb;K.e.Ab=O;O=K.B;Ta(O);O.cc=null;K.B.cc=ja;K.B.h=0;K.B.o=0;bc(K.Gb);bc(K.pb);bc(K.Zb);bc(K.Cb);bc(K.Db);bc(K.Eb);bc(K.kc);ja=K.gb;Ya=1<<ja.u+ja.I;for(O=
0;Ya>O;++O)bc(ja.V[O].Ib);for(ja=0;4>ja;++ja)bc(K.kb[ja].G);bd(K.Rb);bd(K.sb);bc(K.Fb.G);ja=K.e;ja.Bb=0;ja.E=-1;for(O=0;5>O;++O)ja.Bb=ja.Bb<<8|E(ja.Ab);K.U=0;K.ib=0;K.Jc=0;K.Ic=0;K.Qc=0;K.Nc=aa;K.g=ch;K.jc=0;ja={};K=(ja.Z=K,ja.cb=null,ja.zc=1,ja);D.yb=K;return D}function Ma(D,K){return D.c[D.f+D.o+K]}function hc(D,K,O,ja){D.T&&D.o+K+ja>D.h&&(ja=D.h-(D.o+K));++O;var la=D.f+D.o+K;for(K=0;ja>K&&D.c[la+K]==D.c[la+K-O];++K);return K}function Fb(D){return D.h-D.o}function ma(D){var K,O,ja;if(!D.T)for(;ja=
-D.f+D.Kb-D.h,ja;){var la=D.cc,aa=D.c,Ya=D.f+D.h,db=ja;if(K=la.Lc>=la.Yb?-1:(db=Math.min(db,la.Yb-la.Lc),qa(la.Mc,la.Lc,aa,Ya,db),la.Lc+=db,db),-1==K)return D.zb=D.h,O=D.f+D.zb,O>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 jc(D,K){D.f+=K;D.zb-=K;D.o-=K;D.h-=K}function ub(D){var K;++D.k>=D.p&&(D.k=0);++D.o;if(D.o>D.zb){var O=D.f+D.o;if(O>D.H){var ja=D.f+D.o-D.Bc;ja>0&&--ja;var la=D.f+D.h-ja;for(O=0;la>O;++O)D.c[O]=D.c[ja+O];D.f-=ja}ma(D)}1073741823==D.o&&(K=D.o-
D.p,dc(D.L,2*D.p,K),dc(D.ub,D.rc,K),jc(D,K))}function dc(D,K,O){var ja;for(ja=0;K>ja;++ja){var la=D[ja]||0;O>=la?la=0:la-=O;D[ja]=la}}function ha(D,K){var O,ja,la,aa,Ya,db,bb,Kb,ob,Gc;do{if(D.h>=D.o+D.ob)var Gb=D.ob;else if(Gb=D.h-D.o,D.xb>Gb){ub(D);continue}var k=D.o>D.p?D.o-D.p:0;var Ca=D.f+D.o;D.qb?(Gc=Gl[255&D.c[Ca]]^255&D.c[Ca+1],aa=1023&Gc,D.ub[aa]=D.o,Gc^=(255&D.c[Ca+2])<<8,Ya=65535&Gc,D.ub[1024+Ya]=D.o,db=(Gc^Gl[255&D.c[Ca+3]]<<5)&D.Ec):db=255&D.c[Ca]^(255&D.c[Ca+1])<<8;var yd=D.ub[D.R+db];
D.ub[D.R+db]=D.o;var Cc=(D.k<<1)+1;var xd=D.k<<1;var td=Kb=D.w;for(O=D.Fc;;){if(k>=yd||0==O--){D.L[Cc]=D.L[xd]=0;break}if(la=D.o-yd,ja=(D.k>=la?D.k-la:D.k-la+D.p)<<1,ob=D.f+yd,bb=Kb>td?td:Kb,D.c[ob+bb]==D.c[Ca+bb]){for(;++bb!=Gb&&D.c[ob+bb]==D.c[Ca+bb];);if(bb==Gb){D.L[xd]=D.L[ja];D.L[Cc]=D.L[ja+1];break}}(255&D.c[Ca+bb])>(255&D.c[ob+bb])?(D.L[xd]=yd,xd=ja+1,yd=D.L[xd],Kb=bb):(D.L[Cc]=yd,Cc=ja,yd=D.L[Cc],td=bb)}ub(D)}while(0!=--K)}function Ta(D){var K=D.o-D.h;if(K){var O=D.cc;qa(D.Lb,D.h,O.Mc,O.Yb,
K);O.Yb+=K;D.o>=D.M&&(D.o=0);D.h=D.o}}function jb(D,K){K=D.o-K-1;return 0>K&&(K+=D.M),D.Lb[K]}function ka(D){return D-=2,4>D?D:3}function Ia(D){return 4>D?0:10>D?D-3:D-6}function Ab(D){if(!D.zc)throw Error("bad state");if(D.cb){a:{var K=D.cb,O=D.cb.Xb,ja=D.cb.uc,la=D.cb.Kc,aa,Ya;O[0]=ch;ja[0]=ch;la[0]=1;if(K.oc){K.b.cc=K.oc;var db=K.b;db.f=0;db.o=0;db.h=0;db.T=0;ma(db);db.k=0;jc(db,-1);K.W=1;K.oc=null}if(!K.pc){K.pc=1;var bb=db=K.g;if(bb[0]==ch[0]&&bb[1]==ch[1]){if(!Fb(K.b)){Dd(K,wa(K.g));break a}qb(K);
var Kb=wa(K.g)&K.y;ib(K.d,K.C,(K.l<<4)+Kb,0);K.l=Ia(K.l);bb=Ma(K.b,-K.s);kb(M(K.A,wa(K.g),K.J),K.d,bb);K.J=bb;--K.s;K.g=Y(K.g,Rk)}if(Fb(K.b))for(;;){if(aa=kd(K,wa(K.g)),Ya=K.mb,Kb=wa(K.g)&K.y,bb=(K.l<<4)+Kb,1==aa&&-1==Ya){ib(K.d,K.C,bb,0);bb=Ma(K.b,-K.s);var ob=M(K.A,wa(K.g),K.J);if(7>K.l)kb(ob,K.d,bb);else{var Gc=Ma(K.b,-K.v[0]-1-K.s);var Gb=void 0;var k;var Ca=K.d;var yd=Gc,Cc=bb,xd=1,td=1;for(k=7;k>=0;--k){var sd=Cc>>k&1;Gc=td;xd&&(Gb=yd>>k&1,Gc+=1+Gb<<8,xd=Gb==sd);ib(Ca,ob.tb,Gc,sd);td=td<<1|
sd}}K.J=bb;K.l=Ia(K.l)}else{if(ib(K.d,K.C,bb,1),4>Ya){if(ib(K.d,K.bb,K.l,1),Ya?(ib(K.d,K.hb,K.l,1),1==Ya?ib(K.d,K.Ub,K.l,0):(ib(K.d,K.Ub,K.l,1),ib(K.d,K.vc,K.l,Ya-2))):(ib(K.d,K.hb,K.l,0),1==aa?ib(K.d,K._,bb,0):ib(K.d,K._,bb,1)),1==aa?K.l=7>K.l?9:11:(qc(K.i,K.d,aa-2,Kb),K.l=7>K.l?8:11),bb=K.v[Ya],0!=Ya){for(Gb=Ya;Gb>=1;--Gb)K.v[Gb]=K.v[Gb-1];K.v[0]=bb}}else{ib(K.d,K.bb,K.l,0);K.l=7>K.l?7:10;qc(K.$,K.d,aa-2,Kb);Ya-=4;Gb=Wa(Ya);bb=ka(aa);N(K.K[bb],K.d,Gb);if(Gb>=4)if(Ca=(Gb>>1)-1,ob=(2|1&Gb)<<Ca,Gc=
Ya-ob,14>Gb)for(bb=K.Sb,Gb=ob-Gb-1,ob=K.d,sd=Gc,yd=1,Gc=0;Ca>Gc;++Gc)k=1&sd,ib(ob,bb,Gb+yd,k),yd=yd<<1|k,sd>>=1;else bh(K.d,Gc>>4,Ca-4),Eb(K.S,K.d,15&Gc),++K.Qb;bb=Ya;for(Gb=3;Gb>=1;--Gb)K.v[Gb]=K.v[Gb-1];K.v[0]=bb;++K.Mb}K.J=Ma(K.b,aa-1-K.s)}if(K.s-=aa,K.g=Y(K.g,Sa(aa)),!K.s){K.Mb>=128&&R(K);K.Qb>=16&&Cd(K);O[0]=K.g;bb=K.d;bb=Y(Y(Sa(bb.Jb),bb.mc),[4,0]);if(ja[0]=bb,!Fb(K.b)){Dd(K,wa(K.g));break a}bb=K.g;bb=Qa(bb[0]-db[0],bb[1]-db[1]);if(Va(bb,[4096,0])>=0){K.pc=0;la[0]=0;break a}}}else Dd(K,wa(K.g))}}D.Pb=
D.cb.Xb[0];D.cb.Kc[0]&&(aa=D.cb,Nb(aa),aa.d.Ab=null,D.zc=0)}else{a:{aa=D.Z;if(Gb=wa(aa.g)&aa.Dc,Ua(aa.e,aa.Gb,(aa.U<<4)+Gb)){if(Ua(aa.e,aa.Zb,aa.U))K=0,Ua(aa.e,aa.Cb,aa.U)?(Ua(aa.e,aa.Db,aa.U)?(Ua(aa.e,aa.Eb,aa.U)?(bb=aa.Qc,aa.Qc=aa.Ic):bb=aa.Ic,aa.Ic=aa.Jc):bb=aa.Jc,aa.Jc=aa.ib,aa.ib=bb):Ua(aa.e,aa.pb,(aa.U<<4)+Gb)||(aa.U=7>aa.U?9:11,K=1),K||(K=ba(aa.sb,aa.e,Gb)+2,aa.U=7>aa.U?8:11);else if(aa.Qc=aa.Ic,aa.Ic=aa.Jc,aa.Jc=aa.ib,K=2+ba(aa.Rb,aa.e,Gb),aa.U=7>aa.U?7:10,db=F(aa.kb[ka(K)],aa.e),db>=4)if(O=
(db>>1)-1,aa.ib=(2|1&db)<<O,14>db){Ya=aa.ib;Kb=aa.kc;ja=aa.ib-db-1;la=aa.e;Gb=1;for(bb=ob=0;O>bb;++bb)db=Ua(la,Kb,ja+Gb),Gb<<=1,Gb+=db,ob|=db<<bb;aa.ib=Ya+ob}else{Ya=aa.ib;Kb=aa.e;ja=0;for(O-=4;0!=O;--O)Kb.E>>>=1,la=Kb.Bb-Kb.E>>>31,Kb.Bb-=Kb.E&la-1,ja=ja<<1|1-la,-16777216&Kb.E||(Kb.Bb=Kb.Bb<<8|E(Kb.Ab),Kb.E<<=8);aa.ib=Ya+(ja<<4);Ya=aa.ib;Kb=aa.Fb;O=aa.e;db=1;for(la=bb=0;Kb.F>la;++la)ja=Ua(O,Kb.G,db),db<<=1,db+=ja,bb|=ja<<la;if(aa.ib=Ya+bb,0>aa.ib){aa=-1==aa.ib?1:-1;break a}}else aa.ib=db;if(Va(Sa(aa.ib),
aa.g)>=0||aa.ib>=aa.nb){aa=-1;break a}Ya=aa.B;Kb=K;O=Ya.o-aa.ib-1;for(0>O&&(O+=Ya.M);0!=Kb;--Kb)O>=Ya.M&&(O=0),Ya.Lb[Ya.o++]=Ya.Lb[O++],Ya.o>=Ya.M&&Ta(Ya);aa.g=Y(aa.g,Sa(K));aa.jc=jb(aa.B,0)}else{Ya=aa.gb;Kb=wa(aa.g);Ya=Ya.V[((Kb&Ya.qc)<<Ya.u)+((255&aa.jc)>>>8-Ya.u)];if(7>aa.U){Kb=aa.e;K=1;do K=K<<1|Ua(Kb,Ya.Ib,K);while(256>K);Ya=K<<24>>24}else{Kb=aa.e;K=jb(aa.B,aa.ib);O=1;do if(la=K>>7&1,K<<=1,ja=Ua(Kb,Ya.Ib,(1+la<<8)+O),O=O<<1|ja,la!=ja){for(;256>O;)O=O<<1|Ua(Kb,Ya.Ib,O);break}while(256>O);Ya=O<<
24>>24}aa.jc=Ya;Ya=aa.B;Kb=aa.jc;Ya.Lb[Ya.o++]=Kb;Ya.o>=Ya.M&&Ta(Ya);aa.U=Ia(aa.U);aa.g=Y(aa.g,Rk)}aa=0}if(-1==aa)throw Error("corrupted input");D.Pb=Qi;D.Pc=D.Z.g;if(aa||Va(D.Z.Nc,ch)>=0&&Va(D.Z.g,D.Z.Nc)>=0)Ta(D.Z.B),aa=D.Z.B,Ta(aa),aa.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]=u({},3),D.hc[D.O]=u({},3)}function ba(D,K,O){return Ua(K,D.wc,0)?8+(Ua(K,D.wc,1)?8+F(D.tc,K):F(D.hc[O],K)):F(D.ec[O],K)}function Xd(D){return D.wc=Ob(2),D.ec=Ob(16),D.hc=Ob(16),D.tc=
u({},8),D.O=0,D}function bd(D){bc(D.wc);for(var K=0;D.O>K;++K)bc(D.ec[K].G),bc(D.hc[K].G);bc(D.tc.G)}function tb(D,K){D.jb=K;var O=D.a[K].r;var ja=D.a[K].j;do{if(D.a[K].t){var la=D.a[O];la.j=-1;la.t=0;D.a[O].r=O-1;D.a[K].Ac&&(D.a[O-1].t=0,D.a[O-1].r=D.a[K].r2,D.a[O-1].j=D.a[K].j2)}var aa=O;la=ja;ja=D.a[aa].j;O=D.a[aa].r;D.a[aa].j=la;D.a[aa].r=K;K=aa}while(K>0);return D.mb=D.a[0].j,D.q=D.a[0].r}function Cd(D){for(var K=0;16>K;++K){var O=D.nc,ja=K,la,aa=D.S,Ya=K,db=1,bb=0;for(la=aa.F;0!=la;--la){var Kb=
1&Ya;Ya>>>=1;bb+=Ve(aa.G[db],Kb);db=db<<1|Kb}O[ja]=bb}D.Qb=0}function R(D){var K;for(K=4;128>K;++K){var O=Wa(K);var ja=(O>>1)-1;var la=(2|1&O)<<ja;var aa=D.yc;var Ya=K;var db=D.Sb;O=la-O-1;la=K-la;for(var bb=1,Kb=0;0!=ja;--ja){var ob=1&la;la>>>=1;Kb+=Fd[(2047&(db[O+bb]-ob^-ob))>>>2];bb=bb<<1|ob}aa[Ya]=Kb}for(aa=0;4>aa;++aa){K=D.K[aa];Ya=aa<<6;for(O=0;D.$b>O;++O)D.P[Ya+O]=Pa(K,O);for(O=14;D.$b>O;++O)D.P[Ya+O]+=(O>>1)-1-4<<6;db=128*aa;for(K=0;4>K;++K)D.lb[db+K]=D.P[Ya+K];for(;128>K;++K)D.lb[db+K]=D.P[Ya+
Wa(K)]+D.yc[K]}D.Mb=0}function Dd(D,K){Nb(D);K&=D.y;D.Gc&&(ib(D.d,D.C,(D.l<<4)+K,1),ib(D.d,D.bb,D.l,0),D.l=7>D.l?7:10,qc(D.$,D.d,0,K),K=ka(2),N(D.K[K],D.d,63),bh(D.d,67108863,26),Eb(D.S,D.d,15));for(K=0;5>K;++K)Gf(D.d)}function kd(D,K){var O,ja,la,aa,Ya,db,bb,Kb,ob,Gc,Gb,k,Ca,yd,Cc,xd,td,sd,uf,hb,id,Yd,p,xn,Nk,um,Nj,dh;if(D.jb!=D.q)return Gc=D.a[D.q].r-D.q,D.mb=D.a[D.q].j,D.q=D.a[D.q].r,Gc;if(D.q=D.jb=0,D.N?(ob=D.vb,D.N=0):ob=qb(D),Gc=D.D,td=Fb(D.b)+1,2>td)return D.mb=-1,1;td>273&&(td=273);for(db=
bb=0;4>db;++db)D.x[db]=D.v[db],D.Q[db]=hc(D.b,-1,D.x[db],273),D.Q[db]>D.Q[bb]&&(bb=db);if(D.Q[bb]>=D.n)return D.mb=bb,Gc=D.Q[bb],K=Gc-1,K>0&&(ha(D.b,K),D.s+=K),Gc;if(ob>=D.n)return D.mb=D.m[Gc-1]+4,K=ob-1,K>0&&(ha(D.b,K),D.s+=K),ob;if(Ya=Ma(D.b,-1),yd=Ma(D.b,-D.v[0]-1-1),2>ob&&Ya!=yd&&2>D.Q[bb])return D.mb=-1,1;D.a[0].Hc=D.l;var ff=K&D.y;D.a[1].z=Fd[D.C[(D.l<<4)+ff]>>>2]+S(M(D.A,K,D.J),D.l>=7,yd,Ya);var yh=D.a[1];yh.j=-1;yh.t=0;yh=Fd[2048-D.C[(D.l<<4)+ff]>>>2];var Ti=yh+Fd[2048-D.bb[D.l]>>>2];if(yd==
Ya){var nj=D.l;nj=Ti+(Fd[D.hb[nj]>>>2]+Fd[D._[(nj<<4)+ff]>>>2]);D.a[1].z>nj&&(D.a[1].z=nj,db=D.a[1],db.j=0,db.t=0)}if(Kb=ob>=D.Q[bb]?ob:D.Q[bb],2>Kb)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];bb=Kb;do D.a[bb--].z=268435455;while(bb>=2);for(db=0;4>db;++db)if(Ca=D.Q[db],!(2>Ca)){var Wh=Ti+da(D,db,D.l,ff);do{var se=Wh+D.i.Cc[272*ff+(Ca-2)];var oc=D.a[Ca];oc.z>se&&(oc.z=se,oc.r=0,oc.j=db,oc.t=0)}while(--Ca>=2)}if(Ca=yh+Fd[D.bb[D.l]>>>2],bb=D.Q[0]>=
2?D.Q[0]+1:2,ob>=bb){for(ob=0;bb>D.m[ob];)ob+=2;for(;O=D.m[ob+1],se=Ca+Ea(D,O,bb,ff),oc=D.a[bb],oc.z>se&&(oc.z=se,oc.r=0,oc.j=O+4,oc.t=0),bb!=D.m[ob]||(ob+=2,ob!=Gc);++bb);}for(O=0;;){if(++O,O==Kb)return tb(D,O);if(Cc=qb(D),Gc=D.D,Cc>=D.n)return D.vb=Cc,D.N=1,tb(D,O);if(++K,id=D.a[O].r,D.a[O].t?(--id,D.a[O].Ac?(Yd=D.a[D.a[O].r2].Hc,Yd=4>D.a[O].j2?7>Yd?8:11:7>Yd?7:10):Yd=D.a[id].Hc,Yd=Ia(Yd)):Yd=D.a[id].Hc,id==O-1?Yd=D.a[O].j?Ia(Yd):7>Yd?9:11:(D.a[O].t&&D.a[O].Ac?(id=D.a[O].r2,hb=D.a[O].j2,Yd=7>Yd?
8:11):(hb=D.a[O].j,Yd=4>hb?7>Yd?8:11:7>Yd?7:10),uf=D.a[id],4>hb?hb?1==hb?(D.x[0]=uf.ac,D.x[1]=uf.bc,D.x[2]=uf.dc,D.x[3]=uf.lc):2==hb?(D.x[0]=uf.dc,D.x[1]=uf.bc,D.x[2]=uf.ac,D.x[3]=uf.lc):(D.x[0]=uf.lc,D.x[1]=uf.bc,D.x[2]=uf.ac,D.x[3]=uf.dc):(D.x[0]=uf.bc,D.x[1]=uf.ac,D.x[2]=uf.dc,D.x[3]=uf.lc):(D.x[0]=hb-4,D.x[1]=uf.bc,D.x[2]=uf.ac,D.x[3]=uf.dc)),D.a[O].Hc=Yd,D.a[O].bc=D.x[0],D.a[O].ac=D.x[1],D.a[O].dc=D.x[2],D.a[O].lc=D.x[3],aa=D.a[O].z,Ya=Ma(D.b,-1),yd=Ma(D.b,-D.x[0]-1-1),ff=K&D.y,ja=aa+Fd[D.C[(Yd<<
4)+ff]>>>2]+S(M(D.A,K,Ma(D.b,-2)),Yd>=7,yd,Ya),xd=D.a[O+1],ob=0,xd.z>ja&&(xd.z=ja,xd.r=O,xd.j=-1,xd.t=0,ob=1),yh=aa+Fd[2048-D.C[(Yd<<4)+ff]>>>2],Ti=yh+Fd[2048-D.bb[Yd]>>>2],yd!=Ya||O>xd.r&&!xd.j||(nj=Ti+(Fd[D.hb[Yd]>>>2]+Fd[D._[(Yd<<4)+ff]>>>2]),xd.z>=nj&&(xd.z=nj,xd.r=O,xd.j=0,xd.t=0,ob=1)),sd=Fb(D.b)+1,sd=sd>4095-O?4095-O:sd,td=sd,!(2>td)){if(td>D.n&&(td=D.n),!ob&&yd!=Ya&&(p=Math.min(sd-1,D.n),k=hc(D.b,0,D.x[0],p),k>=2)){db=Ia(Yd);oc=K+1&D.y;se=ja+Fd[2048-D.C[(db<<4)+oc]>>>2]+Fd[2048-D.bb[db]>>>
2];for(Wh=O+1+k;Wh>Kb;)D.a[++Kb].z=268435455;se+=(xn=D.i.Cc[272*oc+(k-2)],xn+da(D,0,db,oc));oc=D.a[Wh];oc.z>se&&(oc.z=se,oc.r=O+1,oc.j=0,oc.t=1,oc.Ac=0)}bb=2;for(ob=0;4>ob;++ob)if(Gb=hc(D.b,-1,D.x[ob],td),!(2>Gb)){Ca=Gb;do{for(;O+Gb>Kb;)D.a[++Kb].z=268435455;se=Ti+(Nk=D.i.Cc[272*ff+(Gb-2)],Nk+da(D,ob,Yd,ff));oc=D.a[O+Gb];oc.z>se&&(oc.z=se,oc.r=O,oc.j=ob,oc.t=0)}while(--Gb>=2);if(Gb=Ca,ob||(bb=Gb+1),sd>Gb&&(p=Math.min(sd-1-Gb,D.n),k=hc(D.b,Gb,D.x[ob],p),k>=2)){db=7>Yd?8:11;oc=K+Gb&D.y;se=Ti+(um=D.i.Cc[272*
ff+(Gb-2)],um+da(D,ob,Yd,ff))+Fd[D.C[(db<<4)+oc]>>>2]+S(M(D.A,K+Gb,Ma(D.b,Gb-1-1)),1,Ma(D.b,Gb-1-(D.x[ob]+1)),Ma(D.b,Gb-1));db=Ia(db);oc=K+Gb+1&D.y;se+=Fd[2048-D.C[(db<<4)+oc]>>>2];se+=Fd[2048-D.bb[db]>>>2];for(Wh=Gb+1+k;O+Wh>Kb;)D.a[++Kb].z=268435455;se+=(Nj=D.i.Cc[272*oc+(k-2)],Nj+da(D,0,db,oc));oc=D.a[O+Wh];oc.z>se&&(oc.z=se,oc.r=O+Gb+1,oc.j=0,oc.t=1,oc.Ac=1,oc.r2=O,oc.j2=ob)}}if(Cc>td){Cc=td;for(Gc=0;Cc>D.m[Gc];Gc+=2);D.m[Gc]=Cc;Gc+=2}if(Cc>=bb){for(Ca=yh+Fd[D.bb[Yd]>>>2];O+Cc>Kb;)D.a[++Kb].z=
268435455;for(ob=0;bb>D.m[ob];)ob+=2;for(Gb=bb;;++Gb)if(la=D.m[ob+1],se=Ca+Ea(D,la,Gb,ff),oc=D.a[O+Gb],oc.z>se&&(oc.z=se,oc.r=O,oc.j=la+4,oc.t=0),Gb==D.m[ob]){if(sd>Gb&&(p=Math.min(sd-1-Gb,D.n),k=hc(D.b,Gb,la,p),k>=2)){db=7>Yd?7:10;oc=K+Gb&D.y;se=se+Fd[D.C[(db<<4)+oc]>>>2]+S(M(D.A,K+Gb,Ma(D.b,Gb-1-1)),1,Ma(D.b,Gb-(la+1)-1),Ma(D.b,Gb-1));db=Ia(db);oc=K+Gb+1&D.y;se+=Fd[2048-D.C[(db<<4)+oc]>>>2];se+=Fd[2048-D.bb[db]>>>2];for(Wh=Gb+1+k;O+Wh>Kb;)D.a[++Kb].z=268435455;se+=(dh=D.i.Cc[272*oc+(k-2)],dh+da(D,
0,db,oc));oc=D.a[O+Wh];oc.z>se&&(oc.z=se,oc.r=O+Gb+1,oc.j=0,oc.t=1,oc.Ac=1,oc.r2=O,oc.j2=la+4)}if(ob+=2,ob==Gc)break}}}}}function Ea(D,K,O,ja){var la,aa=ka(O);return la=128>K?D.lb[128*aa+K]:D.P[(aa<<6)+(131072>K?Ri[K>>6]+12:134217728>K?Ri[K>>16]+32:Ri[K>>26]+52)]+D.nc[15&K],la+D.$.Cc[272*ja+(O-2)]}function da(D,K,O,ja){var la;return K?(la=Fd[2048-D.hb[O]>>>2],1==K?la+=Fd[D.Ub[O]>>>2]:(la+=Fd[2048-D.Ub[O]>>>2],la+=Ve(D.vc[O],K-2))):(la=Fd[D.hb[O]>>>2],la+=Fd[2048-D._[(O<<4)+ja]>>>2]),la}function qb(D){var K=
0;a:{var O=D.b;var ja=D.m,la,aa,Ya,db,bb,Kb,ob,Gc;if(O.h>=O.o+O.ob)var Gb=O.ob;else if(Gb=O.h-O.o,O.xb>Gb){O=(ub(O),0);break a}var k=0;var Ca=O.o>O.p?O.o-O.p:0;var yd=O.f+O.o;var Cc=1;var xd=bb=0;O.qb?(aa=Gl[255&O.c[yd]]^255&O.c[yd+1],bb=1023&aa,aa^=(255&O.c[yd+2])<<8,xd=65535&aa,Kb=(aa^Gl[255&O.c[yd+3]]<<5)&O.Ec):Kb=255&O.c[yd]^(255&O.c[yd+1])<<8;aa=O.ub[O.R+Kb]||0;O.qb&&(la=O.ub[bb]||0,Ya=O.ub[1024+xd]||0,O.ub[bb]=O.o,O.ub[1024+xd]=O.o,la>Ca&&O.c[O.f+la]==O.c[yd]&&(ja[k++]=Cc=2,ja[k++]=O.o-la-1),
Ya>Ca&&O.c[O.f+Ya]==O.c[yd]&&(Ya==la&&(k-=2),ja[k++]=Cc=3,ja[k++]=O.o-Ya-1,la=Ya),0!=k&&la==aa&&(k-=2,Cc=1));O.ub[O.R+Kb]=O.o;Kb=(O.k<<1)+1;var td=O.k<<1;bb=xd=O.w;0!=O.w&&aa>Ca&&O.c[O.f+aa+O.w]!=O.c[yd+O.w]&&(ja[k++]=Cc=O.w,ja[k++]=O.o-aa-1);for(la=O.Fc;;){if(Ca>=aa||0==la--){O.L[Kb]=O.L[td]=0;break}if(db=O.o-aa,Ya=(O.k>=db?O.k-db:O.k-db+O.p)<<1,Gc=O.f+aa,ob=xd>bb?bb:xd,O.c[Gc+ob]==O.c[yd+ob]){for(;++ob!=Gb&&O.c[Gc+ob]==O.c[yd+ob];);if(ob>Cc&&(ja[k++]=Cc=ob,ja[k++]=db-1,ob==Gb)){O.L[td]=O.L[Ya];
O.L[Kb]=O.L[Ya+1];break}}(255&O.c[yd+ob])>(255&O.c[Gc+ob])?(O.L[td]=aa,td=Ya+1,aa=O.L[td],xd=ob):(O.L[Kb]=aa,Kb=Ya,aa=O.L[Kb],bb=ob)}O=(ub(O),k)}return D.D=O,D.D>0&&(K=D.m[D.D-2],K==D.n&&(K+=hc(D.b,K-1,D.m[D.D-1],273-K))),++D.s,K}function Nb(D){D.b&&D.W&&(D.b.cc=null,D.W=0)}function Wa(D){return 2048>D?Ri[D]:2097152>D?Ri[D>>10]+20:Ri[D>>20]+40}function ua(D,K){bc(D.db);for(var O=0;K>O;++O)bc(D.Vb[O].G),bc(D.Wb[O].G);bc(D.ic.G)}function Vf(D,K,O,ja,la){var aa;var Ya=Fd[D.db[0]>>>2];var db=Fd[2048-
D.db[0]>>>2];var bb=db+Fd[D.db[1]>>>2];db+=Fd[2048-D.db[1]>>>2];for(aa=0;8>aa;++aa){if(aa>=O)return;ja[la+aa]=Ya+Pa(D.Vb[K],aa)}for(;16>aa;++aa){if(aa>=O)return;ja[la+aa]=bb+Pa(D.Wb[K],aa-8)}for(;O>aa;++aa)ja[la+aa]=db+Pa(D.ic,aa-8-8)}function qc(D,K,O,ja){8>O?(ib(K,D.db,0,0),N(D.Vb[ja],K,O)):(O-=8,ib(K,D.db,0,1),8>O?(ib(K,D.db,1,0),N(D.Wb[ja],K,O)):(ib(K,D.db,1,1),N(D.ic,K,O-8)));0==--D.sc[ja]&&(Vf(D,ja,D.rb,D.Cc,272*ja),D.sc[ja]=D.rb)}function Xa(D){D.db=Ob(2);D.Vb=Ob(16);D.Wb=Ob(16);D.ic=Za({},
8);for(var K=0;16>K;++K)D.Vb[K]=Za({},3),D.Wb[K]=Za({},3);return D.Cc=[],D.sc=[],D}function U(D,K){for(var O=0;K>O;++O)Vf(D,O,D.rb,D.Cc,272*O),D.sc[O]=D.rb}function M(D,K,O){return D.V[((K&D.qc)<<D.u)+((255&O)>>>8-D.u)]}function kb(D,K,O){var ja,la=1;for(ja=7;ja>=0;--ja){var aa=O>>ja&1;ib(K,D.tb,la,aa);la=la<<1|aa}}function S(D,K,O,ja){var la,aa,Ya=1,db=7,bb=0;if(K)for(;db>=0;--db)if(aa=O>>db&1,la=ja>>db&1,bb+=Ve(D.tb[(1+aa<<8)+Ya],la),Ya=Ya<<1|la,aa!=la){--db;break}for(;db>=0;--db)la=ja>>db&1,bb+=
Ve(D.tb[Ya],la),Ya=Ya<<1|la;return bb}function u(D,K){return D.F=K,D.G=Ob(1<<K),D}function F(D,K){var O,ja=1;for(O=D.F;0!=O;--O)ja=(ja<<1)+Ua(K,D.G,ja);return ja-(1<<D.F)}function Za(D,K){return D.F=K,D.G=Ob(1<<K),D}function N(D,K,O){var ja,la=1;for(ja=D.F;0!=ja;){--ja;var aa=O>>>ja&1;ib(K,D.G,la,aa);la=la<<1|aa}}function Pa(D,K){var O,ja=1,la=0;for(O=D.F;0!=O;){--O;var aa=K>>>O&1;la+=Ve(D.G[ja],aa);ja=(ja<<1)+aa}return la}function Eb(D,K,O){var ja,la=1;for(ja=0;D.F>ja;++ja){var aa=1&O;ib(K,D.G,la,
aa);la=la<<1|aa;O>>=1}}function Ua(D,K,O){var ja,la=K[O];return ja=(D.E>>>11)*la,(-2147483648^ja)>(-2147483648^D.Bb)?(D.E=ja,K[O]=la+(2048-la>>>5)<<16>>16,-16777216&D.E||(D.Bb=D.Bb<<8|E(D.Ab),D.E<<=8),0):(D.E-=ja,D.Bb-=ja,K[O]=la-(la>>>5)<<16>>16,-16777216&D.E||(D.Bb=D.Bb<<8|E(D.Ab),D.E<<=8),1)}function bc(D){for(var K=D.length-1;K>=0;--K)D[K]=1024}function ib(D,K,O,ja){var la=K[O];var aa=(D.E>>>11)*la;ja?(D.xc=Y(D.xc,lb(Sa(aa),[4294967295,0])),D.E-=aa,K[O]=la-(la>>>5)<<16>>16):(D.E=aa,K[O]=la+(2048-
la>>>5)<<16>>16);-16777216&D.E||(D.E<<=8,Gf(D))}function bh(D,K,O){for(--O;O>=0;--O)D.E>>>=1,1==(K>>>O&1)&&(D.xc=Y(D.xc,Sa(D.E))),-16777216&D.E||(D.E<<=8,Gf(D))}function Gf(D){var K=D.xc;var O=32;var ja;var la=(O&=63,ja=m(K,O),0>K[1]&&(ja=Y(ja,Ka([2,0],63-O))),ja);la=wa(la);if(0!=la||Va(D.xc,[4278190080,0])<0){D.mc=Y(D.mc,Sa(D.Jb));O=D.Oc;do K=D.Ab,O+=la,K.Mc[K.Yb++]=O<<24>>24,O=255;while(0!=--D.Jb);D.Oc=wa(D.xc)>>>24}++D.Jb;D.xc=Ka(lb(D.xc,[16777215,0]),8)}function Ve(D,K){return Fd[(2047&(D-K^-K))>>>
2]}function lk(D){for(var K,O,ja,la=0,aa=0,Ya=D.length,db=[],bb=[];Ya>la;++la,++aa){if(K=255&D[la],128&K)if(192==(224&K)){if(la+1>=Ya||(O=255&D[++la],128!=(192&O)))return D;bb[aa]=(31&K)<<6|63&O}else{if(224!=(240&K)||la+2>=Ya||(O=255&D[++la],128!=(192&O))||(ja=255&D[++la],128!=(192&ja)))return D;bb[aa]=(15&K)<<12|(63&O)<<6|63&ja}else{if(!K)return D;bb[aa]=K}16383==aa&&(db.push(String.fromCharCode.apply(String,bb)),aa=-1)}return aa>0&&(bb.length=aa,db.push(String.fromCharCode.apply(String,bb))),db.join("")}
function og(D){var K,O,ja=[],la=0,aa=D.length;if("object"==typeof D)return D;for(O=K=0;aa>O;++O)ja[K++]=D.charCodeAt(O);for(O=0;aa>O;++O)D=ja[O],D>=1&&127>=D?++la:la+=!D||D>=128&&2047>=D?2:3;K=[];for(O=la=0;aa>O;++O)D=ja[O],D>=1&&127>=D?K[la++]=D<<24>>24:!D||D>=128&&2047>=D?(K[la++]=(192|D>>6&31)<<24>>24,K[la++]=(128|63&D)<<24>>24):(K[la++]=(224|D>>12&15)<<24>>24,K[la++]=(128|D>>6&63)<<24>>24,K[la++]=(128|63&D)<<24>>24);return K}function xh(D){return D[1]+D[0]}var Uh="function"==typeof setImmediate?
setImmediate:setTimeout,Xf=4294967296,Qi=[4294967295,-Xf],Fl=[0,-0x7fffffffffffffff],ch=[0,0],Rk=[1,0],Gl=function(){var D,K,O=[];for(D=0;256>D;++D){var ja=D;for(K=0;8>K;++K)0!=(1&ja)?ja=ja>>>1^-306674912:ja>>>=1;O[D]=ja}return O}(),Ri=function(){var D,K,O=2,ja=[0,1];for(K=2;22>K;++K){var la=1<<(K>>1)-1;for(D=0;la>D;++D,++O)ja[O]=K<<24>>24}return ja}(),Fd=function(){var D,K,O=[];for(K=8;K>=0;--K){var ja=1<<9-K-1;for(D=1<<9-K;D>ja;++ja)O[ja]=(K<<6)+(D-ja<<6>>>9-K-1)}return O}(),Tk=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,O,ja){function la(){try{for(var Kb,ob=(new Date).getTime();Ab(db.c.yb);)if(aa=
xh(db.c.yb.Pb)/xh(db.c.Tb),(new Date).getTime()-ob>200)return ja(aa),Uh(la,0),0;ja(1);Kb=B(db.c.Nb);Uh(O.bind(null,Kb),0)}catch(Gc){O(null,Gc)}}var aa,Ya,db={},bb=void 0===O&&void 0===ja;if("function"!=typeof O&&(Ya=O,O=ja=0),ja=ja||function(Kb){void 0!==Ya&&postMessage({action:3,cbn:Ya,result:Kb})},O=O||function(Kb,ob){return void 0!==Ya?postMessage({action:1,cbn:Ya,result:Kb,error:ob}):void 0},bb){for(db.c=sa({},og(D),Tk(K));Ab(db.c.yb););return B(db.c.Nb)}try{db.c=sa({},og(D),Tk(K)),ja(0)}catch(Kb){return O(null,
Kb)}Uh(la,0)},decompress:function(D,K,O){function ja(){try{for(var ob,Gc=0,Gb=(new Date).getTime();Ab(Ya.d.yb);)if(++Gc%1E3==0&&(new Date).getTime()-Gb>200)return Kb&&(la=xh(Ya.d.yb.Z.g)/bb,O(la)),Uh(ja,0),0;O(1);ob=lk(B(Ya.d.Nb));Uh(K.bind(null,ob),0)}catch(k){K(null,k)}}var la,aa,Ya={},db=void 0===K&&void 0===O;if("function"!=typeof K&&(aa=K,K=O=0),O=O||function(ob){void 0!==aa&&postMessage({action:3,cbn:aa,result:Kb?ob:-1})},K=K||function(ob,Gc){return void 0!==aa?postMessage({action:2,cbn:aa,
result:ob,error:Gc}):void 0},db){for(Ya.d=Ba({},D);Ab(Ya.d.yb););return lk(B(Ya.d.Nb))}try{Ya.d=Ba({},D);var bb=xh(Ya.d.Tb);var Kb=bb>-1;O(0)}catch(ob){return K(null,ob)}Uh(ja,0)}}}();this.LZMA=this.LZMA_WORKER=e}
if(typeof self==="undefined"||!self.constructor.name.includes("Worker")){var saveAs=saveAs||function(Ob){if(!(typeof Ob==="undefined"||typeof navigator!=="undefined"&&/MSIE [1-9]\./.test(navigator.userAgent))){var Y=Ob.document.createElementNS("http://www.w3.org/1999/xhtml","a"),lb="download"in Y,Va=/constructor/i.test(Ob.HTMLElement)||Ob.safari,Qa=/CriOS\/[\d]+/.test(navigator.userAgent),Sa=function(t){(Ob.setImmediate||Ob.setTimeout)(function(){throw t;},0)},wa=function(t){setTimeout(function(){typeof t===
"string"?(Ob.URL||Ob.webkitURL||Ob).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},Ka=function(t,E,Q){Q||(t=I(t));var B=this,qa=t.type==="application/octet-stream",sa=function(){var Ma=["writestart","progress","write","writeend"];Ma=[].concat(Ma);for(var hc=Ma.length;hc--;){var Fb=B["on"+Ma[hc]];if(typeof Fb==="function")try{Fb.call(B,B)}catch(ma){Sa(ma)}}};
B.readyState=B.INIT;if(lb){var Ba=(Ob.URL||Ob.webkitURL||Ob).createObjectURL(t);setTimeout(function(){Y.href=Ba;Y.download=E;var Ma=new MouseEvent("click");Y.dispatchEvent(Ma);sa();wa(Ba);B.readyState=B.DONE})}else(function(){if((Qa||qa&&Va)&&Ob.FileReader){var Ma=new FileReader;Ma.onloadend=function(){var hc=Qa?Ma.result:Ma.result.replace(/^data:[^;]*;/,"data:attachment/file;");Ob.open(hc,"_blank")||(Ob.location.href=hc);B.readyState=B.DONE;sa()};Ma.readAsDataURL(t);B.readyState=B.INIT}else Ba||=
(Ob.URL||Ob.webkitURL||Ob).createObjectURL(t),qa?Ob.location.href=Ba:Ob.open(Ba,"_blank")||(Ob.location.href=Ba),B.readyState=B.DONE,sa(),wa(Ba)})()},m=Ka.prototype;if(typeof navigator!=="undefined"&&navigator.msSaveOrOpenBlob)return function(t,E,Q){E=E||t.name||"download";Q||(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,Q){return new Ka(t,
E||t.name||"download",Q)}}}(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(Ob){for(Ob=0;Ob<tilbuci_resize.length;Ob++)tilbuci_resize[Ob]()}}
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);
