art-lost-in-time/fengari-web.js

8 lines
214 KiB
JavaScript
Raw Normal View History

!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.fengari=e():t.fengari=e()}(window,function(){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var a=e[n]={i:n,l:!1,exports:{}};return t[n].call(a.exports,a,a.exports,r),a.l=!0,a.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var a in t)r.d(n,a,function(e){return t[e]}.bind(null,a));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=34)}([function(t,e,r){"use strict";
/**
@license MIT
Copyright © 2017-2018 Benoit Giannangeli
Copyright © 2017-2018 Daurnimator
Copyright © 19942017 Lua.org, PUC-Rio.
*/var n=r(5);t.exports.FENGARI_AUTHORS=n.FENGARI_AUTHORS,t.exports.FENGARI_COPYRIGHT=n.FENGARI_COPYRIGHT,t.exports.FENGARI_RELEASE=n.FENGARI_RELEASE,t.exports.FENGARI_VERSION=n.FENGARI_VERSION,t.exports.FENGARI_VERSION_MAJOR=n.FENGARI_VERSION_MAJOR,t.exports.FENGARI_VERSION_MINOR=n.FENGARI_VERSION_MINOR,t.exports.FENGARI_VERSION_NUM=n.FENGARI_VERSION_NUM,t.exports.FENGARI_VERSION_RELEASE=n.FENGARI_VERSION_RELEASE,t.exports.luastring_eq=n.luastring_eq,t.exports.luastring_indexOf=n.luastring_indexOf,t.exports.luastring_of=n.luastring_of,t.exports.to_jsstring=n.to_jsstring,t.exports.to_luastring=n.to_luastring,t.exports.to_uristring=n.to_uristring;var a=r(3),u=r(2),s=r(7),o=r(17);t.exports.luaconf=a,t.exports.lua=u,t.exports.lauxlib=s,t.exports.lualib=o},function(t,e,r){"use strict";var n,a,u;if(n="function"==typeof Uint8Array.from?Uint8Array.from.bind(Uint8Array):function(t){for(var e=0,r=t.length,n=new Uint8Array(r);r>e;)n[e]=t[e++];return n},"function"==typeof(new Uint8Array).indexOf)a=function(t,e,r){return t.indexOf(e,r)};else{var s=[].indexOf;if(0!==s.call(new Uint8Array(1),0))throw Error("missing .indexOf");a=function(t,e,r){return s.call(t,e,r)}}u="function"==typeof Uint8Array.of?Uint8Array.of.bind(Uint8Array):function(){return n(arguments)};var o=function(t){return t instanceof Uint8Array},l="cannot convert invalid utf8 to javascript string",i=";,/?:@&=+$abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789,-_.!~*'()#".split("").reduce(function(t,e){return t[e.charCodeAt(0)]=!0,t},{}),c={},f=function(t,e){if("string"!=typeof t)throw new TypeError("to_luastring expects a javascript string");if(e){var r=c[t];if(o(r))return r}for(var a=t.length,u=Array(a),s=0,l=0;l<a;++l){var i=t.charCodeAt(l);if(i<=127)u[s++]=i;else if(i<=2047)u[s++]=192|i>>6,u[s++]=128|63&i;else{if(i>=55296&&i<=56319&&l+1<a){var f=t.charCodeAt(l+1);f>=56320&&f<=57343&&(l++,i=1024*(i-55296)+f+9216)}i<=65535?(u[s++]=224|i>>12,u[s++]=128|i>>6&63,u[s++]=128|63&i):(u[s++]=240|i>>18,u[s++]=128|i>>12&63,u[s++]=128|i>>6&63,u[s++]=128|63&i)}}return u=n(u),e&&(c[t]=u),u};t.exports.luastring_from=n,t.exports.luastring_indexOf=a,t.exports.luastring_of=u,t.exports.is_luastring=o,t.exports.luastring_eq=function(t,e){if(t!==e){var r=t.length;if(r!==e.length)return!1;for(var n=0;n<r;n++)if(t[n]!==e[n])return!1}return!0},t.exports.to_jsstring=function(t,e,r,n){if(!o(t))throw new TypeError("to_jsstring expects a Uint8Array");r=void 0===r?t.length:Math.min(t.length,r);for(var a="",u=void 0!==e?e:0;u<r;){var s=t[u++];if(s<128)a+=String.fromCharCode(s);else if(s<194||s>244){if(!n)throw RangeError(l);a+="<EFBFBD>"}else if(s<=223){if(u>=r){if(!n)throw RangeError(l);a+="<EFBFBD>";continue}var i=t[u++];if(128!=(192&i)){if(!n)throw RangeError(l);a+="<EFBFBD>";continue}a+=String.fromCharCode(((31&s)<<6)+(63&i))}else if(s<=239){if(u+1>=r){if(!n)throw RangeError(l);a+="<EFBFBD>";continue}var c=t[u++];if(128!=(192&c)){if(!n)throw RangeError(l);a+="<EFBFBD>";continue}var f=t[u++];if(128!=(192&f)){if(!n)throw RangeError(l);a+="<EFBFBD>";continue}var _=((15&s)<<12)+((63&c)<<6)+(63&f);if(_<=65535)a+=String.fromCharCode(_);else{var p=55296+((_-=65536)>>10),v=_%1024+56320;a+=String.fromCharCode(p,v)}}else{if(u+2>=r){if(!n)throw RangeError(l);a+="<EFBFBD>";continue}var h=t[u++];if(128!=(192&h)){if(!n)throw RangeError(l);a+="<EFBFBD>";continue}var L=t[u++];if(128!=(192&L)){if(!n)throw RangeError(l);a+="<EFBFBD>";continue}var d=t[u++];if(128!=(192&d)){if(!n)throw RangeError(l);a+="<EFBFBD>";continue}var A=((7&s)<<18)+((63&h)<<12)+((63&L)<<6)+(63&d),g=55296+((A-=65536)>>10),T=A%1024+56320;a+=String.fromCharCode(g,T)}}return a},t.exports.to_uristring=function(t){if(!o(t))throw new TypeError("to_uristring expects a Uint8Array");for(var e="",r=0;r<t.length;r++){var n=t[r];i[n]?e+=String.fromCharCode(n):e+="%"+(n<16?"0":"")+n.toString(16)}return e},t.exports.to_luastring=f,t.exports.from_userstring=function(t){if(!o(t)){if("string"!=typeof t)throw new TypeError("expects an array of bytes or javascript string");t=f(t)}return t};var _=f("Lua");t.exports.LUA_SIGNATURE=_,t.exports.LUA_VERSION_MAJOR="5",t.exports.LUA_VERSION_MINOR="3",