starling-framework
Version:
A fast, productive library for 2D cross-platform development.
1,614 lines (1,425 loc) • 1.31 MB
JavaScript
/*!
* Starling Framework v2.7.1
* https://gamua.com/starling/
*
* Copyright Gamua
* Released under the Simplified BSD license
*/
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory(require("openfl/errors/ArgumentError"), require("openfl/Vector"), require("openfl/geom/Matrix"), require("openfl/errors/Error"), require("openfl/geom/Point"), require("openfl/geom/Vector3D"), require("openfl/geom/Matrix3D"), require("openfl/Lib"), require("openfl/geom/Rectangle"), require("openfl/display/Shape"), require("openfl/text/TextField"), require("openfl/text/TextFormat"), require("openfl/system/Capabilities"), require("openfl/display/Stage"), require("openfl/events/MouseEvent"), require("openfl/events/TouchEvent"), require("openfl/display3D/Context3D"), require("openfl/text/Font"), require("openfl/errors/RangeError"), require("openfl/system/System"), require("openfl/display/Bitmap"), require("openfl/display/BitmapData"), require("openfl/utils/ByteArray"), require("openfl/display3D/textures/Texture"), require("openfl/events/Event"), require("openfl/display3D/textures/RectangleTexture"), require("openfl/display3D/textures/VideoTexture"), require("openfl/utils/AGALMiniAssembler"), require("openfl/errors/IllegalOperationError"), require("openfl/errors/EOFError"), require("openfl/display/DisplayObjectContainer"), require("openfl/ui/Multitouch"), require("openfl/display/Sprite"), require("openfl/ui/Mouse"), require("openfl/net/URLRequest"), require("openfl/media/Sound"), require("openfl/net/URLLoader"), require("openfl/display/Loader"), require("openfl/system/LoaderContext"));
else if(typeof define === 'function' && define.amd)
define(["openfl/errors/ArgumentError", "openfl/Vector", "openfl/geom/Matrix", "openfl/errors/Error", "openfl/geom/Point", "openfl/geom/Vector3D", "openfl/geom/Matrix3D", "openfl/Lib", "openfl/geom/Rectangle", "openfl/display/Shape", "openfl/text/TextField", "openfl/text/TextFormat", "openfl/system/Capabilities", "openfl/display/Stage", "openfl/events/MouseEvent", "openfl/events/TouchEvent", "openfl/display3D/Context3D", "openfl/text/Font", "openfl/errors/RangeError", "openfl/system/System", "openfl/display/Bitmap", "openfl/display/BitmapData", "openfl/utils/ByteArray", "openfl/display3D/textures/Texture", "openfl/events/Event", "openfl/display3D/textures/RectangleTexture", "openfl/display3D/textures/VideoTexture", "openfl/utils/AGALMiniAssembler", "openfl/errors/IllegalOperationError", "openfl/errors/EOFError", "openfl/display/DisplayObjectContainer", "openfl/ui/Multitouch", "openfl/display/Sprite", "openfl/ui/Mouse", "openfl/net/URLRequest", "openfl/media/Sound", "openfl/net/URLLoader", "openfl/display/Loader", "openfl/system/LoaderContext"], factory);
else if(typeof exports === 'object')
exports["starling"] = factory(require("openfl/errors/ArgumentError"), require("openfl/Vector"), require("openfl/geom/Matrix"), require("openfl/errors/Error"), require("openfl/geom/Point"), require("openfl/geom/Vector3D"), require("openfl/geom/Matrix3D"), require("openfl/Lib"), require("openfl/geom/Rectangle"), require("openfl/display/Shape"), require("openfl/text/TextField"), require("openfl/text/TextFormat"), require("openfl/system/Capabilities"), require("openfl/display/Stage"), require("openfl/events/MouseEvent"), require("openfl/events/TouchEvent"), require("openfl/display3D/Context3D"), require("openfl/text/Font"), require("openfl/errors/RangeError"), require("openfl/system/System"), require("openfl/display/Bitmap"), require("openfl/display/BitmapData"), require("openfl/utils/ByteArray"), require("openfl/display3D/textures/Texture"), require("openfl/events/Event"), require("openfl/display3D/textures/RectangleTexture"), require("openfl/display3D/textures/VideoTexture"), require("openfl/utils/AGALMiniAssembler"), require("openfl/errors/IllegalOperationError"), require("openfl/errors/EOFError"), require("openfl/display/DisplayObjectContainer"), require("openfl/ui/Multitouch"), require("openfl/display/Sprite"), require("openfl/ui/Mouse"), require("openfl/net/URLRequest"), require("openfl/media/Sound"), require("openfl/net/URLLoader"), require("openfl/display/Loader"), require("openfl/system/LoaderContext"));
else
root["starling"] = factory(root["openfl"]["errors"]["ArgumentError"], root["openfl"]["Vector"], root["openfl"]["geom"]["Matrix"], root["openfl"]["errors"]["Error"], root["openfl"]["geom"]["Point"], root["openfl"]["geom"]["Vector3D"], root["openfl"]["geom"]["Matrix3D"], root["openfl"]["Lib"], root["openfl"]["geom"]["Rectangle"], root["openfl"]["display"]["Shape"], root["openfl"]["text"]["TextField"], root["openfl"]["text"]["TextFormat"], root["openfl"]["system"]["Capabilities"], root["openfl"]["display"]["Stage"], root["openfl"]["events"]["MouseEvent"], root["openfl"]["events"]["TouchEvent"], root["openfl"]["display3D"]["Context3D"], root["openfl"]["text"]["Font"], root["openfl"]["errors"]["RangeError"], root["openfl"]["system"]["System"], root["openfl"]["display"]["Bitmap"], root["openfl"]["display"]["BitmapData"], root["openfl"]["utils"]["ByteArray"], root["openfl"]["display3D"]["textures"]["Texture"], root["openfl"]["events"]["Event"], root["openfl"]["display3D"]["textures"]["RectangleTexture"], root["openfl"]["display3D"]["textures"]["VideoTexture"], root["openfl"]["utils"]["AGALMiniAssembler"], root["openfl"]["errors"]["IllegalOperationError"], root["openfl"]["errors"]["EOFError"], root["openfl"]["display"]["DisplayObjectContainer"], root["openfl"]["ui"]["Multitouch"], root["openfl"]["display"]["Sprite"], root["openfl"]["ui"]["Mouse"], root["openfl"]["net"]["URLRequest"], root["openfl"]["media"]["Sound"], root["openfl"]["net"]["URLLoader"], root["openfl"]["display"]["Loader"], root["openfl"]["system"]["LoaderContext"]);
})(self, (__WEBPACK_EXTERNAL_MODULE_openfl_errors_ArgumentError__, __WEBPACK_EXTERNAL_MODULE_openfl_Vector__, __WEBPACK_EXTERNAL_MODULE_openfl_geom_Matrix__, __WEBPACK_EXTERNAL_MODULE_openfl_errors_Error__, __WEBPACK_EXTERNAL_MODULE_openfl_geom_Point__, __WEBPACK_EXTERNAL_MODULE_openfl_geom_Vector3D__, __WEBPACK_EXTERNAL_MODULE_openfl_geom_Matrix3D__, __WEBPACK_EXTERNAL_MODULE_openfl_Lib__, __WEBPACK_EXTERNAL_MODULE_openfl_geom_Rectangle__, __WEBPACK_EXTERNAL_MODULE_openfl_display_Shape__, __WEBPACK_EXTERNAL_MODULE_openfl_text_TextField__, __WEBPACK_EXTERNAL_MODULE_openfl_text_TextFormat__, __WEBPACK_EXTERNAL_MODULE_openfl_system_Capabilities__, __WEBPACK_EXTERNAL_MODULE_openfl_display_Stage__, __WEBPACK_EXTERNAL_MODULE_openfl_events_MouseEvent__, __WEBPACK_EXTERNAL_MODULE_openfl_events_TouchEvent__, __WEBPACK_EXTERNAL_MODULE_openfl_display3D_Context3D__, __WEBPACK_EXTERNAL_MODULE_openfl_text_Font__, __WEBPACK_EXTERNAL_MODULE_openfl_errors_RangeError__, __WEBPACK_EXTERNAL_MODULE_openfl_system_System__, __WEBPACK_EXTERNAL_MODULE_openfl_display_Bitmap__, __WEBPACK_EXTERNAL_MODULE_openfl_display_BitmapData__, __WEBPACK_EXTERNAL_MODULE_openfl_utils_ByteArray__, __WEBPACK_EXTERNAL_MODULE_openfl_display3D_textures_Texture__, __WEBPACK_EXTERNAL_MODULE_openfl_events_Event__, __WEBPACK_EXTERNAL_MODULE_openfl_display3D_textures_RectangleTexture__, __WEBPACK_EXTERNAL_MODULE_openfl_display3D_textures_VideoTexture__, __WEBPACK_EXTERNAL_MODULE_openfl_utils_AGALMiniAssembler__, __WEBPACK_EXTERNAL_MODULE_openfl_errors_IllegalOperationError__, __WEBPACK_EXTERNAL_MODULE_openfl_errors_EOFError__, __WEBPACK_EXTERNAL_MODULE_openfl_display_DisplayObjectContainer__, __WEBPACK_EXTERNAL_MODULE_openfl_ui_Multitouch__, __WEBPACK_EXTERNAL_MODULE_openfl_display_Sprite__, __WEBPACK_EXTERNAL_MODULE_openfl_ui_Mouse__, __WEBPACK_EXTERNAL_MODULE_openfl_net_URLRequest__, __WEBPACK_EXTERNAL_MODULE_openfl_media_Sound__, __WEBPACK_EXTERNAL_MODULE_openfl_net_URLLoader__, __WEBPACK_EXTERNAL_MODULE_openfl_display_Loader__, __WEBPACK_EXTERNAL_MODULE_openfl_system_LoaderContext__) => {
return /******/ (() => { // webpackBootstrap
/******/ var __webpack_modules__ = ({
/***/ "./lib/_gen/EReg.js":
/*!**************************!*\
!*** ./lib/_gen/EReg.js ***!
\**************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
// Class: EReg
var $global = typeof window != "undefined" ? window : typeof __webpack_require__.g != "undefined" ? __webpack_require__.g : typeof self != "undefined" ? self : this
$global.Object.defineProperty(exports, "__esModule", {value: true});
var __map_reserved = {};
// Imports
var $hxClasses = (__webpack_require__(/*! ./hxClasses_stub */ "./lib/_gen/hxClasses_stub.js")["default"]);
var $hxEnums = (__webpack_require__(/*! ./hxEnums_stub */ "./lib/_gen/hxEnums_stub.js")["default"]);
var $import = (__webpack_require__(/*! ./import_stub */ "./lib/_gen/import_stub.js")["default"]);
function js__$Boot_HaxeError() {return __webpack_require__(/*! ./js/_Boot/HaxeError */ "./lib/_gen/js/_Boot/HaxeError.js");}
function HxOverrides() {return __webpack_require__(/*! ./HxOverrides */ "./lib/_gen/HxOverrides.js");}
function StringBuf() {return __webpack_require__(/*! ./StringBuf */ "./lib/_gen/StringBuf.js");}
// Constructor
var EReg = function(r,opt) {
this.r = new RegExp(r,opt.split("u").join(""));
}
// Meta
EReg.__name__ = "EReg";
EReg.__isInterface__ = false;
EReg.prototype = {
match: function(s) {
if(this.r.global) {
this.r.lastIndex = 0;
}
this.r.m = this.r.exec(s);
this.r.s = s;
return this.r.m != null;
},
matched: function(n) {
if(this.r.m != null && n >= 0 && n < this.r.m.length) {
return this.r.m[n];
} else {
throw new (js__$Boot_HaxeError().default)("EReg::matched");
}
},
matchedLeft: function() {
if(this.r.m == null) {
throw new (js__$Boot_HaxeError().default)("No string matched");
}
return (HxOverrides().default).substr(this.r.s,0,this.r.m.index);
},
matchedRight: function() {
if(this.r.m == null) {
throw new (js__$Boot_HaxeError().default)("No string matched");
}
var sz = this.r.m.index + this.r.m[0].length;
return (HxOverrides().default).substr(this.r.s,sz,this.r.s.length - sz);
},
matchedPos: function() {
if(this.r.m == null) {
throw new (js__$Boot_HaxeError().default)("No string matched");
}
return { pos : this.r.m.index, len : this.r.m[0].length};
},
matchSub: function(s,pos,len) {
if(len == null) {
len = -1;
}
if(this.r.global) {
this.r.lastIndex = pos;
this.r.m = this.r.exec(len < 0 ? s : (HxOverrides().default).substr(s,0,pos + len));
var b = this.r.m != null;
if(b) {
this.r.s = s;
}
return b;
} else {
var b1 = this.match(len < 0 ? (HxOverrides().default).substr(s,pos,null) : (HxOverrides().default).substr(s,pos,len));
if(b1) {
this.r.s = s;
this.r.m.index += pos;
}
return b1;
}
},
split: function(s) {
var d = "#__delim__#";
return this.replace(s,d).split(d);
},
replace: function(s,by) {
return s.replace(this.r,by);
},
map: function(s,f) {
var offset = 0;
var buf = new (StringBuf().default)();
while(true) {
if(offset >= s.length) {
break;
} else if(!this.matchSub(s,offset)) {
buf.add((HxOverrides().default).substr(s,offset,null));
break;
}
var p = this.matchedPos();
buf.add((HxOverrides().default).substr(s,offset,p.pos - offset));
buf.add(f(this));
if(p.len == 0) {
buf.add((HxOverrides().default).substr(s,p.pos,1));
offset = p.pos + 1;
} else {
offset = p.pos + p.len;
}
if(!this.r.global) {
break;
}
}
if(!this.r.global && offset > 0 && offset < s.length) {
buf.add((HxOverrides().default).substr(s,offset,null));
}
return buf.toString();
}
};
EReg.prototype.__class__ = EReg.prototype.constructor = $hxClasses["EReg"] = EReg;
// Init
// Statics
EReg.escape = function(s) {
return s.replace(EReg.escapeRe,"\\$&");
}
EReg.escapeRe = new RegExp("[.*+?^${}()|[\\]\\\\]","g")
// Export
exports["default"] = EReg;
/***/ }),
/***/ "./lib/_gen/HxOverrides.js":
/*!*********************************!*\
!*** ./lib/_gen/HxOverrides.js ***!
\*********************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
// Class: HxOverrides
var $global = typeof window != "undefined" ? window : typeof __webpack_require__.g != "undefined" ? __webpack_require__.g : typeof self != "undefined" ? self : this
$global.Object.defineProperty(exports, "__esModule", {value: true});
var __map_reserved = {};
// Imports
var $hxClasses = (__webpack_require__(/*! ./hxClasses_stub */ "./lib/_gen/hxClasses_stub.js")["default"]);
var $hxEnums = (__webpack_require__(/*! ./hxEnums_stub */ "./lib/_gen/hxEnums_stub.js")["default"]);
var $import = (__webpack_require__(/*! ./import_stub */ "./lib/_gen/import_stub.js")["default"]);
function js__$Boot_HaxeError() {return __webpack_require__(/*! ./js/_Boot/HaxeError */ "./lib/_gen/js/_Boot/HaxeError.js");}
function js_Lib() {return __webpack_require__(/*! ./js/Lib */ "./lib/_gen/js/Lib.js");}
// Constructor
var HxOverrides = function(){}
// Meta
HxOverrides.__name__ = "HxOverrides";
HxOverrides.__isInterface__ = false;
HxOverrides.prototype = {
};
HxOverrides.prototype.__class__ = HxOverrides.prototype.constructor = $hxClasses["HxOverrides"] = HxOverrides;
// Init
// Statics
HxOverrides.dateStr = function(date) {
var m = date.getMonth() + 1;
var d = date.getDate();
var h = date.getHours();
var mi = date.getMinutes();
var s = date.getSeconds();
return date.getFullYear() + "-" + (m < 10 ? "0" + m : "" + m) + "-" + (d < 10 ? "0" + d : "" + d) + " " + (h < 10 ? "0" + h : "" + h) + ":" + (mi < 10 ? "0" + mi : "" + mi) + ":" + (s < 10 ? "0" + s : "" + s);
}
HxOverrides.strDate = function(s) {
switch(s.length) {
case 8:
var k = s.split(":");
var d = new Date();
d["setTime"](0);
d["setUTCHours"](k[0]);
d["setUTCMinutes"](k[1]);
d["setUTCSeconds"](k[2]);
return d;
case 10:
var k1 = s.split("-");
return new Date(k1[0],k1[1] - 1,k1[2],0,0,0);
case 19:
var k2 = s.split(" ");
var y = k2[0].split("-");
var t = k2[1].split(":");
return new Date(y[0],y[1] - 1,y[2],t[0],t[1],t[2]);
default:
throw new (js__$Boot_HaxeError().default)("Invalid date format : " + s);
}
}
HxOverrides.cca = function(s,index) {
var x = s.charCodeAt(index);
if(x != x) {
return (js_Lib().default).get_undefined();
}
return x;
}
HxOverrides.substr = function(s,pos,len) {
if(len == null) {
len = s.length;
} else if(len < 0) {
if(pos == 0) {
len = s.length + len;
} else {
return "";
}
}
return s.substr(pos,len);
}
HxOverrides.indexOf = function(a,obj,i) {
var len = a.length;
if(i < 0) {
i += len;
if(i < 0) {
i = 0;
}
}
while(i < len) {
if(((a[i]) === obj)) {
return i;
}
++i;
}
return -1;
}
HxOverrides.lastIndexOf = function(a,obj,i) {
var len = a.length;
if(i >= len) {
i = len - 1;
} else if(i < 0) {
i += len;
}
while(i >= 0) {
if(((a[i]) === obj)) {
return i;
}
--i;
}
return -1;
}
HxOverrides.remove = function(a,obj) {
var i = a.indexOf(obj);
if(i == -1) {
return false;
}
a.splice(i,1);
return true;
}
HxOverrides.iter = function(a) {
return { cur : 0, arr : a, hasNext : function() {
return this.cur < this.arr.length;
}, next : function() {
return this.arr[this.cur++];
}};
}
// Export
exports["default"] = HxOverrides;
/***/ }),
/***/ "./lib/_gen/Reflect.js":
/*!*****************************!*\
!*** ./lib/_gen/Reflect.js ***!
\*****************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
// Class: Reflect
var $global = typeof window != "undefined" ? window : typeof __webpack_require__.g != "undefined" ? __webpack_require__.g : typeof self != "undefined" ? self : this
$global.Object.defineProperty(exports, "__esModule", {value: true});
var __map_reserved = {};
// Imports
var $hxClasses = (__webpack_require__(/*! ./hxClasses_stub */ "./lib/_gen/hxClasses_stub.js")["default"]);
var $hxEnums = (__webpack_require__(/*! ./hxEnums_stub */ "./lib/_gen/hxEnums_stub.js")["default"]);
var $import = (__webpack_require__(/*! ./import_stub */ "./lib/_gen/import_stub.js")["default"]);
function js__$Boot_HaxeError() {return __webpack_require__(/*! ./js/_Boot/HaxeError */ "./lib/_gen/js/_Boot/HaxeError.js");}
function js_Boot() {return __webpack_require__(/*! ./js/Boot */ "./lib/_gen/js/Boot.js");}
// Constructor
var Reflect = function(){}
// Meta
Reflect.__name__ = "Reflect";
Reflect.__isInterface__ = false;
Reflect.prototype = {
};
Reflect.prototype.__class__ = Reflect.prototype.constructor = $hxClasses["Reflect"] = Reflect;
// Init
// Statics
Reflect.hasField = function(o,field) {
return Object.prototype.hasOwnProperty.call(o,field);
}
Reflect.field = function(o,field) {
try {
return o[field];
} catch( e ) {
var e1 = ((e) instanceof (js__$Boot_HaxeError().default)) ? e.val : e;
return null;
}
}
Reflect.setField = function(o,field,value) {
o[field] = value;
}
Reflect.getProperty = function(o,field) {
var tmp;
if(o == null) {
return null;
} else {
var tmp1;
if(o.__properties__) {
tmp = o.__properties__["get_" + field];
tmp1 = tmp;
} else {
tmp1 = false;
}
if(tmp1) {
return o[tmp]();
} else {
return o[field];
}
}
}
Reflect.setProperty = function(o,field,value) {
var tmp;
var tmp1;
if(o.__properties__) {
tmp = o.__properties__["set_" + field];
tmp1 = tmp;
} else {
tmp1 = false;
}
if(tmp1) {
o[tmp](value);
} else {
o[field] = value;
}
}
Reflect.callMethod = function(o,func,args) {
return func.apply(o,args);
}
Reflect.fields = function(o) {
var a = [];
if(o != null) {
var hasOwnProperty = Object.prototype.hasOwnProperty;
for( var f in o ) {
if(f != "__id__" && f != "hx__closures__" && hasOwnProperty.call(o,f)) {
a.push(f);
}
}
}
return a;
}
Reflect.isFunction = function(f) {
if(typeof(f) == "function") {
return !((js_Boot().default).isClass(f) || (js_Boot().default).isEnum(f));
} else {
return false;
}
}
Reflect.compare = function(a,b) {
if(a == b) {
return 0;
} else if(a > b) {
return 1;
} else {
return -1;
}
}
Reflect.compareMethods = function(f1,f2) {
if(f1 == f2) {
return true;
}
if(!Reflect.isFunction(f1) || !Reflect.isFunction(f2)) {
return false;
}
if(f1.scope == f2.scope && f1.method == f2.method) {
return f1.method != null;
} else {
return false;
}
}
Reflect.isObject = function(v) {
if(v == null) {
return false;
}
var t = typeof(v);
if(!(t == "string" || t == "object" && v.__enum__ == null)) {
if(t == "function") {
return ((js_Boot().default).isClass(v) || (js_Boot().default).isEnum(v)) != null;
} else {
return false;
}
} else {
return true;
}
}
Reflect.isEnumValue = function(v) {
if(v != null) {
return v.__enum__ != null;
} else {
return false;
}
}
Reflect.deleteField = function(o,field) {
if(!Reflect.hasField(o,field)) {
return false;
}
delete(o[field]);
return true;
}
Reflect.copy = function(o) {
if(o == null) {
return null;
}
var o2 = { };
var _g = 0;
var _g1 = Reflect.fields(o);
while(_g < _g1.length) {
var f = _g1[_g];
++_g;
Reflect.setField(o2,f,Reflect.field(o,f));
}
return o2;
}
Reflect.makeVarArgs = function(f) {
return function() {
var a = Array.prototype.slice.call(arguments);
return f(a);
};
}
// Export
exports["default"] = Reflect;
/***/ }),
/***/ "./lib/_gen/Std.js":
/*!*************************!*\
!*** ./lib/_gen/Std.js ***!
\*************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
// Class: Std
var $global = typeof window != "undefined" ? window : typeof __webpack_require__.g != "undefined" ? __webpack_require__.g : typeof self != "undefined" ? self : this
$global.Object.defineProperty(exports, "__esModule", {value: true});
var __map_reserved = {};
// Imports
var $hxClasses = (__webpack_require__(/*! ./hxClasses_stub */ "./lib/_gen/hxClasses_stub.js")["default"]);
var $hxEnums = (__webpack_require__(/*! ./hxEnums_stub */ "./lib/_gen/hxEnums_stub.js")["default"]);
var $import = (__webpack_require__(/*! ./import_stub */ "./lib/_gen/import_stub.js")["default"]);
function js_Boot() {return __webpack_require__(/*! ./js/Boot */ "./lib/_gen/js/Boot.js");}
function StringTools() {return __webpack_require__(/*! ./StringTools */ "./lib/_gen/StringTools.js");}
// Constructor
var Std = function(){}
// Meta
Std.__name__ = "Std";
Std.__isInterface__ = false;
Std.prototype = {
};
Std.prototype.__class__ = Std.prototype.constructor = $hxClasses["Std"] = Std;
// Init
{
String.prototype.__class__ = $hxClasses["String"] = String
String.__name__ = "String";
$hxClasses["Array"] = Array
Array.__name__ = "Array";
Date.prototype.__class__ = $hxClasses["Date"] = Date;
Date.__name__ = "Date";
var Int = $hxClasses["Int"] = { };
var Dynamic = $hxClasses["Dynamic"] = { };
var Float = $hxClasses["Float"] = Number;
var Bool = $hxClasses["Bool"] = Boolean;
var Class = $hxClasses["Class"] = { };
var Enum = $hxClasses["Enum"] = { };
};
// Statics
Std.is = function(v,t) {
return (js_Boot().default).__instanceof(v,t);
}
Std.downcast = function(value,c) {
if((js_Boot().default).__downcastCheck(value,c)) {
return value;
} else {
return null;
}
}
Std.instance = function(value,c) {
return Std.downcast(value,c);
}
Std.string = function(s) {
return (js_Boot().default).__string_rec(s,"");
}
Std.int = function(x) {
return x | 0;
}
Std.parseInt = function(x) {
if(x != null) {
var _g = 0;
var _g1 = x.length;
while(_g < _g1) {
var i = _g++;
var c = (StringTools().default).fastCodeAt(x,i);
if(c <= 8 || c >= 14 && c != 32 && c != 45) {
var v = parseInt(x, (x[(i + 1)]=="x" || x[(i + 1)]=="X") ? 16 : 10);
if(isNaN(v)) {
return null;
} else {
return v;
}
}
}
}
return null;
}
Std.parseFloat = function(x) {
return parseFloat(x);
}
Std.random = function(x) {
if(x <= 0) {
return 0;
} else {
return Math.floor(Math.random() * x);
}
}
// Export
exports["default"] = Std;
/***/ }),
/***/ "./lib/_gen/StringBuf.js":
/*!*******************************!*\
!*** ./lib/_gen/StringBuf.js ***!
\*******************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
// Class: StringBuf
var $global = typeof window != "undefined" ? window : typeof __webpack_require__.g != "undefined" ? __webpack_require__.g : typeof self != "undefined" ? self : this
$global.Object.defineProperty(exports, "__esModule", {value: true});
var __map_reserved = {};
// Imports
var $hxClasses = (__webpack_require__(/*! ./hxClasses_stub */ "./lib/_gen/hxClasses_stub.js")["default"]);
var $hxEnums = (__webpack_require__(/*! ./hxEnums_stub */ "./lib/_gen/hxEnums_stub.js")["default"]);
var $import = (__webpack_require__(/*! ./import_stub */ "./lib/_gen/import_stub.js")["default"]);
function Std() {return __webpack_require__(/*! ./Std */ "./lib/_gen/Std.js");}
function HxOverrides() {return __webpack_require__(/*! ./HxOverrides */ "./lib/_gen/HxOverrides.js");}
// Constructor
var StringBuf = function() {
this.b = "";
}
// Meta
StringBuf.__name__ = "StringBuf";
StringBuf.__isInterface__ = false;
StringBuf.prototype = {
get_length: function() {
return this.b.length;
},
add: function(x) {
this.b += (Std().default).string(x);
},
addChar: function(c) {
this.b += String.fromCodePoint(c);
},
addSub: function(s,pos,len) {
this.b += len == null ? (HxOverrides().default).substr(s,pos,null) : (HxOverrides().default).substr(s,pos,len);
},
toString: function() {
return this.b;
}
};
StringBuf.prototype.__class__ = StringBuf.prototype.constructor = $hxClasses["StringBuf"] = StringBuf;
// Init
// Statics
// Export
exports["default"] = StringBuf;
/***/ }),
/***/ "./lib/_gen/StringTools.js":
/*!*********************************!*\
!*** ./lib/_gen/StringTools.js ***!
\*********************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
// Class: StringTools
var $global = typeof window != "undefined" ? window : typeof __webpack_require__.g != "undefined" ? __webpack_require__.g : typeof self != "undefined" ? self : this
$global.Object.defineProperty(exports, "__esModule", {value: true});
var __map_reserved = {};
// Imports
var $hxClasses = (__webpack_require__(/*! ./hxClasses_stub */ "./lib/_gen/hxClasses_stub.js")["default"]);
var $hxEnums = (__webpack_require__(/*! ./hxEnums_stub */ "./lib/_gen/hxEnums_stub.js")["default"]);
var $import = (__webpack_require__(/*! ./import_stub */ "./lib/_gen/import_stub.js")["default"]);
function StringBuf() {return __webpack_require__(/*! ./StringBuf */ "./lib/_gen/StringBuf.js");}
function haxe_iterators_StringIteratorUnicode() {return __webpack_require__(/*! ./haxe/iterators/StringIteratorUnicode */ "./lib/_gen/haxe/iterators/StringIteratorUnicode.js");}
function HxOverrides() {return __webpack_require__(/*! ./HxOverrides */ "./lib/_gen/HxOverrides.js");}
function haxe_iterators_StringIterator() {return __webpack_require__(/*! ./haxe/iterators/StringIterator */ "./lib/_gen/haxe/iterators/StringIterator.js");}
function haxe_iterators_StringKeyValueIterator() {return __webpack_require__(/*! ./haxe/iterators/StringKeyValueIterator */ "./lib/_gen/haxe/iterators/StringKeyValueIterator.js");}
function EReg() {return __webpack_require__(/*! ./EReg */ "./lib/_gen/EReg.js");}
function haxe_SysTools() {return __webpack_require__(/*! ./haxe/SysTools */ "./lib/_gen/haxe/SysTools.js");}
// Constructor
var StringTools = function(){}
// Meta
StringTools.__name__ = "StringTools";
StringTools.__isInterface__ = false;
StringTools.prototype = {
};
StringTools.prototype.__class__ = StringTools.prototype.constructor = $hxClasses["StringTools"] = StringTools;
// Init
// Statics
StringTools.urlEncode = function(s) {
return encodeURIComponent(s);
}
StringTools.urlDecode = function(s) {
return decodeURIComponent(s.split("+").join(" "));
}
StringTools.htmlEscape = function(s,quotes) {
var buf = new (StringBuf().default)();
var code = new (haxe_iterators_StringIteratorUnicode().default)(s);
while(code.hasNext()) {
var code1 = code.next();
switch(code1) {
case 34:
if(quotes) {
buf.add(""");
} else {
buf.addChar(code1);
}
break;
case 38:
buf.add("&");
break;
case 39:
if(quotes) {
buf.add("'");
} else {
buf.addChar(code1);
}
break;
case 60:
buf.add("<");
break;
case 62:
buf.add(">");
break;
default:
buf.addChar(code1);
}
}
return buf.toString();
}
StringTools.htmlUnescape = function(s) {
return s.split(">").join(">").split("<").join("<").split(""").join("\"").split("'").join("'").split("&").join("&");
}
StringTools.contains = function(s,value) {
return s.indexOf(value) != -1;
}
StringTools.startsWith = function(s,start) {
if(s.length >= start.length) {
return s.lastIndexOf(start,0) == 0;
} else {
return false;
}
}
StringTools.endsWith = function(s,end) {
var elen = end.length;
var slen = s.length;
if(slen >= elen) {
return s.indexOf(end,slen - elen) == slen - elen;
} else {
return false;
}
}
StringTools.isSpace = function(s,pos) {
var c = (HxOverrides().default).cca(s,pos);
if(!(c > 8 && c < 14)) {
return c == 32;
} else {
return true;
}
}
StringTools.ltrim = function(s) {
var l = s.length;
var r = 0;
while(r < l && StringTools.isSpace(s,r)) ++r;
if(r > 0) {
return (HxOverrides().default).substr(s,r,l - r);
} else {
return s;
}
}
StringTools.rtrim = function(s) {
var l = s.length;
var r = 0;
while(r < l && StringTools.isSpace(s,l - r - 1)) ++r;
if(r > 0) {
return (HxOverrides().default).substr(s,0,l - r);
} else {
return s;
}
}
StringTools.trim = function(s) {
return StringTools.ltrim(StringTools.rtrim(s));
}
StringTools.lpad = function(s,c,l) {
if(c.length <= 0) {
return s;
}
var buf = new (StringBuf().default)();
l -= s.length;
while(buf.get_length() < l) buf.add(c);
buf.add(s);
return buf.toString();
}
StringTools.rpad = function(s,c,l) {
if(c.length <= 0) {
return s;
}
var buf = new (StringBuf().default)();
buf.add(s);
while(buf.get_length() < l) buf.add(c);
return buf.toString();
}
StringTools.replace = function(s,sub,by) {
return s.split(sub).join(by);
}
StringTools.hex = function(n,digits) {
var s = "";
var hexChars = "0123456789ABCDEF";
while(true) {
s = hexChars.charAt(n & 15) + s;
n >>>= 4;
if(!(n > 0)) {
break;
}
}
if(digits != null) {
while(s.length < digits) s = "0" + s;
}
return s;
}
StringTools.fastCodeAt = function(s,index) {
return s.charCodeAt(index);
}
StringTools.iterator = function(s) {
return new (haxe_iterators_StringIterator().default)(s);
}
StringTools.keyValueIterator = function(s) {
return new (haxe_iterators_StringKeyValueIterator().default)(s);
}
StringTools.isEof = function(c) {
return c != c;
}
StringTools.quoteUnixArg = function(argument) {
if(argument == "") {
return "''";
} else if(!new (EReg().default)("[^a-zA-Z0-9_@%+=:,./-]","").match(argument)) {
return argument;
} else {
return "'" + StringTools.replace(argument,"'","'\"'\"'") + "'";
}
}
StringTools.quoteWinArg = function(argument,escapeMetaCharacters) {
var argument1 = argument;
if(!new (EReg().default)("^[^ \t\\\\\"]+$","").match(argument1)) {
var result = new (StringBuf().default)();
var needquote = argument1.indexOf(" ") != -1 || argument1.indexOf("\t") != -1 || argument1 == "";
if(needquote) {
result.add("\"");
}
var bs_buf = new (StringBuf().default)();
var _g = 0;
var _g1 = argument1.length;
while(_g < _g1) {
var i = _g++;
var _g2 = (HxOverrides().default).cca(argument1,i);
if(_g2 == null) {
var c = _g2;
if(bs_buf.get_length() > 0) {
result.add(bs_buf.toString());
bs_buf = new (StringBuf().default)();
}
result.addChar(c);
} else {
switch(_g2) {
case 34:
var bs = bs_buf.toString();
result.add(bs);
result.add(bs);
bs_buf = new (StringBuf().default)();
result.add("\\\"");
break;
case 92:
bs_buf.add("\\");
break;
default:
var c1 = _g2;
if(bs_buf.get_length() > 0) {
result.add(bs_buf.toString());
bs_buf = new (StringBuf().default)();
}
result.addChar(c1);
}
}
}
result.add(bs_buf.toString());
if(needquote) {
result.add(bs_buf.toString());
result.add("\"");
}
argument1 = result.toString();
}
if(escapeMetaCharacters) {
var result1 = new (StringBuf().default)();
var _g3 = 0;
var _g11 = argument1.length;
while(_g3 < _g11) {
var i1 = _g3++;
var c2 = (HxOverrides().default).cca(argument1,i1);
if((haxe_SysTools().default).winMetaCharacters.indexOf(c2) >= 0) {
result1.addChar(94);
}
result1.addChar(c2);
}
return result1.toString();
} else {
return argument1;
}
}
StringTools.utf16CodePointAt = function(s,index) {
var c = StringTools.fastCodeAt(s,index);
if(c >= 55296 && c <= 56319) {
c = c - 55232 << 10 | StringTools.fastCodeAt(s,index + 1) & 1023;
}
return c;
}
StringTools.winMetaCharacters = (haxe_SysTools().default).winMetaCharacters
StringTools.MIN_SURROGATE_CODE_POINT = 65536
// Export
exports["default"] = StringTools;
/***/ }),
/***/ "./lib/_gen/Type.js":
/*!**************************!*\
!*** ./lib/_gen/Type.js ***!
\**************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
// Class: Type
var $global = typeof window != "undefined" ? window : typeof __webpack_require__.g != "undefined" ? __webpack_require__.g : typeof self != "undefined" ? self : this
$global.Object.defineProperty(exports, "__esModule", {value: true});
var __map_reserved = {};
// Imports
var $hxClasses = (__webpack_require__(/*! ./hxClasses_stub */ "./lib/_gen/hxClasses_stub.js")["default"]);
var $hxEnums = (__webpack_require__(/*! ./hxEnums_stub */ "./lib/_gen/hxEnums_stub.js")["default"]);
var $import = (__webpack_require__(/*! ./import_stub */ "./lib/_gen/import_stub.js")["default"]);
function js_Boot() {return __webpack_require__(/*! ./js/Boot */ "./lib/_gen/js/Boot.js");}
function Reflect() {return __webpack_require__(/*! ./Reflect */ "./lib/_gen/Reflect.js");}
function js__$Boot_HaxeError() {return __webpack_require__(/*! ./js/_Boot/HaxeError */ "./lib/_gen/js/_Boot/HaxeError.js");}
function HxOverrides() {return __webpack_require__(/*! ./HxOverrides */ "./lib/_gen/HxOverrides.js");}
function ValueType() {return __webpack_require__(/*! ./ValueType */ "./lib/_gen/ValueType.js");}
// Constructor
var Type = function(){}
// Meta
Type.__name__ = "Type";
Type.__isInterface__ = false;
Type.prototype = {
};
Type.prototype.__class__ = Type.prototype.constructor = $hxClasses["Type"] = Type;
// Init
// Statics
Type.getClass = function(o) {
return (js_Boot().default).getClass(o);
}
Type.getEnum = function(o) {
if(o == null) {
return null;
}
return $hxEnums[o.__enum__];
}
Type.getSuperClass = function(c) {
return c.__super__;
}
Type.getClassName = function(c) {
return c.__name__;
}
Type.getEnumName = function(e) {
return e.__ename__;
}
Type.resolveClass = function(name) {
return $hxClasses[name];
}
Type.resolveEnum = function(name) {
return $hxEnums[name];
}
Type.createInstance = function(cl,args) {
return new (Function.prototype.bind.apply(cl,[null].concat(args)));
}
Type.createEmptyInstance = function(cl) {
return Object.create(cl.prototype);
}
Type.createEnum = function(e,constr,params) {
var f = (Reflect().default).field(e,constr);
if(f == null) {
throw new (js__$Boot_HaxeError().default)("No such constructor " + constr);
}
if((Reflect().default).isFunction(f)) {
if(params == null) {
throw new (js__$Boot_HaxeError().default)("Constructor " + constr + " need parameters");
}
return (Reflect().default).callMethod(e,f,params);
}
if(params != null && params.length != 0) {
throw new (js__$Boot_HaxeError().default)("Constructor " + constr + " does not need parameters");
}
return f;
}
Type.createEnumIndex = function(e,index,params) {
var c = e.__constructs__[index];
if(c == null) {
throw new (js__$Boot_HaxeError().default)(index + " is not a valid enum constructor index");
}
return Type.createEnum(e,c,params);
}
Type.getInstanceFields = function(c) {
var a = [];
for(var i in c.prototype) a.push(i);
(HxOverrides().default).remove(a,"__class__");
(HxOverrides().default).remove(a,"__properties__");
return a;
}
Type.getClassFields = function(c) {
var a = (Reflect().default).fields(c);
(HxOverrides().default).remove(a,"__name__");
(HxOverrides().default).remove(a,"__interfaces__");
(HxOverrides().default).remove(a,"__properties__");
(HxOverrides().default).remove(a,"__super__");
(HxOverrides().default).remove(a,"__meta__");
(HxOverrides().default).remove(a,"prototype");
return a;
}
Type.getEnumConstructs = function(e) {
return e.__constructs__.slice();
}
Type.typeof = function(v) {
switch(typeof(v)) {
case "boolean":
return (ValueType().default).TBool;
case "function":
if((js_Boot().default).isClass(v) || (js_Boot().default).isEnum(v)) {
return (ValueType().default).TObject;
}
return (ValueType().default).TFunction;
case "number":
if(Math.ceil(v) == v % 2147483648.0) {
return (ValueType().default).TInt;
}
return (ValueType().default).TFloat;
case "object":
if(v == null) {
return (ValueType().default).TNull;
}
var e = v.__enum__;
if(e != null) {
return (ValueType().default).TEnum($hxEnums[e]);
}
var c = (js_Boot().default).getClass(v);
if(c != null) {
return (ValueType().default).TClass(c);
}
return (ValueType().default).TObject;
case "string":
return (ValueType().default).TClass(String);
case "undefined":
return (ValueType().default).TNull;
default:
return (ValueType().default).TUnknown;
}
}
Type.enumEq = function(a,b) {
if(a == b) {
return true;
}
try {
var e = a.__enum__;
if(e == null || e != b.__enum__) {
return false;
}
if(a._hx_index != b._hx_index) {
return false;
}
var enm = $hxEnums[e];
var ctorName = enm.__constructs__[a._hx_index];
var params = enm[ctorName].__params__;
var _g = 0;
while(_g < params.length) {
var f = params[_g];
++_g;
if(!Type.enumEq(a[f],b[f])) {
return false;
}
}
} catch( e1 ) {
var e2 = ((e1) instanceof (js__$Boot_HaxeError().default)) ? e1.val : e1;
return false;
}
return true;
}
Type.enumConstructor = function(e) {
return $hxEnums[e.__enum__].__constructs__[e._hx_index];
}
Type.enumParameters = function(e) {
var enm = $hxEnums[e.__enum__];
var ctorName = enm.__constructs__[e._hx_index];
var params = enm[ctorName].__params__;
if(params != null) {
var _g = [];
var _g1 = 0;
while(_g1 < params.length) {
var p = params[_g1];
++_g1;
_g.push(e[p]);
}
return _g;
} else {
return [];
}
}
Type.enumIndex = function(e) {
return e._hx_index;
}
Type.allEnums = function(e) {
return e.__empty_constructs__.slice();
}
// Export
exports["default"] = Type;
/***/ }),
/***/ "./lib/_gen/ValueType.js":
/*!*******************************!*\
!*** ./lib/_gen/ValueType.js ***!
\*******************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
// Enum: ValueType
var $global = typeof window != "undefined" ? window : typeof __webpack_require__.g != "undefined" ? __webpack_require__.g : typeof self != "undefined" ? self : this
$global.Object.defineProperty(exports, "__esModule", {value: true});
// Imports
var $estr = (__webpack_require__(/*! ./estr_stub */ "./lib/_gen/estr_stub.js")["default"]);
var $hxEnums = (__webpack_require__(/*! ./hxEnums_stub */ "./lib/_gen/hxEnums_stub.js")["default"]);
// Definition
var ValueType = $hxEnums["ValueType"] = { __ename__ : "ValueType", __constructs__ : ["TNull","TInt","TFloat","TBool","TObject","TFunction","TClass","TEnum","TUnknown"]
,TUnknown: {_hx_index:8,__enum__:"ValueType",toString:$estr}
,TObject: {_hx_index:4,__enum__:"ValueType",toString:$estr}
,TNull: {_hx_index:0,__enum__:"ValueType",toString:$estr}
,TInt: {_hx_index:1,__enum__:"ValueType",toString:$estr}
,TFunction: {_hx_index:5,__enum__:"ValueType",toString:$estr}
,TFloat: {_hx_index:2,__enum__:"ValueType",toString:$estr}
,TEnum: ($_=function(e) { return {_hx_index:7,e:e,__enum__:"ValueType",toString:$estr}; },$_.__params__ = ["e"],$_)
,TClass: ($_=function(c) { return {_hx_index:6,c:c,__enum__:"ValueType",toString:$estr}; },$_.__params__ = ["c"],$_)
,TBool: {_hx_index:3,__enum__:"ValueType",toString:$estr}
};
exports["default"] = ValueType;
/***/ }),
/***/ "./lib/_gen/Xml.js":
/*!*************************!*\
!*** ./lib/_gen/Xml.js ***!
\*************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
// Class: Xml
var $global = typeof window != "undefined" ? window : typeof __webpack_require__.g != "undefined" ? __webpack_require__.g : typeof self != "undefined" ? self : this
$global.Object.defineProperty(exports, "__esModule", {value: true});
var __map_reserved = {};
// Imports
var $hxClasses = (__webpack_require__(/*! ./hxClasses_stub */ "./lib/_gen/hxClasses_stub.js")["default"]);
var $hxEnums = (__webpack_require__(/*! ./hxEnums_stub */ "./lib/_gen/hxEnums_stub.js")["default"]);
var $import = (__webpack_require__(/*! ./import_stub */ "./lib/_gen/import_stub.js")["default"]);
function js__$Boot_HaxeError() {return __webpack_require__(/*! ./js/_Boot/HaxeError */ "./lib/_gen/js/_Boot/HaxeError.js");}
function _$Xml_XmlType_$Impl_$() {return __webpack_require__(/*! ./_Xml/XmlType_Impl_ */ "./lib/_gen/_Xml/XmlType_Impl_.js");}
function HxOverrides() {return __webpack_require__(/*! ./HxOverrides */ "./lib/_gen/HxOverrides.js");}
function haxe_xml_Printer() {return __webpack_require__(/*! ./haxe/xml/Printer */ "./lib/_gen/haxe/xml/Printer.js");}
function haxe_xml_Parser() {return __webpack_require__(/*! ./haxe/xml/Parser */ "./lib/_gen/haxe/xml/Parser.js");}
function haxe_ds_StringMap() {return __webpack_require__(/*! ./haxe/ds/StringMap */ "./lib/_gen/haxe/ds/StringMap.js");}
// Constructor
var Xml = function(nodeType) {
this.nodeType = nodeType;
this.children = [];
this.attributeMap = new (haxe_ds_StringMap().default)();
}
// Meta
Xml.__name__ = "Xml";
Xml.__isInterface__ = false;
Xml.prototype = {
get_nodeName: function() {
if(this.nodeType != Xml.Element) {
throw new (js__$Boot_HaxeError().default)("Bad node type, expected Element but found " + (_$Xml_XmlType_$Impl_$().default).toString(this.nodeType));
}
return this.nodeName;
},
set_nodeName: function(v) {
if(this.nodeType != Xml.Element) {
throw new (js__$Boot_HaxeError().default)("Bad node type, expected Element but found " + (_$Xml_XmlType_$Impl_$().default).toString(this.nodeType));
}
return this.nodeName = v;
},
get_nodeValue: function() {
if(this.nodeType == Xml.Document || this.nodeType == Xml.Element) {
throw new (js__$Boot_HaxeError().default)("Bad node type, unexpected " + (_$Xml_XmlType_$Impl_$().default).toString(this.nodeType));
}
return this.nodeValue;
},
set_nodeValue: function(v) {
if(this.nodeType == Xml.Document || this.nodeType == Xml.Element) {
throw new (js__$Boot_HaxeError().default)("Bad node type, unexpected " + (_$Xml_XmlType_$Impl_$().default).toString(this.nodeType));
}
return this.nodeValue = v;
},
get: function(att) {
if(this.nodeType != Xml.Element) {
throw new (js__$Boot_HaxeError().default)("Bad node type, expected Element but found " + (_$Xml_XmlType_$Impl_$().default).toString(this.nodeType));
}
return this.attributeMap.get(att);
},
set: function(att,value) {
if(this.nodeType != Xml.Element) {
throw new (js__$Boot_HaxeError().default)("Bad node type, expected Element but found " + (_$Xml_XmlType_$Impl_$().default).toString(this.nodeType));
}
this.attributeMap.set(att,value);
},
remove: function(att) {
if(this.nodeType != Xml.Element) {
throw new (js__$Boot_HaxeError().default)("Bad node type, expected Element but found " + (_$Xml_XmlType_$Impl_$().default).toString(this.nodeType));
}
this.attributeMap.remove(att);
},
exists: function(att) {
if(this.nodeType != Xml.Element) {
throw new (js__$Boot_HaxeError().default)("Bad node type, expected Element but found " + (_$Xml_XmlType_$Impl_$().default).toString(this.nodeType));
}
return this.attributeMap.exists(att);
},
attributes: function() {
if(this.nodeType != Xml.Element) {
throw new (js__$Boot_HaxeError().default)("Bad node type, expected Element but found " + (_$Xml_XmlType_$Impl_$().default).toString(this.nodeType));
}
return this.attributeMap.keys();
},
iterator: function() {
this.ensureElementType();
return (HxOverrides().default).iter(this.children);
},
elements: function() {
this.ensureElementType();
var _g = [];
var _g1 = 0;
var _g2 = this.children;
while(_g1 < _g2.length) {
var child = _g2[_g1];
++_g1;
if(child.nodeType == Xml.Element) {
_g.push(child);
}
}
var ret = _g;
return (HxOverrides().default).iter(ret);
},
elementsNamed: function(name) {
this.ensureElementType();
var _g = [];
var _g1 = 0;
var _g2 = this.children;
while(_g1 < _g2.length) {
var child = _g2[_g1];
++_g1;
if(child.nodeType == Xml.Element && child.get_nodeName() == name) {
_g.push(child);
}
}
var ret = _g;
return (HxOverrides().default).iter(ret);
},
firstChild: function() {
this.ensureElementType();
return this.children[0];
},
firstElement: function() {
this.ensureElementType();
var _g = 0;
var _g1 = this.children;
while(_g < _g1.length) {
var child = _g1[_g];
++_g;
if(child.nodeType == Xml.Element) {
return child;
}
}
return null;
},
addChild: function(x) {
this.ensureElementType();
if(x.parent != null) {
x.parent.removeChild(x);
}
this.children.push(x);
x.parent = this;
},
removeChild: function(x) {
this.ensureElementType();
if((HxOverrides().default).remove(this.children,x)) {
x.parent = null;
return true;
}
return false;
},
insertChild: function(x,pos) {
this.ensureElementType();
if(x.parent != null) {
(HxOverrides().default).remove(x.parent.children,x);
}
this.children.splice(pos,0,x);
x.parent = this;
},
toString: function() {
return (haxe_xml_Printer().default).print(this);
},
ensureElementType: function() {
if(this.nodeType != Xml.Document && this.nodeType != Xml.Element) {
throw new (js__$Boot_HaxeError().default)("Bad node type, expected Element or Document but found " + (_$Xml_XmlType_$Impl_$().default).toString(this.nodeType));
}
}
};
Xml.prototype.__class__ = Xml.prototype.constructor = $hxClasses["Xml"] = Xml;
// Init
// Statics
Xml.parse = function(str) {
return (haxe_xml_Parser().default).parse(str);
}
Xml.createElement = function(name) {
var xml = new Xml(Xml.Element);
xml.set_nodeName(name);
return xml;
}
Xml.createPCData = function(data) {
var xml = new Xml(Xml.PCData);
xml.set_nodeValue(data);
return xml;
}
Xml.createCData = function(data) {
var xml = new Xml(Xml.CData);
xml.set_nodeValue(data);
return xml;
}
Xml.createComment = function(data) {
var xml = new Xml(Xml.Comment);
xml.set_nodeValue(data);
return xml;
}
Xml.createDocType = function(data) {
var xml = new Xml(Xml.DocType);
xml.set_nodeValue(data);
return xml;
}
Xml.createProcessingInstruction = function(data) {
var xml = new Xml(Xml.ProcessingInstruction);
xml.set_nodeValue(data);
return xml;
}
Xml.createDocument = function() {
return new Xml(Xml.Document);
}
Xml.Element = 0
Xml.PCData = 1
Xml.CData = 2
Xml.Comment = 3
Xml.DocType = 4
Xml.ProcessingInstruction = 5
Xml.Document = 6
// Export
exports["default"] = Xml;
/***/ }),
/***/ "./lib/_gen/_UInt/UInt_Impl_.js":
/*!**************************************!*\
!*** ./lib/_gen/_UInt/UInt_Impl_.js ***!
\**************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
// Class: _UInt.UInt_Impl_
var $global = typeof window != "undefined" ? window : typeof __webpack_require__.g != "undefined" ? __webpack_require__.g : typeof self != "undefined" ? self : this
$global.Object.defineProperty(exports, "__esModule", {value: true});
var __map_reserved = {};
// Imports
var $hxClasses = (__webpack_require__(/*! ./../hxClasses_stub */ "./lib/_gen/hxClasses_stub.js")["default"]);
var $hxEnums = (__webpack_require__(/*! ./../hxEnums_stub */ "./lib/_gen/hxEnums_stub.js")["default"]);
var $import = (__webpack_require__(/*! ./../import_stub */ "./lib/_gen/import_stub.js")["default"]);
function Std() {return __webpack_require__(/*! ./../Std */ "./lib/_gen/Std.js");}
// Constructor
var UInt_Impl_ = function(){}
// Meta
UInt_Impl_.__name__ = "_UInt.UInt_Impl_";
UInt_Impl_.__isInterface__ = false;
UInt_Impl_.prototype = {
};
UInt_Impl_.prototype.__class__ = UInt_Impl_.prototype.constructor = $hxClasses["_UInt.UInt_Impl_"] = UInt_Impl_;
// Init
// Statics
UInt_Impl_.add = function(a,b) {
return a + b;
}
UInt_Impl_.div = function(a,b) {
return UInt_Impl_.toFloat(a) / UInt_Impl_.toFloat(b);
}
UInt_Impl_.mul = function(a,b) {
return a * b;
}
UInt_Impl_.sub = function(a,b) {
return a - b;
}
UInt_Impl_.gt = function(a,b) {
var aNeg = a < 0;
var bNeg = b < 0;
if(aNeg != bNeg) {
return aNeg;
} else {
return a > b;
}
}
UInt_Impl_.gte = function(a,b) {
var aNeg = a < 0;
var bNeg = b < 0;
if(aNeg != bNeg) {
return aNeg;
} else {
return a >= b;
}
}
UInt_Impl_.lt = function(a,b) {
return UInt_Impl_.gt(b,a);
}
UInt_Impl_.lte = function(a,b) {
return UInt_Impl_.gte(b,a);
}
UInt_Impl_.and = function(a,b) {
return a & b;
}
UInt_Impl_.or = function(a,b) {
return a | b;
}
UInt_Impl_.xor = function(a,b) {
return a ^ b;
}
UInt_Impl_.shl = function(a,b) {
return a << b;
}
UInt_Impl_.shr = function(a,b) {
return a >>> b;
}
UInt_Impl_.ushr = function(a,b) {
return a >>> b;
}
UInt_Impl_.mod = function(a,b) {
return (Std().default).int(UInt_Impl_.toFloat(a) % UInt_Impl_.toFloat(b));
}
UInt_Impl_.addWithFloat = function(a,b) {
return UInt_Impl_.toFloat(a) + b;
}
UInt_Impl_.mulWithFloat = function(a,b) {
return UInt_Impl_.toFloat(a) * b;
}
UInt_Impl_.divFloat = function(a,b) {
return UInt_Impl_.toFloat(a) / b;
}
UInt_Impl_.floatDiv = function(a,b) {
return a / UInt_Impl_.toFloat(b);
}
UInt_Impl_.subFloat = function(a,b) {
return UInt_Impl_.toFloat(a) - b;
}
UInt_Impl_.floatSub = function(a,b) {
return a - UInt_Impl_.toFloat(b);
}
UInt_Impl_.gtFloat = function(a,b) {
return UInt_Impl_.toFloat(a) > b;
}
UInt_Impl_.equalsInt = function(a,b) {
return a == b;
}
UInt_Impl_.notEqualsInt = function(a,b) {
return a != b;
}
UInt_Impl_.equalsFloat = function(a,b) {
return UInt_Impl_.toFloat(a) == b;
}
UInt_Impl_.notEqualsFloat = function(a,b) {
return UInt_Impl_.toFloat(a) != b;
}
UInt_Impl_.gteFloat = function(a,b) {
return UInt_Impl_.toFloat(a) >= b;
}
UInt_Impl_.floatGt = function(a,b) {
return a > UInt_Impl_.toFloat(b);
}
UInt_Impl_.floatGte = function(a,b) {
return a >= UInt_Impl_.toFloat(b);
}
UInt_Impl_.ltFloat = function(a,b) {
return UInt_Impl_.toFloat(a) < b;
}
UInt_Impl_.lteFloat = function(a,b) {
return UInt_Impl_.toFloat(a) <= b;
}
UInt_Impl_.floatLt = function(a,b) {
return a < UInt_Impl_.toFloat(b);
}
UInt_Impl_.floatLte = function(a,b) {
return a <= UInt_Impl_.toFloat(b);
}
UInt_Impl_.modFloat = function(a,b) {
return UInt_Impl_.toFloat(a) % b;
}
UInt_Impl_.floatMod = function(a,b) {
return a % UInt_Impl_.toFloat(b);
}
UInt_Impl_.negBits = function(this1) {
return ~this1;
}
UInt_Impl_.prefixIncrement = function(this1) {
return ++this1;
}
UInt_Impl_.postfixIncrement = function(this1) {
return this1++;
}
UInt_Impl_.prefixDecrement = function(this1) {
return --this1;
}
UInt_Impl_.postfixDecrement = function(this1) {
return this1--;
}
UInt_Impl_.toString = function(this1,radix) {
return (Std().default).string(this1 == null ? null : UInt_Imp