Initial commit
This commit is contained in:
commit
e49726988c
5445 files changed
+1089914
No files matched your search
+5
@@ -0,0 +1,5 @@
|
||||
/**
|
||||
* @module jimp/fonts
|
||||
*/
|
||||
export * from "@jimp/plugin-print/fonts";
|
||||
//# sourceMappingURL=fonts.d.ts.map
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"fonts.d.ts","sourceRoot":"","sources":["../../src/fonts.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,0BAA0B,CAAC"}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
/**
|
||||
* @module jimp/fonts
|
||||
*/
|
||||
export * from "@jimp/plugin-print/fonts";
|
||||
//# sourceMappingURL=fonts.js.map
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"fonts.js","sourceRoot":"","sources":["../../src/fonts.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,0BAA0B,CAAC"}
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"index-browser.d.mts","sourceRoot":"","sources":["../../src/index-browser.mts"],"names":[],"mappings":""}
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"index-browser.mjs","sourceRoot":"","sources":["../../src/index-browser.mts"],"names":[],"mappings":";AAAA,4CAA4C"}
|
||||
+1764
File diff suppressed because it is too large.
Load diff
+236
@@ -0,0 +1,236 @@
|
||||
var commonjsGlobal="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function getDefaultExportFromCjs(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function getAugmentedNamespace(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var i=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};i.prototype=t.prototype}else i={};return Object.defineProperty(i,"__esModule",{value:!0}),Object.keys(e).forEach((function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(i,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})})),i}"undefined"==typeof self&&"object"==typeof commonjsGlobal&&(commonjsGlobal.self=commonjsGlobal);var global$1="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},lookup=[],revLookup=[],Arr="undefined"!=typeof Uint8Array?Uint8Array:Array,inited=!1;function init(){inited=!0;for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=0;t<64;++t)lookup[t]=e[t],revLookup[e.charCodeAt(t)]=t;revLookup["-".charCodeAt(0)]=62,revLookup["_".charCodeAt(0)]=63}function toByteArray(e){var t,i,r,n,a,o;inited||init();var s=e.length;if(s%4>0)throw new Error("Invalid string. Length must be a multiple of 4");a="="===e[s-2]?2:"="===e[s-1]?1:0,o=new Arr(3*s/4-a),r=a>0?s-4:s;var l=0;for(t=0,i=0;t<r;t+=4,i+=3)n=revLookup[e.charCodeAt(t)]<<18|revLookup[e.charCodeAt(t+1)]<<12|revLookup[e.charCodeAt(t+2)]<<6|revLookup[e.charCodeAt(t+3)],o[l++]=n>>16&255,o[l++]=n>>8&255,o[l++]=255&n;return 2===a?(n=revLookup[e.charCodeAt(t)]<<2|revLookup[e.charCodeAt(t+1)]>>4,o[l++]=255&n):1===a&&(n=revLookup[e.charCodeAt(t)]<<10|revLookup[e.charCodeAt(t+1)]<<4|revLookup[e.charCodeAt(t+2)]>>2,o[l++]=n>>8&255,o[l++]=255&n),o}function tripletToBase64(e){return lookup[e>>18&63]+lookup[e>>12&63]+lookup[e>>6&63]+lookup[63&e]}function encodeChunk(e,t,i){for(var r,n=[],a=t;a<i;a+=3)r=(e[a]<<16)+(e[a+1]<<8)+e[a+2],n.push(tripletToBase64(r));return n.join("")}function fromByteArray(e){var t;inited||init();for(var i=e.length,r=i%3,n="",a=[],o=16383,s=0,l=i-r;s<l;s+=o)a.push(encodeChunk(e,s,s+o>l?l:s+o));return 1===r?(t=e[i-1],n+=lookup[t>>2],n+=lookup[t<<4&63],n+="=="):2===r&&(t=(e[i-2]<<8)+e[i-1],n+=lookup[t>>10],n+=lookup[t>>4&63],n+=lookup[t<<2&63],n+="="),a.push(n),a.join("")}function read(e,t,i,r,n){var a,o,s=8*n-r-1,l=(1<<s)-1,u=l>>1,h=-7,c=i?n-1:0,f=i?-1:1,d=e[t+c];for(c+=f,a=d&(1<<-h)-1,d>>=-h,h+=s;h>0;a=256*a+e[t+c],c+=f,h-=8);for(o=a&(1<<-h)-1,a>>=-h,h+=r;h>0;o=256*o+e[t+c],c+=f,h-=8);if(0===a)a=1-u;else{if(a===l)return o?NaN:1/0*(d?-1:1);o+=Math.pow(2,r),a-=u}return(d?-1:1)*o*Math.pow(2,a-r)}function write(e,t,i,r,n,a){var o,s,l,u=8*a-n-1,h=(1<<u)-1,c=h>>1,f=23===n?Math.pow(2,-24)-Math.pow(2,-77):0,d=r?0:a-1,p=r?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,o=h):(o=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-o))<1&&(o--,l*=2),(t+=o+c>=1?f/l:f*Math.pow(2,1-c))*l>=2&&(o++,l/=2),o+c>=h?(s=0,o=h):o+c>=1?(s=(t*l-1)*Math.pow(2,n),o+=c):(s=t*Math.pow(2,c-1)*Math.pow(2,n),o=0));n>=8;e[i+d]=255&s,d+=p,s/=256,n-=8);for(o=o<<n|s,u+=n;u>0;e[i+d]=255&o,d+=p,o/=256,u-=8);e[i+d-p]|=128*m}var toString={}.toString,isArray=Array.isArray||function(e){return"[object Array]"==toString.call(e)},INSPECT_MAX_BYTES=50;function kMaxLength(){return Buffer.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function createBuffer(e,t){if(kMaxLength()<t)throw new RangeError("Invalid typed array length");return Buffer.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=Buffer.prototype:(null===e&&(e=new Buffer(t)),e.length=t),e}function Buffer(e,t,i){if(!(Buffer.TYPED_ARRAY_SUPPORT||this instanceof Buffer))return new Buffer(e,t,i);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return allocUnsafe(this,e)}return from(this,e,t,i)}function from(e,t,i,r){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?fromArrayBuffer(e,t,i,r):"string"==typeof t?fromString(e,t,i):fromObject(e,t)}function assertSize(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function alloc(e,t,i,r){return assertSize(t),t<=0?createBuffer(e,t):void 0!==i?"string"==typeof r?createBuffer(e,t).fill(i,r):createBuffer(e,t).fill(i):createBuffer(e,t)}function allocUnsafe(e,t){if(assertSize(t),e=createBuffer(e,t<0?0:0|checked(t)),!Buffer.TYPED_ARRAY_SUPPORT)for(var i=0;i<t;++i)e[i]=0;return e}function fromString(e,t,i){if("string"==typeof i&&""!==i||(i="utf8"),!Buffer.isEncoding(i))throw new TypeError('"encoding" must be a valid string encoding');var r=0|byteLength(t,i),n=(e=createBuffer(e,r)).write(t,i);returnLine truncated
|
||||
/*!
|
||||
* The buffer module from node.js, for the browser.
|
||||
*
|
||||
* @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
|
||||
* @license MIT
|
||||
*/function n(e,t){if(e===t)return 0;for(var i=e.length,r=t.length,n=0,a=Math.min(i,r);n<a;++n)if(e[n]!==t[n]){i=e[n],r=t[n];break}return i<r?-1:r<i?1:0}function a(e){return i.Buffer&&"function"==typeof i.Buffer.isBuffer?i.Buffer.isBuffer(e):!(null==e||!e._isBuffer)}var o=e("util/"),s=Object.prototype.hasOwnProperty,l=Array.prototype.slice,u="foo"===function(){}.name;function h(e){return Object.prototype.toString.call(e)}function c(e){return!a(e)&&"function"==typeof i.ArrayBuffer&&("function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(e):!!e&&(e instanceof DataView||!!(e.buffer&&e.buffer instanceof ArrayBuffer)))}var f=t.exports=y,d=/\s*function\s+([^\(\s]*)\s*/;function p(e){if(o.isFunction(e)){if(u)return e.name;var t=e.toString().match(d);return t&&t[1]}}function m(e,t){return"string"==typeof e?e.length<t?e:e.slice(0,t):e}function _(e){if(u||!o.isFunction(e))return o.inspect(e);var t=p(e);return"[Function"+(t?": "+t:"")+"]"}function g(e){return m(_(e.actual),128)+" "+e.operator+" "+m(_(e.expected),128)}function b(e,t,i,r,n){throw new f.AssertionError({message:i,actual:e,expected:t,operator:r,stackStartFunction:n})}function y(e,t){e||b(e,!0,t,"==",f.ok)}function w(e,t,i,r){if(e===t)return!0;if(a(e)&&a(t))return 0===n(e,t);if(o.isDate(e)&&o.isDate(t))return e.getTime()===t.getTime();if(o.isRegExp(e)&&o.isRegExp(t))return e.source===t.source&&e.global===t.global&&e.multiline===t.multiline&&e.lastIndex===t.lastIndex&&e.ignoreCase===t.ignoreCase;if(null!==e&&"object"==typeof e||null!==t&&"object"==typeof t){if(c(e)&&c(t)&&h(e)===h(t)&&!(e instanceof Float32Array||e instanceof Float64Array))return 0===n(new Uint8Array(e.buffer),new Uint8Array(t.buffer));if(a(e)!==a(t))return!1;var s=(r=r||{actual:[],expected:[]}).actual.indexOf(e);return-1!==s&&s===r.expected.indexOf(t)||(r.actual.push(e),r.expected.push(t),x(e,t,i,r))}return i?e===t:e==t}function v(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function x(e,t,i,r){if(null==e||null==t)return!1;if(o.isPrimitive(e)||o.isPrimitive(t))return e===t;if(i&&Object.getPrototypeOf(e)!==Object.getPrototypeOf(t))return!1;var n=v(e),a=v(t);if(n&&!a||!n&&a)return!1;if(n)return w(e=l.call(e),t=l.call(t),i);var s,u,h=M(e),c=M(t);if(h.length!==c.length)return!1;for(h.sort(),c.sort(),u=h.length-1;u>=0;u--)if(h[u]!==c[u])return!1;for(u=h.length-1;u>=0;u--)if(!w(e[s=h[u]],t[s],i,r))return!1;return!0}function E(e,t,i){w(e,t,!0)&&b(e,t,i,"notDeepStrictEqual",E)}function k(e,t){if(!e||!t)return!1;if("[object RegExp]"==Object.prototype.toString.call(t))return t.test(e);try{if(e instanceof t)return!0}catch(e){}return!Error.isPrototypeOf(t)&&!0===t.call({},e)}function S(e){var t;try{e()}catch(e){t=e}return t}function A(e,t,i,r){var n;if("function"!=typeof t)throw new TypeError('"block" argument must be a function');"string"==typeof i&&(r=i,i=null),n=S(t),r=(i&&i.name?" ("+i.name+").":".")+(r?" "+r:"."),e&&!n&&b(n,i,"Missing expected exception"+r);var a="string"==typeof r,s=!e&&n&&!i;if((!e&&o.isError(n)&&a&&k(n,i)||s)&&b(n,i,"Got unwanted exception"+r),e&&n&&i&&!k(n,i)||!e&&n)throw n}function I(e,t){e||b(e,!0,t,"==",I)}f.AssertionError=function(e){this.name="AssertionError",this.actual=e.actual,this.expected=e.expected,this.operator=e.operator,e.message?(this.message=e.message,this.generatedMessage=!1):(this.message=g(this),this.generatedMessage=!0);var t=e.stackStartFunction||b;if(Error.captureStackTrace)Error.captureStackTrace(this,t);else{var i=new Error;if(i.stack){var r=i.stack,n=p(t),a=r.indexOf("\n"+n);if(a>=0){var o=r.indexOf("\n",a+1);r=r.substring(o+1)}this.stack=r}}},o.inherits(f.AssertionError,Error),f.fail=b,f.ok=y,f.equal=function(e,t,i){e!=t&&b(e,t,i,"==",f.equal)},f.notEqual=function(e,t,i){e==t&&b(e,t,i,"!=",f.notEqual)},f.deepEqual=function(e,t,i){w(e,t,!1)||b(e,t,i,"deepEqual",f.deepEqual)},f.deepStrictEqual=function(e,t,i){w(e,t,!0)||b(e,t,i,"deepStrictEqual",f.deepStrictEqual)},f.notDeepEqual=function(e,t,i){w(e,t,!1)&&b(e,t,i,"notDeepEqual",f.notDeepEqual)},f.notDeepStrictEqual=E,f.strictEqual=function(e,t,i){e!==t&&b(e,t,i,"===",f.strictEqual)},f.notStrictEqual=function(e,t,i){e===t&&b(e,t,i,"!==",f.notStrictEqual)},f.throws=function(e,t,i){A(!0,e,t,i)},f.doesNotThrow=function(e,t,i){A(!1,e,t,i)},f.ifError=function(e){if(e)throw e},f.strict=r(I,f,{equal:f.strictEqual,deepEqual:f.deepStrictEqual,notEqual:f.notStrictEqual,notDeepEqual:f.notDeepStrictEqual}),f.strict.strict=f.strict;var M=Object.keys||function(e){var t=[];for(var i in e)s.call(e,i)&&t.push(i);return t}}).call(this)}).call(this,void 0!==commonjsGlobal?commonjsGlobal:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"object-assign":51,"util/":26}],24:[function(e,t,i){"function"==typeof Object.create?t.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(e,t){e.super_=t;var i=function(){};i.prototype=t.prototype,e.prototype=new i,e.prototype.constructor=e}}Line truncated
|
||||
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
||||
i.read=function(e,t,i,r,n){var a,o,s=8*n-r-1,l=(1<<s)-1,u=l>>1,h=-7,c=i?n-1:0,f=i?-1:1,d=e[t+c];for(c+=f,a=d&(1<<-h)-1,d>>=-h,h+=s;h>0;a=256*a+e[t+c],c+=f,h-=8);for(o=a&(1<<-h)-1,a>>=-h,h+=r;h>0;o=256*o+e[t+c],c+=f,h-=8);if(0===a)a=1-u;else{if(a===l)return o?NaN:1/0*(d?-1:1);o+=Math.pow(2,r),a-=u}return(d?-1:1)*o*Math.pow(2,a-r)},i.write=function(e,t,i,r,n,a){var o,s,l,u=8*a-n-1,h=(1<<u)-1,c=h>>1,f=23===n?Math.pow(2,-24)-Math.pow(2,-77):0,d=r?0:a-1,p=r?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,o=h):(o=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-o))<1&&(o--,l*=2),(t+=o+c>=1?f/l:f*Math.pow(2,1-c))*l>=2&&(o++,l/=2),o+c>=h?(s=0,o=h):o+c>=1?(s=(t*l-1)*Math.pow(2,n),o+=c):(s=t*Math.pow(2,c-1)*Math.pow(2,n),o=0));n>=8;e[i+d]=255&s,d+=p,s/=256,n-=8);for(o=o<<n|s,u+=n;u>0;e[i+d]=255&o,d+=p,o/=256,u-=8);e[i+d-p]|=128*m}},{}],46:[function(e,t,i){"function"==typeof Object.create?t.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(e,t){if(t){e.super_=t;var i=function(){};i.prototype=t.prototype,e.prototype=new i,e.prototype.constructor=e}}},{}],47:[function(e,t,i){var r=e("has-tostringtag/shams")(),n=e("call-bind/callBound")("Object.prototype.toString"),a=function(e){return!(r&&e&&"object"==typeof e&&Symbol.toStringTag in e)&&"[object Arguments]"===n(e)},o=function(e){return!!a(e)||null!==e&&"object"==typeof e&&"number"==typeof e.length&&e.length>=0&&"[object Array]"!==n(e)&&"[object Function]"===n(e.callee)},s=function(){return a(arguments)}();a.isLegacyArguments=o,t.exports=s?a:o},{"call-bind/callBound":33,"has-tostringtag/shams":43}],48:[function(e,t,i){var r,n,a=Function.prototype.toString,o="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof o&&"function"==typeof Object.defineProperty)try{r=Object.defineProperty({},"length",{get:function(){throw n}}),n={},o((function(){throw 42}),null,r)}catch(e){e!==n&&(o=null)}else o=null;var s=/^\s*class\b/,l=function(e){try{var t=a.call(e);return s.test(t)}catch(e){return!1}},u=function(e){try{return!l(e)&&(a.call(e),!0)}catch(e){return!1}},h=Object.prototype.toString,c="[object Object]",f="[object Function]",d="[object GeneratorFunction]",p="[object HTMLAllCollection]",m="[object HTML document.all class]",_="[object HTMLCollection]",g="function"==typeof Symbol&&!!Symbol.toStringTag,b=!(0 in[,]),y=function(){return!1};if("object"==typeof document){var w=document.all;h.call(w)===h.call(document.all)&&(y=function(e){if((b||!e)&&(void 0===e||"object"==typeof e))try{var t=h.call(e);return(t===p||t===m||t===_||t===c)&&null==e("")}catch(e){}return!1})}t.exports=o?function(e){if(y(e))return!0;if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;try{o(e,null,r)}catch(e){if(e!==n)return!1}return!l(e)&&u(e)}:function(e){if(y(e))return!0;if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;if(g)return u(e);if(l(e))return!1;var t=h.call(e);return!(t!==f&&t!==d&&!/^\[object HTML/.test(t))&&u(e)}},{}],49:[function(e,t,i){var r,n=Object.prototype.toString,a=Function.prototype.toString,o=/^\s*(?:function)?\*/,s=e("has-tostringtag/shams")(),l=Object.getPrototypeOf,u=function(){if(!s)return!1;try{return Function("return function*() {}")()}catch(e){}};t.exports=function(e){if("function"!=typeof e)return!1;if(o.test(a.call(e)))return!0;if(!s)return"[object GeneratorFunction]"===n.call(e);if(!l)return!1;if(void 0===r){var t=u();r=!!t&&l(t)}return l(e)===r}},{"has-tostringtag/shams":43}],50:[function(e,t,i){(function(i){(function(){var r=e("for-each"),n=e("available-typed-arrays"),a=e("call-bind/callBound"),o=a("Object.prototype.toString"),s=e("has-tostringtag/shams")(),l=e("gopd"),u="undefined"==typeof globalThis?i:globalThis,h=n(),c=a("Array.prototype.indexOf",!0)||function(e,t){for(var i=0;i<e.length;i+=1)if(e[i]===t)return i;return-1},f=a("String.prototype.slice"),d={},p=Object.getPrototypeOf;s&&l&&p&&r(h,(function(e){var t=new u[e];if(Symbol.toStringTag in t){var i=p(t),r=l(i,Symbol.toStringTag);if(!r){var n=p(i);r=l(n,Symbol.toStringTag)}d[e]=r.get}}));var m=function(e){var t=!1;return r(d,(function(i,r){if(!t)try{t=i.call(e)===r}catch(e){}})),t};t.exports=function(e){if(!e||"object"!=typeof e)return!1;if(!s||!(Symbol.toStringTag in e)){var t=f(o(e),8,-1);return c(h,t)>-1}return!!l&&m(e)}}).call(this)}).call(this,void 0!==commonjsGlobal?commonjsGlobal:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"available-typed-arrays":27,"call-bind/callBound":33,"for-each":36,gopd:40,"has-tostringtag/shams":43}],51:[function(e,t,i){var r=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;function o(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function s(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0]Line truncated
|
||||
/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
||||
var r=e("buffer"),n=r.Buffer;function a(e,t){for(var i in e)t[i]=e[i]}function o(e,t,i){return n(e,t,i)}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?t.exports=r:(a(r,i),i.Buffer=o),o.prototype=Object.create(n.prototype),a(n,o),o.from=function(e,t,i){if("number"==typeof e)throw new TypeError("Argument must not be a number");return n(e,t,i)},o.alloc=function(e,t,i){if("number"!=typeof e)throw new TypeError("Argument must be a number");var r=n(e);return void 0!==t?"string"==typeof i?r.fill(t,i):r.fill(t):r.fill(0),r},o.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n(e)},o.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}},{buffer:32}],65:[function(e,t,i){t.exports=n;var r=e("events").EventEmitter;function n(){r.call(this)}e("inherits")(n,r),n.Readable=e("readable-stream/lib/_stream_readable.js"),n.Writable=e("readable-stream/lib/_stream_writable.js"),n.Duplex=e("readable-stream/lib/_stream_duplex.js"),n.Transform=e("readable-stream/lib/_stream_transform.js"),n.PassThrough=e("readable-stream/lib/_stream_passthrough.js"),n.finished=e("readable-stream/lib/internal/streams/end-of-stream.js"),n.pipeline=e("readable-stream/lib/internal/streams/pipeline.js"),n.Stream=n,n.prototype.pipe=function(e,t){var i=this;function n(t){e.writable&&!1===e.write(t)&&i.pause&&i.pause()}function a(){i.readable&&i.resume&&i.resume()}i.on("data",n),e.on("drain",a),e._isStdio||t&&!1===t.end||(i.on("end",s),i.on("close",l));var o=!1;function s(){o||(o=!0,e.end())}function l(){o||(o=!0,"function"==typeof e.destroy&&e.destroy())}function u(e){if(h(),0===r.listenerCount(this,"error"))throw e}function h(){i.removeListener("data",n),e.removeListener("drain",a),i.removeListener("end",s),i.removeListener("close",l),i.removeListener("error",u),e.removeListener("error",u),i.removeListener("end",h),i.removeListener("close",h),e.removeListener("close",h)}return i.on("error",u),e.on("error",u),i.on("end",h),i.on("close",h),e.on("close",h),e.emit("pipe",i),e}},{events:35,inherits:46,"readable-stream/lib/_stream_duplex.js":67,"readable-stream/lib/_stream_passthrough.js":68,"readable-stream/lib/_stream_readable.js":69,"readable-stream/lib/_stream_transform.js":70,"readable-stream/lib/_stream_writable.js":71,"readable-stream/lib/internal/streams/end-of-stream.js":75,"readable-stream/lib/internal/streams/pipeline.js":77}],66:[function(e,t,i){function r(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}var n={};function a(e,t,i){function a(e,i,r){return"string"==typeof t?t:t(e,i,r)}i||(i=Error);var o=function(e){function t(t,i,r){return e.call(this,a(t,i,r))||this}return r(t,e),t}(i);o.prototype.name=i.name,o.prototype.code=e,n[e]=o}function o(e,t){if(Array.isArray(e)){var i=e.length;return e=e.map((function(e){return String(e)})),i>2?"one of ".concat(t," ").concat(e.slice(0,i-1).join(", "),", or ")+e[i-1]:2===i?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}function s(e,t,i){return e.substr(0,t.length)===t}function l(e,t,i){return(void 0===i||i>e.length)&&(i=e.length),e.substring(i-t.length,i)===t}function u(e,t,i){return"number"!=typeof i&&(i=0),!(i+t.length>e.length)&&-1!==e.indexOf(t,i)}a("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError),a("ERR_INVALID_ARG_TYPE",(function(e,t,i){var r,n;if("string"==typeof t&&s(t,"not ")?(r="must not be",t=t.replace(/^not /,"")):r="must be",l(e," argument"))n="The ".concat(e," ").concat(r," ").concat(o(t,"type"));else{var a=u(e,".")?"property":"argument";n='The "'.concat(e,'" ').concat(a," ").concat(r," ").concat(o(t,"type"))}return n+=". Received type ".concat(typeof i)}),TypeError),a("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),a("ERR_METHOD_NOT_IMPLEMENTED",(function(e){return"The "+e+" method is not implemented"})),a("ERR_STREAM_PREMATURE_CLOSE","Premature close"),a("ERR_STREAM_DESTROYED",(function(e){return"Cannot call "+e+" after a stream was destroyed"})),a("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),a("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),a("ERR_STREAM_WRITE_AFTER_END","write after end"),a("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),a("ERR_UNKNOWN_ENCODING",(function(e){return"Unknown encoding: "+e}),TypeError),a("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),t.exports.codes=n},{}],67:[function(e,t,i){(function(i){(function(){var r=Object.keys||function(e){var t=[];for(var i in e)t.push(i);return t};t.exports=u;var n=e("./_stream_readable"),a=e("./_stream_writable");e("inherits")(u,n);for(var o=r(a.prototype),s=0;s<o.length;s++){var l=o[s];u.prototype[l]||(u.prototype[l]=a.prototype[l])}function u(e){if(!(this instanceof u))return new u(e);n.call(this,e),a.call(this,e),this.allowHalfOpen=!0,e&&(!1===e.readaLine truncated
|
||||
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
||||
read:function(e,t,i,r,n){var a,o,s=8*n-r-1,l=(1<<s)-1,u=l>>1,h=-7,c=i?n-1:0,f=i?-1:1,d=e[t+c];for(c+=f,a=d&(1<<-h)-1,d>>=-h,h+=s;h>0;a=256*a+e[t+c],c+=f,h-=8);for(o=a&(1<<-h)-1,a>>=-h,h+=r;h>0;o=256*o+e[t+c],c+=f,h-=8);if(0===a)a=1-u;else{if(a===l)return o?NaN:1/0*(d?-1:1);o+=Math.pow(2,r),a-=u}return(d?-1:1)*o*Math.pow(2,a-r)},write:function(e,t,i,r,n,a){var o,s,l,u=8*a-n-1,h=(1<<u)-1,c=h>>1,f=23===n?Math.pow(2,-24)-Math.pow(2,-77):0,d=r?0:a-1,p=r?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,o=h):(o=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-o))<1&&(o--,l*=2),(t+=o+c>=1?f/l:f*Math.pow(2,1-c))*l>=2&&(o++,l/=2),o+c>=h?(s=0,o=h):o+c>=1?(s=(t*l-1)*Math.pow(2,n),o+=c):(s=t*Math.pow(2,c-1)*Math.pow(2,n),o=0));n>=8;e[i+d]=255&s,d+=p,s/=256,n-=8);for(o=o<<n|s,u+=n;u>0;e[i+d]=255&o,d+=p,o/=256,u-=8);e[i+d-p]|=128*m}};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.AnsiStringType=e.StringType=e.BufferType=e.Uint8ArrayType=e.IgnoreType=e.Float80_LE=e.Float80_BE=e.Float64_LE=e.Float64_BE=e.Float32_LE=e.Float32_BE=e.Float16_LE=e.Float16_BE=e.INT64_BE=e.UINT64_BE=e.INT64_LE=e.UINT64_LE=e.INT32_LE=e.INT32_BE=e.INT24_BE=e.INT24_LE=e.INT16_LE=e.INT16_BE=e.INT8=e.UINT32_BE=e.UINT32_LE=e.UINT24_BE=e.UINT24_LE=e.UINT16_BE=e.UINT16_LE=e.UINT8=void 0;const t=ieee754;function i(e){return new DataView(e.buffer,e.byteOffset)}e.UINT8={len:1,get:(e,t)=>i(e).getUint8(t),put:(e,t,r)=>(i(e).setUint8(t,r),t+1)},e.UINT16_LE={len:2,get:(e,t)=>i(e).getUint16(t,!0),put:(e,t,r)=>(i(e).setUint16(t,r,!0),t+2)},e.UINT16_BE={len:2,get:(e,t)=>i(e).getUint16(t),put:(e,t,r)=>(i(e).setUint16(t,r),t+2)},e.UINT24_LE={len:3,get(e,t){const r=i(e);return r.getUint8(t)+(r.getUint16(t+1,!0)<<8)},put(e,t,r){const n=i(e);return n.setUint8(t,255&r),n.setUint16(t+1,r>>8,!0),t+3}},e.UINT24_BE={len:3,get(e,t){const r=i(e);return(r.getUint16(t)<<8)+r.getUint8(t+2)},put(e,t,r){const n=i(e);return n.setUint16(t,r>>8),n.setUint8(t+2,255&r),t+3}},e.UINT32_LE={len:4,get:(e,t)=>i(e).getUint32(t,!0),put:(e,t,r)=>(i(e).setUint32(t,r,!0),t+4)},e.UINT32_BE={len:4,get:(e,t)=>i(e).getUint32(t),put:(e,t,r)=>(i(e).setUint32(t,r),t+4)},e.INT8={len:1,get:(e,t)=>i(e).getInt8(t),put:(e,t,r)=>(i(e).setInt8(t,r),t+1)},e.INT16_BE={len:2,get:(e,t)=>i(e).getInt16(t),put:(e,t,r)=>(i(e).setInt16(t,r),t+2)},e.INT16_LE={len:2,get:(e,t)=>i(e).getInt16(t,!0),put:(e,t,r)=>(i(e).setInt16(t,r,!0),t+2)},e.INT24_LE={len:3,get(t,i){const r=e.UINT24_LE.get(t,i);return r>8388607?r-16777216:r},put(e,t,r){const n=i(e);return n.setUint8(t,255&r),n.setUint16(t+1,r>>8,!0),t+3}},e.INT24_BE={len:3,get(t,i){const r=e.UINT24_BE.get(t,i);return r>8388607?r-16777216:r},put(e,t,r){const n=i(e);return n.setUint16(t,r>>8),n.setUint8(t+2,255&r),t+3}},e.INT32_BE={len:4,get:(e,t)=>i(e).getInt32(t),put:(e,t,r)=>(i(e).setInt32(t,r),t+4)},e.INT32_LE={len:4,get:(e,t)=>i(e).getInt32(t,!0),put:(e,t,r)=>(i(e).setInt32(t,r,!0),t+4)},e.UINT64_LE={len:8,get:(e,t)=>i(e).getBigUint64(t,!0),put:(e,t,r)=>(i(e).setBigUint64(t,r,!0),t+8)},e.INT64_LE={len:8,get:(e,t)=>i(e).getBigInt64(t,!0),put:(e,t,r)=>(i(e).setBigInt64(t,r,!0),t+8)},e.UINT64_BE={len:8,get:(e,t)=>i(e).getBigUint64(t),put:(e,t,r)=>(i(e).setBigUint64(t,r),t+8)},e.INT64_BE={len:8,get:(e,t)=>i(e).getBigInt64(t),put:(e,t,r)=>(i(e).setBigInt64(t,r),t+8)},e.Float16_BE={len:2,get(e,i){return t.read(e,i,!1,10,this.len)},put(e,i,r){return t.write(e,r,i,!1,10,this.len),i+this.len}},e.Float16_LE={len:2,get(e,i){return t.read(e,i,!0,10,this.len)},put(e,i,r){return t.write(e,r,i,!0,10,this.len),i+this.len}},e.Float32_BE={len:4,get:(e,t)=>i(e).getFloat32(t),put:(e,t,r)=>(i(e).setFloat32(t,r),t+4)},e.Float32_LE={len:4,get:(e,t)=>i(e).getFloat32(t,!0),put:(e,t,r)=>(i(e).setFloat32(t,r,!0),t+4)},e.Float64_BE={len:8,get:(e,t)=>i(e).getFloat64(t),put:(e,t,r)=>(i(e).setFloat64(t,r),t+8)},e.Float64_LE={len:8,get:(e,t)=>i(e).getFloat64(t,!0),put:(e,t,r)=>(i(e).setFloat64(t,r,!0),t+8)},e.Float80_BE={len:10,get(e,i){return t.read(e,i,!1,63,this.len)},put(e,i,r){return t.write(e,r,i,!1,63,this.len),i+this.len}},e.Float80_LE={len:10,get(e,i){return t.read(e,i,!0,63,this.len)},put(e,i,r){return t.write(e,r,i,!0,63,this.len),i+this.len}};e.IgnoreType=class{constructor(e){this.len=e}get(e,t){}};e.Uint8ArrayType=class{constructor(e){this.len=e}get(e,t){return e.subarray(t,t+this.len)}};e.BufferType=class{constructor(e){this.len=e}get(e,t){return Buffer.from(e.subarray(t,t+this.len))}};e.StringType=class{constructor(e,t){this.len=e,this.encoding=t}get(e,t){return Buffer.from(e).toString(this.encoding,t,t+this.len)}};class r{constructor(e){this.len=e}static decode(e,t,i){let n="";for(let a=t;a<i;++a)n+=r.codePointToString(r.singleByteDecoder(e[a]));return n}static inRange(e,t,i){return t<=e&&e<=i}static codePointToString(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(55296+(e>>10),56320+(1023&e)))}static singleByteDecoder(e){if(r.inRange(e,0,127))return e;const t=r.windows1252[e-128];if(null===t)throw Error("invalLine truncated
|
||||
/**
|
||||
* @preserve
|
||||
* Copyright 2015-2018 Igor Bezkrovnyi
|
||||
* All rights reserved. (MIT Licensed)
|
||||
*
|
||||
* cie94.ts - part of Image Quantization Library
|
||||
*/
|
||||
/**
|
||||
* @preserve
|
||||
* Copyright 2015-2018 Igor Bezkrovnyi
|
||||
* All rights reserved. (MIT Licensed)
|
||||
*
|
||||
* ciede2000.ts - part of Image Quantization Library
|
||||
*/
|
||||
/**
|
||||
* @preserve
|
||||
* Copyright 2015-2018 Igor Bezkrovnyi
|
||||
* All rights reserved. (MIT Licensed)
|
||||
*
|
||||
* cmetric.ts - part of Image Quantization Library
|
||||
*/
|
||||
/**
|
||||
* @preserve
|
||||
* Copyright 2015-2018 Igor Bezkrovnyi
|
||||
* All rights reserved. (MIT Licensed)
|
||||
*
|
||||
* common.ts - part of Image Quantization Library
|
||||
*/
|
||||
/**
|
||||
* @preserve
|
||||
* Copyright 2015-2018 Igor Bezkrovnyi
|
||||
* All rights reserved. (MIT Licensed)
|
||||
*
|
||||
* constants.ts - part of Image Quantization Library
|
||||
*/
|
||||
/**
|
||||
* @preserve
|
||||
* Copyright 2015-2018 Igor Bezkrovnyi
|
||||
* All rights reserved. (MIT Licensed)
|
||||
*
|
||||
* ditherErrorDiffusionArray.ts - part of Image Quantization Library
|
||||
*/
|
||||
/**
|
||||
* @preserve
|
||||
* Copyright 2015-2018 Igor Bezkrovnyi
|
||||
* All rights reserved. (MIT Licensed)
|
||||
*
|
||||
* euclidean.ts - part of Image Quantization Library
|
||||
*/
|
||||
/**
|
||||
* @preserve
|
||||
* Copyright 2015-2018 Igor Bezkrovnyi
|
||||
* All rights reserved. (MIT Licensed)
|
||||
*
|
||||
* helper.ts - part of Image Quantization Library
|
||||
*/
|
||||
/**
|
||||
* @preserve
|
||||
* Copyright 2015-2018 Igor Bezkrovnyi
|
||||
* All rights reserved. (MIT Licensed)
|
||||
*
|
||||
* hueStatistics.ts - part of Image Quantization Library
|
||||
*/
|
||||
/**
|
||||
* @preserve
|
||||
* Copyright 2015-2018 Igor Bezkrovnyi
|
||||
* All rights reserved. (MIT Licensed)
|
||||
*
|
||||
* iq.ts - Image Quantization Library
|
||||
*/
|
||||
/**
|
||||
* @preserve
|
||||
* Copyright 2015-2018 Igor Bezkrovnyi
|
||||
* All rights reserved. (MIT Licensed)
|
||||
*
|
||||
* lab2rgb.ts - part of Image Quantization Library
|
||||
*/
|
||||
/**
|
||||
* @preserve
|
||||
* Copyright 2015-2018 Igor Bezkrovnyi
|
||||
* All rights reserved. (MIT Licensed)
|
||||
*
|
||||
* lab2xyz.ts - part of Image Quantization Library
|
||||
*/
|
||||
/**
|
||||
* @preserve
|
||||
* Copyright 2015-2018 Igor Bezkrovnyi
|
||||
* All rights reserved. (MIT Licensed)
|
||||
*
|
||||
* manhattanNeuQuant.ts - part of Image Quantization Library
|
||||
*/
|
||||
/**
|
||||
* @preserve
|
||||
* Copyright 2015-2018 Igor Bezkrovnyi
|
||||
* All rights reserved. (MIT Licensed)
|
||||
*
|
||||
* nearestColor.ts - part of Image Quantization Library
|
||||
*/
|
||||
/**
|
||||
* @preserve
|
||||
* Copyright 2015-2018 Igor Bezkrovnyi
|
||||
* All rights reserved. (MIT Licensed)
|
||||
*
|
||||
* palette.ts - part of Image Quantization Library
|
||||
*/
|
||||
/**
|
||||
* @preserve
|
||||
* Copyright 2015-2018 Igor Bezkrovnyi
|
||||
* All rights reserved. (MIT Licensed)
|
||||
*
|
||||
* pngQuant.ts - part of Image Quantization Library
|
||||
*/
|
||||
/**
|
||||
* @preserve
|
||||
* Copyright 2015-2018 Igor Bezkrovnyi
|
||||
* All rights reserved. (MIT Licensed)
|
||||
*
|
||||
* point.ts - part of Image Quantization Library
|
||||
*/
|
||||
/**
|
||||
* @preserve
|
||||
* Copyright 2015-2018 Igor Bezkrovnyi
|
||||
* All rights reserved. (MIT Licensed)
|
||||
*
|
||||
* pointContainer.ts - part of Image Quantization Library
|
||||
*/
|
||||
/**
|
||||
* @preserve
|
||||
* Copyright 2015-2018 Igor Bezkrovnyi
|
||||
* All rights reserved. (MIT Licensed)
|
||||
*
|
||||
* rgb2hsl.ts - part of Image Quantization Library
|
||||
*/
|
||||
/**
|
||||
* @preserve
|
||||
* Copyright 2015-2018 Igor Bezkrovnyi
|
||||
* All rights reserved. (MIT Licensed)
|
||||
*
|
||||
* rgb2lab.ts - part of Image Quantization Library
|
||||
*/
|
||||
/**
|
||||
* @preserve
|
||||
* Copyright 2015-2018 Igor Bezkrovnyi
|
||||
* All rights reserved. (MIT Licensed)
|
||||
*
|
||||
* rgb2xyz.ts - part of Image Quantization Library
|
||||
*/
|
||||
/**
|
||||
* @preserve
|
||||
* Copyright 2015-2018 Igor Bezkrovnyi
|
||||
* All rights reserved. (MIT Licensed)
|
||||
*
|
||||
* ssim.ts - part of Image Quantization Library
|
||||
*/
|
||||
/**
|
||||
* @preserve
|
||||
* Copyright 2015-2018 Igor Bezkrovnyi
|
||||
* All rights reserved. (MIT Licensed)
|
||||
*
|
||||
* wuQuant.ts - part of Image Quantization Library
|
||||
*/
|
||||
/**
|
||||
* @preserve
|
||||
* Copyright 2015-2018 Igor Bezkrovnyi
|
||||
* All rights reserved. (MIT Licensed)
|
||||
*
|
||||
* xyz2lab.ts - part of Image Quantization Library
|
||||
*/
|
||||
/**
|
||||
* @preserve
|
||||
* Copyright 2015-2018 Igor Bezkrovnyi
|
||||
* All rights reserved. (MIT Licensed)
|
||||
*
|
||||
* xyz2rgb.ts - part of Image Quantization Library
|
||||
*/
|
||||
/**
|
||||
* @preserve
|
||||
* MIT License
|
||||
*
|
||||
* Copyright 2015-2018 Igor Bezkrovnyi
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to
|
||||
* deal in the Software without restriction, including without limitation the
|
||||
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
* sell copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
* IN THE SOFTWARE.
|
||||
*
|
||||
* riemersma.ts - part of Image Quantization Library
|
||||
*/
|
||||
/**
|
||||
* @preserve TypeScript port:
|
||||
* Copyright 2015-2018 Igor Bezkrovnyi
|
||||
* All rights reserved. (MIT Licensed)
|
||||
*
|
||||
* colorHistogram.ts - part of Image Quantization Library
|
||||
*/
|
||||
/**
|
||||
* @preserve TypeScript port:
|
||||
* Copyright 2015-2018 Igor Bezkrovnyi
|
||||
* All rights reserved. (MIT Licensed)
|
||||
*
|
||||
* neuquant.ts - part of Image Quantization Library
|
||||
*/
|
||||
/**
|
||||
* @preserve TypeScript port:
|
||||
* Copyright 2015-2018 Igor Bezkrovnyi
|
||||
* All rights reserved. (MIT Licensed)
|
||||
*
|
||||
* rgbquant.ts - part of Image Quantization Library
|
||||
*/"function"==typeof setImmediate?setImmediate:"undefined"!=typeof process&&(null==process||process.nextTick);const QuantizeOptionsSchema=z.object({colors:z.number().optional(),colorDistanceFormula:z.union([z.literal("cie94-textiles"),z.literal("cie94-graphic-arts"),z.literal("ciede2000"),z.literal("color-metric"),z.literal("euclidean"),z.literal("euclidean-bt709-noalpha"),z.literal("euclidean-bt709"),z.literal("manhattan"),z.literal("manhattan-bt709"),z.literal("manhattan-nommyde"),z.literal("pngquant")]).optional(),paletteQuantization:z.union([z.literal("neuquant"),z.literal("neuquant-float"),z.literal("rgbquant"),z.literal("wuquant")]).optional(),imageQuantization:z.union([z.literal("nearest"),z.literal("riemersma"),z.literal("floyd-steinberg"),z.literal("false-floyd-steinberg"),z.literal("stucki"),z.literal("atkinson"),z.literal("jarvis"),z.literal("burkes"),z.literal("sierra"),z.literal("two-sierra"),z.literal("sierra-lite")]).optional()}),methods={quantize(e,t){const{colors:i,colorDistanceFormula:r,paletteQuantization:n,imageQuantization:a}=QuantizeOptionsSchema.parse(t),o=utils_exports.PointContainer.fromUint8Array(e.bitmap.data,e.bitmap.width,e.bitmap.height),s=applyPaletteSync(o,buildPaletteSync([o],{colors:i,colorDistanceFormula:r,paletteQuantization:n}),{colorDistanceFormula:r,imageQuantization:a});return e.bitmap.data=Buffer.from(s.toUint8Array()),e}};var parseBmfontAscii=function(e){if(!e)throw new Error("no data provided");var t={pages:[],chars:[],kernings:[]},i=(e=e.toString().trim()).split(/\r\n?|\n/g);if(0===i.length)throw new Error("no data in BMFont file");for(var r=0;r<i.length;r++){var n=splitLine(i[r],r);if(n)if("page"===n.key){if("number"!=typeof n.data.id)throw new Error("malformed file at line "+r+" -- needs page id=N");if("string"!=typeof n.data.file)throw new Error("malformed file at line "+r+' -- needs page file="path"');t.pages[n.data.id]=n.data.file}else"chars"===n.key||"kernings"===n.key||("char"===n.key?t.chars.push(n.data):"kerning"===n.key?t.kernings.push(n.data):t[n.key]=n.data)}return t};function splitLine(e,t){if(!(e=e.replace(/\t+/g," ").trim()))return null;var i=e.indexOf(" ");if(-1===i)throw new Error("no named row at line "+t);var r=e.substring(0,i);e=(e=(e=(e=e.substring(i+1)).replace(/letter=[\'\"]\S+[\'\"]/gi,"")).split("=")).map((function(e){return e.trim().match(/(".*?"|[^"\s]+)+(?=\s*|\s*$)/g)}));for(var n=[],a=0;a<e.length;a++){var o=e[a];0===a?n.push({key:o[0],data:""}):a===e.length-1?n[n.length-1].data=parseData(o[0]):(n[n.length-1].data=parseData(o[0]),n.push({key:o[1],data:""}))}var s={key:r,data:{}};return n.forEach((function(e){s.data[e.key]=e.data})),s}function parseData(e){return e&&0!==e.length?0===e.indexOf('"')||0===e.indexOf("'")?e.substring(1,e.length-1):-1!==e.indexOf(",")?parseIntList$1(e):parseInt(e,10):""}function parseIntList$1(e){return e.split(",").map((function(e){return parseInt(e,10)}))}var parseASCII=getDefaultExportFromCjs(parseBmfontAscii),GLYPH_DESIGNER_ERROR="chasrset",parseAttribs=function(e){for(var t in e=Object.assign({},e),GLYPH_DESIGNER_ERROR in e&&(e.charset=e[GLYPH_DESIGNER_ERROR],delete e[GLYPH_DESIGNER_ERROR]),e)"face"!==t&&"charset"!==t&&(e[t]="padding"===t||"spacing"===t?parseIntList(e[t]):parseInt(e[t],10));return e};function parseIntList(e){return e.split(",").map((function(e){return parseInt(e,10)}))}var xmlParseFromString=void 0!==self.DOMParser?function(e){return(new self.DOMParser).parseFromString(e,"application/xml")}:void 0!==self.ActiveXObject&&new self.ActiveXObject("Microsoft.XMLDOM")?function(e){var t=new self.ActiveXObject("Microsoft.XMLDOM");return t.async="false",t.loadXML(e),t}:function(e){var t=document.createElement("div");return t.innerHTML=e,t},parseAttributes=parseAttribs,parseFromString=xmlParseFromString,NAME_MAP={scaleh:"scaleH",scalew:"scaleW",stretchh:"stretchH",lineheight:"lineHeight",alphachnl:"alphaChnl",redchnl:"redChnl",greenchnl:"greenChnl",bluechnl:"blueChnl"},browser=function(e){e=e.toString();var t=parseFromString(e),i={pages:[],chars:[],kernings:[]};["info","common"].forEach((function(e){var r=t.getElementsByTagName(e)[0];r&&(i[e]=parseAttributes(getAttribs(r)))}));var r=t.getElementsByTagName("pages")[0];if(!r)throw new Error("malformed file -- no <pages> element");for(var n=r.getElementsByTagName("page"),a=0;a<n.length;a++){var o=n[a],s=parseInt(o.getAttribute("id"),10),l=o.getAttribute("file");if(isNaN(s))throw new Error('malformed file -- page "id" attribute is NaN');if(!l)throw new Error('malformed file -- needs page "file" attribute');i.pages[parseInt(s,10)]=l}return["chars","kernings"].forEach((function(e){var r=t.getElementsByTagName(e)[0];if(r)for(var n=e.substring(0,e.length-1),a=r.getElementsByTagName(n),o=0;o<a.length;o++){var s=a[o];i[e].push(parseAttributes(getAttribs(s)))}})),i};function getAttribs(e){return getAttribList(e).reduce((function(e,t){return e[mapName(t.nodeName)]=t.nodeValue,e}),{})}function getAttribList(e){for(var t=[],i=0;i<e.attributes.length;i++)t.pusLine truncated
|
||||
//# sourceMappingURL=index.js.map
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.js","sources":["../../../../node_modules/.pnpm/node-self@1.0.2/node_modules/node-self/index.js","../../../../node_modules/.pnpm/bmp-ts@1.0.9/node_modules/bmp-ts/dist/esm/header-types.js","../../../../node_modules/.pnpm/bmp-ts@1.0.9/node_modules/bmp-ts/dist/esm/types.js","../../../../node_modules/.pnpm/bmp-ts@1.0.9/node_modules/bmp-ts/dist/esm/mask-color.js","../../../../node_modules/.pnpm/bmp-ts@1.0.9/node_modules/bmp-ts/dist/esm/decoder.js","../../../../node_modules/.pnpm/bmp-ts@1.0.9/node_modules/bmp-ts/dist/esm/encoder.js","../../../../node_modules/.pnpm/bmp-ts@1.0.9/node_modules/bmp-ts/dist/esm/index.js","../../../../node_modules/.pnpm/tinycolor2@1.6.0/node_modules/tinycolor2/esm/tinycolor.js","../../../utils/dist/esm/index.js","../../../../plugins/js-bmp/dist/esm/index.js","../../../../node_modules/.pnpm/omggif@1.0.10/node_modules/omggif/omggif.js","../../../../node_modules/.pnpm/gifwrap@0.10.1/node_modules/gifwrap/src/bitmapimage.js","../../../../node_modules/.pnpm/gifwrap@0.10.1/node_modules/gifwrap/src/gif.js","../../../../node_modules/.pnpm/image-q@4.0.0/node_modules/image-q/dist/cjs/image-q.cjs","../../../../node_modules/.pnpm/gifwrap@0.10.1/node_modules/gifwrap/src/gifframe.js","../../../../node_modules/.pnpm/gifwrap@0.10.1/node_modules/gifwrap/src/gifutil.js","../../../../node_modules/.pnpm/gifwrap@0.10.1/node_modules/gifwrap/src/gifcodec.js","../../../../node_modules/.pnpm/gifwrap@0.10.1/node_modules/gifwrap/src/index.js","../../../../plugins/js-gif/dist/esm/index.js","../../../../node_modules/.pnpm/jpeg-js@0.4.4/node_modules/jpeg-js/lib/encoder.js","../../../../node_modules/.pnpm/jpeg-js@0.4.4/node_modules/jpeg-js/lib/decoder.js","../../../../node_modules/.pnpm/jpeg-js@0.4.4/node_modules/jpeg-js/index.js","../../../../plugins/js-jpeg/dist/esm/index.js","../../../../node_modules/.pnpm/pngjs@7.0.0/node_modules/pngjs/browser.js","../../../../plugins/js-png/dist/esm/constants.js","../../../../plugins/js-png/dist/esm/index.js","../../../../node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/utils/common.js","../../../../node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/zlib/trees.js","../../../../node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/zlib/adler32.js","../../../../node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/zlib/crc32.js","../../../../node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/zlib/messages.js","../../../../node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/zlib/deflate.js","../../../../node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/utils/strings.js","../../../../node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/zlib/zstream.js","../../../../node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/deflate.js","../../../../node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/zlib/inffast.js","../../../../node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/zlib/inftrees.js","../../../../node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/zlib/inflate.js","../../../../node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/zlib/constants.js","../../../../node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/zlib/gzheader.js","../../../../node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/inflate.js","../../../../node_modules/.pnpm/pako@1.0.11/node_modules/pako/index.js","../../../../node_modules/.pnpm/utif2@4.1.0/node_modules/utif2/UTIF.js","../../../../node_modules/.pnpm/zod@3.23.8/node_modules/zod/lib/index.mjs","../../../../plugins/js-tiff/dist/esm/index.js","../../../types/dist/esm/index.js","../../../../plugins/plugin-blit/dist/esm/index.js","../../../../plugins/plugin-blur/dist/esm/blur-tables.js","../../../../plugins/plugin-blur/dist/esm/index.js","../../../../plugins/plugin-circle/dist/esm/index.js","../../../../plugins/plugin-color/dist/esm/index.js","../../../../node_modules/.pnpm/ieee754@1.2.1/node_modules/ieee754/index.js","../../../../node_modules/.pnpm/token-types@4.2.1/node_modules/token-types/lib/index.js","../../../../node_modules/.pnpm/peek-readable@4.1.0/node_modules/peek-readable/lib/EndOfFileStream.js","../../../../node_modules/.pnpm/peek-readable@4.1.0/node_modules/peek-readable/lib/Deferred.js","../../../../node_modules/.pnpm/peek-readable@4.1.0/node_modules/peek-readable/lib/StreamReader.js","../../../../node_modules/.pnpm/peek-readable@4.1.0/node_modules/peek-readable/lib/index.js","../../../../node_modules/.pnpm/strtok3@6.3.0/node_modules/strtok3/lib/AbstractTokenizer.js","../../../../node_modules/.pnpm/strtok3@6.3.0/node_modules/strtok3/lib/ReadStreamTokenizer.js","../../../../node_modules/.pnpm/strtok3@6.3.0/node_modules/strtok3/lib/BufferTokenizer.js","../../../../node_modules/.pnpm/strtok3@6.3.0/node_modules/strtok3/lib/core.js","../../../../node_modules/.pnpm/file-type@16.5.4/node_modules/file-type/util.js","../../../../node_modules/.pnpm/file-type@16.5.4/node_modules/file-type/supported.js","../../../../node_modules/.pnpm/file-type@16.5.4/node_modules/file-type/core.js","../../../../node_modules/.pnLine truncated
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"type": "module"
|
||||
}
|
||||
Reference in new issue
Block a user