-
Notifications
You must be signed in to change notification settings - Fork 0
/
as3vm-0.3.7.min.js
113 lines (113 loc) · 53.8 KB
/
as3vm-0.3.7.min.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
/**
* as3vm is (C) 2012 uxebu Inc.
*
* No permission or right to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software is granted.
* All rights reserved to the copyright holders.
*/
(function(){function ua(a,b,c,d){return c instanceof b?c:null===c||void 0===c?null:"function"===typeof b.__is__&&b.__is__(c)||b===a&&c.__isClass__?c:d}function va(a,b,c,d){switch(b){case void 0:if(void 0===c)return;break;case a.String:case a.Object:return null===c||void 0===c?null:b(c);case a.Boolean:case a.Number:case a.int:case a.uint:return b(c);default:if(c=ua(a.Class,b,c,wa),c!==wa)return c}throw new TypeError("Error #1034: unable to convert value to "+(d||"target type"));}function Xa(a,b,c){if(b.hasOptionalParameters)return c.option.map(function(b){return a.getConstant(b.kind,
b.value)})}function Ya(a,b){return b.map(function(b){return 0===b?"*":a.multinames[b]})}function Za(a,b,c){if(b.hasParameterNames)return c.map(function(b){return a.strings[b]})}function fa(a){this.name=a}function ga(a){this.name=a}function ha(a){this.name=a}function V(a){this.name=a}function ia(a){this.name=a}function W(a){this.name=a}function ja(a){this.name=a}function ka(a){this.namespaces=a}function $a(a){Object.defineProperties(a,{__deleteProperty__:{enumerable:!1,value:function(a){return a.deleteFrom(this)},
writable:!1},__get__:{enumerable:!1,value:function(a){return a.getFrom(this)},writable:!1},__getUnbound__:{enumerable:!1,value:function(a){return a.getUnboundFrom(this)},writable:!1},__has__:{enumerable:!1,value:function(a){return a.inObject(this)},writable:!1},__set__:{enumerable:!1,value:function(a,c){a.setIn(this,c)},writable:!1}})}function ab(a){var b=xa.exports.tools.expando;Object.defineProperties(a,{__deleteProperty__:{value:function(a){var d=this[b];return!!d&&d.deleteProperty(a.name)}},__get__:{value:function(a){var d=
this[b];return d&&d.get(a.name)}},__has__:{value:function(a){var d=this[b];return!!d&&d.has(a.name)}},__hasOwn__:{value:function(a){var d=this[b];return!!d&&d.has(a)}},__keys__:{value:function(){var a=this[b];return a?a.keys.slice():[]}},__set__:{value:function(a,d){var e=this[b];return e&&e.set(a.name,d)}}})}function bb(a){var b=xa.exports.tools.expando;Object.defineProperties(a,{__deleteProperty__:{enumerable:!1,value:function(a){var d=this[b],a=a.name;return a>>>0===+a?d&&delete d[a]:a in this?
delete this[a]:!0},writable:!1},__get__:{enumerable:!1,value:function(a){var d=a.name;if(d>>>0===+d){if(!this.__has__(a))throw RangeError("Error #1125: The index is ouf of range");return this[b].data[d]}if(!(d in this))throw ReferenceError("Error #1069");return this[d]},writable:!1},__has__:{enumerable:!1,value:function(a){a=a.name;return a>>>0===+a?this[b].data.hasOwnProperty(a):a in this},writable:!1},__hasOwn__:{value:function(a){var d=this[b];return!d?!1:(name>>>0===+name?d.data:this).hasOwnProperty(a)}},
__keys__:{value:function(){var a=this[b];return a?Object.keys(a.data):[]}},__set__:{enumerable:!1,value:function(a,b){var e=a.name;if("length"===e||"fixed"===e)return this[e]=b;if(e>>>0!==+e)throw ReferenceError("Error #1056");this.__setIndex__(e,b)},writable:!1}})}function ya(a,b,c,d,e,f){for(;b!==c;){var g=a[b];if(e.call(f,g))return g;b+=d}}function h(a,b){this.namespace=a;this.name=b}function u(a){this.name=a}function v(){}function j(a,b){this.namespaceSet=a;this.name=b;this._qnames=null}function cb(a){return new h(a,
this.name)}function X(a){return a.inObject(this)}function w(a){this.namespaceSet=a}function m(a,b){this.type=a;this.parameter=b}function za(a){for(var b,c,d=[],e=0,f=a.length;e<f;e+=1)b=a[e],c=b.__interfaces__,d.push(b),c&&d.push.apply(d,za(c));return d}function db(a,b){if(!a.hasOwnProperty("__interfaces__")){var c=a.__proto__;a.__interfaces__=c&&c.__interfaces__?c.__interfaces__.slice():[]}b.forEach(function(b){var c=b.prototype;Object.getOwnPropertyNames(c).forEach(function(b){var d=Object.getOwnPropertyDescriptor(c,
b);if((d=d&&(d.value||d.get||d.set))&&d.__isMethod__)d=Aa.parse(b),b=d.name,d=d.toProperty(),b=eb(b),Object.defineProperty(a,d,b)})});c=a.__interfaces__;c.push.apply(c,b);Ba(c)}function fb(a,b,c,d){var e=function(){};b.createObjectFromTraits(d.traits,e.prototype,c.scope);e.__interfaces__=d.interfaces.map(function(d){return la(a,b,c,d)});e.__is__=function(a){return!(!a||!(a.__interfaces__&&-1!==a.__interfaces__.indexOf(e)))};return e}function gb(a,b){var c=hb(a.abcs.map(function(a){return a.instances}));
return ib(c,function(a){return b.match(a.name)})}function la(a,b,c,d){if(ma.__has__(d))return ma.__get__(d);var e=a.getType(d);if(e)a=Aa.parse(e.__name__);else{var f=gb(a,d);if(!f)throw new TypeError("Cannot find interface "+d);e=fb(a,b,c,f);a=f.name}ma.__set__(a,e);return e}function eb(a){return{get:function(){return this[a]},set:function(b){this[a]=b}}}function Ca(a,b,c){c=c||[];Object.keys(a).forEach(function(d){var e=a[d];e&&"undefined"!==typeof e.__isNamespace__?Ca(e,b,c.concat(d)):(e&&e.__isBuiltIn__&&
e.prototype&&jb(e),d=na.fromStrings(c.join("."),d),e&&e.__isClass__&&Object.defineProperties(e,{__name__:{value:d.name},__qualifiedName__:{value:d.toString()}}),b.__set__(d,e))})}function kb(a){return Object.getOwnPropertyNames(a.prototype).filter(lb).filter(function(b){return"function"===typeof a.prototype[b]})}function lb(a){return"constructor"!==a&&0!==a.indexOf("__")}function jb(a){kb(a).forEach(function(b){var c=a.prototype[b],b=na.fromStrings("http://adobe.com/AS3/2006/builtin",b);Object.defineProperty(a.prototype,
b.toProperty(),{enumerable:!1,value:c})})}function Y(){}function n(a){return a|0}function mb(a){return a>>>0}function oa(a){return+a}function Da(a,b,c){if(null===c||void 0===c)return!1;if(b===a.Object)return!0;var d=typeof c;return"string"==d?b===a.String:"boolean"==d?b===a.Boolean:"number"==d&&(b===a.int||b===a.uint||b===a.Number)?(a=b(c),a===c||a!==a):!!pa.coerceClass(a.Class,b,c)}function nb(a,b){for(var c={},d,e,f,g;a&&a.__traits__;){if(a.hasOwnProperty("__traits__")){d=0;for(g=a.__traits__;e=
g[d];d+=1)e.isSlot&&(f=e.name.toProperty(),e=b.coerceTraitValue(e),c[f]=null===e?ob:void 0===e?pb:0===e?qb:e!==e?rb:{value:e,writable:!0})}a=Object.getPrototypeOf(a)}return c}function Ea(a){this.global=a.global;this.scopes=a.scopes.slice(0)}function A(a){this.global=a;this.localOffset=0;this.scopes=[]}function Fa(a,b){this.global=sb(b);this.hooks={};this.abcs=a.map(function(a){return a(this)},this);var c=this;Object.defineProperty(this.global,"__has__",{value:function(a){c.abcs.some(function(b){return b.hasType(a)});
if(a.isTypename){if(c.getType(a.type)!==this.Vector)throw new TypeError("Error #1010: Unable to create non-Vector<T> types");var b=this.VectorFactory(c.getType(a.parameter)),f=a.toString();Object.defineProperties(b,{__name__:{value:f},__qualifiedName__:{value:f}});this.__set__(a,b)}return Object.prototype.__has__.call(this,a)}})}function Z(a){return"string"===typeof a?tb.QName.fromSymbolClass(a):a}function Ga(){var a=function(a,c,d,e){this.name=a;this.slotId=c;this.typeName=d;this.value=e};a.create=
function(b,c,d,e){var d=e.slot_id,f=e.type_name,g=e.vkind,e=e.vindex,i,Ha;0!==f&&(i=b.multinames[f]);g&&(Ha=b.getConstant(g,e));return new a(c,d,i,Ha)};return a}function $(a,b,c){this.name=a;this.slotId=b;this.klass=c}function aa(a,b,c){this.name=a;this.slotId=b;this.method=c}function B(a,b,c,d){this.name=a;this.dispatchId=b;this.value=this.method=c;d&&(this.isFinal=d.isFinal,this.isOverride=d.isOverride)}function C(a,b,c,d){this.name=a;this.dispatchId=b;this.value=this.method=c;d&&(this.isFinal=
d.isFinal,this.isOverride=d.isOverride)}function D(a,b,c,d){this.name=a;this.dispatchId=b;this.value=this.method=c;d&&(this.isFinal=d.isFinal,this.isOverride=d.isOverride)}function ub(a,b){return b.map(function(b){return vb.create(a,b)})}function wb(a,b){return b["interface"].map(function(b){return a.multinames[b]})}function xb(a,b){return b.map(function(b){return yb.create(a,b)})}function zb(a,b){return b.map(function(b){return Ab.create(a,b)})}function Bb(a,b){return b.map(function(b){return Cb.create(a,
b)})}function Ia(a,b,c,d){this.abcFile=b;this.currentMethod=(this.body=c)?c.code:{};this.signature=d;this.toplevel=a;this.super=void 0}function Db(a,b,c,d){var e=c.parameters.length;c.optionalParameters&&qa.setDefaults(b,c.optionalParameters,e);c.needsRestArguments&&(b=qa.convertRest(b,e));b=b.map(function(a,b){return Ja(d,c.parameters[b],a)});c.needsArguments&&(b=b.slice(0,c.parameters.length).concat([b.slice(0)]));return qa.toRegisters(a,b)}function ba(a,b,c){this.abcFile=a;this.executed=!1;this.method=
b;this.traits=c;this.scope=new Eb(this.abcFile.toplevel.global)}function Fb(a,b){return b.map(function(b){return Gb.create(a,b)})}function x(a,b,c){this.toplevel=a;this.version={major:b.major_version,minor:b.minor_version};this.strings=Hb(b.constant_pool.string);this.integers=b.constant_pool.integer.map(Number);this.uintegers=b.constant_pool.uinteger.map(Number);this.doubles=b.constant_pool["double"].map(Number);this.namespaces=Ib(this,b.constant_pool.namespace);this.namespaceSets=Jb(this,b.constant_pool.ns_set);
this.multinames=Kb(this,b.constant_pool.multiname);Lb(this);this.methodSignatures=Mb(this,b.method_info);this.methodBodies=Nb(this,b.method_body_info);this.methods=Ob(this,c);this.classes=Pb(this,b.class_info);this.instances=Qb(this,b.instance_info);this.scripts=Rb(this,b.script_info)}function Hb(a){return a.map(function(a){return"http://adobe.com/AS3/2006/builtin"===a?"":a})}function Ib(a,b){return[null].concat(b.slice(1).map(function(b){return Sb.create(a,b)}))}function Jb(a,b){return[null].concat(b.slice(1).map(function(b){return Tb.create(a,
b)}))}function Kb(a,b){return[null].concat(b.slice(1).map(function(b){return Ub.create(a,b)}))}function Lb(a){a.multinames.slice(1).filter(function(a){return a.isTypename}).forEach(function(b){b.resolveType(a)})}function Mb(a,b){return b.map(function(b){return Vb.create(a,b)})}function Nb(a,b){return b.map(function(b){return Wb.create(a,b)})}function Ob(a,b){b&&a.methodBodies.forEach(function(a,d){a.code=b[d];b[d].methodBody=a});return a.methodSignatures.map(function(b){var d=a.getMethodBodyBySignature(b);
return new Xb(a.toplevel,a,d,b)})}function Pb(a,b){return b.map(function(b){return Yb.create(a,b)})}function Qb(a,b){return b.map(function(b){return Zb.create(a,b)})}function Rb(a,b){return b.map(function(b){return $b.create(a,b)})}function t(a){return this.namespaces[a]}var y={},wa={};y.module$exports={coerce:va,coerceClass:ua,coerceToName:function(a,b,c){if(!b||"*"===b)return c;var d="void"===b.toString()?void 0:a.getType(b);return va(a.global,d,c,b)}};y.module$exports&&(y=y.module$exports);var r=
{};r.module$exports=Function("return this")();r.module$exports&&(r=r.module$exports);var E={},ac=r;E.module$exports={create:function(a,b){var c=ac.exports.tools.hitch,d=c(a,b);Object.defineProperties(d,{__isMethodClosure__:{value:!0},apply:{value:c(d,d.apply)},call:{value:c(d,d.call)}});return d},shouldCreate:function(a){return a&&a.__isMethod__}};E.module$exports&&(E=E.module$exports);var F={},Ka={create:function(a,b){var c=Ya(a,b.param_type),d=a.multinames[b.return_type],e;e=b.name;e=0!==e?a.strings[e]:
void 0;var f={needsArguments:!!(b.flags&1),needsActivation:!!(b.flags&2),needsRestArguments:!!(b.flags&4),hasOptionalParameters:!!(b.flags&8),usesDxns:!!(b.flags&64),hasParameterNames:!!(b.flags&128)},g=Xa(a,f,b.options),i=Za(a,f,b.param_names);return new bc(c,d,e,f,g,i)}},bc=Ka.MethodSignature=function(a,b,c,d,e,f){this.parameters=a;this.returnType=b;this.name=c;this.needsArguments=d.needsArguments;this.needsActivation=d.needsActivation;this.needsRestArguments=d.needsRestArguments;this.usesDxns=
d.usesDxns;this.optionalParameters=e;this.parameterNames=f};F.module$exports=Ka;F.module$exports&&(F=F.module$exports);var z={},cc="anonymous"+(new Date).getTime()+"-",La=0;fa.prototype={isPublicNamespace:function(){return""===this.name},match:function(a){return this.name===a.name},toString:function(){return this.name}};ga.prototype={isPublicNamespace:function(){return""===this.name},match:function(a){return this.name===a.name},toString:function(){return this.name}};ha.prototype={isPublicNamespace:function(){return!1},
match:function(a){return this.name===a.name},toString:function(){return this.name}};V.prototype={isPublicNamespace:function(){return!1},match:function(a){return a instanceof V||this.name===a.name},toString:function(){return this.name}};ia.prototype={isPublicNamespace:function(){return!1},match:function(a){return this.name===a.name},toString:function(){return this.name}};W.prototype={isPublicNamespace:function(){return!1},match:function(a){return a instanceof W||this.name===a.name},toString:function(){return this.name}};
ja.prototype={isPublicNamespace:function(){return!1},match:function(a){return this.name===a.name},toString:function(){return this.name}};var dc={8:fa,22:ga,23:ha,24:V,25:ia,26:W,5:ja};z.module$exports={create:function(a,b){var c=b.kind,d=b.name,d=0!==d?a.strings[d]:cc+(La+=1);return new dc[c](d)},Namespace:fa,PackageNamespace:ga,PackageInternalNamespace:ha,ProtectedNamespace:V,ExplicitNamespace:ia,StaticProtectedNamespace:W,PrivateNamespace:ja};z.module$exports&&(z=z.module$exports);var G={};ka.prototype=
{match:function(a){return this.namespaces.some(function(b){return b.name===a.name})},toString:function(){return"{"+this.namespaces.map(function(a){return a.toString()}).join(", ")+"}"}};G.module$exports={create:function(a,b){var c=b.ns.map(function(b){return a.namespaces[b]});return new ka(c)},NamespaceSet:ka};G.module$exports&&(G=G.module$exports);var ca={module$exports:{convertRest:function(a,b){var c=a.slice(0,b),d=a.slice(b);c.push(d);return c},setDefaults:function(a,b,c){var d=c-b.length;b.forEach(function(b,
c){var g=d+c;g in a||(a[g]=b)})},toRegisters:function(a,b){return[a].concat(b)}}};ca.module$exports&&(ca=ca.module$exports);var H={},xa=r;H.module$exports={addToBuiltins:function(a){a.Object.prototype.__get__||($a(a.Object.prototype),a.Vector&&bb(a.Vector.prototype),(a=a.flash&&a.flash.utils&&a.flash.utils.Dictionary)&&ab(a.prototype))}};H.module$exports&&(H=H.module$exports);var o={},ec=Array.prototype.concat,fc=Function.call;o.module$exports={chain:function(a){return a.length?fc.apply(ec,a):a},
firstMatch:function(a,b,c){return ya(a,0,a.length,1,b,c)},lastMatch:function(a,b,c){return ya(a,a.length-1,-1,-1,b,c)},unique:function(a){for(var b,c,d=0;d in a;d+=1)for(c=a[d];-1!==(b=a.indexOf(c,d+1));)a.splice(b,1);return a}};o.module$exports&&(o=o.module$exports);var l={},Ma=E,Na=z,I=o.firstMatch;h.create=function(a,b){return new h(a.namespaces[b.ns],a.strings[b.name])};h.fromStrings=function(a,b){var c=""===a?new Na.PackageNamespace(""):new Na.Namespace(a);return new h(c,b)};h.fromSymbolClass=
function(a){var b=a.split("."),a=b.pop(),b=b.join(".");return h.fromStrings(b,a)};h.parse=function(a){var b=a.split("\u03bb"),a=b.pop(),b=b.join("\u03bb");return h.fromStrings(b,a)};h.prototype.deleteFrom=function(a){var b=this.toProperty(),c=Object.getOwnPropertyDescriptor(a,b);return c&&c.configurable?delete a[b]:!1};h.prototype.getFrom=function(a){var b=this.getUnboundFrom(a);Ma.shouldCreate(b)&&(b=Ma.create(a,b),this.setIn(a,b,{}));return b};var gc=Object.prototype.hasOwnProperty,hc=Object.getPrototypeOf||
function(a){return a.__proto__};h.prototype.getDescriptorFrom=function(a){var b=this.toProperty();if(b in a){for(;!gc.call(a,b);)a=hc(a);return Object.getOwnPropertyDescriptor(a,this.toProperty())}};h.prototype.getUnboundFrom=function(a){var b=this.toProperty();return a[b]};h.prototype.inObject=function(a){return this.toProperty()in Object(a)};h.prototype.isPublic=function(){return this.namespace.isPublicNamespace()};h.prototype.match=function(a){return this.name===a.name&&this.namespace.match(a.namespace)};
h.prototype.resolve=function(){return this};h.prototype.setIn=function(a,b,c){c?(c.value=b,Object.defineProperty(a,this.toProperty(),c)):a[this.toProperty()]=b};h.prototype.toProperty=function(){return this.isPublic()?this.name:this.namespace.name+"\u03bb"+this.name};h.prototype.toString=function(){return this.isPublic()?this.name:this.namespace+"."+this.name};u.create=function(a,b){return new u(a.strings[b.name])};u.prototype.resolve=function(a){a=a.pop();return new h(a,this.name)};v.create=function(){return new v};
v.prototype.resolve=function(a){var b=a.pop(),a=a.pop();return new h(a,b)};j.create=function(a,b){return new j(a.namespaceSets[b.ns_set],a.strings[b.name])};j.prototype.deleteFrom=function(a){var b=I(this.qnames(),X,a);return b?b.deleteFrom(a):!0};j.prototype.getFrom=function(a){var b=I(this.qnames(),X,a);if(b)return b.getFrom(a)};j.prototype.getDescriptorFrom=function(a){var b;this.qnames().some(function(c){b=c.getDescriptorFrom(a);return!!b});return b};j.prototype.getUnboundFrom=function(a){var b=
I(this.qnames(),X,a);if(b)return b.getUnboundFrom(a)};j.prototype.inObject=function(a){return this.qnames().some(function(b){return b.inObject(a)})};j.prototype.match=function(a){return this.name===a.name&&this.namespaceSet.match(a.namespace)};j.prototype.resolve=function(){return this};var ic=function(a){return a.isPublic()};j.prototype.setIn=function(a,b,c){var d=I(this.qnames(),X,a)||I(this.qnames(),ic);if(d)return void d.setIn(a,b,c);throw new TypeError("Cannot find property '"+this+"' in object");
};j.prototype.toString=function(){return this.namespaceSet+"."+this.name};j.prototype.qnames=function(){return this._qnames?this._qnames:this._qnames=this.namespaceSet.namespaces.map(cb,this)};w.create=function(a,b){return new w(a.namespaceSets[b.ns_set])};w.prototype.resolve=function(a){a=a.pop();return new j(this.namespaceSet,a)};m.create=function(a,b){var c=new m;c.typeIndex=b.type;c.parameterIndex=b.param;return c};m.prototype=Object.create(h.prototype);m.prototype.isPublic=function(){return!0};
m.prototype.isTypename=!0;m.prototype.resolveType=function(a){this.type=a.multinames[this.typeIndex];this.parameter=a.multinames[this.parameterIndex]};m.prototype.toProperty=function(){return this.type.toProperty()+"$"+this.parameter.toProperty()};m.prototype.toString=function(){return this.type+"$"+this.parameter};var jc={7:h,13:h,15:u,16:u,17:v,18:v,9:j,14:j,27:w,28:w,29:m};l.module$exports={Multiname:j,MultinameL:w,QName:h,RTQName:u,RTQNameL:v,Typename:m,create:function(a,b){var c=b.kind,d=jc[c];
if(!d)throw Error("Encountered unknown kind... ["+c+"]");return d.create(a,b.data)}};l.module$exports&&(l=l.module$exports);var J={},ra=o,Aa=l.QName,Ba=ra.unique,hb=ra.chain,ib=ra.firstMatch,ma={};J.module$exports={applyInterfaces:function(a,b,c,d,e){d=d.map(function(d){return la(a,b,c,d)});db(e,Ba(za(d)))},getInterface:la};J.module$exports&&(J=J.module$exports);var K={},kc=H,na=l.QName;K.module$exports=function(a,b){var b=b||{},c=b.map||{};kc.addToBuiltins(a);Ca(a,c);c.__set__(na.fromStrings("__AS3__.vec",
"Vector"),c.Vector);return c};K.module$exports&&(K=K.module$exports);var L={},Oa=J,lc=r,sa=l,pa=y,k=sa.QName,mc=sa.Typename,nc=Oa.applyInterfaces,oc=Oa.getInterface,ob={value:null,writable:!0},pb={value:void 0,writable:!0},qb={value:0,writable:!0},rb={value:0/0,writable:!0},Pa=function(a){this.vm=a;this.abcFile=a.abcFile;this.toplevel=a.toplevel};Pa.prototype={bkpt:function(){throw Error("Not implemented");},nop:function(){},"throw":function(){throw this.vm.stack.pop();},setsuper:function(a){var b=
this.vm,c=b.stack.pop(),a=b.getMultinameByIndex(a),d=b.stack.pop();a.getDescriptorFrom(b.super.prototype).set.call(d,c)},getsuper:function(a){var b=this.vm,a=b.getMultinameByIndex(a),c=b.stack.pop();if(null===c)throw new TypeError("Error #1009: Unable to generate super from null");if(void 0===c)throw new TypeError("Error #1010: Unable to generate super from undefined");a=a.getDescriptorFrom(b.super.prototype).get.call(c);b.stack.push(a)},dxns:function(){throw Error("Not implemented");},dxnslate:function(){throw Error("Not implemented");
},kill:function(a){this.vm.localRegisters[a]=void 0},label:Y,lf32x4:function(){throw Error("Not implemented");},sf32x4:function(){throw Error("Not implemented");},ifnlt:function(a){this.lessthan();var b=!this.vm.stack.pop();b&&(this.vm.nextLabel=a);return b},ifnle:function(a){this.lessequals();var b=!this.vm.stack.pop();b&&(this.vm.nextLabel=a);return b},ifngt:function(a){this.greaterthan();var b=!this.vm.stack.pop();b&&(this.vm.nextLabel=a);return b},ifnge:function(a){this.greaterequals();var b=
!this.vm.stack.pop();b&&(this.vm.nextLabel=a);return b},jump:function(a){this.vm.nextLabel=a},iftrue:function(a){var b=!!this.vm.stack.pop();b&&(this.vm.nextLabel=a);return b},iffalse:function(a){var b=!this.vm.stack.pop();b&&(this.vm.nextLabel=a);return b},ifeq:function(a){this.equals();var b=this.vm.stack.pop();b&&(this.vm.nextLabel=a);return b},ifne:function(a){this.equals();var b=!this.vm.stack.pop();b&&(this.vm.nextLabel=a);return b},iflt:function(a){this.lessthan();var b=this.vm.stack.pop();
b&&(this.vm.nextLabel=a);return b},ifle:function(a){this.lessequals();var b=this.vm.stack.pop();b&&(this.vm.nextLabel=a);return b},ifgt:function(a){this.greaterthan();var b=this.vm.stack.pop();b&&(this.vm.nextLabel=a);return b},ifge:function(a){this.greaterequals();var b=this.vm.stack.pop();b&&(this.vm.nextLabel=a);return b},ifstricteq:function(a){this.strictequals();var b=this.vm.stack.pop();b&&(this.vm.nextLabel=a);return b},ifstrictne:function(a){this.strictequals();var b=!this.vm.stack.pop();
b&&(this.vm.nextLabel=a);return b},x1b:function(){throw Error("Not implemented");},pushwith:function(){var a=this.vm.stack.pop();if(null===a)throw new TypeError("Error #1009: with can not use null");if(void 0===a)throw new TypeError("Error #1010: with can not use undefined");this.vm.scope.push(a)},popscope:function(){this.vm.scope.pop()},nextname:function(){var a=this.vm.stack.pop();this.vm.stack.pop();this.vm.stack.push(this.vm.iterationCache[this.vm.lastIterationId][a-1])},hasnext:function(){throw Error("Not implemented");
},pushnull:function(){this.vm.stack.push(null)},pushundefined:function(){this.vm.stack.push(void 0)},nextvalue:function(){var a=this.vm.toplevel.getType(k.fromStrings("","XML")),b=this.vm.toplevel.getType(k.fromStrings("","XMLList")),c=this.vm.stack.pop()-1,d=this.vm.stack.pop();if("[object Array]"===Object.prototype.toString.call(d)||d instanceof a||d instanceof b)d=d[c]||"";else if(d&&"[object Object]"===Object.prototype.toString.call(d))a=Object.keys(d)[c],d=d[a]||"";else throw Error("nextvalue is not implemented for non-object/non-array types");
this.vm.stack.push(d)},pushbyte:function(a){this.vm.stack.push(a<<24>>24)},pushshort:function(a){this.vm.stack.push(a<<16>>16)},pushtrue:function(){this.vm.stack.push(!0)},pushfalse:function(){this.vm.stack.push(!1)},pushnan:function(){this.vm.stack.push(NaN)},pop:function(){this.vm.stack.pop()},dup:function(){var a=this.vm.stack;a.push(a[a.length-1])},swap:function(){var a=this.vm.stack,b=a.pop(),c=a.pop();a.push(b,c)},pushstring:function(a){this.vm.stack.push(this.abcFile.strings[a])},pushint:function(a){this.vm.stack.push(this.abcFile.integers[a])},
pushuint:function(a){this.vm.stack.push(this.abcFile.uintegers[a])},pushdouble:function(a){this.vm.stack.push(this.abcFile.doubles[a])},pushscope:function(){var a=this.vm.stack.pop();if(null===a)throw new TypeError("Error #1009: scope can not be null");if(void 0===a)throw new TypeError("Error #1010: scope can not be undefined");this.vm.scope.push(a)},pushnamespace:function(a){this.vm.stack.push(this.abcFile.namespaces[a])},hasnext2:function(a,b){var c=this.vm,d=c.localRegisters[b],e=c.localRegisters[a];
if(e){if(0===d){c.iterationCache||(c.iterationCache=[]);var f=null,f=e.__keys__?e.__keys__():Object.keys(e);c.iterationCache[b]=f}f=c.iterationCache[b];if(d<=f.length){do var g=f[d],d=d+1,g=e.__hasOwn__?e.__hasOwn__(g):e.hasOwnProperty(g);while(!g&&d<=f.length);if(d>f.length&&e.__hasOwn__){var i=e.__keys__();f.forEach(function(a){a=i.indexOf(a);0<=a&&i.splice(a,1)});i.length&&f.push.apply(f,i)}}d>f.length&&(e=e.__proto__,d=0);c.localRegisters[b]=d;c.localRegisters[a]=e;c.lastIterationId=b;if(null===
e)c.stack.push(!1);else{if(0===d)return this.hasnext2(a,b);c.stack.push(!0)}}else c.stack.push(!1)},li8:function(){throw Error("Not implemented");},li16:function(){throw Error("Not implemented");},li32:function(){throw Error("Not implemented");},lf32:function(){throw Error("Not implemented");},lf64:function(){throw Error("Not implemented");},si8:function(){throw Error("Not implemented");},si16:function(){throw Error("Not implemented");},si32:function(){throw Error("Not implemented");},sf32:function(){throw Error("Not implemented");
},sf64:function(){throw Error("Not implemented");},newfunction:function(a){this.vm.stack.push(this.abcFile.methods[a].toFunction(this.vm.scope))},_call:function(a,b,c){var d=this.vm;if(!b.__isBuiltIn__&&b.__isClass__){if(1!=c.length)throw new TypeError("Error #1112: Argument count mismatch on class coercion. Expected 1, got "+c.length);d.stack.push(pa.coerce(d.toplevel.global,b,c[0]))}else this.nativeFunctionCallValidation(a,b,c),d.stack.push(b.apply(a,c))},nativeFunctionCallValidation:function(a,
b,c){var d=this.vm.toplevel.global,e=d.Number;if(b==e.prototype.valueOf&&!(a instanceof Number))throw new TypeError("Error #1004: Method was Number.prototype.valueOf invoked on an incompatible object");if(b==e.prototype.toString&&0<c.length){if(isNaN(c[0]))throw new RangeError("Error #1003: The radix argument for Number#toString must be between 2 and 36, was NaN");if(2>c[0]||36<c[0])throw new RangeError("Error #1003: The radix argument for Number#toString must be between 2 and 36, was ["+c[0]+"]");
if(0!=c[0]%1)throw new RangeError("Error #1003: The radix argument for Number#toString must be an integer, was ["+c[0]+"]");}if(b==e.prototype.toPrecision&&0<c.length){if(isNaN(c[0]))throw new RangeError("Error #1002: The precision argument for Number#toPrecision must be between 0 and 20, was NaN");if(2>c[0]||36<c[0])throw new RangeError("Error #1002: The precision argument for Number#toPrecision must be between 0 and 20, was ["+c[0]+"]");if(0!=c[0]%1)throw new RangeError("Error #1002: The precision argument for Number#toPrecision must be an integer between 0 and 20, was ["+
c[0]+"]");}if(b==d.Function.prototype.apply&&1<c.length&&!(c[1]instanceof Array))throw new TypeError("Error #1116: second argument to Function.prototype.apply must be an array");if(b==d.Math)throw new TypeError("Error #1075: Math is not a function");},call:function(a){var a=this.vm.getArgsFromStack(a),b=this.vm.stack.pop(),c=this.vm.stack.pop();if("function"!=typeof c)throw new TypeError("Error #1006: cannot call a non-function");this._call(b,c,a)},construct:function(a){var a=this.vm.getArgsFromStack(a),
b=this.vm.stack.pop();if(null===b)throw new TypeError("Error #1007: Constructor instantiation attempted on null");if(void 0===b)throw new TypeError("Error #1007: Constructor instantiation attempted on undefined");if("object"!=typeof b&&"function"!=typeof b)throw new TypeError("Error #1041: Constructor instantiation attempted on a primitive");if(!(b instanceof Function))throw new TypeError("Error #1007: Constructor instantiation attempted on a non-constructor");this.vm.stack.push(this.vm.construct(b,
a))},callmethod:function(a,b){var c=this.vm.getArgsFromStack(b),d=this.vm.getMultinameByIndex(a),e=this.vm.stack.pop();p.assertProperObject(e,d);var f=e.__getUnbound__(d);p.assertProperMethod(f,d);this.vm.stack.push(this.vm.wrap(f).apply(e,c))},callstatic:function(a,b){var c=this.vm.getArgsFromStack(b),d=this.vm.stack.pop();if(null===d)throw new TypeError("Error #1009: Cannot call static null");if(void 0===d)throw new TypeError("Error #1010: Cannot call static undefined");var e=this.abcFile.methods[a].toFunction(this.vm.scope);
p.assertProperMethod(e,sa);this.vm.stack.push(this.vm.wrap(e).apply(d,c))},callsuper:function(a,b){var c=this.vm,d=c.getArgsFromStack(b),e=c.getMultinameByIndex(a),f=c.stack.pop();if(null===f)throw new TypeError("Error #1009: Cannot call super null");if(void 0===f)throw new TypeError("Error #1010: Cannot call super undefined");e=c.super.prototype.__getUnbound__(e);if(null===e)throw new ReferenceError("Error #1070: Cannot call missing super method");if(void 0===e)throw new ReferenceError("Error #1070: Cannot call missing super method");
c.stack.push(e.apply(f,d))},callproperty:function(a,b){var c=this.vm.getArgsFromStack(b),d=this.vm.getMultinameByIndex(a),e=this.vm.stack.pop();p.assertProperObject(e,d);var f=e.__getUnbound__(d);p.assertProperMethod(f,d);this._call(e,f,c)},returnvoid:function(){this.vm.returnValue=void 0},returnvalue:function(){this.vm.returnValue=this.vm.stack.pop()},constructsuper:function(a){var b=this.vm,a=b.getArgsFromStack(a),c=b.stack.pop();if(null===c)throw new TypeError("Error #1009: Cannot constructsuper on null");
if(void 0===c)throw new TypeError("Error #1010: Cannot constructsuper on undefined");var d=b.super;b.validateConstruct(d,a);d.apply(c,a)},constructprop:function(a,b){var c=this.vm.getArgsFromStack(b),d=this.vm.getMultinameByIndex(a),e=this.vm.stack.pop();if(null===e)throw new TypeError("Error #1009: Null object can not have constructor properties");if(void 0===e)throw new TypeError("Error #1010: Undefined object can not have constructor properties");d=e.__get__(d);if(d==this.vm.toplevel.global.Array&&
1==c.length&&"number"==typeof c[0]){e=c[0];if(e%1)throw new RangeError("Error #1005: new Array does not accept a single fraction number for initialization");if(0>e)throw new RangeError("Error #1005: new Array does not accept a single negative number for initialization");if(isNaN(e))throw new RangeError("Error #1005: new Array does not accept a NaN for initialization");}this.vm.stack.push(this.vm.construct(d,c))},callproplex:function(a,b){var c=this.vm.getArgsFromStack(b),d=this.vm.getMultinameByIndex(a),
e=this.vm.stack.pop();p.assertProperObject(e,d);e=e.__getUnbound__(d);p.assertProperMethod(e,d);this.vm.stack.push(e.apply(null,c))},callsupervoid:function(a,b){var c=this.vm,d=c.getArgsFromStack(b),e=c.getMultinameByIndex(a),f=c.stack.pop();if(null===f)throw new TypeError("Error #1009: Cannot call supervoid null");if(void 0===f)throw new TypeError("Error #1010: Cannot call supervoid undefined");c=c.super.prototype.__getUnbound__(e);if(null===c)throw new ReferenceError("Error #1070: Cannot call missing super method");
if(void 0===c)throw new ReferenceError("Error #1070: Cannot call missing super method");c.apply(f,d)},callpropvoid:function(a,b){var c=this.vm.getArgsFromStack(b),d=this.vm.getMultinameByIndex(a),e=this.vm.stack.pop();p.assertProperObject(e,d);var f=e.__getUnbound__(d);p.assertProperMethod(f,d);f.apply(e,c)},sxi1:function(){throw Error("Not implemented");},sxi8:function(){throw Error("Not implemented");},sxi16:function(){throw Error("Not implemented");},applytype:function(a){if(0>=a)throw Error("VerifyError: Vectors require at least one type argument");
if(1<a)throw new TypeError("Error #1128: Incorrect number of type parameters");a=this.vm.stack.pop();if(void 0===a)throw new TypeError("Error #1010: Unable to create Vector of undefined");if(null!==a&&!a.__isClass__)throw Error("VerifyError: Expecting a class...");if(this.vm.stack.pop()!==this.toplevel.global.Vector)throw new TypeError("Error #1010: Unable to create non-Vector<T> types");this.vm.stack.push(this.vm.toplevel.getType(new mc(k.fromStrings("__AS3__.vec","Vector"),k.fromSymbolClass(a?a.__qualifiedName__:
"Object"))))},newobject:function(a){for(var b={};a--;){var c=this.vm.stack.pop(),d=this.vm.stack.pop();b[d]=c}this.vm.stack.push(b)},newarray:function(a){this.vm.stack.push(this.vm.stack.splice(-a,a))},newactivation:function(){this.vm.stack.push(this.vm.abcFile.createObjectFromTraits(this.vm.body.traits))},newclass:function(a){var b=this.vm,c=b.abcFile,d=b.toplevel,e=b.stack.pop(),f=this.abcFile.instances[a],a=this.abcFile.classes[a],g;if(f.isInterface)g=oc(d,c,b,f.name);else{g=f.initializer.toFunction(b.scope,
e);g.__capturedScope__.push(g);g.__super__=e.prototype;var i=g.prototype=Object.create(e.prototype);c.createObjectFromTraits(a.traits,g,b.scope);c.createObjectFromTraits(f.traits,i,b.scope,g,{skipSlots:!0,superClass:e});nc(d,c,b,f.interfaces,g.prototype);f.initializer.currentMethod.instance=f;a.initializer.toFunction(b.scope).apply(g);Object.defineProperties(i,{constructor:{value:g},__slotDescriptors__:{value:nb(i,c)}})}Object.defineProperties(g,{__isClass__:{value:!0},__isVmClass__:{value:!0},__name__:{value:f.name.name},
__qualifiedName__:{value:f.name.toString()},displayName:{value:f.name.name}});b.stack.push(g)},getdescendants:function(a){var b=this.vm.toplevel.getType(k.fromStrings("","XML")),c=this.vm.toplevel.getType(k.fromStrings("","XMLList")),a=this.vm.getMultinameByIndex(a),d=this.vm.stack.pop();if(!(d instanceof b)||!(d instanceof c))throw new TypeError("Error #1016: Object is not of type XML or XMLList");this.vm.stack.push(d.descendants(a.name))},newcatch:function(a){this.vm.stack.push(this.vm.getExceptionHandlerByIndex(a).createCatchScope())},
findpropstrict:function(a){this.vm.stack.push(this.vm.scope.strictFind(this.vm.getMultinameByIndex(a)))},findproperty:function(a){this.vm.stack.push(this.vm.scope.find(this.vm.getMultinameByIndex(a),!0))},finddef:function(){throw Error("Not implemented");},getlex:function(a){this.vm.op.findpropstrict(a);this.vm.op.getproperty(a)},setproperty:function(a){var b=this.vm,c=b.stack.pop(),a=b.getMultinameByIndex(a),b=b.stack.pop();if(null===b)throw new TypeError("Error #1009: Unable to set property on null");
if(void 0===b)throw new TypeError("Error #1010: Unable to set property on undefined");b.__set__(a,c)},getlocal:function(a){this.vm.stack.push(this.vm.localRegisters[a])},setlocal:function(a){this.vm.localRegisters[a]=this.vm.stack.pop()},getglobalscope:function(){this.vm.stack.push(this.toplevel.global)},getscopeobject:function(a){this.vm.stack.push(this.vm.scope.get(a))},getproperty:function(a){var b=this.vm,a=b.getMultinameByIndex(a),c=b.stack.pop();if(null===c)throw new TypeError("Error #1009: Unable to get property from null");
if(void 0===c)throw new TypeError("Error #1010: Unable to get property from undefined");a=c.__get__(a);b.stack.push(a)},getouterscope:function(){throw Error("Not implemented");},initproperty:function(a){var b=this.vm.stack.pop(),a=this.vm.getMultinameByIndex(a),c=this.vm.stack.pop();if(null===c)throw new TypeError("Error #1009: Unable to init null");if(void 0===c)throw new TypeError("Error #1010: Unable to init undefined");c.__set__(a,b)},deleteproperty:function(a){var a=this.vm.getMultinameByIndex(a),
b=this.vm.stack.pop();if(null===b)throw new ReferenceError("Error #1009: Cannot delete from null object");if(void 0===b)throw new ReferenceError("Error #1010: Cannot delete from undefined object");this.vm.stack.push(b.__deleteProperty__(a))},getslot:function(a){var b=this.vm.stack.pop();if(null===b)throw new TypeError("Error #1009: Unable to get slot on null");if(void 0===b)throw new TypeError("Error #1010: Unable to get slot on undefined");this.vm.stack.push(b.__get__(b.__slots__[a].name))},setslot:function(a){var b=
this.vm.stack.pop(),c=this.vm.stack.pop();if(null===c)throw new TypeError("Error #1009: Unable to set slot on null");if(void 0===c)throw new TypeError("Error #1010: Unable to set slot on undefined");c.__set__(c.__slots__[a].name,b)},getglobalslot:function(){throw Error("Not implemented");},setglobalslot:function(){throw Error("Not implemented");},convert_s:function(){var a=this.vm.stack.pop();null!=a&&(a=""+a);this.vm.stack.push(a)},esc_xelem:function(){this.vm.stack.push(this.vm.stack.pop().toXmlString())},
esc_xattr:function(){throw Error("Not implemented");},convert_i:function(){this.vm.stack.push(n(this.vm.stack.pop()))},convert_u:function(){this.vm.stack.push(mb(this.vm.stack.pop()))},convert_d:function(){this.vm.stack.push(+this.vm.stack.pop())},convert_b:function(){var a=this.vm.stack.pop();this.vm.stack.push(Boolean(a))},convert_o:function(){var a=this.vm.stack.pop();if(null===a)throw new TypeError("Error #1009: Unable to convert null to an object");if(void 0===a)throw new TypeError("Error #1010: Unable to convert undefined to an object");
var b=typeof a;if("object"!=b&&"function"!=b)throw new TypeError("Error #1034: Convert_o only passes objects, this wasnt one");this.vm.stack.push(a)},checkfilter:function(){var a=this.vm.toplevel.getType(k.fromStrings("","XML")),b=this.vm.toplevel.getType(k.fromStrings("","XMLList")),c=this.vm.stack.pop();if(!(c instanceof a)&&!(c instanceof b))throw new TypeError("Error #1123: Object is not of type XML or XMLList");this.vm.stack.push(c)},coerce:function(a){var b=this.vm,a=b.getMultinameByIndex(a),
c=b.stack.pop(),a=pa.coerceToName(b.toplevel,a,c);b.stack.push(a)},coerce_b:function(){throw Error("Not implemented");},coerce_a:function(){},coerce_i:function(){throw Error("Not implemented");},coerce_d:function(){throw Error("Not implemented");},coerce_s:function(){var a=this.vm.stack.pop();null==a?this.vm.stack.push(null):this.vm.stack.push(""+a)},astype:function(){throw Error("Not implemented");},astypelate:function(){var a=this.vm,b=a.stack.pop(),c=a.stack.pop();if(!b||!b.__isClass__)throw new TypeError("Error #1040: Expecting a class in as check");
null!==c&&void 0!==c&&Da(a.toplevel.global,b,c)?a.stack.push(c):a.stack.push(null)},coerce_u:function(){throw Error("Not implemented");},coerce_o:function(){var a=this.vm.stack[this.vm.stack.length-1];if(null===a)throw new TypeError("Error #1009: Unable to coerce null to an object");if(void 0===a)throw new TypeError("Error #1010: Unable to coerce undefined to an object");},negate:function(){this.vm.stack.push(-oa(this.vm.stack.pop()))},increment:function(){this.vm.stack.push(oa(this.vm.stack.pop())+
1)},inclocal:function(){throw Error("Not implemented");},decrement:function(){this.vm.stack.push(oa(this.vm.stack.pop())-1)},declocal:function(){throw Error("Not implemented");},"typeof":function(){var a=this.vm.toplevel.getType(k.fromStrings("","int")),b=this.vm.toplevel.getType(k.fromStrings("","uint")),c=this.vm.toplevel.getType(k.fromStrings("","XML")),d=this.vm.toplevel.getType(k.fromStrings("","XMLList")),e=this.vm.stack,f=e.pop();void 0===f?e.push("undefined"):null===f?e.push("object"):"boolean"==
typeof f||f instanceof Boolean?e.push("boolean"):"number"==typeof f||f instanceof Number?e.push("number"):f instanceof a?e.push("number"):f instanceof b?e.push("number"):"string"==typeof f||f instanceof String?e.push("string"):"function"==typeof f?e.push("function"):f instanceof c||f instanceof d?e.push("xml"):e.push("object")},not:function(){this.vm.stack.push(!this.vm.stack.pop())},bitnot:function(){this.vm.stack.push(~this.vm.stack.pop())},lookupswitch:function(a,b,c){var d=this.vm.stack.pop();
this.vm.nextLabel=isNaN(d)||0>d||d>a?b:arguments[d+2]},add:function(){var a=this.vm.stack,b=a.pop();a.push(a.pop()+b)},subtract:function(){var a=this.vm.stack,b=a.pop();a.push(a.pop()-b)},multiply:function(){var a=this.vm.stack;a.push(a.pop()*a.pop())},divide:function(){var a=this.vm.stack,b=a.pop();a.push(a.pop()/b)},modulo:function(){var a=this.vm.stack,b=a.pop();a.push(a.pop()%b)},lshift:function(){var a=this.vm.stack,b=a.pop();a.push(a.pop()<<b)},rshift:function(){var a=this.vm.stack,b=a.pop();
a.push(a.pop()>>b)},urshift:function(){var a=this.vm.stack,b=a.pop();a.push(a.pop()>>>b)},bitand:function(){var a=this.vm.stack,b=a.pop();a.push(a.pop()&b)},bitor:function(){var a=this.vm.stack,b=a.pop();a.push(a.pop()|b)},bitxor:function(){var a=this.vm.stack,b=a.pop();a.push(a.pop()^b)},equals:function(){var a=this.vm.stack;a.push(a.pop()==a.pop())},strictequals:function(){var a=this.vm.stack,b=a.pop(),c=a.pop();c===b?a.push(!0):a.push(("number"===typeof c||c instanceof Number)&&("number"===typeof b||
b instanceof Number)||("boolean"===typeof c||c instanceof Boolean)&&("boolean"===typeof b||b instanceof Boolean)||("string"===typeof c||c instanceof String)&&("string"===typeof b||b instanceof String)?c==b||c.valueOf()==b:!1)},lessthan:function(){var a=this.vm.stack,b=a.pop();a.push(a.pop()<b)},lessequals:function(){var a=this.vm.stack,b=a.pop();a.push(a.pop()<=b)},greaterthan:function(){var a=this.vm.stack,b=a.pop();a.push(a.pop()>b)},greaterequals:function(){var a=this.vm.stack,b=a.pop();a.push(a.pop()>=
b)},"instanceof":function(){var a=this.vm.stack.pop(),b=this.vm.stack.pop();if(!a||"object"!=typeof a&&"function"!=typeof a)throw new TypeError("Error #1040: Expecting an object in instanceof check, but got "+a);a===this.vm.toplevel.global.Class&&b.__isClass__?this.vm.stack.push(!0):this.vm.stack.push(b instanceof a)},istype:function(){throw Error("Not implemented");},istypelate:function(){var a=this.vm,b=a.stack.pop(),c=a.stack.pop();if("string"===b||"number"===b||"boolean"===b)throw new TypeError('Error #1009: Invalid type on rhs, does not have required properties (comparing to string/number/boolean primitive "type"?)');
if("function"!=typeof b)throw new TypeError("Error #1041: Expecting a class in istypelate check, but got "+c);a.stack.push(Da(a.toplevel.global,b,c))},"in":function(){var a=this.vm.stack.pop(),b=this.vm.stack.pop(),c=lc.exports.tools.expando;a[c]&&a[c].has?this.vm.stack.push(a.__has__(k.fromStrings("",b))):this.vm.stack.push(b in Object(a))},increment_i:function(){this.vm.stack.push(n(this.vm.stack.pop())+1)},decrement_i:function(){this.vm.stack.push(n(this.vm.stack.pop())-1)},inclocal_i:function(a){var b=
this.vm.localRegisters;b[a]=(b[a]|0)+1},declocal_i:function(a){var b=this.vm.localRegisters;b[a]=(b[a]|0)-1},negate_i:function(){throw Error("Not implemented");},add_i:function(){var a=this.vm.stack;a.push(n(n(a.pop())+n(a.pop())))},subtract_i:function(){var a=this.vm.stack,b=a.pop();a.push(n(a.pop())-(b|0))},multiply_i:function(){var a=this.vm.stack;a.push(n(n(a.pop())*n(a.pop())))},getlocal0:function(){this.vm.stack.push(this.vm.localRegisters[0])},getlocal1:function(){this.vm.stack.push(this.vm.localRegisters[1])},
getlocal2:function(){this.vm.stack.push(this.vm.localRegisters[2])},getlocal3:function(){this.vm.stack.push(this.vm.localRegisters[3])},setlocal0:function(){this.vm.localRegisters[0]=this.vm.stack.pop()},setlocal1:function(){this.vm.localRegisters[1]=this.vm.stack.pop()},setlocal2:function(){this.vm.localRegisters[2]=this.vm.stack.pop()},setlocal3:function(){this.vm.localRegisters[3]=this.vm.stack.pop()},debug:Y,debugline:Y,debugfile:Y,bkptline:function(){throw Error("Not implemented");},timestamp:function(){throw Error("Not implemented");
}};var p={assertProperObject:function(a,b){if(null===a)throw new TypeError("Error #1009: Cannot call method '"+b+"' of null");if("undefined"===typeof a)throw new TypeError("Error #1010: Cannot call method '"+b+"' of undefined");},assertProperMethod:function(a,b){if(null===a)throw new TypeError("Error #1006: Cannot call null property '"+b+"'");if("undefined"===typeof a)throw new TypeError("Error #1006: Cannot call undefined property '"+b+"'");if(!1===a)throw new TypeError("(AS3) Cannot call false property '"+
b+"'");}};L.module$exports=Pa;L.module$exports&&(L=L.module$exports);var M={},pc=o.lastMatch;Ea.prototype={push:function(a){this.scopes.push(a);this.localOffset++},toScope:function(){return A.fromCapturedScope(this)}};A.fromCapturedScope=function(a){var b=new A(a.global);b.scopes=a.scopes.slice(0);b.localOffset=a.scopes.length;return b};A.prototype={global:null,localOffset:null,scopes:null,capture:function(){return new Ea(this)},clear:function(){this.localOffset=0;this.scopes=[]},find:function(a){(a=
this._find(a))||(a=this.global);return a},_find:function(a){var b=pc(this.scopes,function(b){return b.__has__(a)});return!b&&this.global.__has__(a)?this.global:b},get:function(a){var b=this.localOffset+a;if(!(b in this.scopes))throw Error("Cannot get scope object at index "+a);return this.scopes[b]},pop:function(){if(this.scopes.length===this.localOffset)throw Error("Cannot pop empty scope stack");return this.scopes.pop()},push:function(a){this.scopes.push(a)},strictFind:function(a){var b=this._find(a);
if(!b)throw new ReferenceError("Error #1065: Variable/property not defined: "+a);return b}};M.module$exports=A;M.module$exports&&(M=M.module$exports);var N={},sb=K,tb=l;Fa.prototype={getPreConstructorHook:function(a){a=Z(a);return this.hooks.__get__(a)},getType:function(a){a=Z(a);if(!this.global.__has__(a))throw new TypeError("Cannot find type "+a);return this.global.__get__(a)},hasPreConstructorHook:function(a){a=Z(a);return this.hooks.__has__(a)},runAbc:function(a){return this.abcs[a].run()},setPreConstructorHook:function(a,
b){a=Z(a);this.hooks.__set__(a,b)}};N.module$exports=Fa;N.module$exports&&(N=N.module$exports);var q={},Qa=Ga(),ta=Ga();ta.prototype.isSlot=!0;$.create=function(a,b,c,d){return new $(b,d.slot_id,a.classes[d.classi])};aa.create=function(a,b,c,d){return new aa(b,d.slot_id,a.methods[d["function"]])};B.create=function(a,b,c,d){return new B(b,d.disp_id,a.methods[d.method],{isFinal:!!(c&1),isOverride:!!(c&2)})};B.prototype={isMethod:!0,toInterfaceDescriptor:function(a){return{get:function(){return this[a]}}}};
C.create=function(a,b,c,d){return new C(b,d.disp_id,a.methods[d.method],{isFinal:!!(c&1),isOverride:!!(c&2)})};C.prototype={isGetter:!0,toInterfaceDescriptor:function(a){return{configurable:!0,get:function(){var b=Object.getOwnPropertyDescriptor(this.constructor.prototype,a).get;return b()}}}};D.create=function(a,b,c,d){return new D(b,d.disp_id,a.methods[d.method],{isFinal:!!(c&1),isOverride:!!(c&2)})};D.prototype={isSetter:!0,toInterfaceDescriptor:function(a){return{configurable:!0,set:function(b){var c=
Object.getOwnPropertyDescriptor(this.constructor.prototype,a).set;c(b)}}}};var qc={"0":ta,1:B,2:C,3:D,4:$,5:aa,6:Qa};q.module$exports={ConstTrait:Qa,ClassTrait:$,FunctionTrait:aa,GetterTrait:C,MethodTrait:B,SetterTrait:D,SlotTrait:ta,create:function(a,b){return qc[b.kind&15].create(a,a.multinames[b.name],b.kind>>>4,b.data)}};q.module$exports&&(q=q.module$exports);var O={},vb=q,Ra={create:function(a,b){var c=a.methods[b.cinit],d=ub(a,b.trait);return new rc(c,d)}},rc=Ra.Class=function(a,b){this.initializer=
a;this.traits=b};O.module$exports=Ra;O.module$exports&&(O=O.module$exports);var P={},sc=l,tc=q,Sa={create:function(a,b){return new s(a,b.from,b.to,b.target,0===b.exc_type?s.ANY_TYPENAME:a.multinames[b.exc_type],a.multinames[b.var_name])}},s=Sa.Exception=function(a,b,c,d,e,f){this.abcFile=a;this.from=b;this.to=c;this.target=d;this.typeName=e;this.varName=f};s.ANY_TYPENAME=sc.QName.fromStrings("","Object");s.prototype.createCatchScope=function(){return!this.varName?{}:this.abcFile.createObjectFromTraits([new tc.SlotTrait(this.varName,
1,this.typeName)])};s.prototype.handles=function(a,b){if(this.handlesAny())return!0;var c=a.__get__(this.typeName);return c instanceof Function&&b instanceof c};s.prototype.handlesAny=function(){return this.typeName===s.ANY_TYPENAME};s.prototype.isRelatedTo=function(a){return this.from===a.from&&this.to===a.to};P.module$exports=Sa;P.module$exports&&(P=P.module$exports);var Q={},yb=q,Ta={create:function(a,b){var c=a.multinames[b.name],d;d=0!==b.super_name?a.multinames[b.super_name]:void 0;var e={isSealed:!!(b.flags&
1),isFinal:!!(b.flags&2),isInterface:!!(b.flags&4),hasProtectedNamespace:!!(b.flags&8)},f;f=e.hasProtectedNamespace?a.namespaces[b.protectedNs]:void 0;var g=wb(a,b),i=a.methods[b.iinit],h=xb(a,b.trait);return new uc(c,d,e,f,g,i,h)}},uc=Ta.Instance=function(a,b,c,d,e,f,g){this.name=a;this.superName=b;this.isSealed=c.isSealed;this.isFinal=c.isFinal;this.isInterface=c.isInterface;this.protectedNamespace=d;this.interfaces=e;this.initializer=f;this.traits=g};Q.module$exports=Ta;Q.module$exports&&(Q=Q.module$exports);
var R={},Ab=P,Cb=q,Ua={create:function(a,b){var c=a.methodSignatures[b.method],d=b.max_stack,e=b.local_count,f=b.init_scope_depth,g=b.max_scope_depth,i=b.code,h=zb(a,b.exception),j=Bb(a,b.trait);return new vc(c,d,e,f,g,i,h,j)}},vc=Ua.MethodBody=function(a,b,c,d,e,f,g,i){this.signature=a;this.maxStack=b;this.localCount=c;this.initScopeDepth=d;this.maxScopeDepth=e;this.code=f;this.exceptions=g;this.traits=i};R.module$exports=Ua;R.module$exports&&(R=R.module$exports);var S={},wc=L,xc=l,qa=ca,yc=Array.prototype.slice,
Ja=y.coerceToName,zc=o.lastMatch;Ia.prototype={toFunction:function(a,b){var c=a.capture(),d=this,e=function(){var a=Object.create(d);a.localRegisters=Db(this,yc.call(arguments),a.getSignature(),a.toplevel);a.iterationCache=null;a.nextLabel="start";a.op=new wc(a);a.registeredExceptions=[];a.scope=c.toScope();a.stack=[];a.super=b;(function i(){try{a.currentMethod(a)}catch(b){a.tryHandlingException(b,i)}})();return a.coerceReturnValue(a.returnValue)};e.__capturedScope__=c;e.__method__=this.currentMethod;
return e},coerceReturnValue:function(a){var b=this.getReturnTypeName();return Ja(this.toplevel,b,a)},construct:function(a,b){this.validateConstruct(a,b);return this._construct(a,b)},_construct:function(a,b){var b=b||[],c=b.length,d,e,f=a.prototype||Object.prototype,g=f.__slotDescriptors__||void 0,i=a.__qualifiedName__;i&&(e=this.toplevel.hasPreConstructorHook(i)&&this.toplevel.getPreConstructorHook(i));if(g||e||7<c)d=Object.create(f,g),e?e(d):d.__preConstruct__&&d.__preConstruct__(),c=Function.apply.call(a,
d,b),Object(c)===c&&(d=c);else switch(c){case 0:d=new a;break;case 1:d=new a(b[0]);break;case 2:d=new a(b[0],b[1]);break;case 3:d=new a(b[0],b[1],b[2]);break;case 4:d=new a(b[0],b[1],b[2],b[3]);break;case 5:d=new a(b[0],b[1],b[2],b[3],b[4]);break;case 6:d=new a(b[0],b[1],b[2],b[3],b[4],b[5]);break;case 7:d=new a(b[0],b[1],b[2],b[3],b[4],b[5],b[6])}return d},validateConstruct:function(a,b){if(!a||!(a instanceof Function)){if(a&&a.__isClass__)throw Error("Oh dear, we need to handle the non-function __isClass__ cases explicitly, `new` wont work");
throw new TypeError("Error 1041: (vm.validateConstruct) Expected function to be a constructor");}if(a.__isMethodClosure__)throw new TypeError("Error #1064: Cannot call method closure as constructor");if(a==this.toplevel.global.Array&&1==b.length&&"number"==typeof b[0]){if(0>b[0]||0!=b[0]%1)throw new RangeError("Error #1005: Given initial array length is not a positive integer");if(isNaN(b[0]))throw new RangeError("Error #1005: Given initial array length index is NaN");}if(a==this.toplevel.global.Math)throw new TypeError("Error #1076: Math is not a constructor");
if(a==this.toplevel.global.Function&&b.length)throw new EvalError("Error #1066: The form function('function body') is not supported");},deregisterException:function(a){a=this.registeredExceptions.indexOf(this.currentMethod.methodBody.exceptions[a]);-1!==a&&this.registeredExceptions.splice(a,1)},findExceptionHandler:function(a){var b=this.toplevel.global,c=zc(this.registeredExceptions,function(c){return c.handles(b,a)});c&&this.removeRelatedExceptionHandlers(c);return c},getArgsFromStack:function(a){var b=
this.stack.splice(-a,a);if(b.length!==a)throw new (this.toplevel.getType(xc.QName.fromStrings("","ArgumentError")))("Error #2001: Insufficient arguments on stack");return b},getMethodTraits:function(){return this.body.traits},getMultinameByIndex:function(a){return this.abcFile.multinames[a].resolve(this.stack)},getSignature:function(){return this.signature},getReturnTypeName:function(){return this.signature.returnType},getExceptionHandlerByIndex:function(a){return this.currentMethod.methodBody.exceptions[a]},
"goto":function(){if(1E5<++this.loopProtection)throw Error("Runaway loop protection (vm.js:goto)");return this.nextLabel},handleException:function(a,b,c){this.nextLabel=b.targetLabel;this.scope.clear();this.stack=[a];c()},removeRelatedExceptionHandlers:function(a){this.registeredExceptions=this.registeredExceptions.filter(function(b){return!a.isRelatedTo(b)})},registerException:function(a,b){var c=this.currentMethod.methodBody.exceptions[a];c.targetLabel=b;this.registeredExceptions.push(c)},tryHandlingException:function(a,
b){var c=this.findExceptionHandler(a);if(c)this.handleException(a,c,b);else throw a;}};S.module$exports=Ia;S.module$exports&&(S=S.module$exports);var T={},Eb=M,Gb=q;ba.create=function(a,b){var c=a.methods[b.init],d=Fb(a,b.trait);return new ba(a,c,d)};ba.prototype={run:function(){if(!this.executed)return this.executed=!0,this.global=this.abcFile.createObjectFromTraits(this.traits,this.abcFile.toplevel.global,this.scope),this.method.toFunction(this.scope).call(this.global)}};T.module$exports=ba;T.module$exports&&
(T=T.module$exports);var U={},Xb=S,Yb=O,Zb=Q,Wb=R,Vb=F,Ub=l,Sb=z,Tb=G,$b=T,da=o.firstMatch;x.constantKindGetters={1:function(a){return this.strings[a]},3:function(a){return this.integers[a]},4:function(a){return this.uintegers[a]},6:function(a){return this.doubles[a]},10:function(){return!1},11:function(){return!0},12:function(){return null},"0":function(){},8:t,22:t,23:t,24:t,25:t,26:t,5:t};x.prototype={coerceTraitValue:function(a){if(!a.typeName)return a.value;switch(a.typeName.name){case "Object":case "String":if(!a.value)return null;
case "Boolean":case "Number":case "int":case "uint":return(0,this.toplevel.global[a.typeName.name])(a.value);case "Function":return null;default:return null}},createObjectFromTraits:function(a,b,c,d,e){var b=b||{},f=b.__traits__;Object.defineProperties(b,{__traits__:{configurable:!0,value:f?f.concat(a):a,writable:!0},__slots__:{configurable:!0,value:b.hasOwnProperty("__slots__")?b.__slots__:[]}});var g,i=!1;e&&(i=!!e.skipSlots,g=e.superClass);a.forEach(function(a){var e=this.coerceTraitValue(a),f=
0;"slotId"in a&&(b.__slots__[a.slotId||++f]=a);var h=a.name;if("dispatchId"in a){e=e.toFunction(c,g);d&&e.__capturedScope__.push(d);Object.defineProperty(e,"__isMethod__",{enumerable:!1,value:!0,writable:!1});var j={configurable:!0},f=a.isGetter?"get":a.isSetter?"set":"value";j[f]=e;"value"===f&&(j.writable=!0);var k={};k[h.toProperty()]=j;a.isOverride&&(Object.getPrototypeOf(b).__traits__||[]).forEach(function(a){h.match(a.name)&&(k[a.name.toProperty()]=j)});Object.defineProperties(b,k)}else(!i||
!a.isSlot)&&Object.defineProperty(b,h.toProperty(),{value:e,writable:!0})},this);return b},getConstant:function(a,b){if(!(a in x.constantKindGetters))throw Error("Cannot get unknown constant kind from abcFile: "+a);return x.constantKindGetters[a].call(this,b)},getMethodBodyBySignature:function(a){return da(this.methodBodies,function(b){return b.signature===a})},hasType:function(a){var b=da(this.scripts,function(b){return b.traits.some(function(b){return b.name.name===a.name})});return b&&!b.executed?
(b.run(),!0):!1},run:function(){this.scripts.slice(-1)[0].run()}};x.getMethodNameByIndex=function(a,b){for(var c,d=a.methods[b],e=0;e<a.classes.length;++e){var f=a.classes[e],g=a.instances[e],h=g.name.name+"_";if(f.initializer===d)c=h+"$StaticInitializer$";else if(g.initializer===d)c=h+"$Constructor$";else{var j=function(a){return a.method===d},k="";(g=da(g.traits,j))||(g=da(f.traits,j),k="_$StaticMethod$");g&&(c=h+g.name.name+k)}if(c)break}return c};U.module$exports=x;U.module$exports&&(U=U.module$exports);
var ea={},Va=r,Wa={AbcFile:U,TopLevel:N,multiname:l};"undefined"!==typeof Va.exports&&(Va.exports.as3vm=Wa);ea.module$exports=Wa;ea.module$exports&&(ea=ea.module$exports)})();