1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2495],{52901:function(t,r,o){var n;n=function(){var t;return(function t(r,o,n){function s(a,l){if(!o[a]){if(!r[a]){var u=void 0;if(!l&&u)return require(a,!0);if(i)return i(a,!0);throw(l=Error("Cannot find module '"+a+"'")).code="MODULE_NOT_FOUND",l}u=o[a]={exports:{}},r[a][0].call(u.exports,function(t){return s(r[a][1][t]||t)},u,u.exports,t,r,o,n)}return o[a].exports}for(var i=void 0,a=0;a<n.length;a++)s(n[a]);return s})({1:[function(t,r,o){"use strict";o.byteLength=function(t){var t=c(t),r=t[0],t=t[1];return 3*(r+t)/4-t},o.toByteArray=function(t){var r,o,n,a=c(t),l=a[0],a=a[1],u=new i(3*(l+(r=a))/4-r),d=0,h=0<a?l-4:l;for(n=0;n<h;n+=4)o=s[t.charCodeAt(n)]<<18|s[t.charCodeAt(n+1)]<<12|s[t.charCodeAt(n+2)]<<6|s[t.charCodeAt(n+3)],u[d++]=o>>16&255,u[d++]=o>>8&255,u[d++]=255&o;return 2===a&&(o=s[t.charCodeAt(n)]<<2|s[t.charCodeAt(n+1)]>>4,u[d++]=255&o),1===a&&(o=s[t.charCodeAt(n)]<<10|s[t.charCodeAt(n+1)]<<4|s[t.charCodeAt(n+2)]>>2,u[d++]=o>>8&255,u[d++]=255&o),u},o.fromByteArray=function(t){for(var r,o=t.length,s=o%3,i=[],a=0,l=o-s;a<l;a+=16383)i.push(function(t,r,o){for(var s,i=[],a=r;a<o;a+=3)i.push(n[(s=(t[a]<<16&16711680)+(t[a+1]<<8&65280)+(255&t[a+2]))>>18&63]+n[s>>12&63]+n[s>>6&63]+n[63&s]);return i.join("")}(t,a,l<a+16383?l:a+16383));return 1==s?i.push(n[(r=t[o-1])>>2]+n[r<<4&63]+"=="):2==s&&i.push(n[(r=(t[o-2]<<8)+t[o-1])>>10]+n[r>>4&63]+n[r<<2&63]+"="),i.join("")};for(var n=[],s=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",l=0,u=a.length;l<u;++l)n[l]=a[l],s[a.charCodeAt(l)]=l;function c(t){var r=t.length;if(0<r%4)throw Error("Invalid string. Length must be a multiple of 4");return r=(t=-1===(t=t.indexOf("="))?r:t)===r?0:4-t%4,[t,r]}s["-".charCodeAt(0)]=62,s["_".charCodeAt(0)]=63},{}],2:[function(t,r,o){},{}],3:[function(t,r,o){},{}],4:[function(t,r,o){(function(r){"use strict";var n=t("base64-js"),s=t("ieee754"),i="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null,a=(o.Buffer=r,o.SlowBuffer=function(t){return+t!=t&&(t=0),r.alloc(+t)},o.INSPECT_MAX_BYTES=50,2147483647);function l(t){if(a<t)throw RangeError('The value "'+t+'" is invalid for option "size"');return Object.setPrototypeOf(t=new Uint8Array(t),r.prototype),t}function r(t,r,o){if("number"!=typeof t)return u(t,r,o);if("string"==typeof r)throw TypeError('The "string" argument must be of type string. Received type number');return d(t)}function u(t,o,n){if("string"==typeof t){var s=t,i=o;if(r.isEncoding(i="string"==typeof i&&""!==i?i:"utf8"))return(s=(m=l(d=0|p(s,i))).write(s,i))!==d?m.slice(0,s):m;throw TypeError("Unknown encoding: "+i)}if(ArrayBuffer.isView(t))return h(t);if(null!=t){if(C(t,ArrayBuffer)||t&&C(t.buffer,ArrayBuffer)){var a,u,c,d=t,s=o,m=n;if(s<0||d.byteLength<s)throw RangeError('"offset" is outside of buffer bounds');if(d.byteLength<s+(m||0))throw RangeError('"length" is outside of buffer bounds');return Object.setPrototypeOf(d=void 0===s&&void 0===m?new Uint8Array(d):void 0===m?new Uint8Array(d,s):new Uint8Array(d,s,m),r.prototype),d}if("number"==typeof t)throw TypeError('The "value" argument must not be of type number. Received type number');if(null!=(i=t.valueOf&&t.valueOf())&&i!==t)return r.from(i,o,n);var y=r.isBuffer(t)?(0!==(c=l(u=0|f(t.length))).length&&t.copy(c,0,0,u),c):void 0!==t.length?"number"!=typeof t.length||(a=t.length)!=a?l(0):h(t):"Buffer"===t.type&&Array.isArray(t.data)?h(t.data):void 0;if(y)return y;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return r.from(t[Symbol.toPrimitive]("string"),o,n)}throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}function c(t){if("number"!=typeof t)throw TypeError('"size" argument must be of type number');if(t<0)throw RangeError('The value "'+t+'" is invalid for option "size"')}function d(t){return c(t),l(t<0?0:0|f(t))}function h(t){for(var r=t.length<0?0:0|f(t.length),o=l(r),n=0;n<r;n+=1)o[n]=255&t[n];return o}function f(t){if(a<=t)throw RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a.toString(16)+" bytes");return 0|t}function p(t,o){if(r.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||C(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);var n=t.length,s=2<arguments.length&&!0===arguments[2];if(!s&&0===n)return 0;for(var i=!1;;)switch(o){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return M(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return k(t).length;default:if(i)return s?-1:M(t).length;o=(""+o).toLowerCase(),i=!0}}function m(t,r,o){var s,i=!1;if((r=void 0===r||r<0?0:r)>this.length||(o=void 0===o||o>this.length?this.length:o)<=0||(o>>>=0)<=(r>>>=0))return"";for(t=t||"utf8";;)switch(t){case"hex":var a=r,l=o,u=this.length;(!l||l<0||u<l)&&(l=u);for(var c="",d=a=!a||a<0?0:a;d<l;++d)c+=P[this[d]];return c;case"utf8":case"utf-8":return b(this,r,o);case"ascii":var u=r,h=o,f="";h=Math.min(this.length,h);for(var p=u;p<h;++p)f+=String.fromCharCode(127&this[p]);return f;case"latin1":case"binary":var a=r,m=o,y="";m=Math.min(this.length,m);for(var g=a;g<m;++g)y+=String.fromCharCode(this[g]);return y;case"base64":return v=this,s=o,0===(_=r)&&s===v.length?n.fromByteArray(v):n.fromByteArray(v.slice(_,s));case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":for(var v=r,_=o,j=this.slice(v,_),x="",w=0;w<j.length;w+=2)x+=String.fromCharCode(j[w]+256*j[w+1]);return x;default:if(i)throw TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),i=!0}}function y(t,r,o){var n=t[r];t[r]=t[o],t[o]=n}function g(t,o,n,s,i){var a;if(0===t.length)return -1;if("string"==typeof n?(s=n,n=0):2147483647<n?n=2147483647:n<-2147483648&&(n=-2147483648),(n=(n=(a=n=+n)!=a?i?0:t.length-1:n)<0?t.length+n:n)>=t.length){if(i)return -1;n=t.length-1}else if(n<0){if(!i)return -1;n=0}if("string"==typeof o&&(o=r.from(o,s)),r.isBuffer(o))return 0===o.length?-1:v(t,o,n,s,i);if("number"==typeof o)return o&=255,"function"==typeof Uint8Array.prototype.indexOf?(i?Uint8Array.prototype.indexOf:Uint8Array.prototype.lastIndexOf).call(t,o,n):v(t,[o],n,s,i);throw TypeError("val must be string, number or Buffer")}function v(t,r,o,n,s){var i=1,a=t.length,l=r.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||r.length<2)return -1;a/=i=2,l/=2,o/=2}function u(t,r){return 1===i?t[r]:t.readUInt16BE(r*i)}if(s)for(var c=-1,d=o;d<a;
1d++)if(u(t,d)===u(r,-1===c?0:d-c)){if(d-(c=-1===c?d:c)+1===l)return c*i}else -1!==c&&(d-=d-c),c=-1;else for(d=o=a<o+l?a-l:o;0<=d;d--){for(var h=!0,f=0;f<l;f++)if(u(t,d+f)!==u(r,f)){h=!1;break}if(h)return d}return -1}function b(t,r,o){o=Math.min(t.length,o);for(var n=[],s=r;s<o;){var i,a,l,u,c=t[s],d=null,h=239<c?4:223<c?3:191<c?2:1;if(s+h<=o)switch(h){case 1:c<128&&(d=c);break;case 2:128==(192&(i=t[s+1]))&&127<(u=(31&c)<<6|63&i)&&(d=u);break;case 3:i=t[s+1],a=t[s+2],128==(192&i)&&128==(192&a)&&2047<(u=(15&c)<<12|(63&i)<<6|63&a)&&(u<55296||57343<u)&&(d=u);break;case 4:i=t[s+1],a=t[s+2],l=t[s+3],128==(192&i)&&128==(192&a)&&128==(192&l)&&65535<(u=(15&c)<<18|(63&i)<<12|(63&a)<<6|63&l)&&u<1114112&&(d=u)}null===d?(d=65533,h=1):65535<d&&(d-=65536,n.push(d>>>10&1023|55296),d=56320|1023&d),n.push(d),s+=h}var f=n.length;if(f<=_)return String.fromCharCode.apply(String,n);for(var p="",m=0;m<f;)p+=String.fromCharCode.apply(String,n.slice(m,m+=_));return p}o.kMaxLength=a,(r.TYPED_ARRAY_SUPPORT=function(){try{var t=new Uint8Array(1),r={foo:function(){return 42}};return Object.setPrototypeOf(r,Uint8Array.prototype),Object.setPrototypeOf(t,r),42===t.foo()}catch(t){return!1}}())||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(r.prototype,"parent",{enumerable:!0,get:function(){if(r.isBuffer(this))return this.buffer}}),Object.defineProperty(r.prototype,"offset",{enumerable:!0,get:function(){if(r.isBuffer(this))return this.byteOffset}}),"undefined"!=typeof Symbol&&null!=Symbol.species&&r[Symbol.species]===r&&Object.defineProperty(r,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),r.poolSize=8192,r.from=u,Object.setPrototypeOf(r.prototype,Uint8Array.prototype),Object.setPrototypeOf(r,Uint8Array),r.alloc=function(t,r,o){return c(t),t<=0||void 0===r?l(t):"string"==typeof o?l(t).fill(r,o):l(t).fill(r)},r.allocUnsafe=d,r.allocUnsafeSlow=d,r.isBuffer=function(t){return null!=t&&!0===t._isBuffer&&t!==r.prototype},r.compare=function(t,o){if(C(t,Uint8Array)&&(t=r.from(t,t.offset,t.byteLength)),C(o,Uint8Array)&&(o=r.from(o,o.offset,o.byteLength)),!r.isBuffer(t)||!r.isBuffer(o))throw TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===o)return 0;for(var n=t.length,s=o.length,i=0,a=Math.min(n,s);i<a;++i)if(t[i]!==o[i]){n=t[i],s=o[i];break}return n<s?-1:s<n?1:0},r.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},r.concat=function(t,o){if(!Array.isArray(t))throw TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return r.alloc(0);if(void 0===o)for(i=o=0;i<t.length;++i)o+=t[i].length;for(var n=r.allocUnsafe(o),s=0,i=0;i<t.length;++i){var a=t[i];if(C(a,Uint8Array)&&(a=r.from(a)),!r.isBuffer(a))throw TypeError('"list" argument must be an Array of Buffers');a.copy(n,s),s+=a.length}return n},r.byteLength=p,r.prototype._isBuffer=!0,r.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw RangeError("Buffer size must be a multiple of 16-bits");for(var r=0;r<t;r+=2)y(this,r,r+1);return this},r.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw RangeError("Buffer size must be a multiple of 32-bits");for(var r=0;r<t;r+=4)y(this,r,r+3),y(this,r+1,r+2);return this},r.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw RangeError("Buffer size must be a multiple of 64-bits");for(var r=0;r<t;r+=8)y(this,r,r+7),y(this,r+1,r+6),y(this,r+2,r+5),y(this,r+3,r+4);return this},r.prototype.toLocaleString=r.prototype.toString=function(){var t=this.length;return 0===t?"":0==arguments.length?b(this,0,t):m.apply(this,arguments)},r.prototype.equals=function(t){if(r.isBuffer(t))return this===t||0===r.compare(this,t);throw TypeError("Argument must be a Buffer")},r.prototype.inspect=function(){var t="",r=o.INSPECT_MAX_BYTES,t=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim();return this.length>r&&(t+=" ... "),"<Buffer "+t+">"},i&&(r.prototype[i]=r.prototype.inspect),r.prototype.compare=function(t,o,n,s,i){if(C(t,Uint8Array)&&(t=r.from(t,t.offset,t.byteLength)),!r.isBuffer(t))throw TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);
1if(void 0===n&&(n=t?t.length:0),void 0===s&&(s=0),void 0===i&&(i=this.length),(o=void 0===o?0:o)<0||n>t.length||s<0||i>this.length)throw RangeError("out of range index");if(i<=s&&n<=o)return 0;if(i<=s)return -1;if(n<=o)return 1;if(this===t)return 0;for(var a=(i>>>=0)-(s>>>=0),l=(n>>>=0)-(o>>>=0),u=Math.min(a,l),c=this.slice(s,i),d=t.slice(o,n),h=0;h<u;++h)if(c[h]!==d[h]){a=c[h],l=d[h];break}return a<l?-1:l<a?1:0},r.prototype.includes=function(t,r,o){return -1!==this.indexOf(t,r,o)},r.prototype.indexOf=function(t,r,o){return g(this,t,r,o,!0)},r.prototype.lastIndexOf=function(t,r,o){return g(this,t,r,o,!1)},r.prototype.write=function(t,r,o,n){if(void 0===r)n="utf8",o=this.length,r=0;else if(void 0===o&&"string"==typeof r)n=r,o=this.length,r=0;else{if(!isFinite(r))throw Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");r>>>=0,isFinite(o)?(o>>>=0,void 0===n&&(n="utf8")):(n=o,o=void 0)}var s,i,a,l,u=this.length-r;if((void 0===o||u<o)&&(o=u),0<t.length&&(o<0||r<0)||r>this.length)throw RangeError("Attempt to write outside buffer bounds");n=n||"utf8";for(var c,d,h,f=!1;;)switch(n){case"hex":var p=r,m=o,y=(p=Number(p)||0,this.length-p);(!m||y<(m=Number(m)))&&(m=y),(y=t.length)/2<m&&(m=y/2);for(var g=0;g<m;++g){var v=parseInt(t.substr(2*g,2),16);if(v!=v)break;this[p+g]=v}return g;case"utf8":case"utf-8":return y=r,h=o,O(M(t,(d=this).length-y),d,y,h);case"ascii":case"latin1":case"binary":return s=r,i=o,O(function(t){for(var r=[],o=0;o<t.length;++o)r.push(255&t.charCodeAt(o));return r}(t),this,s,i);case"base64":return d=this,h=r,c=o,O(k(t),d,h,c);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return a=r,l=o,O(function(t,r){for(var o,n,s=[],i=0;i<t.length&&!((r-=2)<0);++i)o=(n=t.charCodeAt(i))>>8,s.push(n%=256),s.push(o);return s}(t,this.length-a),this,a,l);default:if(f)throw TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),f=!0}},r.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var _=4096;function j(t,r,o){if(t%1!=0||t<0)throw RangeError("offset is not uint");if(o<t+r)throw RangeError("Trying to access beyond buffer length")}function x(t,o,n,s,i,a){if(!r.isBuffer(t))throw TypeError('"buffer" argument must be a Buffer instance');if(i<o||o<a)throw RangeError('"value" argument is out of bounds');if(n+s>t.length)throw RangeError("Index out of range")}function w(t,r,o,n){if(o+n>t.length||o<0)throw RangeError("Index out of range")}function S(t,r,o,n,i){return r=+r,o>>>=0,i||w(t,0,o,4),s.write(t,r,o,n,23,4),o+4}function T(t,r,o,n,i){return r=+r,o>>>=0,i||w(t,0,o,8),s.write(t,r,o,n,52,8),o+8}r.prototype.slice=function(t,o){var n=this.length,n=((t=~~t)<0?(t+=n)<0&&(t=0):n<t&&(t=n),(o=void 0===o?n:~~o)<0?(o+=n)<0&&(o=0):n<o&&(o=n),o<t&&(o=t),this.subarray(t,o));return Object.setPrototypeOf(n,r.prototype),n},r.prototype.readUIntLE=function(t,r,o){t>>>=0,r>>>=0,o||j(t,r,this.length);for(var n=this[t],s=1,i=0;++i<r&&(s*=256);)n+=this[t+i]*s;return n},r.prototype.readUIntBE=function(t,r,o){t>>>=0,r>>>=0,o||j(t,r,this.length);for(var n=this[t+--r],s=1;0<r&&(s*=256);)n+=this[t+--r]*s;return n},r.prototype.readUInt8=function(t,r){return t>>>=0,r||j(t,1,this.length),this[t]},r.prototype.readUInt16LE=function(t,r){return t>>>=0,r||j(t,2,this.length),this[t]|this[t+1]<<8},r.prototype.readUInt16BE=function(t,r){return t>>>=0,r||j(t,2,this.length),this[t]<<8|this[t+1]},r.prototype.readUInt32LE=function(t,r){return t>>>=0,r||j(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},r.prototype.readUInt32BE=function(t,r){return t>>>=0,r||j(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},r.prototype.readIntLE=function(t,r,o){t>>>=0,r>>>=0,o||j(t,r,this.length);for(var n=this[t],s=1,i=0;++i<r&&(s*=256);)n+=this[t+i]*s;return(s*=128)<=n&&(n-=Math.pow(2,8*r)),n},r.prototype.readIntBE=function(t,r,o){t>>>=0,r>>>=0,o||j(t,r,this.length);for(var n=r,s=1,i=this[t+--n];0<n&&(s*=256);)i+=this[t+--n]*s;return(s*=128)<=i&&(i-=Math.pow(2,8*r)),i},r.prototype.readInt8=function(t,r){return t>>>=0,r||j(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},r.prototype.readInt16LE=function(t,r){return t>>>=0,r||j(t,2,this.length),32768&(r=this[t]|this[t+1]<<8)?4294901760|r:r},r.prototype.readInt16BE=function(t,r){return t>>>=0,r||j(t,2,this.length),32768&(r=this[t+1]|this[t]<<8)?4294901760|r:r},r.prototype.readInt32LE=function(t,r){return t>>>=0,r||j(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},r.prototype.readInt32BE=function(t,r){return t>>>=0,r||j(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},r.prototype.readFloatLE=function(t,r){return t>>>=0,r||j(t,4,this.length),s.read(this,t,!0,23,4)},r.prototype.readFloatBE=function(t,r){return t>>>=0,r||j(t,4,this.length),s.read(this,t,!1,23,4)},r.prototype.readDoubleLE=function(t,r){return t>>>=0,r||j(t,8,this.length),s.read(this,t,!0,52,8)},r.prototype.readDoubleBE=function(t,r){return t>>>=0,r||j(t,8,this.length),s.read(this,t,!1,52,8)},r.prototype.writeUIntLE=function(t,r,o,n){t=+t,r>>>=0,o>>>=0,n||x(this,t,r,o,Math.pow(2,8*o)-1,0);var s=1,i=0;for(this[r]=255&t;++i<o&&(s*=256);)this[r+i]=t/s&255;return r+o},r.prototype.writeUIntBE=function(t,r,o,n){t=+t,r>>>=0,o>>>=0,n||x(this,t,r,o,Math.pow(2,8*o)-1,0);var s=o-1,i=1;for(this[r+s]=255&t;0<=--s&&(i*=256);)this[r+s]=t/i&255;return r+o},r.prototype.writeUInt8=function(t,r,o){return t=+t,r>>>=0,o||x(this,t,r,1,255,0),this[r]=255&t,r+1},r.prototype.writeUInt16LE=function(t,r,o){return t=+t,r>>>=0,o||x(this,t,r,2,65535,0),this[r]=255&t,this[r+1]=t>>>8,r+2},r.prototype.writeUInt16BE=function(t,r,o){return t=+t,r>>>=0,o||x(this,t,r,2,65535,0),this[r]=t>>>8,this[r+1]=255&t,r+2},r.prototype.writeUInt32LE=function(t,r,o){return t=+t,r>>>=0,o||x(this,t,r,4,4294967295,0),this[r+3]=t>>>24,this[r+2]=t>>>16,this[r+1]=t>>>8,this[r]=255&t,r+4},r.prototype.writeUInt32BE=function(t,r,o){return t=+t,r>>>=0,o||x(this,t,r,4,4294967295,0),this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=255&t,r+4},r.prototype.writeIntLE=function(t,r,o,n){t=+t,r>>>=0,n||x(this,t,r,o,(n=Math.pow(2,8*o-1))-1,-n);var s=0,i=1,a=0;for(this[r]=255&t;++s<o&&(i*=256);)t<0&&0===a&&0!==this[r+s-1]&&(a=1),this[r+s]=(t/i>>0)-a&255;return r+o},r.prototype.writeIntBE=function(t,r,o,n){t=+t,r>>>=0,n||x(this,t,r,o,(n=Math.pow(2,8*o-1))-1,-n);var s=o-1,i=1,a=0;for(this[r+s]=255&t;0<=--s&&(i*=256);)t<0&&0===a&&0!==this[r+s+1]&&(a=1),this[r+s]=(t/i>>0)-a&255;return r+o},r.prototype.writeInt8=function(t,r,o){return t=+t,r>>>=0,o||x(this,t,r,1,127,-128),this[r]=255&(t=t<0?255+t+1:t),r+1},r.prototype.writeInt16LE=function(t,r,o){return t=+t,r>>>=0,o||x(this,t,r,2,32767,-32768),this[r]=255&t,this[r+1]=t>>>8,r+2},r.prototype.writeInt16BE=function(t,r,o){return t=+t,r>>>=0,o||x(this,t,r,2,32767,-32768),this[r]=t>>>8,this[r+1]=255&t,r+2},r.prototype.writeInt32LE=function(t,r,o){return t=+t,r>>>=0,o||x(this,t,r,4,2147483647,-2147483648),this[r]=255&t,this[r+1]=t>>>8,this[r+2]=t>>>16,this[r+3]=t>>>24,r+4},r.prototype.writeInt32BE=function(t,r,o){return t=+t,r>>>=0,o||x(this,t,r,4,2147483647,-2147483648),this[r]=(t=t<0?4294967295+t+1:t)>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=255&t,r+4},r.prototype.writeFloatLE=function(t,r,o){return S(this,t,r,!0,o)},r.prototype.writeFloatBE=function(t,r,o){return S(this,t,r,!1,o)},r.prototype.writeDoubleLE=function(t,r,o){return T(this,t,r,!0,o)},r.prototype.writeDoubleBE=function(t,r,o){return T(this,t,r,!1,o)},r.prototype.copy=function(t,o,n,s){if(!r.isBuffer(t))throw TypeError("argument should be a Buffer");if(n=n||0,s||0===s||(s=this.length),o>=t.length&&(o=t.length),(s=0<s&&s<n?n:s)===n||0===t.length||0===this.length)return 0;if((o=o||0)<0)throw RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw RangeError("Index out of range");if(s<0)throw RangeError("sourceEnd out of bounds");s>this.length&&(s=this.length);var i=(s=t.length-o<s-n?t.length-o+n:s)-n;if(this===t&&"function"==typeof Uint8Array.prototype.copyWithin)this.copyWithin(o,n,s);else if(this===t&&n<o&&o<s)for(var a=i-1;0<=a;--a)t[a+o]=this[a+n];else Uint8Array.prototype.set.call(t,this.subarray(n,s),o);return i},r.prototype.fill=function(t,o,n,s){if("string"==typeof t){if("string"==typeof o?(s=o,o=0,n=this.length):"string"==typeof n&&(s=n,n=this.length),void 0!==s&&"string"!=typeof s)throw TypeError("encoding must be a string");if("string"==typeof s&&!r.isEncoding(s))throw TypeError("Unknown encoding: "+s);1===t.length&&(i=t.charCodeAt(0),("utf8"===s&&i<128||"latin1"===s)&&(t=i))}else"number"==typeof t?t&=255:"boolean"==typeof t&&(t=Number(t));if(o<0||this.length<o||this.length<n)throw RangeError("Out of range index");if(!(n<=o)){if(o>>>=0,n=void 0===n?this.length:n>>>0,"number"==typeof(t=t||0))for(a=o;a<n;++a)this[a]=t;
1else{var i,a,l=r.isBuffer(t)?t:r.from(t,s),u=l.length;if(0===u)throw TypeError('The value "'+t+'" is invalid for argument "value"');for(a=0;a<n-o;++a)this[a+o]=l[a%u]}}return this};var E=/[^+/0-9A-Za-z-_]/g;function M(t,r){r=r||1/0;for(var o,n=t.length,s=null,i=[],a=0;a<n;++a){if(55295<(o=t.charCodeAt(a))&&o<57344){if(!s){if(56319<o||a+1===n){-1<(r-=3)&&i.push(239,191,189);continue}s=o;continue}if(o<56320){-1<(r-=3)&&i.push(239,191,189),s=o;continue}o=65536+(s-55296<<10|o-56320)}else s&&-1<(r-=3)&&i.push(239,191,189);if(s=null,o<128){if(--r<0)break;i.push(o)}else if(o<2048){if((r-=2)<0)break;i.push(o>>6|192,63&o|128)}else if(o<65536){if((r-=3)<0)break;i.push(o>>12|224,o>>6&63|128,63&o|128)}else{if(!(o<1114112))throw Error("Invalid code point");if((r-=4)<0)break;i.push(o>>18|240,o>>12&63|128,o>>6&63|128,63&o|128)}}return i}function k(t){return n.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(E,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function O(t,r,o,n){for(var s=0;s<n&&!(s+o>=r.length||s>=t.length);++s)r[s+o]=t[s];return s}function C(t,r){return t instanceof r||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===r.name}var P=function(){for(var t="0123456789abcdef",r=Array(256),o=0;o<16;++o)for(var n=16*o,s=0;s<16;++s)r[n+s]=t[o]+t[s];return r}()}).call(this,t("buffer").Buffer)},{"base64-js":1,buffer:4,ieee754:254}],5:[function(t,r,o){r.exports=function(t){if("function"!=typeof t)throw TypeError(String(t)+" is not a function");return t}},{}],6:[function(t,r,o){var n=t("../internals/is-object");r.exports=function(t){if(n(t)||null===t)return t;throw TypeError("Can't set "+String(t)+" as a prototype")}},{"../internals/is-object":75}],7:[function(t,r,o){var n=t("../internals/well-known-symbol"),s=t("../internals/object-create"),t=t("../internals/object-define-property"),i=n("unscopables"),a=Array.prototype;null==a[i]&&t.f(a,i,{configurable:!0,value:s(null)}),r.exports=function(t){a[i][t]=!0}},{"../internals/object-create":91,"../internals/object-define-property":93,"../internals/well-known-symbol":150}],8:[function(t,r,o){"use strict";var n=t("../internals/string-multibyte").charAt;r.exports=function(t,r,o){return r+(o?n(t,r).length:1)}},{"../internals/string-multibyte":125}],9:[function(t,r,o){r.exports=function(t,r,o){if(t instanceof r)return t;throw TypeError("Incorrect "+(o?o+" ":"")+"invocation")}},{}],10:[function(t,r,o){var n=t("../internals/is-object");r.exports=function(t){if(n(t))return t;throw TypeError(String(t)+" is not an object")}},{"../internals/is-object":75}],11:[function(t,r,o){r.exports="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView},{}],12:[function(t,r,o){"use strict";function n(t){return u(t)&&c(M,d(t))}var s,i=t("../internals/array-buffer-native"),a=t("../internals/descriptors"),l=t("../internals/global"),u=t("../internals/is-object"),c=t("../internals/has"),d=t("../internals/classof"),h=t("../internals/create-non-enumerable-property"),f=t("../internals/redefine"),p=t("../internals/object-define-property").f,m=t("../internals/object-get-prototype-of"),y=t("../internals/object-set-prototype-of"),g=t("../internals/well-known-symbol"),t=t("../internals/uid"),v=l.Int8Array,b=v&&v.prototype,_=l.Uint8ClampedArray,_=_&&_.prototype,j=v&&m(v),x=b&&m(b),w=Object.prototype,S=w.isPrototypeOf,g=g("toStringTag"),T=t("TYPED_ARRAY_TAG"),E=i&&!!y&&"Opera"!==d(l.opera),t=!1,M={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8};for(s in M)l[s]||(E=!1);if((!E||"function"!=typeof j||j===Function.prototype)&&(j=function(){throw TypeError("Incorrect invocation")},E))for(s in M)l[s]&&y(l[s],j);if((!E||!x||x===w)&&(x=j.prototype,E))for(s in M)l[s]&&y(l[s].prototype,x);if(E&&m(_)!==x&&y(_,x),a&&!c(x,g))for(s in t=!0,p(x,g,{get:function(){return u(this)?this[T]:void 0}}),M)l[s]&&h(l[s],T,s);r.exports={NATIVE_ARRAY_BUFFER_VIEWS:E,TYPED_ARRAY_TAG:t&&T,aTypedArray:function(t){if(n(t))return t;throw TypeError("Target is not a typed array")},aTypedArrayConstructor:function(t){if(y){if(S.call(j,t))return t}else for(var r in M)if(c(M,s)&&(r=l[r])&&(t===r||S.call(r,t)))return t;throw TypeError("Target is not a typed array constructor")},exportTypedArrayMethod:function(t,r,o){if(a){if(o)for(var n in M)(n=l[n])&&c(n.prototype,t)&&delete n.prototype[t];x[t]&&!o||f(x,t,!o&&E&&b[t]||r)}},exportTypedArrayStaticMethod:function(t,r,o){var n,s;if(a){if(y){if(o)for(n in M)(s=l[n])&&c(s,t)&&delete s[t];if(j[t]&&!o)return;try{return f(j,t,!o&&E&&v[t]||r)}catch(t){}}for(n in M)(s=l[n])&&(!s[t]||o)&&f(s,t,r)}},isView:function(t){return"DataView"===(t=d(t))||c(M,t)},isTypedArray:n,TypedArray:j,TypedArrayPrototype:x}},{"../internals/array-buffer-native":11,"../internals/classof":29,"../internals/create-non-enumerable-property":38,"../internals/descriptors":43,"../internals/global":60,"../internals/has":61,"../internals/is-object":75,"../internals/object-define-property":93,"../internals/object-get-prototype-of":98,"../internals/object-set-prototype-of":102,"../internals/redefine":110,"../internals/uid":147,"../internals/well-known-symbol":150}],13:[function(t,r,o){"use strict";function n(t){return[255&t]}function s(t){return[255&t,t>>8&255]}function i(t){return[255&t,t>>8&255,t>>16&255,t>>24&255]}function a(t){return t[3]<<24|t[2]<<16|t[1]<<8|t[0]}function l(t){return G(t,23,4)}function u(t){return G(t,52,8)}function c(t,r){M(t[R],r,{get:function(){return C(this)[r]}})}function d(t,r,o,n){if((o=x(o))+r>(t=C(t)).byteLength)throw B(I);var s=C(t.buffer).bytes,o=o+t.byteOffset,t=s.slice(o,o+r);return n?t:t.reverse()}function h(t,r,o,n,s,i){if((o=x(o))+r>(t=C(t)).byteLength)throw B(I);for(var a=C(t.buffer).bytes,l=o+t.byteOffset,u=n(+s),c=0;c<r;c++)a[l+c]=u[i?c:r-c-1]}var f=t("../internals/global"),p=t("../internals/descriptors"),m=t("../internals/array-buffer-native"),y=t("../internals/create-non-enumerable-property"),g=t("../internals/redefine-all"),v=t("../internals/fails"),b=t("../internals/an-instance"),_=t("../internals/to-integer"),j=t("../internals/to-length"),x=t("../internals/to-index"),w=t("../internals/ieee754"),S=t("../internals/object-get-prototype-of"),T=t("../internals/object-set-prototype-of"),E=t("../internals/object-get-own-property-names").f,M=t("../internals/object-define-property").f,k=t("../internals/array-fill"),O=t("../internals/set-to-string-tag"),t=t("../internals/internal-state"),C=t.get,P=t.set,A="ArrayBuffer",L="DataView",R="prototype",I="Wrong index",D=f[A],F=D,N=f[L],t=N&&N[R],U=Object.prototype,B=f.RangeError,G=w.pack,V=w.unpack;if(m){if(!v(function(){D(1)})||!v(function(){new D(-1)})||v(function(){return new D,new D(1.5),new D(NaN),D.name!=A})){for(var z,f=(F=function(t){return b(this,F),new D(x(t))})[R]=D[R],H=E(D),W=0;H.length>W;)(z=H[W++])in F||y(F,z,D[z]);f.constructor=F}T&&S(t)!==U&&T(t,U);var w=new N(new F(2)),q=t.setInt8;w.setInt8(0,2147483648),w.setInt8(1,2147483649),!w.getInt8(0)&&w.getInt8(1)||g(t,{setInt8:function(t,r){q.call(this,t,r<<24>>24)},setUint8:function(t,r){q.call(this,t,r<<24>>24)}},{unsafe:!0})}else F=function(t){b(this,F,A),t=x(t),P(this,{bytes:k.call(Array(t),0),byteLength:t}),p||(this.byteLength=t)},N=function(t,r,o){b(this,N,L),b(t,F,L);var n=C(t).byteLength,r=_(r);if(r<0||n<r)throw B("Wrong offset");if(n<r+(o=void 0===o?n-r:j(o)))throw B("Wrong length");P(this,{buffer:t,byteLength:o,byteOffset:r}),p||(this.buffer=t,this.byteLength=o,this.byteOffset=r)}
1,p&&(c(F,"byteLength"),c(N,"buffer"),c(N,"byteLength"),c(N,"byteOffset")),g(N[R],{getInt8:function(t){return d(this,1,t)[0]<<24>>24},getUint8:function(t){return d(this,1,t)[0]},getInt16:function(t){return t=d(this,2,t,1<arguments.length?arguments[1]:void 0),(t[1]<<8|t[0])<<16>>16},getUint16:function(t){return t=d(this,2,t,1<arguments.length?arguments[1]:void 0),t[1]<<8|t[0]},getInt32:function(t){return a(d(this,4,t,1<arguments.length?arguments[1]:void 0))},getUint32:function(t){return a(d(this,4,t,1<arguments.length?arguments[1]:void 0))>>>0},getFloat32:function(t){return V(d(this,4,t,1<arguments.length?arguments[1]:void 0),23)},getFloat64:function(t){return V(d(this,8,t,1<arguments.length?arguments[1]:void 0),52)},setInt8:function(t,r){h(this,1,t,n,r)},setUint8:function(t,r){h(this,1,t,n,r)},setInt16:function(t,r){h(this,2,t,s,r,2<arguments.length?arguments[2]:void 0)},setUint16:function(t,r){h(this,2,t,s,r,2<arguments.length?arguments[2]:void 0)},setInt32:function(t,r){h(this,4,t,i,r,2<arguments.length?arguments[2]:void 0)},setUint32:function(t,r){h(this,4,t,i,r,2<arguments.length?arguments[2]:void 0)},setFloat32:function(t,r){h(this,4,t,l,r,2<arguments.length?arguments[2]:void 0)},setFloat64:function(t,r){h(this,8,t,u,r,2<arguments.length?arguments[2]:void 0)}});O(F,A),O(N,L),r.exports={ArrayBuffer:F,DataView:N}},{"../internals/an-instance":9,"../internals/array-buffer-native":11,"../internals/array-fill":15,"../internals/create-non-enumerable-property":38,"../internals/descriptors":43,"../internals/fails":51,"../internals/global":60,"../internals/ieee754":66,"../internals/internal-state":71,"../internals/object-define-property":93,"../internals/object-get-own-property-names":96,"../internals/object-get-prototype-of":98,"../internals/object-set-prototype-of":102,"../internals/redefine-all":109,"../internals/set-to-string-tag":119,"../internals/to-index":135,"../internals/to-integer":137,"../internals/to-length":138}],14:[function(t,r,o){"use strict";var n=t("../internals/to-object"),s=t("../internals/to-absolute-index"),i=t("../internals/to-length"),a=Math.min;r.exports=[].copyWithin||function(t,r){var o=n(this),l=i(o.length),u=s(t,l),c=s(r,l),t=2<arguments.length?arguments[2]:void 0,d=a((void 0===t?l:s(t,l))-c,l-u),h=1;for(c<u&&u<c+d&&(h=-1,c+=d-1,u+=d-1);0<d--;)c in o?o[u]=o[c]:delete o[u],u+=h,c+=h;return o}},{"../internals/to-absolute-index":134,"../internals/to-length":138,"../internals/to-object":139}],15:[function(t,r,o){"use strict";var n=t("../internals/to-object"),s=t("../internals/to-absolute-index"),i=t("../internals/to-length");r.exports=function(t){for(var r=n(this),o=i(r.length),a=arguments.length,l=s(1<a?arguments[1]:void 0,o),a=2<a?arguments[2]:void 0,u=void 0===a?o:s(a,o);l<u;)r[l++]=t;return r}},{"../internals/to-absolute-index":134,"../internals/to-length":138,"../internals/to-object":139}],16:[function(t,r,o){"use strict";var n=t("../internals/array-iteration").forEach,s=t("../internals/array-method-is-strict"),t=t("../internals/array-method-uses-to-length"),s=s("forEac
1h"),t=t("forEach");r.exports=s&&t?[].forEach:function(t){return n(this,t,1<arguments.length?arguments[1]:void 0)}},{"../internals/array-iteration":19,"../internals/array-method-is-strict":22,"../internals/array-method-uses-to-length":23}],17:[function(t,r,o){"use strict";var n=t("../internals/function-bind-context"),s=t("../internals/to-object"),i=t("../internals/call-with-safe-iteration-closing"),a=t("../internals/is-array-iterator-method"),l=t("../internals/to-length"),u=t("../internals/create-property"),c=t("../internals/get-iterator-method");r.exports=function(t){var r,o,d,h,f,p,m=s(t),t="function"==typeof this?this:Array,y=arguments.length,g=1<y?arguments[1]:void 0,v=void 0!==g,b=c(m),_=0;if(v&&(g=n(g,2<y?arguments[2]:void 0,2)),null==b||t==Array&&a(b))for(o=new t(r=l(m.length));_<r;_++)p=v?g(m[_],_):m[_],u(o,_,p);else for(f=(h=b.call(m)).next,o=new t;!(d=f.call(h)).done;_++)p=v?i(h,g,[d.value,_],!0):d.value,u(o,_,p);return o.length=_,o}},{"../internals/call-with-safe-iteration-closing":26,"../internals/create-property":40,"../internals/function-bind-context":55,"../internals/get-iterator-method":58,"../internals/is-array-iterator-method":72,"../internals/to-length":138,"../internals/to-object":139}],18:[function(t,r,o){function n(t){return function(r,o,n){var l,u=s(r),c=i(u.length),d=a(n,c);if(t&&o!=o){for(;d<c;
1)if((l=u[d++])!=l)return!0}else for(;d<c;d++)if((t||d in u)&&u[d]===o)return t||d||0;return!t&&-1}}var s=t("../internals/to-indexed-object"),i=t("../internals/to-length"),a=t("../internals/to-absolute-index");r.exports={includes:n(!0),indexOf:n(!1)}},{"../internals/to-absolute-index":134,"../internals/to-indexed-object":136,"../internals/to-length":138}],19:[function(t,r,o){function n(t){var r=1==t,o=2==t,n=3==t,d=4==t,h=6==t,f=5==t||h;return function(p,m,y,g){for(var v,b,_=a(p),j=i(_),x=s(m,y,3),w=l(j.length),S=0,m=g||u,T=r?m(p,w):o?m(p,0):void 0;S<w;S++)if((f||S in j)&&(b=x(v=j[S],S,_),t)){if(r)T[S]=b;else if(b)switch(t){case 3:return!0;case 5:return v;case 6:return S;case 2:c.call(T,v)}else if(d)return!1}return h?-1:n||d?d:T}}var s=t("../internals/function-bind-context"),i=t("../internals/indexed-object"),a=t("../internals/to-object"),l=t("../internals/to-length"),u=t("../internals/array-species-create"),c=[].push;r.exports={forEach:n(0),map:n(1),filter:n(2),some:n(3),every:n(4),find:n(5),findIndex:n(6)}},{"../internals/array-species-create":25,"../internals/function-bind-context":55,"../internals/indexed-object":67,"../internals/to-length":138,"../internals/to-object":139}],20:[function(t,r,o){"use strict";var n=t("../internals/to-indexed-object"),s=t("../internals/to-integer"),i=t("../internals/to-length"),a=t("../internals/array-method-is-strict"),t=t("../internals/array-method-uses-to-length"),l=Math.min,u=[].lastIndexOf,c=!!u&&1/[1].lastIndexOf(1,-0)<0,a=a("lastIndexOf"),t=t("indexOf",{ACCESSORS:!0,1:0});r.exports=!c&&a&&t?u:function(t){if(c)return u.apply(this,arguments)||0;var r=n(this),o=i(r.length),a=o-1;for((a=1<arguments.length?l(a,s(arguments[1])):a)<0&&(a=o+a);0<=a;a--)if(a in r&&r[a]===t)return a||0;return -1}},{"../internals/array-method-is-strict":22,"../internals/array-method-uses-to-length":23,"../internals/to-indexed-object":136,"../internals/to-integer":137,"../internals/to-length":138}],21:[function(t,r,o){var n=t("../internals/fails"),s=t("../internals/well-known-symbol"),i=t("../internals/engine-v8-version"),a=s("species");r.exports=function(t){return 51<=i||!n(function(){var r=[];return(r.constructor={})[a]=function(){return{foo:1}},1!==r[t](Boolean).foo})}},{"../internals/engine-v8-version":48,"../internals/fails":51,"../internals/well-known-symbol":150}],22:[function(t,r,o){"use strict";var n=t("../internals/fails");r.exports=function(t,r){var o=[][t];return!!o&&n(function(){o.call(null,r||function(){throw 1},1)})}},{"../internals/fails":51}],23:[function(t,r,o){function n(t){throw t}var s=t("../internals/descriptors"),i=t("../internals/fails"),a=t("../internals/has"),l=Object.defineProperty,u={};r.exports=function(t,r){var o,c,d,h;return a(u,t)?u[t]:(o=[][t],c=!!a(r=r||{},"ACCESSORS")&&r.ACCESSORS,d=a(r,0)?r[0]:n,h=a(r,1)?r[1]:void 0,u[t]=!!o&&!i(function(){if(c&&!s)return!0;var t={length:-1};c?l(t,1,{enumerable:!0,get:n}):t[1]=1,o.call(t,d,h)}))}},{"../internals/descriptors":43,"../internals/fails":51,"../internals/has":61}],24:[function(t,r,o){function n(t){return function(r,o,n,u){s(o);var c=i(r),d=a(c),h=l(c.length),f=t?h-1:0,p=t?-1:1;if(n<2)for(;;){if(f in d){u=d[f],f+=p;break}if(f+=p,t?f<0:h<=f)throw TypeError("Reduce of empty array with no initial value")}for(;t?0<=f:f<h;f+=p)f in d&&(u=o(u,d[f],f,c));return u}}var s=t("../internals/a-function"),i=t("../internals/to-object"),a=t("../internals/indexed-object"),l=t("../internals/to-length");r.exports={left:n(!1),right:n(!0)}},{"../internals/a-function":5,"../internals/indexed-object":67,"../internals/to-length":138,"../internals/to-object":139}],25:[function(t,r,o){var n=t("../internals/is-object"),s=t("../internals/is-array"),i=t("../internals/well-known-symbol")("species");r.exports=function(t,r){var o;return new(void 0===(o=s(t)&&("function"==typeof(o=t.constructor)&&(o===Array||s(o.prototype))||n(o)&&null===(o=o[i]))?void 0:o)?Array:o)(0===r?0:r)}},{"../internals/is-array":73,"../internals/is-object":75,"../internals/well-known-symbol":150}],26:[function(t,r,o){var n=t("../internals/an-object");r.exports=function(t,r,o,s){try{return s?r(n(o)[0],o[1]):r(o)}catch(r){throw void 0!==(s=t.return)&&n(s.call(t)),r}}},{"../internals/an-object":10}],27:[function(t,r,o){var n=t("../internals/well-known-symbol")("iterator"),s=!1;try{var i=0,a={next:function(){return{done:!!i++}},return:function(){s=!0}};a[n]=function(){return this},Array.from(a,function(){throw 2})}catch(t){}r.exports=function(t,r){if(!r&&!s)return!1;var o=!1;try{var i={};i[n]=function(){return{next:function(){return{done:o=!0}}}},t(i)}catch(t){}return o}},{"../internals/well-known-symbol":150}],28:[function(t,r,o){var n={}.toString;r.exports=function(t){return n.call(t).slice(8,-1)}},{}],29:[function(t,r,o){var n=t("../internals/to-string-tag-support"),s=t("../internals/classof-raw"),i=t("../internals/well-known-symbol")("toStringTag"),a="Arguments"==s(function(){return arguments}());
1r.exports=n?s:function(t){var r;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(r=function(t,r){try{return t[r]}catch(t){}}(t=Object(t),i))?r:a?s(t):"Object"==(r=s(t))&&"function"==typeof t.callee?"Arguments":r}},{"../internals/classof-raw":28,"../internals/to-string-tag-support":143,"../internals/well-known-symbol":150}],30:[function(t,r,o){"use strict";var n=t("../internals/object-define-property").f,s=t("../internals/object-create"),i=t("../internals/redefine-all"),a=t("../internals/function-bind-context"),l=t("../internals/an-instance"),u=t("../internals/iterate"),c=t("../internals/define-iterator"),d=t("../internals/set-species"),h=t("../internals/descriptors"),f=t("../internals/internal-metadata").fastKey,t=t("../internals/internal-state"),p=t.set,m=t.getterFor;r.exports={getConstructor:function(t,r,o,c){function d(t,r,o){var n,s=v(t),i=y(t,r);return i?i.value=o:(s.last=i={index:n=f(r,!0),key:r,value:o,previous:r=s.last,next:void 0,removed:!1},s.first||(s.first=i),r&&(r.next=i),h?s.size++:t.size++,"F"!==n&&(s.index[n]=i)),t}function y(t,r){var o,t=v(t),n=f(r);if("F"!==n)return t.index[n];for(o=t.first;o;o=o.next)if(o.key==r)return o}var g=t(function(t,n){l(t,g,r),p(t,{type:r,index:s(null),first:void 0,last:void 0,size:0}),h||(t.size=0),null!=n&&u(n,t[c],t,o)}),v=m(r);return i(g.prototype,{clear:function(){for(var t=v(this),r=t.index,o=t.first;o;)o.removed=!0,o.previous&&(o.previous=o.previous.next=void 0),delete r[o.index],o=o.next;t.first=t.last=void 0,h?t.size=0:this.size=0},delete:function(t){var r,o,n=v(this),t=y(this,t);return t&&(r=t.next,o=t.previous,delete n.index[t.index],t.removed=!0,o&&(o.next=r),r&&(r.previous=o),n.first==t&&(n.first=r),n.last==t&&(n.last=o),h?n.size--:this.size--),!!t},forEach:function(t){for(var r,o=v(this),n=a(t,1<arguments.length?arguments[1]:void 0,3);r=r?r.next:o.first;)for(n(r.value,r.key,this);r&&r.removed;)r=r.previous},has:function(t){return!!y(this,t)}}),i(g.prototype,o?{get:function(t){return(t=y(this,t))&&t.value},set:function(t,r){return d(this,0===t?0:t,r)}}:{add:function(t){return d(this,t=0===t?0:t,t)}}),h&&n(g.prototype,"size",{get:function(){return v(this).size}}),g},setStrong:function(t,r,o){var n=r+" Iterator",s=m(r),i=m(n);c(t,r,function(t,r){p(this,{type:n,target:t,state:s(t),kind:r,last:void 0})},function(){for(var t=i(this),r=t.kind,o=t.last;o&&o.removed;)o=o.previous;return t.target&&(t.last=o=o?o.next:t.state.first)?"keys"==r?{value:o.key,done:!1}:"values"==r?{value:o.value,done:!1}:{value:[o.key,o.value],done:!1}:{value:t.target=void 0,done:!0}},o?"entries":"values",!o,!0),d(r)}}},{"../internals/an-instance":9,"../internals/define-iterator":41,"../internals/descriptors":43,"../internals/function-bind-context":55,"../internals/internal-metadata":70,"../internals/internal-state":71,"../internals/iterate":78,"../internals/object-create":91,"../internals/object-define-property":93,"../internals/redefine-all":109,"../internals/set-species":118}],31:[function(t,r,o){"use strict";function n(t){return t.frozen||(t.frozen=new s)}function s(){this.entries=[]}function i(t,r){return g(t.entries,function(t){return t[0]===r})}var a=t("../internals/redefine-all"),l=t("../internals/internal-metadata").getWeakData,u=t("../internals/an-object"),c=t("../internals/is-object"),d=t("../internals/an-instance"),h=t("../internals/iterate"),f=t("../internals/array-iteration"),p=t("../internals/has"),t=t("../internals/internal-state"),m=t.set,y=t.getterFor,g=f.find,v=f.findIndex,b=0;s.prototype={get:function(t){if(t=i(this,t))return t[1]},has:function(t){return!!i(this,t)},set:function(t,r){var o=i(this,t);o?o[1]=r:this.entries.push([t,r])},delete:function(t){var r=v(this.entries,function(r){return r[0]===t});return~r&&this.entries.splice(r,1),!!~r}},r.exports={getConstructor:function(t,r,o,s){function i(t,r,o){var s=g(t),i=l(u(r),!0);return!0===i?n(s).set(r,o):i[s.id]=o,t}var f=t(function(t,n){d(t,f,r),m(t,{type:r,id:b++,frozen:void 0}),null!=n&&h(n,t[s],t,o)}),g=y(r);return a(f.prototype,{delete:function(t){var r,o=g(this);return!!c(t)&&(!0===(r=l(t))?n(o).delete(t):r&&p(r,o.id)&&delete r[o.id])},has:function(t){var r,o=g(this);return!!c(t)&&(!0===(r=l(t))?n(o).has(t):r&&p(r,o.id))}}),a(f.prototype,o?{get:function(t){var r,o=g(this);if(c(t))return!0===(r=l(t))?n(o).get(t):r?r[o.id]:void 0},set:function(t,r){return i(this,t,r)}}:{add:function(t){return i(this,t,!0)}}),f}}},{"../internals/an-instance":9,"../internals/an-object":10,"../internals/array-iteration":19,"../internals/has":61,"../internals/internal-metadata":70,"../internals/internal-state":71,"../internals/is-object":75,"../internals/iterate":78,"../internals/redefine-all":109}],32:[function(t,r,o){"use strict";var n=t("../internals/export"),s=t("../internals/global"),i=t("../internals/is-forced"),a=t("../internals/redefine"),l=t("../internals/internal-metadata"),u=t("../internals/iterate"),c=t("../internals/an-instance"),d=t("../internals/is-object"),h=t("../internals/fails"),f=t("../internals/check-correctness-of-iteration"),p=t("../internals/set-to-string-tag"),m=t("../internals/inherit-if-required");r.exports=function(t,r,o){function y(t){var r=E[t];a(E,t,"add"==t?function(t){return r.call(this,0===t?0:t),this}:"delete"==t?function(t){return!(w&&!d(t))&&r.call(this,0===t?0:t)}:"get"==t?function(t){return w&&!d(t)?void 0:r.call(this,0===t?0:t)}:"has"==t?function(t){return!(w&&!d(t))&&r.call(this,0===t?0:t)}:function(t,o){return r.call(this,0===t?0:t,o),this})}var g,v,b,_,j,x=-1!==t.indexOf("Map"),w=-1!==t.indexOf("Weak"),S=x?"set":"add",T=s[t],E=T&&T.prototype,M=T,k={};
1return i(t,"function"!=typeof T||!(w||E.forEach&&!h(function(){(new T).entries().next()})))?(M=o.getConstructor(r,t,x,S),l.REQUIRED=!0):i(t,!0)&&(v=(g=new M)[S](w?{}:-0,1)!=g,b=h(function(){g.has(1)}),_=f(function(t){new T(t)}),j=!w&&h(function(){for(var t=new T,r=5;r--;)t[S](r,r);return!t.has(-0)}),_||(((M=r(function(r,o){return c(r,M,t),r=m(new T,r,M),null!=o&&u(o,r[S],r,x),r})).prototype=E).constructor=M),(b||j)&&(y("delete"),y("has"),x&&y("get")),(j||v)&&y(S),w&&E.clear&&delete E.clear),k[t]=M,n({global:!0,forced:M!=T},k),p(M,t),w||o.setStrong(M,t,x),M}},{"../internals/an-instance":9,"../internals/check-correctness-of-iteration":27,"../internals/export":50,"../internals/fails":51,"../internals/global":60,"../internals/inherit-if-required":68,"../internals/internal-metadata":70,"../internals/is-forced":74,"../internals/is-object":75,"../internals/iterate":78,"../internals/redefine":110,"../internals/set-to-string-tag":119}],33:[function(t,r,o){var n=t("../internals/has"),s=t("../internals/own-keys"),i=t("../internals/object-get-own-property-descriptor"),a=t("../internals/object-define-property");r.exports=function(t,r){for(var o=s(r),l=a.f,u=i.f,c=0;c<o.length;c++){var d=o[c];n(t,d)||l(t,d,u(r,d))}}},{"../internals/has":61,"../internals/object-define-property":93,"../internals/object-get-own-property-descriptor":94,"../internals/own-keys":105}],34:[function(t,r,o){var n=t("../internals/well-known-symbol")("match");r.exports=function(t){var r=/./;try{"/./"[t](r)}catch(o){try{return r[n]=!1,"/./"[t](r)}catch(t){}}return!1}},{"../internals/well-known-symbol":150}],35:[function(t,r,o){t=t("../internals/fails"),r.exports=!t(function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype})},{"../internals/fails":51}],36:[function(t,r,o){var n=t("../internals/require-object-coercible"),s=/"/g;r.exports=function(t,r,o,i){var t=String(n(t)),a="<"+r;return""!==o&&(a+=" "+o+'="'+String(i).replace(s,""")+'"'),a+">"+t+"</"+r+">"}},{"../internals/require-object-coercible":115}],37:[function(t,r,o){"use strict";function n(){return this}var s=t("../internals/iterators-core").IteratorPrototype,i=t("../internals/object-create"),a=t("../internals/create-property-descriptor"),l=t("../internals/set-to-string-tag"),u=t("../internals/iterators");r.exports=function(t,r,o){return r+=" Iterator",t.prototype=i(s,{next:a(1,o)}),l(t,r,!1,!0),u[r]=n,t}},{"../internals/create-property-descriptor":39,"../internals/iterators":80,"../internals/iterators-core":79,"../internals/object-create":91,"../internals/set-to-string-tag":119}],38:[function(t,r,o){var n=t("../internals/descriptors"),s=t("../internals/object-define-property"),i=t("../internals/create-property-descriptor");r.exports=n?function(t,r,o){return s.f(t,r,i(1,o))}:function(t,r,o){return t[r]=o,t}},{"../internals/create-property-descriptor":39,"../internals/descriptors":43,"../internals/object-define-property":93}],39:[function(t,r,o){r.exports=function(t,r){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:r}}},{}],40:[function(t,r,o){"use strict";var n=t("../internals/to-primitive"),s=t("../internals/object-define-property"),i=t("../internals/create-property-descriptor");r.exports=function(t,r,o){(r=n(r))in t?s.f(t,r,i(0,o)):t[r]=o}},{"../internals/create-property-descriptor":39,"../internals/object-define-property":93,"../internals/to-primitive":142}],41:[function(t,r,o){"use strict";function n(){return this}var s=t("../internals/export"),i=t("../internals/create-iterator-constructor"),a=t("../internals/object-get-prototype-of"),l=t("../internals/object-set-prototype-of"),u=t("../internals/set-to-string-tag"),c=t("../internals/create-non-enumerable-property"),d=t("../internals/redefine"),h=t("../internals/well-known-symbol"),f=t("../internals/is-pure"),p=t("../internals/iterators"),t=t("../internals/iterators-core"),m=t.IteratorPrototype,y=t.BUGGY_SAFARI_ITERATORS,g=h("iterator"),v="values",b="entries";r.exports=function(t,r,o,h,_,j,x){function w(t){if(t===_&&O)return O;if(!y&&t in M)return M[t];switch(t){case"keys":case v:case b:return function(){return new o(this,t)}}return function(){return new o(this)}}i(o,r,h);var S,T,h=r+" Iterator",E=!1,M=t.prototype,k=M[g]||M["@@iterator"]||_&&M[_],O=!y&&k||w(_),C="Array"==r&&M.entries||k;if(C&&(C=a(C.call(new t)),m!==Object.prototype&&C.next&&(f||a(C)===m||(l?l(C,m):"function"!=typeof C[g]&&c(C,g,n)),u(C,h,!0,!0),f&&(p[h]=n))),_==v&&k&&k.name!==v&&(E=!0,O=function(){return k.call(this)}),f&&!x||M[g]===O||c(M,g,O),p[r]=O,_){if(S={values:w(v),keys:j?O:w("keys"),entries:w(b)},x)for(T in S)!y&&!E&&T in M||d(M,T,S[T]);else s({target:r,proto:!0,forced:y||E},S)}return S}},{"../internals/create-iterator-constructor":37,"../internals/create-non-enumerable-property":38,"../internals/export":50,"../internals/is-pure":76,"../internals/iterators":80,"../internals/iterators-core":79,"../internals/object-get-prototype-of":98,"../internals/object-set-prototype-of":102,"../internals/redefine":110,"../internals/set-to-string-tag":119,"../internals/well-known-symbol":150}],42:[function(t,r,o){var n=t("../internals/path"),s=t("../internals/has"),i=t("../internals/well-known-symbol-wrapped"),a=t("../internals/object-define-property").f;r.exports=function(t){var r=n.Symbol||(n.Symbol={});s(r,t)||a(r,t,{value:i.f(t)})}},{"../internals/has":61,"../internals/object-define-property":93,"../internals/path":106,"../internals/well-known-symbol-wrapped":149}],43:[function(t,r,o){t=t("../internals/fails"),r.exports=!t(function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}}
1)[1]})},{"../internals/fails":51}],44:[function(t,r,o){var n=t("../internals/global"),t=t("../internals/is-object"),s=n.document,i=t(s)&&t(s.createElement);r.exports=function(t){return i?s.createElement(t):{}}},{"../internals/global":60,"../internals/is-object":75}],45:[function(t,r,o){r.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},{}],46:[function(t,r,o){t=t("../internals/engine-user-agent"),r.exports=/(iphone|ipod|ipad).*applewebkit/i.test(t)},{"../internals/engine-user-agent":47}],47:[function(t,r,o){t=t("../internals/get-built-in"),r.exports=t("navigator","userAgent")||""},{"../internals/get-built-in":57}],48:[function(t,r,o){var n,s,i=t("../internals/global"),t=t("../internals/engine-user-agent"),i=i.process,i=i&&i.versions,i=i&&i.v8;i?s=(n=i.split("."))[0]+n[1]:t&&(!(n=t.match(/Edge\/(\d+)/))||74<=n[1])&&(n=t.match(/Chrome\/(\d+)/))&&(s=n[1]),r.exports=s&&+s},{"../internals/engine-user-agent":47,"../internals/global":60}],49:[function(t,r,o){r.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},{}],50:[function(t,r,o){var n=t("../internals/global"),s=t("../internals/object-get-own-property-descriptor").f,i=t("../internals/create-non-enumerable-property"),a=t("../internals/redefine"),l=t("../internals/set-global"),u=t("../internals/copy-constructor-properties"),c=t("../internals/is-forced");r.exports=function(t,r){var o,d,h,f=t.target,p=t.global,m=t.stat,y=p?n:m?n[f]||l(f,{}):(n[f]||{}).prototype;if(y)for(o in r){if(d=r[o],h=t.noTargetGet?(h=s(y,o))&&h.value:y[o],!c(p?o:f+(m?".":"#")+o,t.forced)&&void 0!==h){if(typeof d==typeof h)continue;u(d,h)}(t.sham||h&&h.sham)&&i(d,"sham",!0),a(y,o,d,t)}}},{"../internals/copy-constructor-properties":33,"../internals/create-non-enumerable-property":38,"../internals/global":60,"../internals/is-forced":74,"../internals/object-get-own-property-descriptor":94,"../internals/redefine":110,"../internals/set-global":117}],51:[function(t,r,o){r.exports=function(t){try{return!!t()}catch(t){return!0}}},{}],52:[function(t,r,o){"use strict";t("../modules/es.regexp.exec");var n=t("../internals/redefine"),s=t("../internals/fails"),i=t("../internals/well-known-symbol"),a=t("../internals/regexp-exec"),l=t("../internals/create-non-enumerable-property"),u=i("species"),c=!s(function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")}),d="$0"==="a".replace(/./,"$0"),t=i("replace"),h=!!/./[t]&&""===/./[t]("a","$0"),f=!s(function(){var t=/(?:)/,r=t.exec,t=(t.exec=function(){return r.apply(this,arguments)},"ab".split(t));return 2!==t.length||"a"!==t[0]||"b"!==t[1]});r.exports=function(t,r,o,p){var m,y,g=i(t),v=!s(function(){var r={};return r[g]=function(){return 7},7!=""[t](r)}),b=v&&!s(function(){var r=!1,o=/a/;return"split"===t&&((o={constructor:{}}).constructor[u]=function(){return o},o.flags="",o[g]=/./[g]),o.exec=function(){return r=!0,null},o[g](""),!r});v&&b&&("replace"!==t||c&&d&&!h)&&("split"!==t||f)||(m=/./[g],o=(b=o(g,""[t],function(t,r,o,n,s){return r.exec===a?v&&!s?{done:!0,value:m.call(r,o,n)}:{done:!0,value:t.call(o,r,n)}:{done:!1}},{REPLACE_KEEPS_$0:d,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:h}))[0],y=b[1],n(String.prototype,t,o),n(RegExp.prototype,g,2==r?function(t,r){return y.call(t,this,r)}:function(t){return y.call(t,this)})),p&&l(RegExp.prototype[g],"sham",!0)}},{"../internals/create-non-enumerable-property":38,"../internals/fails":51,"../internals/redefine":110,"../internals/regexp-exec":112,"../internals/well-known-symbol":150,"../modules/es.regexp.exec":195}],53:[function(t,r,o){"use strict";var n=t("../internals/is-array"),s=t("../internals/to-length"),i=t("../internals/function-bind-context");r.exports=function t(r,o,a,l,u,c,d,h){for(var f,p=u,m=0,y=!!d&&i(d,h,3);m<l;){if(m in a){if(f=y?y(a[m],m,o):a[m],0<c&&n(f))p=t(r,o,f,s(f.length),p,c-1)-1;
1else{if(9007199254740991<=p)throw TypeError("Exceed the acceptable array length");r[p]=f}p++}m++}return p}},{"../internals/function-bind-context":55,"../internals/is-array":73,"../internals/to-length":138}],54:[function(t,r,o){t=t("../internals/fails"),r.exports=!t(function(){return Object.isExtensible(Object.preventExtensions({}))})},{"../internals/fails":51}],55:[function(t,r,o){var n=t("../internals/a-function");r.exports=function(t,r,o){if(n(t),void 0===r)return t;switch(o){case 0:return function(){return t.call(r)};case 1:return function(o){return t.call(r,o)};case 2:return function(o,n){return t.call(r,o,n)};case 3:return function(o,n,s){return t.call(r,o,n,s)}}return function(){return t.apply(r,arguments)}}},{"../internals/a-function":5}],56:[function(t,r,o){"use strict";var n=t("../internals/a-function"),s=t("../internals/is-object"),i=[].slice,a={};r.exports=Function.bind||function(t){var r=n(this),o=i.call(arguments,1),l=function(){var n=o.concat(i.call(arguments));if(this instanceof l){var s=n.length;if(!(s in a)){for(var u=[],c=0;c<s;c++)u[c]="a["+c+"]";a[s]=Function("C,a","return new C("+u.join(",")+")")}return a[s](r,n)}return r.apply(t,n)};return s(r.prototype)&&(l.prototype=r.prototype),l}},{"../internals/a-function":5,"../internals/is-object":75}],57:[function(t,r,o){function n(t){return"function"==typeof t?t:void 0}var s=t("../internals/path"),i=t("../internals/global");r.exports=function(t,r){return arguments.length<2?n(s[t])||n(i[t]):s[t]&&s[t][r]||i[t]&&i[t][r]}},{"../internals/global":60,"../internals/path":106}],58:[function(t,r,o){var n=t("../internals/classof"),s=t("../internals/iterators"),i=t("../internals/well-known-symbol")("iterator");r.exports=function(t){if(null!=t)return t[i]||t["@@iterator"]||s[n(t)]}},{"../internals/classof":29,"../internals/iterators":80,"../internals/well-known-symbol":150}],59:[function(t,r,o){var n=t("../internals/an-object"),s=t("../internals/get-iterator-method");r.exports=function(t){var r=s(t);if("function"!=typeof r)throw TypeError(String(t)+" is not iterable");return n(r.call(t))}},{"../internals/an-object":10,"../internals/get-iterator-method":58}],60:[function(t,r,n){(function(t){function o(t){return t&&t.Math==Math&&t}r.exports=o("object"==typeof globalThis&&globalThis)||o("object"==typeof window&&window)||o("object"==typeof self&&self)||o("object"==typeof t&&t)||Function("return this")()}).call(this,void 0!==o.g?o.g:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],61:[function(t,r,o){var n={}.hasOwnProperty;r.exports=function(t,r){return n.call(t,r)}},{}],62:[function(t,r,o){r.exports={}},{}],63:[function(t,r,o){var n=t("../internals/global");r.exports=function(t,r){var o=n.console;o&&o.error&&(1==arguments.length?o.error(t):o.error(t,r))}},{"../internals/global":60}],64:[function(t,r,o){t=t("../internals/get-built-in"),r.exports=t("document","documentElement")},{"../internals/get-built-in":57}],65:[function(t,r,o){var n=t("../internals/descriptors"),s=t("../internals/fails"),i=t("../internals/document-create-element");r.exports=!n&&!s(function(){return 7!=Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a})},{"../internals/descriptors":43,"../internals/document-create-element":44,"../internals/fails":51}],66:[function(t,r,o){var n=Math.abs,s=Math.pow,i=Math.floor,a=Math.log,l=Math.LN2;r.exports={pack:function(t,r,o){var u,c,d,h=Array(o),f=8*o-r-1,o=(1<<f)-1,p=o>>1,m=23===r?s(2,-24)-s(2,-77):0,y=t<0||0===t&&1/t<0?1:0,g=0;for((t=n(t))!=t||t===1/0?(c=t!=t?1:0,u=o):(u=i(a(t)/l),t*(d=s(2,-u))<1&&(u--,d*=2),2<=(t+=1<=u+p?m/d:m*s(2,1-p))*d&&(u++,d/=2),o<=u+p?(c=0,u=o):1<=u+p?(c=(t*d-1)*s(2,r),u+=p):(c=t*s(2,p-1)*s(2,r),u=0));8<=r;h[g++]=255&c,c/=256,r-=8);for(u=u<<r|c,f+=r;0<f;h[g++]=255&u,u/=256,f-=8);return h[--g]|=128*y,h},unpack:function(t,r){var o,n=t.length,i=8*n-r-1,a=(1<<i)-1,l=a>>1,u=i-7,c=n-1,i=t[c--],d=127&i;for(i>>=7;0<u;d=256*d+t[c],c--,u-=8);for(o=d&(1<<-u)-1,d>>=-u,u+=r;0<u;o=256*o+t[c],c--,u-=8);if(0===d)d=1-l;else{if(d===a)return o?NaN:i?-1/0:1/0;o+=s(2,r),d-=l}return(i?-1:1)*o*s(2,d-r)}}},{}],67:[function(t,r,o){var n=t("../internals/fails"),s=t("../internals/classof-raw"),i="".split;r.exports=n(function(){return!Object("z").propertyIsEnumerable(0)})?function(t){return"String"==s(t)?i.call(t,""):Object(t)}:Object},{"../internals/classof-raw":28,"../internals/fails":51}],68:[function(t,r,o){var n=t("../internals/is-object"),s=t("../internals/object-set-prototype-of");r.exports=function(t,r,o){return s&&"function"==typeof(r=r.constructor)&&r!==o&&n(r=r.prototype)&&r!==o.prototype&&s(t,r),t}},{"../internals/is-object":75,"../internals/object-set-prototype-of":102}],69:[function(t,r,o){var t=t("../internals/shared-store"),n=Function.toString;"function"!=typeof t.inspectSource&&(t.inspectSource=function(t){return n.call(t)}),r.exports=t.inspectSource},{"../internals/shared-store":121}],70:[function(t,r,o){function n(t){l(t,d,{value:{objectID:"O"+ ++h,weakData:{}}})}var s=t("../internals/hidden-keys"),i=t("../internals/is-object"),a=t("../internals/has"),l=t("../internals/object-define-property").f,u=t("../internals/uid"),c=t("../internals/freezing"),d=u("meta"),h=0,f=Object.isExtensible||function(){return!0},p=r.exports={REQUIRED:!1,fastKey:function(t,r){if(!i(t))return"symbol"==typeof t?t:("str
1ing"==typeof t?"S":"P")+t;if(!a(t,d)){if(!f(t))return"F";if(!r)return"E";n(t)}return t[d].objectID},getWeakData:function(t,r){if(!a(t,d)){if(!f(t))return!0;if(!r)return!1;n(t)}return t[d].weakData},onFreeze:function(t){return c&&p.REQUIRED&&f(t)&&!a(t,d)&&n(t),t}};s[d]=!0},{"../internals/freezing":54,"../internals/has":61,"../internals/hidden-keys":62,"../internals/is-object":75,"../internals/object-define-property":93,"../internals/uid":147}],71:[function(t,r,o){var n,s,i,a,l,u,c,d,h=t("../internals/native-weak-map"),f=t("../internals/global"),p=t("../internals/is-object"),m=t("../internals/create-non-enumerable-property"),y=t("../internals/has"),g=t("../internals/shared-key"),t=t("../internals/hidden-keys"),f=f.WeakMap;c=h?(s=(n=new f).get,i=n.has,a=n.set,l=function(t,r){return a.call(n,t,r),r},u=function(t){return s.call(n,t)||{}},function(t){return i.call(n,t)}):(t[d=g("state")]=!0,l=function(t,r){return m(t,d,r),r},u=function(t){return y(t,d)?t[d]:{}},function(t){return y(t,d)}),r.exports={set:l,get:u,has:c,enforce:function(t){return c(t)?u(t):l(t,{})},getterFor:function(t){return function(r){if(p(r)&&(r=u(r)).type===t)return r;throw TypeError("Incompatible receiver, "+t+" required")}}}},{"../internals/create-non-enumerable-property":38,"../internals/global":60,"../internals/has":61,"../internals/hidden-keys":62,"../internals/is-object":75,"../internals/native-weak-map":86,"../internals/shared-key":120}],72:[function(t,r,o){var n=t("../internals/well-known-symbol"),s=t("../internals/iterators"),i=n("iterator"),a=Array.prototype;r.exports=function(t){return void 0!==t&&(s.Array===t||a[i]===t)}},{"../internals/iterators":80,"../internals/well-known-symbol":150}],73:[function(t,r,o){var n=t("../internals/classof-raw");r.exports=Array.isArray||function(t){return"Array"==n(t)}},{"../internals/classof-raw":28}
1],74:[function(t,r,o){function n(t,r){return(t=l[a(t)])==c||t!=u&&("function"==typeof r?s(r):!!r)}var s=t("../internals/fails"),i=/#|\.prototype\./,a=n.normalize=function(t){return String(t).replace(i,".").toLowerCase()},l=n.data={},u=n.NATIVE="N",c=n.POLYFILL="P";r.exports=n},{"../internals/fails":51}],75:[function(t,r,o){r.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},{}],76:[function(t,r,o){r.exports=!1},{}],77:[function(t,r,o){var n=t("../internals/is-object"),s=t("../internals/classof-raw"),i=t("../internals/well-known-symbol")("match");r.exports=function(t){var r;return n(t)&&(void 0!==(r=t[i])?!!r:"RegExp"==s(t))}},{"../internals/classof-raw":28,"../internals/is-object":75,"../internals/well-known-symbol":150}],78:[function(t,r,o){function n(t,r){this.stopped=t,this.result=r}var s=t("../internals/an-object"),i=t("../internals/is-array-iterator-method"),a=t("../internals/to-length"),l=t("../internals/function-bind-context"),u=t("../internals/get-iterator-method"),c=t("../internals/call-with-safe-iteration-closing");(r.exports=function(t,r,o,d,h){var f,p,m,y,g,v,b=l(r,o,d?2:1);if(h)f=t;else{if("function"!=typeof(r=u(t)))throw TypeError("Target is not iterable");if(i(r)){for(p=0,m=a(t.length);p<m;p++)if((y=d?b(s(v=t[p])[0],v[1]):b(t[p]))&&y instanceof n)return y;return new n(!1)}f=r.call(t)}for(g=f.next;!(v=g.call(f)).done;)if("object"==typeof(y=c(f,b,v.value,d))&&y&&y instanceof n)return y;return new n(!1)}).stop=function(t){return new n(!0,t)}},{"../internals/an-object":10,"../internals/call-with-safe-iteration-closing":26,"../internals/function-bind-context":55,"../internals/get-iterator-method":58,"../internals/is-array-iterator-method":72,"../internals/to-length":138}],79:[function(t,r,o){"use strict";var n,s,i=t("../internals/object-get-prototype-of"),a=t("../internals/create-non-enumerable-property"),l=t("../internals/has"),u=t("../internals/well-known-symbol"),t=t("../internals/is-pure"),u=u("iterator"),c=!1;[].keys&&("next"in(s=[].keys())?(i=i(i(s)))!==Object.prototype&&(n=i):c=!0),null==n&&(n={}),t||l(n,u)||a(n,u,function(){return this}),r.exports={IteratorPrototype:n,BUGGY_SAFARI_ITERATORS:c}},{"../internals/create-non-enumerable-property":38,"../internals/has":61,"../internals/is-pure":76,"../internals/object-get-prototype-of":98,"../internals/well-known-symbol":150}],80:[function(t,r,o){r.exports={}},{}],81:[function(t,r,o){r.exports=Math.sign||function(t){return 0==(t=+t)||t!=t?t:t<0?-1:1}},{}],82:[function(t,r,o){var n,s,i,a,l,u,c,d,h=t("../internals/global"),f=t("../internals/object-get-own-property-descriptor").f,p=t("../internals/classof-raw"),m=t("../internals/task").set,t=t("../internals/engine-is-ios"),y=h.MutationObserver||h.WebKitMutationObserver,g=h.process,v=h.Promise,b="process"==p(g),p=f(h,"queueMicrotask"),f=p&&p.value;f||(n=function(){var t,r;for(b&&(t=g.domain)&&t.exit();s;){r=s.fn,s=s.next;try{r()}catch(t){throw s?a():i=void 0,t}}i=void 0,t&&t.enter()},a=b?function(){g.nextTick(n)}:y&&!t?(l=!0,u=document.createTextNode(""),new y(n).observe(u,{characterData:!0}),function(){u.data=l=!l}):v&&v.resolve?(d=(c=v.resolve(void 0)).then,function(){d.call(c,n)}):function(){m.call(h,n)}),r.exports=f||function(t){t={fn:t,next:void 0},i&&(i.next=t),s||(s=t,a()),i=t}},{"../internals/classof-raw":28,"../internals/engine-is-ios":46,"../internals/global":60,"../internals/object-get-own-property-descriptor":94,"../internals/task":132}],83:[function(t,r,o){t=t("../internals/global"),r.exports=t.Promise},{"../internals/global":60}],84:[function(t,r,o){t=t("../internals/fails"),r.exports=!!Object.getOwnPropertySymbols&&!t(function(){return!String(Symbol())})},{"../internals/fails":51}],85:[function(t,r,o){var n=t("../internals/fails"),s=t("../internals/well-known-symbol"),i=t("../internals/is-pure"),a=s("iterator");r.exports=!n(function(){var t=new URL("b?a=1&b=2&c=3","http://a"),r=t.searchParams,o="";return t.pathname="c%20d",r.forEach(function(t,n){r.delete("b"),o+=n+t}),i&&!t.toJSON||!r.sort||"http://a/c%20d?a=1&c=3"!==t.href||"3"!==r.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!r[a]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("http://ÑеÑÑ").host||"#%D0%B1"!==new URL("http://a#б").hash||"a1c3"!==o||"x"!==new URL("http://x",void 0).host})},{"../internals/fails":51,"../internals/is-pure":76,"../internals/well-known-symbol":150}],86:[function(t,r,o){var n=t("../internals/global"),t=t("../internals/inspect-source"),n=n.WeakMap;r.exports="function"==typeof n&&/native code/.test(t(n))},{"../internals/global":60,"../internals/inspect-source":69}],87:[function(t,r,o){"use strict";function n(t){var r,o;this.promise=new t(function(t,n){if(void 0!==r||void 0!==o)throw TypeError("Bad Promise constructor");r=t,o=n}),this.resolve=s(r),this.reject=s(o)}var s=t("../internals/a-function");r.exports.f=function(t){return new n(t)}},{"../internals/a-function":5}],88:[function(t,r,o){var n=t("../internals/is-regexp");r.exports=function(t){if(n(t))throw TypeError("The method doesn't accept regular expressions");return t}},{"../internals/is-regexp":77}],89:[function(t,r,o){var n=t("../internals/global").isFinite;r.exports=Number.isFinite||function(t){return"number"==typeof t&&n(t)}},{"../internals/global":60}],90:[function(t,r,o){"use strict";var n=t("../internals/descriptors"),s=t("../internals/fails"),i=t("../internals/object-keys"),a=t("../internals/object-get-own-property-symbol
1s"),l=t("../internals/object-property-is-enumerable"),u=t("../internals/to-object"),c=t("../internals/indexed-object"),d=Object.assign,h=Object.defineProperty;r.exports=!d||s(function(){var t,r,o,s;return!(!n||1===d({b:1},d(h({},"a",{enumerable:!0,get:function(){h(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)||(r={},s="abcdefghijklmnopqrst",(t={})[o=Symbol()]=7,s.split("").forEach(function(t){r[t]=t}),7!=d({},t)[o]||i(d({},r)).join("")!=s)})?function(t,r){for(var o=u(t),s=arguments.length,d=1,h=a.f,f=l.f;d<s;)for(var p,m=c(arguments[d++]),y=h?i(m).concat(h(m)):i(m),g=y.length,v=0;v<g;)p=y[v++],n&&!f.call(m,p)||(o[p]=m[p]);return o}:d},{"../internals/descriptors":43,"../internals/fails":51,"../internals/indexed-object":67,"../internals/object-get-own-property-symbols":97,"../internals/object-keys":100,"../internals/object-property-is-enumerable":101,"../internals/to-object":139}],91:[function(t,r,o){function n(){}var s,i=t("../internals/an-object"),a=t("../internals/object-define-properties"),l=t("../internals/enum-bug-keys"),u=t("../internals/hidden-keys"),c=t("../internals/html"),d=t("../internals/document-create-element"),t=t("../internals/shared-key"),h="prototype",f="script",p=t("IE_PROTO"),m=function(t){return"<"+f+">"+t+"</"+f+">"},y=function(){try{s=document.domain&&new ActiveXObject("htmlfile")}catch(t){}y=s?((t=s).write(m("")),t.close(),r=t.parentWindow.Object,t=null,r):(t=d("iframe"),r="java"+f+":",t.style.display="none",c.appendChild(t),t.src=String(r),(r=t.contentWindow.document).open(),r.write(m("document.F=Object")),r.close(),r.F);for(var r,o=l.length;o--;)delete y[h][l[o]];return y()};u[p]=!0,r.exports=Object.create||function(t,r){var o;return null!==t?(n[h]=i(t),o=new n,n[h]=null,o[p]=t):o=y(),void 0===r?o:a(o,r)}},{"../internals/an-object":10,"../internals/document-create-element":44,"../internals/enum-bug-keys":49,"../internals/hidden-keys":62,"../internals/html":64,"../internals/object-define-properties":92,"../internals/shared-key":120}],92:[function(t,r,o){var n=t("../internals/descriptors"),s=t("../internals/object-define-property"),i=t("../internals/an-object"),a=t("../internals/object-keys");r.exports=n?Object.defineProperties:function(t,r){i(t);for(var o,n=a(r),l=n.length,u=0;u<l;)s.f(t,o=n[u++],r[o]);return t}},{"../internals/an-object":10,"../internals/descriptors":43,"../internals/object-define-property":93,"../internals/object-keys":100}],93:[function(t,r,o){var n=t("../internals/descriptors"),s=t("../internals/ie8-dom-define"),i=t("../internals/an-object"),a=t("../internals/to-primitive"),l=Object.defineProperty;o.f=n?l:function(t,r,o){if(i(t),r=a(r,!0),i(o),s)try{return l(t,r,o)}catch(t){}if("get"in o||"set"in o)throw TypeError("Accessors not supported");return"value"in o&&(t[r]=o.value),t}},{"../internals/an-object":10,"../internals/descriptors":43,"../internals/ie8-dom-define":65,"../internals/to-primitive":142}],94:[function(t,r,o){var n=t("../internals/descriptors"),s=t("../internals/object-property-is-enumerable"),i=t("../internals/create-property-descriptor"),a=t("../internals/to-indexed-object"),l=t("../internals/to-primitive"),u=t("../internals/has"),c=t("../internals/ie8-dom-define"),d=Object.getOwnPropertyDescriptor;o.f=n?d:function(t,r){if(t=a(t),r=l(r,!0),c)try{return d(t,r)}catch(t){}if(u(t,r))return i(!s.f.call(t,r),t[r])}},{"../internals/create-property-descriptor":39,"../internals/descriptors":43,"../internals/has":61,"../internals/ie8-dom-define":65,"../internals/object-property-is-enumerable":101,"../internals/to-indexed-object":136,"../internals/to-primitive":142}],95:[function(t,r,o){var n=t("../internals/to-indexed-object"),s=t("../internals/object-get-own-property-names").f,i={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];r.exports.f=function(t){if(!a||"[object Window]"!=i.call(t))return s(n(t));try{return s(t)}catch(t){return a.slice()}}},{"../internals/object-get-own-property-names":96,"../internals/to-indexed-object":136}],96:[function(t,r,o){var n=t("../internals/object-keys-internal"),s=t("../internals/enum-bug-keys").concat("length","prototype");o.f=Object.getOwnPropertyNames||function(t){return n(t,s)}},{"../internals/enum-bug-keys":49,"../internals/object-keys-internal":99}],97:[function(t,r,o){o.f=Object.getOwnPropertySymbols},{}],98:[function(t,r,o){var n=t("../internals/has"),s=t("../internals/to-object"),i=t("../internals/shared-key"),t=t("../internals/correct-prototype-getter"),a=i("IE_PROTO"),l=Object.prototype;r.exports=t?Object.getPrototypeOf:function(t){return n(t=s(t),a)?t[a]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?l:null}},{"../internals/correct-prototype-getter":35,"../internals/has":61,"../internals/shared-key":120,"../internals/to-object":139}],99:[function(t,r,o){var n=t("../internals/has"),s=t("../internals/to-indexed-object"),i=t("../internals/array-includes").indexOf,a=t("../internals/hidden-keys");r.exports=function(t,r){var o,l=s(t),u=0,c=[];for(o in l)!n(a,o)&&n(l,o)&&c.push(o);for(;r.length>u;)!n(l,o=r[u++])||~i(c,o)||c.push(o);return c}},{"../internals/array-includes":18,"../internals/has":61,"../internals/hidden-keys":62,"../internals/to-indexed-object":136}],100:[function(t,r,o){var n=t("../internals/object-keys-internal"),s=t("../internals/enum-bug-keys");r.exports=Object.keys||function(t){return n(t,s)}},{"../internals/enum-bug-keys":49,"../internals/object-keys-internal":99}],101:[function(t,r,o){"use strict";var n={}.propertyIsEnumerable,s=Object.getOwnPropertyDescriptor,i=s&&!n.call({1:2},1);o.f=i?function(t){return!!(t=s(this,t))&&t.enumerable}:n},{}],102:[function(t,r,o){var n=t("../internals/an-object"),s=t("../internals/a-possible-prototype");
1r.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,r=!1,o={};try{(t=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(o,[]),r=o instanceof Array}catch(t){}return function(o,i){return n(o),s(i),r?t.call(o,i):o.__proto__=i,o}}():void 0)},{"../internals/a-possible-prototype":6,"../internals/an-object":10}],103:[function(t,r,o){function n(t){return function(r){for(var o,n=a(r),u=i(n),c=u.length,d=0,h=[];d<c;)o=u[d++],s&&!l.call(n,o)||h.push(t?[o,n[o]]:n[o]);return h}}var s=t("../internals/descriptors"),i=t("../internals/object-keys"),a=t("../internals/to-indexed-object"),l=t("../internals/object-property-is-enumerable").f;r.exports={entries:n(!0),values:n(!1)}},{"../internals/descriptors":43,"../internals/object-keys":100,"../internals/object-property-is-enumerable":101,"../internals/to-indexed-object":136}],104:[function(t,r,o){"use strict";var n=t("../internals/to-string-tag-support"),s=t("../internals/classof");r.exports=n?({}).toString:function(){return"[object "+s(this)+"]"}},{"../internals/classof":29,"../internals/to-string-tag-support":143}],105:[function(t,r,o){var n=t("../internals/get-built-in"),s=t("../internals/object-get-own-property-names"),i=t("../internals/object-get-own-property-symbols"),a=t("../internals/an-object");r.exports=n("Reflect","ownKeys")||function(t){var r=s.f(a(t)),o=i.f;return o?r.concat(o(t)):r}},{"../internals/an-object":10,"../internals/get-built-in":57,"../internals/object-get-own-property-names":96,"../internals/object-get-own-property-symbols":97}],106:[function(t,r,o){t=t("../internals/global"),r.exports=t},{"../internals/global":60}],107:[function(t,r,o){r.exports=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}}},{}],108:[function(t,r,o){var n=t("../internals/an-object"),s=t("../internals/is-object"),i=t("../internals/new-promise-capability");r.exports=function(t,r){return n(t),s(r)&&r.constructor===t?r:((0,(t=i.f(t)).resolve)(r),t.promise)}},{"../internals/an-object":10,"../internals/is-object":75,"../internals/new-promise-capability":87}],109:[function(t,r,o){var n=t("../internals/redefine");r.exports=function(t,r,o){for(var s in r)n(t,s,r[s],o);return t}},{"../internals/redefine":110}],110:[function(t,r,o){var n=t("../internals/global"),s=t("../internals/create-non-enumerable-property"),i=t("../internals/has"),a=t("../internals/set-global"),l=t("../internals/inspect-source"),t=t("../internals/internal-state"),u=t.get,c=t.enforce,d=String(String).split("String");(r.exports=function(t,r,o,l){var u=!!l&&!!l.unsafe,h=!!l&&!!l.enumerable,l=!!l&&!!l.noTargetGet;"function"==typeof o&&("string"!=typeof r||i(o,"name")||s(o,"name",r),c(o).source=d.join("string"==typeof r?r:"")),t===n?h?t[r]=o:a(r,o):(u?!l&&t[r]&&(h=!0):delete t[r],h?t[r]=o:s(t,r,o))})(Function.prototype,"toString",function(){return"function"==typeof this&&u(this).source||l(this)})},{"../internals/create-non-enumerable-property":38,"../internals/global":60,"../internals/has":61,"../internals/inspect-source":69,"../internals/internal-state":71,"../internals/set-global":117}],111:[function(t,r,o){var n=t("./classof-raw"),s=t("./regexp-exec");r.exports=function(t,r){var o=t.exec;if("function"==typeof o){if("object"!=typeof(o=o.call(t,r)))throw TypeError("RegExp exec method returned something other than an Object or null");return o}if("RegExp"!==n(t))throw TypeError("RegExp#exec called on incompatible receiver");return s.call(t,r)}},{"./classof-raw":28,"./regexp-exec":112}],112:[function(t,r,o){"use strict";var n,s,i=t("./regexp-flags"),t=t("./regexp-sticky-helpers"),a=RegExp.prototype.exec,l=String.prototype.replace,u=(n=/a/,s=/b*/g,a.call(n,"a"),a.call(s,"a"),0!==n.lastIndex||0!==s.lastIndex),c=t.UNSUPPORTED_Y||t.BROKEN_CARET,d=void 0!==/()??/.exec("")[1];r.exports=u||d||c?function(t){var r,o,n,s,h=c&&this.sticky,f=i.call(this),p=this.source,m=0,y=t;return h&&(-1===(f=f.replace("y","")).indexOf("g")&&(f+="g"),y=String(t).slice(this.lastIndex),0<this.lastIndex&&(!this.multiline||this.multiline&&"\n"!==t[this.lastIndex-1])&&(p="(?: "+p+")",y=" "+y,m++),o=RegExp("^(?:"+p+")",f)),d&&(o=RegExp("^"+p+"$(?!\\s)",f)),u&&(r=this.lastIndex),n=a.call(h?o:this,y),h?
1n?(n.input=n.input.slice(m),n[0]=n[0].slice(m),n.index=this.lastIndex,this.lastIndex+=n[0].length):this.lastIndex=0:u&&n&&(this.lastIndex=this.global?n.index+n[0].length:r),d&&n&&1<n.length&&l.call(n[0],o,function(){for(s=1;s<arguments.length-2;s++)void 0===arguments[s]&&(n[s]=void 0)}),n}:a},{"./regexp-flags":113,"./regexp-sticky-helpers":114}],113:[function(t,r,o){"use strict";var n=t("../internals/an-object");r.exports=function(){var t=n(this),r="";return t.global&&(r+="g"),t.ignoreCase&&(r+="i"),t.multiline&&(r+="m"),t.dotAll&&(r+="s"),t.unicode&&(r+="u"),t.sticky&&(r+="y"),r}},{"../internals/an-object":10}],114:[function(t,r,o){"use strict";t=t("./fails"),o.UNSUPPORTED_Y=t(function(){var t=RegExp("a","y");return t.lastIndex=2,null!=t.exec("abcd")}),o.BROKEN_CARET=t(function(){var t=RegExp("^r","gy");return t.lastIndex=2,null!=t.exec("str")})},{"./fails":51}],115:[function(t,r,o){r.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},{}],116:[function(t,r,o){r.exports=Object.is||function(t,r){return t===r?0!==t||1/t==1/r:t!=t&&r!=r}},{}],117:[function(t,r,o){var n=t("../internals/global"),s=t("../internals/create-non-enumerable-property");r.exports=function(t,r){try{s(n,t,r)}catch(o){n[t]=r}return r}},{"../internals/create-non-enumerable-property":38,"../internals/global":60}],118:[function(t,r,o){"use strict";var n=t("../internals/get-built-in"),s=t("../internals/object-define-property"),i=t("../internals/well-known-symbol"),a=t("../internals/descriptors"),l=i("species");r.exports=function(t){var t=n(t),r=s.f;a&&t&&!t[l]&&r(t,l,{configurable:!0,get:function(){return this}})}},{"../internals/descriptors":43,"../internals/get-built-in":57,"../internals/object-define-property":93,"../internals/well-known-symbol":150}],119:[function(t,r,o){var n=t("../internals/object-define-property").f,s=t("../internals/has"),i=t("../internals/well-known-symbol")("toStringTag");r.exports=function(t,r,o){t&&!s(t=o?t:t.prototype,i)&&n(t,i,{configurable:!0,value:r})}},{"../internals/has":61,"../internals/object-define-property":93,"../internals/well-known-symbol":150}],120:[function(t,r,o){var n=t("../internals/shared"),s=t("../internals/uid"),i=n("keys");r.exports=function(t){return i[t]||(i[t]=s(t))}},{"../internals/shared":122,"../internals/uid":147}],121:[function(t,r,o){var n=t("../internals/global"),t=t("../internals/set-global"),s="__core-js_shared__",n=n[s]||t(s,{});r.exports=n},{"../internals/global":60,"../internals/set-global":117}],122:[function(t,r,o){var n=t("../internals/is-pure"),s=t("../internals/shared-store");(r.exports=function(t,r){return s[t]||(s[t]=void 0!==r?r:{})})("versions",[]).push({version:"3.6.5",mode:n?"pure":"global",copyright:"\xa9 2020 Denis Pushkarev (zloirock.ru)"})},{"../internals/is-pure":76,"../internals/shared-store":121}],123:[function(t,r,o){var n=t("../internals/an-object"),s=t("../internals/a-function"),i=t("../internals/well-known-symbol")("species");r.exports=function(t,r){var t=n(t).constructor;return void 0===t||null==(t=n(t)[i])?r:s(t)}},{"../internals/a-function":5,"../internals/an-object":10,"../internals/well-known-symbol":150}],124:[function(t,r,o){var n=t("../internals/fails");r.exports=function(t){return n(function(){var r=""[t]('"');return r!==r.toLowerCase()||3<r.split('"').length})}},{"../internals/fails":51}],125:[function(t,r,o){function n(t){return function(r,o){var n,r=String(i(r)),o=s(o),a=r.length;return o<0||a<=o?t?"":void 0:(n=r.charCodeAt(o))<55296||56319<n||o+1===a||(a=r.charCodeAt(o+1))<56320||57343<a?t?r.charAt(o):n:t?r.slice(o,o+2):a-56320+(n-55296<<10)+65536}}var s=t("../internals/to-integer"),i=t("../internals/require-object-coercible");r.exports={codeAt:n(!1),charAt:n(!0)}},{"../internals/require-object-coercible":115,"../internals/to-integer":137}],126:[function(t,r,o){t=t("../internals/engine-user-agent"),r.exports=/Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(t)},{"../internals/engine-user-agent":47}],127:[function(t,r,o){function n(t){return function(r,o,n){var r=String(a(r)),u=r.length,n=void 0===n?" ":String(n),o=s(o);return o<=u||""==n?r:((u=i.call(n,l((o-=u)/n.length))).length>o&&(u=u.slice(0,o)),t?r+u:u+r)}}var s=t("../internals/to-length"),i=t("../internals/string-repeat"),a=t("../internals/require-object-coercible"),l=
1Math.ceil;r.exports={start:n(!1),end:n(!0)}},{"../internals/require-object-coercible":115,"../internals/string-repeat":129,"../internals/to-length":138}],128:[function(t,r,o){"use strict";function n(t){return t+22+75*(t<26)}var s=/[^\0-\u007E]/,i=/[.\u3002\uFF0E\uFF61]/g,a="Overflow: input needs wider integers to process",l=Math.floor,u=String.fromCharCode;r.exports=function(t){for(var r,o=[],c=t.toLowerCase().replace(i,".").split("."),d=0;d<c.length;d++)r=c[d],o.push(s.test(r)?"xn--"+function(t){var r,o=[],s=(t=function(t){for(var r=[],o=0,n=t.length;o<n;){var s,i=t.charCodeAt(o++);55296<=i&&i<=56319&&o<n?56320==(64512&(s=t.charCodeAt(o++)))?r.push(((1023&i)<<10)+(1023&s)+65536):(r.push(i),o--):r.push(i)}return r}(t)).length,i=128,c=0,d=72;for(m=0;m<t.length;m++)(r=t[m])<128&&o.push(u(r));var h=o.length,f=h;for(h&&o.push("-");f<s;){for(var p=2147483647,m=0;m<t.length;m++)i<=(r=t[m])&&r<p&&(p=r);var y=f+1;if(p-i>l((2147483647-c)/y))throw RangeError(a);for(c+=(p-i)*y,i=p,m=0;m<t.length;m++){if((r=t[m])<i&&++c>2147483647)throw RangeError(a);if(r==i){for(var g=c,v=36;;v+=36){var b=v<=d?1:d+26<=v?26:v-d;if(g<b)break;var _=g-b,j=36-b;o.push(u(n(b+_%j))),g=l(_/j)}o.push(u(n(g))),d=function(t,r,o){var n=0;for(t=o?l(t/700):t>>1,t+=l(t/r);455<t;n+=36)t=l(t/35);return l(n+36*t/(t+38))}(c,y,f==h),c=0,++f}}++c,++i}return o.join("")}(r):r);return o.join(".")}},{}],129:[function(t,r,o){"use strict";var n=t("../internals/to-integer"),s=t("../internals/require-object-coercible");r.exports="".repeat||function(t){var r=String(s(this)),o="",i=n(t);if(i<0||i==1/0)throw RangeError("Wrong number of repetitions");for(;0<i;(i>>>=1)&&(r+=r))1&i&&(o+=r);return o}},{"../internals/require-object-coercible":115,"../internals/to-integer":137}],130:[function(t,r,o){var n=t("../internals/fails"),s=t("../internals/whitespace
1s");r.exports=function(t){return n(function(){return!!s[t]()||"â\x85á "!="â\x85á "[t]()||s[t].name!==t})}},{"../internals/fails":51,"../internals/whitespaces":151}],131:[function(t,r,o){function n(t){return function(r){return r=String(s(r)),1&t&&(r=r.replace(i,"")),r=2&t?r.replace(a,""):r}}var s=t("../internals/require-object-coercible"),t="["+t("../internals/whitespaces")+"]",i=RegExp("^"+t+t+"*"),a=RegExp(t+t+"*$");r.exports={start:n(1),end:n(2),trim:n(3)}},{"../internals/require-object-coercible":115,"../internals/whitespaces":151}],132:[function(t,r,o){function n(t){return function(){w(t)}}function s(t){w(t.data)}function i(t){l.postMessage(t+"",p.protocol+"//"+p.host)}var a,l=t("../internals/global"),u=t("../internals/fails"),c=t("../internals/classof-raw"),d=t("../internals/function-bind-context"),h=t("../internals/html"),f=t("../internals/document-create-element"),t=t("../internals/engine-is-ios"),p=l.location,m=l.setImmediate,y=l.clearImmediate,g=l.process,v=l.MessageChannel,b=l.Dispatch,_=0,j={},x="onreadystatechange",w=function(t){var r;j.hasOwnProperty(t)&&(r=j[t],delete j[t],r())};m&&y||(m=function(t){for(var r=[],o=1;o<arguments.length;)r.push(arguments[o++]);return j[++_]=function(){("function"==typeof t?t:Function(t)).apply(void 0,r)},a(_),_},y=function(t){delete j[t]},"process"==c(g)?a=function(t){g.nextTick(n(t))}:b&&b.now?a=function(t){b.now(n(t))}:v&&!t?(t=(c=new v).port2,c.port1.onmessage=s,a=d(t.postMessage,t,1)):!l.addEventListener||"function"!=typeof postMessage||l.importScripts||u(i)||"file:"===p.protocol?a=x in f("script")?function(t){h.appendChild(f("script"))[x]=function(){h.removeChild(this),w(t)}}:function(t){setTimeout(n(t),0)}:(a=i,l.addEventListener("message",s,!1))),r.exports={set:m,clear:y}},{"../internals/classof-raw":28,"../internals/document-create-element":44,"../internals/engine-is-ios":46,"../internals/fails":51,"../internals/function-bind-context":55,"../internals/global":60,"../internals/html":64}],133:[function(t,r,o){var n=t("../internals/classof-raw");r.exports=function(t){if("number"!=typeof t&&"Number"!=n(t))throw TypeError("Incorrect invocation");return+t}},{"../internals/classof-raw":28}],134:[function(t,r,o){var n=t("../internals/to-integer"),s=Math.max,i=Math.min;r.exports=function(t,r){return(t=n(t))<0?s(t+r,0):i(t,r)}},{"../internals/to-integer":137}],135:[function(t,r,o){var n=t("../internals/to-integer"),s=t("../internals/to-length");r.exports=function(t){if(void 0===t)return 0;var t=n(t),r=s(t);if(t!==r)throw RangeError("Wrong length or index");return r}},{"../internals/to-integer":137,"../internals/to-length":138}],136:[function(t,r,o){var n=t("../internals/indexed-object"),s=t("../internals/require-object-coercible");r.exports=function(t){return n(s(t))}},{"../internals/indexed-object":67,"../internals/require-object-coercible":115}],137:[function(t,r,o){var n=Math.ceil,s=Math.floor;r.exports=function(t){return isNaN(t=+t)?0:(0<t?s:n)(t)}},{}],138:[function(t,r,o){var n=t("../internals/to-integer"),s=Math.min;r.exports=function(t){return 0<t?s(n(t),9007199254740991):0}},{"../internals/to-integer":137}],139:[function(t,r,o){var n=t("../internals/require-object-coercible");r.exports=function(t){return Object(n(t))}},{"../internals/require-object-coercible":115}],140:[function(t,r,o){var n=t("../internals/to-positive-integer");r.exports=function(t,r){if((t=n(t))%r)throw RangeError("Wrong offset");return t}},{"../internals/to-positive-integer":141}],141:[function(t,r,o){var n=t("../internals/to-integer");r.exports=function(t){if((t=n(t))<0)throw RangeError("The argument can't be less than 0");return t}},{"../internals/to-integer":137}],142:[function(t,r,o){var n=t("../internals/is-object");r.exports=function(t,r){var o,s;if(!n(t))return t;if(r&&"function"==typeof(o=t.toString)&&!n(s=o.call(t))||"function"==typeof(o=t.valueOf)&&!n(s=o.call(t))||!r&&"function"==typeof(o=t.toString)&&!n(s=o.call(t)))return s;throw TypeError("Can't convert object to primitive value")}},{"../internals/is-object":75}],143:[function(t,r,o){var n={};
1n[t("../internals/well-known-symbol")("toStringTag")]="z",r.exports="[object z]"===String(n)},{"../internals/well-known-symbol":150}],144:[function(t,r,o){"use strict";function n(t,r){for(var o=0,n=r.length,s=new(Y(t))(n);o<n;)s[o]=r[o++];return s}function s(t,r){N(t,r,{get:function(){return D(this)[r]}})}function i(t){return t instanceof V||"ArrayBuffer"==(t=S(t))||"SharedArrayBuffer"==t}function a(t,r){return Z(t)&&"symbol"!=typeof r&&r in t&&String(+r)==String(r)}function l(t,r){return a(t,r=x(r,!0))?g(2,t[r]):U(t,r)}function u(t,r,o){return!(a(t,r=x(r,!0))&&T(o)&&w(o,"value"))||w(o,"get")||w(o,"set")||o.configurable||w(o,"writable")&&!o.writable||w(o,"enumerable")&&!o.enumerable?N(t,r,o):(t[r]=o.value,t)}var c=t("../internals/export"),d=t("../internals/global"),h=t("../internals/descriptors"),f=t("../internals/typed-array-constructors-require-wrappers"),p=t("../internals/array-buffer-view-core"),m=t("../internals/array-buffer"),y=t("../internals/an-instance"),g=t("../internals/create-property-descriptor"),v=t("../internals/create-non-enumerable-property"),b=t("../internals/to-length"),_=t("../internals/to-index"),j=t("../internals/to-offset"),x=t("../internals/to-primitive"),w=t("../internals/has"),S=t("../internals/classof"),T=t("../internals/is-object"),E=t("../internals/object-create"),M=t("../internals/object-set-prototype-of"),k=t("../internals/object-get-own-property-names").f,O=t("../internals/typed-array-from"),C=t("../internals/array-iteration").forEach,P=t("../internals/set-species"),A=t("../internals/object-define-property"),L=t("../internals/object-get-own-property-descriptor"),R=t("../internals/internal-state"),I=t("../internals/inherit-if-required"),D=R.get,F=R.set,N=A.f,U=L.f,B=Math.round,G=d.RangeError,V=m.ArrayBuffer,z=m.DataView,H=p.NATIVE_ARRAY_BUFFER_VIEWS,W=p.TYPED_ARRAY_TAG,q=p.TypedArray,X=p.TypedArrayPrototype,Y=p.aTypedArrayConstructor,Z=p.isTypedArray,K="BYTES_PER_ELEMENT",Q="Wrong length";h?(H||(L.f=l,A.f=u,s(X,"buffer"),s(X,"byteOffset"),s(X,"byteLength"),s(X,"length")),c({target:"Object",stat:!0,forced:!H},{getOwnPropertyDescriptor:l,defineProperty:u}),r.exports=function(t,r,o){var s=t.match(/\d+$/)[0]/8,a=t+(o?"Clamped":"")+"Array",l="get"+t,u="set"+t,h=d[a],p=h,t=p&&p.prototype,m={};H?f&&(p=r(function(t,r,o,l){return y(t,p,a),I(T(r)?i(r)?void 0!==l?new h(r,j(o,s),l):void 0!==o?new h(r,j(o,s)):new h(r):Z(r)?n(p,r):O.call(p,r):new h(_(r)),t,p)}),M&&M(p,q),C(k(h),function(t){t in p||v(p,t,h[t])}),p.prototype=t):(p=r(function(t,r,c,d){y(t,p,a);var h,f,m=0,g=0;if(T(r)){if(!i(r))return Z(r)?n(p,r):O.call(p,r);var v=r,g=j(c,s),c=r.byteLength;if(void 0===d){if(c%s||(h=c-g)<0)throw G(Q)}else if(c<(h=b(d)*s)+g)throw G(Q);f=h/s}else v=new V(h=(f=_(r))*s);for(F(t,{buffer:v,byteOffset:g,byteLength:h,length:f,view:new z(v)});m<f;)(function(t,r){N(t,r,{get:function(){var t=this;return(t=D(t)).view[l](r*s+t.byteOffset,!0)},set:function(t){var n=this;n=D(n),o&&(t=(t=B(t))<0?0:255<t?255:255&t),n.view[u](r*s+n.byteOffset,t,!0)},enumerable:!0})})(t,m++)}),M&&M(p,q),t=p.prototype=E(X)),t.constructor!==p&&v(t,"constructor",p),W&&v(t,W,a),m[a]=p,c({global:!0,forced:p!=h,sham:!H},m),K in p||v(p,K,s),K in t||v(t,K,s),P(a)}):r.exports=function(){}},{"../internals/an-instance":9,"../internals/array-buffer":13,"../internals/array-buffer-view-core":12,"../internals/array-iteration":19,"../internals/classof":29,"../internals/create-non-enumerable-property":38,"../internals/create-property-descriptor":39,"../internals/descriptors":43,"../internals/export":50,"../internals/global":60,"../internals/has":61,"../internals/inherit-if-required":68,"../internals/internal-state":71,"../internals/is-object":75,"../internals/object-create":91,"../internals/object-define-property":93,"../internals/object-get-own-property-descriptor":94,"../internals/object-get-own-property-names":96,"../internals/object-set-prototype-of":102,"../internals/set-species":118,"../internals/to-index":135,"../internals/to-length":138,"../internals/to-offset":140,"../internals/to-primitive":142,"../internals/typed-array-constructors-require-wrappers":145,"../internals/typed-array-from":146}],145:[function(t,r,o){var n=t("../internals/global"),s=t("../internals/fails"),i=t("../internals/check-correctness-of-iteration"),t=t("../internals/array-buffer-view-core").NATIVE_ARRAY_BUFFER_VIEWS,a=n.ArrayBuffer,l=n.Int8Array;r.exports=!t||!s(function(){l(1)})||!s(function(){new l(-1)})||!i(function(t){new l,new l(null),new l(1.5),new l(t)},!0)||s(function(){return 1!==new l(new a(2),1,void 0).length})},{"../internals/array-buffer-view-core":12,"../internals/check-correctness-of-iteration":27,"../internals/fails":51,"../internals/global":60}],146:[function(t,r,o){var n=t("../internals/to-object"),s=t("../internals/to-length"),i=t("../internals/get-iterator-method"),a=t("../internals/is-array-iterator-method"),l=t("../internals/function-bind-context"),u=t("../internals/array-buffer-view-core").aTypedArrayConstructor;r.exports=function(t){var r,o,c,d,h,f,p=n(t),m=arguments.length,y=1<m?arguments[1]:void 0,g=void 0!==y,v=i(p);if(null!=v&&!a(v))for(f=(h=v.call(p)).next,p=[];!(d=f.call(h)).done;)p.push(d.value);for(g&&2<m&&(y=l(y,arguments[2],2)),o=s(p.length),c=new(u(this))(o),r=0;r<o;r++)c[r]=g?y(p[r],r):p[r];return c}},{"../internals/array-buffer-view-core":12,"../internals/function-bind-context":55,"../internals/get-iterator-method":58,"../internals/is-array-iterator-method":72,"../internals/to-length":138,"../internals/to-object":139}],147:[function(t,r,o){var n=0,s=Math.random();
1r.exports=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++n+s).toString(36)}},{}],148:[function(t,r,o){t=t("../internals/native-symbol"),r.exports=t&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},{"../internals/native-symbol":84}],149:[function(t,r,o){t=t("../internals/well-known-symbol"),o.f=t},{"../internals/well-known-symbol":150}],150:[function(t,r,o){var n=t("../internals/global"),s=t("../internals/shared"),i=t("../internals/has"),a=t("../internals/uid"),l=t("../internals/native-symbol"),t=t("../internals/use-symbol-as-uid"),u=s("wks"),c=n.Symbol,d=t?c:c&&c.withoutSetter||a;r.exports=function(t){return i(u,t)||(l&&i(c,t)?u[t]=c[t]:u[t]=d("Symbol."+t)),u[t]}},{"../internals/global":60,"../internals/has":61,"../internals/native-symbol":84,"../internals/shared":122,"../internals/uid":147,"../internals/use-symbol-as-uid":148}],151:[function(t,r,o){r.exports=" \n\v\f\r \xa0áââââââ
ââââââ¯âã\u2028\u2029\uFEFF"},{}],152:[function(t,r,o){"use strict";var n=t("../internals/export"),s=t("../internals/global"),i=t("../internals/array-buffer"),t=t("../internals/set-species"),a="ArrayBuffer",i=i[a];n({global:!0,forced:s[a]!==i},{ArrayBuffer:i}),t(a)},{"../internals/array-buffer":13,"../internals/export":50,"../internals/global":60,"../internals/set-species":118}],153:[function(t,r,o){"use strict";var n=t("../internals/export"),s=t("../internals/fails"),i=t("../internals/is-array"),a=t("../internals/is-object"),l=t("../internals/to-object"),u=t("../internals/to-length"),c=t("../internals/create-property"),d=t("../internals/array-species-create"),h=t("../internals/array-method-has-species-support"),f=t("../internals/well-known-symbol"),t=t("../internals/engine-v8-version"),p=f("isConcatSpreadable"),m="Maximum allowed index exceeded",f=51<=t||!s(function(){var t=[];return t[p]=!1,t.concat()[0]!==t}),t=h("concat");n({target:"Array",proto:!0,forced:!f||!t},{concat:function(t){for(var r,o,n,s,h,f=l(this),y=d(f,0),g=0,v=-1,b=arguments.length;v<b;v++)if(h=void 0,a(s=n=-1===v?f:arguments[v])&&(void 0!==(h=s[p])?h:i(s))){if(9007199254740991<g+(o=u(n.length)))throw TypeError(m);for(r=0;r<o;r++,g++)r in n&&c(y,g,n[r])}else{if(9007199254740991<=g)throw TypeError(m);c(y,g++,n)}return y.length=g,y}})},{"../internals/array-method-has-species-support":21,"../internals/array-species-create":25,"../internals/create-property":40,"../internals/engine-v8-version":48,"../internals/export":50,"../internals/fails":51,"../internals/is-array":73,"../internals/is-object":75,"../internals/to-length":138,"../internals/to-object":139,"../internals/well-known-symbol":150}],154:[function(t,r,o){var n=t("../internals/export"),s=t("../internals/array-copy-within"),t=t("../internals/add-to-unscopables");n({target:"Array",proto:!0},{copyWithin:s}),t("copyWithin")},{"../internals/add-to-unscopables":7,"../internals/array-copy-within":14,"../internals/export":50}],155:[function(t,r,o){"use strict";var n=t("../internals/export"),s=t("../internals/array-iteration").every,i=t("../internals/array-method-is-strict"),t=t("../internals/array-method-uses-to-length"),i=i("every"),t=t("every");n({target:"Array",proto:!0,forced:!i||!t},{every:function(t){return s(this,t,1<arguments.length?arguments[1]:void 0)}})},{"../internals/array-iteration":19,"../internals/array-method-is-strict":22,"../internals/array-method-uses-to-length":23,"../internals/export":50}],156:[function(t,r,o){var n=t("../internals/export"),s=t("../internals/array-fill"),t=t("../internals/add-to-unscopables");n({target:"Array",proto:!0},{fill:s}),t("fill")},{"../internals/add-to-unscopables":7,"../internals/array-fill":15,"../internals/export":50}],157:[function(t,r,o){"use strict";var n=t("../internals/export"),s=t("../internals/array-iteration").filter,i=t("../internals/array-method-has-species-support"),t=t("../internals/array-method-uses-to-length"),i=i("filter"),t=t("filter");n({target:"Array",proto:!0,forced:!i||!t},{filter:function(t){return s(this,t,1<arguments.length?arguments[1]:void 0)}})},{"../internals/array-iteration":19,"../internals/array-method-has-s
1pecies-support":21,"../internals/array-method-uses-to-length":23,"../internals/export":50}],158:[function(t,r,o){"use strict";var n=t("../internals/export"),s=t("../internals/array-iteration").findIndex,i=t("../internals/add-to-unscopables"),t=t("../internals/array-method-uses-to-length"),a="findIndex",l=!0,t=t(a);a in[]&&[,][a](function(){l=!1}),n({target:"Array",proto:!0,forced:l||!t},{findIndex:function(t){return s(this,t,1<arguments.length?arguments[1]:void 0)}}),i(a)},{"../internals/add-to-unscopables":7,"../internals/array-iteration":19,"../internals/array-method-uses-to-length":23,"../internals/export":50}],159:[function(t,r,o){"use strict";var n=t("../internals/export"),s=t("../internals/flatten-into-array"),i=t("../internals/to-object"),a=t("../internals/to-length"),l=t("../internals/a-function"),u=t("../internals/array-species-create");n({target:"Array",proto:!0},{flatMap:function(t){var r,o=i(this),n=a(o.length);return l(t),(r=u(o,0)).length=s(r,o,o,n,0,1,t,1<arguments.length?arguments[1]:void 0),r}})},{"../internals/a-function":5,"../internals/array-species-create":25,"../internals/export":50,"../internals/flatten-into-array":53,"../internals/to-length":138,"../internals/to-object":139}],160:[function(t,r,o){"use strict";var n=t("../internals/export"),s=t("../internals/flatten-into-array"),i=t("../internals/to-object"),a=t("../internals/to-length"),l=t("../internals/to-integer"),u=t("../internals/array-species-create");n({target:"Array",proto:!0},{flat:function(){var t=arguments.length?arguments[0]:void 0,r=i(this),o=a(r.length),n=u(r,0);return n.length=s(n,r,r,o,0,void 0===t?1:l(t)),n}})},{"../internals/array-species-create":25,"../internals/export":50,"../internals/flatten-into-array":53,"../internals/to-integer":137,"../internals/to-length":138,"../internals/to-object":139}],161:[function(t,r,o){"use strict";var n=t("../internals/export"),t=t("../internals/array-for-each");n({target:"Array",proto:!0,forced:[].forEach!=t},{forEach:t})},{"../internals/array-for-each":16,"../internals/export":50}],162:[function(t,r,o){var n=t("../internals/export"),s=t("../internals/array-from");n({target:"Array",stat:!0,forced:!t("../internals/check-correctness-of-iteration")(function(t){Array.from(t)})},{from:s})},{"../internals/array-from":17,"../internals/check-correctness-of-iteration":27,"../internals/export":50}],163:[function(t,r,o){"use strict";var n=t("../internals/export"),s=t("../internals/array-includes").includes,i=t("../internals/add-to-unscopables");n({target:"Array",proto:!0,forced:!t("../internals/array-method-uses-to-length")("indexOf",{ACCESSORS:!0,1:0})},{includes:function(t){return s(this,t,1<arguments.length?arguments[1]:void 0)}}),i("includes")},{"../internals/add-to-unscopables":7,"../internals/array-includes":18,"../internals/array-method-uses-to-length":23,"../internals/export":50}],164:[function(t,r,o){"use strict";var n=t("../internals/export"),s=t("../internals/array-includes").indexOf,i=t("../internals/array-method-is-strict"),t=t("../internals/array-method-uses-to-length"),a=[].indexOf,l=!!a&&1/[1].indexOf(1,-0)<0,i=i("indexOf"),t=t("indexOf",{ACCESSORS:!0,1:0});n({target:"Array",proto:!0,forced:l||!i||!t},{indexOf:function(t){return l?a.apply(this,arguments)||0:s(this,t,1<arguments.length?arguments[1]:void 0)}})},{"../internals/array-includes":18,"../internals/array-method-is-strict":22,"../internals/array-method-uses-to-length":23,"../internals/export":50}],165:[function(t,r,o){"use strict";var n=t("../internals/to-indexed-object"),s=t("../internals/add-to-unscopables"),i=t("../internals/iterators"),a=t("../internals/internal-state"),t=t("../internals/define-iterator"),l="Array Iterator",u=a.set,c=a.getterFor(l);r.exports=t(Array,"Array",function(t,r){u(this,{type:l,target:n(t),index:0,kind:r})},function(){var t=c(this),r=t.target,o=t.kind,n=t.index++;return!r||n>=r.length?{value:t.target=void 0,done:!0}:"keys"==o?{value:n,done:!1}:"values"==o?{value:r[n],done:!1}:{value:[n,r[n]],done:!1}},"values"),i.Arguments=i.Array,s("keys"),s("values"),s("entries")},{"../internals/add-to-unscopables":7,"../internals/define-iterator":41,"../internals/internal-state":71,"../internals/iterators":80,"../internals/to-indexed-object":136}],166:[function(t,r,o){"use strict";var n=t("../internals/export"),s=t("../internals/indexed-object"),i=t("../internals/to-indexed-object"),t=t("../internals/array-method-is-strict"),a=[].join,s=s!=Object,t=t("join",",");n({target:"Array",proto:!0,forced:s||!t},{join:function(t){return a.call(i(this),void 0===t?",":t)}})},{"../internals/array-method-is-strict":22,"../internals/export":50,"../internals/indexed-object":67,"../internals/to-indexed-object":136}],167:[function(t,r,o){var n=t("../internals/export"),t=t("../internals/array-last-index-of");n({target:"Array",proto:!0,forced:t!==[].lastIndexOf},{lastIndexOf:t})},{"../internals/array-last-index-of":20,"../internals/export":50}],168:[function(t,r,o){"use strict";var n=t("../internals/export"),s=t("../internals/array-iteration").map,i=t("../internals/array-method-has-s
1pecies-support"),t=t("../internals/array-method-uses-to-length"),i=i("map"),t=t("map");n({target:"Array",proto:!0,forced:!i||!t},{map:function(t){return s(this,t,1<arguments.length?arguments[1]:void 0)}})},{"../internals/array-iteration":19,"../internals/array-method-has-species-support":21,"../internals/array-method-uses-to-length":23,"../internals/export":50}],169:[function(t,r,o){"use strict";var n=t("../internals/export"),s=t("../internals/is-object"),i=t("../internals/is-array"),a=t("../internals/to-absolute-index"),l=t("../internals/to-length"),u=t("../internals/to-indexed-object"),c=t("../internals/create-property"),d=t("../internals/well-known-symbol"),h=t("../internals/array-method-has-species-support"),t=t("../internals/array-method-uses-to-length"),h=h("slice"),t=t("slice",{ACCESSORS:!0,0:0,1:2}),f=d("species"),p=[].slice,m=Math.max;n({target:"Array",proto:!0,forced:!h||!t},{slice:function(t,r){var o,n,d,h=u(this),y=l(h.length),g=a(t,y),v=a(void 0===r?y:r,y);if(i(h)&&((o="function"==typeof(o=h.constructor)&&(o===Array||i(o.prototype))||s(o)&&null===(o=o[f])?void 0:o)===Array||void 0===o))return p.call(h,g,v);for(n=new(void 0===o?Array:o)(m(v-g,0)),d=0;g<v;g++,d++)g in h&&c(n,d,h[g]);return n.length=d,n}})},{"../internals/array-method-has-species-support":21,"../internals/array-method-uses-to-length":23,"../internals/create-property":40,"../internals/export":50,"../internals/is-array":73,"../internals/is-object":75,"../internals/to-absolute-index":134,"../internals/to-indexed-object":136,"../internals/to-length":138,"../internals/well-known-symbol":150}],170:[function(t,r,o){"use strict";var n=t("../internals/export"),s=t("../internals/array-iteration").some,i=t("../internals/array-method-is-strict"),t=t("../internals/array-method-uses-to-length"),i=i("some"),t=t("some");n({target:"Array",proto:!0,forced:!i||!t},{some:function(t){return s(this,t,1<arguments.length?arguments[1]:void 0)}})},{"../internals/array-iteration":19,"../internals/array-method-is-strict":22,"../internals/array-method-uses-to-length":23,"../internals/export":50}],171:[function(t,r,o){"use strict";var n=t("../internals/export"),s=t("../internals/to-absolute-index"),i=t("../internals/to-integer"),a=t("../internals/to-length"),l=t("../internals/to-object"),u=t("../internals/array-species-create"),c=t("../internals/create-property"),d=t("../internals/array-method-has-species-support"),t=t("../internals/array-method-uses-to-length"),d=d("splice"),t=t("splice",{ACCESSORS:!0,0:0,1:2}),h=Math.max,f=Math.min;n({target:"Array",proto:!0,forced:!d||!t},{splice:function(t,r){var o,n,d,p,m,y,g=l(this),v=a(g.length),b=s(t,v),t=arguments.length;if(0===t?o=n=0:n=1===t?(o=0,v-b):(o=t-2,f(h(i(r),0),v-b)),9007199254740991<v+o-n)throw TypeError("Maximum allowed length exceeded");for(d=u(g,n),p=0;p<n;p++)(m=b+p)in g&&c(d,p,g[m]);if(o<(d.length=n)){for(p=b;p<v-n;p++)y=p+o,(m=p+n)in g?g[y]=g[m]:delete g[y];for(p=v;v-n+o<p;p--)delete g[p-1]}else if(n<o)for(p=v-n;b<p;p--)y=p+o-1,(m=p+n-1)in g?g[y]=g[m]:delete g[y];for(p=0;p<o;p++)g[p+b]=arguments[p+2];return g.length=v-n+o,d}})},{"../internals/array-method-has-species-support":21,"../internals/array-method-uses-to-length":23,"../internals/array-species-create":25,"../internals/create-property":40,"../internals/export":50,"../internals/to-absolute-index":134,"../internals/to-integer":137,"../internals/to-length":138,"../internals/to-object":139}],172:[function(t,r,o){t("../internals/add-to-unscopables")("flatMap")},{"../internals/add-to-unscopables":7}],173:[function(t,r,o){t("../internals/add-to-unscopables")("flat")},{"../internals/add-to-unscopables":7}],174:[function(t,r,o){var n=t("../internals/descriptors"),t=t("../internals/object-define-property").f,s=Function.prototype,i=s.toString,a=/^\s*function ([^ (]*)/;!n||"name"in s||t(s,"name",{configurable:!0,get:function(){try{return i.call(this).match(a)[1]}catch(t){return""}}})},{"../internals/descriptors":43,"../internals/object-define-property":93}],175:[function(t,r,o){"use strict";var n=t("../internals/collection"),t=t("../internals/collection-strong");r.exports=n("Map",function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},t)},{"../internals/collection":32,"../internals/collection-strong":30}],176:[function(t,r,o){var t=t("../internals/export"),n=Math.hypot,s=Math.abs,i=Math.sqrt;t({target:"Math",stat:!0,forced:!!n&&n(1/0,NaN)!==1/0},{hypot:function(t,r){for(var o,n,a=0,l=0,u=arguments.length,c=0;l<u;)c<(o=s(arguments[l++]))?(a=a*(n=c/o)*n+1,c=o):a+=0<o?(n=o/c)*n:o;return c===1/0?1/0:c*i(a)}})},{"../internals/export":50}],177:[function(t,r,o){var t=t("../internals/export"),n=Math.log,s=Math.LN2;t({target:"Math",stat:!0},{log2:function(t){return n(t)/s}})},{"../internals/export":50}],178:[function(t,r,o){t("../internals/export")({target:"Math",stat:!0},{sign:t("../internals/math-sign")})},{"../internals/export":50,"../internals/math-sign":81}],179:[function(t,r,o){"use strict";function n(t){var r,o,n,s,i,a,l,u=h(t,!1);
1if("string"==typeof u&&2<u.length){if(43===(t=(u=v(u)).charCodeAt(0))||45===t){if(88===(r=u.charCodeAt(2))||120===r)return NaN}else if(48===t){switch(u.charCodeAt(1)){case 66:case 98:o=2,n=49;break;case 79:case 111:o=8,n=55;break;default:return+u}for(i=(s=u.slice(2)).length,a=0;a<i;a++)if((l=s.charCodeAt(a))<48||n<l)return NaN;return parseInt(s,o)}}return+u}var s=t("../internals/descriptors"),i=t("../internals/global"),a=t("../internals/is-forced"),l=t("../internals/redefine"),u=t("../internals/has"),c=t("../internals/classof-raw"),d=t("../internals/inherit-if-required"),h=t("../internals/to-primitive"),f=t("../internals/fails"),p=t("../internals/object-create"),m=t("../internals/object-get-own-property-names").f,y=t("../internals/object-get-own-property-descriptor").f,g=t("../internals/object-define-property").f,v=t("../internals/string-trim").trim,b="Number",_=i[b],j=_.prototype,x=c(p(j))==b;if(a(b,!_(" 0o1")||!_("0b1")||_("+0x1"))){for(var w,S=function(t){var t=arguments.length<1?0:t,r=this;return r instanceof S&&(x?f(function(){j.valueOf.call(r)}):c(r)!=b)?d(new _(n(t)),r,S):n(t)},T=s?m(_):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),E=0;T.length>E;E++)u(_,w=T[E])&&!u(S,w)&&g(S,w,y(_,w));(S.prototype=j).constructor=S,l(i,b,S)}},{"../internals/classof-raw":28,"../internals/descriptors":43,"../internals/fails":51,"../internals/global":60,"../internals/has":61,"../internals/inherit-if-required":68,"../internals/is-forced":74,"../internals/object-create":91,"../internals/object-define-property":93,"../internals/object-get-own-property-descriptor":94,"../internals/object-get-own-property-names":96,"../internals/redefine":110,"../internals/string-trim":131,"../internals/to-primitive":142}],180:[function(t,r,o){t("../internals/export")({target:"Number",stat:!0},{EPSILON:2220446049250313e-31})},{"../internals/export":50}],181:[function(t,r,o){t("../internals/export")({target:"Number",stat:!0},{isFinite:t("../internals/number-is-finite")})},{"../internals/export":50,"../internals/number-is-finite":89}],182:[function(t,r,o){"use strict";function n(t,r,o){return 0===r?o:r%2==1?n(t,r-1,o*t):n(t*t,r/2,o)}var s=t("../internals/export"),i=t("../internals/to-integer"),a=t("../internals/this-number-value"),l=t("../internals/string-repeat"),t=t("../internals/fails"),u=1..toFixed,c=Math.floor;s({target:"Number",proto:!0,forced:!t(function(){u.call({})})},{toFixed:function(t){function r(t,r){for(var o=-1,n=r;++o<6;)n+=t*f[o],f[o]=n%1e7,n=c(n/1e7)}function o(t){for(var r=6,o=0;0<=--r;)o+=f[r],f[r]=c(o/t),o=o%t*1e7}function s(){for(var t,r=6,o="";0<=--r;)""===o&&0!==r&&0===f[r]||(t=String(f[r]),o=""===o?t:o+l.call("0",7-t.length)+t);return o}var u,d,h=a(this),t=i(t),f=[0,0,0,0,0,0],p="",m="0";if(t<0||20<t)throw RangeError("Incorrect fraction digits");if(h!=h)return"NaN";if(h<=-1e21||1e21<=h)return String(h);if(h<0&&(p="-",h=-h),1e-21<h){if(h=((u=function(t){for(var r=0,o=t;4096<=o;)r+=12,o/=4096;for(;2<=o;)r+=1,o/=2;return r}(h*n(2,69,1))-69)<0?h*n(2,-u,1):h/n(2,u,1))*4503599627370496,0<(u=52-u)){for(r(0,h),d=t;7<=d;)r(1e7,0),d-=7;for(r(n(10,d,1),0),d=u-1;23<=d;)o(8388608),d-=23;o(1<<d),r(1,1),o(2),m=s()}else r(0,h),r(1<<-u,0),m=s()+l.call("0",t)}return 0<t?p+((h=m.length)<=t?"0."+l.call("0",t-h)+m:m.slice(0,h-t)+"."+m.slice(h-t)):p+m}})},{"../internals/export":50,"../internals/fails":51,"../internals/string-repeat":129,"../internals/this-number-value":133,"../internals/to-integer":137}],183:[function(t,r,o){var n=t("../internals/export"),t=t("../internals/object-assign");n({target:"Object",stat:!0,forced:Object.assign!==t},{assign:t})},{"../internals/export":50,"../internals/object-assign":90}],184:[function(t,r,o){var n=t("../internals/export"),s=t("../internals/object-to-array").entries;n({target:"Object",stat:!0},{entries:function(t){return s(t)}})},{"../internals/export":50,"../internals/object-to-array":103}],185:[function(t,r,o){var n=t("../internals/export"),s=t("../internals/iterate"),i=t("../internals/create-property");n({target:"Object",stat:!0},{fromEntries:function(t){var r={};return s(t,function(t,o){i(r,t,o)},void 0,!0),r}})},{"../internals/create-property":40,"../internals/export":50,"../internals/iterate":78}],186:[function(t,r,o){var n=t("../internals/export"),s=t("../internals/fails"),i=t("../internals/to-indexed-object"),a=t("../internals/object-get-own-property-descriptor").f,t=t("../internals/descriptors"),s=s(function(){a(1)});n({target:"Object",stat:!0,forced:!t||s,sham:!t},{getOwnPropertyDescriptor:function(t,r){return a(i(t),r)}})},{"../internals/descriptors":43,"../internals/export":50,"../internals/fails":51,"../internals/object-get-own-property-descriptor":94,"../internals/to-indexed-object":136}],187:[function(t,r,o){var n=t("../internals/export"),s=t("../internals/fails"),t=t("../internals/object-get-own-property-names-external").f;n({target:"Object",stat:!0,forced:s(function(){return!Object.getOwnPropertyNames(1)})},{getOwnPropertyNames:t})},{"../internals/export":50,"../internals/fails":51,"../internals/object-get-own-property-names-external":95}],188:[function(t,r,o){var n=t("../internals/export"),s=t("../internals/fails"),i=t("../internals/to-object"),a=t("../internals/object-get-prototype-of"),t=t("../internals/correct-prototype-getter");n({target:"Object",stat:!0,forced:s(function(){a(1)}),sham:!t},{getPrototypeOf:function(t){return a(i(t))}})},{"../internals/correct-prototype-getter":35,"../internals/export":50,"../internals/fails":51,"../internals/object-get-prototype-of":98,"../internals/to-object":139}],189:[function(t,r,o){var n=t("../internals/export"),s=t("../internals/to-object"),i=t("../internals/object-keys");n({target:"Object",stat:!0,forced:t("../internals/fails")(function(){i(1)})},{keys:function(t){return i(s(t))}})},{"../internals/export":50,"../internals/fails":51,"../internals/object-keys":100,"../internals/to-object":139}],190:[function(t,r,o){var n=t("../internals/to-string-tag-support"),s=t("../internals/redefine"),t=t("../internals/object-to-string");n||s(Object.prototype,"toString",t,{unsafe:!0})},{"../internals/object-to-string":104,"../internals/redefine":110,"../internals/to-string-tag-support":143}],191:[function(t,r,o){"use strict";var n,s,i,a,l=t("../internals/export"),u=t("../internals/is-pure"),c=t("../internals/global"),d=t("../internals/get-built-in"),h=t("../internals/native-promise-constructor"),f=t("../internals/redefine"),p=t("../internals/redefine-all"),m=t("../internals/set-to-string-tag"),y=t("../internals/set-species"),g=t("../internals/is-object"),v=t("../internals/a-function"),b=t("../internals/an-instance"),_=t("../internals/classof-raw"),j=t("../internals/inspect-source"),x=t("../internals/iterate"),w=t("../internals/check-correctness-of-iteration"),S=t("../internals/species-constructor"),T=t("../internals/task").set,E=t("../internals/microtask"),M=t("../internals/promise-resolve"),k=t("../internals/host-report-errors"),O=t("../internals/new-promise-capability"),C=t("../internals/perform"),P=t("../internals/internal-state"),A=t("../internals/is-forced"),L=t("../internals/well-known-symbol"),R=t("../internals/engine-v8-version"),I=L("species"),D="Promise",F=P.get,N=P.set,U=P.getterFor(D),B=h,G=c.TypeError,V=c.document,z=c.process,H=d("fetch"),W=O.f,q=W,X="process"==_(z),Y=!!(V&&V.createEvent&&c.dispatchEvent),Z="unhandledrejection",t=A(D,function(){var t,r;return j(B)===String(B)&&(66===R||!X&&"function"!=typeof PromiseRejectionEvent)||!(!u||B.prototype.finally)||!(51<=R&&/native code/.test(B
1))&&(r=function(t){t(function(){},function(){})},((t=B.resolve(1)).constructor={})[I]=r,!(t.then(function(){}) instanceof r))}),L=t||!w(function(t){B.all(t).catch(function(){})}),K=function(t){var r;return!(!g(t)||"function"!=typeof(r=t.then))&&r},Q=function(t,r,o){var n;r.notified||(r.notified=!0,n=r.reactions,E(function(){for(var s=r.value,i=1==r.state,a=0;n.length>a;){var l,u,d,h=n[a++],f=i?h.ok:h.fail,p=h.resolve,m=h.reject,y=h.domain;try{f?(i||(2===r.rejection&&function(t,r){T.call(c,function(){X?z.emit("rejectionHandled",t):J("rejectionhandled",t,r.value)})}(t,r),r.rejection=1),!0===f?l=s:(y&&y.enter(),l=f(s),y&&(y.exit(),d=!0)),l===h.promise?m(G("Promise-chain cycle")):(u=K(l))?u.call(l,p,m):p(l)):m(s)}catch(t){y&&!d&&y.exit(),m(t)}}r.reactions=[],r.notified=!1,o&&!r.rejection&&T.call(c,function(){var o=r.value,n=$(r);if(n&&(n=C(function(){X?z.emit("unhandledRejection",o,t):J(Z,t,o)}),r.rejection=X||$(r)?2:1,n.error))throw n.value})}))},J=function(t,r,o){var n;Y?((n=V.createEvent("Event")).promise=r,n.reason=o,n.initEvent(t,!1,!0),c.dispatchEvent(n)):n={promise:r,reason:o},(r=c["on"+t])?r(n):t===Z&&k("Unhandled promise rejection",o)},$=function(t){return 1!==t.rejection&&!t.parent},ee=function(t,r,o,n){return function(s){t(r,o,s,n)}},et=function(t,r,o,n){r.done||(r.done=!0,(r=n||r).value=o,r.state=2,Q(t,r,!0))},er=function(t,r,o,n){if(!r.done){r.done=!0,n&&(r=n);try{if(t===o)throw G("Promise can't be resolved itself");var s=K(o);s?E(function(){var n={done:!1};try{s.call(o,ee(er,t,n,r),ee(et,t,n,r))}catch(o){et(t,n,o,r)}}):(r.value=o,r.state=1,Q(t,r,!1))}catch(o){et(t,{done:!1},o,r)}}};t&&(B=function(t){b(this,B,D),v(t),n.call(this);var r=F(this);try{t(ee(er,this,r),ee(et,this,r))}catch(t){et(this,r,t)}},(n=function(t){N(this,{type:D,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=p(B.prototype,{then:function(t,r){var o=U(this),n=W(S(this,B));return n.ok="function"!=typeof t||t,n.fail="function"==typeof r&&r,n.domain=X?z.domain:void 0,o.parent=!0,o.reactions.push(n),0!=o.state&&Q(this,o,!1),n.promise},catch:function(t){return this.then(void 0,t)}}),s=function(){var t=new n,r=F(t);this.promise=t,this.resolve=ee(er,t,r),this.reject=ee(et,t,r)},O.f=W=function(t){return t===B||t===i?new s:q(t)},u||"function"!=typeof h||(a=h.prototype.then,f(h.prototype,"then",function(t,r){var o=this;return new B(function(t,r){a.call(o,t,r)}).then(t,r)},{unsafe:!0}),"function"==typeof H&&l({global:!0,enumerable:!0,forced:!0},{fetch:function(t){return M(B,H.apply(c,arguments))}}))),l({global:!0,wrap:!0,forced:t},{Promise:B}),m(B,D,!1,!0),y(D),i=d(D),l({target:D,stat:!0,forced:t},{reject:function(t){var r=W(this);return r.reject.call(void 0,t),r.promise}}),l({target:D,stat:!0,forced:u||t},{resolve:function(t){return M(u&&this===i?B:this,t)}}),l({target:D,stat:!0,forced:L},{all:function(t){var r=this,o=W(r),n=o.resolve,s=o.reject,i=C(function(){var o=v(r.resolve),i=[],a=0,l=1;x(t,function(t){var u=a++,c=!1;i.push(void 0),l++,o.call(r,t).then(function(t){c||(c=!0,i[u]=t,--l||n(i))},s)}),--l||n(i)});return i.error&&s(i.value),o.promise},race:function(t){var r=this,o=W(r),n=o.reject,s=C(function(){var s=v(r.resolve);x(t,function(t){s.call(r,t).then(o.resolve,n)})});return s.error&&n(s.value),o.promise}})},{"../internals/a-function":5,"../internals/an-instance":9,"../internals/check-correctness-of-iteration":27,"../internals/classof-raw":28,"../internals/engine-v8-version":48,"../internals/export":50,"../internals/get-built-in":57,"../internals/global":60,"../internals/host-report-errors":63,"../internals/inspect-source":69,"../internals/internal-state":71,"../internals/is-forced":74,"../internals/is-object":75,"../internals/is-pure":76,"../internals/iterate":78,"../internals/microtask":82,"../internals/native-promise-constructor":83,"../internals/new-promise-capability":87,"../internals/perform":107,"../internals/promise-resolve":108,"../internals/redefine":110,"../internals/redefine-all":109,"../internals/set-species":118,"../internals/set-to-string-tag":119,"../internals/species-constructor":123,"../internals/task":132,"../internals/well-known-symbol":150}],192:[function(t,r,o){var n=t("../internals/export"),s=t("../internals/get-built-in"),i=t("../internals/a-function"),a=t("../internals/an-object"),l=t("../internals/is-object"),u=t("../internals/object-create"),c=t("../internals/function-bind"),t=t("../internals/fails"),d=s("Reflect","construct"),h=t(function(){function t(){}return!(d(function(){},[],t) instanceof t)}),f=!t(function(){d(function(){})}),s=h||f;n({target:"Reflect",stat:!0,forced:s,sham:s},{construct:function(t,r){i(t),a(r);var o=arguments.length<3?t:i(arguments[2]);if(f&&!h)return d(t,r,o);if(t==o){switch(r.length){case 0:return new t;case 1:return new t(r[0]);case 2:return new t(r[0],r[1]);case 3:return new t(r[0],r[1],r[2]);case 4:return new t(r[0],r[1],r[2],r[3])}var n=[null];return n.push.apply(n,r),new(c.apply(t,n))}return o=u(l(n=o.prototype)?n:Object.prototype),l(n=Function.apply.call(t,o,r))?n:o}})},{"../internals/a-function":5,"../internals/an-object":10,"../internals/export":50,"../internals/fails":51,"../internals/function-bind":56,"../internals/get-built-in":57,"../internals/is-object":75,"../internals/object-create":91}],193:[function(t,r,o){var n=t("../internals/export"),s=t("../internals/is-object"),i=t("../internals/an-object"),a=t("../internals/has"),l=t("../internals/object-get-own-property-descriptor"),u=t("../internals/object-get-prototype-of");n({target:"Reflect",stat:!0},{get:function t(r,o){var n,c=arguments.length<3?r:arguments[2];return i(r)===c?r[o]:(n=l.f(r,o))?a(n,"value")?n.value:void 0===n.get?void 0:n.get.call(c):s(n=u(r))?t(n,o,c):void 0}})},{"../internals/an-object":10,"../internals/export":50,"../internals/has":61,"../internals/is-object":75,"../internals/object-get-own-property-descriptor":94,"../internals/object-get-prototype-of":98}],194:[function(t,r,o){var n=t("../internals/descriptors"),s=t("../internals/global"),i=t("../internals/is-forced"),a=t("../internals/inherit-if-required"),l=t("../internals/object-define-property").f,u=t("../internals/object-get-own-property-names").f,c=t("../internals/is-regexp"),d=t("../internals/regexp-flags"),h=t("../internals/regexp-sticky-helpers"),f=t("../internals/redefine"),p=t("../internals/fails"),m=t
1("../internals/internal-state").set,y=t("../internals/set-species"),g=t("../internals/well-known-symbol")("match"),v=s.RegExp,b=v.prototype,_=/a/g,j=/a/g,x=new v(_)!==_,w=h.UNSUPPORTED_Y;if(n&&i("RegExp",!x||w||p(function(){return j[g]=!1,v(_)!=_||v(j)==j||"/a/i"!=v(_,"i")}))){for(var S=function(t,r){var o,n=this instanceof S,s=c(t),i=void 0===r;return!n&&s&&t.constructor===S&&i?t:(x?s&&!i&&(t=t.source):t instanceof S&&(i&&(r=d.call(t)),t=t.source),w&&(o=!!r&&-1<r.indexOf("y"))&&(r=r.replace(/y/g,"")),s=a(x?new v(t,r):v(t,r),n?this:b,S),w&&o&&m(s,{sticky:o}),s)},T=u(v),E=0;T.length>E;)!function(t){t in S||l(S,t,{configurable:!0,get:function(){return v[t]},set:function(r){v[t]=r}})}(T[E++]);(b.constructor=S).prototype=b,f(s,"RegExp",S)}y("RegExp")},{"../internals/descriptors":43,"../internals/fails":51,"../internals/global":60,"../internals/inherit-if-required":68,"../internals/internal-state":71,"../internals/is-forced":74,"../internals/is-regexp":77,"../internals/object-define-property":93,"../internals/object-get-own-property-names":96,"../internals/redefine":110,"../internals/regexp-flags":113,"../internals/regexp-sticky-helpers":114,"../internals/set-species":118,"../internals/well-known-symbol":150}],195:[function(t,r,o){"use strict";var n=t("../internals/export"),t=t("../internals/regexp-exec");n({target:"RegExp",proto:!0,forced:/./.exec!==t},{exec:t})},{"../internals/export":50,"../internals/regexp-exec":112}],196:[function(t,r,o){"use strict";var n=t("../internals/redefine"),s=t("../internals/an-object"),i=t("../internals/fails"),a=t("../internals/regexp-flags"),t="toString",l=RegExp.prototype,u=l[t],i=i(function(){return"/a/b"!=u.call({source:"a",flags:"b"})}),c=u.name!=t;(i||c)&&n(RegExp.prototype,t,function(){var t=s(this),r=String(t.source),o=t.flags;return"/"+r+"/"+String(void 0===o&&t instanceof RegExp&&!("flags"in l)?a.call(t):o)},{unsafe:!0})},{"../internals/an-object":10,"../internals/fails":51,"../internals/redefine":110,"../internals/regexp-flags":113}],197:[function(t,r,o){"use strict";var n=t("../internals/collection"),t=t("../internals/collection-strong");r.exports=n("Set",function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},t)},{"../internals/collection":32,"../internals/collection-strong":30}],198:[function(t,r,o){"use strict";var n=t("../internals/export"),s=t("../internals/object-get-own-property-descriptor").f,i=t("../internals/to-length"),a=t("../internals/not-a-regexp"),l=t("../internals/require-object-coercible"),u=t("../internals/correct-is-regexp-logic"),t=t("../internals/is-pure"),c="".endsWith,d=Math.min,u=u("endsWith");n({target:"String",proto:!0,forced:!!(t||u||!(n=s(String.prototype,"endsWith"))||n.writable)&&!u},{endsWith:function(t){var r=String(l(this)),o=(a(t),1<arguments.length?arguments[1]:void 0),n=i(r.length),o=void 0===o?n:d(i(o),n),n=String(t);return c?c.call(r,n,o):r.slice(o-n.length,o)===n}})},{"../internals/correct-is-regexp-logic":34,"../internals/export":50,"../internals/is-pure":76,"../internals/not-a-regexp":88,"../internals/object-get-own-property-descriptor":94,"../internals/require-object-coercible":115,"../internals/to-length":138}],199:[function(t,r,o){"use strict";var n=t("../internals/export"),s=t("../internals/not-a-regexp"),i=t("../internals/require-object-coercible");n({target:"String",proto:!0,forced:!t("../internals/correct-is-regexp-logic")("includes")},{includes:function(t){return!!~String(i(this)).indexOf(s(t),1<arguments.length?arguments[1]:void 0)}})},{"../internals/correct-is-regexp-logic":34,"../internals/export":50,"../internals/not-a-regexp":88,"../internals/require-object-coercible":115}],200:[function(t,r,o){"use strict";var n=t("../internals/string-multibyte").charAt,s=t("../internals/internal-state"),t=t("../internals/define-iterator"),i="String Iterator",a=s.set,l=s.getterFor(i);t(String,"String",function(t){a(this,{type:i,string:String(t),index:0})},function(){var t=l(this),r=t.string,o=t.index;return o>=r.length?{value:void 0,done:!0}:(r=n(r,o),t.index+=r.length,{value:r,done:!1})})},{"../internals/define-iterator":41,"../internals/internal-state":71,"../internals/string-multibyte":125}],201:[function(t,r,o){"use strict";var n=t("../internals/fix-regexp-well-known-symbol-logic"),s=t("../internals/an-object"),i=t("../internals/to-length"),a=t("../internals/require-object-coercible"),l=t("../internals/a
1dvance-string-index"),u=t("../internals/regexp-exec-abstract");n("match",1,function(t,r,o){return[function(r){var o=a(this),n=null==r?void 0:r[t];return void 0!==n?n.call(r,o):new RegExp(r)[t](String(o))},function(t){var n=o(r,t,this);if(n.done)return n.value;var a=s(t),c=String(this);if(!a.global)return u(a,c);for(var d=a.unicode,h=[],f=a.lastIndex=0;null!==(p=u(a,c));){var p=String(p[0]);""===(h[f]=p)&&(a.lastIndex=l(c,i(a.lastIndex),d)),f++}return 0===f?null:h}]})},{"../internals/advance-string-index":8,"../internals/an-object":10,"../internals/fix-regexp-well-known-symbol-logic":52,"../internals/regexp-exec-abstract":111,"../internals/require-object-coercible":115,"../internals/to-length":138}],202:[function(t,r,o){"use strict";var n=t("../internals/export"),s=t("../internals/string-pad").start;n({target:"String",proto:!0,forced:t("../internals/string-pad-webkit-bug")},{padStart:function(t){return s(this,t,1<arguments.length?arguments[1]:void 0)}})},{"../internals/export":50,"../internals/string-pad":127,"../internals/string-pad-webkit-bug":126}],203:[function(t,r,o){t("../internals/export")({target:"String",proto:!0},{repeat:t("../internals/string-repeat")})},{"../internals/export":50,"../internals/string-repeat":129}],204:[function(t,r,o){"use strict";var n=t("../internals/fix-regexp-well-known-symbol-logic"),s=t("../internals/an-object"),i=t("../internals/to-object"),a=t("../internals/to-length"),l=t("../internals/to-integer"),u=t("../internals/require-object-coercible"),c=t("../internals/advance-string-index"),d=t("../internals/regexp-exec-abstract"),h=Math.max,f=Math.min,p=Math.floor,m=/\$([$&'`]|\d\d?|<[^>]*>)/g,y=/\$([$&'`]|\d\d?)/g;n("replace",2,function(t,r,o,n){var g=n.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,v=n.REPLACE_KEEPS_$0,b=g?"$":"$0";return[function(o,n){var s=u(this),i=null==o?void 0:o[t];return void 0!==i?i.call(o,s,n):r.call(String(s),o,n)},function(t,n){if(!g&&v||"string"==typeof n&&-1===n.indexOf(b)){var u=o(r,t,this,n);if(u.done)return u.value}for(var _,j=s(t),x=String(this),w="function"==typeof n,S=(w||(n=String(n)),j.global),T=(S&&(_=j.unicode,j.lastIndex=0),[]);null!==(C=d(j,x))&&(T.push(C),S);)""===String(C[0])&&(j.lastIndex=c(x,a(j.lastIndex),_));for(var E,M="",k=0,O=0;O<T.length;O++){for(var C=T[O],P=String(C[0]),A=h(f(l(C.index),x.length),0),L=[],R=1;R<C.length;R++)L.push(void 0===(E=C[R])?E:String(E));var I=C.groups,D=w?(D=[P].concat(L,A,x),void 0!==I&&D.push(I),String(n.apply(void 0,D))):function(t,o,n,s,a,l){var u=n+t.length,c=s.length,d=y;return void 0!==a&&(a=i(a),d=m),r.call(l,d,function(r,i){var l;switch(i.charAt(0)){case"$":return"$";case"&":return t;case"`":return o.slice(0,n);case"'":return o.slice(u);case"<":l=a[i.slice(1,-1)];break;default:var d,h=+i;if(0==h)return r;if(c<h)return 0!==(d=p(h/10))&&d<=c?void 0===s[d-1]?i.charAt(1):s[d-1]+i.charAt(1):r;l=s[h-1]}return void 0===l?"":l})}(P,x,A,L,I,n);k<=A&&(M+=x.slice(k,A)+D,k=A+P.length)}return M+x.slice(k)}]})},{"../internals/advance-string-index":8,"../internals/an-object":10,"../internals/fix-regexp-well-known-symbol-logic":52,"../internals/regexp-exec-abstract":111,"../internals/require-object-coercible":115,"../internals/to-integer":137,"../internals/to-length":138,"../internals/to-object":139}],205:[function(t,r,o){"use strict";var n=t("../internals/fix-regexp-well-known-symbol-logic"),s=t("../internals/an-object"),i=t("../internals/require-object-coercible"),a=t("../internals/same-value"),l=t("../internals/regexp-exec-abstract");n("search",1,function(t,r,o){return[function(r){var o=i(this),n=null==r?void 0:r[t];return void 0!==n?n.call(r,o):new RegExp(r)[t](String(o))},function(t){var n,i=o(r,t,this);return i.done?i.value:(i=s(t),t=String(this),a(n=i.lastIndex,0)||(i.lastIndex=0),t=l(i,t),a(i.lastIndex,n)||(i.lastIndex=n),null===t?-1:t.index)}]})},{"../internals/an-object":10,"../internals/fix-regexp-well-known-symbol-logic":52,"../internals/regexp-exec-abstract":111,"../internals/require-object-coercible":115,"../internals/same-value":116}],206:[function(t,r,o){"use strict";var n=t("../internals/fix-regexp-well-known-symbol-logic"),s=t("../internals/is-regexp"),i=t("../internals/an-object"),a=t("../internals/require-object-coercible"),l=t("../internals/species-constructor"),u=t("../internals/a
1dvance-string-index"),c=t("../internals/to-length"),d=t("../internals/regexp-exec-abstract"),h=t("../internals/regexp-exec"),t=t("../internals/fails"),f=[].push,p=Math.min,m=!t(function(){return!RegExp(4294967295,"y")});n("split",2,function(t,r,o){var n="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||1<".".split(/()()/).length||"".split(/.?/).length?function(t,o){var n=String(a(this)),i=void 0===o?4294967295:o>>>0;if(0==i)return[];if(void 0===t)return[n];if(!s(t))return r.call(n,t,i);for(var l,u,c,d=[],o=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),p=0,m=RegExp(t.source,o+"g");(l=h.call(m,n))&&!(p<(u=m.lastIndex)&&(d.push(n.slice(p,l.index)),1<l.length&&l.index<n.length&&f.apply(d,l.slice(1)),c=l[0].length,p=u,d.length>=i));)m.lastIndex===l.index&&m.lastIndex++;return p===n.length?!c&&m.test("")||d.push(""):d.push(n.slice(p)),d.length>i?d.slice(0,i):d}:"0".split(void 0,0).length?function(t,o){return void 0===t&&0===o?[]:r.call(this,t,o)}:r;return[function(r,o){var s=a(this),i=null==r?void 0:r[t];return void 0!==i?i.call(r,s,o):n.call(String(s),r,o)},function(t,s){var a=o(n,t,this,s,n!==r);if(a.done)return a.value;var a=i(t),h=String(this),t=l(a,RegExp),f=a.unicode,y=(a.ignoreCase?"i":"")+(a.multiline?"m":"")+(a.unicode?"u":"")+(m?"y":"g"),g=new t(m?a:"^(?:"+a.source+")",y),v=void 0===s?4294967295:s>>>0;if(0==v)return[];if(0===h.length)return null===d(g,h)?[h]:[];for(var b=0,_=0,j=[];_<h.length;){g.lastIndex=m?_:0;var x,w=d(g,m?h:h.slice(_));if(null===w||(x=p(c(g.lastIndex+(m?0:_)),h.length))===b)_=u(h,_,f);else{if(j.push(h.slice(b,_)),j.length===v)return j;for(var S=1;S<=w.length-1;S++)if(j.push(w[S]),j.length===v)return j;_=b=x}}return j.push(h.slice(b)),j}]},!m)},{"../internals/advance-string-index":8,"../internals/an-object":10,"../internals/fails":51,"../internals/fix-regexp-well-known-symbol-logic":52,"../internals/is-regexp":77,"../internals/regexp-exec":112,"../internals/regexp-exec-abstract":111,"../internals/require-object-coercible":115,"../internals/species-constructor":123,"../internals/to-length":138}],207:[function(t,r,o){"use strict";var n=t("../internals/export"),s=t("../internals/object-get-own-property-descriptor").f,i=t("../internals/to-length"),a=t("../internals/not-a-regexp"),l=t("../internals/require-object-coercible"),u=t("../internals/correct-is-regexp-logic"),t=t("../internals/is-pure"),c="".startsWith,d=Math.min,u=u("startsWith");n({target:"String",proto:!0,forced:!!(t||u||!(n=s(String.prototype,"startsWith"))||n.writable)&&!u},{startsWith:function(t){var r=String(l(this)),o=(a(t),i(d(1<arguments.length?arguments[1]:void 0,r.length))),t=String(t);return c?c.call(r,t,o):r.slice(o,o+t.length)===t}})},{"../internals/correct-is-regexp-logic":34,"../internals/export":50,"../internals/is-pure":76,"../internals/not-a-regexp":88,"../internals/object-get-own-property-descriptor":94,"../internals/require-object-coercible":115,"../internals/to-length":138}],208:[function(t,r,o){"use strict";var n=t("../internals/export"),s=t("../internals/create-html");n({target:"String",proto:!0,forced:t("../internals/string-html-forced")("sub")},{sub:function(){return s(this,"sub","","")}})},{"../internals/create-html":36,"../internals/export":50,"../internals/string-html-forced":124}],209:[function(t,r,o){"use strict";var n=t("../internals/export"),s=t("../internals/string-trim").trim;n({target:"String",proto:!0,forced:t("../internals/string-trim-forced")("trim")},{trim:function(){return s(this)}})},{"../internals/export":50,"../internals/string-trim":131,"../internals/string-trim-forced":130}],210:[function(t,r,o){"use strict";var n,s,i,a,l,u=t("../internals/export"),c=t("../internals/descriptors"),d=t("../internals/global"),h=t("../internals/has"),f=t("../internals/is-object"),p=t("../internals/object-define-property").f,t=t("../internals/copy-constructor-properties"),m=d.Symbol;!c||"function"!=typeof m||"description"in m.prototype&&void 0===m().description||(n={},t(s=function(){var t=arguments.length<1||void 0===arguments[0]?void 0:String(arguments[0]),r=this instanceof s?new m(t):void 0===t?m():m(t);return""===t&&(n[r]=!0),r},m),(d=s.prototype=m.prototype).constructor=s,i=d.toString,a="Symbol(test)"==String(m("test")),l=/^Symbol\((.*)\)[^)]+$/,p(d,"description",{configurable:!0,get:function(){var t=f(this)?this.valueOf():this,r=i.call(t);return h(n,t)?"":""===(t=a?r.slice(7,-1):r.replace(l,"$1"))?void 0:t}}),u({global:!0,forced:!0},{Symbol:s}))},{"../internals/copy-constructor-properties":33,"../internals/descriptors":43,"../internals/export":50,"../internals/global":60,"../internals/has":61,"../internals/is-object":75,"../internals/object-define-property":93}],211:[function(t,r,o){t("../internals/define-well-known-symbol")("iterator")},{"../internals/define-well-known-symbol":42}],212:[function(t,r,o){"use strict";function n(t,r){var o=er[t]=S(K[q]);return X(o,{type:W,tag:t,description:r}),h||(o.description=r),o}function s(t,r){b(t);var o=j(r),r=T(o).concat(ed(o));return z(r,function(r){h&&!ec.call(o,r)||eu(t,r,o[r])}),t}function i(t,r){var o,t=j(t),r=x(r,!0);if(t!==Z||!y(er,r)||y(eo,r))return!(!(o=J(t,r))||!y(er,r)||y(t,H)&&t[H][r])&&(o.enumerable=!0),o}function a(t){var t=ee(j(t)),r=[];return z(t,function(t){y(er,t)||y(D,t)||r.push(t)}),r}var l=t("../internals/export"),u=t("../internals/global"),c=t("../internals/get-built-in"),d=t("../internals/is-pure"),h=t("../internals/descriptors"),f=t("../internals/native-symbol"),p=t("../internals/use-symbol-as-uid"),m=t
1("../internals/fails"),y=t("../internals/has"),g=t("../internals/is-array"),v=t("../internals/is-object"),b=t("../internals/an-object"),_=t("../internals/to-object"),j=t("../internals/to-indexed-object"),x=t("../internals/to-primitive"),w=t("../internals/create-property-descriptor"),S=t("../internals/object-create"),T=t("../internals/object-keys"),E=t("../internals/object-get-own-property-names"),M=t("../internals/object-get-own-property-names-external"),k=t("../internals/object-get-own-property-symbols"),O=t("../internals/object-get-own-property-descriptor"),C=t("../internals/object-define-property"),P=t("../internals/object-property-is-enumerable"),A=t("../internals/create-non-enumerable-property"),L=t("../internals/redefine"),R=t("../internals/shared"),I=t("../internals/shared-key"),D=t("../internals/hidden-keys"),F=t("../internals/uid"),N=t("../internals/well-known-symbol"),U=t("../internals/well-known-symbol-wrapped"),B=t("../internals/define-well-known-symbol"),G=t("../internals/set-to-string-tag"),V=t("../internals/internal-state"),z=t("../internals/array-iteration").forEach,H=I("hidden"),W="Symbol",q="prototype",t=N("toPrimitive"),X=V.set,Y=V.getterFor(W),Z=Object[q],K=u.Symbol,Q=c("JSON","stringify"),J=O.f,$=C.f,ee=M.f,et=P.f,er=R("symbols"),eo=R("op-symbols"),en=R("string-to-symbol-registry"),es=R("symbol-to-string-registry"),I=R("wks"),V=u.QObject,ei=!V||!V[q]||!V[q].findChild,ea=h&&m(function(){return 7!=S($({},"a",{get:function(){return $(this,"a",{value:7}).a}})).a})?function(t,r,o){var n=J(Z,r);n&&delete Z[r],$(t,r,o),n&&t!==Z&&$(Z,r,n)}:$,el=p?function(t){return"symbol"==typeof t}:function(t){return Object(t) instanceof K},eu=function(t,r,o){return t===Z&&eu(eo,r,o),b(t),r=x(r,!0),b(o),(y(er,r)?(o.enumerable?(y(t,H)&&t[H][r]&&(t[H][r]=!1),o=S(o,{enumerable:w(0,!1)})):(y(t,H)||$(t,H,w(1,{})),t[H][r]=!0),ea):$)(t,r,o)},ec=function(t){var t=x(t,!0),r=et.call(this,t);return!(this===Z&&y(er,t)&&!y(eo,t))&&(!(r||!y(this,t)||!y(er,t)||y(this,H)&&this[H][t])||r)},ed=function(t){var r=t===Z,t=ee(r?eo:j(t)),o=[];return z(t,function(t){y(er,t)&&(!r||y(Z,t))&&o.push(er[t])}),o};f||(L((K=function(){if(this instanceof K)throw TypeError("Symbol is not a constructor");var t=arguments.length&&void 0!==arguments[0]?String(arguments[0]):void 0,r=F(t),o=function(t){this===Z&&o.call(eo,t),y(this,H)&&y(this[H],r)&&(this[H][r]=!1),ea(this,r,w(1,t))};return h&&ei&&ea(Z,r,{configurable:!0,set:o}),n(r,t)})[q],"toString",function(){return Y(this).tag}),L(K,"withoutSetter",function(t){return n(F(t),t)}),P.f=ec,C.f=eu,O.f=i,E.f=M.f=a,k.f=ed,U.f=function(t){return n(N(t),t)},h&&($(K[q],"description",{configurable:!0,get:function(){return Y(this).description}}),d||L(Z,"propertyIsEnumerable",ec,{unsafe:!0}))),l({global:!0,wrap:!0,forced:!f,sham:!f},{Symbol:K}),z(T(I),function(t){B(t)}),l({target:W,stat:!0,forced:!f},{for:function(t){var r,t=String(t);return y(en,t)?en[t]:(r=K(t),en[t]=r,es[r]=t,r)},keyFor:function(t){if(!el(t))throw TypeError(t+" is not a symbol");if(y(es,t))return es[t]},useSetter:function(){ei=!0},useSimple:function(){ei=!1}}),l({target:"Object",stat:!0,forced:!f,sham:!h},{create:function(t,r){return void 0===r?S(t):s(S(t),r)},defineProperty:eu,defineProperties:s,getOwnPropertyDescriptor:i}),l({target:"Object",stat:!0,forced:!f},{getOwnPropertyNames:a,getOwnPropertySymbols:ed}),l({target:"Object",stat:!0,forced:m(function(){k.f(1)})},{getOwnPropertySymbols:function(t){return k.f(_(t))}}),Q&&l({target:"JSON",stat:!0,forced:!f||m(function(){var t=K();return"[null]"!=Q([t])||"{}"!=Q({a:t})||"{}"!=Q(Object(t))})},{stringify:function(t,r,o){for(var n,s=[t],i=1;i<arguments.length;)s.push(arguments[i++]);if((v(n=r)||void 0!==t)&&!el(t))return g(r)||(r=function(t,r){if("function"==typeof n&&(r=n.call(this,t,r)),!el(r))return r}),s[1]=r,Q.apply(null,s)}}),K[q][t]||A(K[q],t,K[q].valueOf),G(K,W),D[H]=!0},{"../internals/an-object":10,"../internals/array-iteration":19,"../internals/create-non-enumerable-property":38,"../internals/create-property-descriptor":39,"../internals/define-well-known-symbol":42,"../internals/descriptors":43,"../internals/export":50,"../internals/fails":51,"../internals/get-built-in":57,"../internals/global":60,"../internals/has":61,"../internals/hidden-keys":62,"../internals/internal-state":71,"../internals/is-array":73,"../internals/is-object":75,"../internals/is-pure":76,"../internals/native-symbol":84,"../internals/object-create":91,"../internals/object-define-property":93,"../internals/object-get-own-property-descriptor":94,"../internals/object-get-own-property-names":96,"../internals/object-get-own-property-names-external":95,"../internals/object-get-own-property-symbol
1s":97,"../internals/object-keys":100,"../internals/object-property-is-enumerable":101,"../internals/redefine":110,"../internals/set-to-string-tag":119,"../internals/shared":122,"../internals/shared-key":120,"../internals/to-indexed-object":136,"../internals/to-object":139,"../internals/to-primitive":142,"../internals/uid":147,"../internals/use-symbol-as-uid":148,"../internals/well-known-symbol":150,"../internals/well-known-symbol-wrapped":149}],213:[function(t,r,o){"use strict";var n=t("../internals/array-buffer-view-core"),s=t("../internals/array-copy-within"),i=n.aTypedArray;(0,n.exportTypedArrayMethod)("copyWithin",function(t,r){return s.call(i(this),t,r,2<arguments.length?arguments[2]:void 0)})},{"../internals/array-buffer-view-core":12,"../internals/array-copy-within":14}],214:[function(t,r,o){"use strict";var n=t("../internals/array-buffer-view-core"),s=t("../internals/array-iteration").every,i=n.aTypedArray;(0,n.exportTypedArrayMethod)("every",function(t){return s(i(this),t,1<arguments.length?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":12,"../internals/array-iteration":19}],215:[function(t,r,o){"use strict";var n=t("../internals/array-buffer-view-core"),s=t("../internals/array-fill"),i=n.aTypedArray;(0,n.exportTypedArrayMethod)("fill",function(t){return s.apply(i(this),arguments)})},{"../internals/array-buffer-view-core":12,"../internals/array-fill":15}],216:[function(t,r,o){"use strict";var n=t("../internals/array-buffer-view-core"),s=t("../internals/array-iteration").filter,i=t("../internals/species-constructor"),a=n.aTypedArray,l=n.aTypedArrayConstructor;(0,n.exportTypedArrayMethod)("filter",function(t){for(var r=s(a(this),t,1<arguments.length?arguments[1]:void 0),t=i(this,this.constructor),o=0,n=r.length,u=new(l(t))(n);o<n;)u[o]=r[o++];return u})},{"../internals/array-buffer-view-core":12,"../internals/array-iteration":19,"../internals/species-constructor":123}],217:[function(t,r,o){"use strict";var n=t("../internals/array-buffer-view-core"),s=t("../internals/array-iteration").findIndex,i=n.aTypedArray;(0,n.exportTypedArrayMethod)("findIndex",function(t){return s(i(this),t,1<arguments.length?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":12,"../internals/array-iteration":19}],218:[function(t,r,o){"use strict";var n=t("../internals/array-buffer-view-core"),s=t("../internals/array-iteration").find,i=n.aTypedArray;(0,n.exportTypedArrayMethod)("find",function(t){return s(i(this),t,1<arguments.length?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":12,"../internals/array-iteration":19}],219:[function(t,r,o){t("../internals/typed-array-constructor")("Float32",function(t){return function(r,o,n){return t(this,r,o,n)}})},{"../internals/typed-array-constructor":144}],220:[function(t,r,o){t("../internals/typed-array-constructor")("Float64",function(t){return function(r,o,n){return t(this,r,o,n)}})},{"../internals/typed-array-constructor":144}],221:[function(t,r,o){"use strict";var n=t("../internals/array-buffer-view-core"),s=t("../internals/array-iteration").forEach,i=n.aTypedArray;(0,n.exportTypedArrayMethod)("forEach",function(t){s(i(this),t,1<arguments.length?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":12,"../internals/array-iteration":19}],222:[function(t,r,o){"use strict";var n=t("../internals/array-buffer-view-core"),s=t("../internals/array-includes").includes,i=n.aTypedArray;(0,n.exportTypedArrayMethod)("includes",function(t){return s(i(this),t,1<arguments.length?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":12,"../internals/array-includes":18}],223:[function(t,r,o){"use strict";var n=t("../internals/array-buffer-view-core"),s=t("../internals/array-includes").indexOf,i=n.aTypedArray;(0,n.exportTypedArrayMethod)("indexOf",function(t){return s(i(this),t,1<arguments.length?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":12,"../internals/array-includes":18}],224:[function(t,r,o){t("../internals/typed-array-constructor")("Int16",function(t){return function(r,o,n){return t(this,r,o,n)}})},{"../internals/typed-array-constructor":144}],225:[function(t,r,o){t("../internals/typed-array-constructor")("Int32",function(t){return function(r,o,n){return t(this,r,o,n)}})},{"../internals/typed-array-constructor":144}],226:[function(t,r,o){"use strict";function n(){return l.call(d(this))}var s=t("../internals/global"),i=t("../internals/array-buffer-view-core"),a=t("../modules/es.array.iterator"),t=t("../internals/well-known-symbol")("iterator"),s=s.Uint8Array,l=a.values,u=a.keys,c=a.entries,d=i.aTypedArray,a=i.exportTypedArrayMethod,i=s&&s.prototype[t],s=!!i&&("values"==i.name||null==i.name);a("entries",function(){return c.call(d(this))}),a("keys",function(){return u.call(d(this))}),a("values",n,!s),a(t,n,!s)},{"../internals/array-buffer-view-core":12,"../internals/global":60,"../internals/well-known-symbol":150,"../modules/es.array.iterator":165}],227:[function(t,r,o){"use strict";var t=t("../internals/array-buffer-view-core"),n=t.aTypedArray,t=t.exportTypedArrayMethod,s=[].join;t("join",function(t){return s.apply(n(this),arguments)})},{"../internals/array-buffer-view-core":12}],228:[function(t,r,o){"use strict";var n=t("../internals/array-buffer-view-core"),s=t("../internals/array-last-index-of"),i=n.aTypedArray;(0,n.exportTypedArrayMethod)("lastIndexOf",function(t){return s.apply(i(this),arguments)})},{"../internals/array-buffer-view-core":12,"../internals/array-last-index-of":20}],229:[function(t,r,o){"use strict";var n=t("../internals/array-buffer-view-core"),s=t("../internals/array-iteration").map,i=t("../internals/species-constructor"),a=n.aTypedArray,l=n.aTypedArrayConstructor;(0,n.exportTypedArrayMethod)("map",function(t){return s(a(this),t,1<arguments.length?arguments[1]:void 0,function(t,r){return new(l(i(t,t.constructor)))(r)})})},{"../internals/array-buffer-view-core":12,"../internals/array-iteration":19,"../internals/species-constructor":123}],230:[function(t,r,o){"use strict";var n=t("../internals/array-buffer-view-core"),s=t("../internals/array-reduce").right,i=n.aTypedArray;(0,n.exportTypedArrayMethod)("reduceRight",function(t){return s(i(this),t,arguments.length,1<arguments.length?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":12,"../internals/array-reduce":24}],231:[function(t,r,o){"use strict";var n=t("../internals/array-buffer-view-core"),s=t("../internals/array-reduce").left,i=n.aTypedArray;(0,n.exportTypedArrayMethod)("reduce",function(t){return s(i(this),t,arguments.length,1<arguments.length?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":12,"../internals/array-reduce":24}],232:[function(t,r,o){"use strict";var t=t("../internals/array-buffer-view-core"),n=t.aTypedArray,t=t.exportTypedArrayMethod,s=Math.floor;t("reverse",function(){for(var t,r=n(this).length,o=s(r/2),i=0;i<o;)t=this[i],this[i++]=this[--r],this[r]=t;return this})},{"../internals/array-buffer-view-core":12}],233:[function(t,r,o){"use strict";var n=t("../internals/array-buffer-view-core"),s=t("../internals/to-length"),i=t("../internals/to-offset"),a=t("../internals/to-object"),t=t("../internals/fails"),l=n.aTypedArray;(0,n.exportTypedArrayMethod)("set",function(t){l(this);
1var r=i(1<arguments.length?arguments[1]:void 0,1),o=this.length,n=a(t),u=s(n.length),c=0;if(o<u+r)throw RangeError("Wrong length");for(;c<u;)this[r+c]=n[c++]},t(function(){new Int8Array(1).set({})}))},{"../internals/array-buffer-view-core":12,"../internals/fails":51,"../internals/to-length":138,"../internals/to-object":139,"../internals/to-offset":140}],234:[function(t,r,o){"use strict";var n=t("../internals/array-buffer-view-core"),s=t("../internals/species-constructor"),t=t("../internals/fails"),i=n.aTypedArray,a=n.aTypedArrayConstructor,n=n.exportTypedArrayMethod,l=[].slice;n("slice",function(t,r){for(var o=l.call(i(this),t,r),t=s(this,this.constructor),n=0,u=o.length,c=new(a(t))(u);n<u;)c[n]=o[n++];return c},t(function(){new Int8Array(1).slice()}))},{"../internals/array-buffer-view-core":12,"../internals/fails":51,"../internals/species-constructor":123}],235:[function(t,r,o){"use strict";var n=t("../internals/array-buffer-view-core"),s=t("../internals/array-iteration").some,i=n.aTypedArray;(0,n.exportTypedArrayMethod)("some",function(t){return s(i(this),t,1<arguments.length?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":12,"../internals/array-iteration":19}],236:[function(t,r,o){"use strict";var t=t("../internals/array-buffer-view-core"),n=t.aTypedArray,t=t.exportTypedArrayMethod,s=[].sort;t("sort",function(t){return s.call(n(this),t)})},{"../internals/array-buffer-view-core":12}],237:[function(t,r,o){"use strict";var n=t("../internals/array-buffer-view-core"),s=t("../internals/to-length"),i=t("../internals/to-absolute-index"),a=t("../internals/species-constructor"),l=n.aTypedArray;(0,n.exportTypedArrayMethod)("subarray",function(t,r){var o=l(this),n=o.length,t=i(t,n);return new(a(o,o.constructor))(o.buffer,o.byteOffset+t*o.BYTES_PER_ELEMENT,s((void 0===r?n:i(r,n))-t))})},{"../internals/array-buffer-view-core":12,"../internals/species-constructor":123,"../internals/to-absolute-index":134,"../internals/to-length":138}],238:[function(t,r,o){"use strict";var n=t("../internals/global"),s=t("../internals/array-buffer-view-core"),t=t("../internals/fails"),i=n.Int8Array,a=s.aTypedArray,n=s.exportTypedArrayMethod,l=[].toLocaleString,u=[].slice,c=!!i&&t(function(){l.call(new i(1))});n("toLocaleString",function(){return l.apply(c?u.call(a(this)):a(this),arguments)},t(function(){return[1,2].toLocaleString()!=new i([1,2]).toLocaleString()})||!t(function(){i.prototype.toLocaleString.call([1,2])}))},{"../internals/array-buffer-view-core":12,"../internals/fails":51,"../internals/global":60}],239:[function(t,r,o){"use strict";var n=t("../internals/array-buffer-view-core").exportTypedArrayMethod,s=t("../internals/fails"),t=t("../internals/global").Uint8Array,t=t&&t.prototype||{},i=[].toString,a=[].join,s=(s(function(){i.call({})})&&(i=function(){return a.call(this)}),t.toString!=i);n("toString",i,s)},{"../internals/array-buffer-view-core":12,"../internals/fails":51,"../internals/global":60}],240:[function(t,r,o){t("../internals/typed-array-constructor")("Uint16",function(t){return function(r,o,n){return t(this,r,o,n)}})},{"../internals/typed-array-constructor":144}],241:[function(t,r,o){t("../internals/typed-array-constructor")("Uint32",function(t){return function(r,o,n){return t(this,r,o,n)}})},{"../internals/typed-array-constructor":144}],242:[function(t,r,o){t("../internals/typed-array-constructor")("Uint8",function(t){return function(r,o,n){return t(this,r,o,n)}})},{"../internals/typed-array-constructor":144}],243:[function(t,r,o){t("../internals/typed-array-constructor")("Uint8",function(t){return function(r,o,n){return t(this,r,o,n)}},!0)},{"../internals/typed-array-constructor":144}],244:[function(t,r,o){"use strict";function n(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}var s,i,a,l,u,c=t("../internals/global"),d=t("../internals/redefine-all"),h=t("../internals/internal-metadata"),f=t("../internals/collection"),p=t("../internals/collection-weak"),m=t("../internals/is-object"),y=t("../internals/internal-state").enforce,t=t("../internals/native-weak-map"),c=!c.ActiveXObject&&"ActiveXObject"in c,g=Object.isExtensible,r=r.exports=f("WeakMap",n,p);t&&c&&(s=p.getConstructor(n,"WeakMap",!0),h.REQUIRED=!0,i=(f=r.prototype).delete,a=f.has,l=f.get,u=f.set,d(f,{delete:function(t){var r;return m(t)&&!g(t)?((r=y(this)).frozen||(r.frozen=new s),i.call(this,t)||r.frozen.delete(t)):i.call(this,t)},has:function(t){var r;return m(t)&&!g(t)?((r=y(this)).frozen||(r.frozen=new s),a.call(this,t)||r.frozen.has(t)):a.call(this,t)},get:function(t){var r;return!m(t)||g(t)||((r=y(this)).frozen||(r.frozen=new s),a.call(this,t))?l.call(this,t):r.frozen.get(t)},set:function(t,r){var o;return!m(t)||g(t)||((o=y(this)).frozen||(o.frozen=new s),a.call(this,t))?u.call(this,t,r):o.frozen.set(t,r),this}}))},{"../internals/collection":32,"../internals/collection-weak":31,"../internals/global":60,"../internals/internal-metadata":70,"../internals/internal-state":71,"../internals/is-object":75,"../internals/native-weak-map":86,"../internals/redefine-all":109}],245:[function(t,r,o){var n,s=t("../internals/global"),i=t("../internals/dom-iterables"),a=t("../internals/array-for-each"),l=t("../internals/create-non-enumerable-property");for(n in i){var u=s[n],u=u&&u.prototype;if(u&&u.forEach!==a)try{l(u,"forEach",a)}catch(t){u.forEach=a}}},{"../internals/array-for-each":16,"../internals/create-non-enumerable-property":38,"../internals/dom-iterables":45,"../internals/global":60}],246:[function(t,r,o){var n,s=t("../internals/global"),i=t("../internals/dom-iterables"),a=t("../modules/es.array.iterator"),l=t("../internals/create-non-enumerable-property"),t=t("../internals/well-known-symbol"),u=t
1("iterator"),c=t("toStringTag"),d=a.values;for(n in i){var h=s[n],f=h&&h.prototype;if(f){if(f[u]!==d)try{l(f,u,d)}catch(t){f[u]=d}if(f[c]||l(f,c,n),i[n]){for(var p in a)if(f[p]!==a[p])try{l(f,p,a[p])}catch(t){f[p]=a[p]}}}}},{"../internals/create-non-enumerable-property":38,"../internals/dom-iterables":45,"../internals/global":60,"../internals/well-known-symbol":150,"../modules/es.array.iterator":165}],247:[function(t,r,o){"use strict";function n(t){try{return decodeURIComponent(t)}catch(r){return t}}function s(t){return U[t]}function i(t){return encodeURIComponent(t).replace(N,s)}function a(t){this.entries.length=0,B(this.entries,t)}function l(t,r){if(t<r)throw TypeError("Not enough arguments")}function u(){v(this,u,C);var t,r,o,n,s,i,l,c,d=0<arguments.length?arguments[0]:void 0,h=[];if(A(this,{type:C,entries:h,updateURL:function(){},updateSearchParams:a}),void 0!==d){if(w(d)){if("function"==typeof(t=M(d)))for(o=(r=t.call(d)).next;!(n=o.call(r)).done;){if((i=(s=(n=E(x(n.value))).next).call(n)).done||(l=s.call(n)).done||!s.call(n).done)throw TypeError("Expected sequence with length 2");h.push({key:i.value+"",value:l.value+""})}else for(c in d)b(d,c)&&h.push({key:c,value:d[c]+""})}else B(h,"string"==typeof d?"?"===d.charAt(0)?d.slice(1):d:d+"")}}t("../modules/es.array.iterator");var c=t("../internals/export"),d=t("../internals/get-built-in"),h=t("../internals/native-url"),f=t("../internals/redefine"),p=t("../internals/redefine-all"),m=t("../internals/set-to-string-tag"),y=t("../internals/create-iterator-constructor"),g=t("../internals/internal-state"),v=t("../internals/an-instance"),b=t("../internals/has"),_=t("../internals/function-bind-context"),j=t("../internals/classof"),x=t("../internals/an-object"),w=t("../internals/is-object"),S=t("../internals/object-create"),T=t("../internals/create-property-descriptor"),E=t("../internals/get-iterator"),M=t("../internals/get-iterator-method"),t=t("../internals/well-known-symbol"),k=d("fetch"),O=d("Headers"),d=t("iterator"),C="URLSearchParams",P=C+"Iterator",A=g.set,L=g.getterFor(C),R=g.getterFor(P),I=/\+/g,D=[,,,,],F=function(t){var r,o=t.replace(I," "),s=4;try{return decodeURIComponent(o)}catch(t){for(;s;)o=o.replace(D[(r=s--)-1]||(D[r-1]=RegExp("((?:%[\\da-f]{2}){"+r+"})","gi")),n);return o}},N=/[!'()~]|%20/g,U={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},B=function(t,r){if(r)for(var o,n=r.split("&"),s=0;s<n.length;)(o=n[s++]).length&&(o=o.split("="),t.push({key:F(o.shift()),value:F(o.join("="))}))},G=y(function(t,r){A(this,{type:P,iterator:E(L(t).entries),kind:r})},"Iterator",function(){var t=R(this),r=t.kind,t=t.iterator.next(),o=t.value;return t.done||(t.value="keys"===r?o.key:"values"===r?o.value:[o.key,o.value]),t}),t=u.prototype;p(t,{append:function(t,r){l(arguments.length,2);var o=L(this);o.entries.push({key:t+"",value:r+""}),o.updateURL()},delete:function(t){l(arguments.length,1);for(var r=L(this),o=r.entries,n=t+"",s=0;s<o.length;)o[s].key===n?o.splice(s,1):s++;r.updateURL()},get:function(t){l(arguments.length,1);for(var r=L(this).entries,o=t+"",n=0;n<r.length;n++)if(r[n].key===o)return r[n].value;return null},getAll:function(t){l(arguments.length,1);for(var r=L(this).entries,o=t+"",n=[],s=0;s<r.length;s++)r[s].key===o&&n.push(r[s].value);return n},has:function(t){l(arguments.length,1);for(var r=L(this).entries,o=t+"",n=0;n<r.length;)if(r[n++].key===o)return!0;return!1},set:function(t,r){l(arguments.length,1);for(var o,n=L(this),s=n.entries,i=!1,a=t+"",u=r+"",c=0;c<s.length;c++)(o=s[c]).key===a&&(i?s.splice(c--,1):(i=!0,o.value=u));i||s.push({key:a,value:u}),n.updateURL()},sort:function(){for(var t,r,o=L(this),n=o.entries,s=n.slice(),i=n.length=0;i<s.length;i++){for(t=s[i],r=0;r<i;r++)if(n[r].key>t.key){n.splice(r,0,t);break}r===i&&n.push(t)}o.updateURL()},forEach:function(t){for(var r,o=L(this).entries,n=_(t,1<arguments.length?arguments[1]:void 0,3),s=0;s<o.length;)n((r=o[s++]).value,r.key,this)},keys:function(){return new G(this,"keys")},values:function(){return new G(this,"values")},entries:function(){return new G(this,"entries")}},{enumerable:!0}),f(t,d,t.entries),f(t,"toString",function(){for(var t,r=L(this).entries,o=[],n=0;n<r.length;)o.push(i((t=r[n++]).key)+"="+i(t.value));return o.join("&")},{enumerable:!0}),m(u,C),c({global:!0,forced:!h},{URLSearchParams:u}),h||"function"!=typeof k||"function"!=typeof O||c({global:!0,enumerable:!0,forced:!0},{fetch:function(t){var r,o,n,t=[t];return 1<arguments.length&&(w(r=arguments[1])&&j(o=r.body)===C&&((n=r.headers?new O(r.headers):new O).has("content-type")||n.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"),r=S(r,{body:T(0,String(o)),headers:T(0,n)})),t.push(r)),k.apply(this,t)}}),r.exports={URLSearchParams:u,getState:L}},{"../internals/an-instance":9,"../internals/an-object":10,"../internals/classof":29,"../internals/create-iterator-constructor":37,"../internals/create-property-descriptor":39,"../internals/export":50,"../internals/function-bind-context":55,"../internals/get-built-in":57,"../internals/get-iterator":59,"../internals/get-iterator-method":58,"../internals/has":61,"../internals/internal-state":71,"../internals/is-object":75,"../internals/native-url":85,"../internals/object-create":91,"../internals/redefine":110,"../internals/redefine-all":109,"../internals/set-to-string-tag":119,"../internals/well-known-symbol":150,"../modules/es.array.iterator":165}],248:[function(t,r,o){"use strict";function n(t){var r,o,n,s;if("number"==typeof t){for(r=[],o=0;o<4;o++)r.unshift(t%256),t=P(t/256);return r.join(".")}if("object"!=typeof t)return t;for(r="",n=Z(t),o=0;o<8;o++)s&&0===t[o]||(s=s&&!1,n===o?(r+=o?":":"::",s=!0):(r+=t[o].toString(16),o<7&&(r+=":")));return"["+r+"]"}function s(t){return!t.host||t.cannotBeABaseURL||"file"==t.scheme}function i(t,r,o,n){var s,i,a,l=o||eu,c=0,d="",h=!1,f=!1,p=!1;for(o||(t.scheme="",t.username="",t.password="",t.host=null,t.port=null,t.path=[],t.query=null,t.fragment=null,t.cannotBeABaseURL=!1,r=r.replace(q,"")),s=j(r=r.replace(X,""));c<=s.length;
1){switch(i=s[c],l){case eu:if(!i||!F.test(i)){if(o)return R;l=ed;continue}d+=i.toLowerCase(),l=ec;break;case ec:if(i&&(N.test(i)||"+"==i||"-"==i||"."==i))d+=i.toLowerCase();else{if(":"!=i){if(o)return R;d="",l=ed,c=0;continue}if(o&&(er(t)!=b(et,d)||"file"==d&&(eo(t)||null!==t.port)||"file"==t.scheme&&!t.host))return;if(t.scheme=d,o)return void(er(t)&&et[t.scheme]==t.port&&(t.port=null));d="","file"==t.scheme?l=ex:er(t)&&n&&n.scheme==t.scheme?l=eh:er(t)?l=ey:"/"==s[c+1]?(l=ef,c++):(t.cannotBeABaseURL=!0,t.path.push(""),l=eM)}break;case ed:if(!n||n.cannotBeABaseURL&&"#"!=i)return R;if(n.cannotBeABaseURL&&"#"==i){t.scheme=n.scheme,t.path=n.path.slice(),t.query=n.query,t.fragment="",t.cannotBeABaseURL=!0,l=eO;break}l="file"==n.scheme?ex:ep;continue;case eh:if("/"!=i||"/"!=s[c+1]){l=ep;continue}l=eg,c++;break;case ef:if("/"==i){l=ev;break}l=eE;continue;case ep:if(t.scheme=n.scheme,i==u)t.username=n.username,t.password=n.password,t.host=n.host,t.port=n.port,t.path=n.path.slice(),t.query=n.query;else if("/"==i||"\\"==i&&er(t))l=em;else if("?"==i)t.username=n.username,t.password=n.password,t.host=n.host,t.port=n.port,t.path=n.path.slice(),t.query="",l=ek;else{if("#"!=i){t.username=n.username,t.password=n.password,t.host=n.host,t.port=n.port,t.path=n.path.slice(),t.path.pop(),l=eE;continue}t.username=n.username,t.password=n.password,t.host=n.host,t.port=n.port,t.path=n.path.slice(),t.query=n.query,t.fragment="",l=eO}break;case em:if(er(t)&&("/"==i||"\\"==i))l=eg;else{if("/"!=i){t.username=n.username,t.password=n.password,t.host=n.host,t.port=n.port,l=eE;continue}l=ev}break;case ey:if(l=eg,"/"!=i||"/"!=d.charAt(c+1))continue;c++;break;case eg:if("/"==i||"\\"==i)break;l=ev;continue;case ev:if("@"==i){h&&(d="%40"+d);for(var h=!0,m=j(d),y=0;y<m.length;y++){var g=m[y];":"!=g||p?(g=ee(g,$),p?t.password+=g:t.username+=g):p=!0}d=""}else if(i==u||"/"==i||"?"==i||"#"==i||"\\"==i&&er(t)){if(h&&""==d)return L;c-=j(d).length+1,d="",l=eb}else d+=i;break;case eb:case e_:if(o&&"file"==t.scheme){l=eS;continue}if(":"!=i||f){if(i==u||"/"==i||"?"==i||"#"==i||"\\"==i&&er(t)){if(er(t)&&""==d)return I;if(o&&""==d&&(eo(t)||null!==t.port))return;if(a=Y(t,d))return a;if(d="",l=eT,o)return;continue}"["==i?f=!0:"]"==i&&(f=!1),d+=i}else{if(""==d)return I;if(a=Y(t,d))return a;if(d="",l=ej,o==e_)return}break;case ej:if(!U.test(i)){if(i==u||"/"==i||"?"==i||"#"==i||"\\"==i&&er(t)||o){if(""!=d){var v=parseInt(d,10);if(65535<v)return D;t.port=er(t)&&v===et[t.scheme]?null:v,d=""}if(o)return;l=eT;continue}return D}d+=i;break;case ex:if(t.scheme="file","/"==i||"\\"==i)l=ew;else{if(!n||"file"!=n.scheme){l=eE;continue}if(i==u)t.host=n.host,t.path=n.path.slice(),t.query=n.query;else if("?"==i)t.host=n.host,t.path=n.path.slice(),t.query="",l=ek;else{if("#"!=i){es(s.slice(c).join(""))||(t.host=n.host,t.path=n.path.slice(),ei(t)),l=eE;continue}t.host=n.host,t.path=n.path.slice(),t.query=n.query,t.fragment="",l=eO}}break;case ew:if("/"==i||"\\"==i){l=eS;break}n&&"file"==n.scheme&&!es(s.slice(c).join(""))&&(en(n.path[0],!0)?t.path.push(n.path[0]):t.host=n.host),l=eE;continue;case eS:if(i==u||"/"==i||"\\"==i||"?"==i||"#"==i){if(!o&&en(d))l=eE;else{if(""==d){if(t.host="",o)return}else{if(a=Y(t,d))return a;if("localhost"==t.host&&(t.host=""),o)return;d=""}l=eT}continue}d+=i;break;case eT:if(er(t)){if(l=eE,"/"!=i&&"\\"!=i)continue}else if(o||"?"!=i){if(o||"#"!=i){if(i!=u&&(l=eE,"/"!=i))continue}else t.fragment="",l=eO}else t.query="",l=ek;break;case eE:if(i==u||"/"==i||"\\"==i&&er(t)||!o&&("?"==i||"#"==i)){if(el(d)?(ei(t),"/"==i||"\\"==i&&er(t)||t.path.push("")):ea(d)?"/"==i||"\\"==i&&er(t)||t.path.push(""):("file"==t.scheme&&!t.path.length&&en(d)&&(t.host&&(t.host=""),d=d.charAt(0)+":"),t.path.push(d)),d="","file"==t.scheme&&(i==u||"?"==i||"#"==i))for(;1<t.path.length&&""===t.path[0];)t.path.shift();"?"==i?(t.query="",l=ek):"#"==i&&(t.fragment="",l=eO)}else d+=ee(i,J);break;case eM:"?"==i?(t.query="",l=ek):"#"==i?(t.fragment="",l=eO):i!=u&&(t.path[0]+=ee(i,K));break;case ek:o||"#"!=i?i!=u&&("'"==i&&er(t)?t.query+="%27":t.query+="#"==i?"%23":ee(i,K)):(t.fragment="",l=eO);break;case eO:i!=u&&(t.fragment+=ee(i,Q))}c++}}function a(t){var r,o,n=v(this,a,"URL"),s=1<arguments.length?arguments[1]:void 0,t=String(t),l=O(n,{type:"URL"});if(void 0!==s){if(s instanceof a)r=C(s);else if(o=i(r={},String(s)))throw TypeError(o)}if(o=i(l,t,null,r))throw TypeError(o);var u=l.searchParams=new M;(s=k(u)).updateSearchParams(l.query),s.updateURL=function(){l.query=String(u)||null},f||(n.href=eC.call(n),n.origin=eP.call(n),n.protocol=eA.call(n),n.username=eL.call(n),n.password=eR.call(n),n.host=eI.call(n),n.hostname=eD.call(n),n.port=eF.call(n),n.pathname=eN.call(n),n.search=eU.call(n),n.searchParams=eB.call(n),n.hash=eG.call(n))}function l(t,r){return{get:t,set:r,configurable:!0,enumerable:!0}}t("../modules/es.string.iterator");var u,c,d,h=t("../internals/export"),f=t("../internals/descriptors"),p=t("../internals/native-url"),m=t("../internals/global"),y=t("../internals/object-define-properties"),g=t("../internals/redefine"),v=t("../internals/an-instance"),b=t("../internals/has"),_=t("../internals/object-assign"),j=t("../internals/array-from"),x=t("../internals/string-multibyte").codeAt,w=t("../internals/string-punycode
1-to-ascii"),S=t("../internals/set-to-string-tag"),T=t("../modules/web.url-search-params"),t=t("../internals/internal-state"),E=m.URL,M=T.URLSearchParams,k=T.getState,O=t.set,C=t.getterFor("URL"),P=Math.floor,A=Math.pow,L="Invalid authority",R="Invalid scheme",I="Invalid host",D="Invalid port",F=/[A-Za-z]/,N=/[\d+-.A-Za-z]/,U=/\d/,B=/^(0x|0X)/,G=/^[0-7]+$/,V=/^\d+$/,z=/^[\dA-Fa-f]+$/,H=/[\u0000\u0009\u000A\u000D #%/:?@[\\]]/,W=/[\u0000\u0009\u000A\u000D #/:?@[\\]]/,q=/^[\u0000-\u001F ]+|[\u0000-\u001F ]+$/g,X=/[\u0009\u000A\u000D]/g,Y=function(t,r){var o,n,s;if("["==r.charAt(0))return"]"==r.charAt(r.length-1)&&(o=function(t){var r,o,n,s,i,a,l,u=[0,0,0,0,0,0,0,0],c=0,d=null,h=0,f=function(){return t.charAt(h)};if(":"==f()){if(":"!=t.charAt(1))return;h+=2,d=++c}for(;f();){if(8==c)return;if(":"==f()){if(null!==d)return;h++,d=++c;continue}for(r=o=0;o<4&&z.test(f());)r=16*r+parseInt(f(),16),h++,o++;if("."==f()){if(0==o||(h-=o,c>6))return;for(n=0;f();){if(s=null,n>0){if("."!=f()||!(n<4))return;h++}if(!U.test(f()))return;for(;U.test(f());){if(i=parseInt(f(),10),null===s)s=i;else{if(0==s)return;s=10*s+i}if(s>255)return;h++}u[c]=256*u[c]+s,(2==++n||4==n)&&c++}if(4!=n)return;break}if(":"==f()){if(h++,!f())return}else if(f())return;u[c++]=r}if(null!==d)for(a=c-d,c=7;0!=c&&a>0;)l=u[c],u[c--]=u[d+a-1],u[d+--a]=l;else if(8!=c)return;return u}(r.slice(1,-1)))?void(t.host=o):I;if(er(t))return r=w(r),H.test(r)||null===(o=function(t){var r,o,n,s,i,a,l,u=t.split(".");if(u.length&&""==u[u.length-1]&&u.pop(),(r=u.length)>4)return t;for(o=[],n=0;n<r;n++){if(""==(s=u[n]))return t;if(i=10,s.length>1&&"0"==s.charAt(0)&&(i=B.test(s)?16:8,s=s.slice(8==i?1:2)),""===s)a=0;else{if(!(10==i?V:8==i?G:z).test(s))return t;a=parseInt(s,i)}o.push(a)}for(n=0;n<r;n++)if(a=o[n],n==r-1){if(a>=A(256,5-r))return null}else if(a>255)return null;for(l=o.pop(),n=0;n<o.length;n++)l+=o[n]*A(256,3-n);return l}(r))?I:void(t.host=o);if(W.test(r))return I;for(o="",n=j(r),s=0;s<n.length;s++)o+=ee(n[s],K);t.host=o},Z=function(t){for(var r=null,o=1,n=null,s=0,i=0;i<8;i++)0!==t[i]?(o<s&&(r=n,o=s),n=null,s=0):(null===n&&(n=i),++s);return o<s&&(r=n,o=s),r},K={},Q=_({},K,{" ":1,'"':1,"<":1,">":1,"`":1}),J=_({},Q,{"#":1,"?":1,"{":1,"}":1}),$=_({},J,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),ee=function(t,r){var o=x(t,0);return 32<o&&o<127&&!b(r,t)?t:encodeURIComponent(t)},et={ftp:21,file:null,http:80,https:443,ws:80,wss:443},er=function(t){return b(et,t.scheme)},eo=function(t){return""!=t.username||""!=t.password},en=function(t,r){return 2==t.length&&F.test(t.charAt(0))&&(":"==(t=t.charAt(1))||!r&&"|"==t)},es=function(t){return 1<t.length&&en(t.slice(0,2))&&(2==t.length||"/"===(t=t.charAt(2))||"\\"===t||"?"===t||"#"===t)},ei=function(t){var r=t.path,o=r.length;!o||"file"==t.scheme&&1==o&&en(r[0],!0)||r.pop()},ea=function(t){return"."===t||"%2e"===t.toLowerCase()},el=function(t){return".."===(t=t.toLowerCase())||"%2e."===t||".%2e"===t||"%2e%2e"===t},eu={},ec={},ed={},eh={},ef={},ep={},em={},ey={},eg={},ev={},eb={},e_={},ej={},ex={},ew={},eS={},eT={},eE={},eM={},ek={},eO={},m=a.prototype,eC=function(){var t=C(this),r=t.scheme,o=t.username,s=t.password,i=t.host,a=t.port,l=t.path,u=t.query,c=t.fragment,d=r+":";
1return null!==i?(d+="//",eo(t)&&(d+=o+(s?":"+s:"")+"@"),d+=n(i),null!==a&&(d+=":"+a)):"file"==r&&(d+="//"),d+=t.cannotBeABaseURL?l[0]:l.length?"/"+l.join("/"):"",null!==u&&(d+="?"+u),null!==c&&(d+="#"+c),d},eP=function(){var t=C(this),r=t.scheme,o=t.port;if("blob"==r)try{return new URL(r.path[0]).origin}catch(t){return"null"}return"file"!=r&&er(t)?r+"://"+n(t.host)+(null!==o?":"+o:""):"null"},eA=function(){return C(this).scheme+":"},eL=function(){return C(this).username},eR=function(){return C(this).password},eI=function(){var t=C(this),r=t.host,t=t.port;return null===r?"":null===t?n(r):n(r)+":"+t},eD=function(){var t=C(this).host;return null===t?"":n(t)},eF=function(){var t=C(this).port;return null===t?"":String(t)},eN=function(){var t=C(this),r=t.path;return t.cannotBeABaseURL?r[0]:r.length?"/"+r.join("/"):""},eU=function(){var t=C(this).query;return t?"?"+t:""},eB=function(){return C(this).searchParams},eG=function(){var t=C(this).fragment;return t?"#"+t:""};f&&y(m,{href:l(eC,function(t){var r=C(this),t=String(t),t=i(r,t);if(t)throw TypeError(t);k(r.searchParams).updateSearchParams(r.query)}),origin:l(eP),protocol:l(eA,function(t){i(C(this),String(t)+":",eu)}),username:l(eL,function(t){var r=C(this),o=j(String(t));if(!s(r)){r.username="";for(var n=0;n<o.length;n++)r.username+=ee(o[n],$)}}),password:l(eR,function(t){var r=C(this),o=j(String(t));if(!s(r)){r.password="";for(var n=0;n<o.length;n++)r.password+=ee(o[n],$)}}),host:l(eI,function(t){var r=C(this);r.cannotBeABaseURL||i(r,String(t),eb)}),hostname:l(eD,function(t){var r=C(this);r.cannotBeABaseURL||i(r,String(t),e_)}),port:l(eF,function(t){var r=C(this);s(r)||(""==(t=String(t))?r.port=null:i(r,t,ej))}),pathname:l(eN,function(t){var r=C(this);r.cannotBeABaseURL||(r.path=[],i(r,t+"",eT))}),search:l(eU,function(t){var r=C(this);""==(t=String(t))?r.query=null:("?"==t.charAt(0)&&(t=t.slice(1)),r.query="",i(r,t,ek)),k(r.searchParams).updateSearchParams(r.query)}),searchParams:l(eB),hash:l(eG,function(t){var r=C(this);""==(t=String(t))?r.fragment=null:("#"==t.charAt(0)&&(t=t.slice(1)),r.fragment="",i(r,t,eO))})}),g(m,"toJSON",function(){return eC.call(this)},{enumerable:!0}),g(m,"toString",function(){return eC.call(this)},{enumerable:!0}),E&&(c=E.createObjectURL,d=E.revokeObjectURL,c&&g(a,"createObjectURL",function(t){return c.apply(E,arguments)}),d&&g(a,"revokeObjectURL",function(t){return d.apply(E,arguments)})),S(a,"URL"),h({global:!0,forced:!p,sham:!f},{URL:a})},{"../internals/an-instance":9,"../internals/array-from":17,"../internals/descriptors":43,"../internals/export":50,"../internals/global":60,"../internals/has":61,"../internals/internal-state":71,"../internals/native-url":85,"../internals/object-assign":90,"../internals/object-define-properties":92,"../internals/redefine":110,"../internals/set-to-string-tag":119,"../internals/string-multibyte":125,"../internals/string-punycode-to-ascii":128,"../modules/es.string.iterator":200,"../modules/web.url-search-params":247}],249:[function(t,r,o){"use strict";r.exports=t("./").polyfill()},{"./":250}],250:[function(r,n,s){(function(o,i){var a;a=function(){"use strict";function t(t){return"function"==typeof t}var n,s,a,l=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)},u=0,c=void 0,d=void 0,h=function(t,r){v[u]=t,v[u+1]=r,2===(u+=2)&&(d?d(b):x())},f="undefined"!=typeof window?window:void 0,p=f||{},p=p.MutationObserver||p.WebKitMutationObserver,m="undefined"==typeof self&&void 0!==o&&"[object process]"===({}).toString.call(o),y="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel;function g(){var t=setTimeout;return function(){return t(b,1)}}var v=Array(1e3);function b(){for(var t=0;t<u;t+=2)(0,v[t])(v[t+1]),v[t]=void 0,v[t+1]=void 0;u=0}function _(t,r){var o,n=this,s=new this.constructor(S),i=(void 0===s[w]&&I(s),n._state);return i?(o=arguments[i-1],h(function(){return L(i,s,o,n._result)})):P(n,s,t,r),s}function j(t){var r;return t&&"object"==typeof t&&t.constructor===this?t:(M(r=new this(S),t),r)}var x=m?function(){return o.nextTick(b)}:p?(s=0,m=new p(b),a=document.createTextNode(""),m.observe(a,{characterData:!0}
1),function(){a.data=s=++s%2}):y?((n=new MessageChannel).port1.onmessage=b,function(){return n.port2.postMessage(0)}):(void 0===f&&"function"==typeof r?function(){try{var t=Function("return this")().require("vertx");return void 0!==(c=t.runOnLoop||t.runOnContext)?function(){c(b)}:g()}catch(t){return g()}}:g)(),w=Math.random().toString(36).substring(2);function S(){}var T=void 0;function E(r,o,n){o.constructor===r.constructor&&n===_&&o.constructor.resolve===j?1===o._state?O(r,o._result):2===o._state?C(r,o._result):P(o,void 0,function(t){return M(r,t)},function(t){return C(r,t)}):void 0!==n&&t(n)?h(function(t){var r=!1,s=function(t,r,o,n){try{t.call(r,o,n)}catch(t){return t}}(n,o,function(n){r||(r=!0,(o!==n?M:O)(t,n))},function(o){r||(r=!0,C(t,o))},t._label);!r&&s&&(r=!0,C(t,s))},r):O(r,o)}function M(t,r){var o;if(t===r)C(t,TypeError("You cannot resolve a promise with itself"));else if(o=typeof r,null===r||"object"!=o&&"function"!=o)O(t,r);else{o=void 0;try{o=r.then}catch(r){return void C(t,r)}E(t,r,o)}}function k(t){t._onerror&&t._onerror(t._result),A(t)}function O(t,r){t._state===T&&(t._result=r,t._state=1,0!==t._subscribers.length&&h(A,t))}function C(t,r){t._state===T&&(t._state=2,t._result=r,h(k,t))}function P(t,r,o,n){var s=t._subscribers,i=s.length;t._onerror=null,s[i]=r,s[i+1]=o,s[i+2]=n,0===i&&t._state&&h(A,t)}function A(t){var r=t._subscribers,o=t._state;if(0!==r.length){for(var n,s=void 0,i=t._result,a=0;a<r.length;a+=3)n=r[a],s=r[a+o],n?L(o,n,s,i):s(i);t._subscribers.length=0}}function L(r,o,n,s){var i=t(n),a=void 0,l=void 0,u=!0;if(i){try{a=n(s)}catch(t){u=!1,l=t}if(o===a)return void C(o,TypeError("A promises callback cannot return that same promise."))}else a=s;o._state===T&&(i&&u?M(o,a):!1===u?C(o,l):1===r?O(o,a):2===r&&C(o,a))}var R=0;function I(t){t[w]=R++,t._state=void 0,t._result=void 0,t._subscribers=[]}function D(t,r){this._instanceConstructor=t,this.promise=new t(S),this.promise[w]||I(this.promise),l(r)?(this.length=r.length,this._remaining=r.length,this._result=Array(this.length),0!==this.length&&(this.length=this.length||0,this._enumerate(r),0!==this._remaining)||O(this.promise,this._result)):C(this.promise,Error("Array Methods must be provided an Array"))}D.prototype._enumerate=function(t){for(var r=0;this._state===T&&r<t.length;r++)this._eachEntry(t[r],r)},D.prototype._eachEntry=function(t,r){var o=this._instanceConstructor,n=o.resolve;if(n===j){var s,i=void 0,a=void 0,l=!1;try{i=t.then}catch(t){l=!0,a=t}i===_&&t._state!==T?this._settledAt(t._state,r,t._result):"function"!=typeof i?(this._remaining--,this._result[r]=t):o===F?(s=new o(S),l?C(s,a):E(s,t,i),this._willSettleAt(s,r)):this._willSettleAt(new o(function(r){return r(t)}),r)}else this._willSettleAt(n(t),r)},D.prototype._settledAt=function(t,r,o){var n=this.promise;n._state===T&&(this._remaining--,2===t?C(n,o):this._result[r]=o),0===this._remaining&&O(n,this._result)},D.prototype._willSettleAt=function(t,r){var o=this;P(t,void 0,function(t){return o._settledAt(1,r,t)},function(t){return o._settledAt(2,r,t)})},N.prototype.catch=function(t){return this.then(null,t)},N.prototype.finally=function(r){var o=this.constructor;return t(r)?this.then(function(t){return o.resolve(r()).then(function(){return t})},function(t){return o.resolve(r()).then(function(){throw t})}):this.then(r,r)};var F=N;function N(t){if(this[w]=R++,this._result=this._state=void 0,this._subscribers=[],S!==t){if("function"!=typeof t)throw TypeError("You must pass a resolver function as the first argument to the promise constructor");if(!(this instanceof N))throw TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object c
1onstructor cannot be called as a function.");var r=this;try{t(function(t){M(r,t)},function(t){C(r,t)})}catch(t){C(r,t)}}}return F.prototype.then=_,F.all=function(t){return new D(this,t).promise},F.race=function(t){var r=this;return new r(l(t)?function(o,n){for(var s=t.length,i=0;i<s;i++)r.resolve(t[i]).then(o,n)}:function(t,r){return r(TypeError("You must pass an array to race."))})},F.resolve=j,F.reject=function(t){var r=new this(S);return C(r,t),r},F._setScheduler=function(t){d=t},F._setAsap=function(t){h=t},F._asap=h,F.polyfill=function(){var t=void 0;if(void 0!==i)t=i;else if("undefined"!=typeof self)t=self;else try{t=Function("return this")()}catch(t){throw Error("polyfill failed because global object is unavailable in this environment")}var r=t.Promise;if(r){var o=null;try{o=Object.prototype.toString.call(r.resolve())}catch(t){}if("[object Promise]"===o&&!r.cast)return}t.Promise=F},F.Promise=F},"object"==typeof s&&void 0!==n?n.exports=a():"function"==typeof t&&t.amd?t(a):this.ES6Promise=a()}).call(this,r("_process"),void 0!==o.g?o.g:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{_process:259}],251:[function(r,o,n){var s;s=function(t,r){"use strict";function o(t){try{delete window[t]}catch(r){window[t]=void 0}}function n(t){(t=document.getElementById(t))&&document.getElementsByTagName("head")[0].removeChild(t)}r.exports=function(t){var r=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],s=t,i=r.timeout||5e3,a=r.jsonpCallback||"callback",l=void 0;return new Promise(function(u,c){var d=r.jsonpCallbackFunction||"jsonp_"+Date.now()+"_"+Math.ceil(1e5*Math.random()),h=a+"_"+d,f=(window[d]=function(t){u({ok:!0,json:function(){return Promise.resolve(t)}}),l&&clearTimeout(l),n(h),o(d)},s+=-1===s.indexOf("?")?"?":"&",document.createElement("script"));f.setAttribute("src",""+s+a+"="+d),r.charset&&f.setAttribute("charset",r.charset),f.id=h,document.getElementsByTagName("head")[0].appendChild(f),l=setTimeout(function(){c(Error("JSONP request to "+t+" timed out")),o(d),n(h),window[d]=function(){o(d)}},i),f.onerror=function(){c(Error("JSONP request to "+t+" failed")),o(d),n(h),l&&clearTimeout(l)}})}},"function"==typeof t&&t.amd?t(["exports","module"],s):void 0!==n&&void 0!==o?s(0,o):(s(s={exports:{}},s),this.fetchJsonp=s.exports)},{}],252:[function(r,o,n){var s=function(t){"use strict";var r,o,n,s,i,a,l,u,c,d;if(!(void 0===t||"undefined"!=typeof navigator&&/MSIE [1-9]\./.test(navigator.userAgent)))return d=t.document,r=function(){return t.URL||t.webkitURL||t},n="download"in(o=d.createElementNS("http://www.w3.org/1999/xhtml","a")),s=/constructor/i.test(t.HTMLElement)||t.safari,i=/CriOS\/[\d]+/.test(navigator.userAgent),a=function(r){(t.setImmediate||t.setTimeout)(function(){throw r},0)},l=function(t){setTimeout(function(){"string"==typeof t?r().revokeObjectURL(t):t.remove()},4e4)},u=function(t){return/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(t.type)?new Blob([String.fromCharCode(65279),t],{type:t.type}):t},d=(c=function(c,d,h){h||(c=u(c));var f,p,m=this,h="application/octet-stream"===c.type,y=function(){for(var t="writestart progress write writeend".split(" "),r=void 0,o=(t=[].concat(t)).length;o--;){var n=m["on"+t[o]];if("function"==typeof n)try{n.call(m,r||m)}catch(t){a(t)}}};m.readyState=m.INIT,n?(f=r().createObjectURL(c),setTimeout(function(){var t;o.href=f,o.download=d,t=new MouseEvent("click"),o.dispatchEvent(t),y(),l(f),m.readyState=m.DONE})):(i||h&&s)&&t.FileReader?((p=new FileReader).onloadend=function(){var r=i?p.result:p.result.replace(/^data:[^;]*;/,"data:attachment/file;");t.open(r,"_blank")||(t.location.href=r),r=void 0,m.readyState=m.DONE,y()},p.readAsDataURL(c),m.readyState=m.INIT):(f=f||r().createObjectURL(c),!h&&t.open(f,"_blank")||(t.location.href=f),m.readyState=m.DONE,y(),l(f))}).prototype,"undefined"!=typeof navigator&&navigator.msSaveOrOpenBlob?function(t,r,o){return r=r||t.name||"download",o||(t=u(t)),navigator.msSaveOrOpenBlob(t,r)}:(d.abort=function(){},d.readyState=d.INIT=0,d.WRITING=1,d.DONE=2,d.error=d.onwritestart=d.onprogress=d.onwrite=d.onabort=d.onerror=d.onwriteend=null,function(t,r,o){return new c(t,r||t.name||"download",o)})}("undefined"!=typeof self&&self||"undefined"!=typeof window&&window||this.content);void 0!==o&&o.exports?o.exports.saveAs=s:null!=t&&null!==t.amd&&t("FileSaver.js",function(){return s})},{}],253:[function(t,r,o){var n,s=Object.defineProperty,i=(s(o,"__esModule",{value:!0}),o),a={GIFEncoder:()=>j,applyPalette:()=>function(t,r,o="rgb565"){if(!t||!t.buffer||!(t instanceof Uint8Array||t instanceof Uint8ClampedArray))throw Error("quantize() expected RGBA Uint8Array data");
1if(256<r.length)throw Error("applyPalette() only works with 256 colors or less");let n=new Uint32Array(t.buffer),s=n.length,i=new Uint8Array(s),a=Array("rgb444"===o?4096:65536);if("rgba4444"===o)for(let t=0;t<s;t++){var l=n[t],u=l>>24&255,c=l>>16&255,p=l>>8&255,l=255&l,m=h(l,p,c,u),m=m in a?a[m]:a[m]=function(t,r,o,n,s){let i=0,a=1e100;for(let p=0;p<s.length;p++){var l,u,c,d,h=s[p],f=(d=h[3]-n)*d;f>a||(f+=(l=h[0]-t)*l)>a||(f+=(u=h[1]-r)*u)>a||(f+=(c=h[2]-o)*c)>a||(a=f,i=p)}return i}(l,p,c,u,r);i[t]=m}else{let t="rgb444"===o?f:d;for(let o=0;o<s;o++){var y=n[o],g=y>>16&255,v=y>>8&255,y=255&y,b=t(y,v,g),b=b in a?a[b]:a[b]=function(t,r,o,n){let s=0,i=1e100;for(let h=0;h<n.length;h++){var a,l,u,c=n[h],d=(u=c[0]-t)*u;d>i||(d+=(a=c[1]-r)*a)>i||(d+=(l=c[2]-o)*l)>i||(i=d,s=h)}return s}(y,v,g,r);i[o]=b}}return i},default:()=>E,nearestColor:()=>function(t,r,o=g){return t[b(t,r,o)]},nearestColorIndex:()=>b,nearestColorIndexWithDistance:()=>_,prequantize:()=>function(t,{roundRGB:r=5,roundAlpha:o=10,oneBitAlpha:n=null}={}){let s=new Uint32Array(t.buffer);for(let t=0;t<s.length;t++){var i=s[t];let u=i>>24&255;var a=i>>16&255,l=i>>8&255,i=255&i;u=v(u,o),n&&(u=u<=("number"==typeof n?n:127)?0:255),i=v(i,r),l=v(l,r),a=v(a,r),s[t]=u<<24|a<<16|l<<8|i<<0}},quantize:()=>function(t,r,o={}){var{format:n="rgb565",clearAlpha:s=!0,clearAlphaColor:i=0,clearAlphaThreshold:a=0,oneBitAlpha:l=!1}=o;if(!t||!t.buffer||!(t instanceof Uint8Array||t instanceof Uint8ClampedArray))throw Error("quantize() expected RGBA Uint8Array data");t=new Uint32Array(t.buffer);let u=!1!==o.useSqrt,c="rgba4444"===n,g=function(t,r){let o=Array("rgb444"===r?4096:65536),n=t.length;if("rgba4444"===r)for(let r=0;r<n;++r){var s=t[r],i=s>>24&255,a=s>>16&255,l=s>>8&255,s=255&s,u=h(s,l,a,i);let n=u in o?o[u]:o[u]=y();n.rc+=s,n.gc+=l,n.bc+=a,n.ac+=i,n.cnt++}else if("rgb444"===r)for(let r=0;r<n;++r){var c=t[r],p=c>>16&255,m=c>>8&255,c=255&c,g=f(c,m,p);let n=g in o?o[g]:o[g]=y();n.rc+=c,n.gc+=m,n.bc+=p,n.cnt++}else for(let r=0;r<n;++r){var v=t[r],b=v>>16&255,_=v>>8&255,v=255&v,j=d(v,_,b);let n=j in o?o[j]:o[j]=y();n.rc+=v,n.gc+=_,n.bc+=b,n.cnt++}return o}(t,n),v=g.length,b=v-1,_=new Uint32Array(v+1);for(var j=0,x=0;x<v;++x){let t=g[x];null!=t&&(L=1/t.cnt,c&&(t.ac*=L),t.rc*=L,t.gc*=L,t.bc*=L,g[j++]=t)}r*r/j<.022&&(u=!1);for(var w,S,T,x=0;x<j-1;++x)g[x].fw=x+1,g[x+1].bk=x,u&&(g[x].cnt=Math.sqrt(g[x].cnt));for(u&&(g[x].cnt=Math.sqrt(g[x].cnt)),x=0;x<j;++x){m(g,x,!1);var E=g[x].err;for(S=++_[0];1<S&&!(g[w=_[T=S>>1]].err<=E);S=T)_[S]=w;_[S]=x}var M,k=j-r;for(x=0;x<k;){for(;;){var O=_[1];if((M=g[O]).tm>=M.mtm&&g[M.nn].mtm<=M.tm)break;for(M.mtm==b?O=_[1]=_[_[0]--]:(m(g,O,!1),M.tm=x),E=g[O].err,S=1;(T=S+S)<=_[0]&&(T<_[0]&&g[_[T]].err>g[_[T+1]].err&&T++,!(E<=g[w=_[T]].err));S=T)_[S]=w;_[S]=O}var C=g[M.nn],P=M.cnt,A=C.cnt,L=1/(P+A);c&&(M.ac=L*(P*M.ac+A*C.ac)),M.rc=L*(P*M.rc+A*C.rc),M.gc=L*(P*M.gc+A*C.gc),M.bc=L*(P*M.bc+A*C.bc),M.cnt+=C.cnt,M.mtm=++x,g[C.bk].fw=C.fw,g[C.fw].bk=C.bk,C.mtm=b}let R=[];for(x=0;;){let t=p(Math.round(g[x].rc),0,255),r=p(Math.round(g[x].gc),0,255),o=p(Math.round(g[x].bc),0,255),n=255;c&&(n=p(Math.round(g[x].ac),0,255),l&&(n=n<=(I="number"==typeof l?l:127)?0:255),s&&n<=a&&(t=r=o=i,n=0));var I=c?[t,r,o,n]:[t,r,o];if(function(t,r){for(let s=0;s<t.length;s++){var o=t[s],n=o[0]===r[0]&&o[1]===r[1]&&o[2]===r[2],o=!(4<=o.length&&4<=r.length)||o[3]===r[3];if(n&&o)return!0}return!1}(R,I)||R.push(I),0==(x=g[x].fw))break}return R},snapColorsToPalette:()=>function(t,r,o=5){if(t.length&&r.length){var n=t.map(t=>t.slice(0,3)),s=o*o,i=t[0].length;for(let o=0;o<r.length;o++){let u=r[o];var a=_(n,(u=u.length<i?[u[0],u[1],u[2],255]:u.length>i?u.slice(0,3):u.slice()).slice(0,3),g),l=a[0],a=a[1];0<a&&a<=s&&(t[l]=u)}}}};for(n in a)s(i,n,{get:a[n],enumerable:!0});function l(t=256){let r=0,o=new Uint8Array(t);return{get buffer(){return o.buffer},reset(){r=0},bytesView:()=>o.subarray(0,r),bytes:()=>o.slice(0,r),writeByte(t){n(r+1),o[r]=t,r++},writeBytes(t,s=0,i=t.length){n(r+i);for(let n=0;n<i;n++)o[r++]=t[n+s]}
1,writeBytesView(t,s=0,i=t.byteLength){n(r+i),o.set(t.subarray(s,s+i),r),r+=i}};function n(t){var n=o.length;if(!(t<=n)){t=Math.max(t,n*(n<1048576?2:1.125)>>>0),0!=n&&(t=Math.max(t,256));let s=o;o=new Uint8Array(t),0<r&&o.set(s.subarray(0,r),0)}}}var u=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],c=function(t,r,o,n,s=l(512),i=new Uint8Array(256),a=new Int32Array(5003),c=new Int32Array(5003)){var d=a.length,n=Math.max(2,n);i.fill(0),c.fill(0),a.fill(-1);let h=0,f=0;var p=n+1;let m=!1,y=p,g=(1<<y)-1;var v=1<<p-1;let b=1+v,_=2+v,j=0,x=o[0],w=0;for(let t=d;t<65536;t*=2)++w;w=8-w,s.writeByte(n),k(v);var S=o.length;for(let t=1;t<S;t++)e:{var T=o[t],E=(T<<12)+x;let r=T<<w^x;if(a[r]===E)x=c[r];else{for(var M=0===r?1:d-r;0<=a[r];)if((r-=M)<0&&(r+=d),a[r]===E){x=c[r];break e}k(x),x=T,_<4096?(c[r]=_++,a[r]=E):(a.fill(-1),_=2+v,m=!0,k(v))}}return k(x),k(b),s.writeByte(0),s.bytesView();function k(t){for(h&=u[f],0<f?h|=t<<f:h=t,f+=y;8<=f;)i[j++]=255&h,254<=j&&(s.writeByte(j),s.writeBytesView(i,0,j),j=0),h>>=8,f-=8;if((_>g||m)&&(m?(g=(1<<(y=p))-1,m=!1):g=12==++y?1<<y:(1<<y)-1),t==b){for(;0<f;)i[j++]=255&h,254<=j&&(s.writeByte(j),s.writeBytesView(i,0,j),j=0),h>>=8,f-=8;0<j&&(s.writeByte(j),s.writeBytesView(i,0,j),j=0)}}};function d(t,r,o){return t<<8&63488|r<<2&992|o>>3}function h(t,r,o,n){return t>>4|240&r|(240&o)<<4|(240&n)<<8}function f(t,r,o){return t>>4<<8|240&r|o>>4}function p(t,r,o){return t<r?r:o<t?o:t}function m(t,r,o){var n=0,s=1e100;let i=t[r];for(var a=i.cnt,l=i.ac,u=i.rc,c=i.gc,d=i.bc,h=i.fw;0!=h;h=t[h].fw){var f,p,m,y,g,v=t[h],b=v.cnt,b=a*b/(a+b);s<=b||(g=0,o&&s<=(g+=(f=v.ac-l)*f*b)||s<=(g+=(p=v.rc-u)*p*b)||s<=(g+=(m=v.gc-c)*m*b)||s<=(g+=(y=v.bc-d)*y*b)||(s=g,n=h))}i.err=s,i.nn=n}function y(){return{ac:0,rc:0,gc:0,bc:0,cnt:0,nn:0,fw:0,bk:0,tm:0,mtm:0,err:0}}function g(t,r){for(var o=0,n=0;n<t.length;n++){var s=t[n]-r[n];o+=s*s}return o}function v(t,r){return 1<r?Math.round(t/r)*r:t}function b(t,r,o=g){let n=1/0,s=-1;for(let a=0;a<t.length;a++){var i=o(r,t[a]);i<n&&(n=i,s=a)}return s}function _(t,r,o=g){let n=1/0,s=-1;for(let a=0;a<t.length;a++){var i=o(r,t[a]);i<n&&(n=i,s=a)}return[s,n]}function j(t={}){let{initialCapacity:r=4096,auto:o=!0}=t,n=l(r),s=new Uint8Array(256),i=new Int32Array(5003),a=new Int32Array(5003),u=!1;return{reset(){n.reset(),u=!1},finish(){n.writeByte(59)},bytes:()=>n.bytes(),bytesView:()=>n.bytesView(),get buffer(){return n.buffer},get stream(){return n},writeHeader:d,writeFrame(t,r,l,h={}){var{transparent:f=!1,transparentIndex:p=0,delay:m=0,palette:y=null,repeat:g=0,colorDepth:v=8,dispose:b=-1}=h;let _=!1;if(o?u||(_=!0,d(),u=!0):_=!!h.first,r=Math.max(0,Math.floor(r)),l=Math.max(0,Math.floor(l)),_){if(!y)throw Error("First frame must include a { palette } option");var[h,j,E,M,k=8]=[n,r,l,y,v];k=128|k-1<<4|(M=T(M.length)-1),w(h,j),w(h,E),h.writeBytes([k,0,0]),x(n,y),0<=g&&(M=n,j=g,M.writeByte(33),M.writeByte(255),M.writeByte(11),S(M,"NETSCAPE2.0"),M.writeByte(3),M.writeByte(1),w(M,j),M.writeByte(0))}var O,E=Math.round(m/10),h=n,k=b,g=E,j=f,M=p,m=(h.writeByte(33),h.writeByte(249),h.writeByte(4),M<0&&(M=0,j=!1),j=j?(O=1,2):O=0,0<=k&&(j=7&k),j<<=2,h.writeByte(0|j|O),w(h,g),h.writeByte(M||0),h.writeByte(0),!!y&&!_);b=n,f=r,p=l,O=m?y:null,b.writeByte(44),w(b,0),w(b,0),w(b,f),w(b,p),O?(f=T(O.length)-1,b.writeByte(128|f)):b.writeByte(0),m&&x(n,y),[g,h,p,f,b=8,m,y,t]=[n,t,r,l,v,s,i,a],c(p,f,h,b,g,m,y,t)}};function d(){S(n,"GIF89a")}}function x(t,r){var o=1<<T(r.length);for(let n=0;n<o;n++){let o=[0,0,0];n<r.length&&(o=r[n]),t.writeByte(o[0]),t.writeByte(o[1]),t.writeByte(o[2])}}function w(t,r){t.writeByte(255&r),t.writeByte(r>>8&255)}function S(t,r){for(var o=0;o<r.length;o++)t.writeByte(r.charCodeAt(o))}function T(t){return Math.max(Math.ceil(Math.log2(t)),1)}var E=j},{}],254:[function(t,r,o){o.read=function(t,r,o,n,s){var i,a,l=8*s-n-1,u=(1<<l)-1,c=u>>1,d=-7,h=o?s-1:0,f=o?-1:1,s=t[r+h];for(h+=f,i=s&(1<<-d)-1,s>>=-d,d+=l;0<d;i=256*i+t[r+h],h+=f,d-=8);for(a=i&(1<<-d)-1,i>>=-d,d+=n;0<d;a=256*a+t[r+h],h+=f,d-=8);if(0===i)i=1-c;else{if(i===u)return a?NaN:1/0*(s?-1:1);a+=Math.pow(2,n),i-=c}return(s?-1:1)*a*Math.pow(2,i-n)},o.write=function(t,r,o,n,s,i){var a,l,u=8*i-s-1,c=(1<<u)-1,d=c>>1,h=23===s?5960464477539062e-23:0,f=n?0:i-1,p=n?1:-1,i=r<0||0===r&&1/r<0?1:0;for(isNaN(r=Math.abs(r))||r===1/0?(l=isNaN(r)?1:0,a=c):(a=Math.floor(Math.log(r)/Math.LN2),r*(n=Math.pow(2,-a))<1&&(a--,n*=2),2<=(r+=1<=a+d?h/n:h*Math.pow(2,1-d))*n&&(a++,n/=2),c<=a+d?(l=0,a=c):1<=a+d?(l=(r*n-1)*M
1ath.pow(2,s),a+=d):(l=r*Math.pow(2,d-1)*Math.pow(2,s),a=0));8<=s;t[o+f]=255&l,f+=p,l/=256,s-=8);for(a=a<<s|l,u+=s;0<u;t[o+f]=255&a,f+=p,a/=256,u-=8);t[o+f-p]|=128*i}},{}],255:[function(t,r,o){"use strict";var n;function s(t,r){return t.b===r.b&&t.a===r.a}function i(t,r){return t.b<r.b||t.b===r.b&&t.a<=r.a}function a(t,r,o){var n=r.b-t.b,s=o.b-r.b;return 0<n+s?n<s?r.a-t.a+n/(n+s)*(t.a-o.a):r.a-o.a+s/(n+s)*(o.a-t.a):0}function l(t,r,o){var n=r.b-t.b,s=o.b-r.b;return 0<n+s?(r.a-o.a)*n+(r.a-t.a)*s:0}function u(t,r){return t.a<r.a||t.a===r.a&&t.b<=r.b}function c(t,r,o){var n=r.a-t.a,s=o.a-r.a;return 0<n+s?n<s?r.b-t.b+n/(n+s)*(t.b-o.b):r.b-o.b+s/(n+s)*(o.b-t.b):0}function d(t,r,o){var n=r.a-t.a,s=o.a-r.a;return 0<n+s?(r.b-o.b)*n+(r.b-t.b)*s:0}function h(t,r,o,n){return(t=t<0?0:t)<=(o=o<0?0:o)?0===o?(r+n)/2:r+t/(t+o)*(n-r):n+o/(t+o)*(r-n)}function f(t){var r=v(t.b);return _(r,t.c),_(r.b,t.c),j(r,t.a),r}function p(t,r){var o=!1,n=!1;t!==r&&(r.a!==t.a&&(n=!0,w(r.a,t.a)),r.d!==t.d&&(o=!0,S(r.d,t.d)),b(r,t),n||(_(r,t.a),t.a.c=t),o||(j(r,t.d),t.d.a=t))}function m(t){var r=t.b,o=!1;t.d!==t.b.d&&(o=!0,S(t.d,t.b.d)),t.c===t?w(t.a,null):(t.b.d.a=t.b.e,t.a.c=t.c,b(t,t.b.e),o||j(t,t.d)),r.c===r?(w(r.a,null),S(r.d,null)):(t.d.a=r.b.e,r.a.c=r.c,b(r,r.b.e)),x(t)}function y(t){var r=v(t),o=r.b;return b(r,t.e),r.a=t.b.a,_(o,r.a),r.d=o.d=t.d,r=r.b,b(t.b,t.b.b.e),b(t.b,r),t.b.a=r.a,r.b.a.c=r.b,r.b.d=t.b.d,r.f=t.f,r.b.f=t.b.f,r}function g(t,r){var o=!1,n=v(t),s=n.b;return r.d!==t.d&&(o=!0,S(r.d,t.d)),b(n,t.e),b(s,r),n.a=t.b.a,s.a=r.a,n.d=s.d=t.d,t.d.a=s,o||j(n,t.d),n}function v(t){var r=new K,o=new K,n=t.b.h;return(((o.h=n).b.h=r).h=t).b.h=o,r.b=o,((r.c=r).e=o).b=r,(o.c=o).e=r}function b(t,r){var o=t.c,n=r.c;o.b.e=r,(n.b.e=t).c=n,r.c=o}function _(t,r){var o=r.f,n=new J(r,o);for(o.e=n,o=(r.f=n).c=t;o.a=n,(o=o.c)!==t;);}function j(t,r){var o=r.d,n=new Z(r,o);for(o.b=n,(r.d=n).a=t,n.c=r.c,o=t;o.d=n,(o=o.e)!==t;);}function x(t){var r=t.h;t=t.b.h,(r.b.h=t).b.h=r}function w(t,r){for(var o=t.c,n=o;n.a=r,(n=n.c)!==o;);o=t.f,((n=t.e).f=o).e=n}function S(t,r){for(var o=t.a,n=o;n.d=r,(n=n.e)!==o;);o=t.d,((n=t.b).d=o).b=n}function T(t){var r=0;return Math.abs(t[1])>Math.abs(t[0])&&(r=1),r=Math.abs(t[2])>Math.abs(t[r])?2:r}function E(t,r){t.f+=r.f,t.b.f+=r.b.f}function M(t,r,o){return t=t.a,r=r.a,o=o.a,r.b.a===t?o.b.a===t?i(r.a,o.a)?0>=l(o.b.a,r.a,o.a):0<=l(r.b.a,o.a,r.a):0>=l(o.b.a,t,o.a):o.b.a===t?0<=l(r.b.a,t,r.a):(r=a(r.b.a,t,r.a),(t=a(o.b.a,t,o.a))<=r)}function k(t){t.a.i=null;var r=t.e;r.a.c=r.c,r.c.a=r.a,t.e=null}function O(t,r){m(t.a),t.c=!1,(t.a=r).i=t}function C(t){for(var r=t.a.a;(t=ec(t)).a.a===r;);return t.c&&(O(t,r=g(eu(t).a.b,t.a.e)),t=ec(t)),t}function P(t,r,o){var n=new el;return n.a=o,n.e=H(t.f,r.e,n),o.i=n}function A(t,r){switch(t.s){case 100130:return 0!=(1&r);case 100131:return 0!==r;case 100132:return 0<r;case 100133:return r<0;case 100134:return 2<=r||r<=-2}return!1}function L(t){var r=t.a,o=r.d;o.c=t.d,o.a=r,k(t)}function R(t,r,o){for(r=(t=r).a;t!==o;){t.c=!1;var n=eu(t),s=n.a;if(s.a!==r.a){if(!n.c){L(t);break}O(n,s=g(r.c.b,s.b))}r.c!==s&&(p(s.b.e,s),p(r,s)),L(t),r=n.a,t=n}return r}function I(t,r,o,n,s,i){for(var a=!0;P(t,r,o.b),(o=o.c)!==n;);for(null===s&&(s=eu(r).a.b.c);(o=(n=eu(r)).a.b).a===s.a;)o.c!==s&&(p(o.b.e,o),p(s.b.e,o)),n.f=r.f-o.f,n.d=A(t,n.f),r.b=!0,!a&&U(t,r)&&(E(o,s),k(r),m(s)),a=!1,r=n,s=o;r.b=!0,i&&G(t,r)}function D(t,r,o,n,s){var i=[r.g[0],r.g[1],r.g[2]];r.d=null,r.d=t.o&&t.o(i,o,n,t.c)||null,null===r.d&&(s?t.n||(Y(t,100156),t.n=!0):r.d=o[0])}function F(t,r,o){var n=[null,null,null,null];n[0]=r.a.d,n[1]=o.a.d,D(t,r.a,n,[.5,.5,0,0],!1),p(r,o)}function N(t,r,o,n,s){var i=Math.abs(r.b-t.b)+Math.abs(r.a-t.a),a=Math.abs(o.b-t.b)+Math.abs(o.a-t.a),l=s+1;n[s]=.5*a/(i+a),n[l]=.5*i/(i+a),t.g[0]+=n[s]*r.g[0]+n[l]*o.g[0],t.g[1]+=n[s]*r.g[1]+n[l]*o.g[1],t.g[2]+=n[s]*r.g[2]+n[l]*o.g[2]}function U(t,r){var o=eu(r),n=r.a,a=o.a;if(i(n.a,a.a)){if(0<l(a.b.a,n.a,a.a))return;if(s(n.a,a.a)){if(n.a!==a.a){var o=t.e,u=n.a.h;if(0<=u){var c=(o=o.b).d,d=o.e,h=o.c,f=h[u];c[f]=c[o.a],(h[c[f]]=f)<=--o.a&&(f<=1||i(d[c[f>>1]],d[c[f]])?ei:ea)(o,f),d[u]=null,h[u]=o.b,o.b=u}else for(o.c[-(u+1)]=null;0<o.a&&null===o.c[o.d[o.a-1]];)--o.a;F(t,a.b.e,n)}}else y(a.b),p(n,a.b.e),r.b=o.b=!0}else{if(0>l(n.b.a,a.a,n.a))return;ec(r).b=r.b=!0,y(n.b),p(a.b.e,n)}return 1}function B(t,r){var o=eu(r),n=r.a,f=o.a,m=n.a,g=f.a,v=n.b.a,b=f.b.a,_=new J;if(l(v,t.a,m),l(b,t.a,g),!(m===g||Math.min(m.a,v.a)>
1Math.max(g.a,b.a))){if(i(m,g)){if(0<l(b,m,g))return}else if(0>l(v,g,m))return;var j,x,w=v,S=m,T=b,E=g;if(i(w,S)||(j=w,w=S,S=j),i(T,E)||(j=T,T=E,E=j),i(w,T)||(j=w,w=T,T=j,j=S,S=E,E=j),i(T,S)?i(S,E)?((j=a(w,T,S))+(x=a(T,S,E))<0&&(j=-j,x=-x),_.b=h(j,T.b,x,S.b)):((j=l(w,T,S))+(x=-l(w,E,S))<0&&(j=-j,x=-x),_.b=h(j,T.b,x,E.b)):_.b=(T.b+S.b)/2,u(w,S)||(j=w,w=S,S=j),u(T,E)||(j=T,T=E,E=j),u(w,T)||(j=w,w=T,T=j,j=S,S=E,E=j),u(T,S)?u(S,E)?((j=c(w,T,S))+(x=c(T,S,E))<0&&(j=-j,x=-x),_.a=h(j,T.a,x,S.a)):((j=d(w,T,S))+(x=-d(w,E,S))<0&&(j=-j,x=-x),_.a=h(j,T.a,x,E.a)):_.a=(T.a+S.a)/2,i(_,t.a)&&(_.b=t.a.b,_.a=t.a.a),w=i(m,g)?m:g,i(w,_)&&(_.b=w.b,_.a=w.a),s(_,m)||s(_,g))return U(t,r),0;if(!s(v,t.a)&&0<=l(v,t.a,_)||!s(b,t.a)&&0>=l(b,t.a,_)){if(b===t.a)y(n.b),p(f.b,n),n=eu(r=C(r)).a,R(t,eu(r),o),I(t,r,n.b.e,n,n,!0);else{if(v!==t.a)return 0<=l(v,t.a,_)&&(ec(r).b=r.b=!0,y(n.b),n.a.b=t.a.b,n.a.a=t.a.a),void(0>=l(b,t.a,_)&&(r.b=o.b=!0,y(f.b),f.a.b=t.a.b,f.a.a=t.a.a));for(y(f.b),p(n.e,f.b.e),g=(m=o=r).a.b.a;(m=ec(m)).a.b.a===g;);m=eu(r=m).a.b.c,o.a=f.b.e,I(t,r,(f=R(t,o,null)).c,n.b.c,m,!0)}return 1}y(n.b),y(f.b),p(f.b.e,n),n.a.b=_.b,n.a.a=_.a,n.a.h=ee(t.e,n.a),n=n.a,f=[0,0,0,0],_=[m.d,v.d,g.d,b.d],n.g[0]=n.g[1]=n.g[2]=0,N(n,m,v,f,0),N(n,g,b,f,2),D(t,n,_,f,!0),ec(r).b=r.b=o.b=!0}}function G(t,r){for(var o=eu(r);;){for(;o.b;)o=eu(r=o);if(!r.b&&(null===(r=ec(o=r))||!r.b))break;r.b=!1;var n=r.a,s=o.a;if(a=n.b.a!==s.b.a)e:{var a,u=eu(a=r),c=a.a,d=u.a,h=void 0;if(i(c.b.a,d.b.a)){if(0>l(c.b.a,d.b.a,c.a)){a=!1;break e}ec(a).b=a.b=!0,h=y(c),p(d.b,h),h.d.c=a.d}else{if(0<l(d.b.a,c.b.a,d.a)){a=!1;break e}a.b=u.b=!0,h=y(d),p(c.e,d.b),h.b.d.c=a.d}a=!0}if(a&&(o.c?(k(o),m(s),s=(o=eu(r)).a):r.c&&(k(r),m(n),n=(r=ec(o)).a)),n.a!==s.a){if(n.b.a===s.b.a||r.c||o.c||n.b.a!==t.a&&s.b.a!==t.a)U(t,r);else if(B(t,r))break}n.a===s.a&&n.b.a===s.b.a&&(E(s,n),k(r),m(n),r=ec(o))}}function V(t,r){var o=new el,n=f(t.b);n.a.b=4e150,n.a.a=r,n.b.a.b=-4e150,n.b.a.a=r,t.a=n.b.a,o.a=n,o.f=0,o.d=!1,o.c=!1,o.h=!0,o.b=!1,n=H(n=t.f,n.a,o),o.e=n}function z(t){this.a=new W,this.b=t,this.c=M}function H(t,r,o){for(;null!==(r=r.c).b&&!t.c(t.b,r.b,o););return t=new W(o,r.a,r),r.a.c=t,r.a=t}function W(t,r,o){this.b=t||null,this.a=r||this,this.c=o||this}function q(){this.d=0,this.p=this.b=this.q=null,this.j=[0,0,0],this.s=100130,this.n=!1,this.o=this.a=this.e=this.f=null,this.m=!1,this.c=this.r=this.i=this.k=this.l=this.h=null}function X(t,r){if(t.d!==r)for(;t.d!==r;)if(t.d<r)switch(t.d){case 0:Y(t,100151),t.u(null);break;case 1:Y(t,100152),t.t()}else switch(t.d){case 2:Y(t,100154),t.v();break;case 1:Y(t,100153),t.w()}}function Y(t,r){t.p&&t.p(r,t.c)}function Z(t,r){this.b=t||this,this.d=r||this,this.a=null,this.c=!1}function K(){(this.h=this).i=this.d=this.a=this.e=this.c=this.b=null,this.f=0}function Q(){this.c=new J,this.a=new Z,this.b=new K,this.d=new K,this.b.b=this.d,this.d.b=this.b}function J(t,r){this.e=t||this,this.f=r||this,this.d=this.c=null,this.g=[0,0,0],this.h=this.a=this.b=0}function $(){this.c=[],this.d=null,this.a=0,this.e=!1,this.b=new er}function ee(t,r){var o,n,s;return t.e?(2*(n=++(o=t.b).a)>o.f&&(o.f*=2,o.c=eo(o.c,o.f+1)),0===o.b?s=n:(s=o.b,o.b=o.c[o.b]),o.e[s]=r,o.c[s]=n,o.d[n]=s,o.h&&ea(o,n),s):(o=t.a++,t.c[o]=r,-(o+1))}function et(t){if(0===t.a)return es(t.b);var r=t.c[t.d[t.a-1]];if(0!==t.b.a&&i(en(t.b),r))return es(t.b);for(;--t.a,0<t.a&&null===t.c[t.d[t.a-1]];);return r}function er(){this.d=eo([0],33),this.e=[null,null],this.c=[0,0],this.a=0,this.f=32,this.b=0,this.h=!1,this.d[1]=1}function eo(t,r){for(var o=Array(r),n=0;n<t.length;n++)o[n]=t[n];for(;n<r;n++)o[n]=0;return o}function en(t){return t.e[t.d[1]]}function es(t){var r=t.d,o=t.e,n=t.c,s=r[1],i=o[s];return 0<t.a&&(r[1]=r[t.a],n[r[1]]=1,o[s]=null,n[s]=t.b,t.b=s,0<--t.a&&ei(t,1)),i}function ei(t,r){for(var o=t.d,n=t.e,s=t.c,a=r,l=o[a];;){var u=a<<1,c=(u<t.a&&i(n[o[u+1]],n[o[u]])&&(u+=1),o[u]);if(u>t.a||i(n[l],n[c])){s[o[a]=l]=a;break}s[o[a]=c]=a,a=u}}function ea(t,r){for(var o=t.d,n=t.e,s=t.c,a=r,l=o[a];;){var u=a>>1,c=o[u];if(0==u||i(n[c],n[l])){s[o[a]=l]=a;break}s[o[a]=c]=a,a=u}}function el(){this.e=this.a=null,this.f=0,this.c=this.b=this.h=this.d=!1}function eu(t){return t.e.c.b}function ec(t){return t.e.a.b}(n=q.prototype).x=function(){X(this,0)},n.B=function(t,r){switch(t){case 100142:return;case 100140:switch(r){case 100130:case 100131:case 100132:case 100133:case 100134:return void(this.s=r)}break;case 100141:return void(this.m=!!r);default:return void Y(this,100900)}Y(this,100901)},n.y=function(t){switch(t){case 100142:return 0;case 100140:return this.s;case 100141:return this.m;default:Y(this,100900)}return!1},n.A=function(t,r,o){this.j[0]=t,this.j[1]=r,this.j[2]=o},n.z=function(t,r){var o=r||null;switch(t){case 100100:case 100106:this.h=o;break;case 100104:case 100110:this.l=o;break;case 100101:case 100107:this.k=o;break;case 100102:case 100108:this.i=o;break;case 100103:case 100109:this.p=o;break;case 100105:case 100111:this.o=o;break;case 100112:this.r=o;break;default:Y(this,100900)}},n.C=function(t,r){var o=!1,n=[0,0,0];X(this,2);for(var s=0;s<3;++s){var i=t[s];i<-1e150&&(i=-1e150,o=!0),1e150<i&&(i=1e150,o=!0),n[s]=i}o&&Y(this,100155),null===(o=this.q)?p(o=f(this.b),o.b):(y(o),o=o.e),o.a.d=r,o.a.g[0]=n[0],o.a.g[1]=n[1],o.a.g[2]=n[2],o.f=1,o.b.f=-1,this.q=o},n.u=function(t){X(this,0),this.d=1,this.b=new Q,this.c=t},n.t=function(){X(this,1),this.d=2,this.q=null},n.v=function(){X(this,2),this.d=1},n.w=function(){X(this,1),this.d=0;var t,r,o,n=this.j[0],a=this.j[1],u=this.j[2],c=!1,d=[n,a,u];
1if(0===n&&0===a&&0===u){for(var a=[-2e150,-2e150,-2e150],h=[2e150,2e150,2e150],u=[],f=[],n=(c=this.b.c).e;n!==c;n=n.e)for(var v=0;v<3;++v){var _=n.g[v];_<h[v]&&(h[v]=_,f[v]=n),_>a[v]&&(a[v]=_,u[v]=n)}if(a[1]-h[1]>a[n=0]-h[0]&&(n=1),h[n=a[2]-h[2]>a[n]-h[n]?2:n]>=a[n])d[0]=0,d[1]=0,d[2]=1;else{for(h=f[n],u=u[n],f=[a=0,0,0],h=[h.g[0]-u.g[0],h.g[1]-u.g[1],h.g[2]-u.g[2]],v=[0,0,0],n=c.e;n!==c;n=n.e)v[0]=n.g[0]-u.g[0],v[1]=n.g[1]-u.g[1],v[2]=n.g[2]-u.g[2],f[0]=h[1]*v[2]-h[2]*v[1],f[1]=h[2]*v[0]-h[0]*v[2],f[2]=h[0]*v[1]-h[1]*v[0],a<(_=f[0]*f[0]+f[1]*f[1]+f[2]*f[2])&&(a=_,d[0]=f[0],d[1]=f[1],d[2]=f[2]);a<=0&&(d[0]=d[1]=d[2]=0,d[T(h)]=1)}c=!0}for(f=T(d),n=this.b.c,a=(f+1)%3,u=(f+2)%3,f=0<d[f]?1:-1,d=n.e;d!==n;d=d.e)d.b=d.g[a],d.a=f*d.g[u];if(c){for(d=0,n=(c=this.b.a).b;n!==c;n=n.b)if(!((a=n.a).f<=0))for(;d+=(a.a.b-a.b.a.b)*(a.a.a+a.b.a.a),(a=a.e)!==n.a;);if(d<0)for(c=(d=this.b.c).e;c!==d;c=c.e)c.a=-c.a}for(this.n=!1,n=(d=this.b.b).h;n!==d;n=c)c=n.h,a=n.e,s(n.a,n.b.a)&&n.e.e!==n&&(F(this,a,n),m(n),a=(n=a).e),a.e===n&&(a!==n&&(a!==c&&a!==c.b||(c=c.h),m(a)),n!==c&&n!==c.b||(c=c.h),m(n));for(this.e=d=new $,n=(c=this.b.c).e;n!==c;n=n.e)n.h=ee(d,n);var j=d;j.d=[];for(var S=0;S<j.a;S++)j.d[S]=S;j.d.sort((t=j.c,function(r,o){return i(t[r],t[o])?1:-1})),j.e=!0;for(var M=j.b,L=M.a;1<=L;--L)ei(M,L);for(M.h=!0,this.f=new z(this),V(this,-4e150),V(this,4e150);null!==(d=et(this.e));){for(;;){e:if(0===(n=this.e).a)c=en(n.b);else if(c=n.c[n.d[n.a-1]],0!==n.b.a&&i(n=en(n.b),c)){c=n;break e}if(null===c||!s(c,d))break;c=et(this.e),F(this,d.c,c.c)}!function t(r,o){for(var n,a=(r.a=o).c;null===a.i;)if((a=a.c)===o.c){var a=r,u=o;(v=new el).a=u.c.b;for(var c=(d=a.f).a;null!==(c=c.a).b&&!d.c(d.b,v,c.b););var d,h,f=eu(d=c.b),v=d.a,c=f.a;return void(0===l(v.b.a,u,v.a)?s((v=d.a).a,u)||s(v.b.a,u)||(y(v.b),d.c&&(m(v.c),d.c=!1),p(u.c,v),t(a,u)):(h=i(c.b.a,v.b.a)?d:f,f=void 0,d.d||h.c?(f=h===d?g(u.c.b,v.e):g(c.b.c.b,u.c).b,h.c?O(h,f):((d=P(v=a,d,f)).f=ec(d).f+d.a.f,d.d=A(v,d.f)),t(a,u)):I(a,d,u.c,u.c,null,!0)))}d=(v=eu(a=C(a.i))).a,(v=R(r,v,null)).c===d?(v=(d=v).c,c=eu(a),f=a.a,h=c.a,n=!1,f.b.a!==h.b.a&&B(r,a),s(f.a,r.a)&&(p(v.b.e,f),v=eu(a=C(a)).a,R(r,eu(a),c),n=!0),s(h.a,r.a)&&(p(d,h.b.e),d=R(r,c,null),n=!0),n?I(r,a,d.c,v,v,!0):(u=i(h.a,f.a)?h.b.e:f,I(r,a,u=g(d.c.b,u),u.c,u.c,!1),u.b.i.c=!0,G(r,a))):I(r,a,v.c,d,d,!0)}(this,d)}for(this.a=this.f.a.a.b.a.a,d=0;null!==(c=this.f.a.a.b);)c.h||++d,k(c);for(this.f=null,(d=this.e).b=null,d.d=null,this.e=d.c=null,n=(d=this.b).a.b;n!==d.a;n=c)c=n.b,(n=n.a).e.e===n&&(E(n.c,n),m(n));
1if(!this.n){if(d=this.b,this.m)for(n=d.b.h;n!==d.b;n=c)c=n.h,n.b.d.c!==n.d.c?n.f=n.d.c?1:-1:m(n);else for(n=d.a.b;n!==d.a;n=c)if(c=n.b,n.c){for(n=n.a;i(n.b.a,n.a);n=n.c.b);for(;i(n.a,n.b.a);n=n.e);for(a=n.c.b,u=void 0;n.e!==a;)if(i(n.b.a,a.a)){for(;a.e!==n&&(i((o=a.e).b.a,o.a)||0>=l(a.a,a.b.a,a.e.b.a));)a=(u=g(a.e,a)).b;a=a.c.b}else{for(;a.e!==n&&(i((r=n.c.b).a,r.b.a)||0<=l(n.b.a,n.a,n.c.b.a));)n=(u=g(n,n.c.b)).b;n=n.e}for(;a.e.e!==n;)a=(u=g(a.e,a)).b}if(this.h||this.i||this.k||this.l){if(this.m){for(c=(d=this.b).a.b;c!==d.a;c=c.b)if(c.c){for(this.h&&this.h(2,this.c),n=c.a;this.k&&this.k(n.a.d,this.c),(n=n.e)!==c.a;);this.i&&this.i(this.c)}}else{for(d=this.b,c=!!this.l,n=!1,a=-1,u=d.a.d;u!==d.a;u=u.d)if(u.c)for(n||(this.h&&this.h(4,this.c),n=!0),f=u.a;c&&a!==(h=f.b.d.c?0:1)&&(a=h,this.l&&this.l(!!a,this.c)),this.k&&this.k(f.a.d,this.c),(f=f.e)!==u.a;);n&&this.i&&this.i(this.c)}}if(this.r){for(n=(d=this.b).a.b;n!==d.a;n=c)if(c=n.b,!n.c){for(u=(a=n.a).e,f=void 0;u=(f=u).e,(f.d=null)===f.b.d&&(f.c===f?w(f.a,null):(f.a.c=f.c,b(f,f.b.e)),(h=f.b).c===h?w(h.a,null):(h.a.c=h.c,b(h,h.b.e)),x(f)),f!==a;);a=n.d,((n=n.b).d=a).b=n}return this.r(this.b),void(this.c=this.b=null)}}this.b=this.c=null},this.libtess={GluTesselator:q,windingRule:{GLU_TESS_WINDING_ODD:100130,GLU_TESS_WINDING_NONZERO:100131,GLU_TESS_WINDING_POSITIVE:100132,GLU_TESS_WINDING_NEGATIVE:100133,GLU_TESS_WINDING_ABS_GEQ_TWO:100134},primitiveType:{GL_LINE_LOOP:2,GL_TRIANGLES:4,GL_TRIANGLE_STRIP:5,GL_TRIANGLE_FAN:6},errorType:{GLU_TESS_MISSING_BEGIN_POLYGON:100151,GLU_TESS_MISSING_END_POLYGON:100153,GLU_TESS_MISSING_BEGIN_CONTOUR:100152,GLU_TESS_MISSING_END_CONTOUR:100154,GLU_TESS_COORD_TOO_LARGE:100155,GLU_TESS_NEED_COMBINE_CALLBACK:100156},gluEnum:{GLU_TESS_MESH:100112,GLU_TESS_TOLERANCE:100142,GLU_TESS_WINDING_RULE:100140,GLU_TESS_BOUNDARY_ONLY:100141,GLU_INVALID_ENUM:100900,GLU_INVALID_VALUE:100901,GLU_TESS_BEGIN:100100,GLU_TESS_VERTEX:100101,GLU_TESS_END:100102,GLU_TESS_ERROR:100103,GLU_TESS_EDGE_FLAG:100104,GLU_TESS_COMBINE:100105,GLU_TESS_BEGIN_DATA:100106,GLU_TESS_VERTEX_DATA:100107,GLU_TESS_END_DATA:100108,GLU_TESS_ERROR_DATA:100109,GLU_TESS_EDGE_FLAG_DATA:100110,GLU_TESS_COMBINE_DATA:100111}},q.prototype.gluDeleteTess=q.prototype.x,q.prototype.gluTessProperty=q.prototype.B,q.prototype.gluGetTessProperty=q.prototype.y,q.prototype.gluTessNormal=q.prototype.A,q.prototype.gluTessCallback=q.prototype.z,q.prototype.gluTessVertex=q.prototype.C,q.prototype.gluTessBeginPolygon=q.prototype.u,q.prototype.gluTessBeginContour=q.prototype.t,q.prototype.gluTessEndContour=q.prototype.v,q.prototype.gluTessEndPolygon=q.prototype.w,void 0!==r&&(r.exports=this.libtess)},{}],256:[function(t,r,o){"use strict";function n(t,r,o,n){for(var s=t[r++],i=1<<s,a=1+i,l=1+a,u=s+1,c=(1<<u)-1,d=0,h=0,f=0,p=t[r++],m=new Int32Array(4096),y=null;;){for(;d<16&&0!==p;)h|=t[r++]<<d,d+=8,1===p?p=t[r++]:--p;if(d<u)break;var g=h&c;if(h>>=u,d-=u,g==i)l=1+a,c=(1<<(u=s+1))-1,y=null;else{if(g==a)break;for(var v=g<l?g:y,b=0,_=v;i<_;)_=m[_]>>8,++b;var j=_;if(n<f+b+(v!==g?1:0))return void console.log("Warning, gif stream longer than expected.");o[f++]=j;var x=f+=b;for(v!==g&&(o[f++]=j),_=v;b--;)_=m[_],o[--x]=255&_,_>>=8;null!==y&&l<4096&&(m[l++]=y<<8|j,c+1<=l&&u<12&&(++u,c=c<<1|1)),y=g}}f!==n&&console.log("Warning, gif stream shorter than expected.")}try{o.GifWriter=function(t,r,o,n){var s=0,i=void 0===(n=void 0===n?{}:n).loop?null:n.loop,a=void 0===n.palette?null:n.palette;if(r<=0||o<=0||65535<r||65535<o)throw Error("Width/Height invalid.");function l(t){if((t=t.length)<2||256<t||t&t-1)throw Error("Invalid code/color length, must be power of 2 and 2 .. 256.");return t}t[s++]=71,t[s++]=73,t[s++]=70,t[s++]=56,t[s++]=57,t[s++]=97;var u=0,c=0;if(null!==a){for(var d=l(a);d>>=1;)++u;if(d=1<<u,--u,void 0!==n.background){if(d<=(c=n.background))throw Error("Background index out of range.");if(0===c)throw Error("Background index explicitly passed as 0.")}}if(t[s++]=255&r,t[s++]=r>>8&255,t[s++]=255&o,t[s++]=o>>8&255,t[s++]=(null!==a?128:0)|u,t[s++]=c,t[s++]=0,null!==a)for(var h=0,f=a.length;h<f;++h){var p=a[h];t[s++]=p>>16&255,t[s++]=p>>8&255,t[s++]=255&p}if(null!==i){if(i<0||65535<i)throw Error("Loop count invalid.");t[s++]=33,t[s++]=255,t[s++]=11,t[s++]=78,t[s++]=69,t[s++]=84,t[s++]=83,t[s++]=67,t[s++]=65,t[s++]=80,t[
1s++]=69,t[s++]=50,t[s++]=46,t[s++]=48,t[s++]=3,t[s++]=1,t[s++]=255&i,t[s++]=i>>8&255,t[s++]=0}var m=!1;this.addFrame=function(r,o,n,i,u,c){if(!0===m&&(--s,m=!1),c=void 0===c?{}:c,r<0||o<0||65535<r||65535<o)throw Error("x/y invalid.");if(n<=0||i<=0||65535<n||65535<i)throw Error("Width/Height invalid.");if(u.length<n*i)throw Error("Not enough pixels for the frame size.");var d=!0,h=c.palette;if(null==h&&(d=!1,h=a),null==h)throw Error("Must supply either a local or global palette.");for(var f=l(h),p=0;f>>=1;)++p;var f=1<<p,y=void 0===c.delay?0:c.delay,g=void 0===c.disposal?0:c.disposal;if(g<0||3<g)throw Error("Disposal out of range.");var v=!1,b=0;if(void 0!==c.transparent&&null!==c.transparent&&(v=!0,(b=c.transparent)<0||f<=b))throw Error("Transparent color index.");if((0!==g||v||0!==y)&&(t[s++]=33,t[s++]=249,t[s++]=4,t[s++]=g<<2|(!0===v?1:0),t[s++]=255&y,t[s++]=y>>8&255,t[s++]=b,t[s++]=0),t[s++]=44,t[s++]=255&r,t[s++]=r>>8&255,t[s++]=255&o,t[s++]=o>>8&255,t[s++]=255&n,t[s++]=n>>8&255,t[s++]=255&i,t[s++]=i>>8&255,t[s++]=!0===d?128|p-1:0,!0===d)for(var _=0,j=h.length;_<j;++_){var x=h[_];t[s++]=x>>16&255,t[s++]=x>>8&255,t[s++]=255&x}return s=function(t,r,o,n){t[r++]=o;var s=r++,i=1<<o,a=i-1,l=1+i,u=1+l,c=o+1,d=0,h=0;function f(o){for(;o<=d;)t[r++]=255&h,h>>=8,d-=8,r===s+256&&(t[s]=255,s=r++)}function p(t){h|=t<<d,d+=c,f(8)}var m=n[0]&a,y={};p(i);for(var g=1,v=n.length;g<v;++g){var b=n[g]&a,_=m<<8|b,j=y[_];if(void 0===j){for(h|=m<<d,d+=c;8<=d;)t[r++]=255&h,h>>=8,d-=8,r===s+256&&(t[s]=255,s=r++);4096===u?(p(i),u=1+l,c=o+1,y={}):(1<<c<=u&&++c,y[_]=u++),m=b}else m=j}return p(m),p(l),f(1),s+1===r?t[s]=0:(t[s]=r-s-1,t[r++]=0),r}(t,s,p<2?2:p,u)},this.end=function(){return!1===m&&(t[s++]=59,m=!0),s},this.getOutputBuffer=function(){return t},this.setOutputBuffer=function(r){t=r},this.getOutputBufferPosition=function(){return s},this.setOutputBufferPosition=function(t){s=t}},o.GifReader=function(t){var r=0;if(71!==t[r++]||73!==t[r++]||70!==t[r++]||56!==t[r++]||56!=(t[r++]+1&253)||97!==t[r++])throw Error("Invalid GIF 87a/89a header.");var o=t[r++]|t[r++]<<8,s=t[r++]|t[r++]<<8,i=t[r++],a=1<<1+(7&i),l=(t[r++],t[r++],null),u=null,c=(i>>7&&(l=r,r+=3*(u=a)),!0),d=[],h=0,f=null,p=0,m=null;for(this.width=o,this.height=s;c&&r<t.length;)switch(t[r++]){case 33:switch(t[r++]){case 255:if(11!==t[r]||78==t[r+1]&&69==t[r+2]&&84==t[r+3]&&83==t[r+4]&&67==t[r+5]&&65==t[r+6]&&80==t[r+7]&&69==t[r+8]&&50==t[r+9]&&46==t[r+10]&&48==t[r+11]&&3==t[r+12]&&1==t[r+13]&&0==t[r+16])r+=14,m=t[r++]|t[r++]<<8,r++;else for(r+=12;;){if(!(0<=(g=t[r++])))throw Error("Invalid block size");if(0===g)break;r+=g}break;case 249:if(4!==t[r++]||0!==t[r+4])throw Error("Invalid graphics extension block.");var y=t[r++],h=t[r++]|t[r++]<<8,f=t[r++];0==(1&y)&&(f=null),p=y>>2&7,r++;break;case 254:for(;;){if(!(0<=(g=t[r++])))throw Error("Invalid block size");if(0===g)break;r+=g}break;default:throw Error("Unknown graphic control label: 0x"+t[r-1].toString(16))}break;case 44:var g,v=t[r++]|t[r++]<<8,b=t[r++]|t[r++]<<8,_=t[r++]|t[r++]<<8,j=t[r++]|t[r++]<<8,x=t[r++],w=x>>6&1,S=1<<1+(7&x),T=l,E=u,M=!1,x=(x>>7&&(M=!0,T=r,r+=3*(E=S)),r);for(r++;;){if(!(0<=(g=t[r++])))throw Error("Invalid block size");if(0===g)break;r+=g}d.push({x:v,y:b,width:_,height:j,has_local_palette:M,palette_offset:T,palette_size:E,data_offset:x,data_length:r-x,transparent_index:f,interlaced:!!w,delay:h,disposal:p});break;case 59:c=!1;break;default:throw Error("Unknown gif block: 0x"+t[r-1].toString(16))}this.numFrames=function(){return d.length},this.loopCount=function(){return m},this.frameInfo=function(t){if(t<0||t>=d.length)throw Error("Frame index out of range.");return d[t]},this.decodeAndBlitFrameBGRA=function(r,s){for(var r=this.frameInfo(r),i=r.width*r.height,a=new Uint8Array(i),l=(n(t,r.data_offset,a,i),r.palette_offset),u=r.transparent_index,c=(null===u&&(u=256),r.width),d=o-c,h=c,f=4*(r.y*o+r.x),p=4*((r.y+r.height)*o+r.x),m=f,y=4*d,g=(!0===r.interlaced&&(y+=4*o*7),8),v=0,b=a.length;v<b;++v){var _,j,x=a[v];0===h&&(h=c,p<=(m+=y)&&(y=4*d+4*o*(g-1),m=f+(c+d)*(g<<1),g>>=1)),x===u?m+=4:(_=t[l+3*x],j=t[l+3*x+1],x=t[l+3*x+2],s[m++]=x,s[m++]=j,s[m++]=_,s[m++]=255),--h}},this.decodeAndBlitFrameRGBA=function(r,s){for(var r=this.frameInfo(r),i=r.width*r.height,a=new Uint8Array(i),l=(n(t,r.data_offset,a,i),r.palette_offset),u=r.transparent_index,c=(null===u&&(u=256),r.width),d=o-c,h=c,f=4*(r.y*o+r.x),p=4*((r.y+r.height)*o+r.x),m=f,y=4*d,g=(!0===r.interlaced&&(y+=4*o*7),8),v=0,b=a.length;v<b;++v){var _,j,x=a[v];0===h&&(h=c,p<=(m+=y)&&(y=4*d+4*o*(g-1),m=f+(c+d)*(g<<1),g>>=1)),x===u?m+=4:(_=t[l+3*x],j=t[l+3*x+1],x=t[l+3*x+2],s[m++]=_,s[m++]=j,s[m++]=x,s[m++]=255),--h}}}}catch(t){}},{}],257:[function(r,o,n){(function(s){var i;i=function(t){"use strict";function o(t){if(null==this)throw TypeError();var r,o=String(this),n=o.length,t=t?Number(t):0;
1if(!((t=t!=t?0:t)<0||n<=t))return 55296<=(r=o.charCodeAt(t))&&r<=56319&&t+1<n&&56320<=(n=o.charCodeAt(t+1))&&n<=57343?1024*(r-55296)+n-56320+65536:r}function n(){this.table=new Uint16Array(16),this.trans=new Uint16Array(288)}function i(t,r){this.source=t,this.sourceIndex=0,this.tag=0,this.bitcount=0,this.dest=r,this.destLen=0,this.ltree=new n,this.dtree=new n}String.prototype.codePointAt||((L=function(){try{var t={},r=Object.defineProperty,o=r(t,t,t)&&r}catch(t){}return o}())?L(String.prototype,"codePointAt",{value:o,configurable:!0,writable:!0}):String.prototype.codePointAt=o);var a=new n,l=new n,u=new Uint8Array(30),c=new Uint16Array(30),d=new Uint8Array(30),h=new Uint16Array(30),f=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),p=new n,m=new Uint8Array(320);function y(t,r,o,n){for(var s,i=0;i<o;++i)t[i]=0;for(i=0;i<30-o;++i)t[i+o]=i/o|0;for(s=n,i=0;i<30;++i)r[i]=s,s+=1<<t[i]}var g=new Uint16Array(16);function v(t,r,o,n){for(var s,i=0;i<16;++i)t.table[i]=0;for(i=0;i<n;++i)t.table[r[o+i]]++;for(i=s=t.table[0]=0;i<16;++i)g[i]=s,s+=t.table[i];for(i=0;i<n;++i)r[o+i]&&(t.trans[g[r[o+i]]++]=i)}function b(t,r,o){if(!r)return o;for(;t.bitcount<24;)t.tag|=t.source[t.sourceIndex++]<<t.bitcount,t.bitcount+=8;var n=t.tag&65535>>>16-r;return t.tag>>>=r,t.bitcount-=r,n+o}function _(t,r){for(;t.bitcount<24;)t.tag|=t.source[t.sourceIndex++]<<t.bitcount,t.bitcount+=8;for(var o=0,n=0,s=0,i=t.tag;n=2*n+(1&i),i>>>=1,o+=r.table[++s],0<=(n-=r.table[s]););return t.tag=i,t.bitcount-=s,r.trans[o+n]}function j(t,r,o){for(;;){var n=_(t,r);if(256===n)return 0;if(n<256)t.dest[t.destLen++]=n;else for(var s,i=b(t,u[n-=257],c[n]),n=_(t,o),a=s=t.destLen-b(t,d[n],h[n]);a<s+i;++a)t.dest[t.destLen++]=t.dest[a]}}for(var x=0;x<7;++x)a.table[x]=0;for(a.table[7]=24,a.table[8]=152,a.table[9]=112,x=0;x<24;++x)a.trans[x]=256+x;for(x=0;x<144;++x)a.trans[24+x]=x;for(x=0;x<8;++x)a.trans[168+x]=280+x;for(x=0;x<112;++x)a.trans[176+x]=144+x;for(x=0;x<5;++x)l.table[x]=0;for(l.table[5]=32,x=0;x<32;++x)l.trans[x]=x;y(u,c,4,3),y(d,h,2,1),u[28]=0,c[28]=258;var w=function(t,r){var o,n,s,u=new i(t,r);do{switch(s=void 0,(n=u).bitcount--||(n.tag=n.source[n.sourceIndex++],n.bitcount=7),s=1&n.tag,n.tag>>>=1,n=s,b(u,2,0)){case 0:o=function(t){for(var r,o;8<t.bitcount;)t.sourceIndex--,t.bitcount-=8;if((r=256*t.source[t.sourceIndex+1]+t.source[t.sourceIndex])!==(65535&~(256*t.source[t.sourceIndex+3]+t.source[t.sourceIndex+2])))return -3;for(t.sourceIndex+=4,o=r;o;--o)t.dest[t.destLen++]=t.source[t.sourceIndex++];return t.bitcount=0,0}(u);break;case 1:o=j(u,a,l);break;case 2:M=E=T=k=c=S=w=x=g=y=h=d=void 0;for(var c,d=u,h=u.ltree,y=u.dtree,g=b(d,5,257),x=b(d,5,1),w=b(d,4,4),S=0;S<19;++S)m[S]=0;for(S=0;S<w;++S){var T=b(d,3,0);m[f[S]]=T}for(v(p,m,0,19),c=0;c<g+x;){var E=_(d,p);switch(E){case 16:for(var M=m[c-1],k=b(d,2,3);k;--k)m[c++]=M;break;case 17:for(k=b(d,3,3);k;--k)m[c++]=0;break;case 18:for(k=b(d,7,11);k;--k)m[c++]=0;break;default:m[c++]=E}}v(h,m,0,g),v(y,m,g,x),o=j(u,u.ltree,u.dtree);break;default:o=-3}if(0!==o)throw Error("Data error")}while(!n);return u.destLen<u.dest.length?"function"==typeof u.dest.slice?u.dest.slice(0,u.destLen):u.dest.subarray(0,u.destLen):u.dest};function S(t,r,o,n,s){return Math.pow(1-s,3)*t+3*Math.pow(1-s,2)*s*r+3*(1-s)*Math.pow(s,2)*o+Math.pow(s,3)*n}function T(){this.x1=Number.NaN,this.y1=Number.NaN,this.x2=Number.NaN,this.y2=Number.NaN}function E(){this.commands=[],this.fill="black",this.stroke=null,this.strokeWidth=1}function M(t,r){t||function(t){throw Error(t)}(r)}T.prototype.isEmpty=function(){return isNaN(this.x1)||isNaN(this.y1)||isNaN(this.x2)||isNaN(this.y2)},T.prototype.addPoint=function(t,r){"number"==typeof t&&((isNaN(this.x1)||isNaN(this.x2))&&(this.x1=t,this.x2=t),t<this.x1&&(this.x1=t),t>this.x2&&(this.x2=t)),"number"==typeof r&&((isNaN(this.y1)||isNaN(this.y2))&&(this.y1=r,this.y2=r),r<this.y1&&(this.y1=r),r>this.y2&&(this.y2=r))},T.prototype.addX=function(t){this.addPoint(t,null)},T.prototype.addY=function(t){this.addPoint(null,t)},T.prototype.addBezier=function(t,r,o,n,s,i,a,l){var u=[t,r],c=[o,n],d=[s,i],h=[a,l];this.addPoint(t,r),this.addPoint(a,l);for(var f=0;f<=1;f++){var p,m=6*u[f]-12*c[f]+6*d[f],y=-3*u[f]+9*c[f]-9*d[f]+3*h[f],g=3*c[f]-3*u[f];0==y?0==m||0<(p=-g/m)&&p<1&&(0===f&&this.addX(S(u[f],c[f],d[f],h[f],p)),1===f&&this.addY(S(u[f],c[f],d[f],h[f],p))):(p=Math.pow(m,2)-4*g*y)<0||(0<(g=(-m+Math.sqrt(p))/(2*y))&&g<1&&(0===f&&this.addX(S(u[f],c[f],d[f],h[f],g)),1===f&&this.addY(S(u[f],c[f],d[f],h[f],g))),0<(g=(-m-Math.sqrt(p))/(2*y))&&g<1&&(0===f&&this.addX(S(u[f],c[f],d[f],h[f],g)),1===f&&this.addY(S(u[f],c[f],d[f],h[f],g)))
1)}},T.prototype.addQuad=function(t,r,o,n,s,i){o=t+2/3*(o-t),n=r+2/3*(n-r),this.addBezier(t,r,o,n,o+1/3*(s-t),n+1/3*(i-r),s,i)},E.prototype.moveTo=function(t,r){this.commands.push({type:"M",x:t,y:r})},E.prototype.lineTo=function(t,r){this.commands.push({type:"L",x:t,y:r})},E.prototype.curveTo=E.prototype.bezierCurveTo=function(t,r,o,n,s,i){this.commands.push({type:"C",x1:t,y1:r,x2:o,y2:n,x:s,y:i})},E.prototype.quadTo=E.prototype.quadraticCurveTo=function(t,r,o,n){this.commands.push({type:"Q",x1:t,y1:r,x:o,y:n})},E.prototype.close=E.prototype.closePath=function(){this.commands.push({type:"Z"})},E.prototype.extend=function(t){var r;if(t.commands)t=t.commands;else if(t instanceof T)return r=t,this.moveTo(r.x1,r.y1),this.lineTo(r.x2,r.y1),this.lineTo(r.x2,r.y2),this.lineTo(r.x1,r.y2),void this.close();Array.prototype.push.apply(this.commands,t)},E.prototype.getBoundingBox=function(){for(var t=new T,r=0,o=0,n=0,s=0,i=0;i<this.commands.length;i++){var a=this.commands[i];switch(a.type){case"M":t.addPoint(a.x,a.y),r=n=a.x,o=s=a.y;break;case"L":t.addPoint(a.x,a.y),n=a.x,s=a.y;break;case"Q":t.addQuad(n,s,a.x1,a.y1,a.x,a.y),n=a.x,s=a.y;break;case"C":t.addBezier(n,s,a.x1,a.y1,a.x2,a.y2,a.x,a.y),n=a.x,s=a.y;break;case"Z":n=r,s=o;break;default:throw Error("Unexpected path command "+a.type)}}return t.isEmpty()&&t.addPoint(0,0),t},E.prototype.draw=function(t){t.beginPath();for(var r=0;r<this.commands.length;r+=1){var o=this.commands[r];"M"===o.type?t.moveTo(o.x,o.y):"L"===o.type?t.lineTo(o.x,o.y):"C"===o.type?t.bezierCurveTo(o.x1,o.y1,o.x2,o.y2,o.x,o.y):"Q"===o.type?t.quadraticCurveTo(o.x1,o.y1,o.x,o.y):"Z"===o.type&&t.closePath()}this.fill&&(t.fillStyle=this.fill,t.fill()),this.stroke&&(t.strokeStyle=this.stroke,t.lineWidth=this.strokeWidth,t.stroke())},E.prototype.toPathData=function(t){function r(){for(var r=arguments,o="",n=0;n<arguments.length;n+=1){var s=r[n];0<=s&&0<n&&(o+=" "),o+=Math.round(s)===s?""+Math.round(s):s.toFixed(t)}return o}t=void 0!==t?t:2;for(var o="",n=0;n<this.commands.length;n+=1){var s=this.commands[n];"M"===s.type?o+="M"+r(s.x,s.y):"L"===s.type?o+="L"+r(s.x,s.y):"C"===s.type?o+="C"+r(s.x1,s.y1,s.x2,s.y2,s.x,s.y):"Q"===s.type?o+="Q"+r(s.x1,s.y1,s.x,s.y):"Z"===s.type&&(o+="Z")}return o},E.prototype.toSVG=function(t){var r=(r='<path d="')+this.toPathData(t)+'"';return this.fill&&"black"!==this.fill&&(null===this.fill?r+=' fill="none"':r+=' fill="'+this.fill+'"'),this.stroke&&(r+=' stroke="'+this.stroke+'" stroke-width="'+this.strokeWidth+'"'),r+="/>"},E.prototype.toDOMElement=function(t){var t=this.toPathData(t),r=document.createElementNS("http://www.w3.org/2000/svg","path");return r.setAttribute("d",t),r};var k={argument:M,assert:M},O={},C={},P={};function A(t){return function(){return t}}C.BYTE=function(t){return k.argument(0<=t&&t<=255,"Byte value should be between 0 and 255."),[t]},P.BYTE=A(1),C.CHAR=function(t){return[t.charCodeAt(0)]},P.CHAR=A(1),C.CHARARRAY=function(t){for(var r=[],o=0;o<t.length;o+=1)r[o]=t.charCodeAt(o);return r},P.CHARARRAY=function(t){return t.length},C.USHORT=function(t){return[t>>8&255,255&t]},P.USHORT=A(2),C.SHORT=function(t){return[(t=32768<=t?-(65536-t):t)>>8&255,255&t]},P.SHORT=A(2),C.UINT24=function(t){return[t>>16&255,t>>8&255,255&t]},P.UINT24=A(3),C.ULONG=function(t){return[t>>24&255,t>>16&255,t>>8&255,255&t]},P.ULONG=A(4),C.LONG=function(t){return[(t=2147483648<=t?-(4294967296-t):t)>>24&255,t>>16&255,t>>8&255,255&t]},P.LONG=A(4),C.FIXED=C.ULONG,P.FIXED=P.ULONG,C.FWORD=C.SHORT,P.FWORD=P.SHORT,C.UFWORD=C.USHORT,P.UFWORD=P.USHORT,C.LONGDATETIME=function(t){return[0,0,0,0,t>>24&255,t>>16&255,t>>8&255,255&t]},P.LONGDATETIME=A(8),C.TAG=function(t){return k.argument(4===t.length,"Tag should be exactly 4 ASCII characters."),[t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2),t.charCodeAt(3)]},P.TAG=A(4),C.Card8=C.BYTE,P.Card8=P.BYTE,C.Card16=C.USHORT,P.Card16=P.USHORT,C.OffSize=C.BYTE,P.OffSize=P.BYTE,C.SID=C.USHORT,P.SID=P.USHORT,C.NUMBER=function(t){return -107<=t&&t<=107?[t+139]:108<=t&&t<=1131?[247+((t-=108)>>8),255&t]:-1131<=t&&t<=-108?[251+((t=-t-108)>>8),255&t]:-32768<=t&&t<=32767?C.NUMBER16(t):C.NUMBER32(t)},P.NUMBER=function(t){return C.NUMBER(t).length},C.NUMBER16=function(t){return[28,t>>8&255,255&t]},P.NUMBER16=A(3),C.NUMBER32=function(t){return[29,t>>24&255,t>>16&255,t>>8&255,255&t]},P.NUMBER32=A(5),C.REAL=function(t){for(var r=t.toString(),o=/\.(\d*?)(?:9{5,20}|0{5,20})\d{0,2}(?:e(.+)|$)/.exec(r),n=(o&&(r=(Math.round(t*(o=parseFloat("1e"+((o[2]?+o[2]:0)+o[1].length))))/o).toString()),""),s=0,i=r.length;s<i;s+=1){var a=r[s];n+="e"===a?"-"===r[++s]?"c":"b":"."===a?"a":"-"===a?"e":a}for(var l=[30],u=0,c=(n+=1&n.length?"f":"ff").length;u<c;u+=2)l.push(parseInt(n.substr(u,2),16));return l},P.REAL=function(t){return C.REAL(t).length},C.NAME=C.CHARARRAY,P.NAME=P.CHARARRAY,C.STRING=C.CHARARRAY,P.STRING=P.CHARARRAY,O.UTF8=function(t,r,o){for(var n=[],s=0;s<o;s++,r+=1)n[s]=t.getUint8(r);return String.fromCharCode.apply(null,n)},O.UTF16=function(t,r,o){for(var n=[],s=o/2,i=0;i<s;i++,r+=2)n[i]=t.getUint16(r);return String.fromCharCode.apply(null,n)},C.UTF16=function(t){for(var r=[],o=0;o<t.length;o+=1){var n=t.charCodeAt(o);r[r.length]=n>>8&255,r[r.length]=255&n}return r},P.UTF16=function(t){return 2*t.length};var L,R,I={"x-mac-croatian":"\xc4\xc5\xc7\xc9\xd1\xd6\xdc\xe1\xe0\xe2\xe4\xe3\xe5\xe7\xe9\xe8\xea\xeb\xed\xec\xee\xef\xf1\xf3\xf2\xf4\xf6\xf5\xfa\xf9\xfb\xfcâ \xb0\xa2\xa3\xa7â¢\xb6\xdf\xaeÅ â¢\xb4\xa8â Ž\xd8â\xb1â¤â¥â\xb5âââÅ¡â«\xaa\xbaΩž\xf8\xbf\xa1\xacâÆâÄ\xabÄâ¦\xa0\xc0\xc3\xd5ÅÅÄâââââ\xf7â\xa9ââ¬â¹âº\xc6\xbbâ\xb7âââ°\xc2Ä\xc1Ä\xc8\xcd\xce\xcf\xcc\xd3\xd4Ä\xd2\xda\xdb\xd9ıËË\xafÏ\xcbË\xb8\xca\xe6Ë","x-mac-cyrillic":"ÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐÐРСТУФХЦЧШЩЪЫЬÐЮЯâ \xb0Ò\xa3\xa7â¢\xb6Ð\xae\xa9â¢ÐÑâ ÐÑâ\xb1â¤â¥Ñ\xb5ÒÐÐÑÐÑÐÑÐÑÑÐ
\xacâÆââ\xab\xbbâ¦\xa0ÐÑÐÑÑââââââ\xf7âÐÑÐÑâÐÑÑабвгдежзийклмнопÑÑÑÑÑÑ
ÑÑÑÑÑÑÑÑÑ","x-mac-gaelic":"\xc4\xc5\xc7\xc9\xd1\xd6\xdc\xe1\xe0\xe2\xe4\xe3\xe5\xe7\xe9\xe8\xea\xeb\xed\xec\xee\xef\xf1\xf3\xf2\xf4\xf6\xf5\xfa\xf9\xfb\xfcâ \xb0\xa2\xa3\xa7â¢\xb6\xdf\xae\xa9â¢\xb4\xa8â \xc6\xd8á¸\xb1â¤â¥á¸ÄÄá¸á¸á¸á¸Ä Ä¡á¹\xe6\xf8á¹á¹á¹É¼ÆÅ¿á¹ \xab\xbbâ¦\xa0\xc0\xc3\xd5ÅÅââââââṡáº\xffŸṪâ¬â¹âºÅ¶Å·á¹«\xb7Ỳỳâ\xc2\xca\xc1\xcb\xc8\xcd\xce\xcf\xcc\xd3\xd4â£\xd2\xda\xdb\xd9ı\xdd\xfdŴŵáºáº
áºáºáºáº","x-mac-greek":"\xc4\xb9\xb2\xc9\xb3\xd6\xdcÎ
\xe0\xe2\xe4Î\xa8\xe7\xe9\xe8\xea\xeb\xa3â¢\xee\xefâ¢\xbdâ°\xf4\xf6\xa6â¬\xf9\xfb\xfcâ ÎÎÎÎÎÎ \xdf\xae\xa9ΣΪ\xa7â \xb0\xb7Î\xb1â¤â¥\xa5ÎÎÎÎÎÎÎΦΫΨΩάÎ\xacÎΡâΤ\xab\xbbâ¦\xa0ΥΧÎÎÅââââââ\xf7ÎÎÎÎÎήίÏÎÏαβÏδεÏγηιξκλμνοÏÏÏÏÏθÏÏÏÏ
ζÏÏÎΰ\xad","x-mac-icelandic":"\xc4\xc5\xc7\xc9\xd1\xd6\xdc\xe1\xe0\xe2\xe4\xe3\xe5\xe7\xe9\xe8\xea\xeb\xed\xec\xee\xef\xf1\xf3\xf2\xf4\xf6\xf5\xfa\xf9\xfb\xfc\xdd\xb0\xa2\xa3\xa7â¢\xb6\xdf\xae\xa9â¢\xb4\xa8â \xc6\xd8â\xb1â¤â¥\xa5\xb5âââÏâ«\xaa\xbaΩ\xe6\xf8\xbf\xa1\xacâÆââ\xab\xbbâ¦\xa0\xc0\xc3\xd5ÅÅââââââ\xf7â\xffŸââ¬\xd0\xf0\xde\xfe\xfd\xb7âââ°\xc2\xca\xc1\xcb\xc8\xcd\xce\xcf\xcc\xd3\xd4\xd2\xda\xdb\xd9ıËË\xafËËË\xb8ËËË","x-mac-inuit":"ááá
áááá±á²á³á´á¸á¹áááááááá¦áá®á¯á°á²á³ááááááá\xb0á¡á¥á¦â¢\xb6á§\xae\xa9â¢á¨áªá«á»áááá
áááá¯á°á±á²á´áµá
áááááááªá¨á©áªá«áâ¦\xa0á®á¾áááââââââáááááááááááá¿áááááá
áááááááá±á²á³á´áµá¶áá á¡á¢á£á¤á¥á¦á¼ÅÅ","x-mac-ce":"\xc4ÄÄ\xc9Ä\xd6\xdc\xe1Ä
Ä\xe4ÄÄÄ\xe9ŹźÄ\xedÄÄÄÄ\xf3Ä\xf4\xf6\xf5\xfaÄÄ\xfcâ \xb0Ä\xa3\xa7â¢\xb6\xdf\xae\xa9â¢Ä\xa8â ģĮįĪâ¤â¥Ä«Ä¶ââÅĻļĽľĹĺÅ
ÅÅ\xacâÅÅâ\xab\xbbâ¦\xa0ÅÅ\xd5ÅÅââââââ\xf7âÅÅÅÅâ¹âºÅÅÅÅ ââÅ¡ÅÅ\xc1Ťť\xcdŽžŪ\xd3\xd4ūŮ\xdaůŰűŲų\xdd\xfdÄ·Å»ÅżĢË",macintosh:"\xc4\xc5\xc7\xc9\xd1\xd6\xdc\xe1\xe0\xe2\xe4\xe3\xe5\xe7\xe9\xe8\xea\xeb\xed\xec\xee\xef\xf1\xf3\xf2\xf4\xf6\xf5\xfa\xf9\xfb\xfcâ \xb0\xa2\xa3\xa7â¢\xb6\xdf\xae\xa9â¢\xb4\xa8â \xc6\xd8â\xb1â¤â¥\xa5\xb5âââÏâ«\xaa\xbaΩ\xe6\xf8\xbf\xa1\xacâÆââ\xab\xbbâ¦\xa0\xc0\xc3\xd5ÅÅââââââ\xf7â\xffŸââ¬â¹âºï¬ï¬â¡\xb7âââ°\xc2\xca\xc1\xcb\xc8\xcd\xce\xcf\xcc\xd3\xd4\xd2\xda\xdb\xd9ıËË\xafËËË\xb8ËËË","x-mac-romanian":"\xc4\xc5\xc7\xc9\xd1\xd6\xdc\xe1\xe0\xe2\xe4\xe3\xe5\xe7\xe9\xe8\xea\xeb\xed\xec\xee\xef\xf1\xf3\xf2\xf4\xf6\xf5\xfa\xf9\xfb\xfcâ \xb0\xa2\xa3\xa7â¢\xb6\xdf\xae\xa9â¢\xb4\xa8â ÄÈâ\xb1â¤â¥\xa5\xb5âââÏâ«\xaa\xbaΩÄÈ\xbf\xa1\xacâÆââ\xab\xbbâ¦\xa0\xc0\xc3\xd5ÅÅââââââ\xf7â\xffŸââ¬â¹âºÈÈâ¡\xb7âââ°\xc2\xca\xc1\xcb\xc8\xcd\xce\xcf\xcc\xd3\xd4\xd2\xda\xdb\xd9ıËË\xafËËË\xb8ËËË","x-mac-turkish":"\xc4\xc5\xc7\xc9\xd1\xd6\xdc\xe1\xe0\xe2\xe4\xe3\xe5\xe7\xe9\xe8\xea\xeb\xed\xec\xee\xef\xf1\xf3\xf2\xf4\xf6\xf5\xfa\xf9\xfb\xfcâ \xb0\xa2\xa3\xa7â¢\xb6\xdf\xae\xa9â¢\xb4\xa8â \xc6\xd8â\xb1â¤â¥\xa5\xb5âââÏâ«\xaa\xbaΩ\xe6\xf8\xbf\xa1\xacâÆââ\xab\xbbâ¦\xa0\xc0\xc3\xd5ÅÅââââââ\xf7â\xffŸÄÄİıÅÅâ¡\xb7âââ°\xc2\xca\xc1\xcb\xc8\xcd\xce\xcf\xcc\xd3\xd4\xd2\xda\xdb\xd9ï¢ ËË\xafËËË\xb8ËËË"},D=(O.MACSTRING=function(t,r,o,n){var s=I[n];if(void 0!==s){for(var i="",a=0;a<o;a++){var l=t.getUint8(r+a);i+=l<=127?String.fromCharCode(l):s[127&l]}return i}},"function"==typeof WeakMap&&new WeakMap);function F(t){return -128<=t&&t<=127}C.MACSTRING=function(t,r){var o=function(t){if(!R)for(var r in R={},I)R[r]=new String(r);var o=R[t];if(void 0!==o){if(D){var n=D.get(o);if(void 0!==n)return n}var s=I[t];if(void 0!==s){for(var i={},a=0;a<s.length;
1a++)i[s.charCodeAt(a)]=a+128;return D&&D.set(o,i),i}}}(r);if(void 0!==o){for(var n=[],s=0;s<t.length;s++){var i=t.charCodeAt(s);if(128<=i&&void 0===(i=o[i]))return;n[s]=i}return n}},P.MACSTRING=function(t,r){return void 0!==(t=C.MACSTRING(t,r))?t.length:0},C.VARDELTAS=function(t){for(var r=0,o=[];r<t.length;)var n=t[r],r=(0===n?function(t,r,o){for(var n=0,s=t.length;r<s&&n<64&&0===t[r];)++r,++n;return o.push(128|n-1),r}:-128<=n&&n<=127?function(t,r,o){for(var n=0,s=t.length,i=r;i<s&&n<64;){var a=t[i];if(!F(a)||0===a&&i+1<s&&0===t[i+1])break;++i,++n}o.push(n-1);for(var l=r;l<i;++l)o.push(t[l]+256&255);return i}:function(t,r,o){for(var n=0,s=t.length,i=r;i<s&&n<64;){var a=t[i];if(0===a||F(a)&&i+1<s&&F(t[i+1]))break;++i,++n}o.push(64|n-1);for(var l=r;l<i;++l){var u=t[l];o.push(u+65536>>8&255,u+256&255)}return i})(t,r,o);return o},C.INDEX=function(t){for(var r=1,o=[r],n=[],s=0;s<t.length;s+=1){var i=C.OBJECT(t[s]);Array.prototype.push.apply(n,i),r+=i.length,o.push(r)}if(0===n.length)return[0,0];for(var a=[],l=1+Math.floor(Math.log(r)/Math.log(2))/8|0,u=[void 0,C.BYTE,C.USHORT,C.UINT24,C.ULONG][l],c=0;c<o.length;c+=1){var d=u(o[c]);Array.prototype.push.apply(a,d)}return Array.prototype.concat(C.Card16(t.length),C.OffSize(l),a,n)},P.INDEX=function(t){return C.INDEX(t).length},C.DICT=function(t){for(var r=[],o=Object.keys(t),n=o.length,s=0;s<n;s+=1){var i=parseInt(o[s],0),a=t[i];r=(r=r.concat(C.OPERAND(a.value,a.type))).concat(C.OPERATOR(i))}return r},P.DICT=function(t){return C.DICT(t).length},C.OPERATOR=function(t){return t<1200?[t]:[12,t-1200]},C.OPERAND=function(t,r){var o=[];if(Array.isArray(r))for(var n=0;n<r.length;n+=1)k.argument(t.length===r.length,"Not enough arguments given for type"+r),o=o.concat(C.OPERAND(t[n],r[n]));else if("SID"===r)o=o.concat(C.NUMBER(t));else if("offset"===r)o=o.concat(C.NUMBER32(t));else if("number"===r)o=o.concat(C.NUMBER(t));else{if("real"!==r)throw Error("Unknown operand type "+r);o=o.concat(C.REAL(t))}return o},C.OP=C.BYTE,P.OP=P.BYTE;var N="function"==typeof WeakMap&&new WeakMap;function U(t,r,o){for(var n=0;n<r.length;n+=1){var s=r[n];this[s.name]=s.value}if(this.tableName=t,this.fields=r,o)for(var i=Object.keys(o),a=0;a<i.length;a+=1){var l=i[a],u=o[l];void 0!==this[l]&&(this[l]=u)}}function B(t,r,o){void 0===o&&(o=r.length);var n=Array(r.length+1);n[0]={name:t+"Count",type:"USHORT",value:o};for(var s=0;s<r.length;s++)n[s+1]={name:t+s,type:"USHORT",value:r[s]};return n}function G(t,r,o){var n=r.length,s=Array(n+1);s[0]={name:t+"Count",type:"USHORT",value:n};for(var i=0;i<n;i++)s[i+1]={name:t+i,type:"TABLE",value:o(r[i],i)};return s}function V(t,r,o){var n=r.length,s=[];s[0]={name:t+"Count",type:"USHORT",value:n};for(var i=0;i<n;i++)s=s.concat(o(r[i],i));return s}function z(t){1===t.format?U.call(this,"coverageTable",[{name:"coverageFormat",type:"USHORT",value:1}].concat(B("glyph",t.glyphs))):k.assert(!1,"Can't create coverage table format 2 yet.")}function H(t){U.call(this,"scriptListTable",V("scriptRecord",t,function(t,r){var o=t.script,n=o.defaultLangSys;return k.assert(!!n,"Unable to write GSUB: script "+t.tag+" has no default language system."),[{name:"scriptTag"+r,type:"TAG",value:t.tag},{name:"script"+r,type:"TABLE",value:new U("scriptTable",[{name:"defaultLangSys",type:"TABLE",value:new U("defaultLangSys",[{name:"lookupOrder",type:"USHORT",value:0},{name:"reqFeatureIndex",type:"USHORT",value:n.reqFeatureIndex}].concat(B("featureIndex",n.featureIndexes)))}].concat(V("langSys",o.langSysRecords,function(t,r){var o=t.langSys;return[{name:"langSysTag"+r,type:"TAG",value:t.tag},{name:"langSys"+r,type:"TABLE",value:new U("langSys",[{name:"lookupOrder",type:"USHORT",value:0},{name:"reqFeatureIndex",type:"USHORT",value:o.reqFeatureIndex}].concat(B("featureIndex",o.featureIndexes)))}]})))}]}))}function W(t){U.call(this,"featureListTable",V("featureRecord",t,function(t,r){var o=t.feature;return[{name:"featureTag"+r,type:"TAG",value:t.tag},{name:"feature"+r,type:"TABLE",value:new U("featureTable",[{name:"featureParams",type:"USHORT",value:o.featureParams}].concat(B("lookupListIndex",o.lookupListIndexes)))}]}))}function q(t,r){U.call(this,"lookupListTable",G("lookup",t,function(t){var o=r[t.lookupType];return k.assert(!!o,"Unable to write GSUB lookup type "+t.lookupType+" tables."),new U("lookupTable",[{name:"lookupType",type:"USHORT",value:t.lookupType},{name:"lookupFlag",type:"USHORT",value:t.lookupFlag}].concat(G("subtable",t.subtables,o)))}))}C.CHARSTRING=function(t){if(N){var r=N.get(t);if(void 0!==r)return r}for(var o=[],n=t.length,s=0;s<n;s+=1)var i=t[s],o=o.concat(C[i.type](i.value));return N&&N.set(t,o),o},P.CHARSTRING=function(t){return C.CHARSTRING(t).length},C.OBJECT=function(t){var r=C[t.type];
1return k.argument(void 0!==r,"No encoding function for type "+t.type),r(t.value)},P.OBJECT=function(t){var r=P[t.type];return k.argument(void 0!==r,"No sizeOf function for type "+t.type),r(t.value)},C.TABLE=function(t){for(var r=[],o=t.fields.length,n=[],s=[],i=0;i<o;i+=1){var a=t.fields[i],l=C[a.type],u=(k.argument(void 0!==l,"No encoding function for field type "+a.type+" ("+a.name+")"),t[a.name]),l=l(u=void 0===u?a.value:u);"TABLE"===a.type?(s.push(r.length),r=r.concat([0,0]),n.push(l)):r=r.concat(l)}for(var c=0;c<n.length;c+=1){var d=s[c],h=r.length;k.argument(h<65536,"Table "+t.tableName+" too big."),r[d]=h>>8,r[d+1]=255&h,r=r.concat(n[c])}return r},P.TABLE=function(t){for(var r=0,o=t.fields.length,n=0;n<o;n+=1){var s=t.fields[n],i=P[s.type],a=(k.argument(void 0!==i,"No sizeOf function for field type "+s.type+" ("+s.name+")"),t[s.name]);r+=i(a=void 0===a?s.value:a),"TABLE"===s.type&&(r+=2)}return r},C.RECORD=C.TABLE,P.RECORD=P.TABLE,C.LITERAL=function(t){return t},P.LITERAL=function(t){return t.length},U.prototype.encode=function(){return C.TABLE(this)},U.prototype.sizeOf=function(){return P.TABLE(this)};var X={Table:U,Record:U,Coverage:(z.prototype=Object.create(U.prototype)).constructor=z,ScriptList:(H.prototype=Object.create(U.prototype)).constructor=H,FeatureList:(W.prototype=Object.create(U.prototype)).constructor=W,LookupList:(q.prototype=Object.create(U.prototype)).constructor=q,ushortList:B,tableList:G,recordList:V};function Y(t,r){return t.getUint8(r)}function Z(t,r){return t.getUint16(r,!1)}function K(t,r){return t.getUint32(r,!1)}function Q(t,r){return t.getInt16(r,!1)+t.getUint16(r+2,!1)/65535}var J={byte:1,uShort:2,short:2,uLong:4,fixed:4,longDateTime:8,tag:4};function $(t,r){this.data=t,this.offset=r,this.relativeOffset=0}$.prototype.parseByte=function(){var t=this.data.getUint8(this.offset+this.relativeOffset);return this.relativeOffset+=1,t},$.prototype.parseChar=function(){var t=this.data.getInt8(this.offset+this.relativeOffset);return this.relativeOffset+=1,t},$.prototype.parseCard8=$.prototype.parseByte,$.prototype.parseCard16=$.prototype.parseUShort=function(){var t=this.data.getUint16(this.offset+this.relativeOffset);return this.relativeOffset+=2,t},$.prototype.parseSID=$.prototype.parseUShort,$.prototype.parseOffset16=$.prototype.parseUShort,$.prototype.parseShort=function(){var t=this.data.getInt16(this.offset+this.relativeOffset);return this.relativeOffset+=2,t},$.prototype.parseF2Dot14=function(){var t=this.data.getInt16(this.offset+this.relativeOffset)/16384;return this.relativeOffset+=2,t},$.prototype.parseOffset32=$.prototype.parseULong=function(){var t=K(this.data,this.offset+this.relativeOffset);return this.relativeOffset+=4,t},$.prototype.parseFixed=function(){var t=Q(this.data,this.offset+this.relativeOffset);return this.relativeOffset+=4,t},$.prototype.parseString=function(t){var r=this.data,o=this.offset+this.relativeOffset,n="";this.relativeOffset+=t;for(var s=0;s<t;s++)n+=String.fromCharCode(r.getUint8(o+s));return n},$.prototype.parseTag=function(){return this.parseString(4)},$.prototype.parseLongDateTime=function(){var t=K(this.data,this.offset+this.relativeOffset+4);return t-=2082844800,this.relativeOffset+=8,t},$.prototype.parseVersion=function(t){var r=Z(this.data,this.offset+this.relativeOffset),o=Z(this.data,this.offset+this.relativeOffset+2);return this.relativeOffset+=4,r+o/(t=void 0===t?4096:t)/10},$.prototype.skip=function(t,r){this.relativeOffset+=J[t]*(r=void 0===r?1:r)},$.prototype.parseULongList=function(t){void 0===t&&(t=this.parseULong());for(var r=Array(t),o=this.data,n=this.offset+this.relativeOffset,s=0;s<t;s++)r[s]=o.getUint32(n),n+=4;return this.relativeOffset+=4*t,r},$.prototype.parseOffset16List=$.prototype.parseUShortList=function(t){void 0===t&&(t=this.parseUShort());for(var r=Array(t),o=this.data,n=this.offset+this.relativeOffset,s=0;s<t;s++)r[s]=o.getUint16(n),n+=2;return this.relativeOffset+=2*t,r},$.prototype.parseShortList=function(t){for(var r=Array(t),o=this.data,n=this.offset+this.relativeOffset,s=0;s<t;s++)r[s]=o.getInt16(n),n+=2;return this.relativeOffset+=2*t,r},$.prototype.parseByteList=function(t){for(var r=Array(t),o=this.data,n=this.offset+this.relativeOffset,s=0;s<t;s++)r[s]=o.getUint8(n++);return this.relativeOffset+=t,r},$.prototype.parseList=function(t,r){r||(r=t,t=this.parseUShort());for(var o=Array(t),n=0;n<t;n++)o[n]=r.call(this);return o},$.prototype.parseList32=function(t,r){r||(r=t,t=this.parseULong());for(var o=Array(t),n=0;n<t;n++)o[n]=r.call(this);return o},$.prototype.parseRecordList=function(t,r){r||(r=t,t=this.parseUShort());for(var o=Array(t),n=Object.keys(r),s=0;s<t;s++){for(var i={},a=0;a<n.length;a++){var l=n[a],u=r[l];i[l]=u.call(this)}o[s]=i}return o},$.prototype.parseRecordList32=function(t,r){r||(r=t,t=this.parseULong());for(var o=Array(t),n=Object.keys(r),s=0;s<t;s++){for(var i={},a=0;a<n.length;a++){var l=n[a],u=r[l];i[l]=u.call(this)}o[s]=i}return o},$.prototype.parseStruct=function(t){if("function"==typeof t)return t.call(this);for(var r=Object.keys(t),o={},n=0;n<r.length;n++){var s=r[n],i=t[s];o[s]=i.call(this)}return o},$.prototype.parseValueRecord=function(t){var r;if(0!==(t=void 0===t?this.parseUShort():t))return r={},1&t&&(r.xPlacement=this.parseShort()),2&t&&(r.yPlacement=this.parseShort()),4&t&&(r.xAdvance=this.parseShort()),8&t&&(r.yAdvance=this.parseShort()),16&t&&(r.xPlaDevice=void 0,this.parseShort()),32&t&&(r.yPlaDevice=void 0,this.parseShort()),64&t&&(r.xAdvDevice=void 0,this.parseShort()),128&t&&(r.yAdvDevice=void 0,this.parseShort()),r},$.prototype.parseValueRecordList=function(){for(var t=this.parseUShort(),r=this.parseUShort(),o=Array(r),n=0;n<r;n++)o[n]=this.parseValueRecord(t);return o},$.prototype.parsePointer=function(t){var r=this.parseOffset16();if(0<r)return new $(this.data,this.offset+r).parseStruct(t)},$.prototype.parsePointer32=function(t){var r=this.parseOffset32();if(0<r)return new $(this.data,this.offset+r).parseStruct(t)},$.prototype.parseListOfLists=function(t){for(var r=this.parseOffset16List(),o=r.length,n=this.relativeOffset,s=Array(o),i=0;i<o;i++){var a=r[i];if(0===a)s[i]=void 0;else if(this.relativeOffset=a,t){for(var l=this.parseOffset16List(),u=Array(l.length),c=0;c<l.length;c++)this.relativeOffset=a+l[c],u[c]=t.call(this);s[i]=u}else s[i]=this.parseUShortList()}return this.relativeOffset=n,s},$.prototype.parseCoverage=function(){var t=this.offset+this.relativeOffset,r=this.parseUShort(),o=this.parseUShort();if(1===r)return{format:1,glyphs:this.parseUShortList(o)};if(2!==r)throw Error("0x"+t.toString(16)+": Coverage format must be 1 or 2.");for(var n=Array(o),s=0;s<o;s++)n[s]={start:this.parseUShort(),end:this.parseUShort(),index:this.parseUShort()};return{format:2,ranges:n}},$.prototype.parseClassDef=function(){var t=this.offset+this.relativeOffset,r=this.parseUShort();if(1===r)return{format:1,startGlyph:this.parseUShort(),classes:this.parseUShortList()};if(2===r)return{format:2,ranges:this.parseRecordList({start:$.uShort,end:$.uShort,classId:$.uShort})};throw Error("0x"+t.toString(16)+": ClassDef format must be 1 or 2.")},$.list=function(t,r){return function(){return this.parseList(t,r)}},$.list32=function(t,r){return function(){return this.parseList32(t,r)}},$.recordList=function(t,r){return function(){return this.parseRecordList(t,r)}},$.recordList32=function(t,r){return function(){return this.parseRecordList32(t,r)}},$.pointer=function(t){return function(){return this.parsePointer(t)}},$.pointer32=function(t){return function(){return this.parsePointer32(t)}},$.tag=$.prototype.parseTag,$.byte=$.prototype.parseByte,$.uShort=$.offset16=$.prototype.parseUShort,$.uShortList=$.prototype.parseUShortList,$.uLong=$.offset32=$.prototype.parseULong,$.uLongList=$.prototype.parseULongList,$.struct=$.prototype.parseStruct,$.coverage=$.prototype.parseCoverage,$.classDef=$.prototype.parseClassDef;var ee={reserved:$.uShort,reqFeatureIndex:$.uShort,featureIndexes:$.uShortList},et=($.prototype.parseScriptList=function(){return this.parsePointer($.recordList({tag:$.tag,script:$.pointer({defaultLangSys:$.pointer(ee),langSysRecords:$.recordList({tag:$.tag,langSys:$.pointer(ee)})})}))||[]},$.prototype.parseFeatureList=function(){return this.parsePointer($.recordList({tag:$.tag,feature:$.pointer({featureParam
1s:$.offset16,lookupListIndexes:$.uShortList})}))||[]},$.prototype.parseLookupList=function(t){return this.parsePointer($.list($.pointer(function(){var r=this.parseUShort(),o=(k.argument(1<=r&&r<=9,"GPOS/GSUB lookup type "+r+" unknown."),this.parseUShort());return{lookupType:r,lookupFlag:o,subtables:this.parseList($.pointer(t[r])),markFilteringSet:16&o?this.parseUShort():void 0}})))||[]},$.prototype.parseFeatureVariationsList=function(){return this.parsePointer32(function(){var t=this.parseUShort(),r=this.parseUShort();return k.argument(1===t&&r<1,"GPOS/GSUB feature variations table unknown."),this.parseRecordList32({conditionSetOffset:$.offset32,featureTableSubstitutionOffset:$.offset32})})||[]},{getByte:Y,getCard8:Y,getUShort:Z,getCard16:Z,getShort:function(t,r){return t.getInt16(r,!1)},getULong:K,getFixed:Q,getTag:function(t,r){for(var o="",n=r;n<r+4;n+=1)o+=String.fromCharCode(t.getInt8(n));return o},getOffset:function(t,r,o){for(var n=0,s=0;s<o;s+=1)n=(n<<=8)+t.getUint8(r+s);return n},getBytes:function(t,r,o){for(var n=[],s=r;s<o;s+=1)n.push(t.getUint8(s));return n},bytesToString:function(t){for(var r="",o=0;o<t.length;o+=1)r+=String.fromCharCode(t[o]);return r},Parser:$}),er={parse:function(t,r){for(var o={},n=(o.version=et.getUShort(t,r),k.argument(0===o.version,"cmap table version should be 0."),o.numTables=et.getUShort(t,r+2),-1),s=o.numTables-1;0<=s;--s){var i=et.getUShort(t,r+4+8*s),a=et.getUShort(t,r+4+8*s+2);if(3===i&&(0===a||1===a||10===a)||0===i&&(0===a||1===a||2===a||3===a||4===a)){n=et.getULong(t,r+4+8*s+4);break}}if(-1===n)throw Error("No valid cmap sub-tables found.");var l=new et.Parser(t,r+n);if(o.format=l.parseUShort(),12===o.format){l.parseUShort(),o.length=l.parseULong(),o.language=l.parseULong(),o.groupCount=m=l.parseULong(),o.glyphIndexMap={};for(var u=0;u<m;u+=1)for(var c=l.parseULong(),d=l.parseULong(),h=l.parseULong(),f=c;f<=d;f+=1)o.glyphIndexMap[f]=h,h++}else{if(4!==o.format)throw Error("Only format 4 and 12 cmap tables are supported (found format "+o.format+").");var p=n;o.length=l.parseUShort(),o.language=l.parseUShort(),o.segCount=y=l.parseUShort()>>1,l.skip("uShort",3),o.glyphIndexMap={};for(var m,y,g=new et.Parser(t,r+p+14),v=new et.Parser(t,r+p+16+2*y),b=new et.Parser(t,r+p+16+4*y),_=new et.Parser(t,r+p+16+6*y),j=r+p+16+8*y,x=0;x<y-1;x+=1)for(var w=void 0,S=g.parseUShort(),T=v.parseUShort(),E=b.parseShort(),M=_.parseUShort(),O=T;O<=S;O+=1)0!==M?(j=(j=_.offset+_.relativeOffset-2)+M+2*(O-T),0!==(w=et.getUShort(t,j))&&(w=w+E&65535)):w=O+E&65535,o.glyphIndexMap[O]=w}return o},make:function(t){for(var r=!0,o=t.length-1;0<o;--o)if(65535<t.get(o).unicode){console.log("Adding CMAP format 12 (needed!)"),r=!1;break}var n,s,i=[{name:"version",type:"USHORT",value:0},{name:"numTables",type:"USHORT",value:r?1:2},{name:"platformID",type:"USHORT",value:3},{name:"encodingID",type:"USHORT",value:1},{name:"offset",type:"ULONG",value:r?12:20}],a=(i=(i=r?i:i.concat([{name:"cmap12PlatformID",type:"USHORT",value:3},{name:"cmap12EncodingID",type:"USHORT",value:10},{name:"cmap12Offset",type:"ULONG",value:0}])).concat([{name:"format",type:"USHORT",value:4},{name:"cmap4Length",type:"USHORT",value:0},{name:"language",type:"USHORT",value:0},{name:"segCountX2",type:"USHORT",value:0},{name:"searchRange",type:"USHORT",value:0},{name:"entrySelector",type:"USHORT",value:0},{name:"rangeShift",type:"USHORT",value:0}]),new X.Table("cmap",i));for(a.segments=[],o=0;o<t.length;o+=1){for(var l=t.get(o),u=0;u<l.unicodes.length;u+=1)n=l.unicodes[u],s=o,a.segments.push({end:n,start:n,delta:-(n-s),offset:0,glyphIndex:s});a.segments=a.segments.sort(function(t,r){return t.start-r.start})}a.segments.push({end:65535,start:65535,delta:1,offset:0});var c=a.segments.length,d=0,h=[],f=[],p=[],m=[],y=[],g=[];for(o=0;o<c;o+=1){var v=a.segments[o];v.end<=65535&&v.start<=65535?(h=h.concat({name:"end_"+o,type:"USHORT",value:v.end}),f=f.concat({name:"start_"+o,type:"USHORT",value:v.start}),p=p.concat({name:"idDelta_"+o,type:"SHORT",value:v.delta}),m=m.concat({name:"idRangeOffset_"+o,type:"USHORT",value:v.offset}),void 0!==v.glyphId&&(y=y.concat({name:"glyph_"+o,type:"USHORT",value:v.glyphId}))):d+=1,r||void 0===v.glyphIndex||(g=(g=(g=g.concat({name:"cmap12Start_"+o,type:"ULONG",value:v.start})).concat({name:"cmap12End_"+o,type:"ULONG",value:v.end})).concat({name:"cmap12Glyph_"+o,type:"ULONG",value:v.glyphIndex}))}return a.segCountX2=2*(c-d),a.searchRange=2*Math.pow(2,Math.floor(Math.log(c-d)/Math.log(2))),a.entrySelector=Math.log(a.searchRange/2)/Math.log(2),a.rangeShift=a.segCountX2-a.searchRange,a.fields=a.fields.concat(h),a.fields.push({name:"reservedPad",type:"USHORT",value:0}),a.fields=a.fields.concat(f),a.fields=a.fields.concat(p),a.fields=a.fields.concat(m),a.fields=a.fields.concat(y),a.cmap4Length=14+2*h.length+2+2*f.length+2*p.length+2*m.length+2*y.length,r||(i=16+4*g.length,a.cmap12Offset=20+a.cmap4Length,a.fields=a.fields.concat([{name:"cmap12Format",type:"USHORT",value:12},{name:"cmap12Reserved",type:"USHORT",value:0},{name:"cmap12Length",type:"ULONG",value:i},{name:"cmap12Language",type:"ULONG",value:0},{name:"cmap12nGroups",type:"ULONG",value:g.length/3}]),a.fields=a.fields.concat(g)),a}},eo=[".notdef","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quoteright","parenleft","parenright","asterisk","plus","comma","hyphen","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","at","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","bracketleft","backslash","bracketright","asciicircum","underscore","quoteleft","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","braceleft","bar","braceright","asciitilde","exclamdown","cent","sterling","fraction","yen","florin","section","currency","quotesingle","quotedblleft","guillemotleft","guilsinglleft","guilsinglright","fi","fl","endash","dagger","daggerdbl","periodce
1ntered","paragraph","bullet","quotesinglbase","quotedblbase","quotedblright","guillemotright","ellipsis","perthousand","questiondown","grave","acute","circumflex","tilde","macron","breve","dotaccent","dieresis","ring","cedilla","hungarumlaut","ogonek","caron","emdash","AE","ordfeminine","Lslash","Oslash","OE","ordmasculine","ae","dotlessi","lslash","oslash","oe","germandbls","onesuperior","logicalnot","mu","trademark","Eth","onehalf","plusminus","Thorn","onequarter","divide","brokenbar","degree","thorn","threequarters","twosuperior","registered","minus","eth","multiply","threesuperior","copyright","Aacute","Acircumflex","Adieresis","Agrave","Aring","Atilde","Ccedilla","Eacute","Ecircumflex","Edieresis","Egrave","Iacute","Icircumflex","Idieresis","Igrave","Ntilde","Oacute","Ocircumflex","Odieresis","Ograve","Otilde","Scaron","Uacute","Ucircumflex","Udieresis","Ugrave","Yacute","Ydieresis","Zcaron","aacute","acircumflex","adieresis","agrave","aring","atilde","ccedilla","eacute","ecircumflex","edieresis","egrave","iacute","icircumflex","idieresis","igrave","ntilde","oacute","ocircumflex","odieresis","ograve","otilde","scaron","uacute","ucircumflex","udieresis","ugrave","yacute","ydieresis","zcaron","exclamsmall","Hungarumlautsmall","dollaroldstyle","dollarsuperior","ampersandsmall","Acutesmall","parenleftsuperior","parenrightsuperior","266 ff","onedotenleader","zerooldstyle","oneoldstyle","twooldstyle","threeoldstyle","fouroldstyle","fiveoldstyle","sixoldstyle","sevenoldstyle","eightoldstyle","nineoldstyle","commasuperior","threequartersemdash","periodsuperior","questionsmall","asuperior","bsuperior","centsuperior","dsuperior","esuperior","isuperior","lsuperior","msuperior","nsuperior","osuperior","rsuperior","ssuperior","tsuperior","ff","ffi","ffl","parenleftinferior","parenrightinferior","Circumflexsmall","hyphensuperior","Gravesmall","Asmall","Bsmall","Csmall","Dsmall","Esmall","Fsmall","Gsmall","Hsmall","Ismall","Jsmall","Ksmall","Lsmall","Msmall","Nsmall","Osmall","Psmall","Qsmall","Rsmall","Ssmall","Tsmall","Usmall","Vsmall","Wsmall","Xsmall","Ysmall","Zsmall","colonmonetary","onefitted","rupiah","Tildesmall","exclamdownsmall","centoldstyle","Lslashsmall","Scaronsmall","Zcaronsmall","Dieresissmall","Brevesmall","Caronsmall","Dotaccentsmall","Macronsmall","figuredash","hypheninferior","Ogoneksmall","Ringsmall","Cedillasmall","questiondownsmall","oneeighth","threeeighths","fiveeighths","seveneighths","onethird","twothirds","zerosuperior","foursuperior","fivesuperior","sixsuperior","sevensuperior","eightsuperior","ninesuperior","zeroinferior","oneinferior","twoinferior","threeinferior","fourinferior","fiveinferior","sixinferior","seveninferior","eightinferior","nineinferior","centinferior","dollarinferior","periodinferior","commainferior","Agravesmall","Aacutesmall","Acircumflexsmall","Atildesmall","Adieresissmall","Aringsmall","AEsmall","Ccedillasmall","Egravesmall","Eacutesmall","Ecircumflexsmall","Edieresissmall","Igravesmall","Iacutesmall","Icircumflexsmall","Idieresissmall","Ethsmall","Ntildesmall","Ogravesmall","Oacutesmall","Ocircumflexsmall","Otildesmall","Odieresissmall","OEsmall","Oslashsmall","Ugravesmall","Uacutesmall","Ucircumflexsmall","Udieresissmall","Yacutesmall","Thornsmall","Ydieresissmall","001.000","001.001","001.002","001.003","Black","Bold","Book","Light","Medium","Regular","Roman","Semibold"],en=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quoteright","parenleft","parenright","asterisk","plus","comma","hyphen","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","at","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","bracketleft","backslash","bracketright","asciicircum","underscore","quoteleft","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","braceleft","bar","braceright","asciitilde","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","exclamdown","cent","sterling","fraction","yen","florin","section","currency","quotesingle","quotedblleft","guillemotleft","guilsinglleft","guilsinglright","fi","fl","","end
1ash","dagger","daggerdbl","periodcentered","","paragraph","bullet","quotesinglbase","quotedblbase","quotedblright","guillemotright","ellipsis","perthousand","","questiondown","","grave","acute","circumflex","tilde","macron","breve","dotaccent","dieresis","","ring","cedilla","","hungarumlaut","ogonek","caron","emdash","","","","","","","","","","","","","","","","","AE","","ordfeminine","","","","","Lslash","Oslash","OE","ordmasculine","","","","","","ae","","","","dotlessi","","","lslash","oslash","oe","germandbls"],es=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","space","exclamsmall","Hungarumlautsmall","","dollaroldstyle","dollarsuperior","ampersandsmall","Acutesmall","parenleftsuperior","parenrightsuperior","twodotenleader","onedotenleader","comma","hyphen","period","fraction","zerooldstyle","oneoldstyle","twooldstyle","threeoldstyle","fouroldstyle","fiveoldstyle","sixoldstyle","sevenoldstyle","eightoldstyle","nineoldstyle","colon","semicolon","commasuperior","threequartersemdash","periodsuperior","questionsmall","","asuperior","bsuperior","centsuperior","dsuperior","esuperior","","","isuperior","","","lsuperior","msuperior","nsuperior","osuperior","","","rsuperior","ssuperior","tsuperior","","ff","fi","fl","ffi","ffl","parenleftinferior","","parenrightinferior","Circumflexsmall","hyphensuperior","Gravesmall","Asmall","Bsmall","Csmall","Dsmall","Esmall","Fsmall","Gsmall","Hsmall","Ismall","Jsmall","Ksmall","Lsmall","Msmall","Nsmall","Osmall","Psmall","Qsmall","Rsmall","Ssmall","Tsmall","Usmall","Vsmall","Wsmall","Xsmall","Ysmall","Zsmall","colonmonetary","onefitted","rupiah","Tildesmall","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","exclamdownsmall","centoldstyle","Lslashsmall","","","Scaronsmall","Zcaronsmall","Dieresissmall","Brevesmall","Caronsmall","","Dotaccentsmall","","","Macronsmall","","","figuredash","hypheninferior","","","Ogoneksmall","Ringsmall","Cedillasmall","","","","onequarter","onehalf","threequarters","questiondownsmall","oneeighth","threeeighths","fiveeighths","seveneighths","onethird","twothirds","","","zerosuperior","onesuperior","twosuperior","threesuperior","foursuperior","fivesuperior","sixsuperior","sevensuperior","eightsuperior","ninesuperior","zeroinferior","oneinferior","twoinferior","threeinferior","fourinferior","fiveinferior","sixinferior","seveninferior","eightinferior","nineinferior","centinferior","dollarinferior","periodinferior","commainferior","Agravesmall","Aacutesmall","Acircumflexsmall","Atildesmall","Adieresissmall","Aringsmall","AEsmall","Ccedillasmall","Egravesmall","Eacutesmall","Ecircumflexsmall","Edieresissmall","Igravesmall","Iacutesmall","Icircumflexsmall","Idieresissmall","Ethsmall","Ntildesmall","Ogravesmall","Oacutesmall","Ocircumflexsmall","Otildesmall","Odieresissmall","OEsmall","Oslashsmall","Ugravesmall","Uacutesmall","Ucircumflexsmall","Udieresissmall","Yacutesmall","Thornsmall","Ydieresissmall"],ei=[".notdef",".null","nonmarkingreturn","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quotesingle","parenleft","parenright","asterisk","plus","comma","hyphen","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","at","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","bracketleft","backslash","bracketright","asciicircum","underscore","grave","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","braceleft","bar","braceright","asciitilde","Adieresis","Aring","Ccedilla","Eacute","Ntilde","Odieresis","Udieresis","aacute","agrave","acircumflex","adieresis","atilde","aring","ccedilla","eacute","egrave","ecircumflex","edieresis","iacute","igrave","icircumflex","idieresis","ntilde","oacute","ograve","ocircumflex","odieresis","otilde","uacute","ugrave","ucircumflex","udieresis","dagger","degree","cent","sterling","section","bullet","paragraph","germandbls","registered","copyright","trademark","acute","dieresis","notequal","AE","Oslash","infinity","plusminus","lessequal","greaterequal","yen","mu","partialdiff","summation","product","pi","integral","ordfeminine","ordmasculine","Omega","ae","oslas
1h","questiondown","exclamdown","logicalnot","radical","florin","approxequal","Delta","guillemotleft","guillemotright","ellipsis","nonbreakingspace","Agrave","Atilde","Otilde","OE","oe","endash","emdash","quotedblleft","quotedblright","quoteleft","quoteright","divide","lozenge","ydieresis","Ydieresis","fraction","currency","guilsinglleft","guilsinglright","fi","fl","daggerdbl","periodcentered","quotesinglbase","quotedblbase","perthousand","Acircumflex","Ecircumflex","Aacute","Edieresis","Egrave","Iacute","Icircumflex","Idieresis","Igrave","Oacute","Ocircumflex","apple","Ograve","Uacute","Ucircumflex","Ugrave","dotlessi","circumflex","tilde","macron","breve","dotaccent","ring","cedilla","hungarumlaut","ogonek","caron","Lslash","lslash","Scaron","scaron","Zcaron","zcaron","brokenbar","Eth","eth","Yacute","yacute","Thorn","thorn","minus","multiply","onesuperior","twosuperior","threesuperior","onehalf","onequarter","threequarters","franc","Gbreve","gbreve","Idotaccent","Scedilla","scedilla","Cacute","cacute","Ccaron","ccaron","dcroat"];function ea(t){this.font=t}function el(t){this.cmap=t}function eu(t,r){this.encoding=t,this.charset=r}function ec(t){switch(t.version){case 1:this.names=ei.slice();break;case 2:this.names=Array(t.numberOfGlyphs);for(var r=0;r<t.numberOfGlyphs;r++)t.glyphNameIndex[r]<ei.length?this.names[r]=ei[t.glyphNameIndex[r]]:this.names[r]=t.names[t.glyphNameIndex[r]-ei.length];break;case 2.5:this.names=Array(t.numberOfGlyphs);for(var o=0;o<t.numberOfGlyphs;o++)this.names[o]=ei[o+t.glyphNameIndex[o]];break;default:this.names=[]}}ea.prototype.charToGlyphIndex=function(t){var r=t.codePointAt(0),o=this.font.glyphs;if(o){for(var n=0;n<o.length;n+=1)for(var s=o.get(n),i=0;i<s.unicodes.length;i+=1)if(s.unicodes[i]===r)return n}return null},el.prototype.charToGlyphIndex=function(t){return this.cmap.glyphIndexMap[t.codePointAt(0)]||0},eu.prototype.charToGlyphIndex=function(t){return t=t.codePointAt(0),t=this.encoding[t],this.charset.indexOf(t)},ec.prototype.nameToGlyphIndex=function(t){return this.names.indexOf(t)},ec.prototype.glyphIndexToName=function(t){return this.names[t]};var ed=function(t,r,o,n,s){t.beginPath(),t.moveTo(r,o),t.lineTo(n,s),t.stroke()};function eh(t){this.bindConstructorValues(t)}function ef(t,r,o){Object.defineProperty(t,r,{get:function(){return t.path,t[o]},set:function(r){t[o]=r},enumerable:!0,configurable:!0})}function ep(t,r){if(this.font=t,this.glyphs={},Array.isArray(r))for(var o=0;o<r.length;o++)this.glyphs[o]=r[o];this.length=r&&r.length||0}eh.prototype.bindConstructorValues=function(t){var r;this.index=t.index||0,this.name=t.name||null,this.unicode=t.unicode||void 0,this.unicodes=t.unicodes||void 0!==t.unicode?[t.unicode]:[],t.xMin&&(this.xMin=t.xMin),t.yMin&&(this.yMin=t.yMin),t.xMax&&(this.xMax=t.xMax),t.yMax&&(this.yMax=t.yMax),t.advanceWidth&&(this.advanceWidth=t.advanceWidth),Object.defineProperty(this,"path",(r=(t=t.path)||new E,{configurable:!0,get:function(){return r="function"==typeof r?r():r},set:function(t){r=t}}))},eh.prototype.addUnicode=function(t){0===this.unicodes.length&&(this.unicode=t),this.unicodes.push(t)},eh.prototype.getBoundingBox=function(){return this.path.getBoundingBox()},eh.prototype.getPath=function(t,r,o,n,s){t=void 0!==t?t:0,r=void 0!==r?r:0,o=void 0!==o?o:72;for(var i,a,l=(n=n||{}).xScale,u=n.yScale,c=((i=n.hinting&&s&&s.hinting?this.path&&s.hinting.exec(this,o):i)?(a=s.hinting.getCommands(i),t=Math.round(t),r=Math.round(r),l=u=1):(a=this.path.commands,n=1/this.path.unitsPerEm*o,void 0===l&&(l=n),void 0===u&&(u=n)),new E),d=0;d<a.length;d+=1){var h=a[d];"M"===h.type?c.moveTo(t+h.x*l,r+-h.y*u):"L"===h.type?c.lineTo(t+h.x*l,r+-h.y*u):"Q"===h.type?c.quadraticCurveTo(t+h.x1*l,r+-h.y1*u,t+h.x*l,r+-h.y*u):"C"===h.type?c.curveTo(t+h.x1*l,r+-h.y1*u,t+h.x2*l,r+-h.y2*u,t+h.x*l,r+-h.y*u):"Z"===h.type&&c.closePath()}return c},eh.prototype.getContours=function(){if(void 0===this.points)return[];for(var t=[],r=[],o=0;o<this.points.length;o+=1){var n=this.points[o];r.push(n),n.lastPointOfContour&&(t.push(r),r=[])}return k.argument(0===r.length,"There are still points left in the current contour."),t},eh.prototype.getMetrics=function(){for(var t=this.path.commands,r=[],o=[],n=0;n<t.length;n+=1){var s=t[n];"Z"!==s.type&&(r.push(s.x),o.push(s.y)),"Q"!==s.type&&"C"!==s.type||(r.push(s.x1),o.push(s.y1)),"C"===s.type&&(r.push(s.x2),o.push(s.y2))}var i={xMin:Math.min.apply(null,r),yMin:Math.min.apply(null,o),xMax:Math.max.apply(null,r),yMax:Math.max.apply(null,o),leftSideBearing:this.leftSideBearing};return isFinite(i.xMin)||(i.xMin=0),isFinite(i.xMax)||(i.xMax=this.advanceWidth),isFinite(i.yMin)||(i.yMin=0),isFinite(i.yMax)||(i.yMax=0),i.rightSideBearing=this.advanceWidth-i.leftSideBearing-(i.xMax-i.xMin),i},eh.prototype.draw=function(t,r,o,n,s){this.getPath(r,o,n,s).draw(t)},eh.prototype.drawPoints=function(t,r,o,n){function s(r,o,n,s){var i=2*Math.PI;t.beginPath();for(var a=0;a<r.length;a+=1)t.moveTo(o+r[a].x*s,n+r[a].y*s),t.arc(o+r[a].x*s,n+r[a].y*s,2,0,i,!1);t.closePath(),t.fill()}r=void 0!==r?r:0,o=void 0!==o?o:0;for(var n=1/this.path.unitsPerEm*(n=void 0!==n?n:24),i=[],a=[],l=this.path,u=0;u<l.commands.length;u+=1){var c=l.commands[u];void 0!==c.x&&i.push({x:c.x,y:-c.y}),void 0!==c.x1&&a.push({x:c.x1,y:-c.y1}),void 0!==c.x2&&a.push({x:c.x2,y:-c.y2})}t.fillStyle="blue",s(i,r,o,n),t.fillStyle="red",s(a,r,o,n)},eh.prototype.drawMetrics=function(t,r,o,n){r=void 0!==r?r:0,o=void 0!==o?o:0,n=1/this.path.unitsPerEm*(n=void 0!==n?n:24),t.lineWidth=1,t.strokeStyle="black",ed(t,r,-1e4,r,1e4),ed(t,-1e4,o,1e4,o);var s=this.xMin||0,i=this.yMin||0,a=this.xMax||0,l=this.yMax||0,u=this.advanceWidth||0;t.strokeStyle="blue",ed(t,r+s*n,-1e4,r+s*n,1e4),ed(t,r+a*n,-1e4,r+a*n,1e4),ed(t,-1e4,o+-i*n,1e4,o+-i*n),ed(t,-1e4,o+-l*n,1e4,o+-l*n),t.strokeStyle="green",ed(t,r+u*n,-1e4,r+u*n,1e4)},ep.prototype.get=function(t){return"function"==typeof this.glyphs[t]&&(this.glyphs[t]=this.glyphs[t]()),this.glyphs[t]},ep.prototype.push=function(t,r){this.glyphs[t]=r,this.length++};var em={GlyphSet:ep,glyphLoader:function(t,r){return new eh({index:r,font:t})},ttfGlyphLoader:function(t,r,o,n,s,i){return function(){var a=new eh({index:r,font:t});return a.path=function(){o(a,n,s);var r=i(t.glyphs,a);return r.unitsPerEm=t.unitsPerEm,r},ef(a,"xMin","_xMin"),ef(a,"xMax","_xMax"),ef(a,"yMin","_yMin"),ef(a,"yMax","_yMax"),a}},cffGlyphLoader:function(t,r,o,n){return function(){var s=new eh({index:r,font:t});
1return s.path=function(){var r=o(t,s,n);return r.unitsPerEm=t.unitsPerEm,r},s}}};function ey(t){return t=t.length<1240?107:t.length<33900?1131:32768}function eg(t,r,o){var n,s=[],i=[],a=et.getCard16(t,r);if(0!==a){for(var l=et.getByte(t,r+2),u=r+(a+1)*l+2,c=r+3,d=0;d<a+1;d+=1)s.push(et.getOffset(t,c,l)),c+=l;n=u+s[a]}else n=r+2;for(var h=0;h<s.length-1;h+=1){var f=et.getBytes(t,u+s[h],u+s[h+1]);o&&(f=o(f)),i.push(f)}return{objects:i,startOffset:r,endOffset:n}}function ev(t,r,o){var n=new et.Parser(t,r=void 0!==r?r:0),s=[],i=[];for(o=void 0!==o?o:t.length;n.relativeOffset<o;){var a=n.parseByte();a<=21?(12===a&&(a=1200+n.parseByte()),s.push([a,i]),i=[]):i.push(function(t,r){if(28===r)return t.parseByte()<<8|t.parseByte();if(29===r)return t.parseByte()<<24|t.parseByte()<<16|t.parseByte()<<8|t.parseByte();if(30===r){for(var o="",n=["0","1","2","3","4","5","6","7","8","9",".","E","E-",null,"-"];;){var s=t.parseByte(),i=s>>4,s=15&s;if(15==i||(o+=n[i],15==s))break;o+=n[s]}return parseFloat(o)}if(32<=r&&r<=246)return r-139;if(247<=r&&r<=250)return 256*(r-247)+t.parseByte()+108;if(251<=r&&r<=254)return-(256*(r-251))-t.parseByte()-108;throw Error("Invalid b0 "+r)}(n,a))}for(var l={},u=0;u<s.length;u+=1){var c=s[u][0],d=s[u][1],h=1===d.length?d[0]:d;if(l.hasOwnProperty(c)&&!isNaN(l[c]))throw Error("Object "+l+" already has key "+c);l[c]=h}return l}function eb(t,r){return r=r<=390?eo[r]:t[r-391]}function e_(t,r,o){for(var n,s={},i=0;i<r.length;i+=1){var a=r[i];if(Array.isArray(a.type)){var l=[];l.length=a.type.length;for(var u=0;u<a.type.length;u++)void 0===(n=void 0!==t[a.op]?t[a.op][u]:void 0)&&(n=void 0!==a.value&&void 0!==a.value[u]?a.value[u]:null),"SID"===a.type[u]&&(n=eb(o,n)),l[u]=n;s[a.name]=l}else void 0===(n=t[a.op])&&(n=void 0!==a.value?a.value:null),"SID"===a.type&&(n=eb(o,n)),s[a.name]=n}return s}var ej=[{name:"version",op:0,type:"SID"},{name:"notice",op:1,type:"SID"},{name:"copyright",op:1200,type:"SID"},{name:"fullName",op:2,type:"SID"},{name:"familyName",op:3,type:"SID"},{name:"weight",op:4,type:"SID"},{name:"isFixedPitch",op:1201,type:"number",value:0},{name:"italicAngle",op:1202,type:"number",value:0},{name:"underlinePosition",op:1203,type:"number",value:-100},{name:"underlineThickness",op:1204,type:"number",value:50},{name:"paintType",op:1205,type:"number",value:0},{name:"charstringType",op:1206,type:"number",value:2},{name:"fontMatrix",op:1207,type:["real","real","real","real","real","real"],value:[.001,0,0,.001,0,0]},{name:"uniqueId",op:13,type:"number"},{name:"fontBBox",op:5,type:["number","number","number","number"],value:[0,0,0,0]},{name:"strokeWidth",op:1208,type:"number",value:0},{name:"xuid",op:14,type:[],value:null},{name:"charset",op:15,type:"offset",value:0},{name:"encoding",op:16,type:"offset",value:0},{name:"charStrings",op:17,type:"offset",value:0},{name:"private",op:18,type:["number","offset"],value:[0,0]},{name:"ros",op:1230,type:["SID","SID","number"]},{name:"cidFontVersion",op:1231,type:"number",value:0},{name:"cidFontRevision",op:1232,type:"number",value:0},{name:"cidFontType",op:1233,type:"number",value:0},{name:"cidCount",op:1234,type:"number",value:8720},{name:"uidBase",op:1235,type:"number"},{name:"fdArray",op:1236,type:"offset"},{name:"fdSelect",op:1237,type:"offset"},{name:"fontName",op:1238,type:"SID"}],ex=[{name:"subrs",op:19,type:"offset",value:0},{name:"defaultWidthX",op:20,type:"number",value:0},{name:"nominalWidthX",op:21,type:"number",value:0}];function ew(t,r,o,n){for(var s=[],i=0;i<o.length;i+=1){var a=new DataView(new Uint8Array(o[i]).buffer),a=(l=n,e_(ev(a,0,a.byteLength),ej,l)),l=(a._subrs=[],a._subrsBias=0,a.private[0]),u=a.private[1];0!==l&&0!==u&&(l=e_(ev(t,u+r,l),ex,n),a._defaultWidthX=l.defaultWidthX,a._nominalWidthX=l.nominalWidthX,0!==l.subrs&&(u=eg(t,u+l.subrs+r),a._subrs=u.objects,a._subrsBias=ey(a._subrs)),a._privateDict=l),s.push(a)}return s}function eS(t,r,o){var n,s,i,a,l,u,c,d,h,f=new E,p=[],m=0,y=!1,g=!1,v=0,b=0,_=(h=(t.isCIDFont?(l=t.tables.cff.topDict._fdSelect[r.index],u=(l=t.tables.cff.topDict._fdArray[l])._subrs,c=l._subrsBias,d=l._defaultWidthX,l):(u=t.tables.cff.topDict._subrs,c=t.tables.cff.topDict._subrsBias,d=t.tables.cff.topDict._defaultWidthX,t.tables.cff.topDict))._nominalWidthX,d);function j(t,r){g&&f.closePath(),f.moveTo(t,r),g=!0}function x(){p.length%2==0||y||(_=p.shift()+h),m+=p.length>>1,p.length=0,y=!0}return function o(l){for(var d,w,S,T,E,M,k,O,C,P,A,L,R=0;R<l.length;){var I=l[R];switch(R+=1,I){case 1:case 3:case 18:case 23:x();break;case 4:1<p.length&&!y&&(_=p.shift()+h,y=!0),b+=p.pop(),j(v,b);break;case 5:for(;0<p.length;)v+=p.shift(),b+=p.shift(),f.lineTo(v,b);break;case 6:for(;0<p.length&&(v+=p.shift(),f.lineTo(v,b),0!==p.length);)b+=p.shift(),f.lineTo(v,b);break;case 7:for(;0<p.length&&(b+=p.shift(),f.lineTo(v,b),0!==p.length);)v+=p.shift(),f.lineTo(v,b);break;case 8:for(;0<p.length;)n=v+p.shift(),s=b+p.shift(),i=n+p.shift(),a=s+p.shift(),v=i+p.shift(),b=a+p.shift(),f.curveTo(n,s,i,a,v,b);break;
1case 10:(M=u[E=p.pop()+c])&&o(M);break;case 11:return;case 12:switch(I=l[R],R+=1,I){case 35:n=v+p.shift(),s=b+p.shift(),i=n+p.shift(),a=s+p.shift(),k=i+p.shift(),O=a+p.shift(),C=k+p.shift(),P=O+p.shift(),A=C+p.shift(),L=P+p.shift(),v=A+p.shift(),b=L+p.shift(),p.shift(),f.curveTo(n,s,i,a,k,O),f.curveTo(C,P,A,L,v,b);break;case 34:n=v+p.shift(),s=b,i=n+p.shift(),a=s+p.shift(),k=i+p.shift(),O=a,C=k+p.shift(),P=a,A=C+p.shift(),L=b,v=A+p.shift(),f.curveTo(n,s,i,a,k,O),f.curveTo(C,P,A,L,v,b);break;case 36:n=v+p.shift(),s=b+p.shift(),i=n+p.shift(),a=s+p.shift(),k=i+p.shift(),O=a,C=k+p.shift(),P=a,A=C+p.shift(),L=P+p.shift(),v=A+p.shift(),f.curveTo(n,s,i,a,k,O),f.curveTo(C,P,A,L,v,b);break;case 37:n=v+p.shift(),s=b+p.shift(),i=n+p.shift(),a=s+p.shift(),k=i+p.shift(),O=a+p.shift(),C=k+p.shift(),P=O+p.shift(),A=C+p.shift(),L=P+p.shift(),Math.abs(A-v)>Math.abs(L-b)?v=A+p.shift():b=L+p.shift(),f.curveTo(n,s,i,a,k,O),f.curveTo(C,P,A,L,v,b);break;default:console.log("Glyph "+r.index+": unknown operator 1200"+I),p.length=0}break;case 14:0<p.length&&!y&&(_=p.shift()+h,y=!0),g&&(f.closePath(),g=!1);break;case 19:case 20:x(),R+=m+7>>3;break;case 21:2<p.length&&!y&&(_=p.shift()+h,y=!0),b+=p.pop(),j(v+=p.pop(),b);break;case 22:1<p.length&&!y&&(_=p.shift()+h,y=!0),j(v+=p.pop(),b);break;case 24:for(;2<p.length;)n=v+p.shift(),s=b+p.shift(),i=n+p.shift(),a=s+p.shift(),v=i+p.shift(),b=a+p.shift(),f.curveTo(n,s,i,a,v,b);v+=p.shift(),b+=p.shift(),f.lineTo(v,b);break;case 25:for(;6<p.length;)v+=p.shift(),b+=p.shift(),f.lineTo(v,b);n=v+p.shift(),s=b+p.shift(),i=n+p.shift(),a=s+p.shift(),v=i+p.shift(),b=a+p.shift(),f.curveTo(n,s,i,a,v,b);break;case 26:for(p.length%2&&(v+=p.shift());0<p.length;)n=v,s=b+p.shift(),i=n+p.shift(),a=s+p.shift(),v=i,b=a+p.shift(),f.curveTo(n,s,i,a,v,b);break;case 27:for(p.length%2&&(b+=p.shift());0<p.length;)n=v+p.shift(),s=b,i=n+p.shift(),a=s+p.shift(),v=i+p.shift(),b=a,f.curveTo(n,s,i,a,v,b);break;case 28:d=l[R],w=l[R+1],p.push((d<<24|w<<16)>>16),R+=2;break;case 29:E=p.pop()+t.gsubrsBias,(M=t.gsubrs[E])&&o(M);break;case 30:for(;0<p.length&&(n=v,s=b+p.shift(),i=n+p.shift(),a=s+p.shift(),v=i+p.shift(),b=a+(1===p.length?p.shift():0),f.curveTo(n,s,i,a,v,b),0!==p.length);)n=v+p.shift(),s=b,i=n+p.shift(),b=(a=s+p.shift())+p.shift(),v=i+(1===p.length?p.shift():0),f.curveTo(n,s,i,a,v,b);break;case 31:for(;0<p.length&&(n=v+p.shift(),s=b,i=n+p.shift(),b=(a=s+p.shift())+p.shift(),v=i+(1===p.length?p.shift():0),f.curveTo(n,s,i,a,v,b),0!==p.length);)n=v,s=b+p.shift(),i=n+p.shift(),a=s+p.shift(),v=i+p.shift(),b=a+(1===p.length?p.shift():0),f.curveTo(n,s,i,a,v,b);break;default:I<32?console.log("Glyph "+r.index+": unknown operator "+I):I<247?p.push(I-139):I<251?(d=l[R],R+=1,p.push(256*(I-247)+d+108)):I<255?(d=l[R],R+=1,p.push(-(256*(I-251))-d-108)):(d=l[R],w=l[R+1],S=l[R+2],T=l[R+3],R+=4,p.push((d<<24|w<<16|S<<8|T)/65536))}}}(o),r.advanceWidth=_,f}function eT(t,r){var o,n=eo.indexOf(t);return 0<=n&&(o=n),0<=(n=r.indexOf(t))?o=n+eo.length:(o=eo.length+r.length,r.push(t)),o}function eE(t,r,o){for(var n={},s=0;s<t.length;s+=1){var i=t[s],a=r[i.name];void 0===a||function t(r,o){if(r===o)return 1;if(Array.isArray(r)&&Array.isArray(o)&&r.length===o.length){for(var n=0;n<r.length;n+=1)if(!t(r[n],o[n]))return;return 1}}(a,i.value)||("SID"===i.type&&(a=eT(a,o)),n[i.op]={name:i.name,type:i.type,value:a})}return n}function eM(t,r){var o=new X.Record("Top DICT",[{name:"dict",type:"DICT",value:{}}]);return o.dict=eE(ej,t,r),o}function ek(t){var r=new X.Record("Top DICT INDEX",[{name:"topDicts",type:"INDEX",value:[]}]);return r.topDicts=[{name:"topDict_0",type:"TABLE",value:t}],r}var eO={parse:function(t,r,o){o.tables.cff={},a=t,l=r,(u={}).formatMajor=et.getCard8(a,l),u.formatMinor=et.getCard8(a,l+1),u.size=et.getCard8(a,l+2),u.offsetSize=et.getCard8(a,l+3),u.startOffset=l,u.endOffset=l+4;var n,s,i,a=eg(t,u.endOffset,et.bytesToString),l=eg(t,a.endOffset),u=eg(t,l.endOffset,et.bytesToString),a=eg(t,u.endOffset);if(o.gsubrs=a.objects,o.gsubrsBias=ey(o.gsubrs),1!==(a=ew(t,r,l.objects,u.objects)).length)throw Error("CFF table has too many fonts in 'FontSet' - count of fonts NameIndex.length = "+a.length);if(l=a[0],(o.tables.cff.topDict=l)._privateDict&&(o.defaultWidthX=l._privateDict.defaultWidthX,o.nominalWidthX=l._privateDict.nominalWidthX),void 0!==l.ros[0]&&void 0!==l.ros[1]&&(o.isCIDFont=!0),o.isCIDFont){var a=l.fdArray,c=l.fdSelect;if(0===a||0===c)throw Error("Font is marked as a CID font, but FDArray and/or FDSelect information is missing");a=ew(t,r,eg(t,a+=r).objects,u.objects),l._fdArray=a,l._fdSelect=function(t,r,o,n){var s,i=[],a=new et.Parser(t,r);
1if(0===(t=a.parseCard8()))for(var l=0;l<o;l++){if(n<=(s=a.parseCard8()))throw Error("CFF table CID Font FDSelect has bad FD index value "+s+" (FD count "+n+")");i.push(s)}else{if(3!==t)throw Error("CFF Table CID Font FDSelect table has unsupported format "+t);var u,c=a.parseCard16(),d=a.parseCard16();if(0!==d)throw Error("CFF Table CID Font FDSelect format 3 range has bad initial GID "+d);for(var h=0;h<c;h++){if(s=a.parseCard8(),u=a.parseCard16(),n<=s)throw Error("CFF table CID Font FDSelect has bad FD index value "+s+" (FD count "+n+")");if(o<u)throw Error("CFF Table CID Font FDSelect format 3 range has bad GID "+u);for(;d<u;d++)i.push(s);d=u}if(u!==o)throw Error("CFF Table CID Font FDSelect format 3 range has bad final GID "+u)}return i}(t,c+=r,o.numGlyphs,a.length)}var c=r+l.private[1],a=(n=c,s=l.private[0],i=u.objects,e_(ev(t,n,s),ex,i)),d=(o.defaultWidthX=a.defaultWidthX,o.nominalWidthX=a.nominalWidthX,0!==a.subrs?(c=eg(t,c+a.subrs),o.subrs=c.objects,o.subrsBias=ey(o.subrs)):(o.subrs=[],o.subrsBias=0),eg(t,r+l.charStrings)),a=(o.nGlyphs=d.objects.length,function(t,r,o,n){var s=new et.Parser(t,r),i=(--o,[".notdef"]);if(0===(t=s.parseCard8()))for(var a=0;a<o;a+=1)l=s.parseSID(),i.push(eb(n,l));else if(1===t)for(;i.length<=o;)for(var l=s.parseSID(),u=s.parseCard8(),c=0;c<=u;c+=1)i.push(eb(n,l)),l+=1;else{if(2!==t)throw Error("Unknown charset format "+t);for(;i.length<=o;){l=s.parseSID(),u=s.parseCard16();for(var d=0;d<=u;d+=1)i.push(eb(n,l)),l+=1}}return i}(t,r+l.charset,o.nGlyphs,u.objects));0===l.encoding?o.cffEncoding=new eu(en,a):1===l.encoding?o.cffEncoding=new eu(es,a):o.cffEncoding=function(t,r,o){var n={},s=new et.Parser(t,r);if(0===(t=s.parseCard8()))for(var i=s.parseCard8(),a=0;a<i;a+=1)n[u=s.parseCard8()]=a;else{if(1!==t)throw Error("Unknown encoding format "+t);for(var l=s.parseCard8(),u=1,c=0;c<l;c+=1)for(var d=s.parseCard8(),h=s.parseCard8(),f=d;f<=d+h;f+=1)n[f]=u,u+=1}return new eu(n,o)}(t,r+l.encoding,a),o.encoding=o.encoding||o.cffEncoding,o.glyphs=new em.GlyphSet(o);for(var h=0;h<o.nGlyphs;h+=1){var f=d.objects[h];o.glyphs.push(h,em.cffGlyphLoader(o,h,eS,f))}},make:function(t,r){for(var o,n=new X.Table("CFF ",[{name:"header",type:"RECORD"},{name:"nameIndex",type:"RECORD"},{name:"topDictIndex",type:"RECORD"},{name:"stringIndex",type:"RECORD"},{name:"globalSubrIndex",type:"RECORD"},{name:"charsets",type:"RECORD"},{name:"charStringsIndex",type:"RECORD"},{name:"privateDict",type:"RECORD"}]),s=1/r.unitsPerEm,s={version:r.version,fullName:r.fullName,familyName:r.familyName,weight:r.weightName,fontBBox:r.fontBBox||[0,0,0,0],fontMatrix:[s,0,0,s,0,0],charset:999,encoding:0,charStrings:999,private:[0,999]},i=[],a=1;a<t.length;a+=1)o=t.get(a),i.push(o.name);var l,u=[],r=(n.header=new X.Record("Header",[{name:"major",type:"Card8",value:1},{name:"minor",type:"Card8",value:0},{name:"hdrSize",type:"Card8",value:4},{name:"major",type:"Card8",value:1}]),n.nameIndex=function(t){var r=new X.Record("Name INDEX",[{name:"names",type:"INDEX",value:[]}]);r.names=[];for(var o=0;o<t.length;o+=1)r.names.push({name:"name_"+o,type:"NAME",value:t[o]});return r}([r.postScriptName]),eM(s,u)),c=(n.topDictIndex=ek(r),n.globalSubrIndex=new X.Record("Global Subr INDEX",[{name:"subrs",type:"INDEX",value:[]}]),n.charsets=function(t,r){for(var o=new X.Record("Charsets",[{name:"format",type:"Card8",value:0}]),n=0;n<t.length;n+=1){var s=eT(t[n],r);o.fields.push({name:"glyph_"+n,type:"SID",value:s})}return o}(i,u),n.charStringsIndex=function(t){for(var r=new X.Record("CharStrings INDEX",[{name:"charStrings",type:"INDEX",value:[]}]),o=0;o<t.length;o+=1){var n=t.get(o),s=function(t){for(var r=[],o=t.path,n=(r.push({name:"width",type:"NUMBER",value:t.advanceWidth}),0),s=0,i=0;i<o.commands.length;i+=1){var a,l,u,c,d=void 0,h=void 0,f=o.commands[i];"M"===(f="Q"===f.type?{type:"C",x:f.x,y:f.y,x1:1/3*n+2/3*f.x1,y1:1/3*s+2/3*f.y1,x2:1/3*f.x+2/3*f.x1,y2:1/3*f.y+2/3*f.y1}:f).type?(d=Math.round(f.x-n),h=Math.round(f.y-s),r.push({name:"dx",type:"NUMBER",value:d}),r.push({name:"dy",type:"NUMBER",value:h}),r.push({name:"rmoveto",type:"OP",value:21}),n=Math.round(f.x),s=Math.round(f.y)):"L"===f.type?(d=Math.round(f.x-n),h=Math.round(f.y-s),r.push({name:"dx",type:"NUMBER",value:d}),r.push({name:"dy",type:"NUMBER",value:h}),r.push({name:"rlineto",type:"OP",value:5}),n=Math.round(f.x),s=Math.round(f.y)):"C"===f.type&&(a=Math.round(f.x1-n),l=Math.round(f.y1-s),u=Math.round(f.x2-f.x1),c=Math.round(f.y2-f.y1),d=Math.round(f.x-f.x2),h=Math.round(f.y-f.y2),r.push({name:"dx1",type:"NUMBER",value:a}),r.push({name:"dy1",type:"NUMBER",value:l}),r.push({name:"dx2",type:"NUMBER",value:u}),r.push({name:"dy2",type:"NUMBER",value:c}),r.push({name:"dx",type:"NUMBER",value:d}),r.push({name:"dy",type:"NUMBER",value:h}),r.push({name:"rrcurveto",type:"OP",value:8}),n=Math.round(f.x),s=Math.round(f.y))}return r.push({name:"endchar",type:"OP",value:14}),r}(n);r.charStrings.push({name:n.name,type:"CHARSTRING",value:s})}return r}(t),n.privateDict=(c={},(l=new X.Record("Private DICT",[{name:"dict",type:"DICT",value:{}}])).dict=eE(ex,c,u),l),n.stringIndex=function(t){var r=new X.Record("String INDEX",[{name:"strings",type:"INDEX",value:[]}]);r.strings=[];for(var o=0;o<t.length;o+=1)r.strings.push({name:"string_"+o,type:"STRING",value:t[o]});return r}(u),n.header.sizeOf()+n.nameIndex.sizeOf()+n.topDictIndex.sizeOf()+n.stringIndex.sizeOf()+n.globalSubrIndex.sizeOf());return s.charset=c,s.encoding=0,s.charStrings=s.charset+n.charsets.sizeOf(),s.private[1]=s.charStrings+n.charStringsIndex.sizeOf(),r=eM(s,u),n.topDictIndex=ek(r),n}},eC={parse:function(t,r){var o={},t=new et.Parser(t,r);return o.version=t.parseVersion(),o.fontRevision=Math.round(1e3*t.parseFixed())/1e3,o.checkSumAdjustment=t.parseULong(),o.magicNumber=t.parseULong(),k.argument(1594834165===o.magicNumber,"Font header has wrong magic number."),o.flags=t.parseUShort(),o.unitsPerEm=t.parseUShort(),o.created=t.parseLongDateTime(),o.modified=t.parseLongDateTime(),o.xMin=t.parseShort(),o.yMin=t.parseShort(),o.xMax=t.parseShort(),o.yMax=t.parseShort(),o.macStyle=t.parseUShort(),o.lowestRecPPEM=t.parseUShort(),o.fontDirectionHint=t.parseShort(),o.indexToLocFormat=t.parseShort(),o.glyphDataFormat=t.parseShort(),o},make:function(t){var r=Math.round((new Date).getTime()/1e3)+2082844800,o=r;return t.createdTimestamp&&(o=t.createdTimestamp+2082844800),new X.Table("head",[{name:"version",type:"FIXED",value:65536},{name:"fontRevision",type:"FIXED",value:65536},{name:"checkSumAdjustment",type:"ULONG",value:0},{name:"magicNumber",type:"ULONG",value:1594834165},{name:"flags",type:"USHORT",value:0},{name:"unitsPerEm",type:"USHORT",value:1e3},{name:"created",type:"LONGDATETIME",value:o},{name:"modified",type:"LONGDATETIME",value:r},{name:"xMin",type:"SHORT",value:0},{name:"yMin",type:"SHORT",value:0},{name:"xMax",type:"SHORT",value:0},{name:"yMax",type:"SHORT",value:0},{name:"macStyle",type:"USHORT",value:0},{name:"lowestRecPPEM",type:"USHORT",value:0},{name:"fontDirectionHint",type:"SHORT",value:2},{name:"indexToLocFormat",type:"SHORT",value:0},{name:"glyphDataFormat",type:"SHORT",value:0}],t)}},eP={parse:function(t,r){var o={},t=new et.Parser(t,r);return o.version=t.parseVersion(),o.ascender=t.parseShort(),o.descender=t.parseShort(),o.lineGap=t.parseShort(),o.advanceWidthMax=t.parseUShort(),o.minLeftSideBearing=t.parseShort(),o.minRightSideBearing=t.parseShort(),o.xMaxExtent=t.parseShort(),o.caretSlopeRise=t.parseShort(),o.caretSlopeRun=t.parseShort(),o.caretOffset=t.parseShort(),t.relativeOffset+=8,o.metricDataFormat=t.parseShort(),o.numberOfHMetrics=t.parseUShort(),o},make:function(t){return new X.Table("hhea",[{name:"version",type:"FIXED",value:65536},{name:"ascender",type:"FWORD",value:0},{name:"descender",type:"FWORD",value:0},{name:"lineGap",type:"FWORD",value:0},{name:"advanceWidthMax",type:"UFWORD",value:0},{name:"minLeftSideBearing",type:"FWORD",value:0},{name:"minRightSideBearing",type:"FWORD",value:0},{name:"xMaxExtent",type:"FWORD",value:0},{name:"caretSlopeRise",type:"SHORT",value:1},{name:"caretSlopeRun",type:"SHORT",value:0},{name:"caretOffset",type:"SHORT",value:0},{name:"reserved1",type:"SHORT",value:0},{name:"reserved2",type:"SHORT",value:0},{name:"reserved3",type:"SHORT",value:0},{name:"reserved4",type:"SHORT",value:0},{name:"metricDataFormat",type:"SHORT",value:0},{name:"numberOfHMetrics",type:"USHORT",value:0}],t)}},eA=function(t,r,o,n,s){for(var i,a,l=new et.Parser(t,r),u=0;u<n;u+=1){u<o&&(i=l.parseUShort(),a=l.parseShort());var c=s.get(u);c.advanceWidth=i,c.leftSideBearing=a}},eL=function(t){for(var r=new X.Table("hmtx",[]),o=0;o<t.length;o+=1){var n=t.get(o),s=n.advanceWidth||0,n=n.leftSideBearing||0;r.fields.push({name:"advanceWidth_"+o,type:"USHORT",value:s}),r.fields.push({name:"leftSideBearing_"+o,type:"SHORT",value:n})}return r},eR={make:function(t){for(var r=new X.Table("ltag",[{name:"version",type:"ULONG",value:1},{name:"flags",type:"ULONG",value:0},{name:"numTags",type:"ULONG",value:t.length}]),o="",n=12+4*t.length,s=0;s<t.length;++s){var i=o.indexOf(t[s]);i<0&&(i=o.length,o+=t[s]),r.fields.push({name:"offset "+s,type:"USHORT",value:n+i}),r.fields.push({name:"length "+s,type:"USHORT",value:t[s].length})}return r.fields.push({name:"stringPool",type:"CHARARRAY",value:o}),r},parse:function(t,r){for(var o=new et.Parser(t,r),n=o.parseULong(),s=(k.argument(1===n,"Unsupported ltag table version."),o.skip("uLong",1),o.parseULong()),i=[],a=0;a<s;a++){for(var l="",u=r+o.parseUShort(),c=o.parseUShort(),d=u;d<u+c;++d)l+=String.fromCharCode(t.getInt8(d));i.push(l)}return i}},eI={parse:function(t,r){var o={},t=new et.Parser(t,r);return o.version=t.parseVersion(),o.numGlyphs=t.parseUShort(),1===o.version&&(o.maxPoints=t.parseUShort(),o.maxContours=t.parseUShort(),o.maxCompositePoints=t.parseUShort(),o.maxCompositeContours=t.parseUShort(),o.maxZones=t.parseUShort(),o.maxTwilightPoints=t.parseUShort(),o.maxStorage=t.parseUShort(),o.maxFunctionDefs=t.parseUShort(),o.maxInstructionDefs=t.parseUShort(),o.maxStackElements=t.parseUShort(),o.maxSizeOfInstru
1ctions=t.parseUShort(),o.maxComponentElements=t.parseUShort(),o.maxComponentDepth=t.parseUShort()),o},make:function(t){return new X.Table("maxp",[{name:"version",type:"FIXED",value:20480},{name:"numGlyphs",type:"USHORT",value:t}])}},eD=["copyright","fontFamily","fontSubfamily","uniqueID","fullName","version","postScriptName","trademark","manufacturer","designer","description","manufacturerURL","designerURL","license","licenseURL","reserved","preferredFamily","preferredSubfamily","compatibleFullName","sampleText","postScriptFindFontName","wwsFamily","wwsSubfamily"],eF={0:"en",1:"fr",2:"de",3:"it",4:"nl",5:"sv",6:"es",7:"da",8:"pt",9:"no",10:"he",11:"ja",12:"ar",13:"fi",14:"el",15:"is",16:"mt",17:"tr",18:"hr",19:"zh-Hant",20:"ur",21:"hi",22:"th",23:"ko",24:"lt",25:"pl",26:"hu",27:"es",28:"lv",29:"se",30:"fo",31:"fa",32:"ru",33:"zh",34:"nl-BE",35:"ga",36:"sq",37:"ro",38:"cz",39:"sk",40:"si",41:"yi",42:"sr",43:"mk",44:"bg",45:"uk",46:"be",47:"uz",48:"kk",49:"az-Cyrl",50:"az-Arab",51:"hy",52:"ka",53:"mo",54:"ky",55:"tg",56:"tk",57:"mn-CN",58:"mn",59:"ps",60:"ks",61:"ku",62:"sd",63:"bo",64:"ne",65:"sa",66:"mr",67:"bn",68:"as",69
1:"gu",70:"pa",71:"or",72:"ml",73:"kn",74:"ta",75:"te",76:"si",77:"my",78:"km",79:"lo",80:"vi",81:"id",82:"tl",83:"ms",84:"ms-Arab",85:"am",86:"ti",87:"om",88:"so",89:"sw",90:"rw",91:"rn",92:"ny",93:"mg",94:"eo",128:"cy",129:"eu",130:"ca",131:"la",132:"qu",133:"gn",134:"ay",135:"tt",136:"ug",137:"dz",138:"jv",139:"su",140:"gl",141:"af",142:"br",143:"iu",144:"gd",145:"gv",146:"ga",147:"to",148:"el-polyton",149:"kl",150:"az",151:"nn"},eN={0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:5,11:1,12:4,13:0,14:6,15:0,16:0,17:0,18:0,19:2,20:4,21:9,22:21,23:3,24:29,25:29,26:29,27:29,28:29,29:0,30:0,31:4,32:7,33:25,34:0,35:0,36:0,37:0,38:29,39:29,40:0,41:5,42:7,43:7,44:7,45:7,46:7,47:7,48:7,49:7,50:4,51:24,52:23,53:7,54:7,55:7,56:7,57:27,58:7,59:4,60:4,61:4,62:4,63:26,64:9,65:9,66:9,67:13,68:13,69:11,70:10,71:12,72:17,73:16,74:14,75:15,76:18,77:19,78:20,79:22,80:30,81:0,82:0,83:0,84:4,85:28,86:28,87:28,88:0,89:0,90:0,91:0,92:0,93:0,94:0,128:0,129:0,130:0,131:0,132:0,133:0,134:0,135:7,136:4,137:26,138:0,139:0,140:0,141:0,142:0,143:28,144:0,145:0,146:0,147:0,148:6,149:0,150:0,151:0},eU={1078:"af",1052:"sq",1156:"gsw",1118:"am",5121:"ar-DZ",15361:"ar-BH",3073:"ar",2049:"ar-IQ",11265:"ar-JO",13313:"ar-KW",12289:"ar-LB",4097:"ar-LY",6145:"ary",8193:"ar-OM",16385:"ar-QA",1025:"ar-SA",10241:"ar-SY",7169:"aeb",14337:"ar-AE",9217:"ar-YE",1067:"hy",1101:"as",2092:"az-Cyrl",1068:"az",1133:"ba",1069:"eu",1059:"be",2117:"bn",1093:"bn-IN",8218:"bs-Cyrl",5146:"bs",1150:"br",1026:"bg",1027:"ca",3076:"zh-HK",5124:"zh-MO",2052:"zh",4100:"zh-SG",1028:"zh-TW",1155:"co",1050:"hr",4122:"hr-BA",1029:"cs",1030:"da",1164:"prs",1125:"dv",2067:"nl-BE",1043:"nl",3081:"en-AU",10249:"en-BZ",4105:"en-CA",9225:"en-029",16393:"en-IN",6153:"en-IE",8201:"en-JM",17417:"en-MY",5129:"en-NZ",13321:"en-PH",18441:"en-SG",7177:"en-ZA",11273:"en-TT",2057:"en-GB",1033:"en",12297:"en-ZW",1061:"et",1080:"fo",1124:"fil",1035:"fi",2060:"fr-BE",3084:"fr-CA",1036:"fr",5132:"fr-LU",6156:"fr-MC",4108:"fr-CH",1122:"fy",1110:"gl",1079:"ka",3079:"de-AT",1031:"de",5127:"de-LI",4103:"de-LU",2055:"de-CH",1032:"el",1135:"kl",1095:"gu",1128:"ha",1037:"he",1081:"hi",1038:"hu",1039:"is",1136:"ig",1057:"id",1117:"iu",2141:"iu-Latn",2108:"ga",1076:"xh",1077:"zu",104
10:"it",2064:"it-CH",1041:"ja",1099:"kn",1087:"kk",1107:"km",1158:"quc",1159:"rw",1089:"sw",1111:"kok",1042:"ko",1088:"ky",1108:"lo",1062:"lv",1063:"lt",2094:"dsb",1134:"lb",1071:"mk",2110:"ms-BN",1086:"ms",1100:"ml",1082:"mt",1153:"mi",1146:"arn",1102:"mr",1148:"moh",1104:"mn",2128:"mn-CN",1121:"ne",1044:"nb",2068:"nn",1154:"oc",1096:"or",1123:"ps",1045:"pl",1046:"pt",2070:"pt-PT",1094:"pa",1131:"qu-BO",2155:"qu-EC",3179:"qu",1048:"ro",1047:"rm",1049:"ru",9275:"smn",4155:"smj-NO",5179:"smj",3131:"se-FI",1083:"se",2107:"se-SE",8251:"sms",6203:"sma-NO",7227:"sms",1103:"sa",7194:"sr-Cyrl-BA",3098:"sr",6170:"sr-Latn-BA",2074:"sr-Latn",1132:"nso",1074:"tn",1115:"si",1051:"sk",1060:"sl",11274:"es-AR",16394:"es-BO",13322:"es-CL",9226:"es-CO",5130:"es-CR",7178:"es-DO",12298:"es-EC",17418:"es-SV",4106:"es-GT",18442:"es-HN",2058:"es-MX",19466:"es-NI",6154:"es-PA",15370:"es-PY",10250:"es-PE",20490:"es-PR",3082:"es",1034:"es",21514:"es-US",14346:"es-UY",8202:"es-VE",2077:"sv-FI",1053:"sv",1114:"syr",1064:"tg",2143:"tzm",1097:"ta",1092:"tt",1098:"te",1054:"th",1105:"bo",1055:"tr",1090:"tk",1152:"ug",1058:"uk",1070:"hsb",1056:"ur",2115:"uz-Cyrl",1091:"uz",1066:"vi",1106:"cy",1160:"wo",1157:"sah",1144:"ii",1130:"yo"},eB="utf-16",eG={0:"macintosh",1:"x-mac-japanese",2:"x-mac-chinesetrad",3:"x-mac-korean",6:"x-mac-greek",7:"x-mac-cyrillic",9:"x-mac-devanagai",10:"x-mac-gurmukhi",11:"x-mac-gujarati",12:"x-mac-oriya",13:"x-mac-bengali",14:"x-mac-tamil",15:"x-mac-telugu",16:"x-mac-kannada",17:"x-mac-malayalam",18:"x-mac-sinhalese",19:"x-mac-burmese",20:"x-mac-khmer",21:"x-mac-thai",22:"x-mac-lao",23:"x-mac-georgian",24:"x-mac-armenian",25:"x-mac-chinesesimp",26:"x-mac-tibetan",27:"x-mac-mongolian",28:"x-mac-ethiopic",29:"x-mac-ce",30:"x-mac-vietnamese",31:"x-mac-extarabic"},eV={15:"x-mac-icelandic",17:"x-mac-turkish",18:"x-mac-croatian",24:"x-mac-ce",25:"x-mac-ce",26:"x-mac-ce",27:"x-mac-ce",28:"x-mac-ce",30:"x-mac-icelandic",37:"x-mac-romanian",38:"x-mac-ce",39:"x-mac-ce",40:"x-mac-ce",143:"x-mac-inuit",146:"x-mac-gaelic"};function ez(t,r,o){switch(t){case 0:return eB;case 1:return eV[o]||eG[r];case 3:if(1===r||10===r)return eB}}function eH(t){var r,o={};for(r in t)o[t[r]]=parseInt(r);return o}function eW(t,r,o,n,s,i){return new X.Record("NameRecord",[{name:"platformID",type:"USHORT",value:t},{name:"encodingID",type:"USHORT",value:r},{name:"languageID",type:"USHORT",value:o},{name:"nameID",type:"USHORT",value:n},{name:"length",type:"USHORT",value:s},{name:"offset",type:"USHORT",value:i}])}function eq(t,r){if((o=function(t,r){var o=t.length,n=r.length-o+1;e:for(var s=0;s<n;s++)for(;s<n;s++){for(var i=0;i<o;i++)if(r[s+i]!==t[i])continue e;return s}return -1}(t,r))<0)for(var o=r.length,n=0,s=t.length;n<s;++n)r.push(t[n]);return o}var eX=function(t,r,o){for(var n={},s=new et.Parser(t,r),r=s.parseUShort(),i=s.parseUShort(),a=s.offset+s.parseUShort(),l=0;l<i;l++){var u=s.parseUShort(),c=s.parseUShort(),d=s.parseUShort(),h=s.parseUShort(),h=eD[h]||h,f=s.parseUShort(),p=s.parseUShort(),m=function(t,r,o){switch(t){case 0:if(65535===r)return"und";if(o)return o[r];break;case 1:return eF[r];case 3:return eU[r]}}(u,d,o),u=ez(u,c,d);void 0!==u&&void 0!==m&&(c=void 0,(c=u===eB?O.UTF16(t,a+p,f):O.MACSTRING(t,a+p,f,u))&&((d=void 0===(d=n[h])?n[h]={}:d)[m]=c))}return 1===r&&s.parseUShort(),n},eY=function(t,r){var o,n=[],s={},i=eH(eD);for(o in t){var a=i[o];if(void 0===a&&(a=o),isNaN(f=parseInt(a)))throw Error('Name table entry "'+o+'" does not exist, see nameTableNames for complete list.');s[f]=t[o],n.push(f)}for(var l=eH(eF),u=eH(eU),c=[],d=[],h=0;h<n.length;h++){var f,p,m=s[f=n[h]];for(p in m){var y=m[p],g=1,v=l[p],b=eN[v],_=ez(g,b,v),_=C.MACSTRING(y,_),j=(void 0===_&&(g=0,(v=r.indexOf(p))<0&&(v=r.length,r.push(p)),b=4,_=C.UTF16(y)),eq(_,d)),g=(c.push(eW(g,b,v,f,_.length,j)),u[p]);void 0!==g&&(v=eq(b=C.UTF16(y),d),c.push(eW(3,1,g,f,b.length,v)))}}c.sort(function(t,r){return t.platformID-r.platformID||t.encodingID-r.encodingID||t.languageID-r.languageID||t.nameID-r.nameID});for(var x=new X.Table("name",[{name:"format",type:"USHORT",value:0},{name:"count",type:"USHORT",value:c.length},{name:"stringOffset",type:"USHORT",value:6+12*c.length}]),w=0;w<c.length;w++)x.fields.push({name:"record_"+w,type:"RECORD",value:c[w]});return x.fields.push({name:"strings",type:"LITERAL",value:d}),x},eZ=[{begin:0,end:127},{begin:128,end:255},{begin:256,end:383},{begin:384,end:591},{begin:592,end:687},{begin:688,end:767},{begin:768,end:879},{begin:880,end:1023},{begin:11392,end:11519},{begin:1024,end:1279},{begin:1328,end:1423},{begin:1424,end:1535},{begin:42240,end:42559},{begin:1536,end:1791},{begin:1984,end:2047},{begin:2304,end:2431},{begin:2432,end:2559},{begin:2560,end:2687},{begin:2688,end:2815},{begin:2816,end:2943},{begin:2944,end:3071},{begin:3072,end:3199},{begin:3200,end:3327},{begin:3328,end:3455},{begin:3584,end:3711},{begin:3712,end:3839},{begin:4256,end:4351},{begin:6912,end:7039},{begin:4352,end:4607},{begin:7680,end:7935},{begin:7936,end:8191},{begin:8192,end:8303},{begin:8304,end:8351},{begin:8352,end:8399},{begin:8400,end:8447},{begin:8448,end:8527},{begin:8528,end:8591},{begin:8592,end:8703},{begin:8704,end:8959},{begin:8960,end:9215},{begin:9216,end:9279},{begin:9280,end:9311},{begin:9312,end:9471},{begin:9472,end:9599},{begin:9600,end:9631},{begin:9632,end:9727},{begin:9728,end:9983},{begin:9984,end:10175},{begin:12288,end:12351},{begin:12352,end:12447},{begin:12448,end:12543},{begin:12544,end:12591},{begin:12592,end:12687},{begin:43072,end:43135},{begin:12800,end:13055},{begin:13056,end:13311},{begin:44032,end:55215},{begin:55296,end:57343},{begin:67840,end:67871},{begin:19968,end:40959},{begin:57344,end:63743},{begin:12736,end:12783},{begin:64256,end:64335},{begin:64336,end:65023},{begin:65056,end:65071},{begin:65040,end:65055},{begin:65104,end:65135},{begin:65136,end:65279},{begin:65280,end:65519},{begin:65520,end:65535},{begin:3840,end:4095},{begin:1792,end:1871},{begin:1920,end:1983},{begin:3456,end:3583},{begin:4096,end:4255},{begin:4608,end:4991},{begin:5024,end:5119},{begin:5120,end:5759},{begin:5760,end:5791},{begin:5792,end:5887},{begin:6016,end:6143},{begin:6144,end:6319},{begin:10240,end:10495},{begin:40960,end:42127},{begin:5888,end:5919},{begin:66304,end:66351},{begin:66352,end:66383},{begin:66560,end:66639},{begin:118784,end:119039},{begin:119808,end:120831},{begin:1044480,end:1048573},{begin:65024,end:65039},{begin:917504,end:917631},{begin:6400,end:6479},{begin:6480,end:6527},{begin:6528,end:6623},{begin:6656,end:6687},{begin:11264,end:11359},{begin:11568,end:11647},{begin:19904,end:19967},{begin:43008,end:43055},{begin:65536,end:65663},{begin:65856,end:65935},{begin:66432,end:66463},{begin:66464,end:66527},{begin:66640,end:66687},{begin:66688,end:66735},{begin:67584,end:67647},{begin:68096,end:68191},{begin:119552,end:119647},{begin:73728,end:74751},{begin:119648,end:119679},{begin:7040,end:7103},{begin:7168,end:7247},{begin:7248,end:7295},{begin:43136,end:43231},{begin:43264,end:43311},{begin:43312,end:43359},{begin:43520,end:43615},{begin:65936,end:65999},{begin:66e3,end:66047},{begin:66208,end:66271},{begin:127024,end:127135}],eK={parse:function(t,r){var o={},n=new et.Parser(t,r);o.version=n.parseUShort(),o.xAvgCharWidth=n.parseShort(),o.usWeightClass=n.parseUShort(),o.usWidthClass=n.parseUShort(),o.fsType=n.parseUShort(),o.ySubscriptXSize=n.parseShort(),o.ySubscriptYSize=n.parseShort(),o.ySubscriptXOffset=n.parseShort(),o.ySubscriptYOffset=n.parseShort(),o.ySuperscriptXSize=n.parseShort(),o.ySuperscriptYSize=n.parseShort(),o.ySuperscriptXOffset=n.parseShort(),o.ySuperscriptYOffset=n.parseShort(),o.yStrikeoutSize=n.parseShort(),o.yStrikeoutPosition=n.parseShort(),o.sFamilyClass=n.parseShort(),o.panose=[];for(var s=0;s<10;s++)o.panose[s]=n.parseByte();return o.ulUnicodeRange1=n.parseULong(),o.ulUnicodeRange2=n.parseULong(),o.ulUnicodeRange3=n.parseULong(),o.ulUnicodeRange4=n.parseULong(),o.achVendID=String.fromCharCode(n.parseByte(),n.parseByte(),n.parseByte(),n.parseByte()),o.fsSelection=n.parseUShort(),o.usFirstCharIndex=n.parseUShort(),o.usLastCharIndex=n.parseUShort(),o.sTypoAscender=n.parseShort(),o.sTypoDescender=n.parseShort(),o.sTypoLineGap=n.parseShort(),o.usWinAscent=n.parseUShort(),o.usWinDescent=n.parseUShort(),1<=o.version&&(o.ulCodePageRange1=n.parseULong(),o.ulCodePageRange2=n.parseULong()),2<=o.version&&(o.sxHeight=n.parseShort(),o.sCapHeight=n.parseShort(),o.usDefaultChar=n.parseUShort(),o.usBreakChar=n.parseUShort(),o.usMaxContent=n.parseUShort()),o},make:function(t){return new X.Table("OS/2",[{name:"version",type:"USHORT",value:3},{name:"xAvgCharWidth",type:"SHORT",value:0},{name:"usWeightClass",type:"USHORT",value:0},{name:"usWidthClass",type:"USHORT",value:0},{name:"fsType",type:"USHORT",value:0},{name:"ySubscriptXSize",type:"SHORT",value:650},{name:"ySubscriptYSize",type:"SHORT",value:699},{name:"ySubscriptXOffset",type:"SHORT",value:0},{name:"ySubscriptYOffset",type:"SHORT",value:140},{name:"ySuperscriptXSize",type:"SHORT",value:650},{name:"ySuperscriptYSize",type:"SHORT",value:699},{name:"ySuperscriptXOffset",type:"SHORT",value:0},{name:"ySuperscriptYOffset",type:"SHORT",value:479},{name:"yStrikeoutSize",type:"SHORT",value:49},{name:"yStrikeoutPosition",type:"SHORT",value:258},{name:"sFamilyClass",type:"SHORT",value:0},{name:"bFamilyType",type:"BYTE",value:0},{name:"bSerifStyle",type:"BYTE",value:0},{name:"bWeight",type:"BYTE",value:0},{name:"bProportion",type:"BYTE",value:0},{name:"bContrast",type:"BYTE",value:0},{name:"bStrokeVariation",type:"BYTE",value:0},{name:"bArmStyle",type:"BYTE",value:0},{name:"bLetterform",type:"BYTE",value:0},{name:"bMidline",type:"BYTE",value:0},{name:"bXHeight",type:"BYTE",value:0},{name:"ulUnicodeRange1",type:"ULONG",value:0},{name:"ulUnicodeRange2",type:"ULONG",value:0},{name:"ulUnicodeRange3",type:"ULONG",value:0},{name:"ulUnicodeRange4",type:"ULONG",value:0},{name:"achVendID",type:"CHARARRAY",value:"XXXX"},{name:"fsSelection",type:"USHORT",value:0},{name:"usFirstCharIndex",type:"USHORT",value:0},{name:"usLastCharIndex",type:"USHORT",value:0},{name:"sTypoAscender",type:"SHORT",value:0},{name:"sTypoDescender",type:"SHORT",value:0},{name:"sTypoLineGap",type:"SHORT",value:0},{name:"usWinAscent",type:"USHORT",value:0},{name:"usWinDescent",type:"USHORT",value:0},{name:"ulCodePageRange1",type:"ULONG",value:0},{name:"ulCodePageRange2",type:"ULONG",value:0},{name:"sxHeight",type:"SHORT",value:0},{name:"sCapHeight",type:"SHORT",value:0},{name:"usDefaultChar",type:"USHORT",value:0},{name:"usBreakChar",type:"USHORT",value:0},{name:"usMaxContext",type:"USHORT",value:0}],t)},getUnicodeRange:function(t){for(var r=0;r<eZ.length;r+=1){var o=eZ[r];if(t>=o.begin&&t<o.end)return r}return -1}},eQ={parse:function(t,r){var o={},n=new et.Parser(t,r);switch(o.version=n.parseVersion(),o.italicAngle=n.parseFixed(),o.underlinePosition=n.parseShort(),o.underlineThickness=n.parseShort(),o.isFixedPitch=n.parseULong(),o.minMemType42=n.parseULong(),o.maxMemType42=n.parseULong(),o.minMemType1=n.parseULong(),o.maxMemType1=n.parseULong(),o.version){case 1:o.names=ei.slice();break;case 2:o.numberOfGlyphs=n.parseUShort(),o.glyphNameIndex=Array(o.numberOfGlyphs);for(var s=0;s<o.numberOfGlyphs;s++)o.glyphNameIndex[s]=n.parseUShort();o.names=[];for(var i,a=0;a<o.numberOfGlyphs;a++)o.glyphNameIndex[a]>=ei.length&&(i=n.parseChar(),o.names.push(n.parseString(i)));break;case 2.5:o.numberOfGlyphs=n.parseUShort(),o.offset=Array(o.numberOfGlyphs);for(var l=0;l<o.numberOfGlyphs;l++)o.offset[l]=n.parseChar()}return o},make:function(){return new X.Table("post",[{name:"version",type:"FIXED",value:196608},{name:"italicAngle",type:"FIXED",value:0},{name:"underlinePosition",type:"FWORD",value:0},{name:"underlineThickness",type:"FWORD",value:0},{name:"isFixedPitch",type:"ULONG",value:0},{name:"minMemType42",type:"ULONG",value:0},{name:"maxMemType42",type:"ULONG",value:0},{name:"minMemType1",type:"ULONG",value:0},{name:"maxMemType1",type:"ULONG",value:0}])}},eJ=Array(9),e$=(eJ[1]=function(){var t=this.offset+this.relativeOffset,r=this.parseUShort();return 1===r?{substFormat:1,coverage:this.parsePointer($.coverage),deltaGlyphId:this.parseUShort()}:2===r?{substFormat:2,coverage:this.parsePointer($.coverage),substitute:this.parseOffset16List()}:void k.assert(!1,"0x"+t.toString(16)+": lookup type 1 format must be 1 or 2.")},eJ[2]=function(){var t=this.parseUShort();return k.argument(1===t,"GSUB Multiple Substitution Subtable identifier-format must be 1"),{substFormat:t,coverage:this.parsePointer($.coverage),sequences:this.parseListOfLists()}},eJ[3]=function(){var t=this.parseUShort();return k.argument(1===t,"GSUB Alternate Substitution Subtable identifier-format must be 1"),{substFormat:t,coverage:this.parsePointer($.coverage),alternateSets:this.parseListOfLists()}},eJ[4]=function(){var t=this.parseUShort();return k.argument(1===t,"GSUB ligature table identifier-format must be 1"),{substFormat:t,coverage:this.parsePointer($.coverage),ligatureSets:this.parseListOfLists(function(){return{ligGlyph:this.parseUShort(),components:this.parseUShortList(this.parseUShort()-1)}})}},{sequenceIndex:$.uShort,lookupListIndex:$.uShort});eJ[5]=function(){var t,r,o=this.offset+this.relativeOffset,n=this.parseUShort();return 1===n?{substFormat:n,coverage:this.parsePointer($.coverage),ruleSets:this.parseListOfLists(function(){var t=this.parseUShort(),r=this.parseUShort();return{input:this.parseUShortList(t-1),lookupRecords:this.parseRecordList(r,e$)}})}:2===n?{substFormat:n,coverage:this.parsePointer($.coverage),classDef:this.parsePointer($.classDef),classSets:this.parseListOfLists(function(){var t=this.parseUShort(),r=this.parseUShort();return{classes:this.parseUShortList(t-1),lookupRecords:this.parseRecordList(r,e$)}})}:3===n?(t=this.parseUShort(),r=this.parseUShort(),{substFormat:n,coverages:this.parseList(t,$.pointer($.coverage)),lookupRecords:this.parseRecordList(r,e$)}):void k.assert(!1,"0x"+o.toString(16)+": lookup type 5 format must be 1, 2 or 3.")},eJ[6]=function(){var t=this.offset+this.relativeOffset,r=this.parseUShort();return 1===r?{substFormat:1,coverage:this.parsePointer($.coverage),chainRuleSets:this.parseListOfLists(function(){return{backtrack:this.parseUShortList(),input
1:this.parseUShortList(this.parseShort()-1),lookahead:this.parseUShortList(),lookupRecords:this.parseRecordList(e$)}})}:2===r?{substFormat:2,coverage:this.parsePointer($.coverage),backtrackClassDef:this.parsePointer($.classDef),inputClassDef:this.parsePointer($.classDef),lookaheadClassDef:this.parsePointer($.classDef),chainClassSet:this.parseListOfLists(function(){return{backtrack:this.parseUShortList(),input:this.parseUShortList(this.parseShort()-1),lookahead:this.parseUShortList(),lookupRecords:this.parseRecordList(e$)}})}:3===r?{substFormat:3,backtrackCoverage:this.parseList($.pointer($.coverage)),inputCoverage:this.parseList($.pointer($.coverage)),lookaheadCoverage:this.parseList($.pointer($.coverage)),lookupRecords:this.parseRecordList(e$)}:void k.assert(!1,"0x"+t.toString(16)+": lookup type 6 format must be 1, 2 or 3.")},eJ[7]=function(){var t=this.parseUShort(),t=(k.argument(1===t,"GSUB Extension Substitution subtable identifier-format must be 1"),this.parseUShort()),r=new $(this.data,this.offset+this.parseULong());return{substFormat:1,lookupType:t,extension:eJ[t].call(r)}},eJ[8]=function(){var t=this.parseUShort();return k.argument(1===t,"GSUB Reverse Chaining Contextual Single Substitution Subtable identifier-format must be 1"),{substFormat:t,coverage:this.parsePointer($.coverage),backtrackCoverage:this.parseList($.pointer($.coverage)),lookaheadCoverage:this.parseList($.pointer($.coverage)),substitutes:this.parseUShortList()}};var e0=Array(9);e0[1]=function(t){return 1===t.substFormat?new X.Table("substitutionTable",[{name:"substFormat",type:"USHORT",value:1},{name:"coverage",type:"TABLE",value:new X.Coverage(t.coverage)},{name:"deltaGlyphID",type:"USHORT",value:t.deltaGlyphId}]):new X.Table("substitutionTable",[{name:"substFormat",type:"USHORT",value:2},{name:"coverage",type:"TABLE",value:new X.Coverage(t.coverage)}].concat(X.ushortList("substitute",t.substitute)))},e0[3]=function(t){return k.assert(1===t.substFormat,"Lookup type 3 substFormat must be 1."),new X.Table("substitutionTable",[{name:"substFormat",type:"USHORT",value:1},{name:"coverage",type:"TABLE",value:new X.Coverage(t.coverage)}].concat(X.tableList("altSet",t.alternateSets,function(t){return new X.Table("alternateSetTable",X.ushortList("alternate",t))})))},e0[4]=function(t){return k.assert(1===t.substFormat,"Lookup type 4 substFormat must be 1."),new X.Table("substitutionTable",[{name:"substFormat",type:"USHORT",value:1},{name:"coverage",type:"TABLE",value:new X.Coverage(t.coverage)}].concat(X.tableList("ligSet",t.ligatureSets,function(t){return new X.Table("ligatureSetTable",X.tableList("ligature",t,function(t){return new X.Table("ligatureTable",[{name:"ligGlyph",type:"USHORT",value:t.ligGlyph}].concat(X.ushortList("component",t.components,t.components.length+1)))}))})))};var e1={parse:function(t,r){return r=(t=new $(t,r=r||0)).parseVersion(1),k.argument(1===r||1.1===r,"Unsupported GSUB table version."),1===r?{version:r,scripts:t.parseScriptList(),features:t.parseFeatureList(),lookups:t.parseLookupList(eJ)}:{version:r,scripts:t.parseScriptList(),features:t.parseFeatureList(),lookups:t.parseLookupList(eJ),variations:t.parseFeatureVariationsList()}},make:function(t){return new X.Table("GSUB",[{name:"version",type:"ULONG",value:65536},{name:"scripts",type:"TABLE",value:new X.ScriptList(t.scripts)},{name:"features",type:"TABLE",value:new X.FeatureList(t.features)},{name:"lookups",type:"TABLE",value:new X.LookupList(t.lookups,e0)}])}},e2={parse:function(t,r){for(var o=new et.Parser(t,r),n=o.parseULong(),s=(k.argument(1===n,"Unsupported META table version."),o.parseULong(),o.parseULong(),o.parseULong()),i={},a=0;a<s;a++){var l=o.parseTag(),u=o.parseULong(),c=o.parseULong(),u=O.UTF8(t,r+u,c);i[l]=u}return i},make:function(t){var r,o=Object.keys(t).length,n="",s=16+12*o,i=new X.Table("meta",[{name:"version",type:"ULONG",value:1},{name:"flags",type:"ULONG",value:0},{name:"offset",type:"ULONG",value:s},{name:"numTags",type:"ULONG",value:o}]);for(r in t){var a=n.length;n+=t[r],i.fields.push({name:"tag "+r,type:"TAG",value:r}),i.fields.push({name:"offset "+r,type:"ULONG",value:s+a}),i.fields.push({name:"length "+r,type:"ULONG",value:t[r].length})}return i.fields.push({name:"stringPool",type:"CHARARRAY",value:n}),i}};function e3(t){return Math.log(t)/Math.log(2)|0}function e5(t){for(;t.length%4!=0;)t.push(0);for(var r=0,o=0;o<t.length;o+=4)r+=(t[o]<<24)+(t[o+1]<<16)+(t[o+2]<<8)+t[o+3];return r%4294967296}function e4(t,r,o,n){return new X.Record("Table Record",[{name:"tag",type:"TAG",value:void 0!==t?t:""},{name:"checkSum",type:"ULONG",value:void 0!==r?r:0},{name:"offset",type:"ULONG",value:void 0!==o?o:0},{name:"length",type:"ULONG",value:void 0!==n?n:0}])}function e6(t,r,o){for(var n=0;n<r.length;n+=1){var s=t.charToGlyphIndex(r[n]);if(0<s)return t.glyphs.get(s).getMetrics()}return o}var e8=function(t){for(var r,o=[],n=[],s=[],i=[],a=[],l=[],u=[],c=0,d=0,h=0,f=0,p=0,m=0;m<t.glyphs.length;m+=1){var y=t.glyphs.get(m),g=0|y.unicode;if(isNaN(y.advanceWidth))throw Error("Glyph "+y.name+" ("+m+"): advanceWidth is not a number.");(g<r||void 0===r)&&0<g&&(r=g),c<g&&(c=g);var g=eK.getUnicodeRange(g);if(g<32)d|=1<<g;else if(g<64)h|=1<<g-32;else if(g<96)f|=1<<g-64;else{if(!(g<123))throw Error("Unicode ranges bits > 123 are reserved for internal usage");p|=1<<g-96}".notdef"!==y.name&&(g=y.getMetrics(),o.push(g.xMin),n.push(g.yMin),s.push(g.xMax),i.push(g.yMax),l.push(g.leftSideBearing),u.push(g.rightSideBearing),a.push(y.advanceWidth))}var v,b={xMin:Math.min.apply(null,o),yMin:Math.min.apply(null,n),xMax:Math.max.apply(null,s),yMax:Math.max.apply(null,i),advanceWidthMax:Math.max.apply(null,a),advanceWidthAvg:function(t){for(var r=0,o=0;o<t.length;o+=1)r+=t[o];return r/t.length}(a),minLeftSideBearing:Math.min.apply(null,l),maxLeftSideBearing:Math.max.apply(null,l),minRightSideBearing:Math.min.apply(null,u)}
1,_=(b.ascender=t.ascender,b.descender=t.descender,eC.make({flags:3,unitsPerEm:t.unitsPerEm,xMin:b.xMin,yMin:b.yMin,xMax:b.xMax,yMax:b.yMax,lowestRecPPEM:3,createdTimestamp:t.createdTimestamp})),j=eP.make({ascender:b.ascender,descender:b.descender,advanceWidthMax:b.advanceWidthMax,minLeftSideBearing:b.minLeftSideBearing,minRightSideBearing:b.minRightSideBearing,xMaxExtent:b.maxLeftSideBearing+(b.xMax-b.xMin),numberOfHMetrics:t.glyphs.length}),x=eI.make(t.glyphs.length),w=eK.make({xAvgCharWidth:Math.round(b.advanceWidthAvg),usWeightClass:t.tables.os2.usWeightClass,usWidthClass:t.tables.os2.usWidthClass,usFirstCharIndex:r,usLastCharIndex:c,ulUnicodeRange1:d,ulUnicodeRange2:h,ulUnicodeRange3:f,ulUnicodeRange4:p,fsSelection:t.tables.os2.fsSelection,sTypoAscender:b.ascender,sTypoDescender:b.descender,sTypoLineGap:0,usWinAscent:b.yMax,usWinDescent:Math.abs(b.yMin),ulCodePageRange1:1,sxHeight:e6(t,"xyvw",{yMax:Math.round(b.ascender/2)}).yMax,sCapHeight:e6(t,"HIKLEFJMNTZBDPRAGOQSUVWXY",b).yMax,usDefaultChar:t.hasChar(" ")?32:0,usBreakChar:t.hasChar(" ")?32:0}),S=eL(t.glyphs),T=er.make(t.glyphs),E=t.getEnglishName("fontFamily"),M=t.getEnglishName("fontSubfamily"),O=E+" "+M,C=(C=t.getEnglishName("postScriptName"))||E.replace(/\s/g,"")+"-"+M,P={};for(v in t.names)P[v]=t.names[v];P.uniqueID||(P.uniqueID={en:t.getEnglishName("manufacturer")+":"+O}),P.postScriptName||(P.postScriptName={en:C}),P.preferredFamily||(P.preferredFamily=t.names.fontFamily),P.preferredSubfamily||(P.preferredSubfamily=t.names.fontSubfamily);var A=[],L=eY(P,A),A=0<A.length?eR.make(A):void 0,R=eQ.make(),O=eO.make(t.glyphs,{version:t.getEnglishName("version"),fullName:O,familyName:E,weightName:M,postScriptName:C,unitsPerEm:t.unitsPerEm,fontBBox:[0,b.yMin,b.ascender,b.advanceWidthMax]}),E=t.metas&&0<Object.keys(t.metas).length?e2.make(t.metas):void 0,M=[_,j,x,w,L,T,R,O,S];A&&M.push(A),t.tables.gsub&&M.push(e1.make(t.tables.gsub)),E&&M.push(E);for(var I=e5((C=function(t){for(var r=new X.Table("sfnt",[{name:"version",type:"TAG",value:"OTTO"},{name:"numTables",type:"USHORT",value:0},{name:"searchRange",type:"USHORT",value:0},{name:"entrySelector",type:"USHORT",value:0},{name:"rangeShift",type:"USHORT",value:0}]),o=(r.tables=t,r.numTables=t.length,Math.pow(2,e3(r.numTables))),n=(r.searchRange=16*o,r.entrySelector=e3(o),r.rangeShift=16*r.numTables-r.searchRange,[]),s=[],i=r.sizeOf()+e4().sizeOf()*r.numTables;i%4!=0;)i+=1,s.push({name:"padding",type:"BYTE",value:0});for(var a=0;a<t.length;a+=1){var l=t[a],u=(k.argument(4===l.tableName.length,"Table name"+l.tableName+" is invalid."),l.sizeOf()),c=e4(l.tableName,e5(l.encode()),i,u);for(n.push({name:c.tag+" Table Record",type:"RECORD",value:c}),s.push({name:l.tableName+" table",type:"RECORD",value:l}),i+=u,k.argument(!isNaN(i),"Something went wrong calculating the offset.");i%4!=0;)i+=1,s.push({name:"padding",type:"BYTE",value:0})}return n.sort(function(t,r){return t.value.tag>r.value.tag?1:-1}),r.fields=r.fields.concat(n),r.fields=r.fields.concat(s),r}(M)).encode()),D=C.fields,F=!1,N=0;N<D.length;N+=1)if("head table"===D[N].name){D[N].value.checkSumAdjustment=2981146554-I,F=!0;break}if(F)return C;throw Error("Could not find head table with checkSum to adjust.")};function e9(t,r){for(var o=0,n=t.length-1;o<=n;){var s=o+n>>>1,i=t[s].tag;if(i===r)return s;i<r?o=1+s:n=s-1}return-o-1}function e7(t,r){for(var o=0,n=t.length-1;o<=n;){var s=o+n>>>1,i=t[s];if(i===r)return s;i<r?o=1+s:n=s-1}return-o-1}function te(t,r){for(var o=0,n=t.length-1;o<=n;){var s,i=o+n>>>1,a=(s=t[i]).start;if(a===r)return s;a<r?o=1+i:n=i-1}if(0<o)return r>(s=t[o-1]).end?0:s}function tt(t,r){this.font=t,this.tableName=r}function tr(t){tt.call(this,t,"gpos")}function to(t){tt.call(this,t,"gsub")}function tn(t,r,o){for(var n=t.subtables,s=0;s<n.length;s++){var i=n[s];if(i.substFormat===r)return i}if(o)return n.push(o),o}function ts(t){for(var r=new ArrayBuffer(t.length),o=new Uint8Array(r),n=0;n<t.length;++n)o[n]=t[n];return r}function ti(t,r){if(!t)throw r}function ta(t,r,o,n,s){var i=0<(r&n)?(i=t.parseByte(),o+(i=0==(r&s)?-i:i)):0<(r&s)?o:o+t.parseShort();return i}function tl(t,r,o){var n,s=new et.Parser(r,o);if(t.numberOfContours=s.parseShort(),t._xMin=s.parseShort(),t._yMin=s.parseShort(),t._xMax=s.parseShort(),t._yMax=s.parseShort(),0<t.numberOfContours){for(var i=t.endPointIndices=[],a=0;a<t.numberOfContours;a+=1)i.push(s.parseUShort());t.instructionLength=s.parseUShort(),t.instructions=[];for(var l=0;l<t.instructionLength;l+=1)t.instructions.push(s.parseByte());for(var u=i[i.length-1]+1,c=[],d=0;d<u;d+=1)if(n=s.parseByte(),c.push(n),0<(8&n))for(var h=s.parseByte(),f=0;f<h;f+=1)c.push(n),d+=1;if(k.argument(c.length===u,"Bad flags."),0<i.length){var p,m=[];
1if(0<u){for(var y=0;y<u;y+=1)n=c[y],(p={}).onCurve=!!(1&n),p.lastPointOfContour=0<=i.indexOf(y),m.push(p);for(var g=0,v=0;v<u;v+=1)n=c[v],(p=m[v]).x=ta(s,n,g,2,16),g=p.x;for(var b=0,_=0;_<u;_+=1)n=c[_],(p=m[_]).y=ta(s,n,b,4,32),b=p.y}t.points=m}else t.points=[]}else if(0===t.numberOfContours)t.points=[];else{t.isComposite=!0,t.points=[],t.components=[];for(var j=!0;j;){c=s.parseUShort();var x={glyphIndex:s.parseUShort(),xScale:1,scale01:0,scale10:0,yScale:1,dx:0,dy:0};0<(1&c)?0<(2&c)?(x.dx=s.parseShort(),x.dy=s.parseShort()):x.matchedPoints=[s.parseUShort(),s.parseUShort()]:0<(2&c)?(x.dx=s.parseChar(),x.dy=s.parseChar()):x.matchedPoints=[s.parseByte(),s.parseByte()],0<(8&c)?x.xScale=x.yScale=s.parseF2Dot14():0<(64&c)?(x.xScale=s.parseF2Dot14(),x.yScale=s.parseF2Dot14()):0<(128&c)&&(x.xScale=s.parseF2Dot14(),x.scale01=s.parseF2Dot14(),x.scale10=s.parseF2Dot14(),x.yScale=s.parseF2Dot14()),t.components.push(x),j=!!(32&c)}if(256&c){t.instructionLength=s.parseUShort(),t.instructions=[];for(var w=0;w<t.instructionLength;w+=1)t.instructions.push(s.parseByte())}}}function tu(t,r){for(var o=[],n=0;n<t.length;n+=1){var s=t[n],s={x:r.xScale*s.x+r.scale01*s.y+r.dx,y:r.scale10*s.x+r.yScale*s.y+r.dy,onCurve:s.onCurve,lastPointOfContour:s.lastPointOfContour};o.push(s)}return o}function tc(t){var r=new E;if(t)for(var o=function(t){for(var r=[],o=[],n=0;n<t.length;n+=1){var s=t[n];o.push(s),s.lastPointOfContour&&(r.push(o),o=[])}return k.argument(0===o.length,"There are still points left in the current contour."),r}(t),n=0;n<o.length;++n){var s,i=o[n],a=i[i.length-1],l=i[0];a.onCurve?r.moveTo(a.x,a.y):l.onCurve?r.moveTo(l.x,l.y):(s={x:.5*(a.x+l.x),y:.5*(a.y+l.y)},r.moveTo(s.x,s.y));for(var u=0;u<i.length;++u){var c,d=a,a=l,l=i[(u+1)%i.length];a.onCurve?r.lineTo(a.x,a.y):(c=l,d.onCurve||(a.x,d.x,a.y,d.y),l.onCurve||(c={x:.5*(a.x+l.x),y:.5*(a.y+l.y)}),r.quadraticCurveTo(a.x,a.y,c.x,c.y))}r.closePath()}return r}function td(t,r){if(r.isComposite)for(var o=0;o<r.components.length;o+=1){var n=r.components[o],s=t.get(n.glyphIndex);if(s.getPath(),s.points){var i=void 0;if(void 0===n.matchedPoints)i=tu(s.points,n);else{if(n.matchedPoints[0]>r.points.length-1||n.matchedPoints[1]>s.points.length-1)throw Error("Matched points out of range in "+r.name);var a=r.points[n.matchedPoints[0]],l=s.points[n.matchedPoints[1]],n={xScale:n.xScale,scale01:n.scale01,scale10:n.scale10,yScale:n.yScale,dx:0,dy:0},l=tu([l],n)[0];n.dx=a.x-l.x,n.dy=a.y-l.y,i=tu(s.points,n)}r.points=r.points.concat(i)}}return tc(r.points)}(tr.prototype=tt.prototype={searchTag:e9,binSearch:e7,getTable:function(t){var r=this.font.tables[this.tableName];return!r&&t?this.font.tables[this.tableName]=this.createDefaultTable():r},getScriptNames:function(){var t=this.getTable();return t?t.scripts.map(function(t){return t.tag}):[]},getDefaultScriptName:function(){var t=this.getTable();if(t){for(var r=!1,o=0;o<t.scripts.length;o++){var n=t.scripts[o].tag;if("DFLT"===n)return n;"latn"===n&&(r=!0)}return r?"latn":void 0}},getScriptTable:function(t,r){var o,n=this.getTable(r);if(n)return o=n.scripts,0<=(n=e9(n.scripts,t=t||"DFLT"))?o[n].script:r?(o.splice(-1-n,0,r={tag:t,script:{defaultLangSys:{reserved:0,reqFeatureIndex:65535,featureIndexes:[]},langSysRecords:[]}}),r.script):void 0},getLangSysTable:function(t,r,o){var n,t=this.getScriptTable(t,o);if(t)return r&&"dflt"!==r&&"DFLT"!==r?0<=(n=e9(t.langSysRecords,r))?t.langSysRecords[n].langSys:o?(t.langSysRecords.splice(-1-n,0,o={tag:r,langSys:{reserved:0,reqFeatureIndex:65535,featureIndexes:[]}}),o.langSys):void 0:t.defaultLangSys},getFeatureTable:function(t,r,o,n){if(t=this.getLangSysTable(t,r,n)){for(var s,i=t.featureIndexes,a=this.font.tables[this.tableName].features,l=0;l<i.length;l++)if((s=a[i[l]]).tag===o)return s.feature;if(n)return r=a.length,k.assert(0===r||o>=a[r-1].tag,"Features must be added in alphabetical order."),a.push(s={tag:o,feature:{params:0,lookupListIndexes:[]}}),i.push(r),s.feature}},getLookupTables:function(t,r,o,n,s){var t=this.getFeatureTable(t,r,o,s),i=[];if(t){for(var a,l=t.lookupListIndexes,u=this.font.tables[this.tableName].lookups,c=0;c<l.length;c++)(a=u[l[c]]).lookupType===n&&i.push(a);if(0===i.length&&s)return r=u.length,u.push(a={lookupType:n,lookupFlag:0,subtables:[],markFilteringSet:void 0}),l.push(r),[a]}return i},getGlyphClass:function(t,r){switch(t.format){case 1:return t.startGlyph<=r&&r<t.startGlyph+t.classes.length?t.classes[r-t.startGlyph]:0;case 2:var o=te(t.ranges,r);return o?o.classId:0}},getCoverageIndex:function(t,r){switch(t.format){case 1:var o=e7(t.glyphs,r);return 0<=o?o:-1;case 2:return(o=te(t.ranges,r))?o.index+r-o.start:-1}},expandCoverage:function(t){if(1===t.format)return t.glyphs;for(var r=[],o=t.ranges,n=0;n<o.length;n++)for(var s=o[n],i=s.start,a=s.end,l=i;l<=a;l++)r.push(l);return r}}).init=function(){var t=this.getDefaultScriptName();this.defaultKerningTables=this.getKerningTables(t)},tr.prototype.getKerningValue=function(t,r,o){for(var n=0;n<t.length;n++)for(var s=t[n].subtables,i=0;i<s.length;i++){var a=s[i],l=this.getCoverageIndex(a.coverage,r);if(!(l<0))switch(a.posFormat){case 1:for(var u=a.pairSets[l],c=0;c<u.length;c++){var d=u[c];if(d.secondGlyph===o)return d.value1&&d.value1.xAdvance||0}break;case 2:var h=this.getGlyphClass(a.classDef1,r),f=this.getGlyphClass(a.classDef2,o),h=a.classRecords[h][f];return h.value1&&h.value1.xAdvance||0}}return 0},tr.prototype.getKerningTables=function(t,r){if(this.font.tables.gpos)return this.getLookupTables(t,r,"kern",2)},(to.prototype=tt.prototype).createDefaultTable=function(){return{version:1,scripts:[{tag:"DFLT",script:{defaultLangSys:{reserved:0,reqFeatureIndex:65535,featureIndexes:[]},langSysRecords:[]}}],features:[],lookups:[]}},to.prototype.getSingle=function(t,r,o){for(var n=[],s=this.getLookupTables(r,o,t,1),i=0;i<s.length;i++)for(var a=s[i].subtables,l=0;l<a.length;l++){var u=a[l],c=this.expandCoverage(u.coverage),d=void 0;if(1===u.substFormat)for(var h=u.deltaGlyphId,d=0;d<c.length;d++){var f=c[d];n.push({sub:f,by:f+h})}else{var p=u.substitute;for(d=0;d<c.length;d++)n.push({sub:c[d],by:p[d]})}}return n},to.prototype.getAlternates=function(t,r,o){for(var n=[],s=this.getLookupTables(r,o,t,3),i=0;i<s.length;i++)for(var a=s[i].subtables,l=0;l<a.length;l++)for(var u=a[l],c=this.expandCoverage(u.coverage),d=u.alternateSets,h=0;h<c.length;h++)n.push({sub:c[h],by:d[h]});return n},to.prototype.getLigatures=function(t,r,o){for(var n=[],s=this.getLookupTables(r,o,t,4),i=0;i<s.length;i++)for(var a=s[i].subtables,l=0;l<a.length;l++)for(var u=a[l],c=this.expandCoverage(u.coverage),d=u.ligatureSets,h=0;h<c.length;h++)for(var f=c[h],p=d[h],m=0;m<p.length;m++){var y=p[m];n.push({sub:[f].concat(y.components),by:y.ligGlyph})}return n},to.prototype.addSingle=function(t,r,o,n){o=tn(this.getLookupTables(o,n,t,1,!0)[0],2,{substFormat:2,coverage:{format:1,glyphs:[]},substitute:[]}),k.assert(1===o.coverage.format,"Ligature: unable to modify coverage table format "+o.coverage.format),n=r.sub,(t=this.binSearch(o.coverage.glyphs,n))<0&&(o.coverage.glyphs.splice(t=-1-t,0,n),o.substitute.splice(t,0,0)),o.substitute[t]=r.by},to.prototype.addAlternate=function(t,r,o,n){o=tn(this.getLookupTables(o,n,t,3,!0)[0],1,{substFormat:1,coverage:{format:1,glyphs:[]},alternateSets:[]}),k.assert(1===o.coverage.format,"Ligature: unable to modify coverage table format "+o.coverage.format),n=r.sub,(t=this.binSearch(o.coverage.glyphs,n))<0&&(o.coverage.glyphs.splice(t=-1-t,0,n),o.alternateSets.splice(t,0,0)),o.alternateSets[t]=r.by},to.prototype.addLigature=function(t,r,o,n){var o=this.getLookupTables(o,n,t,4,!0)[0],n=o.subtables[0],t=(n||(o.subtables[0]=n={substFormat:1,coverage:{format:1,glyphs:[]},ligatureSets:[]}),k.assert(1===n.coverage.format,"Ligature: unable to modify coverage table format "+n.coverage.format),r.sub[0]),s=r.sub.slice(1),o={ligGlyph:r.by,components:s},r=this.binSearch(n.coverage.glyphs,t);if(0<=r){for(var i=n.ligatureSets[r],a=0;a<i.length;a++)if(function(t,r){var o=t.length;if(o===r.length){for(var n=0;n<o;n++)if(t[n]!==r[n])return;return 1}}(i[a].components,s))return;i.push(o)}else n.coverage.glyphs.splice(r=-1-r,0,t),n.ligatureSets.splice(r,0,[o])},to.prototype.getFeature=function(t,r,o){if(/ss\d\d/.test(t))return this.get
1Single(t,r,o);switch(t){case"aalt":case"salt":return this.getSingle(t,r,o).concat(this.getAlternates(t,r,o));case"dlig":case"liga":case"rlig":return this.getLigatures(t,r,o)}},to.prototype.add=function(t,r,o,n){if(/ss\d\d/.test(t))return this.addSingle(t,r,o,n);switch(t){case"aalt":case"salt":return"number"==typeof r.by?this.addSingle(t,r,o,n):this.addAlternate(t,r,o,n);case"dlig":case"liga":case"rlig":return this.addLigature(t,r,o,n)}};var th={getPath:tc,parse:function(t,r,o,n){for(var s=new em.GlyphSet(n),i=0;i<o.length-1;i+=1){var a=o[i];a!==o[i+1]?s.push(i,em.ttfGlyphLoader(n,i,tl,t,r+a,td)):s.push(i,em.glyphLoader(n,i))}return s}};function tf(t){this.font=t,this.getCommands=function(t){return th.getPath(t).commands},this._fpgmState=this._prepState=void 0,this._errorState=0}function tp(t){return t}function tm(t){return Math.sign(t)*Math.round(Math.abs(t))}function ty(t){return Math.sign(t)*Math.round(Math.abs(2*t))/2}function tg(t){return Math.sign(t)*(Math.round(Math.abs(t)+.5)-.5)}function tv(t){return Math.sign(t)*Math.ceil(Math.abs(t))}function tb(t){return Math.sign(t)*Math.floor(Math.abs(t))}function t_(t){var r=this.srPeriod,o=this.srPhase,n=1;return t<0&&(t=-t,n=-1),t+=this.srThreshold-o,(t=Math.trunc(t/r)*r+o)<0?o*n:t*n}var tj={x:1,y:0,axis:"x",distance:function(t,r,o,n){return(o?t.xo:t.x)-(n?r.xo:r.x)},interpolate:function(t,r,o,n){var s,i,a,l,u,c,d;if(!n||n===this)return s=t.xo-r.xo,i=t.xo-o.xo,u=r.x-r.xo,c=o.x-o.xo,0===(d=(a=Math.abs(s))+(l=Math.abs(i)))?void(t.x=t.xo+(u+c)/2):void(t.x=t.xo+(u*l+c*a)/d);s=n.distance(t,r,!0,!0),i=n.distance(t,o,!0,!0),u=n.distance(r,r,!1,!0),c=n.distance(o,o,!1,!0),0===(d=(a=Math.abs(s))+(l=Math.abs(i)))?tj.setRelative(t,t,(u+c)/2,n,!0):tj.setRelative(t,t,(u*l+c*a)/d,n,!0)},normalSlope:Number.NEGATIVE_INFINITY,setRelative:function(t,r,o,n,s){var i,a;n&&n!==this?(i=s?r.xo:r.x,a=s?r.yo:r.y,i+=o*n.x,a+=o*n.y,t.x=i+(t.y-a)/n.normalSlope):t.x=(s?r.xo:r.x)+o},slope:0,touch:function(t){t.xTouched=!0},touched:function(t){return t.xTouched},untouch:function(t){t.xTouched=!1}},tx={x:0,y:1,axis:"y",distance:function(t,r,o,n){return(o?t.yo:t.y)-(n?r.yo:r.y)},interpolate:function(t,r,o,n){var s,i,a,l,u,c,d;if(!n||n===this)return s=t.yo-r.yo,i=t.yo-o.yo,u=r.y-r.yo,c=o.y-o.yo,0===(d=(a=Math.abs(s))+(l=Math.abs(i)))?void(t.y=t.yo+(u+c)/2):void(t.y=t.yo+(u*l+c*a)/d);s=n.distance(t,r,!0,!0),i=n.distance(t,o,!0,!0),u=n.distance(r,r,!1,!0),c=n.distance(o,o,!1,!0),0===(d=(a=Math.abs(s))+(l=Math.abs(i)))?tx.setRelative(t,t,(u+c)/2,n,!0):tx.setRelative(t,t,(u*l+c*a)/d,n,!0)},normalSlope:0,setRelative:function(t,r,o,n,s){var i,a;n&&n!==this?(i=s?r.xo:r.x,a=s?r.yo:r.y,i+=o*n.x,a+=o*n.y,t.y=a+n.normalSlope*(t.x-i)):t.y=(s?r.yo:r.y)+o},slope:Number.POSITIVE_INFINITY,touch:function(t){t.yTouched=!0},touched:function(t){return t.yTouched},untouch:function(t){t.yTouched=!1}};function tw(t,r){this.x=t,this.y=r,this.axis=void 0,this.slope=r/t,this.normalSlope=-t/r,Object.freeze(this)}function tS(t,r){var o=Math.sqrt(t*t+r*r);return r/=o,1==(t/=o)&&0===r?tj:0===t&&1===r?tx:new tw(t,r)}function tT(t,r,o,n){this.x=this.xo=Math.round(64*t)/64,this.y=this.yo=Math.round(64*r)/64,this.lastPointOfContour=o,this.onCurve=n,this.prevPointOnContour=void 0,this.nextPointOnContour=void 0,this.xTouched=!1,this.yTouched=!1,Object.preventExtensions(this)}Object.freeze(tj),Object.freeze(tx),tw.prototype.distance=function(t,r,o,n){return this.x*tj.distance(t,r,o,n)+this.y*tx.distance(t,r,o,n)},tw.prototype.interpolate=function(t,r,o,n){var s=n.distance(t,r,!0,!0),i=n.distance(t,o,!0,!0),r=n.distance(r,r,!1,!0),o=n.distance(o,o,!1,!0),s=Math.abs(s),i=Math.abs(i),a=s+i;0===a?this.setRelative(t,t,(r+o)/2,n,!0):this.setRelative(t,t,(r*i+o*s)/a,n,!0)},tw.prototype.setRelative=function(t,r,o,n,s){var i=s?r.xo:r.x,s=s?r.yo:r.y,r=i+o*(n=n||this).x,i=s+o*n.y,s=n.normalSlope,o=this.slope,n=t.x,a=t.y;t.x=(o*n-s*r+i-a)/(o-s),t.y=o*(t.x-n)+a},tw.prototype.touch=function(t){t.xTouched=!0,t.yTouched=!0},tT.prototype.nextTouched=function(t){for(var r=this.nextPointOnContour;!t.touched(r)&&r!==this;)r=r.nextPointOnContour;return r},tT.prototype.prevTouched=function(t){for(var r=this.prevPointOnContour;!t.touched(r)&&r!==this;)r=r.prevPointOnContour;return r};var tE=Object.freeze(new tT(0,0)),tM={cvCutIn:17/16,deltaBase:9,deltaShift:.125,loop:1,minDis:1,autoFlip:!0};function tk(t,r){switch(this.env=t,this.stack=[],this.prog=r,t){case"glyf":this.zp0=this.zp1=this.zp2=1,this.rp0=this.rp1=this.rp2=0;case"prep":this.fv=this.pv=this.dpv=tj,this.round=tm}}function tO(t){for(var r=t.tZone=Array(t.gZone.length),o=0;o<r.length;o++)r[o]=new tT(0,0)}
1function tC(t,r){var o,n=t.prog,s=t.ip,i=1;do if(88===(o=n[++s]))i++;else if(89===o)i--;else if(64===o)s+=n[s+1]+1;else if(65===o)s+=2*n[s+1]+1;else if(176<=o&&o<=183)s+=o-176+1;else if(184<=o&&o<=191)s+=2*(o-184+1);else if(r&&1===i&&27===o)break;while(0<i);t.ip=s}function tP(r,o){t.DEBUG&&console.log(o.step,"SVTCA["+r.axis+"]"),o.fv=o.pv=o.dpv=r}function tA(r,o){t.DEBUG&&console.log(o.step,"SPVTCA["+r.axis+"]"),o.pv=o.dpv=r}function tL(r,o){t.DEBUG&&console.log(o.step,"SFVTCA["+r.axis+"]"),o.fv=r}function tR(r,o){var n,s=o.stack,i=s.pop(),s=s.pop(),a=o.z2[i],l=o.z1[s];t.DEBUG&&console.log("SPVTL["+r+"]",i,s),i=r?(n=a.y-l.y,l.x-a.x):(n=l.x-a.x,l.y-a.y),o.pv=o.dpv=tS(n,i)}function tI(r,o){var n,s=o.stack,i=s.pop(),s=s.pop(),a=o.z2[i],l=o.z1[s];t.DEBUG&&console.log("SFVTL["+r+"]",i,s),i=r?(n=a.y-l.y,l.x-a.x):(n=l.x-a.x,l.y-a.y),o.fv=tS(n,i)}function tD(r){t.DEBUG&&console.log(r.step,"POP[]"),r.stack.pop()}function tF(r,o){var n=o.stack.pop(),s=o.z0[n],i=o.fv,a=o.pv,l=(t.DEBUG&&console.log(o.step,"MDAP["+r+"]",n),a.distance(s,tE));r&&(l=o.round(l)),i.setRelative(s,tE,l,a),i.touch(s),o.rp0=o.rp1=n}function tN(r,o){var n,s,i,a=o.z2,l=a.length-2;t.DEBUG&&console.log(o.step,"IUP["+r.axis+"]");for(var u=0;u<l;u++)n=a[u],r.touched(n)||(s=n.prevTouched(r))!==n&&(s===(i=n.nextTouched(r))&&r.setRelative(n,n,r.distance(s,s,!1,!0),r,!0),r.interpolate(n,s,i,r))}function tU(r,o){for(var n=o.stack,s=r?o.rp1:o.rp2,i=(r?o.z0:o.z1)[s],a=o.fv,l=o.pv,u=o.loop,c=o.z2;u--;){var d=n.pop(),h=c[d],f=l.distance(i,i,!1,!0);a.setRelative(h,h,f,l),a.touch(h),t.DEBUG&&console.log(o.step,(1<o.loop?"loop "+(o.loop-u)+": ":"")+"SHP["+(r?"rp1":"rp2")+"]",d)}o.loop=1}function tB(r,o){for(var n=o.stack,s=r?o.rp1:o.rp2,i=(r?o.z0:o.z1)[s],a=o.fv,l=o.pv,s=n.pop(),u=o.z2[o.contours[s]],c=u,d=(t.DEBUG&&console.log(o.step,"SHC["+r+"]",s),l.distance(i,i,!1,!0));c!==i&&a.setRelative(c,c,d,l),(c=c.nextPointOnContour)!==u;);}function tG(r,o){var n,s,i=o.stack,a=r?o.rp1:o.rp2,a=(r?o.z0:o.z1)[a],l=o.fv,u=o.pv,i=i.pop();switch(t.DEBUG&&console.log(o.step,"SHZ["+r+"]",i),i){case 0:n=o.tZone;break;case 1:n=o.gZone;break;default:throw Error("Invalid zone")}for(var c=u.distance(a,a,!1,!0),d=n.length-2,h=0;h<d;h++)s=n[h],l.setRelative(s,s,c,u)}function tV(r,o){var n=o.stack,s=n.pop()/64,n=n.pop(),i=o.z1[n],a=o.z0[o.rp0],l=o.fv,u=o.pv;l.setRelative(i,a,s,u),l.touch(i),t.DEBUG&&console.log(o.step,"MSIRP["+r+"]",s,n),o.rp1=o.rp0,o.rp2=n,r&&(o.rp0=n)}function tz(r,o){var n=o.stack,s=n.pop(),n=n.pop(),i=o.z0[n],a=o.fv,l=o.pv,u=o.cvt[s],s=(t.DEBUG&&console.log(o.step,"MIAP["+r+"]",s,"(",u,")",n),l.distance(i,tE));
1r&&(Math.abs(s-u)<o.cvCutIn&&(s=u),s=o.round(s)),a.setRelative(i,tE,s,l),0===o.zp0&&(i.xo=i.x,i.yo=i.y),a.touch(i),o.rp0=o.rp1=n}function tH(r,o){var n=o.stack,s=n.pop(),i=o.z2[s];t.DEBUG&&console.log(o.step,"GC["+r+"]",s),n.push(64*o.dpv.distance(i,tE,r,!1))}function tW(r,o){var n=o.stack,s=n.pop(),n=n.pop(),i=o.z1[s],a=o.z0[n],a=o.dpv.distance(a,i,r,r);t.DEBUG&&console.log(o.step,"MD["+r+"]",s,n,"->",a),o.stack.push(Math.round(64*a))}function tq(r,o){var n=o.stack,s=n.pop(),i=o.fv,a=o.pv,l=o.ppem,u=o.deltaBase+16*(r-1),c=o.deltaShift,d=o.z0;t.DEBUG&&console.log(o.step,"DELTAP["+r+"]",s,n);for(var h=0;h<s;h++){var f=n.pop(),p=n.pop();u+((240&p)>>4)===l&&(0<=(p=(15&p)-8)&&p++,t.DEBUG&&console.log(o.step,"DELTAPFIX",f,"by",p*c),f=d[f],i.setRelative(f,f,p*c,a))}}function tX(r,o){var n=o.stack,s=n.pop();t.DEBUG&&console.log(o.step,"ROUND[]"),n.push(64*o.round(s/64))}function tY(r,o){var n=o.stack,s=n.pop(),i=o.ppem,a=o.deltaBase+16*(r-1),l=o.deltaShift;t.DEBUG&&console.log(o.step,"DELTAC["+r+"]",s,n);for(var u=0;u<s;u++){var c=n.pop(),d=n.pop();a+((240&d)>>4)===i&&(0<=(d=(15&d)-8)&&d++,d*=l,t.DEBUG&&console.log(o.step,"DELTACFIX",c,"by",d),o.cvt[c]+=d)}}function tZ(r,o){var n,s=o.stack,i=s.pop(),s=s.pop(),a=o.z2[i],l=o.z1[s];t.DEBUG&&console.log(o.step,"SDPVTL["+r+"]",i,s),i=r?(n=a.y-l.y,l.x-a.x):(n=l.x-a.x,l.y-a.y),o.dpv=tS(n,i)}function tK(r,o){var n=o.stack,s=o.prog,i=o.ip;t.DEBUG&&console.log(o.step,"PUSHB["+r+"]");for(var a=0;a<r;a++)n.push(s[++i]);o.ip=i}function tQ(r,o){var n=o.ip,s=o.prog,i=o.stack;t.DEBUG&&console.log(o.ip,"PUSHW["+r+"]");for(var a=0;a<r;a++){var l=s[++n]<<8|s[++n];32768&l&&(l=-(1+(65535^l))),i.push(l)}o.ip=n}function tJ(r,o,n,s,i,a){var l,u,c=a.stack,d=r&&c.pop(),c=c.pop(),h=a.rp0,h=a.z0[h],f=a.z1[c],p=a.minDis,m=a.fv,y=a.dpv,g=l=y.distance(f,h,!0,!0),v=0<=g?1:-1;g=Math.abs(g),r&&(u=a.cvt[d],s&&Math.abs(g-u)<a.cvCutIn&&(g=u)),n&&g<p&&(g=p),s&&(g=a.round(g)),m.setRelative(f,h,v*g,y),m.touch(f),t.DEBUG&&console.log(a.step,(r?"MIRP[":"MDRP[")+(o?"M":"m")+(n?">":"_")+(s?"R":"_")+(0===i?"Gr":1===i?"Bl":2===i?"Wh":"")+"]",r?d+"("+a.cvt[d]+","+u+")":"",c,"(d =",l,"->",v*g,")"),a.rp1=a.rp0,a.rp2=c,o&&(a.rp0=c)}tf.prototype.exec=function(r,o){if("number"!=typeof o)throw Error("Point size is not a number!");if(!(2<this._errorState)){var n=this.font,s=this._prepState;if(!s||s.ppem!==o){var i=this._fpgmState;if(!i){tk.prototype=tM,(i=this._fpgmState=new tk("fpgm",n.tables.fpgm)).funcs=[],i.font=n,t.DEBUG&&(console.log("---EXEC FPGM---"),i.step=-1);try{t1(i)}catch(t){return console.log("Hinting error in FPGM:"+t),void(this._errorState=3)}}tk.prototype=i,(s=this._prepState=new tk("prep",n.tables.prep)).ppem=o;var a=n.tables.cvt;if(a)for(var l=s.cvt=Array(a.length),u=o/n.unitsPerEm,c=0;c<a.length;c++)l[c]=a[c]*u;else s.cvt=[];t.DEBUG&&(console.log("---EXEC PREP---"),s.step=-1);try{t1(s)}catch(t){this._errorState<2&&console.log("Hinting error in PREP:"+t),this._errorState=2}}if(!(1<this._errorState))try{return t$(r,s)}catch(t){this._errorState<1&&(console.log("Hinting error:"+t),console.log("Note: further hinting errors are silenced")),this._errorState=1}}};var t$=function(r,o){var n=o.ppem/o.font.unitsPerEm,s=r.components;if(tk.prototype=o,s){for(var i=o.font,a=[],l=[],u=0;u<s.length;u++){var c=s[u],d=i.glyphs.get(c.glyphIndex),h=new tk("glyf",d.instructions);t.DEBUG&&(console.log("---EXEC COMP "+u+"---"),h.step=-1),t0(d,h,n,n);for(var f=Math.round(c.dx*n),p=Math.round(c.dy*n),m=h.gZone,y=h.contours,g=0;g<m.length;g++){var v=m[g];v.xTouched=v.yTouched=!1,v.xo=v.x=v.x+f,v.yo=v.y=v.y+p}var b=a.length;a.push.apply(a,m);for(var _=0;_<y.length;_++)l.push(y[_]+b)}r.instructions&&!h.inhibitGridFit&&((h=new tk("glyf",r.instructions)).gZone=h.z0=h.z1=h.z2=a,h.contours=l,a.push(new tT(0,0),new tT(Math.round(r.advanceWidth*n),0)),t.DEBUG&&(console.log("---EXEC COMPOSITE---"),h.step=-1),t1(h),a.length-=2)}else h=new tk("glyf",r.instructions),t.DEBUG&&(console.log("---EXEC GLYPH---"),h.step=-1),t0(r,h,n,n),a=h.gZone;return a},t0=function(r,o,n,s){for(var i,a,l,u=r.points||[],c=u.length,d=o.gZone=o.z0=o.z1=o.z2=[],h=o.contours=[],f=0;f<c;f++)i=u[f],d[f]=new tT(i.x*n,i.y*s,i.lastPointOfContour,i.onCurve);for(var p=0;p<c;p++)i=d[p],a||(a=i,h.push(p)),i.lastPointOfContour?((i.nextPointOnContour=a).prevPointOnContour=i,a=void 0):(l=d[p+1],(i.nextPointOnContour=l).prevPointOnContour=i);if(!o.inhibitGridFit){if(t.DEBUG){console.log("PROCESSING GLYPH",o.stack);for(var m=0;m<c;m++)console.log(m,d[m].x,d[m].y)}if(d.push(new tT(0,0),new tT(Math.round(r.advanceWidth*n),0)),t1(o),d.length-=2,t.DEBUG){console.log("FINISHED GLYPH",o.stack);for(var y=0;y<c;y++)console.log(y,d[y].x,d[y].y)}}},t1=function(r){var o=r.prog;if(o){var n,s=o.length;for(r.ip=0;r.ip<s;r.ip++){if(t.DEBUG&&r.step++,!(n=t2[o[r.ip]]))throw Error("unknown instruction: 0x"+Number(o[r.ip]).toString(16));n(r)}}},t2=[tP.bind(void 0,tx),tP.bind(void 0,tj),tA.bind(void 0,tx),tA.bind(void 0,tj),tL.bind(void 0,tx),tL.bind(void 0,tj),tR.bind(void 0,0),tR.bind(void 0,1
1),tI.bind(void 0,0),tI.bind(void 0,1),function(r){var o=(n=r.stack).pop(),n=n.pop();t.DEBUG&&console.log(r.step,"SPVFS[]",o,n),r.pv=r.dpv=tS(n,o)},function(r){var o=(n=r.stack).pop(),n=n.pop();t.DEBUG&&console.log(r.step,"SPVFS[]",o,n),r.fv=tS(n,o)},function(r){var o=r.stack,n=r.pv;t.DEBUG&&console.log(r.step,"GPV[]"),o.push(16384*n.x),o.push(16384*n.y)},function(r){var o=r.stack,n=r.fv;t.DEBUG&&console.log(r.step,"GFV[]"),o.push(16384*n.x),o.push(16384*n.y)},function(r){r.fv=r.pv,t.DEBUG&&console.log(r.step,"SFVTPV[]")},function(r){var o=(a=r.stack).pop(),n=a.pop(),s=a.pop(),i=a.pop(),a=a.pop(),l=r.z0,u=r.z1,c=l[o],l=l[n],d=u[s],u=u[i],r=r.z2[a],o=(t.DEBUG&&console.log("ISECT[], ",o,n,s,i,a),c.x),n=c.y,s=l.x,i=l.y,a=d.x,c=d.y,l=u.x,d=u.y,u=(o-s)*(c-d)-(n-i)*(a-l),h=o*i-n*s,f=a*d-c*l;r.x=(h*(a-l)-f*(o-s))/u,r.y=(h*(c-d)-f*(n-i))/u},function(r){r.rp0=r.stack.pop(),t.DEBUG&&console.log(r.step,"SRP0[]",r.rp0)},function(r){r.rp1=r.stack.pop(),t.DEBUG&&console.log(r.step,"SRP1[]",r.rp1)},function(r){r.rp2=r.stack.pop(),t.DEBUG&&console.log(r.step,"SRP2[]",r.rp2)},function(r){var o=r.stack.pop();switch(t.DEBUG&&console.log(r.step,"SZP0[]",o),r.zp0=o){case 0:r.tZone||tO(r),r.z0=r.tZone;break;case 1:r.z0=r.gZone;break;default:throw Error("Invalid zone pointer")}},function(r){var o=r.stack.pop();switch(t.DEBUG&&console.log(r.step,"SZP1[]",o),r.zp1=o){case 0:r.tZone||tO(r),r.z1=r.tZone;break;case 1:r.z1=r.gZone;break;default:throw Error("Invalid zone pointer")}},function(r){var o=r.stack.pop();switch(t.DEBUG&&console.log(r.step,"SZP2[]",o),r.zp2=o){case 0:r.tZone||tO(r),r.z2=r.tZone;break;case 1:r.z2=r.gZone;break;default:throw Error("Invalid zone pointer")}},function(r){var o=r.stack.pop();switch(t.DEBUG&&console.log(r.step,"SZPS[]",o),r.zp0=r.zp1=r.zp2=o){case 0:r.tZone||tO(r),r.z0=r.z1=r.z2=r.tZone;break;case 1:r.z0=r.z1=r.z2=r.gZone;break;default:throw Error("Invalid zone pointer")}},function(r){r.loop=r.stack.pop(),t.DEBUG&&console.log(r.step,"SLOOP[]",r.loop)},function(r){t.DEBUG&&console.log(r.step,"RTG[]"),r.round=tm},function(r){t.DEBUG&&console.log(r.step,"RTHG[]"),r.round=tg},function(r){var o=r.stack.pop();t.DEBUG&&console.log(r.step,"SMD[]",o),r.minDis=o/64},function(r){t.DEBUG&&console.log(r.step,"ELSE[]"),tC(r,!1)},function(r){var o=r.stack.pop();t.DEBUG&&console.log(r.step,"JMPR[]",o),r.ip+=o-1},function(r){var o=r.stack.pop();t.DEBUG&&console.log(r.step,"SCVTCI[]",o),r.cvCutIn=o/64},void 0,void 0,function(r){var o=r.stack;t.DEBUG&&console.log(r.step,"DUP[]"),o.push(o[o.length-1])},tD,function(r){t.DEBUG&&console.log(r.step,"CLEAR[]"),r.stack.length=0},function(r){var o=r.stack,n=o.pop(),s=o.pop();t.DEBUG&&console.log(r.step,"SWAP[]"),o.push(n),o.push(s)},function(r){var o=r.stack;t.DEBUG&&console.log(r.step,"DEPTH[]"),o.push(o.length)},function(r){var o=r.stack,n=o.pop();t.DEBUG&&console.log(r.step,"CINDEX[]",n),o.push(o[o.length-n])},function(r){var o=r.stack,n=o.pop();t.DEBUG&&console.log(r.step,"MINDEX[]",n),o.push(o.splice(o.length-n,1)[0])},void 0,void 0,void 0,function(r){var o=(s=r.stack).pop(),n=s.pop(),s=(t.DEBUG&&console.log(r.step,"LOOPCALL[]",o,n),r.ip),i=r.prog;r.prog=r.funcs[o];for(var a=0;a<n;a++)t1(r),t.DEBUG&&console.log(++r.step,a+1<n?"next loopcall":"done loopcall",a);r.ip=s,r.prog=i},function(r){var o=r.stack.pop(),n=(t.DEBUG&&console.log(r.step,"CALL[]",o),r.ip),s=r.prog;r.prog=r.funcs[o],t1(r),r.ip=n,r.prog=s,t.DEBUG&&console.log(++r.step,"returning from",o)},function(r){if("fpgm"!==r.env)throw Error("FDEF not allowed here");var o=r.stack,n=r.prog,s=r.ip,o=o.pop(),i=s;for(t.DEBUG&&console.log(r.step,"FDEF[]",o);45!==n[++s];);r.ip=s,r.funcs[o]=n.slice(i+1,s)},void 0,tF.bind(void 0,0),tF.bind(void 0,1),tN.bind(void 0,tx),tN.bind(void 0,tj),tU.bind(void 0,0),tU.bind(void 0,1),tB.bind(void 0,0),tB.bind(void 0,1),tG.bind(void 0,0),tG.bind(void 0,1),function(r){for(var o=r.stack,n=r.loop,s=r.fv,i=o.pop()/64,a=r.z2;n--;){var l=o.pop(),u=a[l];t.DEBUG&&console.log(r.step,(1<r.loop?"loop "+(r.loop-n)+": ":"")+"SHPIX[]",l,i),s.setRelative(u,u,i),s.touch(u)}r.loop=1}
1,function(r){for(var o=r.stack,n=r.rp1,s=r.rp2,i=r.loop,a=r.z0[n],l=r.z1[s],u=r.fv,c=r.dpv,d=r.z2;i--;){var h=o.pop(),f=d[h];t.DEBUG&&console.log(r.step,(1<r.loop?"loop "+(r.loop-i)+": ":"")+"IP[]",h,n,"<->",s),u.interpolate(f,a,l,c),u.touch(f)}r.loop=1},tV.bind(void 0,0),tV.bind(void 0,1),function(r){for(var o=r.stack,n=r.rp0,s=r.z0[n],i=r.loop,a=r.fv,l=r.pv,u=r.z1;i--;){var c=o.pop(),d=u[c];t.DEBUG&&console.log(r.step,(1<r.loop?"loop "+(r.loop-i)+": ":"")+"ALIGNRP[]",c),a.setRelative(d,s,0,l),a.touch(d)}r.loop=1},function(r){t.DEBUG&&console.log(r.step,"RTDG[]"),r.round=ty},tz.bind(void 0,0),tz.bind(void 0,1),function(r){var o=r.prog,n=r.ip,s=r.stack,i=o[++n];t.DEBUG&&console.log(r.step,"NPUSHB[]",i);for(var a=0;a<i;a++)s.push(o[++n]);r.ip=n},function(r){var o=r.ip,n=r.prog,s=r.stack,i=n[++o];t.DEBUG&&console.log(r.step,"NPUSHW[]",i);for(var a=0;a<i;a++){var l=n[++o]<<8|n[++o];32768&l&&(l=-(1+(65535^l))),s.push(l)}r.ip=o},function(r){var o=r.stack,n=(n=r.store)||(r.store=[]),s=o.pop(),o=o.pop();t.DEBUG&&console.log(r.step,"WS",s,o),n[o]=s},function(r){var o=r.stack,n=r.store,s=o.pop(),r=(t.DEBUG&&console.log(r.step,"RS",s),n&&n[s]||0);o.push(r)},function(r){var o=(n=r.stack).pop(),n=n.pop();t.DEBUG&&console.log(r.step,"WCVTP",o,n),r.cvt[n]=o/64},function(r){var o=r.stack,n=o.pop();t.DEBUG&&console.log(r.step,"RCVT",n),o.push(64*r.cvt[n])},tH.bind(void 0,0),tH.bind(void 0,1),void 0,tW.bind(void 0,0),tW.bind(void 0,1),function(r){t.DEBUG&&console.log(r.step,"MPPEM[]"),r.stack.push(r.ppem)},void 0,function(r){t.DEBUG&&console.log(r.step,"FLIPON[]"),r.autoFlip=!0},void 0,void 0,function(r){var o=r.stack,n=o.pop(),s=o.pop();t.DEBUG&&console.log(r.step,"LT[]",n,s),o.push(s<n?1:0)},function(r){var o=r.stack,n=o.pop(),s=o.pop();t.DEBUG&&console.log(r.step,"LTEQ[]",n,s),o.push(s<=n?1:0)},function(r){var o=r.stack,n=o.pop(),s=o.pop();t.DEBUG&&console.log(r.step,"GT[]",n,s),o.push(n<s?1:0)},function(r){var o=r.stack,n=o.pop(),s=o.pop();t.DEBUG&&console.log(r.step,"GTEQ[]",n,s),o.push(n<=s?1:0)},function(r){var o=r.stack,n=o.pop(),s=o.pop();t.DEBUG&&console.log(r.step,"EQ[]",n,s),o.push(n===s?1:0)},function(r){var o=r.stack,n=o.pop(),s=o.pop();t.DEBUG&&console.log(r.step,"NEQ[]",n,s),o.push(n!==s?1:0)},function(r){var o=r.stack,n=o.pop();t.DEBUG&&console.log(r.step,"ODD[]",n),o.push(Math.trunc(n)%2?1:0)},function(r){var o=r.stack,n=o.pop();t.DEBUG&&console.log(r.step,"EVEN[]",n),o.push(Math.trunc(n)%2?0:1)},function(r){var o=r.stack.pop();t.DEBUG&&console.log(r.step,"IF[]",o),o||(tC(r,!0),t.DEBUG&&console.log(r.step,"EIF[]"))},function(r){t.DEBUG&&console.log(r.step,"EIF[]")},function(r){var o=r.stack,n=o.pop(),s=o.pop();t.DEBUG&&console.log(r.step,"AND[]",n,s),o.push(n&&s?1:0)},function(r){var o=r.stack,n=o.pop(),s=o.pop();t.DEBUG&&console.log(r.step,"OR[]",n,s),o.push(n||s?1:0)},function(r){var o=r.stack,n=o.pop();t.DEBUG&&console.log(r.step,"NOT[]",n),o.push(n?0:1)},tq.bind(void 0,1),function(r){var o=r.stack.pop();t.DEBUG&&console.log(r.step,"SDB[]",o),r.deltaBase=o},function(r){var o=r.stack.pop();t.DEBUG&&console.log(r.step,"SDS[]",o),r.deltaShift=Math.pow(.5,o)},function(r){var o=r.stack,n=o.pop(),s=o.pop();t.DEBUG&&console.log(r.step,"ADD[]",n,s),o.push(s+n)},function(r){var o=r.stack,n=o.pop(),s=o.pop();t.DEBUG&&console.log(r.step,"SUB[]",n,s),o.push(s-n)},function(r){var o=r.stack,n=o.pop(),s=o.pop();t.DEBUG&&console.log(r.step,"DIV[]",n,s),o.push(64*s/n)},function(r){var o=r.stack,n=o.pop(),s=o.pop();t.DEBUG&&console.log(r.step,"MUL[]",n,s),o.push(s*n/64)},function(r){var o=r.stack,n=o.pop();t.DEBUG&&console.log(r.step,"ABS[]",n),o.push(Math.abs(n))},function(r){var o=r.stack,n=o.pop();t.DEBUG&&console.log(r.step,"NEG[]",n),o.push(-n)},function(r){var o=r.stack,n=o.pop();t.DEBUG&&console.log(r.step,"FLOOR[]",n),o.push(64*Math.floor(n/64))},function(r){var o=r.stack,n=o.pop();t.DEBUG&&console.log(r.step,"CEILING[]",n),o.push(64*Math.ceil(n/64))},tX.bind(void 0,0),tX.bind(void 0,1),tX.bind(void 0,2),tX.bind(void 0,3),void 0,void 0,void 0,void 0,function(r){var o=(n=r.stack).pop(),n=n.pop();t.DEBUG&&console.log(r.step,"WCVTF[]",o,n),r.cvt[n]=o*r.ppem/r.font.unitsPerEm}
1,tq.bind(void 0,2),tq.bind(void 0,3),tY.bind(void 0,1),tY.bind(void 0,2),tY.bind(void 0,3),function(r){var o,n=r.stack.pop();switch(t.DEBUG&&console.log(r.step,"SROUND[]",n),r.round=t_,192&n){case 0:o=.5;break;case 64:o=1;break;case 128:o=2;break;default:throw Error("invalid SROUND value")}switch(r.srPeriod=o,48&n){case 0:r.srPhase=0;break;case 16:r.srPhase=.25*o;break;case 32:r.srPhase=.5*o;break;case 48:r.srPhase=.75*o;break;default:throw Error("invalid SROUND value")}r.srThreshold=0==(n&=15)?0:(n/8-.5)*o},function(r){var o,n=r.stack.pop();switch(t.DEBUG&&console.log(r.step,"S45ROUND[]",n),r.round=t_,192&n){case 0:o=Math.sqrt(2)/2;break;case 64:o=Math.sqrt(2);break;case 128:o=2*Math.sqrt(2);break;default:throw Error("invalid S45ROUND value")}switch(r.srPeriod=o,48&n){case 0:r.srPhase=0;break;case 16:r.srPhase=.25*o;break;case 32:r.srPhase=.5*o;break;case 48:r.srPhase=.75*o;break;default:throw Error("invalid S45ROUND value")}r.srThreshold=0==(n&=15)?0:(n/8-.5)*o},void 0,void 0,function(r){t.DEBUG&&console.log(r.step,"ROFF[]"),r.round=tp},void 0,function(r){t.DEBUG&&console.log(r.step,"RUTG[]"),r.round=tv},function(r){t.DEBUG&&console.log(r.step,"RDTG[]"),r.round=tb},tD,tD,void 0,void 0,void 0,void 0,void 0,function(r){var o=r.stack.pop();t.DEBUG&&console.log(r.step,"SCANCTRL[]",o)},tZ.bind(void 0,0),tZ.bind(void 0,1),function(r){var o=r.stack,n=o.pop(),s=0;t.DEBUG&&console.log(r.step,"GETINFO[]",n),1&n&&(s=35),32&n&&(s|=4096),o.push(s)},void 0,function(r){var o=r.stack,n=o.pop(),s=o.pop(),i=o.pop();t.DEBUG&&console.log(r.step,"ROLL[]"),o.push(s),o.push(n),o.push(i)},function(r){var o=r.stack,n=o.pop(),s=o.pop();t.DEBUG&&console.log(r.step,"MAX[]",n,s),o.push(Math.max(s,n))},function(r){var o=r.stack,n=o.pop(),s=o.pop();t.DEBUG&&console.log(r.step,"MIN[]",n,s),o.push(Math.min(s,n))},function(r){var o=r.stack.pop();t.DEBUG&&console.log(r.step,"SCANTYPE[]",o)},function(r){var o=r.stack.pop(),n=r.stack.pop();switch(t.DEBUG&&console.log(r.step,"INSTCTRL[]",o,n),o){case 1:return void(r.inhibitGridFit=!!n);case 2:return void(r.ignoreCvt=!!n);default:throw Error("invalid INSTCTRL[] selector")}},void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,tK.bind(void 0,1),tK.bind(void 0,2),tK.bind(void 0,3),tK.bind(void 0,4),tK.bind(void 0,5),tK.bind(void 0,6),tK.bind(void 0,7),tK.bind(void 0,8),tQ.bind(void 0,1),tQ.bind(void 0,2),tQ.bind(void 0,3),tQ.bind(void 0,4),tQ.bind(void 0,5),tQ.bind(void 0,6),tQ.bind(void 0,7),tQ.bind(void 0,8),tJ.bind(void 0,0,0,0,0,0),tJ.bind(void 0,0,0,0,0,1),tJ.bind(void 0,0,0,0,0,2),tJ.bind(void 0,0,0,0,0,3),tJ.bind(void 0,0,0,0,1,0),tJ.bind(void 0,0,0,0,1,1),tJ.bind(void 0,0,0,0,1,2),tJ.bind(void 0,0,0,0,1,3),tJ.bind(void 0,0,0,1,0,0),tJ.bind(void 0,0,0,1,0,1),tJ.bind(void 0,0,0,1,0,2),tJ.bind(void 0,0,0,1,0,3),tJ.bind(void 0,0,0,1,1,0),tJ.bind(void 0,0,0,1,1,1),tJ.bind(void 0,0,0,1,1,2),tJ.bind(void 0,0,0,1,1,3),tJ.bind(void 0,0,1,0,0,0),tJ.bind(void 0,0,1,0,0,1),tJ.bind(void 0,0,1,0,0,2),tJ.bind(void 0,0,1,0,0,3),tJ.bind(void 0,0,1,0,1,0),tJ.bind(void 0,0,1,0,1,1),tJ.bind(void 0,0,1,0,1,2),tJ.bind(void 0,0,1,0,1,3),tJ.bind(void 0,0,1,1,0,0),tJ.bind(void 0,0,1,1,0,1),tJ.bind(void 0,0,1,1,0,2),tJ.bind(void 0,0,1,1,0,3),tJ.bind(void 0,0,1,1,1,0),tJ.bind(void 0,0,1,1,1,1),tJ.bind(void 0,0,1,1,1,2),tJ.bind(void 0,0,1,1,1,3),tJ.bind(void 0,1,0,0,0,0),tJ.bind(void 0,1,0,0,0,1),tJ.bind(void 0,1,0,0,0,2),tJ.bind(void 0,1,0,0,0,3),tJ.bind(void 0,1,0,0,1,0),tJ.bind(void 0,1,0,0,1,1),tJ.bind(void 0,1,0,0,1,2),tJ.bind(void 0,1,0,0,1,3),tJ.bind(void 0,1,0,1,0,0),tJ.bind(void 0,1,0,1,0,1),tJ.bind(void 0,1,0,1,0,2),tJ.bind(void 0,1,0,1,0,3),tJ.bind(void 0,1,0,1,1,0),tJ.bind(void 0,1,0,1,1,1),tJ.bind(void 0,1,0,1,1,2),tJ.bind(void 0,1,0,1,1,3),tJ.bind(void 0,1,1,0,0,0),tJ.bind(void 0,1,1,0,0,1),tJ.bind(void 0,1,1,0,0,2),tJ.bind(void 0,1,1,0,0,3),tJ.bind(void 0,1,1,0,1,0),tJ.bind(void 0,1,1,0,1,1),tJ.bind(void 0,1,1,0,1,2),tJ.bind(void 0,1,1,0,1,3),tJ.bind(void 0,1,1,1,0,0),tJ.bind(void 0,1,1,1,0,1),tJ.bind(void 0,1,1,1,0,2),tJ.bind(void 0,1,1,1,0,3),tJ.bind(void 0,1,1,1,1,0),tJ.bind(void 0,1,1,1,1,1),tJ.bind(void 0,1,1,1,1,2),tJ.bind(void 0,1,1,1,1,3)],t3=Array.from||function(t){return t.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]?|[^\uD800-\uDFFF]|./g)||[]};function t5(t){(t=t||{}
1).empty||(ti(t.familyName,"When creating a new Font object, familyName is required."),ti(t.styleName,"When creating a new Font object, styleName is required."),ti(t.unitsPerEm,"When creating a new Font object, unitsPerEm is required."),ti(t.ascender,"When creating a new Font object, ascender is required."),ti(t.descender,"When creating a new Font object, descender is required."),ti(t.descender<0,"Descender should be negative (e.g. -512)."),this.names={fontFamily:{en:t.familyName||" "},fontSubfamily:{en:t.styleName||" "},fullName:{en:t.fullName||t.familyName+" "+t.styleName},postScriptName:{en:t.postScriptName||(t.familyName+t.styleName).replace(/\s/g,"")},designer:{en:t.designer||" "},designerURL:{en:t.designerURL||" "},manufacturer:{en:t.manufacturer||" "},manufacturerURL:{en:t.manufacturerURL||" "},license:{en:t.license||" "},licenseURL:{en:t.licenseURL||" "},version:{en:t.version||"Version 0.1"},description:{en:t.description||" "},copyright:{en:t.copyright||" "},trademark:{en:t.trademark||" "}},this.unitsPerEm=t.unitsPerEm||1e3,this.ascender=t.ascender,this.descender=t.descender,this.createdTimestamp=t.createdTimestamp,this.tables={os2:{usWeightClass:t.weightClass||this.usWeightClasses.MEDIUM,usWidthClass:t.widthClass||this.usWidthClasses.MEDIUM,fsSelection:t.fsSelection||this.fsSelectionValues.REGULAR}}),this.supported=!0,this.glyphs=new em.GlyphSet(this,t.glyphs||[]),this.encoding=new ea(this),this.position=new tr(this),this.substitution=new to(this),this.tables=this.tables||{},Object.defineProperty(this,"hinting",{get:function(){return this._hinting||("truetype"===this.outlinesFormat?this._hinting=new tf(this):void 0)}})}t5.prototype.hasChar=function(t){return null!==this.encoding.charToGlyphIndex(t)},t5.prototype.charToGlyphIndex=function(t){return this.encoding.charToGlyphIndex(t)},t5.prototype.charToGlyph=function(t){return t=this.charToGlyphIndex(t),this.glyphs.get(t)||this.glyphs.get(0)},t5.prototype.stringToGlyphs=function(t,r){r=r||this.defaultRenderOptions;for(var o=t3(t),n=[],s=0;s<o.length;s+=1){var i=o[s];n.push(this.charToGlyphIndex(i))}var a=n.length;if(r.features){var t=r.script||this.substitution.getDefaultScriptName(),l=[];r.features.liga&&(l=l.concat(this.substitution.getFeature("liga",t,r.language))),r.features.rlig&&(l=l.concat(this.substitution.getFeature("rlig",t,r.language)));for(var u=0;u<a;u+=1)for(var c=0;c<l.length;c++){for(var d=l[c],h=d.sub,f=h.length,p=0;p<f&&h[p]===n[u+p];)p++;p===f&&(n.splice(u,f,d.by),a=a-f+1)}}for(var m=Array(a),y=this.glyphs.get(0),g=0;g<a;g+=1)m[g]=this.glyphs.get(n[g])||y;return m},t5.prototype.nameToGlyphIndex=function(t){return this.glyphNames.nameToGlyphIndex(t)},t5.prototype.nameToGlyph=function(t){return t=this.nameToGlyphIndex(t),this.glyphs.get(t)||this.glyphs.get(0)},t5.prototype.glyphIndexToName=function(t){return this.glyphNames.glyphIndexToName?this.glyphNames.glyphIndexToName(t):""},t5.prototype.getKerningValue=function(t,r){t=t.index||t,r=r.index||r;var o=this.position.defaultKerningTables;return o?this.position.getKerningValue(o,t,r):this.kerningPairs[t+","+r]||0},t5.prototype.defaultRenderOptions={kerning:!0,features:{liga:!0,rlig:!0}},t5.prototype.forEachGlyph=function(t,r,o,n,s,i){r=void 0!==r?r:0,o=void 0!==o?o:0,s=s||this.defaultRenderOptions;var a,l=1/this.unitsPerEm*(n=void 0!==n?n:72),u=this.stringToGlyphs(t,s);s.kerning&&(t=s.script||this.position.getDefaultScriptName(),a=this.position.getKerningTables(t,s.language));for(var c=0;c<u.length;c+=1){var d=u[c];i.call(this,d,r,o,n,s),d.advanceWidth&&(r+=d.advanceWidth*l),s.kerning&&c<u.length-1&&(r+=(a?this.position.getKerningValue(a,d.index,u[c+1].index):this.getKerningValue(d,u[c+1]))*l),s.letterSpacing?r+=s.letterSpacing*n:s.tracking&&(r+=s.tracking/1e3*n)}return r},t5.prototype.getPath=function(t,r,o,n,s){var i=new E;return this.forEachGlyph(t,r,o,n,s,function(t,r,o,n){t=t.getPath(r,o,n,s,this),i.extend(t)}),i},t5.prototype.getPaths=function(t,r,o,n,s){var i=[];return this.forEachGlyph(t,r,o,n,s,function(t,r,o,n){t=t.getPath(r,o,n,s,this),i.push(t)}),i},t5.prototype.getAdvanceWidth=function(t,r,o){return this.forEachGlyph(t,0,0,r,o,function(){})},t5.prototype.draw=function(t,r,o,n,s,i){this.getPath(r,o,n,s,i).draw(t)},t5.prototype.drawPoints=function(t,r,o,n,s,i){this.forEachGlyph(r,o,n,s,i,function(r,o,n,s){r.drawPoints(t,o,n,s)})},t5.prototype.drawMetrics=function(t,r,o,n,s,i){this.forEachGlyph(r,o,n,s,i,function(r,o,n,s){r.drawMetrics(t,o,n,s)})},t5.prototype.getEnglishName=function(t){if(t=this.names[t])return t.en},t5.prototype.validate=function(){var t=this;function r(r){(r=t.getEnglishName(r))&&r.trim().length}r("fontFamily"),r("weightName"),r("manufacturer"),r("copyright"),r("version"),this.unitsPerEm},t5.prototype.toTables=function(){return e8(this)},t5.prototype.toBuffer=function(){return console.warn("Font.toBuffer is deprecated. Use Font.toArrayBuffer instead."),this.toArrayBuffer()},t5.prototype.toArrayBuffer=function(){for(var t=this.toTables().encode(),r=new ArrayBuffer(t.length),o=new Uint8Array(r),n=0;n<t.length;n++)o[n]=t[n];return r},t5.prototype.download=function(t){var o=this.getEnglishName("fontFamily"),n=this.getEnglishName("fontSubfam
1ily"),i=(t=t||o.replace(/\s/g,"")+"-"+n+".otf",this.toArrayBuffer());"undefined"!=typeof window?(window.requestFileSystem=window.requestFileSystem||window.webkitRequestFileSystem,window.requestFileSystem(window.TEMPORARY,i.byteLength,function(r){r.root.getFile(t,{create:!0},function(t){t.createWriter(function(r){var o=new DataView(i),o=new Blob([o],{type:"font/opentype"});r.write(o),r.addEventListener("writeend",function(){location.href=t.toURL()},!1)})})},function(t){throw Error(t.name+": "+t.message)})):(o=r("fs"),n=function(t){for(var r=new s(t.byteLength),o=new Uint8Array(t),n=0;n<r.length;++n)r[n]=o[n];return r}(i),o.writeFileSync(t,n))},t5.prototype.fsSelectionValues={ITALIC:1,UNDERSCORE:2,NEGATIVE:4,OUTLINED:8,STRIKEOUT:16,BOLD:32,REGULAR:64,USER_TYPO_METRICS:128,WWS:256,OBLIQUE:512},t5.prototype.usWidthClasses={ULTRA_CONDENSED:1,EXTRA_CONDENSED:2,CONDENSED:3,SEMI_CONDENSED:4,MEDIUM:5,SEMI_EXPANDED:6,EXPANDED:7,EXTRA_EXPANDED:8,ULTRA_EXPANDED:9},t5.prototype.usWeightClasses={THIN:100,EXTRA_LIGHT:200,LIGHT:300,NORMAL:400,MEDIUM:500,SEMI_BOLD:600,BOLD:700,EXTRA_BOLD:800,BLACK:900};var t4={parse:function(t,r,o){for(var n,s,i,a=new et.Parser(t,r),l=a.parseULong(),u=(k.argument(65536===l,"Unsupported fvar table version."),a.parseOffset16()),c=(a.skip("uShort",1),a.parseUShort()),d=a.parseUShort(),h=a.parseUShort(),f=a.parseUShort(),p=[],m=0;m<c;m++)p.push((n=t,s=r+u+m*d,i={},n=new et.Parser(n,s),i.tag=n.parseTag(),i.minValue=n.parseFixed(),i.defaultValue=n.parseFixed(),i.maxValue=n.parseFixed(),n.skip("uShort",1),i.name=o[n.parseUShort()]||{},i));for(var y=[],g=r+u+c*d,v=0;v<h;v++)y.push(function(t,r,o,n){var s={},i=new et.Parser(t,r);s.name=n[i.parseUShort()]||{},i.skip("uShort",1),s.coordinates={};for(var a=0;a<o.length;++a)s.coordinates[o[a].tag]=i.parseFixed();return s}(t,g+v*f,p,o));return{axes:p,instances:y}}},t6=Array(10);t6[1]=function(){var t=this.offset+this.relativeOffset,r=this.parseUShort();return 1===r?{posFormat:1,coverage:this.parsePointer($.coverage),value:this.parseValueRecord()}:2===r?{posFormat:2,coverage:this.parsePointer($.coverage),values:this.parseValueRecordList()}:void k.assert(!1,"0x"+t.toString(16)+": GPOS lookup type 1 format must be 1 or 2.")},t6[2]=function(){var t,r,o,n=this.offset+this.relativeOffset,s=this.parseUShort(),n=(k.assert(1===s||2===s,"0x"+n.toString(16)+": GPOS lookup type 2 format must be 1 or 2."),this.parsePointer($.coverage)),i=this.parseUShort(),a=this.parseUShort();return 1===s?{posFormat:s,coverage:n,valueFormat1:i,valueFormat2:a,pairSets:this.parseList($.pointer($.list(function(){return{secondGlyph:this.parseUShort(),value1:this.parseValueRecord(i),value2:this.parseValueRecord(a)}})))}:2===s?(t=this.parsePointer($.classDef),{posFormat:s,coverage:n,valueFormat1:i,valueFormat2:a,classDef1:t,classDef2:this.parsePointer($.classDef),class1Count:r=this.parseUShort(),class2Count:o=this.parseUShort(),classRecords:this.parseList(r,$.list(o,function(){return{value1:this.parseValueRecord(i),value2:this.parseValueRecord(a)}}))}):void 0},t6[3]=function(){return{error:"GPOS Lookup 3 not supported"}},t6[4]=function(){return{error:"GPOS Lookup 4 not supported"}},t6[5]=function(){return{error:"GPOS Lookup 5 not supported"}}
1,t6[6]=function(){return{error:"GPOS Lookup 6 not supported"}},t6[7]=function(){return{error:"GPOS Lookup 7 not supported"}},t6[8]=function(){return{error:"GPOS Lookup 8 not supported"}},t6[9]=function(){return{error:"GPOS Lookup 9 not supported"}};var t8={parse:function(t,r){return r=(t=new $(t,r=r||0)).parseVersion(1),k.argument(1===r||1.1===r,"Unsupported GPOS table version "+r),1===r?{version:r,scripts:t.parseScriptList(),features:t.parseFeatureList(),lookups:t.parseLookupList(t6)}:{version:r,scripts:t.parseScriptList(),features:t.parseFeatureList(),lookups:t.parseLookupList(t6),variations:t.parseFeatureVariationsList()}}},t9={parse:function(t,r){if(0===(r=(t=new et.Parser(t,r)).parseUShort())){var o=t,n={},s=(o.skip("uShort"),o.parseUShort()),i=(k.argument(0===s,"Unsupported kern sub-table version."),o.skip("uShort",2),o.parseUShort());o.skip("uShort",3);for(var a=0;a<i;a+=1){var l=o.parseUShort(),u=o.parseUShort(),c=o.parseShort();n[l+","+u]=c}return n}if(1!==r)throw Error("Unsupported kern table version ("+r+").");var d=t,h={},s=(d.skip("uShort"),1<d.parseULong()&&console.warn("Only the first kern subtable is supported."),d.skip("uLong"),255&d.parseUShort());if(d.skip("uShort"),0==s){var f=d.parseUShort();d.skip("uShort",3);for(var p=0;p<f;p+=1){var m=d.parseUShort(),y=d.parseUShort(),g=d.parseShort();h[m+","+y]=g}}return h}},t7={parse:function(t,r,o,n){for(var s=new et.Parser(t,r),i=n?s.parseUShort:s.parseULong,a=[],l=0;l<o+1;l+=1){var u=i.call(s);n&&(u*=2),a.push(u)}return a}};function re(t,r){for(var o=[],n=12,s=0;s<r;s+=1){var i=et.getTag(t,n),a=et.getULong(t,n+4),l=et.getULong(t,n+8),u=et.getULong(t,n+12);o.push({tag:i,checksum:a,offset:l,length:u,compression:!1}),n+=16}return o}function rt(t,r){if("WOFF"!==r.compression)return{data:t,offset:r.offset};var t=new Uint8Array(t.buffer,r.offset+2,r.compressedLength-2),o=new Uint8Array(r.length);if(w(t,o),o.byteLength!==r.length)throw Error("Decompression error: "+r.tag+" decompressed length doesn't match recorded length");return{data:new DataView(o.buffer,0),offset:0}}function rr(t){var r,o,n,s,i,a,l,u,c,d,h,f,p,m,y=new t5({empty:!0}),g=new DataView(t,0),v=[],t=et.getTag(g,0);if(t===String.fromCharCode(0,1,0,0)||"true"===t||"typ1"===t)y.outlinesFormat="truetype",v=re(g,n=et.getUShort(g,4));else if("OTTO"===t)y.outlinesFormat="cff",v=re(g,n=et.getUShort(g,4));else{if("wOFF"!==t)throw Error("Unsupported OpenType signature "+t);var b=et.getTag(g,4);if(b===String.fromCharCode(0,1,0,0))y.outlinesFormat="truetype";else{if("OTTO"!==b)throw Error("Unsupported OpenType flavor "+t);y.outlinesFormat="cff"}v=function(t,r){for(var o=[],n=44,s=0;s<r;s+=1){var i=et.getTag(t,n),a=et.getULong(t,n+4),l=et.getULong(t,n+8),u=et.getULong(t,n+12),c=l<u&&"WOFF";o.push({tag:i,offset:a,compression:c,compressedLength:l,length:u}),n+=20}return o}(g,n=et.getUShort(g,12))}for(var _=0;_<n;_+=1){var j=v[_],x=void 0;switch(j.tag){case"cmap":x=rt(g,j),y.tables.cmap=er.parse(x.data,x.offset),y.encoding=new el(y.tables.cmap);break;case"cvt ":x=rt(g,j),m=new et.Parser(x.data,x.offset),y.tables.cvt=m.parseShortList(j.length/2);break;case"fvar":i=j;break;case"fpgm":x=rt(g,j),m=new et.Parser(x.data,x.offset),y.tables.fpgm=m.parseByteList(j.length);break;case"head":x=rt(g,j),y.tables.head=eC.parse(x.data,x.offset),y.unitsPerEm=y.tables.head.unitsPerEm,r=y.tables.head.indexToLocFormat;break;case"hhea":x=rt(g,j),y.tables.hhea=eP.parse(x.data,x.offset),y.ascender=y.tables.hhea.ascender,y.descender=y.tables.hhea.descender,y.numberOfHMetrics=y.tables.hhea.numberOfHMetrics;break;case"hmtx":c=j;break;case"ltag":x=rt(g,j),o=eR.parse(x.data,x.offset);break;case"maxp":x=rt(g,j),y.tables.maxp=eI.parse(x.data,x.offset),y.numGlyphs=y.tables.maxp.numGlyphs;break;case"name":f=j;break;case"OS/2":x=rt(g,j),y.tables.os2=eK.parse(x.data,x.offset);break;case"post":x=rt(g,j),y.tables.post=eQ.parse(x.data,x.offset),y.glyphNames=new ec(y.tables.post);break;case"prep":x=rt(g,j),m=new et.Parser(x.data,x.offset),y.tables.prep=m.parseByteList(j.length);break;case"glyf":a=j;break;case"loca":h=j;break;case"CFF ":s=j;break;case"kern":d=j;break;case"GPOS":l=j;break;case"GSUB":u=j;break;case"meta":p=j}}if(b=rt(g,f),y.tables.name=eX(b.data,b.offset,o),y.names=y.tables.name,a&&h)t=0===r,b=rt(g,h),b=t7.parse(b.data,b.offset,y.numGlyphs,t),t=rt(g,a),y.glyphs=th.parse(t.data,t.offset,b,y);else{if(!s)throw Error("Font doesn't contain TrueType or CFF outlines.");t=rt(g,s),eO.parse(t.data,t.offset,y)}for(var b=rt(g,c),w=(eA(b.data,b.offset,y.numberOfHMetrics,y.numGlyphs,y.glyphs),y),S=w.tables.cmap.glyphIndexMap,T=Object.keys(S),E=0;E<T.length;E+=1){var M,k=T[E],O=S[k];(M=w.glyphs.get(O)).addUnicode(parseInt(k))}for(var C=0;C<w.glyphs.length;C+=1)M=w.glyphs.get(C),w.cffEncoding?w.isCIDFont?M.name="gid"+C:M.name=w.cffEncoding.charset[C]:w.glyphNames.names&&(M.name=w.glyphNames.glyphIndexToName(C));return d?(t=rt(g,d),y.kerningPairs=t9.parse(t.data,t.offset)):y.kerningPairs={},l&&(b=rt(g,l),y.tables.gpos=t8.parse(b.data,b.offset),y.position.init()),u&&(t=rt(g,u),y.tables.gsub=e1.parse(t.data,t.offset)),i&&(b=rt(g,i),y.tables.fvar=t4.parse(b.data,b.offset,y.names)),p&&(t=rt(g,p),y.tables.meta=e2.parse(t.data,t.offset),y.metas=y.tables.meta),y}t.Font=t5,t.Glyph=eh,t.Path=E,t.BoundingBox=T,t._parse=et,t.parse=rr,t.load=function(t,o){("undefined"==typeof window?function(t,o){r("fs").readFile(t,function(t,r){if(t)return o(t.message);o(null,ts(r))})}:function(t,r){var o=new XMLHttpRequest;o.open("get",t,!0),o.responseType="arraybuffer",o.onload=function(){return o.response?r(null,o.response):r("Font could not be loaded: "+o.statusText)},o.onerror=function(){r("Font could not be loaded")},o.send()})(t,function(t,r){var n;if(t)return o(t);try{n=rr(r)}catch(t){return o(t,null)}return o(null,n)})}
1,t.loadSync=function(t){return rr(ts(r("fs").readFileSync(t)))},Object.defineProperty(t,"__esModule",{value:!0})},"object"==typeof n&&void 0!==o?i(n):"function"==typeof t&&t.amd?t(["exports"],i):i(this.opentype={})}).call(this,r("buffer").Buffer)},{buffer:4,fs:2}],258:[function(t,r,o){(function(t){function r(t,r){for(var o=0,n=t.length-1;0<=n;n--){var s=t[n];"."===s?t.splice(n,1):".."===s?(t.splice(n,1),o++):o&&(t.splice(n,1),o--)}if(r)for(;o--;)t.unshift("..");return t}function n(t,r){if(t.filter)return t.filter(r);for(var o=[],n=0;n<t.length;n++)r(t[n],n,t)&&o.push(t[n]);return o}o.resolve=function(){for(var o="",s=!1,i=arguments.length-1;-1<=i&&!s;i--){var a=0<=i?arguments[i]:t.cwd();if("string"!=typeof a)throw TypeError("Arguments to path.resolve must be strings");a&&(o=a+"/"+o,s="/"===a.charAt(0))}return(s?"/":"")+(o=r(n(o.split("/"),function(t){return!!t}),!s).join("/"))||"."},o.normalize=function(t){var i=o.isAbsolute(t),a="/"===s(t,-1);return(t=(t=r(n(t.split("/"),function(t){return!!t}),!i).join("/"))||i?t:".")&&a&&(t+="/"),(i?"/":"")+t},o.isAbsolute=function(t){return"/"===t.charAt(0)},o.join=function(){var t=Array.prototype.slice.call(arguments,0);return o.normalize(n(t,function(t,r){if("string"!=typeof t)throw TypeError("Arguments to path.join must be strings");return t}).join("/"))},o.relative=function(t,r){function n(t){for(var r=0;r<t.length&&""===t[r];r++);for(var o=t.length-1;0<=o&&""===t[o];o--);return o<r?[]:t.slice(r,o-r+1)}t=o.resolve(t).substr(1),r=o.resolve(r).substr(1);for(var s=n(t.split("/")),i=n(r.split("/")),a=Math.min(s.length,i.length),l=a,u=0;u<a;u++)if(s[u]!==i[u]){l=u;break}for(var c=[],u=l;u<s.length;u++)c.push("..");return(c=c.concat(i.slice(l))).join("/")},o.sep="/",o.delimiter=":",o.dirname=function(t){if("string"!=typeof t&&(t+=""),0===t.length)return".";for(var r=47===t.charCodeAt(0),o=-1,n=!0,s=t.length-1;1<=s;--s)if(47===t.charCodeAt(s)){if(!n){o=s;break}}else n=!1;return -1===o?r?"/":".":r&&1===o?"/":t.slice(0,o)},o.basename=function(t,r){return t=function(t){"string"!=typeof t&&(t+="");for(var r=0,o=-1,n=!0,s=t.length-1;0<=s;--s)if(47===t.charCodeAt(s)){if(!n){r=s+1;break}}else -1===o&&(n=!1,o=s+1);return -1===o?"":t.slice(r,o)}(t),t=r&&t.substr(-1*r.length)===r?t.substr(0,t.length-r.length):t},o.extname=function(t){"string"!=typeof t&&(t+="");for(var r=-1,o=0,n=-1,s=!0,i=0,a=t.length-1;0<=a;--a){var l=t.charCodeAt(a);if(47===l){if(s)continue;o=a+1;break}-1===n&&(s=!1,n=a+1),46===l?-1===r?r=a:1!==i&&(i=1):-1!==r&&(i=-1)}return -1===r||-1===n||0===i||1===i&&r===n-1&&r===o+1?"":t.slice(r,n)};var s=function(t,r,o){return t.substr(r,o)}}).call(this,t("_process"))},{_process:259}],259:[function(t,r,o){var n,s,r=r.exports={};function i(){throw Error("setTimeout has not been defined")}function a(){throw Error("clearTimeout has not been defined")}try{n="function"==typeof setTimeout?setTimeout:i}catch(t){n=i}try{s="function"==typeof clearTimeout?clearTimeout:a}catch(t){s=a}function l(t){if(n===setTimeout)return setTimeout(t,0);if((n===i||!n)&&setTimeout)return(n=setTimeout)(t,0);try{return n(t,0)}catch(r){try{return n.call(null,t,0)}catch(r){return n.call(this,t,0)}}}var u,c=[],d=!1,h=-1;function f(){d&&u&&(d=!1,u.length?c=u.concat(c):h=-1,c.length&&p())}function p(){if(!d){for(var t=l(f),r=(d=!0,c.length);r;){for(u=c,c=[];++h<r;)u&&u[h].run();h=-1,r=c.length}u=null,d=!1,function(t){if(s===clearTimeout)return clearTimeout(t);if((s===a||!s)&&clearTimeout)return(s=clearTimeout)(t);try{s(t)}catch(r){try{return s.call(null,t)}catch(r){return s.call(this,t)}}}(t)}}function m(t,r){this.fun=t,this.array=r}function y(){}r.nextTick=function(t){var r=Array(arguments.length-1);if(1<arguments.length)for(var o=1;o<arguments.length;o++)r[o-1]=arguments[o];c.push(new m(t,r)),1!==c.length||d||l(p)},m.prototype.run=function(){this.fun.apply(null,this.array)},r.title="browser",r.browser=!0,r.env={},r.argv=[],r.version="",r.versions={},r.on=y,r.addListener=y,r.once=y,r.off=y,r.removeListener=y,r.removeAllListeners=y,r.emit=y,r.prependListener=y,r.prependOnceListener=y,r.listeners=function(t){return[]},r.binding=function(t){throw Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(t){throw Error("process.chdir is not supported")},r.umask=function(){return 0}},{}],260:[function(t,r,o){r=function(t){"use strict";var r,o=Object.prototype,n=o.hasOwnProperty,s="function"==typeof Symbol?Symbol:{},i=s.iterator||"@@iterator",a=s.asyncIterator||"@@asyncIterator",l=s.toStringTag||"@@toStringTag";function u(t,o,n,s){var i,a,o=o&&o.prototype instanceof y?o:y,o=Object.create(o.prototype),s=new T(s||[]);return o._invoke=(i=s,a=d,function(o,s){if(a===f)throw Error("Generator is already running");if(a===p){if("throw"===o)throw s;return M()}for(i.method=o,i.arg=s;;){var l=i.delegate;if(l&&(l=function t(o,n){var s=o.iterator[n.method];if(s===r){if(n.delegate=null,"throw"===n.method){if(o.iterator.return&&
1(n.method="return",n.arg=r,t(o,n),"throw"===n.method))return m;n.method="throw",n.arg=TypeError("The iterator does not provide a 'throw' method")}return m}return"throw"===(s=c(s,o.iterator,n.arg)).type?(n.method="throw",n.arg=s.arg,n.delegate=null,m):(s=s.arg)?s.done?(n[o.resultName]=s.value,n.next=o.nextLoc,"return"!==n.method&&(n.method="next",n.arg=r),n.delegate=null,m):s:(n.method="throw",n.arg=TypeError("iterator result is not an object"),n.delegate=null,m)}(l,i))){if(l===m)continue;return l}if("next"===i.method)i.sent=i._sent=i.arg;else if("throw"===i.method){if(a===d)throw a=p,i.arg;i.dispatchException(i.arg)}else"return"===i.method&&i.abrupt("return",i.arg);if(a=f,"normal"===(l=c(t,n,i)).type){if(a=i.done?p:h,l.arg!==m)return{value:l.arg,done:i.done}}else"throw"===l.type&&(a=p,i.method="throw",i.arg=l.arg)}}),o}function c(t,r,o){try{return{type:"normal",arg:t.call(r,o)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var d="suspendedStart",h="suspendedYield",f="executing",p="completed",m={};function y(){}function g(){}function v(){}var s={},b=(s[i]=function(){return this},Object.getPrototypeOf),b=b&&b(b(E([]))),_=(b&&b!==o&&n.call(b,i)&&(s=b),v.prototype=y.prototype=Object.create(s));function j(t){["next","throw","return"].forEach(function(r){t[r]=function(t){return this._invoke(r,t)}})}function x(t){var r;this._invoke=function(o,s){function i(){return new Promise(function(r,i){!function r(o,s,i,a){var l,o=c(t[o],t,s);if("throw"!==o.type)return(s=(l=o.arg).value)&&"object"==typeof s&&n.call(s,"__await")?Promise.resolve(s.__await).then(function(t){r("next",t,i,a)},function(t){r("throw",t,i,a)}):Promise.resolve(s).then(function(t){l.value=t,i(l)},function(t){return r("throw",t,i,a)});a(o.arg)}(o,s,r,i)})}return r=r?r.then(i,i):i()}}function w(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function S(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function E(t){if(t){var o,s=t[i];if(s)return s.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length))return o=-1,(s=function s(){for(;++o<t.length;)if(n.call(t,o))return s.value=t[o],s.done=!1,s;return s.value=r,s.done=!0,s}).next=s}return{next:M}}function M(){return{value:r,done:!0}}return(g.prototype=_.constructor=v).constructor=g,v[l]=g.displayName="GeneratorFunction",t.isGeneratorFunction=function(t){return!!(t="function"==typeof t&&t.constructor)&&(t===g||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,l in t||(t[l]="GeneratorFunction")),t.prototype=Object.create(_),t},t.awrap=function(t){return{__await:t}},j(x.prototype),x.prototype[a]=function(){return this},t.AsyncIterator=x,t.async=function(r,o,n,s){var i=new x(u(r,o,n,s));return t.isGeneratorFunction(o)?i:i.next().then(function(t){return t.done?t.value:i.next()})},j(_),_[l]="Generator",_[i]=function(){return this},_.toString=function(){return"[object Generator]"},t.keys=function(t){var r,o=[];for(r in t)o.push(r);return o.reverse(),function r(){for(;o.length;){var n=o.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=E,T.prototype={constructor:T,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=r,this.done=!1,this.delegate=null,this.method="next",this.arg=r,this.tryEntries.forEach(S),!t)for(var o in this)"t"===o.charAt(0)&&n.call(this,o)&&!isNaN(+o.slice(1))&&(this[o]=r)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var o=this;function s(n,s){return l.type="throw",l.arg=t,o.next=n,s&&(o.method="next",o.arg=r),!!s}for(var i=this.tryEntries.length-1;0<=i;--i){var a=this.tryEntries[i],l=a.completion;if("root"===a.tryLoc)return s("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return s(a.catchLoc,!0);if(this.prev<a.finallyLoc)return s(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return s(a.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return s(a.finallyLoc)}}}},abrupt:function(t,r){for(var o=this.tryEntries.length-1;0<=o;--o){var s=this.tryEntries[o];if(s.tryLoc<=this.prev&&n.call(s,"finallyLoc")&&this.prev<s.finallyLoc){var i=s;break}}var a=(i=i&&("break"===t||"continue"===t)&&i.tryLoc<=r&&r<=i.finallyLoc?null:i)?i.completion:{};return a.type=t,a.arg=r,i?(this.method="next",this.next=i.finallyLoc,m):this.complete(a)},complete:function(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),m},finish:function(t){for(var r=this.tryEntries.length-1;0<=r;--r){var o=this.tryEntries[r];if(o.finallyLoc===t)return this.complete(o.completion,o.afterLoc),S(o),m}},catch:function(t){for(var r=this.tryEntries.length-1;0<=r;--r){var o,n,s=this.tryEntries[r];if(s.tryLoc===t)return"throw"===(o=s.completion).type&&(n=o.arg,S(s)),n}throw Error("illegal catch attempt")},delegateYield:function(t,o,n){return this.delegate={iterator:E(t),resultName:o,nextLoc:n},"next"===this.method&&(this.arg=r),m}},t}("object"==typeof r?r.exports:{});try{regeneratorRuntime=r}catch(t){Function("r","regeneratorRuntime = r")(r)}},{}],261:[function(t,r,o){!function(t){"use strict";var r,o,n,s,i,a,l,u,c,d;function h(t){if("string"!=typeof t&&(t=String(t)),/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(t))throw TypeError("Invalid character in header field name");return t.toLowerCase()}function f(t){return t="string"!=typeof t?String(t):t}
1function p(t){var r={next:function(){var r=t.shift();return{done:void 0===r,value:r}}};return o&&(r[Symbol.iterator]=function(){return r}),r}function m(t){this.map={},t instanceof m?t.forEach(function(t,r){this.append(r,t)},this):Array.isArray(t)?t.forEach(function(t){this.append(t[0],t[1])},this):t&&Object.getOwnPropertyNames(t).forEach(function(r){this.append(r,t[r])},this)}function y(t){if(t.bodyUsed)return Promise.reject(TypeError("Already read"));t.bodyUsed=!0}function g(t){return new Promise(function(r,o){t.onload=function(){r(t.result)},t.onerror=function(){o(t.error)}})}function v(t){var r=new FileReader,o=g(r);return r.readAsArrayBuffer(t),o}function b(t){var r;return t.slice?t.slice(0):((r=new Uint8Array(t.byteLength)).set(new Uint8Array(t)),r.buffer)}function _(){return this.bodyUsed=!1,this._initBody=function(t){if(this._bodyInit=t){if("string"==typeof t)this._bodyText=t;else if(n&&Blob.prototype.isPrototypeOf(t))this._bodyBlob=t;else if(s&&FormData.prototype.isPrototypeOf(t))this._bodyFormData=t;else if(r&&URLSearchParams.prototype.isPrototypeOf(t))this._bodyText=t.toString();else if(i&&n&&l(t))this._bodyArrayBuffer=b(t.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer]);else{if(!i||!ArrayBuffer.prototype.isPrototypeOf(t)&&!u(t))throw Error("unsupported BodyInit type");this._bodyArrayBuffer=b(t)}}else this._bodyText="";this.headers.get("content-type")||("string"==typeof t?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):r&&URLSearchParams.prototype.isPrototypeOf(t)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},n&&(this.blob=function(){var t=y(this);if(t)return t;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?y(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(v)}),this.text=function(){var t,r,o=y(this);if(o)return o;if(this._bodyBlob)return o=this._bodyBlob,r=g(t=new FileReader),t.readAsText(o),r;if(this._bodyArrayBuffer)return Promise.resolve(function(t){for(var r=new Uint8Array(t),o=Array(r.length),n=0;n<r.length;n++)o[n]=String.fromCharCode(r[n]);return o.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},s&&(this.formData=function(){return this.text().then(x)}),this.json=function(){return this.text().then(JSON.parse)},this}function j(t,r){var o,n=(r=r||{}).body;if(t instanceof j){if(t.bodyUsed)throw TypeError("Already read");this.url=t.url,this.credentials=t.credentials,r.headers||(this.headers=new m(t.headers)),this.method=t.method,this.mode=t.mode,n||null==t._bodyInit||(n=t._bodyInit,t.bodyUsed=!0)}else this.url=String(t);if(this.credentials=r.credentials||this.credentials||"omit",!r.headers&&this.headers||(this.headers=new m(r.headers)),this.method=(o=(t=r.method||this.method||"GET").toUpperCase(),-1<c.indexOf(o)?o:t),this.mode=r.mode||this.mode||null,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&n)throw TypeError("Body not allowed for GET or HEAD requests");this._initBody(n)}function x(t){var r=new FormData;return t.trim().split("&").forEach(function(t){var o;t&&(o=(t=t.split("=")).shift().replace(/\+/g," "),t=t.join("=").replace(/\+/g," "),r.append(decodeURIComponent(o),decodeURIComponent(t)))}),r}function w(t,r){r=r||{},this.type="default",this.status=void 0===r.status?200:r.status,this.ok=200<=this.status&&this.status<300,this.statusText="statusText"in r?r.statusText:"OK",this.headers=new m(r.headers),this.url=r.url||"",this._initBody(t)}t.fetch||(r="URLSearchParams"in t,o="Symbol"in t&&"iterator"in Symbol,n="FileReader"in t&&"Blob"in t&&function(){try{return new Blob,!0}catch(t){return!1}}(),s="FormData"in t,(i="ArrayBuffer"in t)&&(a=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array
1]"],l=function(t){return t&&DataView.prototype.isPrototypeOf(t)},u=ArrayBuffer.isView||function(t){return t&&-1<a.indexOf(Object.prototype.toString.call(t))}),m.prototype.append=function(t,r){t=h(t),r=f(r);var o=this.map[t];this.map[t]=o?o+","+r:r},m.prototype.delete=function(t){delete this.map[h(t)]},m.prototype.get=function(t){return t=h(t),this.has(t)?this.map[t]:null},m.prototype.has=function(t){return this.map.hasOwnProperty(h(t))},m.prototype.set=function(t,r){this.map[h(t)]=f(r)},m.prototype.forEach=function(t,r){for(var o in this.map)this.map.hasOwnProperty(o)&&t.call(r,this.map[o],o,this)},m.prototype.keys=function(){var t=[];return this.forEach(function(r,o){t.push(o)}),p(t)},m.prototype.values=function(){var t=[];return this.forEach(function(r){t.push(r)}),p(t)},m.prototype.entries=function(){var t=[];return this.forEach(function(r,o){t.push([o,r])}),p(t)},o&&(m.prototype[Symbol.iterator]=m.prototype.entries),c=["DELETE","GET","HEAD","OPTIONS","POST","PUT"],j.prototype.clone=function(){return new j(this,{body:this._bodyInit})},_.call(j.prototype),_.call(w.prototype),w.prototype.clone=function(){return new w(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new m(this.headers),url:this.url})},w.error=function(){var t=new w(null,{status:0,statusText:""});return t.type="error",t},d=[301,302,303,307,308],w.redirect=function(t,r){if(-1===d.indexOf(r))throw RangeError("Invalid status code");return new w(null,{status:r,headers:{location:t}})},t.Headers=m,t.Request=j,t.Response=w,t.fetch=function(t,r){return new Promise(function(o,s){var i=new j(t,r),a=new XMLHttpRequest;a.onload=function(){var t,r={status:a.status,statusText:a.statusText,headers:(r=a.getAllResponseHeaders()||"",t=new m,r.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach(function(r){var r=r.split(":"),o=r.shift().trim();o&&(r=r.join(":").trim(),t.append(o,r))}),t)};o(new w((r.url="responseURL"in a?a.responseURL:r.headers.get("X-Request-URL"),"response"in a?a.response:a.responseText),r))},a.onerror=function(){s(TypeError("Network request failed"))},a.ontimeout=function(){s(TypeError("Network request failed"))},a.open(i.method,i.url,!0),"include"===i.credentials?a.withCredentials=!0:"omit"===i.credentials&&(a.withCredentials=!1),"responseType"in a&&n&&(a.responseType="blob"),i.headers.forEach(function(t,r){a.setRequestHeader(r,t)}),a.send(void 0===i._bodyInit?null:i._bodyInit)})},t.fetch.polyfill=!0)}("undefined"!=typeof self?self:this)},{}],262:[function(t,r,o){"use strict";t("core-js/modules/es.function.name"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.regexp.exec"),t("core-js/modules/es.regexp.to-string"),t("core-js/modules/es.string.split"),t("core-js/modules/es.function.name"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.regexp.exec"),t("core-js/modules/es.regexp.to-string"),t("core-js/modules/es.string.split"),Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;var n,s=a(t("../core/main")),i=a(t("../color/color_conversion"));function a(t){return t&&t.__esModule?t:{default:t}}var l=[{h:0,s:0,b:.8275,name:"gray"},{h:0,s:0,b:.8627,name:"gray"},{h:0,s:0,b:.7529,name:"gray"},{h:.0167,s:.1176,b:1,name:"light pink"}],u=[{h:0,s:0,b:0,name:"black"},{h:0,s:0,b:.5,name:"gray"},{h:0,s:0,b:1,name:"white"},{h:0,s:.5,b:.5,name:"dark maroon"},{h:0,s:.5,b:1,name:"salmon pink"},{h:0,s:1,b:0,name:"black"},{h:0,s:1,b:.5,name:"dark red"},{h:0,s:1,b:1,name:"red"},{h:5,s:0,b:1,name:"very light peach"},{h:5,s:.5,b:.5,name:"brown"},{h:5,s:.5,b:1,name:"peach"},{h:5,s:1,b:.5,name:"brick red"},{h:5,s:1,b:1,name:"crimson"},{h:10,s:0,b:1,name:"light peach"},{h:10,s:.5,b:.5,name:"brown"},{h:10,s:.5,b:1,name:"light orange"},{h:10,s:1,b:.5,name:"brown"},{h:10,s:1,b:1,name:"orange"},{h:15,s:0,b:1,name:"very light yellow"},{h:15,s:.5,b:.5,name:"olive green"},{h:15,s:.5,b:1,name:"light yellow"},{h:15,s:1,b:0,name:"dark olive green"},{h:15,s:1,b:.5,name:"olive green"},{h:15,s:1,b:1,name:"yellow"},{h:20,s:0,b:1,name:"very light yellow"},{h:20,s:.5,b:.5,name:"olive green"},{h:20,s:.5,b:1,name:"light yellow green"},{h:20,s:1,b:0,name:"dark olive green"},{h:20,s:1,b:.5,name:"dark yellow green"},{h:20,s:1,b:1,name:"yellow green"},{h:25,s:.5,b:.5,name:"dark yellow green"},{h:25,s:.5,b:1,name:"light green"},{h:25,s:1,b:.5,name:"dark green"},{h:25,s:1,b:1,name:"green"},{h:30,s:.5,b:1,name:"light green"},{h:30,s:1,b:.5,name:"dark green"},{h:30,s:1,b:1,name:"green"},{h:35,s:0,b:.5,name:"light green"},{h:35,s:0,b:1,name:"very light green"},{h:35,s:.5,b:.5,name:"dark green"},{h:35,s:.5,b:1,name:"light green"},{h:35,s:1,b:0,name:"very dark green"},{h:35,s:1,b:.5,name:"dark green"},{h:35,s:1,b:1,name:"green"},{h:40,s:0,b:1,name:"very light green"},{h:40,s:.5,b:.5,name:"dark green"},{h:40,s:.5,b:1,name:"light green"},{h:40,s:1,b:.5,name:"dark green"},{h:40,s:1,b:1,name:"green"},{h:45,s:.5,b:1,name:"light turquoise"},{h:45,s:1,b:.5,name:"dark turquoise"},{h:45,s:1,b:1,name:"turquoise"},{h:50,s:0,b:1,name:"light sky blue"},{h:50,s:.5,b:.5,name:"dark cyan"},{h:50,s:.5,b:1,name:"light cyan"},{h:50,s:1,b:.5,name:"dark cyan"},{h:50,s:1,b:1,name:"cyan"},{h:55,s:0,b:1,name:"light sky blue"},{h:55,s:.5,b:1,name:"light sky blue"},{h:55,s:1,b:.5,name:"dark blue"},{h:55,s:1,b:1,name:"sky blue"},{h:60,s:0,b:.5,name:"gray"},{h:60,s:0,b:1,name:"very light blue"},{h:60,s:.5,b:.5,name:"blue"},{h:60,s:.5,b:1,name:"light blue"},{h:60,s:1,b:.5,name:"navy blue"},{h:60,s:1,b:1,name:"blue"},{h:65,s:0,b:1,name:"lavender"}
1,{h:65,s:.5,b:.5,name:"navy blue"},{h:65,s:.5,b:1,name:"light purple"},{h:65,s:1,b:.5,name:"dark navy blue"},{h:65,s:1,b:1,name:"blue"},{h:70,s:0,b:1,name:"lavender"},{h:70,s:.5,b:.5,name:"navy blue"},{h:70,s:.5,b:1,name:"lavender blue"},{h:70,s:1,b:.5,name:"dark navy blue"},{h:70,s:1,b:1,name:"blue"},{h:75,s:.5,b:1,name:"lavender"},{h:75,s:1,b:.5,name:"dark purple"},{h:75,s:1,b:1,name:"purple"},{h:80,s:.5,b:1,name:"pinkish purple"},{h:80,s:1,b:.5,name:"dark purple"},{h:80,s:1,b:1,name:"purple"},{h:85,s:0,b:1,name:"light pink"},{h:85,s:.5,b:.5,name:"purple"},{h:85,s:.5,b:1,name:"light fuchsia"},{h:85,s:1,b:.5,name:"dark fuchsia"},{h:85,s:1,b:1,name:"fuchsia"},{h:90,s:.5,b:.5,name:"dark fuchsia"},{h:90,s:.5,b:1,name:"hot pink"},{h:90,s:1,b:.5,name:"dark fuchsia"},{h:90,s:1,b:1,name:"fuchsia"},{h:95,s:0,b:1,name:"pink"},{h:95,s:.5,b:1,name:"light pink"},{h:95,s:1,b:.5,name:"dark magenta"},{h:95,s:1,b:1,name:"magenta"}];s.default.prototype._rgbColorName=function(t){var r,o,t=i.default._rgbaToHSBA(t),s=[(n=t)[0],t[1],t[2]];0!==s[0]&&(s[0]=Math.round(100*s[0]),(t=s[0].toString().split(""))[o=t.length-1]=parseInt(t[o]),t[o]<2.5?t[o]=0:2.5<=t[o]&&t[o]<7.5&&(t[o]=5),2===t.length?(t[0]=parseInt(t[0]),7.5<=t[o]&&(t[o]=0,t[0]=t[0]+1),s[0]=10*t[0]+t[1]):7.5<=t[o]?s[0]=10:s[0]=t[o]),s[2]=s[2]/255;for(var a=s.length-1;1<=a;a--)s[a]<=.25?s[a]=0:.25<s[a]&&s[a]<.75?s[a]=.5:s[a]=1;if(0===s[0]&&0===s[1]&&1===s[2]){for(var c=2;0<=c;c--)n[c]=Math.round(1e4*n[c])/1e4;for(var d=0;d<l.length;d++){if(l[d].h===n[0]&&l[d].s===n[1]&&l[d].b===n[2]){r=l[d].name;break}r="white"}}else for(var h=0;h<u.length;h++)if(u[h].h===s[0]&&u[h].s===s[1]&&u[h].b===s[2]){r=u[h].name;break}return r},t=s.default,o.default=t},{"../color/color_conversion":268,"../core/main":283,"core-js/modules/es.function.name":174,"core-js/modules/es.object.to-string":190,"core-js/modules/es.regexp.exec":195,"core-js/modules/es.regexp.to-string":196,"core-js/modules/es.string.split":206}],263:[function(t,r,o){"use strict";t("core-js/modules/es.array.concat"),t("core-js/modules/es.regexp.exec"),t("core-js/modules/es.string.ends-with"),t("core-js/modules/es.string.replace"),t("core-js/modules/es.array.concat"),t("core-js/modules/es.regexp.exec"),t("core-js/modules/es.string.ends-with"),t("core-js/modules/es.string.replace"),Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;var n=(t=t("../core/main"))&&t.__esModule?t:{default:t},s="_Description",i="_fallbackDesc",a="_fallbackTable",l="_Label",u="_labelDesc",c="_labelTable";function d(t){if("label"===t||"fallback"===t)throw Error("description should not be LABEL or FALLBACK");return t.endsWith(".")||t.endsWith(";")||t.endsWith(",")||t.endsWith("?")||t.endsWith("!")||(t+="."),t}n.default.prototype.describe=function(t,r){var o;n.default._validateParameters("describe",arguments),"string"==typeof t&&(o=this.canvas.id,t=d(t),this.dummyDOM||(this.dummyDOM=document.getElementById(o).parentNode),this.descriptions||(this.descriptions={}),this.descriptions.fallback?this.descriptions.fallback.innerHTML!==t&&(this.descriptions.fallback.innerHTML=t):this._describeHTML("fallback",t),r===this.LABEL&&(this.descriptions.label?this.descriptions.label.innerHTML!==t&&(this.descriptions.label.innerHTML=t):this._describeHTML("label",t)))},n.default.prototype.describeElement=function(t,r,o){var s,i;n.default._validateParameters("describeElement",arguments),"string"==typeof r&&"string"==typeof t&&(s=this.canvas.id,r=d(r),i=function(t){if("label"===t||"fallback"===t)throw Error("element name should not be LABEL or FALLBACK");return t.endsWith(".")||t.endsWith(";")||t.endsWith(",")?t=t.replace(/.$/,":"):t.endsWith(":")||(t+=":"),t}(t),t=t.replace(/[^a-zA-Z0-9]/g,""),i='<th scope="row">'.concat(i,"</th><td>").concat(r,"</td>"),this.dummyDOM||(this.dummyDOM=document.getElementById(s).parentNode),this.descriptions?this.descriptions.fallbackElements||(this.descriptions.fallbackElements={}):this.descriptions={fallbackElements:{}},this.descriptions.fallbackElements[t]?this.descriptions.fallbackElements[t].innerHTML!==i&&(this.descriptions.fallbackElements[t].innerHTML=i):this._describeElementHTML("fallback",t,i),o===this.LABEL&&(this.descriptions.labelElements||(this.descriptions.labelElements={}),this.descriptions.labelElements[t]?this.descriptions.labelElements[t].innerHTML!==i&&(this.descriptions.labelElements[t].innerHTML=i):this._describeElementHTML("label",t,i)))},n.default.prototype._describeHTML=function(t,r){var o,n=this.canvas.id;"fallback"===t?(this.dummyDOM.querySelector("#".concat(n+s))?this.dummyDOM.querySelector("#"+n+a).insertAdjacentHTML("beforebegin",'<p id="'.concat(n+i,'"></p>')):(o='<div id="'.concat(n).concat(s,'" role="region" aria-label="Canvas Description"><p id="').concat(n).concat(i,'"></p></div>'),this.dummyDOM.querySelector("#".concat(n,"accessibleOutput"))?this.dummyDOM.querySelector("#".concat(n,"accessibleOutput")).insertAdjacentHTML("beforebegin",o):this.dummyDOM.querySelector("#".concat(n)).innerHTML=o),this.descriptions.fallback=this.dummyDOM.querySelector("#".concat(n).concat(i)),this.descriptions.fallback.innerHTML=r):"label"===t&&(this.dummyDOM.querySelector("#".concat(n+l))?this.dummyDOM.querySelector("#".concat(n+c))&&this.dummyDOM.querySelector("#".concat(n+c)).insertAdjacentHTML("beforebegin",'<p id="'.concat(n).concat(u,'"></p>')):(o='<div id="'.concat(n).concat(l,'" class="p5Label"><p id="').concat(n).concat(u,'"></p></div>'),this.dummyDOM.querySelector("#".concat(n,"accessibleOutputLabel"))?this.dummyDOM.querySelector("#".concat(n,"accessibleOutputLabel")).insertAdjacentHTML("beforebegin",o):this.dummyDOM.querySelector("#"+n).insertAdjacentHTML("afterend",o)),this.descriptions.label=this.dummyDOM.querySelector("#"+n+u),this.descriptions.label.innerHTML=r)},n.default.prototype._describeElementHTML=function(t,r,o){var n,d=this.canvas.id;"fallback"===t?(this.dummyDOM.querySelector("#".concat(d+s))?this.dummyDOM.querySelector("#"+d+a)||this.dummyDOM.querySelector("#"+d+i).insertAdjacentHTML("afterend",'<table id="'.concat(d).concat(a,'"><caption>Canvas elements and their descriptions</caption></table>')):(n='<div id="'.concat(d).concat(s,'" role="region" aria-label="Canvas Description"><table id="').concat(d).concat(a,'"><caption>Canvas elements and their descriptions</caption></table></div>'),this.dummyDOM.querySelector("#".concat(d,"accessibleOutput"))?this.dummyDOM.querySelector("#".concat(d,"accessibleOutput")).insertAdjacentHTML("beforebegin",n):this.dummyDOM.querySelector("#"+d).innerHTML=n),(n=document.createElement("tr")).id=d+"_fte_"+r,this.dummyDOM.querySelector("#"+d+a).appendChild(n),this.descriptions.fallbackElements[r]=this.dummyDOM.querySelector("#".concat(d).concat("_fte_").concat(r)),this.descriptions.fallbackElements[r].innerHTML=o):"label"===t&&(this.dummyDOM.querySelector("#".concat(d+l))?this.dummyDOM.querySelector("#".concat(d+c))||this.dummyDOM.querySelector("#"+d+u).insertAdjacentHTML("afterend",'<table id="'.concat(d+c,'"></table>')):(n='<div id="'.concat(d).concat(l,'" class="p5Label"><table id="').concat(d).concat(c,'"></table></div>'),this.dummyDOM.querySelector("#".concat(d,"accessibleOutputLabel"))?this.dummyDOM.querySelector("#".concat(d,"accessibleOutputLabel")).insertAdjacentHTML("beforebegin",n):this.dummyDOM.querySelector("#"+d).insertAdjacentHTML("afterend",n)),(t=document.createElement("tr")).id=d+"_lte_"+r,this.dummyDOM.querySelector("#"+d+c).appendChild(t),this.descriptions.labelElements[r]=this.dummyDOM.querySelector("#".concat(d).concat("_lte_").concat(r)),this.descriptions.labelElements[r].innerHTML=o)},t=n.default,o.default=t}
1,{"../core/main":283,"core-js/modules/es.array.concat":153,"core-js/modules/es.regexp.exec":195,"core-js/modules/es.string.ends-with":198,"core-js/modules/es.string.replace":204}],264:[function(t,r,o){"use strict";t("core-js/modules/es.array.concat"),t("core-js/modules/es.array.from"),t("core-js/modules/es.array.map"),t("core-js/modules/es.string.iterator"),t("core-js/modules/es.array.concat"),t("core-js/modules/es.array.from"),t("core-js/modules/es.array.map"),t("core-js/modules/es.string.iterator"),Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;var n=(t=t("../core/main"))&&t.__esModule?t:{default:t};n.default.prototype._updateGridOutput=function(t){var r,o,s,i,a,l,u,c;this._renderer&&this._renderer instanceof n.default.RendererGL?this._didOutputGridWebGLMessage||(this._didOutputGridWebGLMessage=!0,console.error("gridOutput() does not yet work in WebGL mode.")):this.dummyDOM.querySelector("#".concat(t,"_summary"))&&(r=this._accessibleOutputs[t],a=(o=function(t,r){var o,n="",s="",i=0;for(o in r){var a,l=0;for(a in r[o]){var u='<li id="'.concat(t,"shape").concat(i,'">').concat(r[o][a].color," ").concat(o,",");"line"===o?u+=" location = ".concat(r[o][a].pos,", length = ").concat(r[o][a].length," pixels"):(u+=" location = ".concat(r[o][a].pos),"point"!==o&&(u+=", area = ".concat(r[o][a].area," %")),u+="</li>"),n+=u,l++,i++}s=1<l?"".concat(s," ").concat(l," ").concat(o,"s"):"".concat(s," ").concat(l," ").concat(o)}return{numShapes:[i,s],details:n}}(t,this.ingredients.shapes)).numShapes,l=this.ingredients.colors.background,u=this.width,c=this.height,l="".concat(l," canvas, ").concat(u," by ").concat(c," pixels, contains ").concat(a[0]),s=l=(1===a[0]?"".concat(l," shape: "):"".concat(l," shapes: ")).concat(a[1]),i=function(t,r){var o,n,s=0,i="",a=Array.from(Array(10),function(){return Array(10)});for(o in r)for(var l in r[o]){var u=void 0;u="line"!==o?'<a href="#'.concat(t,"shape").concat(s,'">').concat(r[o][l].color," ").concat(o,"</a>"):'<a href="#'.concat(t,"shape").concat(s,'">').concat(r[o][l].color," ").concat(o," midpoint</a>"),r[o][l].loc.locY<a.length&&r[o][l].loc.locX<a[r[o][l].loc.locY].length&&(a[r[o][l].loc.locY][r[o][l].loc.locX]?a[r[o][l].loc.locY][r[o][l].loc.locX]=a[r[o][l].loc.locY][r[o][l].loc.locX]+" "+u:a[r[o][l].loc.locY][r[o][l].loc.locX]=u,s++)}for(n in a){var c,d="<tr>";for(c in a[n])d+="<td>",void 0!==a[n][c]&&(d+=a[n][c]),d+="</td>";i=i+d+"</tr>"}return i}(t,this.ingredients.shapes),s!==r.summary.innerHTML&&(r.summary.innerHTML=s),i!==r.map.innerHTML&&(r.map.innerHTML=i),o.details!==r.shapeDetails.innerHTML&&(r.shapeDetails.innerHTML=o.details),this._accessibleOutputs[t]=r)},t=n.default,o.default=t},{"../core/main":283,"core-js/modules/es.array.concat":153,"core-js/modules/es.array.from":162,"core-js/modules/es.array.map":168,"core-js/modules/es.string.iterator":200}],265:[function(t,r,o){"use strict";t("core-js/modules/es.symbol"),t("core-js/modules/es.symbol.description"),t("core-js/modules/es.symbol.iterator"),t("core-js/modules/es.array.concat"),t("core-js/modules/es.array.fill"),t("core-js/modules/es.array.from"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.array.map"),t("core-js/modules/es.number.to-fixed"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.regexp.to-string"),t("core-js/modules/es.string.iterator"),t("core-js/modules/web.dom-collections.iterator"),t("core-js/modules/es.array.concat"),t("core-js/modules/es.array.fill"),t("core-js/modules/es.array.map"),t("core-js/modules/es.number.to-fixed"),Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;var n=(t=t("../core/main"))&&t.__esModule?t:{default:t};function s(t,r,o){var n=t[0],t=t[1],n=Math.floor(n/r*10),r=Math.floor(t/o*10);return{locX:Math.min(Math.max(n,0),9),locY:Math.min(Math.max(r,0),9)}}n.default.prototype.textOutput=function(t){n.default._validateParameters("textOutput",arguments),this._accessibleOutputs.text||(this._accessibleOutputs.text=!0,this._createOutput("textOutput","Fallback"),t===this.LABEL&&(this._accessibleOutputs.textLabel=!0,this._createOutput("textOutput","Label")))},n.default.prototype.gridOutput=function(t){n.default._validateParameters("gridOutput",arguments),this._accessibleOutputs.grid||(this._accessibleOutputs.grid=!0,this._createOutput("gridOutput","Fallback"),t===this.LABEL&&(this._accessibleOutputs.gridLabel=!0,this._createOutput("gridOutput","Label")))},n.default.prototype._addAccsOutput=function(){return this._accessibleOutputs||(this._accessibleOutputs={text:!1,grid:!1,textLabel:!1,gridLabel:!1}),this._accessibleOutputs.grid||this._accessibleOutputs.text},n.default.prototype._createOutput=function(t,r){var o,n,s,i=this.canvas.id,a=(this.ingredients||(this.ingredients={shapes:{},colors:{background:"white",fill:"white",stroke:"black"}
1,pShapes:"",pBackground:""}),this.dummyDOM||(this.dummyDOM=document.getElementById(i).parentNode),"");"Fallback"===r?(o=i+t,this.dummyDOM.querySelector("#".concat(n=i+"accessibleOutput"))||(this.dummyDOM.querySelector("#".concat(i,"_Description"))?this.dummyDOM.querySelector("#".concat(i,"_Description")).insertAdjacentHTML("afterend",'<div id="'.concat(n,'" role="region" aria-label="Canvas Outputs"></div>')):this.dummyDOM.querySelector("#".concat(i)).innerHTML='<div id="'.concat(n,'" role="region" aria-label="Canvas Outputs"></div>'))):"Label"===r&&(o=i+t+(a=r),this.dummyDOM.querySelector("#".concat(n=i+"accessibleOutput"+r))||(this.dummyDOM.querySelector("#".concat(i,"_Label"))?this.dummyDOM.querySelector("#".concat(i,"_Label")):this.dummyDOM.querySelector("#".concat(i))).insertAdjacentHTML("afterend",'<div id="'.concat(n,'"></div>'))),this._accessibleOutputs[o]={},"textOutput"===t?(a="#".concat(i,"gridOutput").concat(a),s='<div id="'.concat(o,'">Text Output<div id="').concat(o,'Summary" aria-label="text output summary"><p id="').concat(o,'_summary"></p><ul id="').concat(o,'_list"></ul></div><table id="').concat(o,'_shapeDetails" summary="text output shape details"></table></div>'),this.dummyDOM.querySelector(a)?this.dummyDOM.querySelector(a).insertAdjacentHTML("beforebegin",s):this.dummyDOM.querySelector("#".concat(n)).innerHTML=s,this._accessibleOutputs[o].list=this.dummyDOM.querySelector("#".concat(o,"_list"))):"gridOutput"===t&&(a="#".concat(i,"textOutput").concat(a),s='<div id="'.concat(o,'">Grid Output<p id="').concat(o,'_summary" aria-label="grid output summary"><table id="').concat(o,'_map" summary="grid output content"></table><ul id="').concat(o,'_shapeDetails" aria-label="grid output shape details"></ul></div>'),this.dummyDOM.querySelector(a)?this.dummyDOM.querySelector(a).insertAdjacentHTML("afterend",s):this.dummyDOM.querySelector("#".concat(n)).innerHTML=s,this._accessibleOutputs[o].map=this.dummyDOM.querySelector("#".concat(o,"_map"))),this._accessibleOutputs[o].shapeDetails=this.dummyDOM.querySelector("#".concat(o,"_shapeDetails")),this._accessibleOutputs[o].summary=this.dummyDOM.querySelector("#".concat(o,"_summary"))},n.default.prototype._updateAccsOutput=function(){var t=this.canvas.id;JSON.stringify(this.ingredients.shapes)===this.ingredients.pShapes&&this.ingredients.colors.background===this.ingredients.pBackground||(this.ingredients.pShapes=JSON.stringify(this.ingredients.shapes),this._accessibleOutputs.text&&this._updateTextOutput(t+"textOutput"),this._accessibleOutputs.grid&&this._updateGridOutput(t+"gridOutput"),this._accessibleOutputs.textLabel&&this._updateTextOutput(t+"textOutputLabel"),this._accessibleOutputs.gridLabel&&this._updateGridOutput(t+"gridOutputLabel"))},n.default.prototype._accsBackground=function(t){this.ingredients.pShapes=JSON.stringify(this.ingredients.shapes),this.ingredients.pBackground=this.ingredients.colors.background,this.ingredients.shapes={},this.ingredients.colors.backgroundRGBA!==t&&(this.ingredients.colors.backgroundRGBA=t,this.ingredients.colors.background=this._rgbColorName(t))},n.default.prototype._accsCanvasColors=function(t,r){"fill"===t?this.ingredients.colors.fillRGBA!==r&&(this.ingredients.colors.fillRGBA=r,this.ingredients.colors.fill=this._rgbColorName(r)):"stroke"===t&&this.ingredients.colors.strokeRGBA!==r&&(this.ingredients.colors.strokeRGBA=r,this.ingredients.colors.stroke=this._rgbColorName(r))},n.default.prototype._accsOutput=function(t,r){"ellipse"===t&&r[2]===r[3]?t="circle":"rectangle"===t&&r[2]===r[3]&&(t="square");var o,n,i,a,l={},u=!0,c=(o="rectangle"===(o=t)||"ellipse"===o||"arc"===o||"circle"===o||"square"===o?(n=Math.round(r[0]+r[2]/2),Math.round(r[1]+r[3]/2)):"triangle"===o?(n=(r[0]+r[2]+r[4])/3,(r[1]+r[3]+r[5])/3):"quadrilateral"===o?(n=(r[0]+r[2]+r[4]+r[6])/4,(r[1]+r[3]+r[5]+r[7])/4):"line"===o?(n=(r[0]+r[2])/2,(r[1]+r[3])/2):(n=r[0],r[1]),[n,o]);if("line"===t?(l.color=this.ingredients.colors.stroke,l.length=Math.round(this.dist(r[0],r[1],r[2],r[3])),i=this._getPos(r[0],[1]),a=this._getPos(r[2],[3]),l.loc=s(c,this.width,this.height),l.pos=i===a?"at ".concat(i):"from ".concat(i," to ").concat(a)):("point"===t?l.color=this.ingredients.colors.stroke:(l.color=this.ingredients.colors.fill,l.area=this._getArea(t,r)),l.pos=this._getPos.apply(this,function(t){if(Array.isArray(t)){for(var r=0,o=Array(t.length);r<t.length;r++)o[r]=t[r];return o}}(c)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(c)||function(){throw TypeError("Invalid attempt to spread non-iterable instance")}()),l.loc=s(c,this.width,this.height)),this.ingredients.shapes[t]){for(var d in this.ingredients.shapes[t])JSON.stringify(this.ingredients.shapes[t][d])===JSON.stringify(l)&&(u=!1);!0===u&&this.ingredients.shapes[t].push(l)}else this.ingredients.shapes[t]=[l]},n.default.prototype._getPos=function(t,r){var t=new DOMPointReadOnly(t,r),r=this._renderer.isP3D?new DOMMatrix(this._renderer.uMVMatrix.mat4):this.drawingContext.getTransform(),t=t.matrixTransform(r),r=t.x,t=t.y,o=this.width*this._pixelDensity,n=this.height*this._pixelDensity;
1return r<.4*o?t<.4*n?"top left":.6*n<t?"bottom left":"mid left":.6*o<r?t<.4*n?"top right":.6*n<t?"bottom right":"mid right":t<.4*n?"top middle":.6*n<t?"bottom middle":"middle"},n.default.prototype._getArea=function(t,r){var o,n,s=0,i=("arc"===t?(s=(o=((r[5]-r[4])%(2*Math.PI)+2*Math.PI)%(2*Math.PI))*r[2]*r[3]/8,"open"!==r[6]&&"chord"!==r[6]||(n=r[0],c=r[1],i=r[0]+r[2]/2*Math.cos(r[4]).toFixed(2),d=r[1]+r[3]/2*Math.sin(r[4]).toFixed(2),l=r[0]+r[2]/2*Math.cos(r[5]).toFixed(2),n=Math.abs(n*(d-(a=r[1]+r[3]/2*Math.sin(r[5]).toFixed(2)))+i*(a-c)+l*(c-d))/2,o>Math.PI?s+=n:s-=n)):"ellipse"===t||"circle"===t?s=3.14*r[2]/2*r[3]/2:"line"===t||"point"===t?s=0:"quadrilateral"===t?s=Math.abs((r[6]+r[0])*(r[7]-r[1])+(r[0]+r[2])*(r[1]-r[3])+(r[2]+r[4])*(r[3]-r[5])+(r[4]+r[6])*(r[5]-r[7]))/2:"rectangle"===t||"square"===t?s=r[2]*r[3]:"triangle"===t&&(s=Math.abs(r[0]*(r[3]-r[5])+r[2]*(r[5]-r[1])+r[4]*(r[1]-r[3]))/2),this.width*this._pixelDensity),a=this.height*this._pixelDensity,l=[new DOMPoint(0,0),new DOMPoint(i,0),new DOMPoint(i,a),new DOMPoint(0,a)],u=(this._renderer.isP3D?new DOMMatrix(this._renderer.uMVMatrix.mat4):this.drawingContext.getTransform()).inverse(),c=l.map(function(t){return t.matrixTransform(u)}),d=Math.abs((c[3].x+c[0].x)*(c[3].y-c[0].y)+(c[0].x+c[1].x)*(c[0].y-c[1].y)+(c[1].x+c[2].x)*(c[1].y-c[2].y)+(c[2].x+c[3].x)*(c[2].y-c[3].y))/2;return Math.round(100*s/d)},t=n.default,o.default=t},{"../core/main":283,"core-js/modules/es.array.concat":153,"core-js/modules/es.array.fill":156,"core-js/modules/es.array.from":162,"core-js/modules/es.array.iterator":165,"core-js/modules/es.array.map":168,"core-js/modules/es.number.to-fixed":182,"core-js/modules/es.object.to-string":190,"core-js/modules/es.regexp.to-string":196,"core-js/modules/es.string.iterator":200,"core-js/modules/es.symbol":212,"core-js/modules/es.symbol.description":210,"core-js/modules/es.symbol.iterator":211,"core-js/modules/web.dom-collections.iterator":246}],266:[function(t,r,o){"use strict";t("core-js/modules/es.array.concat"),t("core-js/modules/es.array.concat"),Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;var n=(t=t("../core/main"))&&t.__esModule?t:{default:t};n.default.prototype._updateTextOutput=function(t){var r,o,s,i,a,l,u,c;this._renderer&&this._renderer instanceof n.default.RendererGL?this._didOutputTextWebGLMessage||(this._didOutputTextWebGLMessage=!0,console.error("textOutput() does not yet work in WebGL mode.")):this.dummyDOM.querySelector("#".concat(t,"_summary"))&&(r=this._accessibleOutputs[t],a=(o=function(t,r){var o,n="",s=0;for(o in r)for(var i in r[o]){var a='<li><a href="#'.concat(t,"shape").concat(s,'">').concat(r[o][i].color," ").concat(o,"</a>");"line"===o?a+=", ".concat(r[o][i].pos,", ").concat(r[o][i].length," pixels long.</li>"):(a+=", at ".concat(r[o][i].pos),"point"!==o&&(a+=", covering ".concat(r[o][i].area,"% of the canvas")),a+=".</li>"),n+=a,s++}return{numShapes:s,listShapes:n}}(t,this.ingredients.shapes)).numShapes,l=this.ingredients.colors.background,u=this.width,c=this.height,u="Your output is a, ".concat(u," by ").concat(c," pixels, ").concat(l," canvas containing the following"),s=u=1===a?"".concat(u," shape:"):"".concat(u," ").concat(a," shapes:"),i=function(t,r){var o,n="",s=0;for(o in r)for(var i in r[o]){var a='<tr id="'.concat(t,"shape").concat(s,'"><th>').concat(r[o][i].color," ").concat(o,"</th>");"line"===o?a+="<td>location = ".concat(r[o][i].pos,"</td><td>length = ").concat(r[o][i].length," pixels</td></tr>"):(a+="<td>location = ".concat(r[o][i].pos,"</td>"),"point"!==o&&(a+="<td> area = ".concat(r[o][i].area,"%</td>")),a+="</tr>"),n+=a,s++}return n}(t,this.ingredients.shapes),s!==r.summary.innerHTML&&(r.summary.innerHTML=s),o.listShapes!==r.list.innerHTML&&(r.list.innerHTML=o.listShapes),i!==r.shapeDetails.innerHTML&&(r.shapeDetails.innerHTML=i),this._accessibleOutputs[t]=r)},t=n.default,o.default=t},{"../core/main":283,"core-js/modules/es.array.concat":153}],267:[function(t,r,o){"use strict";var n=(n=t("./core/main"))&&n.__esModule?n:{default:n};t("./core/constants"),t("./core/environment"),t("./core/friendly_errors/stacktrace"),t("./core/friendly_errors/validate_params"),t("./core/friendly_errors/file_errors"),t("./core/friendly_errors/fes_core"),t("./core/friendly_errors/sketch_reader"),t("./core/helpers"),t("./core/legacy"),t("./core/preload"),t("./core/p5.Element"),t("./core/p5.Graphics"),t("./core/p5.Renderer"),t("./core/p5.Renderer2D"),t("./core/rendering"),t("./core/shim"),t("./core/structure"),t("./core/transform"),t("./core/shape/2d_primitives"),t("./core/shape/attributes"),t("./core/shape/curves"),t("./core/shape/vertex"),t("./accessibility/outputs"),t("./accessibility/textOutput"),t("./accessibility/gridOutput"),t("./accessibility/color_namer"),t("./color/color_conversion"),t("./color/creating_reading"),t("./color/p5.Color"),t("./color/setting"),t("./data/p5.TypedDict"),t("./data/local_storage.js"),t("./dom/dom"),t("./accessibility/describe"),t("./events/acceleration"),t("./events/keyboard"),t("./events/mouse"),t("./events/touch"),t("./image/filters"),t("./image/image"),t("./image/loading_displaying"),t("./image/p5.Image"),t("./image/pixels"),t("./io/files"),t("./io/p5.Table"),t("./io/p5.TableRow"),t("./io/p5.XML"),t("./math/calculation"),t("./math/math"),t("./math/noise"),t("./math/p5.Vector"),t("./math/random"),t("./math/trigonometry"),t("./typography/attributes"),t("./typography/loading_displaying"),t("./typography/p5.Font"),t("./utilities/array_functions"),t("./utilities/conversion"),t("./utilities/string_functions"),t("./utilities/time_date"),t("./webgl/3d_primitives"),t("./webgl/interaction"),t("./webgl/light"),t("./webgl/loading"),t("./webgl/material"),t("./webgl/p5.Camera"),t("./webgl/p5.DataArray"),t("./webgl/p5.Geometry"),t("./webgl/p5.Matrix"),t("./webgl/p5.Quat"),t("./webgl/p5.RendererGL.Immediate"),t("./webgl/p5.RendererGL"),t("./webgl/p5.RendererGL.Retained"),t("./webgl/p5.Framebuffer"),t("./webgl/p5.Shader"),t("./webgl/p5.RenderBuffer"),t("./webgl/p5.Texture"),t("./webgl/text"),t("./core/init"),r.exports=n.default},{"./accessibility/color_namer":262,"./accessibility/describe":263,"./accessibility/gridOutput":264,"./accessibility/outputs":265,"./accessibility/textOutput":266,"./color/color_conversion":268,"./color/creating_reading":269,"./color/p5.Color":270,"./color/setting":271,"./core/constants":272,"./core/environment":273,"./core/friendly_errors/fes_core":274,"./core/friendly_errors/file_errors":275,"./core/friendly_errors/sketch_reader":276,"./core/friendly_errors/stacktrace":277,"./core/friendly_errors/validate_params":278,"./core/helpers":279,"./core/init":280,"./core/legacy":282,"./core/main":283,"./core/p5.Element":284,"./core/p5.Graphics":285,"./core/p5.Renderer":286,"./core/p5.Renderer2D":287,"./core/preload":288,"./core/rendering":289,"./core/shape/2d_primitives":290,"./core/shape/attributes":291,"./core/shape/curves":292,"./core/shape/vertex":293,"./core/shim":294,"./core/structure":295,"./core/transform":296,"./data/local_storage.js":297,"./data/p5.TypedDict":298,"./dom/dom":299,"./events/acceleration":300,"./events/keyboard":301,"./events/mouse":302,"./events/touch":303,"./image/filters":304,"./image/image":305,"./image/loading_displaying":306,"./image/p5.Image":307,"./image/pixels":308,"./io/files":309,"./io/p5.Table":310,"./io/p5.TableRow":311,"./io/p5.XML":312,"./math/calculation":313,"./math/math":314,"./math/noise":315,"./math/p5.Vector":316,"./math/random":317,"./math/trigonometry":318,"./typography/attributes":319,"./typography/loading_displaying":320,"./typography/p5.Font":321,"./utilities/array_functions":322,"./ut
1ilities/conversion":323,"./utilities/string_functions":324,"./utilities/time_date":325,"./webgl/3d_primitives":326,"./webgl/interaction":328,"./webgl/light":329,"./webgl/loading":330,"./webgl/material":331,"./webgl/p5.Camera":332,"./webgl/p5.DataArray":333,"./webgl/p5.Framebuffer":334,"./webgl/p5.Geometry":335,"./webgl/p5.Matrix":336,"./webgl/p5.Quat":337,"./webgl/p5.RenderBuffer":338,"./webgl/p5.RendererGL":341,"./webgl/p5.RendererGL.Immediate":339,"./webgl/p5.RendererGL.Retained":340,"./webgl/p5.Shader":342,"./webgl/p5.Texture":343,"./webgl/text":344}],268:[function(t,r,o){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,(t=(t=t("../core/main"))&&t.__esModule?t:{default:t}).default.ColorConversion={_hsbaToHSLA:function(t){var r=t[0],o=t[1],n=t[2],s=(2-o)*n/2;return 0!=s&&(1==s?o=0:s<.5?o/=2-o:o=o*n/(2-2*s)),[r,o,s,t[3]]},_hsbaToRGBA:function(t){var r,o,n,s,i,a=6*t[0],l=t[1],u=t[2];return 0===l?[u,u,u,t[3]]:(o=u*(1-l),n=u*(1-l*(a-(r=Math.floor(a)))),l=u*(1-l*(1+r-a)),a=1===r?(s=n,i=u,o):2===r?(s=o,i=u,l):3===r?(s=o,i=n,u):4===r?(s=l,i=o,u):5===r?(s=u,i=o,n):(s=u,i=l,o),[s,i,a,t[3]])},_hslaToHSBA:function(t){var r=t[0],o=t[1],n=t[2],s=n<.5?(1+o)*n:n+o-n*o;return[r,o=2*(s-n)/s,s,t[3]]},_hslaToRGBA:function(t){var r,o=6*t[0],n=t[1],s=t[2];return 0===n?[s,s,s,t[3]]:[(r=function(t,r,o){return t<0?t+=6:6<=t&&(t-=6),t<1?r+(o-r)*t:t<3?o:t<4?r+(o-r)*(4-t):r})(2+o,n=2*s-(s=s<.5?(1+n)*s:s+n-s*n),s),r(o,n,s),r(o-2,n,s),t[3]]},_rgbaToHSBA:function(t){var r,o,n=t[0],s=t[1],i=t[2],a=Math.max(n,s,i),l=a-Math.min(n,s,i);return 0==l?o=r=0:(o=l/a,n===a?r=(s-i)/l:s===a?r=2+(i-n)/l:i===a&&(r=4+(n-s)/l),r<0?r+=6:6<=r&&(r-=6)),[r/6,o,a,t[3]]},_rgbaToHSLA:function(t){var r,o,n=t[0],s=t[1],i=t[2],a=Math.max(n,s,i),l=Math.min(n,s,i),u=a+l,l=a-l;return 0==l?o=r=0:(o=u<1?l/u:l/(2-u),n===a?r=(s-i)/l:s===a?r=2+(i-n)/l:i===a&&(r=4+(n-s)/l),r<0?r+=6:6<=r&&(r-=6)),[r/6,o,u/2,t[3]]}},t=t.default.ColorConversion,o.default=t},{"../core/main":283}],269:[function(t,r,o){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function s(t){return(s="function"==typeof Symbol&&"symbol"===n(Symbol.iterator)?function(t){return n(t)}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":n(t)})(t)}t("core-js/modules/es.symbol"),t("core-js/modules/es.symbol.description"),t("core-js/modules/es.symbol.iterator"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.array.map"),t("core-js/modules/es.object.get-own-property-descriptor"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.string.iterator"),t("core-js/modules/es.weak-map"),t("core-js/modules/web.dom-collections.iterator"),t("core-js/modules/es.array.map"),Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;var i=(u=t("../core/main"))&&u.__esModule?u:{default:u},a=function(t){if(t&&t.__esModule)return t;if(null===t||"object"!==s(t)&&"function"!=typeof t)return{default:t};var r,o=l();if(o&&o.has(t))return o.get(t);var n,i={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(n in t)Object.prototype.hasOwnProperty.call(t,n)&&((r=a?Object.getOwnPropertyDescriptor(t,n):null)&&(r.get||r.set)?Object.defineProperty(i,n,r):i[n]=t[n]);return i.default=t,o&&o.set(t,i),i}(t("../core/constants"));function l(){var t;return"function"!=typeof WeakMap?null:(t=new WeakMap,l=function(){return t},t)}t("./p5.Color"),t("../core/friendly_errors/validate_params"),t("../core/friendly_errors/file_errors"),t("../core/friendly_errors/fes_core"),i.default.prototype.alpha=function(t){return i.default._validateParameters("alpha",arguments),this.color(t)._getAlpha()},i.default.prototype.blue=function(t){return i.default._validateParameters("blue",arguments),this.color(t)._getBlue()},i.default.prototype.brightness=function(t){return i.default._validateParameters("brightness",arguments),this.color(t)._getBrightness()},i.default.prototype.color=function(){for(var t,r=arguments.length,o=Array(r),n=0;n<r;n++)o[n]=arguments[n];return i.default._validateParameters("color",o),o[0]instanceof i.default.Color?o[0]:(t=Array.isArray(o[0])?o[0]:o,new i.default.Color(this,t))},i.default.prototype.green=function(t){return i.default._validateParameters("green",arguments),this.color(t)._getGreen()},i.default.prototype.hue=function(t){return i.default._validateParameters("hue",arguments),this.color(t)._getHue()},i.default.prototype.lerpColor=function(t,r,o){i.default._validateParameters("lerpColor",arguments),t instanceof i.default.Color||(t=color(t)),r instanceof i.default.Color||(r=color
1(r));var n,s,l,u=this._colorMode,c=this._colorMaxes;if(u===a.RGB)s=t.levels.map(function(t){return t/255}),l=r.levels.map(function(t){return t/255});else if(u===a.HSB)t._getBrightness(),r._getBrightness(),s=t.hsba,l=r.hsba;else{if(u!==a.HSL)throw Error("".concat(u," cannot be used for interpolation."));t._getLightness(),r._getLightness(),s=t.hsla,l=r.hsla}return o=Math.max(Math.min(o,1),0),void 0===this.lerp&&(this.lerp=function(t,r,o){return o*(r-t)+t}),u===a.RGB?n=this.lerp(s[0],l[0],o):(.5<Math.abs(s[0]-l[0])&&(s[0]>l[0]?l[0]+=1:s[0]+=1),1<=(n=this.lerp(s[0],l[0],o))&&--n),t=this.lerp(s[1],l[1],o),r=this.lerp(s[2],l[2],o),s=this.lerp(s[3],l[3],o),n*=c[u][0],t*=c[u][1],r*=c[u][2],s*=c[u][3],this.color(n,t,r,s)},i.default.prototype.paletteLerp=function(t,r){var o=t[0];if(r<o[1])return this.color(o[0]);for(var n=1;n<t.length;n++){var s,i=t[n];if(r<i[1])return s=t[n-1],this.lerpColor(this.color(s[0]),this.color(i[0]),(r-s[1])/(i[1]-s[1]))}return this.color(t[t.length-1][0])},i.default.prototype.lightness=function(t){return i.default._validateParameters("lightness",arguments),this.color(t)._getLightness()},i.default.prototype.red=function(t){return i.default._validateParameters("red",arguments),this.color(t)._getRed()},i.default.prototype.saturation=function(t){return i.default._validateParameters("saturation",arguments),this.color(t)._getSaturation()};var u=i.default;o.default=u},{"../core/constants":272,"../core/friendly_errors/fes_core":274,"../core/friendly_errors/file_errors":275,"../core/friendly_errors/validate_params":278,"../core/main":283,"./p5.Color":270,"core-js/modules/es.array.iterator":165,"core-js/modules/es.array.map":168,"core-js/modules/es.object.get-own-property-descriptor":186,"core-js/modules/es.object.to-string":190,"core-js/modules/es.string.iterator":200,"core-js/modules/es.symbol":212,"core-js/modules/es.symbol.description":210,"core-js/modules/es.symbol.iterator":211,"core-js/modules/es.weak-map":244,"core-js/modules/web.dom-collections.iterator":246}],270:[function(t,r,o){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function s(t){return(s="function"==typeof Symbol&&"symbol"===n(Symbol.iterator)?function(t){return n(t)}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":n(t)})(t)}t("core-js/modules/es.symbol"),t("core-js/modules/es.symbol.description"),t("core-js/modules/es.symbol.iterator"),t("core-js/modules/es.array.includes"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.array.join"),t("core-js/modules/es.array.map"),t("core-js/modules/es.array.slice"),t("core-js/modules/es.object.get-own-property-descriptor"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.regexp.constructor"),t("core-js/modules/es.regexp.exec"),t("core-js/modules/es.regexp.to-string"),t("core-js/modules/es.string.includes"),t("core-js/modules/es.string.iterator"),t("core-js/modules/es.string.trim"),t("core-js/modules/es.weak-map"),t("core-js/modules/web.dom-collections.iterator"),t("core-js/modules/es.array.includes"),t("core-js/modules/es.array.join"),t("core-js/modules/es.array.map"),t("core-js/modules/es.array.slice"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.regexp.constructor"),t("core-js/modules/es.regexp.exec"),t("core-js/modules/es.regexp.to-string"),t("core-js/modules/es.string.includes"),t("core-js/modules/es.string.trim"),Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;var i=c(t("../core/main")),a=function(t){if(t&&t.__esModule)return t;if(null===t||"object"!==s(t)&&"function"!=typeof t)return{default:t};var r,o=u();if(o&&o.has(t))return o.get(t);var n,i={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(n in t)Object.prototype.hasOwnProperty.call(t,n)&&((r=a?Object.getOwnPropertyDescriptor(t,n):null)&&(r.get||r.set)?Object.defineProperty(i,n,r):i[n]=t[n]);return i.default=t,o&&o.set(t,i),i}(t("../core/constants")),l=c(t("./color_conversion"));function u(){var t;return"function"!=typeof WeakMap?null:(t=new WeakMap,u=function(){return t},t)}function c(t){return t&&t.__esModule?t:{default:t}}function d(t,r){for(var o=0;o<r.length;o++){var n=r[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var h={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",s
1almon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},t=/\s*/,f=/(\d{1,3})/,p=/((?:\d+(?:\.\d+)?)|(?:\.\d+))/,m=new RegExp("".concat(p.source,"%")),y={HEX3:/^#([a-f0-9])([a-f0-9])([a-f0-9])$/i,HEX4:/^#([a-f0-9])([a-f0-9])([a-f0-9])([a-f0-9])$/i,HEX6:/^#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})$/i,HEX8:/^#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})$/i,RGB:RegExp(["^rgb\\(",f.source,",",f.source,",",f.source,"\\)$"].join(t.source),"i"),RGB_PERCENT:RegExp(["^rgb\\(",m.source,",",m.source,",",m.source,"\\)$"].join(t.source),"i"),RGBA:RegExp(["^rgba\\(",f.source,",",f.source,",",f.source,",",p.source,"\\)$"].join(t.source),"i"),RGBA_PERCENT:RegExp(["^rgba\\(",m.source,",",m.source,",",m.source,",",p.source,"\\)$"].join(t.source),"i"),HSL:RegExp(["^hsl\\(",f.source,",",m.source,",",m.source,"\\)$"].join(t.source),"i"),HSLA:RegExp(["^hsla\\(",f.source,",",m.source,",",m.source,",",p.source,"\\)$"].join(t.source),"i"),HSB:RegExp(["^hsb\\(",f.source,",",m.source,",",m.source,"\\)$"].join(t.source),"i"),HSBA:RegExp(["^hsba\\(",f.source,",",m.source,",",m.source,",",p.source,"\\)$"].join(t.source),"i")},f=(i.default.Color=function(){var t,r;function o(t,r){if(!(this instanceof o))throw TypeError("Cannot call a class as a function");if(this._storeModeAndMaxes(t._colorMode,t._colorMaxes),![a.RGB,a.HSL,a.HSB].includes(this.mode))throw Error("".concat(this.mode," is an invalid colorMode."));this._array=o._parseInputs.apply(this,r),this._calculateLevels()}return r=[{key:"_parseInputs",value:function(t,r,n,s){var i,u=arguments.length,c=this.mode,d=this.maxes[c],f=[];if(3<=u){for(f[0]=t/d[0],f[1]=r/d[1],f[2]=n/d[2],f[3]="number"==typeof s?s/d[3]:1,i=f.length-1;0<=i;--i){var p=f[i];p<0?f[i]=0:1<p&&(f[i]=1)}return c===a.HSL?l.default._hslaToRGBA(f):c===a.HSB?l.default._hsbaToRGBA(f):f}if(1===u&&"string"==typeof t){if(h[n=t.trim().toLowerCase()])return o._parseInputs.call(this,h[n]);if(y.HEX3.test(n))return(f=y.HEX3.exec(n).slice(1).map(function(t){return parseInt(t+t,16)/255}))[3]=1,f;if(y.HEX6.test(n))return(f=y.HEX6.exec(n).slice(1).map(function(t){return parseInt(t,16)/255}))[3]=1,f;if(y.HEX4.test(n))return y.HEX4.exec(n).slice(1).map(function(t){return parseInt(t+t,16)/255});if(y.HEX8.test(n))return y.HEX8.exec(n).slice(1).map(function(t){return parseInt(t,16)/255});if(y.RGB.test(n))return(f=y.RGB.exec(n).slice(1).map(function(t){return t/255}))[3]=1,f;if(y.RGB_PERCENT.test(n))return(f=y.RGB_PERCENT.exec(n).slice(1).map(function(t){return parseFloat(t)/100}))[3]=1,f;if(y.RGBA.test(n))return y.RGBA.exec(n).slice(1).map(function(t,r){return 3===r?parseFloat(t):t/255});if(y.RGBA_PERCENT.test(n))return y.RGBA_PERCENT.exec(n).slice(1).map(function(t,r){return 3===r?parseFloat(t):parseFloat(t)/100});if(y.HSL.test(n)?(f=y.HSL.exec(n).slice(1).map(function(t,r){return 0===r?parseInt(t,10)/360:parseInt(t,10)/100}))[3]=1:y.HSLA.test(n)&&(f=y.HSLA.exec(n).slice(1).map(function(t,r){return 0===r?parseInt(t,10)/360:3===r?parseFloat(t):parseInt(t,10)/100})),(f=f.map(function(t){return Math.max(Math.min(t,1),0)})).length)return l.default._hslaToRGBA(f);if(y.HSB.test(n)?(f=y.HSB.exec(n).slice(1).map(function(t,r){return 0===r?parseInt(t,10)/360:parseInt(t,10)/100}))[3]=1:y.HSBA.test(n)&&(f=y.HSBA.exec(n).slice(1).map(function(t,r){return 0===r?parseInt(t,10)/360:3===r?parseFloat(t):parseInt(t,10)/100})),f.length){for(i=f.length-1;0<=i;--i)f[i]=Math.max(Math.min(f[i],1),0);return l.default._hsbaToRGBA(f)}f=[1,1,1,1]}else{if(1!==u&&2!==u||"number"!=typeof t)throw Error("".concat(arguments,"is not a valid color representation."));f[0]=t/d[2],f[1]=t/d[2],f[2]=t/d[2],f[3]="number"==typeof r?r/d[3]:1,f=f.map(function(t){return Math.max(Math.min(t,1),0)})}return f}}],t=[{key:"toString",value:function(t){var r=this.levels,o=this._array,n=o[3];
1switch(t){case"#rrggbb":return"#".concat(r[0]<16?"0".concat(r[0].toString(16)):r[0].toString(16),r[1]<16?"0".concat(r[1].toString(16)):r[1].toString(16),r[2]<16?"0".concat(r[2].toString(16)):r[2].toString(16));case"#rrggbbaa":return"#".concat(r[0]<16?"0".concat(r[0].toString(16)):r[0].toString(16),r[1]<16?"0".concat(r[1].toString(16)):r[1].toString(16),r[2]<16?"0".concat(r[2].toString(16)):r[2].toString(16),r[3]<16?"0".concat(r[3].toString(16)):r[3].toString(16));case"#rgb":return"#".concat(Math.round(15*o[0]).toString(16),Math.round(15*o[1]).toString(16),Math.round(15*o[2]).toString(16));case"#rgba":return"#".concat(Math.round(15*o[0]).toString(16),Math.round(15*o[1]).toString(16),Math.round(15*o[2]).toString(16),Math.round(15*o[3]).toString(16));case"rgb":return"rgb(".concat(r[0],", ",r[1],", ",r[2],")");case"rgb%":return"rgb(".concat((100*o[0]).toPrecision(3),"%, ",(100*o[1]).toPrecision(3),"%, ",(100*o[2]).toPrecision(3),"%)");case"rgba%":return"rgba(".concat((100*o[0]).toPrecision(3),"%, ",(100*o[1]).toPrecision(3),"%, ",(100*o[2]).toPrecision(3),"%, ",(100*o[3]).toPrecision(3),"%)");case"hsb":case"hsv":return this.hsba||(this.hsba=l.default._rgbaToHSBA(this._array)),"hsb(".concat(this.hsba[0]*this.maxes[a.HSB][0],", ",this.hsba[1]*this.maxes[a.HSB][1],", ",this.hsba[2]*this.maxes[a.HSB][2],")");case"hsb%":case"hsv%":return this.hsba||(this.hsba=l.default._rgbaToHSBA(this._array)),"hsb(".concat((100*this.hsba[0]).toPrecision(3),"%, ",(100*this.hsba[1]).toPrecision(3),"%, ",(100*this.hsba[2]).toPrecision(3),"%)");case"hsba":case"hsva":return this.hsba||(this.hsba=l.default._rgbaToHSBA(this._array)),"hsba(".concat(this.hsba[0]*this.maxes[a.HSB][0],", ",this.hsba[1]*this.maxes[a.HSB][1],", ",this.hsba[2]*this.maxes[a.HSB][2],", ",n,")");case"hsba%":case"hsva%":return this.hsba||(this.hsba=l.default._rgbaToHSBA(this._array)),"hsba(".concat((100*this.hsba[0]).toPrecision(3),"%, ",(100*this.hsba[1]).toPrecision(3),"%, ",(100*this.hsba[2]).toPrecision(3),"%, ",(100*n).toPrecision(3),"%)");case"hsl":return this.hsla||(this.hsla=l.default._rgbaToHSLA(this._array)),"hsl(".concat(this.hsla[0]*this.maxes[a.HSL][0],", ",this.hsla[1]*this.maxes[a.HSL][1],", ",this.hsla[2]*this.maxes[a.HSL][2],")");case"hsl%":return this.hsla||(this.hsla=l.default._rgbaToHSLA(this._array)),"hsl(".concat((100*this.hsla[0]).toPrecision(3),"%, ",(100*this.hsla[1]).toPrecision(3),"%, ",(100*this.hsla[2]).toPrecision(3),"%)");case"hsla":return this.hsla||(this.hsla=l.default._rgbaToHSLA(this._array)),"hsla(".concat(this.hsla[0]*this.maxes[a.HSL][0],", ",this.hsla[1]*this.maxes[a.HSL][1],", ",this.hsla[2]*this.maxes[a.HSL][2],", ",n,")");case"hsla%":return this.hsla||(this.hsla=l.default._rgbaToHSLA(this._array)),"hsl(".concat((100*this.hsla[0]).toPrecision(3),"%, ",(100*this.hsla[1]).toPrecision(3),"%, ",(100*this.hsla[2]).toPrecision(3),"%, ",(100*n).toPrecision(3),"%)");default:return"rgba(".concat(r[0],",",r[1],",",r[2],",",n,")")}}},{key:"setRed",value:function(t){this._array[0]=t/this.maxes[a.RGB][0],this._calculateLevels()}},{key:"setGreen",value:function(t){this._array[1]=t/this.maxes[a.RGB][1],this._calculateLevels()}},{key:"setBlue",value:function(t){this._array[2]=t/this.maxes[a.RGB][2],this._calculateLevels()}},{key:"setAlpha",value:function(t){this._array[3]=t/this.maxes[this.mode][3],this._calculateLevels()}},{key:"_calculateLevels",value:function(){for(var t=this._array,r=this.levels=Array(t.length),o=t.length-1;0<=o;--o)r[o]=Math.round(255*t[o]);this.hsla=null,this.hsba=null}},{key:"_getAlpha",value:function(){return this._array[3]*this.maxes[this.mode][3]}},{key:"_storeModeAndMaxes",value:function(t,r){this.mode=t,this.maxes=r}},{key:"_getMode",value:function(){return this.mode}},{key:"_getMaxes",value:function(){return this.maxes}},{key:"_getBlue",value:function(){return this._array[2]*this.maxes[a.RGB][2]}},{key:"_getBrightness",value:function(){return this.hsba||(this.hsba=l.default._rgbaToHSBA(this._array)),this.hsba[2]*this.maxes[a.HSB][2]}},{key:"_getGreen",value:function(){return this._array[1]*this.maxes[a.RGB][1]}},{key:"_getHue",value:function(){return this.mode===a.HSB?(this.hsba||(this.hsba=l.default._rgbaToHSBA(this._array)),this.hsba[0]*this.maxes[a.HSB][0]):(this.hsla||(this.hsla=l.default._rgbaToHSLA(this._array)),this.hsla[0]*this.maxes[a.HSL][0])}},{key:"_getLightness",value:function(){return this.hsla||(this.hsla=l.default._rgbaToHSLA(this._array)),this.hsla[2]*this.maxes[a.HSL][2]}},{key:"_getRed",value:function(){return this._array[0]*this.maxes[a.RGB][0]}},{key:"_getSaturation",value:function(){return this.mode===a.HSB?(this.hsba||(this.hsba=l.default._rgbaToHSBA(this._array)),this.hsba[1]*this.maxes[a.HSB][1]):(this.hsla||(this.hsla=l.default._rgbaToHSLA(this._array)),this.hsla[1]*this.maxes[a.HSL][1])}}],d(o.prototype,t),r&&d(o,r),o}(),i.default.Color);o.default=f},{"../core/constants":272,"../core/main":283,"./color_conversion":268,"core-js/modules/es.array.includes":163,"core-js/modules/es.array.iterator":165,"core-js/modules/es.array.join":166,"core-js/modules/es.array.map":168,"core-js/modules/es.array.slice":169,"core-js/modules/es.object.get-own-property-descriptor":186,"core-js/modules/es.object.to-string":190,"core-js/modules/es.regexp.constructor":194,"core-js/modules/es.regexp.exec":195,"core-js/modules/es.regexp.to-string":196,"core-js/modules/es.string.includes":199,"core-js/modules/es.string.iterator":200,"core-js/modules/es.string.trim":209,"core-js/modules/es.symbol":212,"core-js/modules/es.symbol.description":210,"core-js/modules/es.symbol.iterator":211,"core-js/modules/es.weak-map":244,"core-js/modules/web.dom-collections.iterator":246}],271:[function(t,r,o){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function s(t){return(s="function"==typeof Symbol&&"symbol"===n(Symbol.iterator)?function(t){return n(t)}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":n(t)})(t)}t("core-js/modules/es.symbol"),t("core-js/modules/es.symbol.description"),t("core-js/modules/es.symbol.iterator"),t("core-js/modules/es.array.fill"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.object.get-own-property-descriptor"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.string.iterator"),t("core-js/modules/es.weak-map"),t("core-js/modules/web.dom-collections.iterator"),t("core-js/modules/es.array.fill"),Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;
1var i=(u=t("../core/main"))&&u.__esModule?u:{default:u},a=function(t){if(t&&t.__esModule)return t;if(null===t||"object"!==s(t)&&"function"!=typeof t)return{default:t};var r,o=l();if(o&&o.has(t))return o.get(t);var n,i={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(n in t)Object.prototype.hasOwnProperty.call(t,n)&&((r=a?Object.getOwnPropertyDescriptor(t,n):null)&&(r.get||r.set)?Object.defineProperty(i,n,r):i[n]=t[n]);return i.default=t,o&&o.set(t,i),i}(t("../core/constants"));function l(){var t;return"function"!=typeof WeakMap?null:(t=new WeakMap,l=function(){return t},t)}t("./p5.Color"),i.default.prototype.beginClip=function(){this._renderer.beginClip(0<arguments.length&&void 0!==arguments[0]?arguments[0]:{})},i.default.prototype.endClip=function(){this._renderer.endClip()},i.default.prototype.clip=function(t,r){this._renderer.beginClip(r),t(),this._renderer.endClip(r)},i.default.prototype.background=function(){var t;return(t=this._renderer).background.apply(t,arguments),this},i.default.prototype.clear=function(){return this._renderer.clear((arguments.length<=0?void 0:arguments[0])||0,(arguments.length<=1?void 0:arguments[1])||0,(arguments.length<=2?void 0:arguments[2])||0,(arguments.length<=3?void 0:arguments[3])||0),this},i.default.prototype.colorMode=function(t,r,o,n,s){return i.default._validateParameters("colorMode",arguments),t!==a.RGB&&t!==a.HSB&&t!==a.HSL||(this._colorMode=t,t=this._colorMaxes[t],2==arguments.length?(t[0]=r,t[1]=r,t[2]=r,t[3]=r):4==arguments.length?(t[0]=r,t[1]=o,t[2]=n):5==arguments.length&&(t[0]=r,t[1]=o,t[2]=n,t[3]=s)),this},i.default.prototype.fill=function(){var t;return this._renderer._setProperty("_fillSet",!0),this._renderer._setProperty("_doFill",!0),(t=this._renderer).fill.apply(t,arguments),this},i.default.prototype.noFill=function(){return this._renderer._setProperty("_doFill",!1),this},i.default.prototype.noStroke=function(){return this._renderer._setProperty("_doStroke",!1),this},i.default.prototype.stroke=function(){var t;return this._renderer._setProperty("_strokeSet",!0),this._renderer._setProperty("_doStroke",!0),(t=this._renderer).stroke.apply(t,arguments),this},i.default.prototype.erase=function(){return this._renderer.erase(0<arguments.length&&void 0!==arguments[0]?arguments[0]:255,1<arguments.length&&void 0!==arguments[1]?arguments[1]:255),this},i.default.prototype.noErase=function(){return this._renderer.noErase(),this};var u=i.default;o.default=u},{"../core/constants":272,"../core/main":283,"./p5.Color":270,"core-js/modules/es.array.fill":156,"core-js/modules/es.array.iterator":165,"core-js/modules/es.object.get-own-property-descriptor":186,"core-js/modules/es.object.to-string":190,"core-js/modules/es.string.iterator":200,"core-js/modules/es.symbol":212,"core-js/modules/es.symbol.description":210,"core-js/modules/es.symbol.iterator":211,"core-js/modules/es.weak-map":244,"core-js/modules/web.dom-collections.iterator":246}],272:[function(t,r,o){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.QUADRATIC=o.LINEAR=o._CTX_MIDDLE=o._DEFAULT_LEADMULT=o._DEFAULT_TEXT_FILL=o.WORD=o.CHAR=o.BOLDITALIC=o.BOLD=o.ITALIC=o.NORMAL=o.BLUR=o.ERODE=o.DILATE=o.POSTERIZE=o.INVERT=o.OPAQUE=o.GRAY=o.THRESHOLD=o.BURN=o.DODGE=o.SOFT_LIGHT=o.HARD_LIGHT=o.OVERLAY=o.REPLACE=o.SCREEN=o.MULTIPLY=o.EXCLUSION=o.SUBTRACT=o.DIFFERENCE=o.LIGHTEST=o.DARKEST=o.ADD=o.REMOVE=o.BLEND=o.UP_ARROW=o.TAB=o.SHIFT=o.RIGHT_ARROW=o.RETURN=o.OPTION=o.LEFT_ARROW=o.ESCAPE=o.ENTER=o.DOWN_ARROW=o.DELETE=o.CONTROL=o.BACKSPACE=o.ALT=o.AUTO=o.HSL=o.HSB=o.RGB=o.MITER=o.BEVEL=o.ROUND=o.SQUARE=o.PROJECT=o.PIE=o.CHORD=o.OPEN=o.CLOSE=o.TESS=o.QUAD_STRIP=o.QUADS=o.TRIANGLE_STRIP=o.TRIANGLE_FAN=o.TRIANGLES=o.LINE_LOOP=o.LINE_STRIP=o.LINES=o.POINTS=o.BASELINE=o.BOTTOM=o.TOP=o.CENTER=o.LEFT=o.RIGHT=o.RADIUS=o.CORNERS=o.CORNER=o.RAD_TO_DEG=o.DEG_TO_RAD=o.RADIANS=o.DEGREES=o.TWO_PI=o.TAU=o.QUARTER_PI=o.PI=o.HALF_PI=o.WAIT=o.TEXT=o.MOVE=o.HAND=o.CROSS=o.ARROW=o.WEBGL2=o.WEBGL=o.P2D=o.VERSION=void 0,o.RGBA=o.HALF_FLOAT=o.FLOAT=o.UNSIGNED_INT=o.UNSIGNED_BYTE=o.COVER=o.CONTAIN=o.FALLBACK=o.LABEL=o.AXES=o.GRID=o._DEFAULT_FILL=o._DEFAULT_STROKE=o.PORTRAIT=o.LANDSCAPE=o.SMOOTH=o.FLAT=o.MIRROR=o.CLAMP=o.REPEAT=o.NEAREST=o.IMAGE=o.IMMEDIATE=o.TEXTURE=o.FILL=o.STROKE=o.CURVE=o.BEZIER=void 0;var n=Math.PI,s=(o.VERSION="1.11.11",o.P2D="p2d",o.WEBGL="webgl",o.WEBGL2="webgl2",o.ARROW="default",o.CROSS="crosshair",o.HAND="pointer",o.MOVE="move",o.TEXT="text",o.WAIT="wait",n/2),s=(o.HALF_PI=s,n),s=(o.PI=s,n/4),s=(o.QUARTER_PI=s,2*n),s=(o.TAU=s,2*n),s=(o.TWO_PI=s,o.DEGREES="degrees",o.RADIANS="radians",n/180),s=(o.DEG_TO_RAD=s,180/n);o.RAD_TO_DEG=s,o.CORNER="corner",o.CORNERS="corners",o.RADIUS="radius",o.RIGHT="right",o.LEFT="left",o.CENTER="center",o.TOP="top",o.BOTTOM="bottom",o.BASELINE="alphabetic",o.POINTS=0,o.LINES=1,o.LINE_STRIP=3,o.LINE_LOOP=2,o.TRIANGLES=4,o.TRIANGLE_FAN=6,o.TRIANGLE_STRIP=5,o.QUADS="quads",o.QUAD_STRIP="quad_strip",o.TESS="tess",o.CLOSE="close",o.OPEN="open",o.CHORD="chord",o.PIE="pie",o.PROJECT="square",o.SQUARE="butt",o.ROUND="round",o.BEVEL="bevel",o.MITER="miter",o.RGB="rgb",o.HSB="hsb",o.HSL="hsl",o.AUTO="auto",o.ALT=18,o.BACKSPACE=8,o.CONTROL=17,o.DELETE=46,o.DOW
1N_ARROW=40,o.ENTER=13,o.ESCAPE=27,o.LEFT_ARROW=37,o.OPTION=18,o.RETURN=13,o.RIGHT_ARROW=39,o.SHIFT=16,o.TAB=9,o.UP_ARROW=38,o.BLEND="source-over",o.REMOVE="destination-out",o.ADD="lighter",o.DARKEST="darken",o.LIGHTEST="lighten",o.DIFFERENCE="difference",o.SUBTRACT="subtract",o.EXCLUSION="exclusion",o.MULTIPLY="multiply",o.SCREEN="screen",o.REPLACE="copy",o.OVERLAY="overlay",o.HARD_LIGHT="hard-light",o.SOFT_LIGHT="soft-light",o.DODGE="color-dodge",o.BURN="color-burn",o.THRESHOLD="threshold",o.GRAY="gray",o.OPAQUE="opaque",o.INVERT="invert",o.POSTERIZE="posterize",o.DILATE="dilate",o.ERODE="erode",o.BLUR="blur",o.NORMAL="normal",o.ITALIC="italic",o.BOLD="bold",o.BOLDITALIC="bold italic",o.CHAR="CHAR",o.WORD="WORD",o._DEFAULT_TEXT_FILL="#000000",o._DEFAULT_LEADMULT=1.25,o._CTX_MIDDLE="middle",o.LINEAR="linear",o.QUADRATIC="quadratic",o.BEZIER="bezier",o.CURVE="curve",o.STROKE="stroke",o.FILL="fill",o.TEXTURE="texture",o.IMMEDIATE="immediate",o.IMAGE="image",o.NEAREST="nearest",o.REPEAT="repeat",o.CLAMP="clamp",o.MIRROR="mirror",o.FLAT="flat",o.SMOOTH="smooth",o.LANDSCAPE="landscape",o.PORTRAIT="portrait",o._DEFAULT_STROKE="#000000",o._DEFAULT_FILL="#FFFFFF",o.GRID="grid",o.AXES="axes",o.LABEL="label",o.FALLBACK="fallback",o.CONTAIN="contain",o.COVER="cover",o.UNSIGNED_BYTE="unsigned-byte",o.UNSIGNED_INT="unsigned-int",o.FLOAT="float",o.HALF_FLOAT="half-float",o.RGBA="rgba"},{}],273:[function(t,r,o){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function s(t){return(s="function"==typeof Symbol&&"symbol"===n(Symbol.iterator)?function(t){return n(t)}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":n(t)})(t)}t("core-js/modules/es.symbol"),t("core-js/modules/es.symbol.description"),t("core-js/modules/es.symbol.iterator"),t("core-js/modules/es.array.concat"),t("core-js/modules/es.array.filter"),t("core-js/modules/es.array.includes"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.object.get-own-property-descriptor"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.regexp.exec"),t("core-js/modules/es.string.includes"),t("core-js/modules/es.string.iterator"),t("core-js/modules/es.string.search"),t("core-js/modules/es.string.split"),t("core-js/modules/es.weak-map"),t("core-js/modules/web.dom-collections.iterator"),t("core-js/modules/es.array.concat"),t("core-js/modules/es.array.filter"),t("core-js/modules/es.array.includes"),t("core-js/modules/es.regexp.exec"),t("core-js/modules/es.string.includes"),t("core-js/modules/es.string.search"),t("core-js/modules/es.string.split"),Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;var i=(a=t("./main"))&&a.__esModule?a:{default:a},a=function(t){if(t&&t.__esModule)return t;if(null===t||"object"!==s(t)&&"function"!=typeof t)return{default:t};var r,o=l();if(o&&o.has(t))return o.get(t);var n,i={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(n in t)Object.prototype.hasOwnProperty.call(t,n)&&((r=a?Object.getOwnPropertyDescriptor(t,n):null)&&(r.get||r.set)?Object.defineProperty(i,n,r):i[n]=t[n]);return i.default=t,o&&o.set(t,i),i}(t("./constants"));function l(){var t;return"function"!=typeof WeakMap?null:(t=new WeakMap,l=function(){return t},t)}var u=[a.ARROW,a.CROSS,a.HAND,a.MOVE,a.TEXT,a.WAIT],c=(i.default.prototype._frameRate=0,i.default.prototype._lastFrameTime=window.performance.now(),i.default.prototype._targetFrameRate=60,window.print),d=!1;function h(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth||0}function f(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight||0}i.default.prototype.print=function(){var t;arguments.length?(t=console).log.apply(t,arguments):d||(c(),window.confirm("You just tried to print the webpage. Do you want to prevent this from running again?")&&(d=!0))},i.default.prototype.frameCount=0,i.default.prototype.deltaTime=0,i.default.prototype.focu
1sed=document.hasFocus(),i.default.prototype.cursor=function(t,r,o){var n,s="auto",i=this._curElement.elt;u.includes(t)?s=t:"string"==typeof t&&(n="",r&&o&&"number"==typeof r&&"number"==typeof o&&(n="".concat(r," ").concat(o)),s="http://"===t.substring(0,7)||"https://"===t.substring(0,8)||/\.(cur|jpg|jpeg|gif|png|CUR|JPG|JPEG|GIF|PNG)$/.test(t)?"url(".concat(t,") ").concat(n,", auto"):t),i.style.cursor=s},i.default.prototype.frameRate=function(t){return i.default._validateParameters("frameRate",arguments),"number"!=typeof t||t<0?this._frameRate:(this._setProperty("_targetFrameRate",t),0===t&&this._setProperty("_frameRate",t),this)},i.default.prototype.getFrameRate=function(){return this.frameRate()},i.default.prototype.setFrameRate=function(t){return this.frameRate(t)},i.default.prototype.getTargetFrameRate=function(){return this._targetFrameRate},i.default.prototype.noCursor=function(){this._curElement.elt.style.cursor="none"},i.default.prototype.webglVersion=a.P2D,i.default.prototype.displayWidth=screen.width,i.default.prototype.displayHeight=screen.height,i.default.prototype.windowWidth=0,i.default.prototype.windowHeight=0,i.default.prototype._onresize=function(t){this._setProperty("windowWidth",h()),this._setProperty("windowHeight",f());var r=this._isGlobal?window:this;"function"!=typeof r.windowResized||void 0===(r=r.windowResized(t))||r||t.preventDefault()},i.default.prototype._updateWindowSize=function(){this._setProperty("windowWidth",h()),this._setProperty("windowHeight",f())},i.default.prototype.width=0,i.default.prototype.height=0,i.default.prototype.fullscreen=function(t){if(i.default._validateParameters("fullscreen",arguments),void 0===t)return document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement;if(t){if(t=document.documentElement,!(document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled))throw Error("Fullscreen not enabled in this browser.");t.requestFullscreen?t.requestFullscreen():t.mozRequestFullScreen?t.mozRequestFullScreen():t.webkitRequestFullscreen?t.webkitRequestFullscreen():t.msRequestFullscreen&&t.msRequestFullscreen()}else document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.msExitFullscreen&&document.msExitFullscreen()},i.default.prototype.pixelDensity=function(t){var r;return i.default._validateParameters("pixelDensity",arguments),"number"==typeof t?(t!==this._pixelDensity&&(this._pixelDensity=this._maxAllowedPixelDimensions=t),(r=this).resizeCanvas(this.width,this.height,!0)):r=this._pixelDensity,r},i.default.prototype.displayDensity=function(){return window.devicePixelRatio},i.default.prototype.getURL=function(){return location.href},i.default.prototype.getURLPath=function(){return location.pathname.split("/").filter(function(t){return""!==t})},i.default.prototype.getURLParams=function(){for(var t,r=/[?&]([^&=]+)(?:[&=])([^&=]+)/gim,o={};null!=(t=r.exec(location.search));)t.index===r.lastIndex&&r.lastIndex++,o[t[1]]=t[2];return o},t=i.default,o.default=t},{"./constants":272,"./main":283,"core-js/modules/es.array.concat":153,"core-js/modules/es.array.filter":157,"core-js/modules/es.array.includes":163,"core-js/modules/es.array.iterator":165,"core-js/modules/es.object.get-own-property-descriptor":186,"core-js/modules/es.object.to-string":190,"core-js/modules/es.regexp.exec":195,"core-js/modules/es.string.includes":199,"core-js/modules/es.string.iterator":200,"core-js/modules/es.string.search":205,"core-js/modules/es.string.split":206,"core-js/modules/es.symbol":212,"core-js/modules/es.symbol.description":210,"core-js/modules/es.symbol.iterator":211,"core-js/modules/es.weak-map":244,"core-js/modules/web.dom-collections.iterator":246}],274:[function(t,r,o){"use strict";t("core-js/modules/es.symbol"),t("core-js/modules/es.symbol.description"),t("core-js/modules/es.symbol.iterator"),t("core-js/modules/es.array.concat"),t("core-js/modules/es.array.filter"),t("core-js/modules/es.array.for-each"),t("core-js/modules/es.array.includes"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.array.join"),t("core-js/modules/es.array.map"),t("core-js/modules/es.array.slice"),t("core-js/modules/es.array.some"),t("core-js/modules/es.function.name"),t("core-js/modules/es.object.assign"),t("core-js/modules/es.object.get-own-property-names"),t("core-js/modules/es.object.keys"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.regexp.constructor"),t("core-js/modules/es.regexp.exec"),t("core-js/modules/es.regexp.to-string"),t("core-js/modules/es.string.iterator"),t("core-js/modules/es.string.match"),t("core-js/modules/es.string.replace"),t("core-js/modules/es.string.split"),t("core-js/modules/es.string.starts-with"),t("core-js/modules/web.dom-collections.for-each"),t("core-js/modules/web.dom-collections.iterator"),t("core-js/modules/es.symbol"),t("core-js/modules/es.symbol.description"),t("core-js/modules/es.symbol.iterator"),t("core-js/modules/es.array.
1concat"),t("core-js/modules/es.array.filter"),t("core-js/modules/es.array.for-each"),t("core-js/modules/es.array.includes"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.array.join"),t("core-js/modules/es.array.map"),t("core-js/modules/es.array.slice"),t("core-js/modules/es.array.some"),t("core-js/modules/es.function.name"),t("core-js/modules/es.object.assign"),t("core-js/modules/es.object.get-own-property-names"),t("core-js/modules/es.object.keys"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.regexp.constructor"),t("core-js/modules/es.regexp.exec"),t("core-js/modules/es.regexp.to-string"),t("core-js/modules/es.string.iterator"),t("core-js/modules/es.string.match"),t("core-js/modules/es.string.replace"),t("core-js/modules/es.string.split"),t("core-js/modules/es.string.starts-with"),t("core-js/modules/web.dom-collections.for-each"),t("core-js/modules/web.dom-collections.iterator"),Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;var n=(u=t("../main"))&&u.__esModule?u:{default:u};function s(t,r){r=r||console.log.bind(console),i||a(),i.some(function(o){var n;if(t.message&&null!==t.message.match("\\W?".concat(o.name,"\\W")))return n="function"===o.type?"".concat(o.name,"()"):o.name,r("Did you just try to use p5.js's ".concat(n," ").concat(o.type,"? If so, you may want to move it into your sketch's setup() function.\n\nFor more details, see: ").concat(l)),!0})}t("../internationalization");var i=null,a=null,l=(n.default._friendlyError=n.default._checkForUserDefinedFunctions=n.default._fesErrorMonitor=function(){},i=null,"https://github.com/processing/p5.js/wiki/p5.js-overview#why-cant-i-assign-variables-using-p5-functions-and-variables-before-setup"),a=function(){function r(t){return Object.getOwnPropertyNames(t).filter(function(t){return"_"!==t[0]&&!(t in o)&&(o[t]=!0)}).map(function(r){var o="function"==typeof t[r]?"function":r===r.toUpperCase()?"constant":"variable";return{name:r,type:o}})}var o={};(i=[].concat(r(n.default.prototype),r(t("../constants")))).sort(function(t,r){return r.name.length-t.name.length})},u=(n.default.prototype._helpForMisusedAtTopLevelCode=s,"complete"!==document.readyState&&(window.addEventListener("error",s,!1),window.addEventListener("load",function(){window.removeEventListener("error",s,!1)})),n.default);o.default=u},{"../constants":272,"../internationalization":281,"../main":283,"./browser_errors":void 0,"core-js/modules/es.array.concat":153,"core-js/modules/es.array.filter":157,"core-js/modules/es.array.for-each":161,"core-js/modules/es.array.includes":163,"core-js/modules/es.array.iterator":165,"core-js/modules/es.array.join":166,"core-js/modules/es.array.map":168,"core-js/modules/es.array.slice":169,"core-js/modules/es.array.some":170,"core-js/modules/es.function.name":174,"core-js/modules/es.object.assign":183,"core-js/modules/es.object.get-own-property-names":187,"core-js/modules/es.object.keys":189,"core-js/modules/es.object.to-string":190,"core-js/modules/es.regexp.constructor":194,"core-js/modules/es.regexp.exec":195,"core-js/modules/es.regexp.to-string":196,"core-js/modules/es.string.iterator":200,"core-js/modules/es.string.match":201,"core-js/modules/es.string.replace":204,"core-js/modules/es.string.split":206,"core-js/modules/es.string.starts-with":207,"core-js/modules/es.symbol":212,"core-js/modules/es.symbol.description":210,"core-js/modules/es.symbol.iterator":211,"core-js/modules/web.dom-collections.for-each":245,"core-js/modules/web.dom-collections.iterator":246}],275:[function(t,r,o){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;var n=(n=t("../main"))&&n.__esModule?n:{default:n};t("../internationalization"),n.default._friendlyFileLoadError=function(){},t=n.default,o.default=t},{"../internationalization":281,"../main":283}],276:[function(t,r,o){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function s(t){return(s="function"==typeof Symbol&&"symbol"===n(Symbol.iterator)?function(t){return n(t)}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":n(t)})(t)}t("core-js/modules/es.symbol"),t("core-js/modules/es.symbol.description"),t("core-js/modules/es.symbol.iterator"),t("core-js/modules/es.array.filter"),t("core-js/modules/es.array.for-each"),t("core-js/modules/es.array.from"),t("core-js/modules/es.array.includes"),t("core-js/modules/es.array.index-of"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.array.join"),t("core-js/modules/es.array.map"),t("core-js/modules/es.array.slice"),t("core-js/modules/es.object.get-own-property-descriptor"),t("core-js/modules/es.object.keys"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.regexp.constructor"),t("core-js/modules/es.regexp.exec"),t("core-js/modules/es.regexp.to-string"),t("core-js/modules/es.string.includes"),t("core-js/modules/es.string.iterator"),t("core-js/modules/es.string.match"),t("core-js/modules/es.string.split"),t("core-js/modules/es.string.trim"),t("
1core-js/modules/es.weak-map"),t("core-js/modules/web.dom-collections.for-each"),t("core-js/modules/web.dom-collections.iterator"),t("core-js/modules/es.array.filter"),t("core-js/modules/es.array.for-each"),t("core-js/modules/es.array.includes"),t("core-js/modules/es.array.index-of"),t("core-js/modules/es.array.join"),t("core-js/modules/es.array.map"),t("core-js/modules/es.array.slice"),t("core-js/modules/es.object.keys"),t("core-js/modules/es.regexp.constructor"),t("core-js/modules/es.regexp.exec"),t("core-js/modules/es.regexp.to-string"),t("core-js/modules/es.string.includes"),t("core-js/modules/es.string.match"),t("core-js/modules/es.string.split"),t("core-js/modules/es.string.trim"),t("core-js/modules/web.dom-collections.for-each"),Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;var i,a=(i=t("../main"))&&i.__esModule?i:{default:i};function l(){var t;return"function"!=typeof WeakMap?null:(t=new WeakMap,l=function(){return t},t)}t("../internationalization"),function(t){if((!t||!t.__esModule)&&null!==t&&("object"===s(t)||"function"==typeof t)){var r=l();if(r&&r.has(t))return r.get(t);var o,n,i={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(o in t)Object.prototype.hasOwnProperty.call(t,o)&&((n=a?Object.getOwnPropertyDescriptor(t,o):null)&&(n.get||n.set)?Object.defineProperty(i,o,n):i[o]=t[o]);i.default=t,r&&r.set(t,i)}}(t("../constants")),a.default._fesCodeReader=function(){};var u=a.default;o.default=u},{"../constants":272,"../internationalization":281,"../main":283,"core-js/modules/es.array.filter":157,"core-js/modules/es.array.for-each":161,"core-js/modules/es.array.from":162,"core-js/modules/es.array.includes":163,"core-js/modules/es.array.index-of":164,"core-js/modules/es.array.iterator":165,"core-js/modules/es.array.join":166,"core-js/modules/es.array.map":168,"core-js/modules/es.array.slice":169,"core-js/modules/es.object.get-own-property-descriptor":186,"core-js/modules/es.object.keys":189,"core-js/modules/es.object.to-string":190,"core-js/modules/es.regexp.constructor":194,"core-js/modules/es.regexp.exec":195,"core-js/modules/es.regexp.to-string":196,"core-js/modules/es.string.includes":199,"core-js/modules/es.string.iterator":200,"core-js/modules/es.string.match":201,"core-js/modules/es.string.split":206,"core-js/modules/es.string.trim":209,"core-js/modules/es.symbol":212,"core-js/modules/es.symbol.description":210,"core-js/modules/es.symbol.iterator":211,"core-js/modules/es.weak-map":244,"core-js/modules/web.dom-collections.for-each":245,"core-js/modules/web.dom-collections.iterator":246}],277:[function(t,r,o){"use strict";function n(){var t=/(^|@)\S+:\d+/,r=/^\s*at .*(\S+:\d+|\(native\))/m,o=/^(eval@)?(\[native code])?$/;return{parse:function(t){return void 0!==t.stacktrace||void 0!==t["opera#sourceloc"]?this.parseOpera(t):t.stack&&t.stack.match(r)?this.parseV8OrIE(t):t.stack?this.parseFFOrSafari(t):void 0},extractLocation:function(t){return -1===t.indexOf(":")?[t]:[(t=/(.+?)(?::(\d+))?(?::(\d+))?$/.exec(t.replace(/[()]/g,"")))[1],t[2]||void 0,t[3]||void 0]},parseV8OrIE:function(t){return t.stack.split("\n").filter(function(t){return!!t.match(r)},this).map(function(t){var r=(t=-1<t.indexOf("(eval ")?t.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(\),.*$)/g,""):t).replace(/^\s+/,"").replace(/\(eval code/g,"("),o=r.match(/ (\((.+):(\d+):(\d+)\)$)/),r=(r=o?r.replace(o[0],""):r).split(/\s+/).slice(1),o=this.extractLocation(o?o[1]:r.pop());return{functionName:r.join(" ")||void 0,fileName:-1<["eval","<anonymous>"].indexOf(o[0])?void 0:o[0],lineNumber:o[1],columnNumber:o[2],source:t}},this)},parseFFOrSafari:function(t){return t.stack.split("\n").filter(function(t){return!t.match(o)},this).map(function(t){var r,o;return -1===(t=-1<t.indexOf(" > eval")?t.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1"):t).indexOf("@")&&-1===t.indexOf(":")?{functionName:t}:{functionName:(o=t.match(r=/((.*".+"[^@]*)?[^@]*)(?:@)/))&&o[1]?o[1]:void 0,fileName:(o=this.extractLocation(t.replace(r,"")))[0],lineNumber:o[1],columnNumber:o[2],source:t}},this)},parseOpera:function(t){return!t.stacktrace||-1<t.message.indexOf("\n")&&t.message.split("\n").length>t.stacktrace.split("\n").length?this.parseOpera9(t):t.stack?this.parseOpera11(t):this.parseOpera10(t)},parseOpera9:function(t){for(var r=/Line (\d+).*script (?:in )?(\S+)/i,o=t.message.split("\n"),n=[],s=2,i=o.length;s<i;s+=2){var a=r.exec(o[s]);
1a&&n.push({fileName:a[2],lineNumber:a[1],source:o[s]})}return n},parseOpera10:function(t){for(var r=/Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i,o=t.stacktrace.split("\n"),n=[],s=0,i=o.length;s<i;s+=2){var a=r.exec(o[s]);a&&n.push({functionName:a[3]||void 0,fileName:a[2],lineNumber:a[1],source:o[s]})}return n},parseOpera11:function(r){return r.stack.split("\n").filter(function(r){return!!r.match(t)&&!r.match(/^Error created at/)},this).map(function(t){var r,o=t.split("@"),n=this.extractLocation(o.pop()),o=o.shift()||"";return{functionName:o.replace(/<anonymous function(: (\w+))?>/,"$2").replace(/\([^)]*\)/g,"")||void 0,args:void 0===(r=o.match(/\(([^)]*)\)/)?o.replace(/^[^(]+\(([^)]*)\)$/,"$1"):r)||"[arguments not available]"===r?void 0:r.split(","),fileName:n[0],lineNumber:n[1],columnNumber:n[2],source:t}},this)}}}t("core-js/modules/es.array.filter"),t("core-js/modules/es.array.index-of"),t("core-js/modules/es.array.join"),t("core-js/modules/es.array.map"),t("core-js/modules/es.array.slice"),t("core-js/modules/es.regexp.exec"),t("core-js/modules/es.string.match"),t("core-js/modules/es.string.replace"),t("core-js/modules/es.string.split"),t("core-js/modules/es.array.filter"),t("core-js/modules/es.array.index-of"),t("core-js/modules/es.array.join"),t("core-js/modules/es.array.map"),t("core-js/modules/es.array.slice"),t("core-js/modules/es.regexp.exec"),t("core-js/modules/es.string.match"),t("core-js/modules/es.string.replace"),t("core-js/modules/es.string.split"),Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,(t=(t=t("../main"))&&t.__esModule?t:{default:t}).default._getErrorStackParser=function(){return new n},t=t.default,o.default=t},{"../main":283,"core-js/modules/es.array.filter":157,"core-js/modules/es.array.index-of":164,"core-js/modules/es.array.join":166,"core-js/modules/es.array.map":168,"core-js/modules/es.array.slice":169,"core-js/modules/es.regexp.exec":195,"core-js/modules/es.string.match":201,"core-js/modules/es.string.replace":204,"core-js/modules/es.string.split":206}],278:[function(t,r,o){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}t("core-js/modules/es.symbol"),t("core-js/modules/es.symbol.description"),t("core-js/modules/es.symbol.iterator"),t("core-js/modules/es.array.concat"),t("core-js/modules/es.array.for-each"),t("core-js/modules/es.array.includes"),t("core-js/modules/es.array.index-of"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.array.join"),t("core-js/modules/es.array.last-index-of"),t("core-js/modules/es.array.map"),t("core-js/modules/es.array.slice"),t("core-js/modules/es.function.name"),t("core-js/modules/es.map"),t("core-js/modules/es.number.constructor"),t("core-js/modules/es.object.get-own-property-descriptor"),t("core-js/modules/es.object.get-prototype-of"),t("core-js/modules/es.object.keys"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.reflect.construct"),t("core-js/modules/es.regexp.exec"),t("core-js/modules/es.regexp.to-string"),t("core-js/modules/es.set"),t("core-js/modules/es.string.includes"),t("core-js/modules/es.string.iterator"),t("core-js/modules/es.string.split"),t("core-js/modules/es.weak-map"),t("core-js/modules/web.dom-collections.for-each"),t("core-js/modules/web.dom-collections.iterator"),t("core-js/modules/es.symbol"),t("core-js/modules/es.symbol.description"),t("core-js/modules/es.symbol.iterator"),t("core-js/modules/es.array.concat"),t("core-js/modules/es.array.for-each"),t("core-js/modules/es.array.includes"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.array.join"),t("core-js/modules/es.array.last-index-of"),t("core-js/modules/es.array.map"),t("core-js/modules/es.array.slice"),t("core-js/modules/es.function.name"),t("core-js/modules/es.number.constructor"),t("core-js/modules/es.object.keys"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.regexp.exec"),t("core-js/modules/es.regexp.to-string"),t("core-js/modules/es.set"),t("core-js/modules/es.string.includes"),t("core-js/modules/es.string.iterator"),t("core-js/modules/es.string.split"),t("core-js/modules/web.dom-collections.for-each"),t("core-js/modules/web.dom-collections.iterator"),Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;var s=(s=t("../main"))&&s.__esModule?s:{default:s};function i(){var t;return"function"!=typeof WeakMap?null:(t=new WeakMap,i=function(){return t},t)}function a(t){return(a="function"==typeof Symbol&&"symbol"===n(Symbol.iterator)?function(t){return n(t)}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":n(t)})(t)}
1(function(t){if((!t||!t.__esModule)&&null!==t&&("object"===a(t)||"function"==typeof t)){var r,o=i();if(o&&o.has(t))return o.get(t);var n,s={},l=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(n in t)Object.prototype.hasOwnProperty.call(t,n)&&((r=l?Object.getOwnPropertyDescriptor(t,n):null)&&(r.get||r.set)?Object.defineProperty(s,n,r):s[n]=t[n]);s.default=t,o&&o.set(t,s)}})(t("../constants")),t("../internationalization"),s.default._validateParameters=s.default._clearValidateParamsCache=function(){},t=s.default,o.default=t},{"../../../docs/parameterData.json":void 0,"../constants":272,"../internationalization":281,"../main":283,"core-js/modules/es.array.concat":153,"core-js/modules/es.array.for-each":161,"core-js/modules/es.array.includes":163,"core-js/modules/es.array.index-of":164,"core-js/modules/es.array.iterator":165,"core-js/modules/es.array.join":166,"core-js/modules/es.array.last-index-of":167,"core-js/modules/es.array.map":168,"core-js/modules/es.array.slice":169,"core-js/modules/es.function.name":174,"core-js/modules/es.map":175,"core-js/modules/es.number.constructor":179,"core-js/modules/es.object.get-own-property-descriptor":186,"core-js/modules/es.object.get-prototype-of":188,"core-js/modules/es.object.keys":189,"core-js/modules/es.object.to-string":190,"core-js/modules/es.reflect.construct":192,"core-js/modules/es.regexp.exec":195,"core-js/modules/es.regexp.to-string":196,"core-js/modules/es.set":197,"core-js/modules/es.string.includes":199,"core-js/modules/es.string.iterator":200,"core-js/modules/es.string.split":206,"core-js/modules/es.symbol":212,"core-js/modules/es.symbol.description":210,"core-js/modules/es.symbol.iterator":211,"core-js/modules/es.weak-map":244,"core-js/modules/web.dom-collections.for-each":245,"core-js/modules/web.dom-collections.iterator":246}],279:[function(t,r,o){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function s(t){return(s="function"==typeof Symbol&&"symbol"===n(Symbol.iterator)?function(t){return n(t)}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":n(t)})(t)}t("core-js/modules/es.symbol"),t("core-js/modules/es.symbol.description"),t("core-js/modules/es.symbol.iterator"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.object.get-own-property-descriptor"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.string.iterator"),t("core-js/modules/es.weak-map"),t("core-js/modules/web.dom-collections.iterator"),Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;var i=function(t){if(t&&t.__esModule)return t;if(null===t||"object"!==s(t)&&"function"!=typeof t)return{default:t};var r,o=a();if(o&&o.has(t))return o.get(t);var n,i={},l=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(n in t)Object.prototype.hasOwnProperty.call(t,n)&&((r=l?Object.getOwnPropertyDescriptor(t,n):null)&&(r.get||r.set)?Object.defineProperty(i,n,r):i[n]=t[n]);return i.default=t,o&&o.set(t,i),i}(t("./constants"));function a(){var t;return"function"!=typeof WeakMap?null:(t=new WeakMap,a=function(){return t},t)}o.default={modeAdjust:function(t,r,o,n,s){var a;return s===i.CORNER?a={x:t,y:r,w:Math.abs(o),h:Math.abs(n)}:s===i.CORNERS?a={x:Math.min(t,o),y:Math.min(r,n),w:Math.abs(o-t),h:Math.abs(n-r)}:s===i.RADIUS?a={x:t-(o=Math.abs(o)),y:r-(n=Math.abs(n)),w:2*o,h:2*n}:s===i.CENTER&&(a={x:t-.5*(o=Math.abs(o)),y:r-.5*(n=Math.abs(n)),w:o,h:n}),a}}},{"./constants":272,"core-js/modules/es.array.iterator":165,"core-js/modules/es.object.get-own-property-descriptor":186,"core-js/modules/es.object.to-string":190,"core-js/modules/es.string.iterator":200,"core-js/modules/es.symbol":212,"core-js/modules/es.symbol.description":210,"core-js/modules/es.symbol.iterator":211,"core-js/modules/es.weak-map":244,"core-js/modules/web.dom-collections.iterator":246}],280:[function(t,r,o){"use strict";t("core-js/modules/es.array.iterator"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.promise"),t("core-js/modules/es.string.iterator"),t("core-js/modules/web.dom-collections.iterator"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.promise"),t("core-js/modules/es.string.iterator"),t("core-js/modules/web.dom-collections.iterator");var n=(s=t("../core/main"))&&s.__esModule?s:{default:s};t("./internationalization");var s=Promise.resolve();Promise.all([new Promise(function(t,r){"complete"===document.readyState?t():window.addEventListener("load",t,!1)}),s]).then(function(){var t;void 0!==window._setupDone?console.warn("p5.js seems to have been imported multiple times. Please remove the duplicate import"):window.mocha||(t=new Event("p5Ready"),window.dispatchEvent(t),(window.setup&&"function"==typeof window.setup||window.draw&&"function"==typeof window.draw)&&!n.default.instance&&new n.default)})},{"../core/main":283,"./internationalization":281,"core-js/modules/es.array.iterator":165,"core-js/modules/es.object.to-string":190,"core-js/modules/es.promise":191,"core-js/modules/es.string.iterator":200,"core-js/modules/web.dom-collections.iterator":246}],281:[function(t,r,o){"use strict";t("core-js/modules/es.array.includes"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.array.join"),t("core-js/modules/es.array.slice"),t("core-js/modules/es.object.keys"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.promise"),t("core-js/modules/es.regexp.exec"),t("core-js/modules/es.string.includes"),t("core-js/modules/es.string.iterator"),t("core-js/modules/es.string.replace"),t("core-js/modules/es.string.split"),t("core-js/modules/web.dom-collections.iterator"),t("core-js/modules/es.array.includes"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.array.join"),t("core-js/modules/es.array.slice"),t("core-js/modules/es.object.keys"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.promise"),t("core-js/modules/es.regexp.exec"),t("core-js/modules/es.string.includes"),t("core-js/modules/es.string.iterator"),t("core-js/modules/es.string.replace"),t("core-js/modules/es.string.split"),t("core-js/modules/web.dom-collections.iterator"),Object.defineProperty(o,"__esModule",{value:!0}),o.setTranslatorLanguage=o.currentTranslatorLanguage=o.availableTranslatorLanguages=o.initialize=o.translator=void 0;var n,s,i=u(t("i18next")),a=u(t("i18next-browser-languagedetector")),l=t("./constants");function u(t){return t&&t.__esModule?t:{default:t}}function c(t,r){for(var o=0;o<r.length;o++){var n=r[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var d=function(){var t,r;function o(t,r){if(!(this instanceof o))throw TypeError("Cannot call a class as a function");this.init(t,r)}return t=[{key:"fetchWithTimeout",value:function(t,r){var o=2<arguments.length&&void 0!==arguments[2]?arguments[2]:2e3;return Promise.race([fetch(t,r),new Promise(function(t,r){return setTimeout(function(){return r(Error("timeout"))},o)})])}},{key:"init",value:function(t){var r=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};this.services=t,this.options=r}},{key:"read",value:function(t,r,o){var i=this.options.loadPath;t===this.options.fallback?o(null,n[t][r]):s.includes(t)?(i=this.services.interpolator.interpolate(i,{lng:t,ns:r}),this.loadUrl(i,o)):o("Not found",!1)}},{key:"loadUrl",value:function(t,r){this.fetchWithTimeout(t).then(function(r){if(r.ok)return r.json();throw Error("failed loading ".concat(t))},function(){throw Error("failed loading ".concat(t))}).then(function(t){return r(null,t)}).catch(r)}}],c(o.prototype,t),r&&c(o,r),o}();d.type="backend",o.translator=function(t,r){console.debug("p5.js translator called before translations were loaded"),i.default.t(t,r)},o.initialize=function(){return i.default.use(a.default).use(d).init({fallbackLng:"en",nestingPrefix:"$tr(",nestingSuffix:")",defaultNS:"translation",returnEmptyString:!1,interpolation:{escapeValue:!1},detection:{checkWhitelist:!1,order:["querystring","navigator","htmlTag","path","subdomain"],caches:[]},backend:{fallback:"en",loadPath:"https://cdn.jsdelivr.net/npm/p5@".concat(l.VERSION.replace(/^(\d+\.\d+)\.\d+.*$/,"$1"),"/translations/{{lng}}/{{ns}}.json")},partialBundledLanguages:!0,resources:n}).then(function(t){o.translator=t},function(t){return console.debug("Translations failed to load (".concat(t,")"))})},o.availableTranslatorLanguages=function(){return i.default.languages},o.currentTranslatorLanguage=function(t){return i.default.language},o.setTranslatorLanguage=function(t){return i.default.changeLanguage(t||void 0,function(t){return console.debug("Translations failed to load (".concat(t,")"))})}},{"../../translations":void 0,"../../translations/dev":void 0,"./constants":272,"core-js/modules/es.array.includes":163,"core-js/modules/es.array.iterator":165,"core-js/modules/es.array.join":166,"core-js/modules/es.array.slice":169,"core-js/modules/es.object.keys":189,"core-js/modules/es.object.to-string":190,"core-js/modules/es.promise":191,"core-js/modules/es.regexp.exec":195,"core-js/modules/es.string.includes":199,"core-js/modules/es.string.iterator":200,"core-js/modules/es.string.replace":204,"core-js/modules/es.string.split":206,"core-js/modules/web.dom-collections.iterator":246,i18next:3,"i18next-browser-languagedetector":3}],282:[function(t,r,o){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,(t=(t=t("./main"))&&t.__esModule?t:{default:t}).default.prototype.pushStyle=function(){throw Error("pushStyle() not used, see push()")},t.default.prototype.popStyle=function(){throw Error("popStyle() not used, see pop()")}
1,t.default.prototype.popMatrix=function(){throw Error("popMatrix() not used, see pop()")},t.default.prototype.pushMatrix=function(){throw Error("pushMatrix() not used, see push()")},t=t.default,o.default=t},{"./main":283}],283:[function(t,r,o){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function s(t){return(s="function"==typeof Symbol&&"symbol"===n(Symbol.iterator)?function(t){return n(t)}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":n(t)})(t)}t("core-js/modules/es.symbol"),t("core-js/modules/es.symbol.description"),t("core-js/modules/es.symbol.iterator"),t("core-js/modules/es.array.for-each"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.array.slice"),t("core-js/modules/es.array.splice"),t("core-js/modules/es.object.get-own-property-descriptor"),t("core-js/modules/es.object.get-own-property-names"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.string.iterator"),t("core-js/modules/es.weak-map"),t("core-js/modules/web.dom-collections.for-each"),t("core-js/modules/web.dom-collections.iterator"),t("core-js/modules/es.symbol"),t("core-js/modules/es.symbol.description"),t("core-js/modules/es.symbol.iterator"),t("core-js/modules/es.array.for-each"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.array.slice"),t("core-js/modules/es.array.splice"),t("core-js/modules/es.object.get-own-property-names"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.string.iterator"),t("core-js/modules/web.dom-collections.for-each"),t("core-js/modules/web.dom-collections.iterator"),Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,t("./shim");var i=function(t){if(t&&t.__esModule)return t;if(null===t||"object"!==s(t)&&"function"!=typeof t)return{default:t};var r,o=a();if(o&&o.has(t))return o.get(t);var n,i={},l=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(n in t)Object.prototype.hasOwnProperty.call(t,n)&&((r=l?Object.getOwnPropertyDescriptor(t,n):null)&&(r.get||r.set)?Object.defineProperty(i,n,r):i[n]=t[n]);return i.default=t,o&&o.set(t,i),i}(t("./constants"));function a(){var t;return"function"!=typeof WeakMap?null:(t=new WeakMap,a=function(){return t},t)}function l(t,r){for(var o=0;o<r.length;o++){var n=r[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var u,c=function(){var t,r;function o(t,r){var n=this;if(!(this instanceof o))throw TypeError("Cannot call a class as a function");this._isGlobal=!t,this._setupDone=!1,this._preloadDone=!1,this._pixelDensity=Math.ceil(window.devicePixelRatio)||1,this._maxAllowedPixelDimensions=0,this._userNode=r,this._curElement=null,this._elements=[],this._glAttributes=null,this._requestAnimId=0,this._preloadCount=0,this._loop=!0,this._startListener=null,this._initializeInstanceVariables(),this._defaultCanvasSize={width:100,height:100},this._events={mousemove:null,mousedown:null,mouseup:null,dragend:null,dragover:null,click:null,dblclick:null,mouseover:null,mouseout:null,keydown:null,keyup:null,keypress:null,touchstart:null,touchmove:null,touchend:null,resize:null,blur:null},this._millisStart=-1,this._recording=!1,this.touchstart=!1,this.touchend=!1,this._lcg_random_state=null,this._gaussian_previous=!1,this._events.wheel=null,this._loadingScreenId="p5_loading",this._registeredMethods={};var r=Object.getOwnPropertyNames(o.prototype._registeredMethods),s=!0,i=!1,a=void 0;try{for(var l,u=r[Symbol.iterator]();!(s=(l=u.next()).done);s=!0){var c=l.value;this._registeredMethods[c]=o.prototype._registeredMethods[c].slice()}}catch(t){i=!0,a=t}finally{try{s||null==u.return||u.return()}finally{if(i)throw a}}window.DeviceOrientationEvent&&(this._events.deviceorientation=null),window.DeviceMotionEvent&&!window._isNodeWebkit&&(this._events.devicemotion=null),o.prototype.callRegisteredHooksFor=function(t){var r=this||o.prototype,n=this._isGlobal?window:this;if(r._registeredMethods.hasOwnProperty(t)){var r=r._registeredMethods[t],s=!0,t=!1,i=void 0;try{for(var a,l=r[Symbol.iterator]();!(s=(a=l.next()).done);s=!0){var u=a.value;"function"==typeof u&&u.call(n)}}catch(r){t=!0,i=r}finally{try{s||null==l.return||l.return()}finally{if(t)throw i}}}},this._start=function(){n._userNode&&"string"==typeof n._userNode&&(n._userNode=document.getElementById(n._userNode));var t=n._isGlobal?window:n;if(t.preload){n.callRegisteredHooksFor("beforePreload");var r,s=document.getElementById(n._loadingScreenId),i=(s||((s=document.createElement("div")).innerHTML="Loading...",s.style.position="absolute",s.id=n._loadingScreenId,(n._userNode||document.body).appendChild(s)),n._preloadMethods);for(r in i){i[r]=i[r]||o;var a=i[r];a!==o.prototype&&a!==o||(n._isGlobal&&(window[r]=n._wrapPreload(n,r)),a=n),n._registeredPreloadMethods[r]=a[r],a[r]=n._wrapPreload(a,r)}t.preload(),n._runIfPreloadsAreDone()}else n._setup(),n._recording||n._draw()},this._runIfPreloadsAreDone=function(){var t,r=this._isGlobal?window:this;0===r._preloadCount&&((t=document.getElementById(r._loadingScreenId))&&t.parentNode.removeChild(t),this.callRegisteredHooksFor("afterPreload"),this._setupDone||(this._lastTargetFrameTime=window.performance.now(),this._lastRealFrameTime=window.performance.now(),r._setup(),this._recording||r._draw()))},this._decrementPreload=function(){var t=this._isGlobal?window:this;t._preloadDone||"function"!=typeof t.preload||(t._setProperty("_preloadCount",t._preloadCount-1),t._runIfPreloadsAreDone())},this._wrapPreload=function(t,r){var o=this;return function(){o._incrementPreload();for(var n=arguments.length,s=Array(n),i=0;i<n;i++)s[i]=arguments[i];return o._registeredPreloadMethods[r].apply(t,s)}},this._incrementPreload=function(){var t=this._isGlobal?window:this;t._preloadDone||t._setProperty("_preloadCount",t._preloadCount+1)},this._setup=function(){n.callRegisteredHooksFor("beforeSetup"),n.createCanvas(n._defaultCanvasSize.width,n._defaultCanvasSize.height,"p2d");var t=n._isGlobal?window:n;if("function"==typeof t.preload)for(var r in n._preloadMethods)t[r]=n._preloadMethods[r][r],t[r]&&n&&(t[r]=t[r].bind(n));n._millisStart=window.performance.now(),t._preloadDone=!0,"function"==typeof t.setup&&t.setup();var o=document.getElementsByTagName("canvas"),s=!0,i=!1,a=void 0;try{for(var l,u=o[Symbol.iterator]();!(s=(l=u.next()).done);s=!0){var c=l.value;"true"===c.dataset.hidden&&(c.style.visibility="",delete c.dataset.hidden)}}catch(t){i=!0,a=t}finally{try{s||null==u.return||u.return()}finally{if(i)throw a}}n._lastTargetFrameTime=window.performance.now(),n._lastRealFrameTime=window.performance.now(),n._setupDone=!0,(n._accessibleOutputs.grid||n._accessibleOutputs.text)&&n._updateAccsOutput(),n.callRegisteredHooksFor("afterSetup")},this._draw=function(t){var t=t||window.performance.now(),r=t-n._lastTargetFrameTime,o=1e3/n._targetFrameRate;(!n._loop||o-5<=r)&&(n.deltaTime=t-n._lastRealFrameTime,n._setProperty("deltaT
1ime",n.deltaTime),n._frameRate=1e3/n.deltaTime,n.redraw(),n._lastTargetFrameTime=Math.max(n._lastTargetFrameTime+o,t),n._lastRealFrameTime=t,void 0!==n._updateMouseCoords&&(n._updateMouseCoords(),n._setProperty("movedX",0),n._setProperty("movedY",0))),n._loop&&(n._requestAnimId=window.requestAnimationFrame(n._draw))},this._setProperty=function(t,r){n[t]=r,n._isGlobal&&(window[t]=r)},this.remove=function(){n._startListener&&window.removeEventListener("load",n._startListener,!1);var t=document.getElementById(n._loadingScreenId);if(t&&(t.parentNode.removeChild(t),n._incrementPreload()),n._curElement){for(var r in n._loop=!1,n._requestAnimId&&window.cancelAnimationFrame(n._requestAnimId),n._events)window.removeEventListener(r,n._events[r]);var s=!0,t=!1,i=void 0;try{for(var a,l=n._elements[Symbol.iterator]();!(s=(a=l.next()).done);s=!0){var u,c=a.value;for(u in c.elt&&c.elt.parentNode&&c.elt.parentNode.removeChild(c.elt),c._events)c.elt.removeEventListener(u,c._events[u])}}catch(r){t=!0,i=r}finally{try{s||null==l.return||l.return()}finally{if(t)throw i}}n._registeredMethods.remove.forEach(function(t){void 0!==t&&t.call(n)})}if(n._isGlobal){for(var d in o.prototype)try{delete window[d]}catch(t){window[d]=void 0}for(var h in n)if(n.hasOwnProperty(h))try{delete window[h]}catch(t){window[h]=void 0}o.instance=null}};var d,h,f=this._createFriendlyGlobalFunctionBinder();if(this._isGlobal){for(var p in o.instance=this,o.prototype)"function"==typeof o.prototype[p]?(d=p.substring(2),this._events.hasOwnProperty(d)||f(p,Math.hasOwnProperty(p)&&Math[p]===o.prototype[p]?o.prototype[p]:o.prototype[p].bind(this))):f(p,o.prototype[p]);for(var m in this)this.hasOwnProperty(m)&&f(m,this[m])}else t(this),o._checkForUserDefinedFunctions(this);for(h in this._updateWindowSize(),this.callRegisteredHooksFor("init"),this._setupPromisePreloads(),this._events){var y=this["_on".concat(h)];y&&(y=y.bind(this),window.addEventListener(h,y,{passive:!1}),this._events[h]=y)}function g(){n._setProperty("focused",!0)}function v(){n._setProperty("focused",!1)}window.addEventListener("focus",g),window.addEventListener("blur",v),this.registerMethod("remove",function(){window.removeEventListener("focus",g),window.removeEventListener("blur",v)}),"complete"===document.readyState?this._start():(this._startListener=this._start.bind(this),window.addEventListener("load",this._startListener,!1))}return t=[{key:"_initializeInstanceVariables",value:function(){this._accessibleOutputs={text:!1,grid:!1,textLabel:!1,gridLabel:!1},this._styles=[],this._bezierDetail=20,this._curveDetail=20,this._colorMode=i.RGB,this._colorMaxes={rgb:[255,255,255,255],hsb:[360,100,100,1],hsl:[360,100,100,1]},this._downKeys={}}},{key:"registerPreloadMethod",value:function(t,r){o.prototype._preloadMethods.hasOwnProperty(t)||(o.prototype._preloadMethods[t]=r)}},{key:"registerMethod",value:function(t,r){var n=this||o.prototype;n._registeredMethods.hasOwnProperty(t)||(n._registeredMethods[t]=[]),n._registeredMethods[t].push(r)}},{key:"unregisterMethod",value:function(t,r){var n=this||o.prototype;if(n._registeredMethods.hasOwnProperty(t)){for(var s=n._registeredMethods[t],i=[],a=0;a<s.length;a++)s[a]===r&&i.push(a);for(var l=i.length-1;0<=l;l--)s.splice(i[l],1)}}},{key:"_createFriendlyGlobalFunctionBinder",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},r=t.globalObject||window;return t.log||console.log.bind(console),function(t,n){o.disableFriendlyErrors,r[t]=n}}}],l(o.prototype,t),r&&l(o,r),o}();for(u in c.instance=null,c.disableFriendlyErrors=!1,i)c.prototype[u]=i[u];c.VERSION=i.VERSION,c.prototype._preloadMethods={loadJSON:c.prototype,loadImage:c.prototype,loadStrings:c.prototype,loadXML:c.prototype,loadBytes:c.prototype,loadTable:c.prototype,loadFont:c.prototype,loadModel:c.prototype,loadShader:c.prototype},c.prototype._registeredMethods={init:[],pre:[],post:[],remove:[]},c.prototype._registeredPreloadMethods={},o.default=c},{"./constants":272,"./shim":294,"core-js/modules/es.array.for-each":161,"core-js/modules/es.array.iterator":165,"core-js/modules/es.array.slice":169,"core-js/modules/es.array.splice":171,"core-js/modules/es.object.get-own-property-descriptor":186,"core-js/modules/es.object.get-own-property-names":187,"core-js/modules/es.object.to-string":190,"core-js/modules/es.string.iterator":200,"core-js/modules/es.symbol":212,"core-js/modules/es.symbol.description":210,"core-js/modules/es.symbol.iterator":211,"core-js/modules/es.weak-map":244,"core-js/modules/web.dom-collections.for-each":245,"core-js/modules/web.dom-collections.iterator":246}],284:[function(t,r,o){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;var n=(t=t("./main"))&&t.__esModule?t:{default:t};function s(t,r){for(var o=0;o<r.length;o++){var n=r[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}n.default.Element=function(){var t,r;function o(t,r){if(!(this instanceof o))throw TypeError("Cannot call a class as a function");this.elt=t,this._pInst=this._pixelsState=r,this._events={},this.width=this.elt.offsetWidth,this.height=this.elt.offsetHeight}return r=[{key:"_adjustListener",value:function(t,r,o){return!1===r?n.default.Element._detachListener(t,o):n.default.Element._attachListener(t,r,o),this}},{key:"_attachListener",value:function(t,r,o){o._events[t]&&n.default.Element._detachListener(t,o),r=r.bind(o),o.elt.addEventListener(t,r,!1),o._events[t]=r}},{key:"_detachListener",value:function(t,r){var o=r._events[t];r.elt.removeEventListener(t,o,!1),r._events[t]=null}}],t=[{key:"parent",value:function(t){return void 0===t?this.elt.parentNode:("str
1ing"==typeof t?("#"===t[0]&&(t=t.substring(1)),t=document.getElementById(t)):t instanceof n.default.Element&&(t=t.elt),t.appendChild(this.elt),this)}},{key:"id",value:function(t){return void 0===t?this.elt.id:(this.elt.id=t,this.width=this.elt.offsetWidth,this.height=this.elt.offsetHeight,this)}},{key:"class",value:function(t){return void 0===t?this.elt.className:(this.elt.className=t,this)}},{key:"mousePressed",value:function(t){return n.default.Element._adjustListener("mousedown",function(r){return this._pInst._setProperty("mouseIsPressed",!0),this._pInst._setMouseButton(r),t.call(this,r)},this),this}},{key:"doubleClicked",value:function(t){return n.default.Element._adjustListener("dblclick",t,this),this}},{key:"mouseWheel",value:function(t){return n.default.Element._adjustListener("wheel",t,this),this}},{key:"mouseReleased",value:function(t){return n.default.Element._adjustListener("mouseup",t,this),this}},{key:"mouseClicked",value:function(t){return n.default.Element._adjustListener("click",t,this),this}},{key:"mouseMoved",value:function(t){return n.default.Element._adjustListener("mousemove",t,this),this}},{key:"mouseOver",value:function(t){return n.default.Element._adjustListener("mouseover",t,this),this}},{key:"mouseOut",value:function(t){return n.default.Element._adjustListener("mouseout",t,this),this}},{key:"touchStarted",value:function(t){return n.default.Element._adjustListener("touchstart",t,this),this}},{key:"touchMoved",value:function(t){return n.default.Element._adjustListener("touchmove",t,this),this}},{key:"touchEnded",value:function(t){return n.default.Element._adjustListener("touchend",t,this),this}},{key:"dragOver",value:function(t){return n.default.Element._adjustListener("dragover",t,this),this}},{key:"dragLeave",value:function(t){return n.default.Element._adjustListener("dragleave",t,this),this}},{key:"_setProperty",value:function(t,r){this[t]=r}}],s(o.prototype,t),r&&s(o,r),o}(),t=n.default.Element,o.default=t},{"./main":283}],285:[function(t,r,o){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function s(t){return(s="function"==typeof Symbol&&"symbol"===n(Symbol.iterator)?function(t){return n(t)}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":n(t)})(t)}t("core-js/modules/es.symbol"),t("core-js/modules/es.symbol.description"),t("core-js/modules/es.symbol.iterator"),t("core-js/modules/es.array.index-of"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.array.splice"),t("core-js/modules/es.object.get-own-property-descriptor"),t("core-js/modules/es.object.get-prototype-of"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.reflect.construct"),t("core-js/modules/es.regexp.to-string"),t("core-js/modules/es.string.iterator"),t("core-js/modules/es.weak-map"),t("core-js/modules/web.dom-collections.iterator"),t("core-js/modules/es.array.index-of"),t("core-js/modules/es.array.splice"),t("core-js/modules/es.object.get-prototype-of"),Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;var i=(p=t("./main"))&&p.__esModule?p:{default:p},a=function(t){if(t&&t.__esModule)return t;if(null===t||"object"!==s(t)&&"function"!=typeof t)return{default:t};var r,o=l();if(o&&o.has(t))return o.get(t);var n,i={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(n in t)Object.prototype.hasOwnProperty.call(t,n)&&((r=a?Object.getOwnPropertyDescriptor(t,n):null)&&(r.get||r.set)?Object.defineProperty(i,n,r):i[n]=t[n]);return i.default=t,o&&o.set(t,i),i}(t("./constants"));function l(){var t;return"function"!=typeof WeakMap?null:(t=new WeakMap,l=function(){return t},t)}function u(t,r){for(var o=0;o<r.length;o++){var n=r[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function c(t,r){return(c=Object.setPrototypeOf||function(t,r){return t.__proto__=r,t})(t,r)}function d(t,r){return r&&("object"===s(r)||"function"==typeof r)?r:h(t)}function h(t){if(void 0===t)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function f(t){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}i.default.Graphics=function(t){var r=s;if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");r.prototype=Object.create(t&&t.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),t&&c(r,t);var o,n=function(){var t=f(s);return d(this,!function(){if("undefined"!=typeof Reflect&&Reflect.construct&&!Reflect.construct.sham){if("function"==typeof Proxy)return 1;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),1}catch(t){}}}()?t.apply(this,arguments):Reflect.construct(t,arguments,f(this).constructor))};function s(t,r,o,l,u){if(!(this instanceof s))throw TypeError("Cannot call a class as a function");p=u||document.createElement("canvas"),(c=n.call(this,p,l)).canvas=p;var c,f,p=o||a.P2D,o=l._userNode||document.body;for(f in u||o.appendChild(c.canvas),i.default.prototype)c[f]||("function"==typeof i.default.prototype[f]?c[f]=i.default.prototype[f].bind(h(c)):c[f]=i.default.prototype[f]);return i.default.prototype._initializeInstanceVariables.apply(h(c)),c.width=t,c.height=r,c._pixelDensity=l._pixelDensity,p===a.WEBGL?(c._renderer=new i.default.RendererGL(c.canvas,h(c),!1),t=(u=c._renderer._adjustDimensions(t,r)).adjustedWidth,r=u.adjustedHeight):c._renderer=new i.default.Renderer2D(c.canvas,h(c),!1),l._elements.push(h(c)),Object.defineProperty(h(c),"deltaTime",{get:function(){return this._pInst.deltaTime}}),c._renderer.resize(t,r),c._renderer._applyDefaults(),d(c,h(c))}return r=s,t=[{key:"reset",value:function(){this._renderer.resetMatrix(),this._renderer.isP3D&&this._renderer._update()}},{key:"remove",value:function(){this.elt.parentNode&&this.elt.parentNode.removeChild(this.elt);var t,r=this._pInst._elements.indexOf(this);for(t in -1!==r&&this._pInst._elements.splice(r,1),this._events)this.elt.removeEventListener(t,this._events[t]);this._renderer=void 0,this.canvas=void 0,this.elt=void 0}},{key:"createFramebuffer",value:function(t){return new i.default.Framebuffer(this,t)}}],u(r.prototype,t),o&&u(r,o),s}(i.default.Element);var p=i.default.Graphics;o.default=p},{"./constants":272,"./main":283,"core-js/modules/es.array.index-of":164,"core-js/modules/es.array.iterator":165,"core-js/modules/es.array.splice":171,"core-js/modules/es.object.get-own-property-descriptor":186,"core-js/modules/es.object.get-prototype-of":188,"core-js/modules/es.object.to-string":190,"core-js/modules/es.reflect.construct":192,"core-js/modules/es.regexp.to-string":196,"core-js/modules/es.string.iterator":200,"core-js/modules/es.symbol":212,"core-js/modules/es.symbol.description":210,"core-js/modules/es.symbol.iterator":211,"core-js/modules/es.weak-map":244,"core-js/modules/web.dom-collections.iterator":246}],286:[function(t,r,o){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}t("core-js/modules/es.symbol"),t("core-js/modules/es.symbol.description"),t("core-js/modules/es.symbol.iterator"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.number.constructor"),t("core-js/modules/es.object.assign"),t("core-js/modules/es.object.get-own-property-descriptor"),t("core-js/modules/es.object.get-prototype-of"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.reflect.construct"),t("core-js/modules/es.regexp.exec"),t("core-js/modules/es.regexp.to-string"),t("core-js/modules/es.string.iterator"),t("core-js/modules/es.string.replace"),t("core-js/modules/es.string.split"),t("core-js/modules/es.string.trim"),t("
1core-js/modules/es.weak-map"),t("core-js/modules/web.dom-collections.iterator"),t("core-js/modules/es.number.constructor"),t("core-js/modules/es.object.assign"),t("core-js/modules/es.object.get-prototype-of"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.regexp.exec"),t("core-js/modules/es.regexp.to-string"),t("core-js/modules/es.string.replace"),t("core-js/modules/es.string.split"),t("core-js/modules/es.string.trim"),Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;var s=(f=t("./main"))&&f.__esModule?f:{default:f},i=function(t){if(t&&t.__esModule)return t;if(null===t||"object"!==l(t)&&"function"!=typeof t)return{default:t};var r,o=a();if(o&&o.has(t))return o.get(t);var n,s={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(n in t)Object.prototype.hasOwnProperty.call(t,n)&&((r=i?Object.getOwnPropertyDescriptor(t,n):null)&&(r.get||r.set)?Object.defineProperty(s,n,r):s[n]=t[n]);return s.default=t,o&&o.set(t,s),s}(t("../core/constants"));function a(){var t;return"function"!=typeof WeakMap?null:(t=new WeakMap,a=function(){return t},t)}function l(t){return(l="function"==typeof Symbol&&"symbol"===n(Symbol.iterator)?function(t){return n(t)}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":n(t)})(t)}function u(t,r){for(var o=0;o<r.length;o++){var n=r[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function c(t,r){return(c=Object.setPrototypeOf||function(t,r){return t.__proto__=r,t})(t,r)}function d(t){if(void 0===t)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function h(t){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var f=function(t){var r=a;if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");r.prototype=Object.create(t&&t.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),t&&c(r,t);var o,n=function(){var t,r,o=h(a);return t=!function(){if("undefined"!=typeof Reflect&&Reflect.construct&&!Reflect.construct.sham){if("function"==typeof Proxy)return 1;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),1}catch(t){}}}()?o.apply(this,arguments):Reflect.construct(o,arguments,t=h(this).constructor),o=this,(r=t)&&("object"===l(r)||"function"==typeof r)?r:d(o)};function a(t,r,o){var s;if(this instanceof a)return(s=n.call(this,t,r)).canvas=t,s._pixelsState=r,o?(s._isMainCanvas=!0,s._pInst._setProperty("_curElement",d(s)),s._pInst._setProperty("canvas",s.canvas),s._pInst._setProperty("width",s.width),s._pInst._setProperty("height",s.height)):(s.canvas.style.display="none",s._styles=[]),s._clipping=!1,s._clipInvert=!1,s._textSize=12,s._textLeading=15,s._textFont="sans-serif",s._textStyle=i.NORMAL,s._textAscent=null,s._textDescent=null,s._textAlign=i.LEFT,s._textBaseline=i.BASELINE,s._textWrap=i.WORD,s._rectMode=i.CORNER,s._ellipseMode=i.CENTER,s._curveTightness=0,s._imageMode=i.CORNER,s._tint=null,s._doStroke=!0,s._doFill=!0,s._strokeSet=!1,s._fillSet=!1,s._leadingSet=!1,s._pushPopDepth=0,s;throw TypeError("Cannot call a class as a function")}return r=a,t=[{key:"push",value:function(){return this._pushPopDepth++,{properties:{_doStroke:this._doStroke,_strokeSet:this._strokeSet,_doFill:this._doFill,_fillSet:this._fillSet,_tint:this._tint,_imageMode:this._imageMode,_rectMode:this._rectMode,_ellipseMode:this._ellipseMode,_textFont:this._textFont,_textLeading:this._textLeading,_leadingSet:this._leadingSet,_textSize:this._textSize,_textAlign:this._textAlign,_textBaseline:this._textBaseline,_textStyle:this._textStyle,_textWrap:this._textWrap}}}},{key:"pop",value:function(t){this._pushPopDepth--,t.properties&&Object.assign(this,t.properties)}},{key:"beginClip",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};if(this._clipping)throw Error("It looks like you're trying to clip while already in the middle of clipping. Did you forget to endClip()?");this._clipping=!0,this._clipInvert=t.invert}},{key:"endClip",value:function(){if(!this._clipping)throw Error("It looks like you've called endClip() without beginClip(). Did
1you forget to call beginClip() first?");this._clipping=!1}},{key:"resize",value:function(t,r){this.width=t,this.height=r,this.elt.width=t*this._pInst._pixelDensity,this.elt.height=r*this._pInst._pixelDensity,this.elt.style.width="".concat(t,"px"),this.elt.style.height="".concat(r,"px"),this._isMainCanvas&&(this._pInst._setProperty("width",this.width),this._pInst._setProperty("height",this.height))}},{key:"get",value:function(t,r,o,n){var i=this._pixelsState,a=i._pixelDensity,l=this.canvas;if(void 0===t&&void 0===r)t=r=0,o=i.width,n=i.height;else if(t*=a,r*=a,void 0===o&&void 0===n)return t<0||r<0||t>=l.width||r>=l.height?[0,0,0,0]:this._getPixel(t,r);return(i=new s.default.Image(o*a,n*a)).pixelDensity(a),i.canvas.getContext("2d").drawImage(l,t,r,o*a,n*a,0,0,o*a,n*a),i}},{key:"textLeading",value:function(t){return"number"==typeof t?(this._setProperty("_leadingSet",!0),this._setProperty("_textLeading",t),this._pInst):this._textLeading}},{key:"textStyle",value:function(t){return t?(t!==i.NORMAL&&t!==i.ITALIC&&t!==i.BOLD&&t!==i.BOLDITALIC||this._setProperty("_textStyle",t),this._applyTextProperties()):this._textStyle}},{key:"textAscent",value:function(){return null===this._textAscent&&this._updateTextMetrics(),this._textAscent}},{key:"textDescent",value:function(){return null===this._textDescent&&this._updateTextMetrics(),this._textDescent}},{key:"textAlign",value:function(t,r){return void 0!==t?(this._setProperty("_textAlign",t),void 0!==r&&this._setProperty("_textBaseline",r),this._applyTextProperties()):{horizontal:this._textAlign,vertical:this._textBaseline}}},{key:"textWrap",value:function(t){return this._setProperty("_textWrap",t),this._textWrap}},{key:"text",value:function(t,r,o,n,s){var a,l,u,c=this._pInst,d=this._textWrap,h=Number.MAX_VALUE,f=o;if((this._doFill||this._doStroke)&&void 0!==t){if(a=(t=(t="string"!=typeof t?t.toString():t).replace(/(\t)/g," ")).split("\n"),void 0!==n){switch(this._rectMode===i.CENTER&&(r-=n/2),this._textAlign){case i.CENTER:r+=n/2;break;case i.RIGHT:r+=n}if(void 0!==s){this._rectMode===i.CENTER&&(o-=s/2,f-=s/2);var t=o,p=c.textAscent();switch(this._textBaseline){case i.BOTTOM:o=Math.max(o+s,o),f+=p;break;case i.CENTER:o=Math.max(o+s/2,o),f+=p/2}h=o+s-p,this._textBaseline===i.CENTER&&(h=t+s-p/2)}else this._textBaseline!==i.BOTTOM&&this._textBaseline!==i.CENTER||(f=o-(t=c.textSize()*this._textLeading)/2,h=o+t/2);if(d===i.WORD){for(var m=[],y=0;y<a.length;y++){for(var g="",v=a[y].split(" "),b=0;b<v.length;b++)l="".concat(g+v[b])+" ",g=n<(u=this.textWidth(l))&&0<g.length?(m.push(g),"".concat(v[b])+" "):l;m.push(g)}var _=0;this._textBaseline===i.CENTER?_=(m.length-1)*c.textLeading()/2:this._textBaseline===i.BOTTOM&&(_=(m.length-1)*c.textLeading());for(var j=0;j<a.length;j++){g="",v=a[j].split(" ");for(var x=0;x<v.length;x++)l="".concat(g+v[x])+" ",n<(u=this.textWidth(l))&&0<g.length?(this._renderText(c,g.trim(),r,o-_,h,f),g="".concat(v[x])+" ",o+=c.textLeading()):g=l;this._renderText(c,g.trim(),r,o-_,h,f),o+=c.textLeading()}}else{for(var w=[],S=0;S<a.length;S++)for(var T=a[S].split(g=""),E=0;E<T.length;E++)l="".concat(g+T[E]),(u=this.textWidth(l))<=n?g+=T[E]:n<u&&0<g.length&&(w.push(g),g="".concat(T[E]));w.push(g);var M=0;this._textBaseline===i.CENTER?M=(w.length-1)*c.textLeading()/2:this._textBaseline===i.BOTTOM&&(M=(w.length-1)*c.textLeading());for(var k=0;k<a.length;k++){T=a[k].split(g="");for(var O=0;O<T.length;O++)l="".concat(g+T[O]),(u=this.textWidth(l))<=n?g+=T[O]:n<u&&0<g.length&&(this._renderText(c,g.trim(),r,o-M,h,f),o+=c.textLeading(),g="".concat(T[O]))}this._renderText(c,g.trim(),r,o-M,h,f),o+=c.textLeading()}}else{var C=0;this._textBaseline===i.CENTER?C=(a.length-1)*c.textLeading()/2:this._textBaseline===i.BOTTOM&&(C=(a.length-1)*c.textLeading());for(var P=0;P<a.length;P++)this._renderText(c,a[P],r,o-C,h,f-C),o+=c.textLeading()}return c}}},{key:"_applyDefaults",value:function(){return this}},{key:"_isOpenType",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:this._textFont;return"object"===l(t)&&t.font&&t.font.supported}},{key:"_updateTextMetrics",value:function(){var t,r,o,n,s,i;return this._isOpenType()?(this._setProperty("_textAscent",this._textFont._textAscent()),this._setProperty("_textDescent",this._textFont._textDescent())):((t=document.createElement("span")).style.fontFamily=this._textFont,t.style.fontSize="".concat(this._textSize,"px"),t.innerHTML="ABCjgq|",(i=document.createElement("div")).style.display="inline-block",i.style.width="1px",i.style.height="0px",(r=document.createElement("div")).appendChild(t),r.appendChild(i),r.style.height="0px",r.style.overflow="hidden",document.body.appendChild(r),i.style.verticalAlign="baseline",n=p(i),s=p(t),o=n[1]-s[1],i.style.verticalAlign="bottom",n=p(i),s=p(t),i=n[1]-s[1]-o,document.body.removeChild(r),this._setProperty("_textAscent",o),this._setProperty("_textDescent",i)),this}}],u(r.prototype,t),o&&u(r,o),a}(s.default.Element);function p(t){var r=0,o=0;if(t.offsetParent)for(;r+=t.offsetLeft,o+=t.offsetTop,t=t.offsetParent;);else r+=t.offsetLeft,o+=t.offsetTop;return[r,o]}f.prototype.textSize=function(t){return"number"==typeof t?(this._setProperty("_textSize",t),this._leadingSet||this._setProperty("_textLeading",t*i._DEFAULT_LEADMULT),this._applyTextProperties()):this._textSize},s.default.Renderer=f,t=s.default.Renderer,o.default=t},{"../core/constants":272,"./main":283,"core-js/modules/es.array.iterator":165,"core-js/modules/es.number.constructor":1
179,"core-js/modules/es.object.assign":183,"core-js/modules/es.object.get-own-property-descriptor":186,"core-js/modules/es.object.get-prototype-of":188,"core-js/modules/es.object.to-string":190,"core-js/modules/es.reflect.construct":192,"core-js/modules/es.regexp.exec":195,"core-js/modules/es.regexp.to-string":196,"core-js/modules/es.string.iterator":200,"core-js/modules/es.string.replace":204,"core-js/modules/es.string.split":206,"core-js/modules/es.string.trim":209,"core-js/modules/es.symbol":212,"core-js/modules/es.symbol.description":210,"core-js/modules/es.symbol.iterator":211,"core-js/modules/es.weak-map":244,"core-js/modules/web.dom-collections.iterator":246}],287:[function(t,r,o){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function s(t){return(s="function"==typeof Symbol&&"symbol"===n(Symbol.iterator)?function(t){return n(t)}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":n(t)})(t)}t("core-js/modules/es.symbol"),t("core-js/modules/es.symbol.description"),t("core-js/modules/es.symbol.iterator"),t("core-js/modules/es.array.concat"),t("core-js/modules/es.array.fill"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.array.join"),t("core-js/modules/es.array.slice"),t("core-js/modules/es.function.name"),t("core-js/modules/es.object.get-own-property-descriptor"),t("core-js/modules/es.object.get-prototype-of"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.reflect.construct"),t("core-js/modules/es.reflect.get"),t("core-js/modules/es.regexp.exec"),t("core-js/modules/es.regexp.to-string"),t("core-js/modules/es.string.iterator"),t("core-js/modules/es.weak-map"),t("core-js/modules/web.dom-collections.iterator"),t("core-js/modules/es.array.concat"),t("core-js/modules/es.array.fill"),t("core-js/modules/es.array.join"),t("core-js/modules/es.array.slice"),t("core-js/modules/es.function.name"),t("core-js/modules/es.object.get-prototype-of"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.regexp.exec"),t("core-js/modules/es.regexp.to-string"),Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;var i=(p=t("./main"))&&p.__esModule?p:{default:p},a=function(t){if(t&&t.__esModule)return t;if(null===t||"object"!==s(t)&&"function"!=typeof t)return{default:t};var r,o=l();if(o&&o.has(t))return o.get(t);var n,i={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(n in t)Object.prototype.hasOwnProperty.call(t,n)&&((r=a?Object.getOwnPropertyDescriptor(t,n):null)&&(r.get||r.set)?Object.defineProperty(i,n,r):i[n]=t[n]);return i.default=t,o&&o.set(t,i),i}(t("./constants"));function l(){var t;return"function"!=typeof WeakMap?null:(t=new WeakMap,l=function(){return t},t)}function u(t,r){for(var o=0;o<r.length;o++){var n=r[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function c(t,r,o){return(c="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,r,o){var t=function(t,r){for(;!Object.prototype.hasOwnProperty.call(t,r)&&null!==(t=h(t)););return t}(t,r);if(t)return(t=Object.getOwnPropertyDescriptor(t,r)).get?t.get.call(o):t.value})(t,r,o||t)}function d(t,r){return(d=Object.setPrototypeOf||function(t,r){return t.__proto__=r,t})(t,r)}function h(t){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}t("./p5.Renderer");var f="rgba(0,0,0,0)",p=function(t){var r=l;if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");r.prototype=Object.create(t&&t.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),t&&d(r,t);var o,n=function(){var t,r=h(l),r=(t=!function(){if("undefined"!=typeof Reflect&&Reflect.construct&&!Reflect.construct.sham){if("function"==typeof Proxy)return 1;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),1}catch(t){}}}()?r.apply(this,arguments):Reflect.construct(r,arguments,t=h(this).constructor),this);if(!t||"object"!==s(t)&&"function"!=typeof t){if(void 0!==r)return r;throw ReferenceError("this hasn't been initialised - super() hasn't been called")}return t};function l(t,r,o){if(this instanceof l)return(t=n.call(this,t,r,o)).drawingContext=t.canvas.getContext("2d"),t._pInst._setProperty("drawingContext",t.drawingContext),t;throw TypeError("Cannot call a class as a function")}return r=l,t=[{key:"getFilterGraphicsLayer",value:function(){var t;return this.filterGraphicsLayer||(t=(this._pInst instanceof i.default.Graphics?this._pInst:this)._pInst,this.filterGraphicsLayer=new i.default.Graphics(this.width,this.height,a.WEBGL,t)),this.filterGraphicsLayer.width===this.width&&this.filterGraphicsLayer.height===this.height||this.filterGraphicsLayer.resizeCanvas(this.width,this.height),this.filterGraphicsLayer.pixelDensity()!==this._pInst.pixelDensity()&&this.filterGraphicsLayer.pixelDensity(this._pInst.pixelDensity()),this.filterGraphicsLayer}},{key:"_applyDefaults",value:function(){this._cachedFillStyle=this._cachedStrokeStyle=void 0,this._cachedBlendMode=a.BLEND,this._setFill(a._DEFAULT_FILL),this._setStroke(a._DEFAULT_STROKE),this.drawingContext.lineCap=a.ROUND,this.drawingContext.font="normal 12px sans-serif"}},{key:"resize",value:function(t,r){c(h(l.prototype),"resize",this).call(this,t,r),this.drawingContext.scale(this._pInst._pixelDensity,this._pInst._pixelDensity)}},{key:"background",value:function(){var t,r;this.drawingContext.save(),this.resetMatrix(),(arguments.length<=0?void 0:arguments[0])instanceof i.default.Image?0<=(arguments.length<=1?void 0:arguments[1])?(t=arguments.length<=0?void 0:arguments[0],this.drawingContext.globalAlpha=(arguments.length<=1?void 0:arguments[1])/255,this._pInst.image(t,0,0,this.width,this.height)):this._pInst.image(arguments.length<=0?void 0:arguments[0],0,0,this.width,this.height):(t=this._getFill(),r=(r=this._pInst).color.apply(r,arguments),this._pInst._addAccsOutput()&&this._pInst._accsBackgroun
1d(r.levels),r=r.toString(),this._setFill(r),this._isErasing&&this.blendMode(this._cachedBlendMode),this.drawingContext.fillRect(0,0,this.width,this.height),this._setFill(t),this._isErasing&&this._pInst.erase()),this.drawingContext.restore()}},{key:"clear",value:function(){this.drawingContext.save(),this.resetMatrix(),this.drawingContext.clearRect(0,0,this.width,this.height),this.drawingContext.restore()}},{key:"fill",value:function(){var t=(t=this._pInst).color.apply(t,arguments);this._setFill(t.toString()),this._pInst._addAccsOutput()&&this._pInst._accsCanvasColors("fill",t.levels)}},{key:"stroke",value:function(){var t=(t=this._pInst).color.apply(t,arguments);this._setStroke(t.toString()),this._pInst._addAccsOutput()&&this._pInst._accsCanvasColors("stroke",t.levels)}},{key:"erase",value:function(t,r){this._isErasing||(this._cachedFillStyle=this.drawingContext.fillStyle,t=this._pInst.color(255,t).toString(),this.drawingContext.fillStyle=t,this._cachedStrokeStyle=this.drawingContext.strokeStyle,t=this._pInst.color(255,r).toString(),this.drawingContext.strokeStyle=t,r=this._cachedBlendMode,this.blendMode(a.REMOVE),this._cachedBlendMode=r,this._isErasing=!0)}},{key:"noErase",value:function(){this._isErasing&&(this.drawingContext.fillStyle=this._cachedFillStyle,this.drawingContext.strokeStyle=this._cachedStrokeStyle,this.blendMode(this._cachedBlendMode),this._isErasing=!1)}},{key:"beginClip",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},t=(c(h(l.prototype),"beginClip",this).call(this,t),this._cachedFillStyle=this.drawingContext.fillStyle,this._pInst.color(255,0).toString()),t=(this.drawingContext.fillStyle=t,this._cachedStrokeStyle=this.drawingContext.strokeStyle,this._pInst.color(255,0).toString()),t=(this.drawingContext.strokeStyle=t,this._cachedBlendMode);this.blendMode(a.BLEND),this._cachedBlendMode=t,this.drawingContext.beginPath(),this._clipInvert&&(this.drawingContext.moveTo(-2*this.width,-2*this.height),this.drawingContext.lineTo(-2*this.width,2*this.height),this.drawingContext.lineTo(2*this.width,2*this.height),this.drawingContext.lineTo(2*this.width,-2*this.height),this.drawingContext.closePath())}},{key:"endClip",value:function(){this._doFillStrokeClose(),this.drawingContext.clip(),c(h(l.prototype),"endClip",this).call(this),this.drawingContext.fillStyle=this._cachedFillStyle,this.drawingContext.strokeStyle=this._cachedStrokeStyle,this.blendMode(this._cachedBlendMode)}},{key:"image",value:function(t,r,o,n,s,a,l,u,c){t.gifProperties&&t._animateGif(this._pInst);try{i.default.MediaElement&&t instanceof i.default.MediaElement&&t._ensureCanvas();var d=(d=this._tint&&t.canvas?this._getTintedImageCanvas(t):d)||t.canvas||t.elt,h=1;t.width&&0<t.width&&(h=d.width/t.width),this._isErasing&&this.blendMode(this._cachedBlendMode),this.drawingContext.drawImage(d,h*r,h*o,h*n,h*s,a,l,u,c),this._isErasing&&this._pInst.erase()}catch(t){if("NS_ERROR_NOT_AVAILABLE"!==t.name)throw t}}},{key:"_getTintedImageCanvas",value:function(t){if(!t.canvas)return t;t.tintCanvas||(t.tintCanvas=document.createElement("canvas")),t.tintCanvas.width!==t.canvas.width&&(t.tintCanvas.width=t.canvas.width),t.tintCanvas.height!==t.canvas.height&&(t.tintCanvas.height=t.canvas.height);var r=t.tintCanvas.getContext("2d");
1return r.save(),r.clearRect(0,0,t.canvas.width,t.canvas.height),(this._tint[0]<255||this._tint[1]<255||this._tint[2]<255)&&(r.drawImage(t.canvas,0,0),r.globalCompositeOperation="luminosity",r.drawImage(t.canvas,0,0),r.globalCompositeOperation="color",r.drawImage(t.canvas,0,0),r.globalCompositeOperation="multiply",r.fillStyle="rgb(".concat(this._tint.slice(0,3).join(", "),")"),r.fillRect(0,0,t.canvas.width,t.canvas.height),r.globalCompositeOperation="destination-in"),r.globalAlpha=this._tint[3]/255,r.drawImage(t.canvas,0,0),r.restore(),t.tintCanvas}},{key:"blendMode",value:function(t){if(t===a.SUBTRACT)console.warn("blendMode(SUBTRACT) only works in WEBGL mode.");else{if(t!==a.BLEND&&t!==a.REMOVE&&t!==a.DARKEST&&t!==a.LIGHTEST&&t!==a.DIFFERENCE&&t!==a.MULTIPLY&&t!==a.EXCLUSION&&t!==a.SCREEN&&t!==a.REPLACE&&t!==a.OVERLAY&&t!==a.HARD_LIGHT&&t!==a.SOFT_LIGHT&&t!==a.DODGE&&t!==a.BURN&&t!==a.ADD)throw Error("Mode ".concat(t," not recognized."));this._cachedBlendMode=t,this.drawingContext.globalCompositeOperation=t}}},{key:"blend",value:function(){for(var t=this.drawingContext.globalCompositeOperation,r=arguments.length,o=Array(r),n=0;n<r;n++)o[n]=arguments[n];var s=o[o.length-1],a=Array.prototype.slice.call(o,0,o.length-1);this.drawingContext.globalCompositeOperation=s,i.default.prototype.copy.apply(this,a),this.drawingContext.globalCompositeOperation=t}},{key:"_getPixel",value:function(t,r){return[(t=this.drawingContext.getImageData(t,r,1,1).data)[0],t[1],t[2],t[3]]}},{key:"loadPixels",value:function(){var t=this._pixelsState,r=t._pixelDensity,o=this.width*r,r=this.height*r,o=this.drawingContext.getImageData(0,0,o,r);t._setProperty("imageData",o),t._setProperty("pixels",o.data)}},{key:"set",value:function(t,r,o){t=Math.floor(t),r=Math.floor(r);var n=this._pixelsState;if(o instanceof i.default.Image)this.drawingContext.save(),this.drawingContext.setTransform(1,0,0,1,0,0),this.drawingContext.scale(n._pixelDensity,n._pixelDensity),this.drawingContext.clearRect(t,r,o.width,o.height),this.drawingContext.drawImage(o.canvas,t,r),this.drawingContext.restore();else{var s=0,a=0,l=0,u=0,c=4*(r*n._pixelDensity*(this.width*n._pixelDensity)+t*n._pixelDensity);if(n.imageData||n.loadPixels(),"number"==typeof o)c<n.pixels.length&&(l=a=s=o,u=255);else if(Array.isArray(o)){if(o.length<4)throw Error("pixel array must be of the form [R, G, B, A]");c<n.pixels.length&&(s=o[0],a=o[1],l=o[2],u=o[3])}else o instanceof i.default.Color&&c<n.pixels.length&&(s=o.levels[0],a=o.levels[1],l=o.levels[2],u=o.levels[3]);for(var d=0;d<n._pixelDensity;d++)for(var h=0;h<n._pixelDensity;h++)c=4*((r*n._pixelDensity+h)*this.width*n._pixelDensity+(t*n._pixelDensity+d)),n.pixels[c]=s,n.pixels[c+1]=a,n.pixels[c+2]=l,n.pixels[c+3]=u}}},{key:"updatePixels",value:function(t,r,o,n){var s=this._pixelsState,i=s._pixelDensity;void 0===t&&void 0===r&&void 0===o&&void 0===n&&(r=t=0,o=this.width,n=this.height),t*=i,r*=i,o*=i,n*=i,this.gifProperties&&(this.gifProperties.frames[this.gifProperties.displayIndex].image=s.imageData),this.drawingContext.putImageData(s.imageData,0,0,t,r,o,n)}},{key:"arc",value:function(t,r,o,n,s,i,l){var u=this.drawingContext,t=t+o/2,r=r+n/2,o=o/2,n=n/2,c=!(l===a.CHORD||l===a.OPEN||(i-s)%a.TWO_PI==0);return this._doFill&&(this._clipping||u.beginPath(),u.ellipse(t,r,o,n,0,s,i),c&&u.lineTo(t,r),u.closePath(),this._clipping||u.fill()),this._doStroke&&(this._clipping||u.beginPath(),u.ellipse(t,r,o,n,0,s,i),l===a.PIE&&c&&u.lineTo(t,r),l!==a.PIE&&l!==a.CHORD||u.closePath(),this._clipping||u.stroke()),this}},{key:"ellipse",value:function(t){var r=this.drawingContext,o=this._doFill,n=this._doStroke,s=parseFloat(t[0]),i=parseFloat(t[1]),a=parseFloat(t[2]),t=parseFloat(t[3]);if(o&&!n){if(this._getFill()===f)return this}else if(!o&&n&&this._getStroke()===f)return this;s+=a/2,i+=t/2,a/=2,t/=2,this._clipping||r.beginPath(),r.ellipse(s,i,a,t,0,0,2*Math.PI),r.closePath(),!this._clipping&&o&&r.fill(),!this._clipping&&n&&r.stroke()}},{key:"line",value:function(t,r,o,n){var s=this.drawingContext;return this._doStroke&&this._getStroke()!==f&&(this._clipping||s.beginPath(),s.moveTo(t,r),s.lineTo(o,n),s.stroke()),this}},{key:"point",value:function(t,r){var o,n,s=this.drawingContext;return this._doStroke&&this._getStroke()!==f?(o=this._getStroke(),n=this._getFill(),this._clipping||this._setFill(o),this._clipping||s.beginPath(),s.arc(t,r,s.lineWidth/2,0,a.TWO_PI,!1),void(this._clipping||(s.fill(),this._setFill(n)))):this}},{key:"quad",value:function(t,r,o,n,s,i,a,l){var u=this.drawingContext,c=this._doFill,d=this._doStroke;
1if(c&&!d){if(this._getFill()===f)return this}else if(!c&&d&&this._getStroke()===f)return this;return this._clipping||u.beginPath(),u.moveTo(t,r),u.lineTo(o,n),u.lineTo(s,i),u.lineTo(a,l),u.closePath(),!this._clipping&&c&&u.fill(),!this._clipping&&d&&u.stroke(),this}},{key:"rect",value:function(t){var r,o,n=t[0],s=t[1],i=t[2],a=t[3],l=t[4],u=t[5],c=t[6],t=t[7],d=this.drawingContext,h=this._doFill,p=this._doStroke;if(h&&!p){if(this._getFill()===f)return this}else if(!h&&p&&this._getStroke()===f)return this;return this._clipping||d.beginPath(),void 0===l?d.rect(n,s,i,a):(void 0===u&&(u=l),void 0===c&&(c=u),void 0===t&&(t=c),p=(h=Math.abs(i))/2,o=(r=Math.abs(a))/2,d.roundRect(n,s,i,a,[l=r<2*(l=h<2*l?p:l)?o:l,u=r<2*(u=h<2*u?p:u)?o:u,c=r<2*(c=h<2*c?p:c)?o:c,t=r<2*(t=h<2*t?p:t)?o:t])),!this._clipping&&this._doFill&&d.fill(),!this._clipping&&this._doStroke&&d.stroke(),this}},{key:"triangle",value:function(t){var r=this.drawingContext,o=this._doFill,n=this._doStroke,s=t[0],i=t[1],a=t[2],l=t[3],u=t[4],t=t[5];if(o&&!n){if(this._getFill()===f)return this}else if(!o&&n&&this._getStroke()===f)return this;this._clipping||r.beginPath(),r.moveTo(s,i),r.lineTo(a,l),r.lineTo(u,t),r.closePath(),!this._clipping&&o&&r.fill(),!this._clipping&&n&&r.stroke()}},{key:"endShape",value:function(t,r,o,n,s,i,l){if(0!==r.length&&(this._doStroke||this._doFill)){var u,c,d,h=t===a.CLOSE,f=(h&&!i&&r.push(r[0]),r.length);if(o&&null===l){if(3<f){var p=[],m=1-this._curveTightness;for(this._clipping||this.drawingContext.beginPath(),this.drawingContext.moveTo(r[1][0],r[1][1]),c=1;c+2<f;c++)u=r[c],p[0]=[u[0],u[1]],p[1]=[u[0]+(m*r[c+1][0]-m*r[c-1][0])/6,u[1]+(m*r[c+1][1]-m*r[c-1][1])/6],p[2]=[r[c+1][0]+(m*r[c][0]-m*r[c+2][0])/6,r[c+1][1]+(m*r[c][1]-m*r[c+2][1])/6],p[3]=[r[c+1][0],r[c+1][1]],this.drawingContext.bezierCurveTo(p[1][0],p[1][1],p[2][0],p[2][1],p[3][0],p[3][1]);h&&this.drawingContext.lineTo(r[c+1][0],r[c+1][1]),this._doFillStrokeClose(h)}}else if(n&&null===l){for(this._clipping||this.drawingContext.beginPath(),c=0;c<f;c++)r[c].isVert?r[c].moveTo?this.drawingContext.moveTo(r[c][0],r[c][1]):this.drawingContext.lineTo(r[c][0],r[c][1]):this.drawingContext.bezierCurveTo(r[c][0],r[c][1],r[c][2],r[c][3],r[c][4],r[c][5]);this._doFillStrokeClose(h)}else if(s&&null===l){for(this._clipping||this.drawingContext.beginPath(),c=0;c<f;c++)r[c].isVert?r[c].moveTo?this.drawingContext.moveTo(r[c][0],r[c][1]):this.drawingContext.lineTo(r[c][0],r[c][1]):this.drawingContext.quadraticCurveTo(r[c][0],r[c][1],r[c][2],r[c][3]);this._doFillStrokeClose(h)}else if(l===a.POINTS)for(c=0;c<f;c++)u=r[c],this._doStroke&&this._pInst.stroke(u[6]),this._pInst.point(u[0],u[1]);else if(l===a.LINES)for(c=0;c+1<f;c+=2)u=r[c],this._doStroke&&this._pInst.stroke(r[c+1][6]),this._pInst.line(u[0],u[1],r[c+1][0],r[c+1][1]);else if(l===a.TRIANGLES)for(c=0;c+2<f;c+=3)u=r[c],this._clipping||this.drawingContext.beginPath(),this.drawingContext.moveTo(u[0],u[1]),this.drawingContext.lineTo(r[c+1][0],r[c+1][1]),this.drawingContext.lineTo(r[c+2][0],r[c+2][1]),this.drawingContext.closePath(),!this._clipping&&this._doFill&&(this._pInst.fill(r[c+2][5]),this.drawingContext.fill()),!this._clipping&&this._doStroke&&(this._pInst.stroke(r[c+2][6]),this.drawingContext.stroke());else if(l===a.TRIANGLE_STRIP)for(c=0;c+1<f;c++)u=r[c],this._clipping||this.drawingContext.beginPath(),this.drawingContext.moveTo(r[c+1][0],r[c+1][1]),this.drawingContext.lineTo(u[0],u[1]),!this._clipping&&this._doStroke&&this._pInst.stroke(r[c+1][6]),!this._clipping&&this._doFill&&this._pInst.fill(r[c+1][5]),c+2<f&&(this.drawingContext.lineTo(r[c+2][0],r[c+2][1]),!this._clipping&&this._doStroke&&this._pInst.stroke(r[c+2][6]),!this._clipping&&this._doFill&&this._pInst.fill(r[c+2][5])),this._doFillStrokeClose(h);else if(l===a.TRIANGLE_FAN){if(2<f){for(this._clipping||this.drawingContext.beginPath(),c=2;c<f;c++)u=r[c],this.drawingContext.moveTo(r[0][0],r[0][1]),this.drawingContext.lineTo(r[c-1][0],r[c-1][1]),this.drawingContext.lineTo(u[0],u[1]),this.drawingContext.lineTo(r[0][0],r[0][1]),c<f-1&&(this._doFill&&u[5]!==r[c+1][5]||this._doStroke&&u[6]!==r[c+1][6])&&(!this._clipping&&this._doFill&&(this._pInst.fill(u[5]
1),this.drawingContext.fill(),this._pInst.fill(r[c+1][5])),!this._clipping&&this._doStroke&&(this._pInst.stroke(u[6]),this.drawingContext.stroke(),this._pInst.stroke(r[c+1][6])),this.drawingContext.closePath(),this._clipping||this.drawingContext.beginPath());this._doFillStrokeClose(h)}}else if(l===a.QUADS)for(c=0;c+3<f;c+=4){for(u=r[c],this._clipping||this.drawingContext.beginPath(),this.drawingContext.moveTo(u[0],u[1]),d=1;d<4;d++)this.drawingContext.lineTo(r[c+d][0],r[c+d][1]);this.drawingContext.lineTo(u[0],u[1]),!this._clipping&&this._doFill&&this._pInst.fill(r[c+3][5]),!this._clipping&&this._doStroke&&this._pInst.stroke(r[c+3][6]),this._doFillStrokeClose(h)}else if(l===a.QUAD_STRIP){if(3<f)for(c=0;c+1<f;c+=2)u=r[c],this._clipping||this.drawingContext.beginPath(),c+3<f?(this.drawingContext.moveTo(r[c+2][0],r[c+2][1]),this.drawingContext.lineTo(u[0],u[1]),this.drawingContext.lineTo(r[c+1][0],r[c+1][1]),this.drawingContext.lineTo(r[c+3][0],r[c+3][1]),!this._clipping&&this._doFill&&this._pInst.fill(r[c+3][5]),!this._clipping&&this._doStroke&&this._pInst.stroke(r[c+3][6])):(this.drawingContext.moveTo(u[0],u[1]),this.drawingContext.lineTo(r[c+1][0],r[c+1][1])),this._doFillStrokeClose(h)}else{for(this._clipping||this.drawingContext.beginPath(),this.drawingContext.moveTo(r[0][0],r[0][1]),c=1;c<f;c++)(u=r[c]).isVert&&(u.moveTo?(h&&this.drawingContext.closePath(),this.drawingContext.moveTo(u[0],u[1])):this.drawingContext.lineTo(u[0],u[1]));this._doFillStrokeClose(h),this.drawingContext.closePath()}i=s=n=o=!1,h&&r.pop()}return this}},{key:"strokeCap",value:function(t){return t!==a.ROUND&&t!==a.SQUARE&&t!==a.PROJECT||(this.drawingContext.lineCap=t),this}},{key:"strokeJoin",value:function(t){return t!==a.ROUND&&t!==a.BEVEL&&t!==a.MITER||(this.drawingContext.lineJoin=t),this}},{key:"strokeWeight",value:function(t){return this.drawingContext.lineWidth=void 0===t||0===t?1e-4:t,this}},{key:"_getFill",value:function(){return this._cachedFillStyle||(this._cachedFillStyle=this.drawingContext.fillStyle),this._cachedFillStyle}},{key:"_setFill",value:function(t){t!==this._cachedFillStyle&&(this.drawingContext.fillStyle=t,this._cachedFillStyle=t)}},{key:"_getStroke",value:function(){return this._cachedStrokeStyle||(this._cachedStrokeStyle=this.drawingContext.strokeStyle),this._cachedStrokeStyle}},{key:"_setStroke",value:function(t){t!==this._cachedStrokeStyle&&(this.drawingContext.strokeStyle=t,this._cachedStrokeStyle=t)}},{key:"bezier",value:function(t,r,o,n,s,i,a,l){return this._pInst.beginShape(),this._pInst.vertex(t,r),this._pInst.bezierVertex(o,n,s,i,a,l),this._pInst.endShape(),this}},{key:"curve",value:function(t,r,o,n,s,i,a,l){return this._pInst.beginShape(),this._pInst.curveVertex(t,r),this._pInst.curveVertex(o,n),this._pInst.curveVertex(s,i),this._pInst.curveVertex(a,l),this._pInst.endShape(),this}},{key:"_doFillStrokeClose",value:function(t){t&&this.drawingContext.closePath(),!this._clipping&&this._doFill&&this.drawingContext.fill(),!this._clipping&&this._doStroke&&this.drawingContext.stroke()}},{key:"applyMatrix",value:function(t,r,o,n,s,i){this.drawingContext.transform(t,r,o,n,s,i)}},{key:"resetMatrix",value:function(){return this.drawingContext.setTransform(1,0,0,1,0,0),this.drawingContext.scale(this._pInst._pixelDensity,this._pInst._pixelDensity),this}},{key:"rotate",value:function(t){this.drawingContext.rotate(t)}},{key:"scale",value:function(t,r){return this.drawingContext.scale(t,r),this}},{key:"translate",value:function(t,r){return t instanceof i.default.Vector&&(r=t.y,t=t.x),this.drawingContext.translate(t,r),this}},{key:"_renderText",value:function(t,r,o,n,s,i){if(!(n<i||s<=n))return t.push(),this._isOpenType()?this._textFont._renderPath(r,o,n,{renderer:this}):(this._doStroke&&this._strokeSet&&this.drawingContext.strokeText(r,o,n),!this._clipping&&this._doFill&&(this._fillSet||this._setFill(a._DEFAULT_TEXT_FILL),this.drawingContext.fillText(r,o,n))),t.pop(),t}},{key:"textWidth",value:function(t){return this._isOpenType()?this._textFont._textWidth(t,this._textSize):this.drawingContext.measureText(t).width}},{key:"_applyTextProperties",value:function(){var t=this._pInst,r=(this._setProperty("_textAscent",null),this._setProperty("_textDescent",null),r=this._textFont,this._isOpenType()&&(r=this._textFont.font.familyName,this._setProperty("_textStyle",this._textFont.font.styleName)),r||"sans-serif");return/\s/.exec(r)&&(r='"'.concat(r,'"')),this.drawingContext.font="".concat(this._textStyle||"normal"," ").concat(this._textSize||12,"px ").concat(r),this.drawingContext.textAlign=this._textAlign,this._textBaseline===a.CENTER?this.drawingContext.textBaseline=a._CTX_MIDDLE:this.drawingContext.textBaseline=this._textBaseline,t}},{key:"push",value:function(){return this.drawingContext.save(),c(h(l.prototype),"push",this).call(this)}}
1,{key:"pop",value:function(t){this.drawingContext.restore(),this._cachedFillStyle=this.drawingContext.fillStyle,this._cachedStrokeStyle=this.drawingContext.strokeStyle,c(h(l.prototype),"pop",this).call(this,t)}}],u(r.prototype,t),o&&u(r,o),l}(i.default.Renderer),t=(p.prototype.text=function(t,r,o,n,s){void 0!==n&&this.drawingContext.textBaseline===a.BASELINE&&(l=!0,this.drawingContext.textBaseline=a.TOP);var l,n=i.default.Renderer.prototype.text.apply(this,arguments);return l&&(this.drawingContext.textBaseline=a.BASELINE),n},i.default.Renderer2D=p,i.default.Renderer2D);o.default=t},{"./constants":272,"./main":283,"./p5.Renderer":286,"core-js/modules/es.array.concat":153,"core-js/modules/es.array.fill":156,"core-js/modules/es.array.iterator":165,"core-js/modules/es.array.join":166,"core-js/modules/es.array.slice":169,"core-js/modules/es.function.name":174,"core-js/modules/es.object.get-own-property-descriptor":186,"core-js/modules/es.object.get-prototype-of":188,"core-js/modules/es.object.to-string":190,"core-js/modules/es.reflect.construct":192,"core-js/modules/es.reflect.get":193,"core-js/modules/es.regexp.exec":195,"core-js/modules/es.regexp.to-string":196,"core-js/modules/es.string.iterator":200,"core-js/modules/es.symbol":212,"core-js/modules/es.symbol.description":210,"core-js/modules/es.symbol.iterator":211,"core-js/modules/es.weak-map":244,"core-js/modules/web.dom-collections.iterator":246}],288:[function(t,r,o){"use strict";t("core-js/modules/es.symbol"),t("core-js/modules/es.symbol.description"),t("core-js/modules/es.symbol.iterator"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.object.assign"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.promise"),t("core-js/modules/es.string.iterator"),t("core-js/modules/web.dom-collections.iterator"),t("core-js/modules/es.symbol"),t("core-js/modules/es.symbol.description"),t("core-js/modules/es.symbol.iterator"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.object.assign"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.promise"),t("core-js/modules/es.string.iterator"),t("core-js/modules/web.dom-collections.iterator");var n=(t=t("./main"))&&t.__esModule?t:{default:t};function s(){return{}}n.default.prototype._promisePreloads=[];var i=(n.default.prototype.registerPromisePreload=function(t){n.default.prototype._promisePreloads.push(t)},!1);n.default.prototype._setupPromisePreloads=function(){var t=!0,r=!1,o=void 0;try{for(var s,a=this._promisePreloads[Symbol.iterator]();!(t=(s=a.next()).done);t=!0){var l=s.value,u=this,c=l.method,d=l.addCallbacks,h=l.legacyPreloadSetup,f=l.target||this,p=f[c].bind(f);if(f===n.default.prototype){if(i)continue;u=null,p=f[c]}f[c]=this._wrapPromisePreload(u,p,d),h&&(f[h.method]=this._legacyPreloadGenerator(u,h,f[c]))}}catch(t){r=!0,o=t}finally{try{t||null==a.return||a.return()}finally{if(r)throw o}}i=!0},n.default.prototype._wrapPromisePreload=function(t,r,o){var n=function(){for(var t=this,n=(this._incrementPreload(),null),s=null,i=arguments.length,a=Array(i),l=0;l<i;l++)a[l]=arguments[l];if(o)for(var u=a.length-1;0<=u&&!s&&"function"==typeof a[u];u--)s=n,n=a.pop();var c=Promise.resolve(r.apply(this,a));return n&&c.then(n),s&&c.catch(s),c.then(function(){return t._decrementPreload()}),c};return t?n.bind(t):n},n.default.prototype._legacyPreloadGenerator=function(t,r,o){var n=r.createBaseObject||s,r=function(){var t=this;this._incrementPreload();for(var r=arguments.length,s=Array(r),i=0;i<r;i++)s[i]=arguments[i];var a=n.apply(this,s);return o.apply(this,s).then(function(r){Object.assign(a,r),t._decrementPreload()}),a};return r=t?r.bind(t):r}},{"./main":283,"core-js/modules/es.array.iterator":165,"core-js/modules/es.object.assign":183,"core-js/modules/es.object.to-string":190,"core-js/modules/es.promise":191,"core-js/modules/es.string.iterator":200,"core-js/modules/es.symbol":212,"core-js/modules/es.symbol.description":210,"core-js/modules/es.symbol.iterator":211,"core-js/modules/web.dom-collections.iterator":246}],289:[function(t,r,o){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}t("core-js/modules/es.symbol"),t("core-js/modules/es.symbol.description"),t("core-js/modules/es.symbol.iterator"),t("core-js/modules/es.array.filter"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.object.get-own-property-descriptor"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.string.iterator"),t("core-js/modules/es.weak-map"),t("core-js/modules/web.dom-collections.iterator"),t("core-js/modules/es.symbol"),t("core-js/modules/es.symbol.description"),t("core-js/modules/es.symbol.iterator"),t("core-js/modules/es.array.filter"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.string.iterator"),t("core-js/modules/web.dom-collections.iterator"),Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;var s=(c=t("./main"))&&c.__esModule?c:{default:c},i=function(t){if(t&&t.__esModule)return t;if(null===t||"object"!==l(t)&&"function"!=typeof t)return{default:t};var r,o=a();if(o&&o.has(t))return o.get(t);var n,s={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(n in t)Object.prototype.hasOwnProperty.call(t,n)&&((r=i?Object.getOwnPropertyDescriptor(t,n):null)&&(r.get||r.set)?Object.defineProperty(s,n,r):s[n]=t[n]);return s.default=t,o&&o.set(t,s),s}(t("./constants"));function a(){var t;return"function"!=typeof WeakMap?null:(t=new WeakMap,a=function(){return t},t)}function l(t){return(l="function"==typeof Symbol&&"symbol"===n(Symbol.iterator)?function(t){return n(t)}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":n(t)})(t)}t("./p5.Graphics"),t("./p5.Renderer2D"),t("../webgl/p5.RendererGL");var u="defaultCanvas0",c=(s.default.prototype.createCanvas=function(t,r,o,n){var a,l,c;if(s.default._validateParameters("createCanvas",arguments),arguments[2]instanceof HTMLCanvasElement?(o=i.P2D,n=arguments[2]):a=o||i.P2D,n)(c=document.getElementById(u))&&c.parentNode.removeChild(c),c=n,this._defaultGraphicsCreated=!1;else{if(a===i.WEBGL)(c=document.getElementById(u))&&(c.parentNode.removeChild(c),l=this._renderer,this._elements=this._elements.filter(function(t){return t!==l})),(c=document.createElement("canvas")).id=u,c.classList.add("p5Canvas");else if(this._defaultGraphicsCreated)c=this.canvas;else{c=n||document.createElement("canvas");for(var d=0;document.getElementById("defaultCanvas".concat(d));)d++;u="defaultCanvas".concat(d),c.id=u,c.classList.add("p5Canvas")}this._setupDone||(c.dataset.hidden=!0,c.style.visibility="hidden"),(this._userNode||(0===document.getElementsByTagName("main").length&&(o=document.createElement("main"),document.body.appendChild(o)),document.getElementsByTagName("main")[0])).appendChild(c)}return a===i.WEBGL?(this._setProperty("_renderer",new s.default.RendererGL(c,this,!0)),this._elements.push(this._renderer),t=(n=this._renderer._adjustDimensions(t,r)).adjustedWidth,r=n.adjustedHeight):this._defaultGraphicsCreated||(this._setProperty("_renderer",new s.default.Renderer2D(c,this,!0)),this._defaultGraphicsCreated=!0,this._elements.push(this._renderer)),this._renderer.resize(t,r),this._renderer._applyDefaults(),this._renderer},s.default.prototype.resizeCanvas=function(t,r,o){if(s.default._validateParameters("resizeCanvas",arguments),this._renderer){var n,i,a,u={};for(n in this.drawingContext){var c=this.drawingContext[n];"object"!==l(c)&&"function"!=typeof c&&(u[n]=c)}
1for(a in this._renderer instanceof s.default.RendererGL&&(t=(i=this._renderer._adjustDimensions(t,r)).adjustedWidth,r=i.adjustedHeight),this.width=t,this.height=r,this._renderer.resize(t,r),u)try{this.drawingContext[a]=u[a]}catch(t){}o||this.redraw()}this._addAccsOutput()&&this._updateAccsOutput()},s.default.prototype.noCanvas=function(){this.canvas&&this.canvas.parentNode.removeChild(this.canvas)},s.default.prototype.createGraphics=function(t,r){for(var o=arguments.length,n=Array(2<o?o-2:0),a=2;a<o;a++)n[a-2]=arguments[a];return n[0]instanceof HTMLCanvasElement&&(n[1]=n[0],n[0]=i.P2D),s.default._validateParameters("createGraphics",arguments),new s.default.Graphics(t,r,n[0],this,n[1])},s.default.prototype.createFramebuffer=function(t){return new s.default.Framebuffer(this,t)},s.default.prototype.clearDepth=function(t){this._assert3d("clearDepth"),this._renderer.clearDepth(t)},s.default.prototype.blendMode=function(t){s.default._validateParameters("blendMode",arguments),t===i.NORMAL&&(console.warn("NORMAL has been deprecated for use in blendMode. defaulting to BLEND instead."),t=i.BLEND),this._renderer.blendMode(t)},s.default);o.default=c},{"../webgl/p5.RendererGL":341,"./constants":272,"./main":283,"./p5.Graphics":285,"./p5.Renderer2D":287,"core-js/modules/es.array.filter":157,"core-js/modules/es.array.iterator":165,"core-js/modules/es.object.get-own-property-descriptor":186,"core-js/modules/es.object.to-string":190,"core-js/modules/es.string.iterator":200,"core-js/modules/es.symbol":212,"core-js/modules/es.symbol.description":210,"core-js/modules/es.symbol.iterator":211,"core-js/modules/es.weak-map":244,"core-js/modules/web.dom-collections.iterator":246}],290:[function(t,r,o){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function s(t){return(s="function"==typeof Symbol&&"symbol"===n(Symbol.iterator)?function(t){return n(t)}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":n(t)})(t)}t("core-js/modules/es.symbol"),t("core-js/modules/es.symbol.description"),t("core-js/modules/es.symbol.iterator"),t("core-js/modules/es.array.from"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.array.slice"),t("core-js/modules/es.object.get-own-property-descriptor"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.regexp.to-string"),t("core-js/modules/es.string.iterator"),t("core-js/modules/es.weak-map"),t("core-js/modules/web.dom-collections.iterator"),t("core-js/modules/es.array.slice"),Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;var i=c(t("../main")),a=function(t){if(t&&t.__esModule)return t;if(null===t||"object"!==s(t)&&"function"!=typeof t)return{default:t};var r,o=u();if(o&&o.has(t))return o.get(t);var n,i={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(n in t)Object.prototype.hasOwnProperty.call(t,n)&&((r=a?Object.getOwnPropertyDescriptor(t,n):null)&&(r.get||r.set)?Object.defineProperty(i,n,r):i[n]=t[n]);return i.default=t,o&&o.set(t,i),i}(t("../constants")),l=c(t("../helpers"));function u(){var t;return"function"!=typeof WeakMap?null:(t=new WeakMap,u=function(){return t},t)}function c(t){return t&&t.__esModule?t:{default:t}}t("../friendly_errors/fes_core"),t("../friendly_errors/file_errors"),t("../friendly_errors/validate_params"),i.default.prototype._normalizeArcAngles=function(t,r,o,n,s){var i;return t-=a.TWO_PI*Math.floor(t/a.TWO_PI),r-=a.TWO_PI*Math.floor(r/a.TWO_PI),i=Math.min(Math.abs(t-r),a.TWO_PI-Math.abs(t-r)),s&&(t=t<=a.HALF_PI?Math.atan(o/n*Math.tan(t)):t>a.HALF_PI&&t<=3*a.HALF_PI?Math.atan(o/n*Math.tan(t))+a.PI:Math.atan(o/n*Math.tan(t))+a.TWO_PI,r=r<=a.HALF_PI?Math.atan(o/n*Math.tan(r)):r>a.HALF_PI&&r<=3*a.HALF_PI?Math.atan(o/n*Math.tan(r))+a.PI:Math.atan(o/n*Math.tan(r))+a.TWO_PI),r<t&&(r+=a.TWO_PI),{start:t,stop:r,correspondToSamePoint:i<1e-5}},i.default.prototype.arc=function(t,r,o,n,s,a,u,c){return i.default._validateParameters("arc",arguments),(this._renderer._doStroke||this._renderer._doFill)&&s!==a&&(s=this._toRadians(s),a=this._toRadians(a),t=l.default.modeAdjust(t,r,o,n,this._renderer._ellipseMode),(r=this._normalizeArcAngles(s,a,t.w,t.h,!0)).correspondToSamePoint?this._renderer.ellipse([t.x,t.y,t.w,t.h,c]):(this._renderer.arc(t.x,t.y,t.w,t.h,r.start,r.stop,u,c),(this._accessibleOutputs.grid||this._accessibleOutputs.text)&&this._accsOutput("arc",[t.x,t.y,t.w,t.h,r.start,r.stop,u]))),this},i.default.prototype.ellipse=function(t,r,o,n,s){return i.default._validateParameters("ellipse",arguments),this._renderEllipse.apply(this,arguments)},i.default.prototype.circle=function(){for(var t=arguments.length,r=Array(t),o=0;o<t;o++)r[o]=arguments[o];i.default._validateParameters("circle",r);var n=r.slice(0,2);return n.push(r[2],r[2]),this._renderEllipse.apply(this,function(t){if(Array.isArray(t)){for(var r=0,o=Array(t.length);r<t.length;r++)o[r]=t[r];return o}}(n)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(n)||function(){throw TypeError("Invalid attempt to spread non-iterable instance")}())},i.default.prototype._renderEllipse=function(t,r,o,n,s){return(this._renderer._doStroke||this._renderer._doFill)&&(t=l.default.modeAdjust(t,r,o,n=void 0===n?o:n,this._renderer._ellipseMode),this._renderer.ellipse([t.x,t.y,t.w,t.h,s]),(this._accessibleOutputs.grid||this._accessibleOutputs.text)&&this._accsOutput("ellipse",[t.x,t.y,t.w,t.h])),this},i.default.prototype.line=function(){for(var t,r=arguments.length,o=Array(r),n=0;n<r;n++)o[n]=arguments[n];return i.default._validateParameters("line",o),this._renderer._doStroke&&(t=this._renderer).line.apply(t,o),(this._accessibleOutputs.grid||this._accessibleOutputs.text)&&this._accsOutput("line",o),this},i.default.prototype.point=function(){for(var t,r=arguments.length,o=Array(r),n=0;n<r;n++)o[n]=arguments[n];return i.default._validateParameters("point",o),this._renderer._doStroke&&(1===o.length&&o[0]instanceof i.default.Vector?this._renderer.point.call(this._renderer,o[0].x,o[0].y,o[0].z):((t=this._renderer).point.apply(t,o),(this._accessibleOutputs.grid||this._accessibleOutputs.text)&&this._accsOutput("point",o))),this},i.default.prototype.quad=function(){for(var t,r=arguments.length,o=Array(r),n=0;n<r;n++)o[n]=arguments[n];return i.default._validateParameters("quad",o),(this._renderer._doStroke||this._renderer._doFill)&&(this._renderer.isP3D&&o.length<12?this._renderer.quad.call(this._renderer,o[0],o[1],0,o[2],o[3],0,o[4],o[5],0,o[6],o[7],0,o[8],o[9]):((t=this._renderer).quad.apply(t,o),(this._accessibleOutputs.grid||this._accessibleOutputs.text)&&this._accsOutput("quadrilateral",o))),this},i.default.prototype.rect=function(){for(var t=arguments.length,r=Array(t),o=0;o<t;o++)r[o]=arguments[o];return i.default._validateParameters("rect",r),this._renderRect.apply(this,r)},i.default.prototype.square=function(t,r,o,n,s,a,l){return i.default._validateParameters("square",arguments),this._renderRect.call(this,t,r,o,o,n,s,a,l)},i.default.prototype._renderRect=function(){if(this._renderer._doStroke||this._renderer._doFill){3==arguments.length&&(arguments[3]=arguments[2]);for(var t=l.default.modeAdjust(arguments[0],arguments[1],arguments[2],arguments[3],this._renderer._rectMode),r=(this._renderer._rectMode===a.CORNER&&(t.w=arguments[2],t.h=arguments[3]),[t.x,t.y,t.w,t.h]),o=4;o<arguments.length;o++)r[o]=arguments[o];this._renderer.rect(r),(this._accessibleOutputs.grid||this._accessibleOutputs.text)&&this._accsOutput("rectangle",[t.x,t.y,t.w,t.h])}return this},i.default.prototype.triangle=function(){for(var t=arguments.length,r=Array(t),o=0;o<t;o++)r[o]=arguments[o];return i.default._validateParameters("triangle",r),(this._renderer._doStroke||this._renderer._doFill)&&this._renderer.triangle(r),(this._accessibleOutputs.grid||this._accessibleOutputs.text)&&this._accsOutput("triangle",r),this},t=i.default,o.default=t},{"../constants":272,"../friendly_errors/fes_core":274,"../friendly_errors/file_errors":275,"../friendly_errors/validate_params":278,"../helpers":279,"../main":283,"core-js/modules/es.array.from":162,"core-js/modules/es.array.iterator":165,"core-js/modules/es.array.slice":169,"core-js/modules/es.object.get-own-property-descriptor":186,"core-js/modules/es.object.to-string":190,"core-js/modules/es.regexp.to-string":196,"core-js/modules/es.string.iterator":200,"core-js/modules/es.symbol":212,"core-js/modules/es.symbol.description":210,"core-js/modules/es.symbol.iterator":211,"core-js/modules/es.weak-map":244,"core-js/modules/web.dom-collections.iterator":246}],291:[function(t,r,o){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function s(t){return(s="function"==typeof Symbol&&"symbol"===n(Symbol.iterator)?function(t){return n(t)}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":n(t)})(t)}t("core-js/modules/es.symbol"),t("core-js/modules/es.symbol.description"),t("core-js/modules/es.symbol.iterator"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.object.get-own-property-descriptor"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.string.iterator"),t("core-js/modules/es.weak-map"),t("core-js/modules/web.dom-collections.iterator"),Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;
1var i=(u=t("../main"))&&u.__esModule?u:{default:u},a=function(t){if(t&&t.__esModule)return t;if(null===t||"object"!==s(t)&&"function"!=typeof t)return{default:t};var r,o=l();if(o&&o.has(t))return o.get(t);var n,i={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(n in t)Object.prototype.hasOwnProperty.call(t,n)&&((r=a?Object.getOwnPropertyDescriptor(t,n):null)&&(r.get||r.set)?Object.defineProperty(i,n,r):i[n]=t[n]);return i.default=t,o&&o.set(t,i),i}(t("../constants"));function l(){var t;return"function"!=typeof WeakMap?null:(t=new WeakMap,l=function(){return t},t)}i.default.prototype.ellipseMode=function(t){return i.default._validateParameters("ellipseMode",arguments),t!==a.CORNER&&t!==a.CORNERS&&t!==a.RADIUS&&t!==a.CENTER||(this._renderer._ellipseMode=t),this},i.default.prototype.noSmooth=function(){return this._renderer.isP3D?this.setAttributes("antialias",!1):"imageSmoothingEnabled"in this.drawingContext&&(this.drawingContext.imageSmoothingEnabled=!1),this},i.default.prototype.rectMode=function(t){return i.default._validateParameters("rectMode",arguments),t!==a.CORNER&&t!==a.CORNERS&&t!==a.RADIUS&&t!==a.CENTER||(this._renderer._rectMode=t),this},i.default.prototype.smooth=function(){return this._renderer.isP3D?this.setAttributes("antialias",!0):"imageSmoothingEnabled"in this.drawingContext&&(this.drawingContext.imageSmoothingEnabled=!0),this},i.default.prototype.strokeCap=function(t){return i.default._validateParameters("strokeCap",arguments),t!==a.ROUND&&t!==a.SQUARE&&t!==a.PROJECT||this._renderer.strokeCap(t),this},i.default.prototype.strokeJoin=function(t){return i.default._validateParameters("strokeJoin",arguments),t!==a.ROUND&&t!==a.BEVEL&&t!==a.MITER||this._renderer.strokeJoin(t),this},i.default.prototype.strokeWeight=function(t){return i.default._validateParameters("strokeWeight",arguments),this._renderer.strokeWeight(t),this};var u=i.default;o.default=u},{"../constants":272,"../main":283,"core-js/modules/es.array.iterator":165,"core-js/modules/es.object.get-own-property-descriptor":186,"core-js/modules/es.object.to-string":190,"core-js/modules/es.string.iterator":200,"core-js/modules/es.symbol":212,"core-js/modules/es.symbol.description":210,"core-js/modules/es.symbol.iterator":211,"core-js/modules/es.weak-map":244,"core-js/modules/web.dom-collections.iterator":246}],292:[function(t,r,o){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;var n=(s=t("../main"))&&s.__esModule?s:{default:s};t("../friendly_errors/fes_core"),t("../friendly_errors/file_errors"),t("../friendly_errors/validate_params"),n.default.prototype.bezier=function(){for(var t,r=arguments.length,o=Array(r),s=0;s<r;s++)o[s]=arguments[s];return n.default._validateParameters("bezier",o),(this._renderer._doStroke||this._renderer._doFill)&&(t=this._renderer).bezier.apply(t,o),this},n.default.prototype.bezierDetail=function(t){return n.default._validateParameters("bezierDetail",arguments),this._bezierDetail=t,this},n.default.prototype.bezierPoint=function(t,r,o,s,i){n.default._validateParameters("bezierPoint",arguments);var a=1-i;return Math.pow(a,3)*t+3*Math.pow(a,2)*i*r+3*a*Math.pow(i,2)*o+Math.pow(i,3)*s},n.default.prototype.bezierTangent=function(t,r,o,s,i){n.default._validateParameters("bezierTangent",arguments);var a=1-i;return 3*s*Math.pow(i,2)-3*o*Math.pow(i,2)+6*o*a*i-6*r*a*i+3*r*Math.pow(a,2)-3*t*Math.pow(a,2)},n.default.prototype.curve=function(){for(var t,r=arguments.length,o=Array(r),s=0;s<r;s++)o[s]=arguments[s];return n.default._validateParameters("curve",o),this._renderer._doStroke&&(t=this._renderer).curve.apply(t,o),this},n.default.prototype.curveDetail=function(t){return n.default._validateParameters("curveDetail",arguments),this._curveDetail=t<3?3:t,this},n.default.prototype.curveTightness=function(t){return n.default._validateParameters("curveTightness",arguments),this._renderer._curveTightness=t,this},n.default.prototype.curvePoint=function(t,r,o,s,i){n.default._validateParameters("curvePoint",arguments);var a=this._renderer._curveTightness,l=i*i*i,u=i*i;return t*((a-1)/2*l+(1-a)*u+(a-1)/2*i)+r*((a+3)/2*l+(-5-a)/2*u+1)+o*((-3-a)/2*l+(a+2)*u+(1-a)/2*i)+s*((1-a)/2*l+(a-1)/2*u)},n.default.prototype.curveTangent=function(t,r,o,s,i){n.default._validateParameters("curveTangent",arguments);var a=this._renderer._curveTightness,l=i*i*3,i=2*i;return t*((a-1)/2*l+(1-a)*i+(a-1)/2)+r*((a+3)/2*l+(-5-a)/2*i)+o*((-3-a)/2*l+(a+2)*i+(1-a)/2)+s*((1-a)/2*l+(a-1)/2*i)};var s=n.default;o.default=s},{"../friendly_errors/fes_core":274,"../friendly_errors/file_errors":275,"../friendly_errors/validate_params":278,"../main":283}],293:[function(t,r,o){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function s(t){return(s="function"==typeof Symbol&&"symbol"===n(Symbol.iterator)?function(t){return n(t)}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":n(t)})(t)}t("core-js/modules/es.symbol"),t("core-js/modules/es.symbol.description"),t("core-js/modules/es.symbol.iterator"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.array.slice"),t("core-js/modules/es.object.get-own-property-descriptor"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.string.iterator"),t("core-js/modules/es.weak-map"),t("core-js/modules/web.dom-collections.iterator"),t("core-js/modules/es.array.slice"),Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;var i=(g=t("../main"))&&g.__esModule?g:{default:g},a=function(t){if(t&&t.__esModule)return t;if(null===t||"object"!==s(t)&&"function"!=typeof t)return{default:t};var r,o=l();if(o&&o.has(t))return o.get(t);var n,i={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(n in t)Object.prototype.hasOwnProperty.call(t,n)&&((r=a?Object.getOwnPropertyDescriptor(t,n):null)&&(r.get||r.set)?Object.defineProperty(i,n,r):i[n]=t[n]);return i.default=t,o&&o.set(t,i),i}(t("../constants"));function l(){var t;return"function"!=typeof WeakMap?null:(t=new WeakMap,l=function(){return t},t)}var u=null,c=[],d=[],h=!1,f=!1,p=!1,m=!1,y=!0,g=(i.default.prototype.beginContour=function(){return this._renderer.isP3D?this._renderer.beginContour():(d=[],m=!0),this},i.default.prototype.beginShape=function(t){var r;return i.default._validateParameters("beginShape",arguments),this._renderer.isP3D?(r=this._renderer).beginShape.apply(r,arguments):(u=t===a.POINTS||t===a.LINES||t===a.TRIANGLES||t===a.TRIANGLE_FAN||t===a.TRIANGLE_STRIP||t===a.QUADS||t===a.QUAD_STRIP?t:null,c=[],d=[]),this},i.default.prototype.bezierVertex=function(){for(var t,r=arguments.length,o=Array(r),n=0;n<r;n++)o[n]=arguments[n];if(i.default._validateParameters("bezierVertex",o),this._renderer.isP3D)(t=this._renderer).bezierVertex.apply(t,o);else if(0===c.length)i.default._friendlyError("vertex() must be used once before calling bezierVertex()","bezierVertex");else{h=!0;for(var s=[],a=0;a<o.length;a++)s[a]=o[a];s.isVert=!1,(m?d:c).push(s)}return this},i.default.prototype.curveVertex=function(){for(var t,r=arguments.length,o=Array(r),n=0;n<r;n++)o[n]=arguments[n];return i.default._validateParameters("curveVertex",o),this._renderer.isP3D?(t=this._renderer).curveVertex.apply(t,o):(f=!0,this.vertex(o[0],o[1])),this},i.default.prototype.endContour=function(){if(!this._renderer.isP3D){var t=d[0].slice();t.isVert=d[0].isVert,t.moveTo=!1,d.push(t),y&&(c.push(c[0]),y=!1);for(var r=0;r<d.length;r++)c.push(d[r])}return this},i.default.prototype.endShape=function(t){var r=1<arguments.length&&void 0!==arguments[1]?arguments[1]:1;if(i.default._validateParameters("endShape",arguments),r<1&&(console.log("\uD83C\uDF38 p5.js says: You can not have less than one instance"),r=1),this._renderer.isP3D)this._renderer.endShape(t,f,h,p,m,u,r);else{if(1!==r&&console.log("\uD83C\uDF38 p5.js says: Instancing is only supported in WebGL2 mode"),0===c.length||!this._renderer._doStroke&&!this._renderer._doFill)return this;(r=t===a.CLOSE)&&!m&&c.push(c[0]),this._renderer.endShape(t,c,f,h,p,m,u),m=p=h=f=!1,y=!0,r&&c.pop()}return this},i.default.prototype.quadraticVertex=function(){for(var t,r=arguments.length,o=Array(r),n=0;n<r;n++)o[n]=arguments[n];if(i.default._validateParameters("quadraticVertex",o),this._renderer.isP3D)(t=this._renderer).quadraticVertex.apply(t,o);else{if(this._contourInited)return(t={}).x=o[0],t.y=o[1],t.x3=o[2],t.y3=o[3],t.type=a.QUADRATIC,this._contourVertices.push(t),this;if(0<c.length){p=!0;for(var s=[],l=0;l<o.length;l++)s[l]=o[l];s.isVert=!1,(m?d:c).push(s)}else i.default._friendlyError("vertex() must be used once before calling quadraticVertex()","quadraticVertex")}return this},i.default.prototype.vertex=function(t,r,o,n,s){var i;return this._renderer.isP3D?(i=this._renderer).vertex.apply(i,arguments):((i=[]).isVert=!0,i[0]=t,i[1]=r,i[2]=0,i[3]=0,i[4]=0,i[5]=this._renderer._getFill(),i[6]=this._renderer._getStroke(),o&&(i.moveTo=o),(m?(0===d.length&&(i.moveTo=!0),d):c).push(i)),this},i.default.prototype.normal=function(t,r,o){var n;return this._assert3d("normal"),i.default._validateParameters("normal",arguments),(n=this._renderer).normal.apply(n,arguments),this},i.default);o.default=g},{"../constants":272,"../main":283,"core-js/modules/es.array.iterator":165,"core-js/modules/es.array.slice":169,"core-js/modules/es.object.get-own-property-descriptor":186,"core-js/modules/es.object.to-string":190,"core-js/modules/es.string.iterator":200,"core-js/modules/es.symbol":212,"core-js/modules/es.symbol.description":210,"core-js/modules/es.symbol.iterator":211,"core-js/modules/es.weak-map":244,"core-js/modules/web.dom-collections.iterator":246}],294:[function(t,r,o){},{}],295:[function(t,r,o){"use strict";t("core-js/modules/es.object.assign"),t("core-js/modules/es.object.assign"),Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,(t=(t=t("./main"))&&t.__esModule?t:{default:t}).default.prototype.noLoop=function(){this._loop=!1},t.default.prototype.loop=function(){this._loop||(this._loop=!0,this._setupDone&&this._draw())},t.default.prototype.isLooping=function(){return this._loop},t.default.prototype.push=function(){this._styles.push({props:{_colorMode:this._colorMode},renderer:this._renderer.push()})},t.default.prototype.pop=function(){var t=this._styles.pop();t?(this._renderer.pop(t.renderer),Object.assign(this,t.props)):console.warn("pop() was called without matching push()")},t.default.prototype.redraw=function(t){if(!this._inUserDraw&&this._setupDone){var r=parseInt(t),o=((isNaN(r)||r<1)&&(r=1),this._isGlobal?window:this);if("function"==typeof o.draw){void 0===o.setup&&o.scale(o._pixelDensity,o._pixelDensity);for(var n=0;n<r;n++){o.resetMatrix(),(this._accessibleOutputs.grid||this._accessibleOutputs.text)&&this._updateAccsOutput(),o._renderer.isP3D&&o._renderer._update(),o._setProperty("frameCount",o.frameCount+1),this.callRegisteredHooksFor("pre"),this._inUserDraw=!0;try{o.draw()}finally{this._inUserDraw=!1}this.callRegisteredHooksFor("post")}}}},t=t.default,o.default=t},{"./main":283,"core-js/modules/es.object.assign":183}],296:[function(t,r,o){"use strict";t("core-js/modules/es.symbol"),t("core-js/modules/es.symbol.description"),t("core-js/modules/es.symbol.iterator"),t("core-js/modules/es.array.from"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.object.get-prototype-of"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.regexp.to-string"),t("core-js/modules/es.string.iterator"),t("core-js/modules/es.typed-array.uint8-array"),t("core-js/modules/es.typed-array.copy-within"),t("core-js/modules/es.typed-array.every"),t("core-js/modules/es.typed-array.fill"),t("core-js/modules/es.typed-array.filter"),t("core-js/modules/es.typed-array.find"),t("core-js/modules/es.typed-array.find-index"),t("core-js/modules/es.typed-array.for-each"),t("core-js/modules/es.typed-array.includes"),t("core-js/modules/es.typed-array.index-of"),t("core-js/modules/es.typed-array.iterator"),t("core-js/modules/es.typed-array.join"),t("core-js/modules/es.typed-array.last-index-of"),t("core-js/modules/es.typed-array.map"),t("core-js/modules/es.typed-array.reduce"),t("
1core-js/modules/es.typed-array.reduce-right"),t("core-js/modules/es.typed-array.reverse"),t("core-js/modules/es.typed-array.set"),t("core-js/modules/es.typed-array.slice"),t("core-js/modules/es.typed-array.some"),t("core-js/modules/es.typed-array.sort"),t("core-js/modules/es.typed-array.subarray"),t("core-js/modules/es.typed-array.to-locale-string"),t("core-js/modules/es.typed-array.to-string"),t("core-js/modules/web.dom-collections.iterator"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.object.get-prototype-of"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.typed-array.uint8-array"),t("core-js/modules/es.typed-array.copy-within"),t("core-js/modules/es.typed-array.every"),t("core-js/modules/es.typed-array.fill"),t("core-js/modules/es.typed-array.filter"),t("core-js/modules/es.typed-array.find"),t("core-js/modules/es.typed-array.find-index"),t("core-js/modules/es.typed-array.for-each"),t("core-js/modules/es.typed-array.includes"),t("core-js/modules/es.typed-array.index-of"),t("core-js/modules/es.typed-array.iterator"),t("core-js/modules/es.typed-array.join"),t("core-js/modules/es.typed-array.last-index-of"),t("core-js/modules/es.typed-array.map"),t("core-js/modules/es.typed-array.reduce"),t("
1core-js/modules/es.typed-array.reduce-right"),t("core-js/modules/es.typed-array.reverse"),t("core-js/modules/es.typed-array.set"),t("core-js/modules/es.typed-array.slice"),t("core-js/modules/es.typed-array.some"),t("core-js/modules/es.typed-array.sort"),t("core-js/modules/es.typed-array.subarray"),t("core-js/modules/es.typed-array.to-locale-string"),t("core-js/modules/es.typed-array.to-string"),Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;var n=(t=t("./main"))&&t.__esModule?t:{default:t};n.default.prototype.applyMatrix=function(){var t,r=(arguments.length<=0?void 0:arguments[0])instanceof Object.getPrototypeOf(Uint8Array);return Array.isArray(arguments.length<=0?void 0:arguments[0])||r?(r=this._renderer).applyMatrix.apply(r,(t=arguments.length<=0?void 0:arguments[0],function(t){if(Array.isArray(t)){for(var r=0,o=Array(t.length);r<t.length;r++)o[r]=t[r];return o}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw TypeError("Invalid attempt to spread non-iterable instance")}())):(r=this._renderer).applyMatrix.apply(r,arguments),this},n.default.prototype.resetMatrix=function(){return this._renderer.resetMatrix(),this},n.default.prototype.rotate=function(t,r){return n.default._validateParameters("rotate",arguments),this._renderer.rotate(this._toRadians(t),r),this},n.default.prototype.rotateX=function(t){return this._assert3d("rotateX"),n.default._validateParameters("rotateX",arguments),this._renderer.rotateX(this._toRadians(t)),this},n.default.prototype.rotateY=function(t){return this._assert3d("rotateY"),n.default._validateParameters("rotateY",arguments),this._renderer.rotateY(this._toRadians(t)),this},n.default.prototype.rotateZ=function(t){return this._assert3d("rotateZ"),n.default._validateParameters("rotateZ",arguments),this._renderer.rotateZ(this._toRadians(t)),this},n.default.prototype.scale=function(t,r,o){var s;return n.default._validateParameters("scale",arguments),t instanceof n.default.Vector?(t=(s=t).x,r=s.y,o=s.z):Array.isArray(t)&&(t=(s=t)[0],r=s[1],o=s[2]||1),isNaN(r)?r=o=t:isNaN(o)&&(o=1),this._renderer.scale(t,r,o),this},n.default.prototype.shearX=function(t){return n.default._validateParameters("shearX",arguments),t=this._toRadians(t),this._renderer.applyMatrix(1,0,Math.tan(t),1,0,0),this},n.default.prototype.shearY=function(t){return n.default._validateParameters("shearY",arguments),t=this._toRadians(t),this._renderer.applyMatrix(1,Math.tan(t),0,1,0,0),this},n.default.prototype.translate=function(t,r,o){return n.default._validateParameters("translate",arguments),this._renderer.isP3D?this._renderer.translate(t,r,o):this._renderer.translate(t,r),this},t=n.default,o.default=t},{"./main":283,"core-js/modules/es.array.from":162,"core-js/modules/es.array.iterator":165,"core-js/modules/es.object.get-prototype-of":188,"core-js/modules/es.object.to-string":190,"core-js/modules/es.regexp.to-string":196,"core-js/modules/es.string.iterator":200,"core-js/modules/es.symbol":212,"core-js/modules/es.symbol.description":210,"core-js/modules/es.symbol.iterator":211,"core-js/modules/es.typed-array.copy-within":213,"core-js/modules/es.typed-array.every":214,"core-js/modules/es.typed-array.fill":215,"core-js/modules/es.typed-array.filter":216,"core-js/modules/es.typed-array.find":218,"core-js/modules/es.typed-array.find-index":217,"core-js/modules/es.typed-array.for-each":221,"core-js/modules/es.typed-array.includes":222,"core-js/modules/es.typed-array.index-of":223,"core-js/modules/es.typed-array.iterator":226,"core-js/modules/es.typed-array.join":227,"core-js/modules/es.typed-array.last-index-of":228,"core-js/modules/es.typed-array.map":229,"core-js/modules/es.typed-array.reduce":231,"core-js/modules/es.typed-array.reduce-right":230,"core-js/modules/es.typed-array.reverse":232,"core-js/modules/es.typed-array.set":233,"core-js/modules/es.typed-array.slice":234,"core-js/modules/es.typed-array.some":235,"core-js/modules/es.typed-array.sort":236,"core-js/modules/es.typed-array.subarray":237,"core-js/modules/es.typed-array.to-locale-string":238,"core-js/modules/es.typed-array.to-string":239,"core-js/modules/es.typed-array.uint8-array":242,"core-js/modules/web.dom-collections.iterator":246}],297:[function(t,r,o){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}t("core-js/modules/es.symbol"),t("core-js/modules/es.symbol.description"),t("core-js/modules/es.symbol.iterator"),t("core-js/modules/es.array.for-each"),t("core-js/modules/es.array.from"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.object.keys"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.regexp.exec"),t("core-js/modules/es.regexp.to-string"),t("core-js/modules/es.string.ends-with"),t("core-js/modules/es.string.iterator"),t("core-js/modules/es.string.replace"),t("core-js/modules/web.dom-collections.for-each"),t("core-js/modules/web.dom-collections.iterator"),t("core-js/modules/es.symbol"),t("core-js/modules/es.symbol.description"),t("core-js/modules/es.symbol.iterator"),t("core-js/modules/es.array.for-each"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.object.keys"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.regexp.exec"),t("core-js/modules/es.regexp.to-string"),t("core-js/modules/es.string.ends-with"),t("core-js/modules/es.string.iterator"),t("core-js/modules/es.string.replace"),t("core-js/modules/web.dom-collections.for-each"),t("core-js/modules/web.dom-collections.iterator");var s=(t=t("../core/main"))&&t.__esModule?t:{default:t};function i(t){return function(t){if(Array.isArray(t)){for(var r=0,o=Array(t.length);r<t.length;r++)o[r]=t[r];return o}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw TypeError("Invalid attempt to spread non-iterable instance")}()}function a(t){return(a="function"==typeof Symbol&&"symbol"===n(Symbol.iterator)?function(t){return n(t)}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":n(t)})(t)}s.default.prototype.storeItem=function(t,r){"string"!=typeof t&&console.log("The argument that you passed to storeItem() - ".concat(t," is not a string.")),t.endsWith("p5TypeID")&&console.log("The argument that you passed to storeItem() - ".concat(t," must not end with 'p5TypeID'.")),void 0===r&&console.log("You cannot store undefined variables using storeItem().");var o=a(r);switch(o){case"number":case"boolean":r=r.toString();break;case"object":r instanceof s.default.Color?o="p5.Color":r instanceof s.default.Vector&&(o="p5.Vector",r=[r.x,r.y,r.z]),r=JSON.stringify(r)}localStorage.setItem(t,r),t="".concat(t,"p5TypeID"),localStorage.setItem(t,o)},s.default.prototype.getItem=function(t){var r=localStorage.getItem(t),o=localStorage.getItem("".concat(t,"p5TypeID"));if(void 0===o)console.log("Unable to determine type of item stored under ".concat(t,"in local storage. Did you save the item with something other than setItem()?"));else if(null!==r)switch(o){case"number":r=parseFloat(r);break;case"boolean":r="true"===r;break;case"object":r=JSON.parse(r);break;case"p5.Color":r=JSON.parse(r),r=this.color.apply(this,i(r.levels));break;case"p5.Vector":r=JSON.parse(r),r=this.createVector.apply(this,i(r))}return r},s.default.prototype.clearStorage=function(){var t=this;Object.keys(localStorage).forEach(function(r){r.endsWith("p5TypeID")&&t.removeItem(r.replace("p5TypeID",""))})},s.default.prototype.removeItem=function(t){"string"!=typeof t&&console.log("The argument that you passed to removeItem() - ".concat(t," is not a string.")),localStorage.removeItem(t),localStorage.removeItem("".concat(t,"p5TypeID"))}},{"../core/main":283,"core-js/modules/es.array.for-each":161,"core-js/modules/es.array.from":162,"core-js/modules/es.array.iterator":165,"core-js/modules/es.object.keys":189,"core-js/modules/es.object.to-string":190,"core-js/modules/es.regexp.exec":195,"core-js/modules/es.regexp.to-string":196,"core-js/modules/es.string.ends-with":198,"core-js/modules/es.string.iterator":200,"core-js/modules/es.string.replace":204,"core-js/modules/es.symbol":212,"core-js/modules/es.symbol.description":210,"core-js/modules/es.symbol.iterator":211,"core-js/modules/web.dom-collections.for-each":245,"core-js/modules/web.dom-collections.iterator":246}],298:[function(t,r,o){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function s(t){return(s="function"==typeof Symbol&&"symbol"===n(Symbol.iterator)?function(t){return n(t)}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":n(t)})(t)}t("core-js/modules/es.symbol"),t("core-js/modules/es.symbol.description"),t("core-js/modules/es.symbol.iterator"),t("core-js/modules/es.array.
1concat"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.object.get-prototype-of"),t("core-js/modules/es.object.keys"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.reflect.construct"),t("core-js/modules/es.regexp.to-string"),t("core-js/modules/es.string.iterator"),t("core-js/modules/web.dom-collections.iterator"),t("core-js/modules/es.array.concat"),t("core-js/modules/es.object.keys"),Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;var i=(t=t("../core/main"))&&t.__esModule?t:{default:t};function a(t,r){if("function"!=typeof r&&null!==r)throw TypeError("Super expression must either be null or a function");t.prototype=Object.create(r&&r.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),r&&l(t,r)}function l(t,r){return(l=Object.setPrototypeOf||function(t,r){return t.__proto__=r,t})(t,r)}function u(t){return function(){var r,o=c(t),o=(r=!function(){if("undefined"!=typeof Reflect&&Reflect.construct&&!Reflect.construct.sham){if("function"==typeof Proxy)return 1;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),1}catch(t){}}}()?o.apply(this,arguments):Reflect.construct(o,arguments,r=c(this).constructor),this);if(!r||"object"!==s(r)&&"function"!=typeof r){if(void 0!==o)return o;throw ReferenceError("this hasn't been initialised - super() hasn't been called")}return r}}function c(t){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function d(t,r){if(!(t instanceof r))throw TypeError("Cannot call a class as a function")}function h(t,r){for(var o=0;o<r.length;o++){var n=r[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function f(t,r,o){r&&h(t.prototype,r),o&&h(t,o)}i.default.prototype.createStringDict=function(t,r){return i.default._validateParameters("createStringDict",arguments),new i.default.StringDict(t,r)},i.default.prototype.createNumberDict=function(t,r){return i.default._validateParameters("createNumberDict",arguments),new i.default.NumberDict(t,r)},i.default.TypedDict=function(){function t(r,o){return d(this,t),r instanceof Object?this.data=r:(this.data={},this.data[r]=o),this}return f(t,[{key:"size",value:function(){return Object.keys(this.data).length}},{key:"hasKey",value:function(t){return this.data.hasOwnProperty(t)}},{key:"get",value:function(t){if(this.data.hasOwnProperty(t))return this.data[t];console.log("".concat(t," does not exist in this Dictionary"))}},{key:"set",value:function(t,r){this._validate(r)?this.data[t]=r:console.log("Those values dont work for this dictionary type.")}},{key:"_addObj",value:function(t){for(var r in t)this.set(r,t[r])}},{key:"create",value:function(t,r){t instanceof Object&&void 0===r?this._addObj(t):void 0!==t?this.set(t,r):console.log("In order to create a new Dictionary entry you must pass an object or a key, value pair")}},{key:"clear",value:function(){this.data={}}},{key:"remove",value:function(t){if(!this.data.hasOwnProperty(t))throw Error("".concat(t," does not exist in this Dictionary"));delete this.data[t]}},{key:"print",value:function(){for(var t in this.data)console.log("key:".concat(t," value:").concat(this.data[t]))}},{key:"saveTable",value:function(t){var r,o="";for(r in this.data)o+="".concat(r,",").concat(this.data[r],"\n");var n=new Blob([o],{type:"text/csv"});i.default.prototype.downloadFile(n,t||"mycsv","csv")}},{key:"saveJSON",value:function(t,r){i.default.prototype.saveJSON(this.data,t,r)}},{key:"_validate",value:function(t){return!0}}]),t}(),i.default.StringDict=function(){a(r,i.default.TypedDict);var t=u(r);function r(){d(this,r);for(var o=arguments.length,n=Array(o),s=0;s<o;s++)n[s]=arguments[s];return t.call.apply(t,[this].concat(n))}return f(r,[{key:"_validate",value:function(t){return"string"==typeof t}}]),r}(),i.default.NumberDict=function(){a(r,i.default.TypedDict);var t=u(r);function r(){d(this,r);for(var o=arguments.length,n=Array(o),s=0;s<o;s++)n[s]=arguments[s];return t.call.apply(t,[this].concat(n))}return f(r,[{key:"_validate",value:function(t){return"number"==typeof t}},{key:"add",value:function(t,r){this.data.hasOwnProperty(t)?this.data[t]+=r:console.log("The key - ".concat(t," does not exist in this dictionary."))}},{key:"sub",value:function(t,r){this.add(t,-r)}},{key:"mult",value:function(t,r){this.data.hasOwnProperty(t)?this.data[t]*=r:console.log("The key - ".concat(t," does not exist in this dictionary."))}},{key:"div",value:function(t,r){this.data.hasOwnProperty(t)?this.data[t]/=r:console.log("The key - ".concat(t," does not exist in this dictionary."))}},{key:"_valueTest",value:function(t){if(0===Object.keys(this.data).length)throw Error("Unable to search for a minimum or maximum value on an empty NumberDict");if(1===Object.keys(this.data).length)return this.data[Object.keys(this.data)[0]];var r,o=this.data[Object.keys(this.data)[0]];for(r in this.data)this.data[r]*t<o*t&&(o=this.data[r]);return o}},{key:"minValue",value:function(){return this._valueTest(1)}},{key:"maxValue",value:function(){return this._valueTest(-1)}},{key:"_keyTest",value:function(t){if(0===Object.keys(this.data).length)throw Error("Unable to use minValue on an empty NumberDict");if(1===Object.keys(this.data).length)return Object.keys(this.data)[0];for(var r=Object.keys(this.data)[0],o=1;o<Object.keys(this.data).length;o++)Object.keys(this.data)[o]*t<r*t&&(r=Object.keys(this.data)[o]);return r}},{key:"minKey",value:function(){return this._keyTest(1)}},{key:"maxKey",value:function(){return this._keyTest(-1)}}]),r}(),t=i.default.TypedDict,o.default=t}
1,{"../core/main":283,"core-js/modules/es.array.concat":153,"core-js/modules/es.array.iterator":165,"core-js/modules/es.object.get-prototype-of":188,"core-js/modules/es.object.keys":189,"core-js/modules/es.object.to-string":190,"core-js/modules/es.reflect.construct":192,"core-js/modules/es.regexp.to-string":196,"core-js/modules/es.string.iterator":200,"core-js/modules/es.symbol":212,"core-js/modules/es.symbol.description":210,"core-js/modules/es.symbol.iterator":211,"core-js/modules/web.dom-collections.iterator":246}],299:[function(t,r,o){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}t("core-js/modules/es.symbol"),t("core-js/modules/es.symbol.description"),t("core-js/modules/es.symbol.iterator"),t("core-js/modules/es.array.every"),t("core-js/modules/es.array.filter"),t("core-js/modules/es.array.for-each"),t("core-js/modules/es.array.from"),t("core-js/modules/es.array.index-of"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.array.map"),t("core-js/modules/es.array.slice"),t("core-js/modules/es.array.splice"),t("core-js/modules/es.function.name"),t("core-js/modules/es.object.assign"),t("core-js/modules/es.object.get-prototype-of"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.promise"),t("core-js/modules/es.reflect.construct"),t("core-js/modules/es.regexp.exec"),t("core-js/modules/es.regexp.to-string"),t("core-js/modules/es.string.iterator"),t("core-js/modules/es.string.replace"),t("core-js/modules/es.string.split"),t("core-js/modules/es.string.trim"),t("core-js/modules/web.dom-collections.for-each"),t("core-js/modules/web.dom-collections.iterator"),t("core-js/modules/web.url"),t("core-js/modules/es.symbol"),t("core-js/modules/es.symbol.description"),t("core-js/modules/es.symbol.iterator"),t("core-js/modules/es.array.every"),t("core-js/modules/es.array.filter"),t("core-js/modules/es.array.for-each"),t("core-js/modules/es.array.from"),t("core-js/modules/es.array.index-of"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.array.map"),t("core-js/modules/es.array.slice"),t("core-js/modules/es.array.splice"),t("core-js/modules/es.function.name"),t("core-js/modules/es.object.assign"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.promise"),t("core-js/modules/es.regexp.exec"),t("core-js/modules/es.regexp.to-string"),t("core-js/modules/es.string.iterator"),t("core-js/modules/es.string.replace"),t("core-js/modules/es.string.split"),t("core-js/modules/es.string.trim"),t("core-js/modules/web.dom-collections.for-each"),t("core-js/modules/web.dom-collections.iterator"),t("core-js/modules/web.url"),Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;var s=(t=t("../core/main"))&&t.__esModule?t:{default:t};function i(t,r){for(var o=0;o<r.length;o++){var n=r[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function a(t,r,o){r&&i(t.prototype,r),o&&i(t,o)}function l(t,r){return(l=Object.setPrototypeOf||function(t,r){return t.__proto__=r,t})(t,r)}function u(t){if(void 0===t)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function c(t){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function d(t,r){if(!(t instanceof r))throw TypeError("Cannot call a class as a function")}function h(t){return(h="function"==typeof Symbol&&"symbol"===n(Symbol.iterator)?function(t){return n(t)}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":n(t)})(t)}function f(t,r,o){return(r._userNode||document.body).appendChild(t),o=new(o?s.default.MediaElement:s.default.Element)(t,r),r._elements.push(o),o}s.default.prototype.select=function(t,r){return s.default._validateParameters("select",arguments),(r=this._getContainer(r).querySelector(t))?this._wrapElement(r):null},s.default.prototype.selectAll=function(t,r){s.default._validateParameters("selectAll",arguments);var o=[],n=this._getContainer(r).querySelectorAll(t);if(n)for(var i=0;i<n.length;i++){var a=this._wrapElement(n[i]);o.push(a)}return o},s.default.prototype._getContainer=function(t){var r=document;return"string"==typeof t?r=document.querySelector(t)||document:t instanceof s.default.Element?r=t.elt:t instanceof HTMLElement&&(r=t),r},s.default.prototype._wrapElement=function(t){var r,o=Array.prototype.slice.call(t.children);
1return"INPUT"===t.tagName&&"checkbox"===t.type?((r=new s.default.Element(t,this)).checked=function(){return 0==arguments.length?this.elt.checked:(this.elt.checked=!(arguments.length<=0||!arguments[0]),this)},r):"VIDEO"===t.tagName||"AUDIO"===t.tagName?new s.default.MediaElement(t,this):"SELECT"===t.tagName?this.createSelect(new s.default.Element(t,this)):0<o.length&&o.every(function(t){return"INPUT"===t.tagName||"LABEL"===t.tagName})&&("DIV"===t.tagName||"SPAN"===t.tagName)?this.createRadio(new s.default.Element(t,this)):new s.default.Element(t,this)},s.default.prototype.removeElements=function(t){s.default._validateParameters("removeElements",arguments),this._elements.filter(function(t){return!(t.elt instanceof HTMLCanvasElement)}).map(function(t){return t.remove()})},s.default.Element.prototype.changed=function(t){return s.default.Element._adjustListener("change",t,this),this},s.default.Element.prototype.input=function(t){return s.default.Element._adjustListener("input",t,this),this},s.default.prototype.createDiv=function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"",r=document.createElement("div");return r.innerHTML=t,f(r,this)},s.default.prototype.createP=function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"",r=document.createElement("p");return r.innerHTML=t,f(r,this)},s.default.prototype.createSpan=function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"",r=document.createElement("span");return r.innerHTML=t,f(r,this)},s.default.prototype.createImg=function(){s.default._validateParameters("createImg",arguments);var t,r=document.createElement("img"),o=arguments;return 1<o.length&&"string"==typeof o[1]&&(r.alt=o[1]),2<o.length&&"string"==typeof o[2]&&(r.crossOrigin=o[2]),r.src=o[0],t=f(r,this),r.addEventListener("load",function(){t.width=r.offsetWidth||r.width,t.height=r.offsetHeight||r.height;var n=o[o.length-1];"function"==typeof n&&n(t)}),t},s.default.prototype.createA=function(t,r,o){s.default._validateParameters("createA",arguments);var n=document.createElement("a");return n.href=t,n.innerHTML=r,o&&(n.target=o),f(n,this)},s.default.prototype.createSlider=function(t,r,o,n){s.default._validateParameters("createSlider",arguments);var i=document.createElement("input");return i.type="range",i.min=t,i.max=r,0===n?i.step=1e-18:n&&(i.step=n),"number"==typeof o&&(i.value=o),f(i,this)},s.default.prototype.createButton=function(t,r){s.default._validateParameters("createButton",arguments);var o=document.createElement("button");return o.innerHTML=t,r&&(o.value=r),f(o,this)},s.default.prototype.createCheckbox=function(){for(var t=arguments.length,r=Array(t),o=0;o<t;o++)r[o]=arguments[o];s.default._validateParameters("createCheckbox",r);var n=document.createElement("div"),i=document.createElement("input"),a=(i.type="checkbox",document.createElement("label")),l=(a.appendChild(i),n.appendChild(a),f(n,this));return l.checked=function(){var t=l.elt.firstElementChild.getElementsByTagName("input")[0];if(t){if(0==arguments.length)return t.checked;t.checked=!(arguments.length<=0||!arguments[0])}return l},this.value=function(t){return l.value=t,this},r[0]&&(l.value(r[0]),(n=document.createElement("span")).innerHTML=r[0],a.appendChild(n)),r[1]&&(i.checked=!0),l},s.default.prototype.createSelect=function(){for(var t,r=arguments.length,o=Array(r),n=0;n<r;n++)o[n]=arguments[n];s.default._validateParameters("createSelect",o);var i,a=o[0];return a instanceof s.default.Element&&a.elt instanceof HTMLSelectElement?this.elt=(t=a).elt:a instanceof HTMLSelectElement?(t=f(a,this),this.elt=a):(i=document.createElement("select"),a&&"boolean"==typeof a&&i.setAttribute("multiple","true"),t=f(i,this),this.elt=i),t.option=function(t,r){var o;if(void 0!==t){for(var n,s=0;s<this.elt.length;s+=1)if(this.elt[s].textContent===t){o=s;break}void 0!==o?!1===r?this.elt.remove(o):this.elt[o].value=r:((n=document.createElement("option")).textContent=t,n.value=void 0===r?t:r,this.elt.appendChild(n),this._pInst._elements.push(n))}},t.selected=function(t){if(void 0!==t){for(var r=0;r<this.elt.length;r+=1)this.elt[r].value.toString()===t.toString()&&(this.elt.selectedIndex=r);return this}if(this.elt.getAttribute("multiple")){var o=[],n=!0,s=!1,i=void 0;try{for(var a,l=this.elt.selectedOptions[Symbol.iterator]();!(n=(a=l.next()).done);
1n=!0){var u=a.value;o.push(u.value)}}catch(t){s=!0,i=t}finally{try{n||null==l.return||l.return()}finally{if(s)throw i}}return o}return this.elt.value},t.disable=function(t){if("string"==typeof t)for(var r=0;r<this.elt.length;r++)this.elt[r].value.toString()===t&&(this.elt[r].disabled=!0,this.elt[r].selected=!1);else this.elt.disabled=!0;return this},t.enable=function(t){if("string"==typeof t)for(var r=0;r<this.elt.length;r++)this.elt[r].value.toString()===t&&(this.elt[r].disabled=!1,this.elt[r].selected=!1);else{this.elt.disabled=!1;for(var o=0;o<this.elt.length;o++)this.elt[o].disabled=!1,this.elt[o].selected=!1}return this},t};var p=0;function m(t,r,o,n){var s=document.createElement(r),i=("string"==typeof(o=o||"")&&(o=[o]),!0),r=!1,a=void 0;try{for(var l,u=o[Symbol.iterator]();!(i=(l=u.next()).done);i=!0){var c=l.value,d=document.createElement("source");d.setAttribute("src",c),s.appendChild(d)}}catch(t){r=!0,a=t}finally{try{i||null==u.return||u.return()}finally{if(r)throw a}}var h=f(s,t,!0);return h.loadedmetadata=!1,s.addEventListener("loadedmetadata",function(){h.width=s.videoWidth,h.height=s.videoHeight,0===h.elt.width&&(h.elt.width=s.videoWidth),0===h.elt.height&&(h.elt.height=s.videoHeight),h.presetPlaybackRate&&(h.elt.playbackRate=h.presetPlaybackRate,delete h.presetPlaybackRate),h.loadedmetadata=!0}),"function"==typeof n&&s.addEventListener("canplaythrough",function t(){n(h),s.removeEventListener("canplaythrough",t)}),h}function y(t,r,o,n){d(this,y),this.callback=t,this.time=r,this.id=o,this.val=n}s.default.prototype.createRadio=function(){function t(t){return t instanceof HTMLInputElement&&"radio"===t.type}function r(t){return t instanceof HTMLLabelElement}var o,n,i,a=arguments.length<=0?void 0:arguments[0];return a instanceof s.default.Element&&(a.elt instanceof HTMLDivElement||a.elt instanceof HTMLSpanElement)?(o=a,this.elt=a.elt):a instanceof HTMLDivElement||a instanceof HTMLSpanElement?(o=f(a,this),n=this.elt=a,"string"==typeof(arguments.length<=1?void 0:arguments[1])&&(i=arguments.length<=1?void 0:arguments[1])):("string"==typeof a&&(i=a),o=f(n=document.createElement("div"),this),this.elt=n),o._name=i||"radioOption_".concat(p++),o._getOptionsArray=function(){return Array.from(this.elt.children).filter(function(o){return t(o)||r(o)&&t(o.firstElementChild)}).map(function(r){return t(r)?r:r.firstElementChild})},o.option=function(t,n){var s,i,a,l=!0,u=!1,c=void 0;try{for(var d,h=o._getOptionsArray()[Symbol.iterator]();!(l=(d=h.next()).done);l=!0){var f=d.value;if(f.value===t){s=f;break}}}catch(t){u=!0,c=t}finally{try{l||null==h.return||h.return()}finally{if(u)throw c}}return void 0===s&&((s=document.createElement("input")).setAttribute("type","radio"),s.setAttribute("value",t)),s.setAttribute("name",o._name),r(s.parentElement)?i=s.parentElement:(i=document.createElement("label")).insertAdjacentElement("afterbegin",s),i.lastElementChild instanceof HTMLSpanElement?a=i.lastElementChild:(a=document.createElement("span"),s.insertAdjacentElement("afterend",a)),a.innerHTML=void 0===n?t:n,this.elt.appendChild(i),s},o.remove=function(t){var n=!0,s=!1,i=void 0;try{for(var a,l=o._getOptionsArray()[Symbol.iterator]();!(n=(a=l.next()).done);n=!0){var u=a.value;if(u.value===t)return void(r(u.parentElement)?u.parentElement:u).remove()}}catch(t){s=!0,i=t}finally{try{n||null==l.return||l.return()}finally{if(s)throw i}}},o.value=function(){var t="",r=!0,n=!1,s=void 0;try{for(var i,a=o._getOptionsArray()[Symbol.iterator]();!(r=(i=a.next()).done);r=!0){var l=i.value;if(l.checked){t=l.value;break}}}catch(t){n=!0,s=t}finally{try{r||null==a.return||a.return()}finally{if(n)throw s}}return t},o.selected=function(t){var r=null;if(void 0===t){var n=!0,s=!1,i=void 0;try{for(var a,l=o._getOptionsArray()[Symbol.iterator]();!(n=(a=l.next()).done);n=!0){var u=a.value;if(u.checked){r=u;break}}}catch(t){s=!0,i=t}finally{try{n||null==l.return||l.return()}finally{if(s)throw i}}}else{o._getOptionsArray().forEach(function(t){t.checked=!1,t.removeAttribute("checked")});var c=!0,s=!1,i=void 0;try{for(var d,h=o._getOptionsArray()[Symbol.iterator]();!(c=(d=h.next()).done);c=!0){var f=d.value;f.value===t&&(f.setAttribute("checked",!0),f.checked=!0,r=f)}}catch(t){s=!0,i=t}finally{try{c||null==h.return||h.return()}finally{if(s)throw i}}}return r},o.disable=function(){var t=!(0<arguments.length&&void 0!==arguments[0])||arguments[0],r=!0,n=!1,s=void 0;try{for(var i,a=o._getOptionsArray()[Symbol.iterator]();!(r=(i=a.next()).done);r=!0)i.value.setAttribute("disabled",t)}catch(t){n=!0,s=t}finally{try{r||null==a.return||a.return()}finally{if(n)throw s}}},o},s.default.prototype.createColorPicker=function(t){s.default._validateParameters("createColorPicker",arguments);var r=document.createElement("input");return r.type="color",t?t instanceof s.default.Color?r.value=t.toString("#rrggbb"):(s.default.prototype._colorMode="rgb",s.default.prototype._colorMaxes={rgb:[255,255,255,255],hsb:[360,100,100,1],hsl:[360,100,100,1]},r.value=s.default.prototype.color(t).toString("#rrggbb")):r.value="#000000",(r=f(r,this)).color=function(){return t&&(t.mode&&(s.default.prototype._colorMode=t.mode),t.maxes&&(s.default.prototype._colorMaxes=t.maxes)),s.default.prototype.color(this.elt.value)},r},s.default.prototype.createInput=function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"",r=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"text",o=(s.default._validateParameters("createInput",arguments),document.createElement("input"));return o.setAttribute("value",t),o.setAttribute("type",r),f(o,this)},s.default.prototype.createFileInput=function(t){var r,o=1<arguments.length&&void 0!==arguments[1]&&arguments[1];if(s.default._validateParameters("createFileInput",arguments),window.File&&window.FileReader&&window.FileList&&window.Blob)return(r=document.createElement("input")).setAttribute("type","file"),o&&r.setAttribute("multiple",!0),r.addEventListener("change",function(r){var o=!0,n=!1,i=void 0;try{for(var a,l=r.target.files[Symbol.iterator]();!(o=(a=l.next()).done);o=!0){var u=a.value;s.default.File._load(u,t)}}catch(t){n=!0,i=t}finally{try{o||null==l.return||l.return()}finally{if(n)throw i}}},!1),f(r,this);console.log("The File APIs are not fully supported in this browser. C
1annot create element.")},s.default.prototype.createVideo=function(t,r){return s.default._validateParameters("createVideo",arguments),m(this,"video",t,r)},s.default.prototype.createAudio=function(t,r){return s.default._validateParameters("createAudio",arguments),m(this,"audio",t,r)},s.default.prototype.VIDEO="video",s.default.prototype.AUDIO="audio",void 0===navigator.mediaDevices&&(navigator.mediaDevices={}),void 0===navigator.mediaDevices.getUserMedia&&(navigator.mediaDevices.getUserMedia=function(t){var r=navigator.webkitGetUserMedia||navigator.mozGetUserMedia;return r?new Promise(function(o,n){r.call(navigator,t,o,n)}):Promise.reject(Error("getUserMedia is not implemented in this browser"))}),s.default.prototype.createCapture=function(){for(var t=arguments.length,r=Array(t),o=0;o<t;o++)r[o]=arguments[o];if(s.default._validateParameters("createCapture",r),!navigator.mediaDevices||!navigator.mediaDevices.getUserMedia)throw new DOMException("getUserMedia not supported in this browser");for(var n,i=!0,a=!0,l=!1,u=0;u<r.length;u++){var c=r[u];c===s.default.prototype.VIDEO?a=!1:c===s.default.prototype.AUDIO?i=!1:"object"===h(c)?(void 0!==c.flipped&&(l=c.flipped,delete c.flipped),d=Object.assign({},d,c)):"function"==typeof c&&(n=c)}var d=Object.assign({},{video:i,audio:a},d),p=document.createElement("video"),m=(p.setAttribute("playsinline",""),navigator.mediaDevices.getUserMedia(d).then(function(t){try{"srcObject"in p?p.srcObject=t:p.src=window.URL.createObjectURL(t)}catch(r){p.src=t}}).catch(function(t){"NotFoundError"===t.name&&s.default._friendlyError("No webcam found on this device","createCapture"),"NotAllowedError"===t.name&&s.default._friendlyError("Access to the camera was denied","createCapture"),console.error(t)}),f(p,this,!0));return m.loadedmetadata=!1,p.addEventListener("loadedmetadata",function(){p.play(),p.width?(m.width=p.width,m.height=p.height,l&&(m.elt.style.transform="scaleX(-1)")):(m.width=m.elt.width=p.videoWidth,m.height=m.elt.height=p.videoHeight),m.loadedmetadata=!0,n&&n(p.srcObject)}),m.flipped=l,m},s.default.prototype.createElement=function(t,r){return s.default._validateParameters("createElement",arguments),t=document.createElement(t),void 0!==r&&(t.innerHTML=r),f(t,this)},s.default.Element.prototype.addClass=function(t){return this.elt.className?this.hasClass(t)||(this.elt.className=this.elt.className+" "+t):this.elt.className=t,this},s.default.Element.prototype.removeClass=function(t){return this.elt.classList.remove(t),this},s.default.Element.prototype.hasClass=function(t){return this.elt.classList.contains(t)},s.default.Element.prototype.toggleClass=function(t){return this.elt.classList.contains(t)?this.elt.classList.remove(t):this.elt.classList.add(t),this},s.default.Element.prototype.child=function(t){return void 0===t?this.elt.childNodes:("string"==typeof t?("#"===t[0]&&(t=t.substring(1)),t=document.getElementById(t)):t instanceof s.default.Element&&(t=t.elt),t instanceof HTMLElement&&this.elt.appendChild(t),this)},s.default.Element.prototype.center=function(t){var r=this.elt.style.display,o="none"===this.elt.style.display,n="none"===this.parent().style.display,s={x:this.elt.offsetLeft,y:this.elt.offsetTop},i=(o&&this.show(),n&&this.parent().show(),this.elt.style.display="block",this.position(0,0),Math.abs(this.parent().offsetWidth-this.elt.offsetWidth)),a=Math.abs(this.parent().offsetHeight-this.elt.offsetHeight);return"both"===t||void 0===t?this.position(i/2+this.parent().offsetLeft,a/2+this.parent().offsetTop):"horizontal"===t?this.position(i/2+this.parent().offsetLeft,s.y):"vertical"===t&&this.position(s.x,a/2+this.parent().offsetTop),this.style("display",r),o&&this.hide(),n&&this.parent().hide(),this},s.default.Element.prototype.html=function(){return 0==arguments.length?this.elt.innerHTML:(arguments.length<=1||!arguments[1]?this.elt.innerHTML=arguments.length<=0?void 0:arguments[0]:this.elt.insertAdjacentHTML("beforeend",arguments.length<=0?void 0:arguments[0]),this)},s.default.Element.prototype.position=function(){return 0==arguments.length?{x:this.elt.offsetLeft,y:this.elt.offsetTop}:(this.elt.style.position="static"!==(arguments.length<=2?void 0:arguments[2])&&"fixed"!==(arguments.length<=2?void 0:arguments[2])&&"relative"!==(arguments.length<=2?void 0:arguments[2])&&"sticky"!==(arguments.length<=2?void 0:arguments[2])&&"initial"!==(arguments.length<=2?void 0:arguments[2])&&"inherit"!==(arguments.length<=2?void 0:arguments[2])?"absolute":arguments.length<=2?void 0:arguments[2],this.elt.style.left=(arguments.length<=0?void 0:arguments[0])+"px",this.elt.style.top=(arguments.length<=1?void 0:arguments[1])+"px",this.x=arguments.length<=0?void 0:arguments[0],this.y=arguments.length<=1?void 0:arguments[1],this)},s.default.Element.prototype._translate=function(){this.elt.style.position="absolute";var t="";return this.elt.style.transform&&(t=(t=this.elt.style.transform.replace(/translate3d\(.*\)/g,"")).replace(/translate[X-Z]?\(.*\)/g,"")),2==arguments.length?this.elt.style.transform="translate("+(arguments.length<=0?void 0:arguments[0])+"px, "+(arguments.length<=1?void 0:arguments[1])+"px)":2<arguments.length&&(this.elt.style.transform="translate3d("+(arguments.length<=0?void 0:arguments[0])+"px,"+(arguments.length<=1?void 0:arguments[1])+"px,"+(arguments.length<=2?void 0:arguments[2])+"px)",this.elt.parentElement.style.perspective=3==arguments.length?"1000px":(arguments.length<=3?void 0:arguments[3])+"px"),this.elt.style.transform+=t,this},s.default.Element.prototype._rotate=function(){var t="";return this.elt.style.transform&&(t=(t=this.elt.style.transform.replace(/rotate3d\(.*\)/g,"")).replace(/rotate[X-Z]?\(.*\)/g,"")),1==arguments.length?this.elt.style.transform="rotate("+(arguments.length<=0?void 0:arguments[0])+"deg)":2==arguments.length?this.elt.style.transform="rotate("+(arguments.length<=0?void 0:arguments[0])+"deg, "+(arguments.length<=1?void 0:arguments[1])+"deg)":3==arguments.length&&(this.elt.style.transform="rotateX("+(arguments.length<=0?void 0:arguments[0])+"deg)",this.elt.style.transform+="rotateY("+(arguments.length<=1?void 0:arguments[1])+"deg)",this.elt.style.transform+="rotateZ("+(arguments.length<=2?void 0:arguments[2])+"deg)"),this.elt.style.transform+=t,this},s.default.Element.prototype.style=function(t,r){if(void 0===(r=r instanceof s.default.Color?"rgba("+r.levels[0]+","+r.levels[1]+","+r.levels[2]+","+r.levels[3]/255+")":r)){if(-1===t.indexOf(":"))return window.getComputedStyle(this.elt).getPropertyValue(t);for(var o=t.split(";"),n=0;n<o.length;n++){var i=o[n].split(":");i[0]&&i[1]&&(this.elt.style[i[0].trim()]=i[1].trim())}}else this.elt.style[t]=r,"width"!==t&&"height"!==t&&"left"!==t&&"top"!==t||(r=window.getComputedStyle(this.elt).getPropertyValue(t).replace(/[^\d.]/g,""),this[t]=Math.round(parseFloat(r,10)));return this},s.default.Element.prototype.attribute=function(t,r){if(null==this.elt.firstChild||"checkbox"!==this.elt.firstChild.type&&"radio"!==this.elt.firstChild.type)return void 0===r?this.elt.getAttribute(t):(this.elt.setAttribute(t,r),this);if(void 0===r)return this.elt.firstChild.getAttribute(t);for(var o=0;o<this.elt.childNodes.length;o++)this.elt.childNodes[o].setAttribute(t,r)},s.default.Element.prototype.removeAttribute=function(t){if(null!=this.elt.firstChild&&("checkbox"===this.elt.firstChild.type||"radio"===this.elt.firstChild.type))for(var r=0;r<this.elt.childNodes.length;r++)this.elt.childNodes[r].removeAttribute(t);return this.elt.removeAttribute(t),this},s.default.Element.prototype.value=function(){return 0<arguments.length?(this.elt.value=arguments.length<=0?void 0:arguments[0],this):"range"===this.elt.type?parseFloat(this.elt.value):this.elt.value},s.default.Element.prototype.show=function(){return this.elt.style.display="block",this},s.default.Element.prototype.hide=function(){return this.elt.style.display="none",this},s.default.Element.prototype.size=function(t,r){if(0==arguments.length)return{width:this.elt.offsetWidth,height:this.elt.offsetHeight};var o=t,n=r,i=s.default.prototype.AUTO;if(o!==i||n!==i){if(o===i?o=r*this.width/this.height:n===i&&(n=t*this.height/this.width),this.elt instanceof HTMLCanvasElement){var a,l={},u=this.elt.getContext("2d");for(a in u)l[a]=u[a];for(a in this.elt.setAttribute("width",o*this._pInst._pixelDensity),this.elt.setAttribute("height",n*this._pInst._pixelDensity),this.elt.style.width=o+"px",this.elt.style.height=n+"px",this._pInst.scale(this._pInst._pixelDensity,this._pInst._pixelDensity),l)this.elt.getContext("2d")[a]=l[a]}else this.elt.style.width=o+"px",this.elt.style.height=n+"px",this.elt.width=o,this.elt.height=n;this.width=o,this.height=n,this._pInst&&this._pInst._curElement&&this._pInst._curElement.elt===this.elt&&(this._pInst._setProperty("width",o),this._pInst._setProperty("height",n))}return this},s.default.Element.prototype.remove=function(){this instanceof s.default.MediaElement&&(this.stop(),null!==(r=this.elt.srcObject)&&r.getTracks().forEac
1h(function(t){t.stop()}));var t,r=this._pInst._elements.indexOf(this);for(t in -1!==r&&this._pInst._elements.splice(r,1),this._events)this.elt.removeEventListener(t,this._events[t]);this.elt&&this.elt.parentNode&&this.elt.parentNode.removeChild(this.elt)},s.default.Element.prototype.drop=function(t,r){var o;return window.File&&window.FileReader&&window.FileList&&window.Blob?(this._dragDisabled||(this._dragDisabled=!0,this.elt.addEventListener("dragover",o=function(t){t.preventDefault()}),this.elt.addEventListener("dragleave",o)),s.default.Element._attachListener("drop",function(o){o.preventDefault(),"function"==typeof r&&r.call(this,o);var o=o.dataTransfer.files,n=!0,i=!1,a=void 0;try{for(var l,u=o[Symbol.iterator]();!(n=(l=u.next()).done);n=!0){var c=l.value;s.default.File._load(c,t)}}catch(t){i=!0,a=t}finally{try{n||null==u.return||u.return()}finally{if(i)throw a}}},this)):console.log("The File APIs are not fully supported in this browser."),this},s.default.Element.prototype.draggable=function(t){var r,o="ontouchstart"in window,n=0,s=0,i=0,a=0,l=o?"touchend":"mouseup",u=o?"touchmove":"mousemove";function c(r){var l;r=r||window.event,a=o?(l=r.changedTouches,n=i-parseInt(l[0].clientX),s=a-parseInt(l[0].clientY),i=parseInt(l[0].clientX),parseInt(l[0].clientY)):(n=i-parseInt(r.clientX),s=a-parseInt(r.clientY),i=parseInt(r.clientX),parseInt(r.clientY)),t.style.left=t.offsetLeft-n+"px",t.style.top=t.offsetTop-s+"px"}function d(){document.removeEventListener(l,d,!1),document.removeEventListener(u,c,!1)}return void 0===t?r=t=this.elt:t!==this.elt&&t.elt!==this.elt&&(t=t.elt,r=this.elt),r.addEventListener(o?"touchstart":"mousedown",function(t){var r;return t=t||window.event,a=o?(i=parseInt((r=t.changedTouches)[0].clientX),parseInt(r[0].clientY)):(i=parseInt(t.clientX),parseInt(t.clientY)),document.addEventListener(l,d,!1),document.addEventListener(u,c,!1),!1},!1),r.style.cursor="move",this},t=function(t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");o.prototype=Object.create(t&&t.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),t&&l(o,t);var r=function(){var t,r,n=c(o);return t=!function(){if("undefined"!=typeof Reflect&&Reflect.construct&&!Reflect.construct.sham){if("function"==typeof Proxy)return 1;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),1}catch(t){}}}()?n.apply(this,arguments):Reflect.construct(n,arguments,t=c(this).constructor),n=this,(r=t)&&("object"===h(r)||"function"==typeof r)?r:u(n)};function o(t,n){d(this,o);var s=u(n=r.call(this,t,n));return n.elt.crossOrigin="anonymous",n._prevTime=0,n._cueIDCounter=0,n._cues=[],n.pixels=[],n._pixelsState=u(n),n._pixelDensity=1,n._modified=!1,n._frameOnCanvas=-1,Object.defineProperty(s,"src",{get:function(){var t=s.elt.children[0].src,r=s.elt.src===window.location.href?"":s.elt.src;return t===window.location.href?r:t},set:function(r){for(var o=0;o<s.elt.children.length;o++)s.elt.removeChild(s.elt.children[o]);var n=document.createElement("source");n.src=r,t.appendChild(n),s.elt.src=r,s.modified=!0}}),s._onended=function(){},s.elt.onended=function(){s._onended(s)},n}return a(o,[{key:"play",value:function(){var t;return this.elt.currentTime===this.elt.duration&&(this.elt.currentTime=0),1<this.elt.readyState||this.elt.load(),(t=this.elt.play())&&t.catch&&t.catch(function(t){"NotAllowedError"===t.name?console.error(t):console.error("Media play method encountered an unexpected error",t)}),this}},{key:"stop",value:function(){return this.elt.pause(),this.elt.currentTime=0,this}},{key:"pause",value:function(){return this.elt.pause(),this}},{key:"loop",value:function(){return this.elt.setAttribute("loop",!0),this.play(),this}},{key:"noLoop",value:function(){return this.elt.removeAttribute("loop"),this}},{key:"_setupAutoplayFailDetection",value:function(){var t=setTimeout(function(){console.error(e)},500);this.elt.addEventListener("play",function(){return clearTimeout(t)},{passive:!0,once:!0})}},{key:"autoplay",value:function(t){var r=this,o=this.elt.getAttribute("autoplay");return this.elt.setAttribute("autoplay",t),t&&!o&&(t=function(){return r._setupAutoplayFailDetection()},4===this.elt.readyState?t():this.elt.addEventListener("canplay",t,{passive:!0,once:!0})),this}},{key:"volume",value:function(t){if(void 0===t)return this.elt.volume;this.elt.volume=t}},{key:"speed",value:function(t){if(void 0===t)return this.presetPlaybackRate||this.elt.playbackRate;this.loadedmetadata?this.elt.playbackRate=t:this.presetPlaybackRate=t}},{key:"time",value:function(t){return void 0===t?this.elt.currentTime:(this.elt.currentTime=t,this)}},{key:"duration",value:function(){return this.elt.duration}},{key:"_ensureCanvas",value:function(){this.canvas||(this.canvas=document.createElement("canvas"),this.drawingContext=this.canvas.getContext("2d"),this.setModified(!0));var t=this._frameOnCanvas!==this._pInst.frameCount;this.loadedmetadata&&t&&(this.canvas.width!==this.elt.width&&(this.canvas.width=this.elt.width,this.canvas.height=this.elt.height,this.width=this.canvas.width,this.height=this.canvas.height),this.drawingContext.clearRect(0,0,this.canvas.width,this.canvas.height),!0===this.flipped&&(this.drawingContext.save(),this.drawingContext.scale(-1,1),this.drawingContext.translate(-this.canvas.width,0)),this.drawingContext.drawImage(this.elt,0,0,this.canvas.width,this.canvas.height),!0===this.flipped&&this.drawingContext.restore(
1),this.setModified(!0),this._frameOnCanvas=this._pInst.frameCount)}},{key:"loadPixels",value:function(){this._ensureCanvas();for(var t=arguments.length,r=Array(t),o=0;o<t;o++)r[o]=arguments[o];return s.default.Renderer2D.prototype.loadPixels.apply(this,r)}},{key:"updatePixels",value:function(t,r,o,n){return this.loadedmetadata&&(this._ensureCanvas(),s.default.Renderer2D.prototype.updatePixels.call(this,t,r,o,n)),this.setModified(!0),this}},{key:"get",value:function(){this._ensureCanvas();for(var t=arguments.length,r=Array(t),o=0;o<t;o++)r[o]=arguments[o];return s.default.Renderer2D.prototype.get.apply(this,r)}},{key:"_getPixel",value:function(){this.loadPixels();for(var t=arguments.length,r=Array(t),o=0;o<t;o++)r[o]=arguments[o];return s.default.Renderer2D.prototype._getPixel.apply(this,r)}},{key:"set",value:function(t,r,o){this.loadedmetadata&&(this._ensureCanvas(),s.default.Renderer2D.prototype.set.call(this,t,r,o),this.setModified(!0))}},{key:"copy",value:function(){this._ensureCanvas();for(var t=arguments.length,r=Array(t),o=0;o<t;o++)r[o]=arguments[o];s.default.prototype.copy.apply(this,r)}},{key:"mask",value:function(){this.loadPixels(),this.setModified(!0);for(var t=arguments.length,r=Array(t),o=0;o<t;o++)r[o]=arguments[o];s.default.Image.prototype.mask.apply(this,r)}},{key:"isModified",value:function(){return this._modified}},{key:"setModified",value:function(t){this._modified=t}},{key:"onended",value:function(t){return this._onended=t,this}},{key:"connect",value:function(t){var r,o;if("function"==typeof s.default.prototype.getAudioContext)r=s.default.prototype.getAudioContext(),o=s.default.soundOut.input;else try{o=(r=t.context).destination}catch(t){throw"connect() is meant to be used with Web Audio API or p5.sound.js"}this.audioSourceNode||(this.audioSourceNode=r.createMediaElementSource(this.elt),this.audioSourceNode.connect(o)),t?t.input?this.audioSourceNode.connect(t.input):this.audioSourceNode.connect(t):this.audioSourceNode.connect(o)}},{key:"disconnect",value:function(){if(!this.audioSourceNode)throw"nothing to disconnect";this.audioSourceNode.disconnect()}},{key:"showControls",value:function(){this.elt.style["text-align"]="inherit",this.elt.controls=!0}},{key:"hideControls",value:function(){this.elt.controls=!1}},{key:"addCue",value:function(t,r,o){var n=this._cueIDCounter++,r=new y(r,t,n,o);return this._cues.push(r),this.elt.ontimeupdate||(this.elt.ontimeupdate=this._onTimeUpdate.bind(this)),n}},{key:"removeCue",value:function(t){for(var r=0;r<this._cues.length;r++)this._cues[r].id===t&&(console.log(t),this._cues.splice(r,1));0===this._cues.length&&(this.elt.ontimeupdate=null)}},{key:"clearCues",value:function(){this._cues=[],this.elt.ontimeupdate=null}},{key:"_onTimeUpdate",value:function(){for(var t=this.time(),r=0;r<this._cues.length;r++){var o=this._cues[r].time,n=this._cues[r].val;this._prevTime<o&&o<=t&&this._cues[r].callback(n)}this._prevTime=t}}]),o}(s.default.Element),s.default.MediaElement=t,t=function(){function t(r,o){d(this,t),this.file=r,this._pInst=o,o=r.type.split("/"),this.type=o[0],this.subtype=o[1],this.name=r.name,this.size=r.size,this.data=void 0}return a(t,null,[{key:"_createLoader",value:function(t,r){var o=new FileReader;return o.onload=function(o){var n,i=new s.default.File(t);"application/json"===i.file.type?i.data=JSON.parse(o.target.result):"text/xml"===i.file.type?(n=(new DOMParser).parseFromString(o.target.result,"text/xml"),i.data=new s.default.XML(n.documentElement)):i.data=o.target.result,r(i)},o}},{key:"_load",value:function(t,r){var o;/^text\//.test(t.type)||"application/json"===t.type?s.default.File._createLoader(t,r).readAsText(t):/^(video|audio)\//.test(t.type)?((o=new s.default.File(t)).data=URL.createObjectURL(t),r(o)):s.default.File._createLoader(t,r).readAsDataURL(t)}}]),t}(),s.default.File=t,t=s.default,o.default=t},{"../core/main":283,"core-js/modules/es.array.every":155,"core-js/modules/es.array.filter":157,"core-js/modules/es.array.for-each":161,"core-js/modules/es.array.from":162,"core-js/modules/es.array.index-of":164,"core-js/modules/es.array.iterator":165,"core-js/modules/es.array.map":168,"core-js/modules/es.array.slice":169,"core-js/modules/es.array.splice":171,"core-js/modules/es.function.name":174,"core-js/modules/es.object.assign":183,"core-js/modules/es.object.get-prototype-of":188,"core-js/modules/es.object.to-string":190,"core-js/modules/es.promise":191,"core-js/modules/es.reflect.construct":192,"core-js/modules/es.regexp.exec":195,"core-js/modules/es.regexp.to-string":196,"core-js/modules/es.string.iterator":200,"core-js/modules/es.string.replace":204,"core-js/modules/es.string.split":206,"core-js/modules/es.string.trim":209,"core-js/modules/es.symbol":212,"core-js/modules/es.symbol.description":210,"core-js/modules/es.symbol.iterator":211,"core-js/modules/web.dom-collections.for-each":245,"core-js/modules/web.dom-collections.iterator":246,"core-js/modules/web.url":248}],300:[function(t,r,o){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;var n=(t=t("../core/main"))&&t.__esModule?t:{default:t};n.default.prototype.deviceOrientation=1<window.innerWidth/window.innerHeight?"landscape":"portrait",n.default.prototype.accelerationX=0,n.default.prototype.accelerationY=0,n.default.prototype.accelerationZ=0,n.default.prototype.pAccelerationX=0,n.default.prototype.pAccelerationY=0,n.default.prototype.pAccelerationZ=0,n.default.prototype._updatePAccelerations=function(){this._setProperty("pAccelerationX",this.accelerationX),this._setProperty("pAccelerationY",this.accelerationY),this._setProperty("pAccelerationZ",this.accelerationZ)},n.default.prototype.rotationX=0,n.default.prototype.rotationY=0,n.default.prototype.rotationZ=0,n.default.prototype.pRotationX=0,n.default.prototype.pRotationY=0;var s=n.default.prototype.pRotationZ=0,i=0,a=0,l="clockwise",u="clockwise",c="clockwise",d=(n.default.prototype.pRotateDirectionX=void 0,n.default.prototype.pRotateDirectionY=void 0,n.default.prototype.pRotateDirectionZ=void 0,n.default.prototype._updatePRotations=function(){this._setProperty("pRotationX",this.rotationX),this._setProperty("pRotationY",this.rotationY),this._setProperty("pRotationZ",this.rotationZ)},n.default.prototype.turnAxis=void 0,.5),h=30,t=(n.default.prototype.setMoveThreshold=function(t){n.default._validateParameters("setMoveThreshold",arguments),d=t},n.default.prototype.setShakeThreshold=function(t){n.default._validateParameters("setShakeThreshold",arguments),h=t},n.default.prototype._ondeviceorientation=function(t){this._updatePRotations(),this._setProperty("rotationX",this._fromDegrees(t.beta)),this._setProperty("rotationY",this._fromDegrees(t.gamma)),this._setProperty("rotationZ",this._fromDegrees(t.alpha)),this._handleMotion()},n.default.prototype._ondevicemotion=function(t){this._updatePAccelerations(),this._setProperty("accelerationX",2*t.acceleration.x),this._setProperty("accelerationY",2*t.acceleration.y),this._setProperty("accelerationZ",2*t.acceleration.z),this._handleMotion()},n.default.prototype._handleMotion=function(){90===window.orientation||-90===window.orientation?this._setProperty("deviceOrientation","landscape"):0===window.orientation?this._setProperty("deviceOrientation","portrait"):void 0===window.orientation&&this._setProperty("deviceOrientation","undefined");var t,r,o,n,f,p=this._isGlobal?window:this;"function"==typeof p.deviceMoved&&(Math.abs(this.accelerationX-this.pAccelerationX)>d||Math.abs(this.accelerationY-this.pAccelerationY)>d||Math.abs(this.accelerationZ-this.pAccelerationZ)>
1d)&&p.deviceMoved(),"function"==typeof p.deviceTurned&&(r=this._toDegrees(this.rotationX)+180,o=this._toDegrees(this.pRotationX)+180,t=s+180,0<r-o&&r-o<270||r-o<-270?l="clockwise":(r-o<0||270<r-o)&&(l="counter-clockwise"),l!==this.pRotateDirectionX&&(t=r),90<Math.abs(r-t)&&270>Math.abs(r-t)&&(t=r,this._setProperty("turnAxis","X"),p.deviceTurned()),this.pRotateDirectionX=l,s=t-180,o=this._toDegrees(this.rotationY)+180,r=this._toDegrees(this.pRotationY)+180,t=i+180,0<o-r&&o-r<270||o-r<-270?u="clockwise":(o-r<0||270<o-this.pRotationY)&&(u="counter-clockwise"),u!==this.pRotateDirectionY&&(t=o),90<Math.abs(o-t)&&270>Math.abs(o-t)&&(t=o,this._setProperty("turnAxis","Y"),p.deviceTurned()),this.pRotateDirectionY=u,i=t-180,0<(r=this._toDegrees(this.rotationZ))-(o=this._toDegrees(this.pRotationZ))&&r-o<270||r-o<-270?c="clockwise":(r-o<0||270<r-o)&&(c="counter-clockwise"),c!==this.pRotateDirectionZ&&(a=r),90<Math.abs(r-a)&&270>Math.abs(r-a)&&(a=r,this._setProperty("turnAxis","Z"),p.deviceTurned()),this.pRotateDirectionZ=c,this._setProperty("turnAxis",void 0)),"function"==typeof p.deviceShaken&&(null!==this.pAccelerationX&&(n=Math.abs(this.accelerationX-this.pAccelerationX),f=Math.abs(this.accelerationY-this.pAccelerationY)),h<n+f&&p.deviceShaken())},n.default);o.default=t},{"../core/main":283}],301:[function(t,r,o){"use strict";t("core-js/modules/es.array.for-each"),t("core-js/modules/es.string.repeat"),t("core-js/modules/web.dom-collections.for-each"),t("core-js/modules/es.array.for-each"),t("core-js/modules/es.string.repeat"),t("core-js/modules/web.dom-collections.for-each"),Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;var n=(t=t("../core/main"))&&t.__esModule?t:{default:t};n.default.prototype.isKeyPressed=!1,n.default.prototype.keyIsPressed=!1,n.default.prototype.key="",n.default.prototype.keyCode=0,n.default.prototype._onkeydown=function(t){var r;t.repeat?this._setProperty("isKeyRepeated",!0):(this._setProperty("isKeyRepeated",!1),this._setProperty("isKeyPressed",!0),this._setProperty("keyIsPressed",!0),this._setProperty("keyCode",t.which),this._downKeys[t.which]=!0,this._setProperty("key",t.key||String.fromCharCode(t.which)||t.which),t.metaKey&&(this._metaKeys||(this._metaKeys=[]),this._metaKeys.push(t.which)),"function"!=typeof(r=this._isGlobal?window:this).keyPressed||t.charCode||!1===r.keyPressed(t)&&t.preventDefault())},n.default.prototype._onkeyup=function(t){var r=this,o=(this._setProperty("isKeyPressed",!1),this._setProperty("keyIsPressed",!1),this._setProperty("_lastKeyCodePressed",this._keyCode),this._downKeys[t.which]=!1,"Meta"===t.key&&this._metaKeys&&(this._metaKeys.forEach(function(t){r._downKeys[t]=!1}),this._metaKeys=[]),this._isGlobal?window:this);"function"==typeof o.keyReleased&&!1===o.keyReleased(t)&&t.preventDefault()},n.default.prototype._onkeypress=function(t){var r;t.which===this._lastKeyCodeTyped&&this.isKeyRepeated||(this._setProperty("_lastKeyCodeTyped",t.which),this._setProperty("key",t.key||String.fromCharCode(t.which)||t.which),"function"==typeof(r=this._isGlobal?window:this).keyTyped&&!1===r.keyTyped(t)&&t.preventDefault())},n.default.prototype._onblur=function(t){this._downKeys={}},n.default.prototype.keyIsDown=function(t){return n.default._validateParameters("keyIsDown",arguments),this._downKeys[t]||!1},n.default.prototype._areDownKeys=function(){for(var t in this._downKeys)if(this._downKeys.hasOwnProperty(t)&&!0===this._downKeys[t])return!0;return!1},t=n.default,o.default=t},{"../core/main":283,"core-js/modules/es.array.for-each":161,"core-js/modules/es.string.repeat":203,"core-js/modules/web.dom-collections.for-each":245}],302:[function(t,r,o){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function s(t){return(s="function"==typeof Symbol&&"symbol"===n(Symbol.iterator)?function(t){return n(t)}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":n(t)})(t)}t("core-js/modules/es.symbol"),t("core-js/modules/es.symbol.description"),t("core-js/modules/es.symbol.iterator"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.object.get-own-property-descriptor"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.string.iterator"),t("core-js/modules/es.weak-map"),t("core-js/modules/web.dom-collections.iterator"),Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;var i=(i=t("../core/main"))&&i.__esModule?i:{default:i},a=function(t){if(t&&t.__esModule)return t;if(null===t||"object"!==s(t)&&"function"!=typeof t)return{default:t};var r,o=l();if(o&&o.has(t))return o.get(t);var n,i={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(n in t)Object.prototype.hasOwnProperty.call(t,n)&&((r=a?Object.getOwnPropertyDescriptor(t,n):null)&&(r.get||r.set)?Object.defineProperty(i,n,r):i[n]=t[n]);return i.default=t,o&&o.set(t,i),i}(t("../core/constants"));function l(){var t;return"function"!=typeof WeakMap?null:(t=new WeakMap,l=function(){return t},t)}i.default.prototype.movedX=0,i.default.prototype.movedY=0,i.default.prototype._hasMouseInteracted=!1,i.default.prototype.mouseX=0,i.default.prototype.mouseY=0,i.default.prototype.pmouseX=0,i.default.prototype.pmouseY=0,i.default.prototype.winMouseX=0,i.default.prototype.winMouseY=0,i.default.prototype.pwinMouseX=0,i.default.prototype.pwinMouseY=0,i.default.prototype.mouseButton=0,i.default.prototype.mouseIsPressed=!1,i.default.prototype._updateNextMouseCoords=function(t){var r,o,n,s,i;null!==this._curElement&&(!t.touches||0<t.touches.length)&&(r=this._curElement.elt,o=this.width,n=this.height,(s=t)&&!s.clientX&&(s.touches?s=s.touches[0]:s.changedTouches&&(s=s.changedTouches[0])),i=r.getBoundingClientRect(),o=r.scrollWidth/o||1,r=r.scrollHeight/n||1,n={x:(s.clientX-i.left)/o,y:(s.clientY-i.top)/r,winX:s.clientX,winY:s.clientY,id:s.identifier},this._setProperty("mouseX",n.x),this._setProperty("mouseY",n.y),this._setProperty("winMouseX",n.winX),this._setProperty("winMouseY",n.winY),null===document.pointerLockElement?(o=this.mouseX-this.pmouseX,i=this.mouseY-this.pmouseY,this._setProperty("movedX",o),this._setProperty("movedY",i)):(this._setProperty("movedX",t.movementX),this._setProperty("movedY",t.movementY))),this._hasMouseInteracted||(this._updateMouseCoords(),this._setProperty("_hasMouseInteracted",!0))},i.default.prototype._updateMouseCoords=function(){this._setProperty("pmouseX",this.mouseX),this._setProperty("pmouseY",this.mouseY),this._setProperty("pwinMouseX",this.winMouseX),this._setProperty("pwinMouseY",this.winMouseY),this._setProperty("_pmouseWheelDeltaY",this._mouseWheelDeltaY)},i.default.prototype._setMouseButton=function(t){1===t.button?this._setProperty("mouseButton",a.CENTER):2===t.button?this._setProperty("mouseButton",a.RIGHT):this._setProperty("mouseButton",a.LEFT)},i.default.prototype._onmousemove=function(t){var r=this._isGlobal?window:this;this._updateNextMouseCoords(t),this.mouseIsPressed?"function"==typeof r.mouseDragged?!1===r.mouseDragged(t)&&t.preventDefault():"function"==typeof r.touchMoved&&!1===r.touchMoved(t)&&t.preventDefault():"function"==typeof r.mouseMoved&&!1===r.mouseMoved(t)&&t.preventDefault()},i.default.prototype._onmousedown=function(t){var r=this._isGlobal?window:this;this._setProperty("mouseIsPressed",!0),this._setMouseButton(t),this._updateNextMouseCoords(t),this.touchstart||("function"==typeof r.mousePressed?!1===r.mousePressed(t)&&t.preventDefault():"function"==typeof r.touchStarted&&!1===r.touchStarted(t)&&t.preventDefault(),this.touchstart=!1)},i.default.prototype._onmouseup=function(t){var r=this._isGlobal?window:this;this._setProperty("mouseIsPressed",!1),this.touchend||("function"==typeof r.mouseReleased?!1===r.mouseReleased(t)&&t.preventDefault():"function"==typeof r.touchEnded&&!1===r.touchEnded(t)&&t.preventDefault(),this.touchend=!1)},i.default.prototype._ondragend=i.default.prototype._onmouseup,i.default.prototype._ondragover=i.default.prototype._onmousemove,i.default.prototype._onclick=function(t){var r=this._isGlobal?window:this;"function"==typeof r.mouseClicked&&!1===r.mouseClicked(t)&&t.preventDefault()},i.default.prototype._ondblclick=function(t){var r=this._isGlobal?window:this;"function"==typeof r.doubleClicked&&!1===r.doubleClicked(t)&&t.preventDefault()},i.default.prototype._mouseWheelDeltaY=0,i.default.prototype._pmouseWheelDeltaY=0,i.default.prototype._onw
1heel=function(t){var r=this._isGlobal?window:this;this._setProperty("_mouseWheelDeltaY",t.deltaY),"function"==typeof r.mouseWheel&&(t.delta=t.deltaY,!1===r.mouseWheel(t)&&t.preventDefault())},i.default.prototype.requestPointerLock=function(){var t=this._curElement.elt;return t.requestPointerLock=t.requestPointerLock||t.mozRequestPointerLock,t.requestPointerLock?(t.requestPointerLock(),!0):(console.log("requestPointerLock is not implemented in this browser"),!1)},i.default.prototype.exitPointerLock=function(){document.exitPointerLock()},t=i.default,o.default=t},{"../core/constants":272,"../core/main":283,"core-js/modules/es.array.iterator":165,"core-js/modules/es.object.get-own-property-descriptor":186,"core-js/modules/es.object.to-string":190,"core-js/modules/es.string.iterator":200,"core-js/modules/es.symbol":212,"core-js/modules/es.symbol.description":210,"core-js/modules/es.symbol.iterator":211,"core-js/modules/es.weak-map":244,"core-js/modules/web.dom-collections.iterator":246}],303:[function(t,r,o){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,(t=(t=t("../core/main"))&&t.__esModule?t:{default:t}).default.prototype.touches=[],t.default.prototype._updateTouchCoords=function(t){if(null!==this._curElement){for(var r=[],o=0;o<t.touches.length;o++)r[o]=function(t,r,o,n){var s=4<arguments.length&&void 0!==arguments[4]?arguments[4]:0,i=t.getBoundingClientRect(),r=t.scrollWidth/r||1,t=t.scrollHeight/o||1,o=n.touches[s]||n.changedTouches[s];return{x:(o.clientX-i.left)/r,y:(o.clientY-i.top)/t,winX:o.clientX,winY:o.clientY,id:o.identifier}}(this._curElement.elt,this.width,this.height,t,o);this._setProperty("touches",r)}},t.default.prototype._ontouchstart=function(t){var r=this._isGlobal?window:this;this._setProperty("mouseIsPressed",!0),this._updateTouchCoords(t),this._updateNextMouseCoords(t),this._updateMouseCoords(),"function"==typeof r.touchStarted&&(!1===r.touchStarted(t)&&t.preventDefault(),this.touchstart=!0)},t.default.prototype._ontouchmove=function(t){var r=this._isGlobal?window:this;this._updateTouchCoords(t),this._updateNextMouseCoords(t),"function"==typeof r.touchMoved?!1===r.touchMoved(t)&&t.preventDefault():"function"==typeof r.mouseDragged&&!1===r.mouseDragged(t)&&t.preventDefault()},t.default.prototype._ontouchend=function(t){this._setProperty("mouseIsPressed",!1),this._updateTouchCoords(t),this._updateNextMouseCoords(t);var r=this._isGlobal?window:this;"function"==typeof r.touchEnded&&(!1===r.touchEnded(t)&&t.preventDefault(),this.touchend=!0)},t=t.default,o.default=t},{"../core/main":283}],304:[function(t,r,o){"use strict";t("core-js/modules/es.array.iterator"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.typed-array.int32-array"),t("core-js/modules/es.typed-array.uint8-array"),t("core-js/modules/es.typed-array.copy-within"),t("core-js/modules/es.typed-array.every"),t("core-js/modules/es.typed-array.fill"),t("core-js/modules/es.typed-array.filter"),t("core-js/modules/es.typed-array.find"),t("core-js/modules/es.typed-array.find-index"),t("core-js/modules/es.typed-array.for-each"),t("core-js/modules/es.typed-array.includes"),t("core-js/modules/es.typed-array.index-of"),t("core-js/modules/es.typed-array.iterator"),t("core-js/modules/es.typed-array.join"),t("core-js/modules/es.typed-array.last-index-of"),t("core-js/modules/es.typed-array.map"),t("core-js/modules/es.typed-array.reduce"),t("
1core-js/modules/es.typed-array.reduce-right"),t("core-js/modules/es.typed-array.reverse"),t("core-js/modules/es.typed-array.set"),t("core-js/modules/es.typed-array.slice"),t("core-js/modules/es.typed-array.some"),t("core-js/modules/es.typed-array.sort"),t("core-js/modules/es.typed-array.subarray"),t("core-js/modules/es.typed-array.to-locale-string"),t("core-js/modules/es.typed-array.to-string"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.typed-array.int32-array"),t("core-js/modules/es.typed-array.uint8-array"),t("core-js/modules/es.typed-array.copy-within"),t("core-js/modules/es.typed-array.every"),t("core-js/modules/es.typed-array.fill"),t("core-js/modules/es.typed-array.filter"),t("core-js/modules/es.typed-array.find"),t("core-js/modules/es.typed-array.find-index"),t("core-js/modules/es.typed-array.for-each"),t("core-js/modules/es.typed-array.includes"),t("core-js/modules/es.typed-array.index-of"),t("core-js/modules/es.typed-array.iterator"),t("core-js/modules/es.typed-array.join"),t("core-js/modules/es.typed-array.last-index-of"),t("core-js/modules/es.typed-array.map"),t("core-js/modules/es.typed-array.reduce"),t("
1core-js/modules/es.typed-array.reduce-right"),t("core-js/modules/es.typed-array.reverse"),t("core-js/modules/es.typed-array.set"),t("core-js/modules/es.typed-array.slice"),t("core-js/modules/es.typed-array.some"),t("core-js/modules/es.typed-array.sort"),t("core-js/modules/es.typed-array.subarray"),t("core-js/modules/es.typed-array.to-locale-string"),t("core-js/modules/es.typed-array.to-string"),Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;var n,s,i,a,l={_toPixels:function(t){var r,o;return t instanceof ImageData?t.data:t.getContext("2d")?t.getContext("2d").getImageData(0,0,t.width,t.height).data:t.getContext("webgl")?(o=new Uint8Array(o=(r=t.getContext("webgl")).drawingBufferWidth*r.drawingBufferHeight*4),r.readPixels(0,0,t.width,t.height,r.RGBA,r.UNSIGNED_BYTE,o),o):void 0},_getARGB:function(t,r){return t[3+(r*=4)]<<24&4278190080|t[r]<<16&16711680|t[1+r]<<8&65280|255&t[2+r]},_setPixels:function(t,r){for(var o,n=0,s=t.length;n<s;n++)t[0+(o=4*n)]=(16711680&r[n])>>>16,t[1+o]=(65280&r[n])>>>8,t[2+o]=255&r[n],t[3+o]=(4278190080&r[n])>>>24},_toImageData:function(t){return t instanceof ImageData?t:t.getContext("2d").getImageData(0,0,t.width,t.height)},_createImageData:function(t,r){return l._tmpCanvas=document.createElement("canvas"),l._tmpCtx=l._tmpCanvas.getContext("2d"),this._tmpCtx.createImageData(t,r)},apply:function(t,r,o){var n=t.getContext("2d"),s=n.getImageData(0,0,t.width,t.height),r=r(s,o);r instanceof ImageData?n.putImageData(r,0,0,0,0,t.width,t.height):n.putImageData(s,0,0,0,0,t.width,t.height)},threshold:function(t){for(var r=1<arguments.length&&void 0!==arguments[1]?arguments[1]:.5,o=l._toPixels(t),n=Math.floor(255*r),s=0;s<o.length;s+=4){var i=n<=.2126*o[s]+.7152*o[s+1]+.0722*o[s+2]?255:0;o[s]=o[s+1]=o[s+2]=i}},gray:function(t){for(var r=l._toPixels(t),o=0;o<r.length;o+=4){var n=r[o],s=r[o+1],i=r[o+2];r[o]=r[o+1]=r[o+2]=.2126*n+.7152*s+.0722*i}},opaque:function(t){for(var r=l._toPixels(t),o=0;o<r.length;o+=4)r[o+3]=255;return r},invert:function(t){for(var r=l._toPixels(t),o=0;o<r.length;o+=4)r[o]=255-r[o],r[o+1]=255-r[o+1],r[o+2]=255-r[o+2]},posterize:function(t){var r=1<arguments.length&&void 0!==arguments[1]?arguments[1]:4,o=l._toPixels(t);if(r<2||255<r)throw Error("Level must be greater than 2 and less than 255 for posterize");for(var n=r-1,s=0;s<o.length;s+=4){var i=o[s],a=o[s+1],u=o[s+2];o[s]=255*(i*r>>8)/n,o[s+1]=255*(a*r>>8)/n,o[s+2]=255*(u*r>>8)/n}},dilate:function(t){for(var r,o,n,s,i,a,u,c,d,h=l._toPixels(t),f=0,p=h.length?h.length/4:0,m=new Int32Array(p);f<p;)for(o=(r=f)+t.width;f<o;)s=n=l._getARGB(h,f),(d=f-1)<r&&(d=f),o<=(c=f+1)&&(c=f),(i=f-t.width)<0&&(i=0),p<=(a=f+t.width)&&(a=f),i=l._getARGB(h,i),d=l._getARGB(h,d),a=l._getARGB(h,a),(s=77*(s>>16&255)+151*(s>>8&255)+28*(255&s))<(u=77*(d>>16&255)+151*(d>>8&255)+28*(255&d))&&(n=d,s=u),s<(u=77*((d=l._getARGB(h,c))>>16&255)+151*(d>>8&255)+28*(255&d))&&(n=d,s=u),s<(c=77*(i>>16&255)+151*(i>>8&255)+28*(255&i))&&(n=i,s=c),s<(d=77*(a>>16&255)+151*(a>>8&255)+28*(255&a))&&(n=a,s=d),m[f++]=n;l._setPixels(h,m)},erode:function(t){for(var r,o,n,s,i,a,u,c,d,h=l._toPixels(t),f=0,p=h.length?h.length/4:0,m=new Int32Array(p);f<p;)for(o=(r=f)+t.width;f<o;)s=n=l._getARGB(h,f),(d=f-1)<r&&(d=f),o<=(c=f+1)&&(c=f),(i=f-t.width)<0&&(i=0),p<=(a=f+t.width)&&(a=f),i=l._getARGB(h,i),d=l._getARGB(h,d),a=l._getARGB(h,a),(u=77*(d>>16&255)+151*(d>>8&255)+28*(255&d))<(s=77*(s>>16&255)+151*(s>>8&255)+28*(255&s))&&(n=d,s=u),(u=77*((d=l._getARGB(h,c))>>16&255)+151*(d>>8&255)+28*(255&d))<s&&(n=d,s=u),(c=77*(i>>16&255)+151*(i>>8&255)+28*(255&i))<s&&(n=i,s=c),(d=77*(a>>16&255)+151*(a>>8&255)+28*(255&a))<s&&(n=a,s=d),m[f++]=n;l._setPixels(h,m)},blur:function(t,r){for(var o,u,c,d,h,f,p,m,y,g,v=l._toPixels(t),b=t.width,_=t.height,j=b*_,x=new Int32Array(j),w=0;w<j;w++)x[w]=l._getARGB(v,w);var S,T,E,M,k,O,C,P,A=new Int32Array(j),L=new Int32Array(j),R=new Int32Array(j),I=new Int32Array(j),D=0,F=3.5*r|0;if(n!==(F=F<1?1:F<248?F:248)){i=new Int32Array(s=1+(n=F)<<1),a=Array(s);for(var N=0;N<s;N++)a[N]=new Int32Array(256);for(var U=1,B=F-1;U<F;U++){i[F+U]=i[B]=O=B*B,C=a[F+U],P=a[B--];for(var G=0;G<256;G++)C[G]=P[G]=O*G}k=i[F]=F*F,C=a[F];for(var V=0;V<256;V++)C[V]=k*V}for(T=0;T<_;T++){for(S=0;S<b;S++){if(d=c=u=h=o=0,(f=S-n)<0)g=-f,f=0;else{if(b<=f)break;g=0}for(E=g;E<s&&!(b<=f);E++){var z=x[f+D];h+=(M=a[E])[(-16777216&z)>>>
124],u+=M[(16711680&z)>>16],c+=M[(65280&z)>>8],d+=M[255&z],o+=i[E],f++}A[p=D+S]=h/o,L[p]=u/o,R[p]=c/o,I[p]=d/o}D+=b}for(y=(m=-n)*b,T=D=0;T<_;T++){for(S=0;S<b;S++){if(d=c=u=h=o=0,m<0)g=p=-m,f=S;else{if(_<=m)break;g=0,p=m,f=S+y}for(E=g;E<s&&!(_<=p);E++)h+=(M=a[E])[A[f]],u+=M[L[f]],c+=M[R[f]],d+=M[I[f]],o+=i[E],p++,f+=b;x[S+D]=h/o<<24|u/o<<16|c/o<<8|d/o}D+=b,y+=b,m++}l._setPixels(v,x)}};o.default=l},{"core-js/modules/es.array.iterator":165,"core-js/modules/es.object.to-string":190,"core-js/modules/es.typed-array.copy-within":213,"core-js/modules/es.typed-array.every":214,"core-js/modules/es.typed-array.fill":215,"core-js/modules/es.typed-array.filter":216,"core-js/modules/es.typed-array.find":218,"core-js/modules/es.typed-array.find-index":217,"core-js/modules/es.typed-array.for-each":221,"core-js/modules/es.typed-array.includes":222,"core-js/modules/es.typed-array.index-of":223,"core-js/modules/es.typed-array.int32-array":225,"core-js/modules/es.typed-array.iterator":226,"core-js/modules/es.typed-array.join":227,"core-js/modules/es.typed-array.last-index-of":228,"core-js/modules/es.typed-array.map":229,"core-js/modules/es.typed-array.reduce":231,"core-js/modules/es.typed-array.reduce-right":230,"core-js/modules/es.typed-array.reverse":232,"core-js/modules/es.typed-array.set":233,"core-js/modules/es.typed-array.slice":234,"core-js/modules/es.typed-array.some":235,"core-js/modules/es.typed-array.sort":236,"core-js/modules/es.typed-array.subarray":237,"core-js/modules/es.typed-array.to-locale-string":238,"core-js/modules/es.typed-array.to-string":239,"core-js/modules/es.typed-array.uint8-array":242}],305:[function(t,r,o){"use strict";t("core-js/modules/es.symbol"),t("core-js/modules/es.symbol.description"),t("core-js/modules/es.symbol.iterator"),t("core-js/modules/es.array.concat"),t("core-js/modules/es.array.filter"),t("core-js/modules/es.array.for-each"),t("core-js/modules/es.array.from"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.array.map"),t("core-js/modules/es.array.slice"),t("core-js/modules/es.object.keys"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.regexp.exec"),t("core-js/modules/es.regexp.to-string"),t("core-js/modules/es.set"),t("core-js/modules/es.string.iterator"),t("core-js/modules/es.string.replace"),t("core-js/modules/es.string.split"),t("core-js/modules/es.typed-array.uint8-array"),t("core-js/modules/es.typed-array.uint32-array"),t("core-js/modules/es.typed-array.copy-within"),t("core-js/modules/es.typed-array.every"),t("core-js/modules/es.typed-array.fill"),t("core-js/modules/es.typed-array.filter"),t("core-js/modules/es.typed-array.find"),t("core-js/modules/es.typed-array.find-index"),t("core-js/modules/es.typed-array.for-each"),t("core-js/modules/es.typed-array.includes"),t("core-js/modules/es.typed-array.index-of"),t("core-js/modules/es.typed-array.iterator"),t("core-js/modules/es.typed-array.join"),t("core-js/modules/es.typed-array.last-index-of"),t("core-js/modules/es.typed-array.map"),t("core-js/modules/es.typed-array.reduce"),t("
1core-js/modules/es.typed-array.reduce-right"),t("core-js/modules/es.typed-array.reverse"),t("core-js/modules/es.typed-array.set"),t("core-js/modules/es.typed-array.slice"),t("core-js/modules/es.typed-array.some"),t("core-js/modules/es.typed-array.sort"),t("core-js/modules/es.typed-array.subarray"),t("core-js/modules/es.typed-array.to-locale-string"),t("core-js/modules/es.typed-array.to-string"),t("core-js/modules/web.dom-collections.for-each"),t("core-js/modules/web.dom-collections.iterator"),t("core-js/modules/es.array.concat"),t("core-js/modules/es.array.filter"),t("core-js/modules/es.array.for-each"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.array.map"),t("core-js/modules/es.array.slice"),t("core-js/modules/es.object.keys"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.regexp.exec"),t("core-js/modules/es.regexp.to-string"),t("core-js/modules/es.set"),t("core-js/modules/es.string.iterator"),t("core-js/modules/es.string.replace"),t("core-js/modules/es.string.split"),t("core-js/modules/es.typed-array.uint8-array"),t("core-js/modules/es.typed-array.uint32-array"),t("core-js/modules/es.typed-array.copy-within"),t("core-js/modules/es.typed-array.every"),t("core-js/modules/es.typed-array.fill"),t("core-js/modules/es.typed-array.filter"),t("core-js/modules/es.typed-array.find"),t("core-js/modules/es.typed-array.find-index"),t("core-js/modules/es.typed-array.for-each"),t("core-js/modules/es.typed-array.includes"),t("core-js/modules/es.typed-array.index-of"),t("core-js/modules/es.typed-array.iterator"),t("core-js/modules/es.typed-array.join"),t("core-js/modules/es.typed-array.last-index-of"),t("core-js/modules/es.typed-array.map"),t("core-js/modules/es.typed-array.reduce"),t("
1core-js/modules/es.typed-array.reduce-right"),t("core-js/modules/es.typed-array.reverse"),t("core-js/modules/es.typed-array.set"),t("core-js/modules/es.typed-array.slice"),t("core-js/modules/es.typed-array.some"),t("core-js/modules/es.typed-array.sort"),t("core-js/modules/es.typed-array.subarray"),t("core-js/modules/es.typed-array.to-locale-string"),t("core-js/modules/es.typed-array.to-string"),t("core-js/modules/web.dom-collections.for-each"),t("core-js/modules/web.dom-collections.iterator"),Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;var n=i(t("../core/main")),s=i(t("omggif"));function i(t){return t&&t.__esModule?t:{default:t}}n.default.prototype.createImage=function(t,r){return n.default._validateParameters("createImage",arguments),new n.default.Image(t,r)},n.default.prototype.saveCanvas=function(){for(var t,r,o,s,i,a,l=arguments.length,u=Array(l),c=0;c<l;c++)u[c]=arguments[c];switch(n.default._validateParameters("saveCanvas",u),u[0]instanceof HTMLCanvasElement?(t=u[0],u.shift()):u[0]instanceof n.default.Element?(t=u[0].elt,u.shift()):u[0]instanceof n.default.Framebuffer?(s=u[0],(i=this.createGraphics(s.width,s.height)).pixelDensity(pixelDensity()),s.loadPixels(),i.loadPixels(),i.pixels.set(s.pixels),i.updatePixels(),t=i.elt,u.shift()):t=this._curElement&&this._curElement.elt,1<=u.length&&(r=u[0]),o=(o=2<=u.length?u[1]:o)||n.default.prototype._checkFileExtension(r,o)[1]||"png"){default:a="image/png";break;case"webp":a="image/webp";break;case"jpeg":case"jpg":a="image/jpeg"}t.toBlob(function(t){n.default.prototype.downloadFile(t,r,o),i&&i.remove()},a)},n.default.prototype.encodeAndDownloadGif=function(t,r){for(var o=t.gifProperties,i=o.loopLimit,a=(1===i?i=null:null===i&&(i=0),new Uint8Array(t.width*t.height*o.numFrames)),l=[],u={},c=0;c<o.numFrames;c++){for(var d=new Set,h=o.frames[c].image.data,f=h.length,p=new Uint32Array(t.width*t.height),m=0,y=0;m<f;m+=4,y++){var g=h[m+0]<<16|h[m+1]<<8|h[m+2]<<0;d.add(g),p[y]=g}var v=((function(t){if(Array.isArray(t)){for(var r=0,o=Array(t.length);r<t.length;r++)o[r]=t[r];return o}})(d)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(d)||function(){throw TypeError("Invalid attempt to spread non-iterable instance")}()).sort().toString();void 0===u[v]?u[v]={freq:1,frames:[c]}:(u[v].freq+=1,u[v].frames.push(c)),l.push(p)}for(var b=[],_=Object.keys(u).sort(function(t,r){return u[r].freq-u[t].freq}),j=_[0].split(",").map(function(t){return parseInt(t)}),b=b.concat(u[j].frames),x=new Set(j),w=1;w<_.length;w++){var S=_[w].split(",").map(function(t){return parseInt(t)}).filter(function(t){return!x.has(t)});if(j.length+S.length<=256){for(var T=0;T<S.length;T++)j.push(S[T]),x.add(S[T]);b=b.concat(u[_[w]].frames)}}b=new Set(b);for(var E={},M=0;M<j.length;M++)E[j[M]]||(E[j[M]]=M);for(var k=1;k<j.length;)k<<=1;j.length=k;for(var i={loop:i,palette:new Uint32Array(j)},O=new s.default.GifWriter(a,t.width,t.height,i),C={},P=0;P<o.numFrames;P++)!function(r){var n=!b.has(r),s=n?[]:j,i=new Uint8Array(t.width*t.height),a={},u=new Set,c=(l[r].forEach(function(t,o){n?(void 0===a[t]&&(a[t]=s.length,s.push(t)),i[o]=a[t]):i[o]=E[t],0<r&&l[r-1][o]!==t&&u.add(t)}),{}),d=s.filter(function(t){return!u.has(t)});if(0<d.length){var d=d[0],h=(n?a:E)[d];if(0<r){for(var f=0;f<l[r].length;f++)l[r-1][f]===l[r][f]&&(i[f]=h);c.transparent=h,C.frameOpts.disposal=1}}if(c.delay=o.frames[r].delay/10,n){for(var p=1;p<s.length;)p<<=1;s.length=p,c.palette=new Uint32Array(s)}0<r&&O.addFrame(0,0,t.width,t.height,C.pixelPaletteIndex,C.frameOpts),C={pixelPaletteIndex:i,frameOpts:c}}(P);C.frameOpts.disposal=1,O.addFrame(0,0,t.width,t.height,C.pixelPaletteIndex,C.frameOpts),i=new Blob([a.slice(0,O.end())],{type:"image/gif"}),n.default.prototype.downloadFile(i,r,"gif")},n.default.prototype.saveFrames=function(t,r,o,s,i){n.default._validateParameters("saveFrames",arguments),o=1e3*n.default.prototype.constrain(o=o||3,0,15);var s=n.default.prototype.constrain(s||15,0,22),a=0,l=n.default.prototype._makeFrame,u=this._curElement.elt,c=[],d=setInterval(function(){c.push(l(t+a,r,u)),a++},1e3/s);setTimeout(function(){if(clearInterval(d),i)i(c);else for(var t=0,r=c;t<r.length;t++){var o=r[t];n.default.prototype.downloadFile(o.imageData,o.filename,o.ext)}c=[]},.01+o)},n.default.prototype._makeFrame=function(t,r,o){var n,o=this?this._curElement.elt:o;if(r)switch(r.toLowerCase()){case"png":default:n="image/png";break;case"jpeg":case"jpg":n="image/jpeg"}else r="png",n="image/png";var o=(o=o.toDataURL(n)).replace(n,"image/octet-stream"),s={};return s.imageData=o,s.filename=t,s.ext=r,s},t=n.default,o.default=t}
1,{"../core/main":283,"core-js/modules/es.array.concat":153,"core-js/modules/es.array.filter":157,"core-js/modules/es.array.for-each":161,"core-js/modules/es.array.from":162,"core-js/modules/es.array.iterator":165,"core-js/modules/es.array.map":168,"core-js/modules/es.array.slice":169,"core-js/modules/es.object.keys":189,"core-js/modules/es.object.to-string":190,"core-js/modules/es.regexp.exec":195,"core-js/modules/es.regexp.to-string":196,"core-js/modules/es.set":197,"core-js/modules/es.string.iterator":200,"core-js/modules/es.string.replace":204,"core-js/modules/es.string.split":206,"core-js/modules/es.symbol":212,"core-js/modules/es.symbol.description":210,"core-js/modules/es.symbol.iterator":211,"core-js/modules/es.typed-array.copy-within":213,"core-js/modules/es.typed-array.every":214,"core-js/modules/es.typed-array.fill":215,"core-js/modules/es.typed-array.filter":216,"core-js/modules/es.typed-array.find":218,"core-js/modules/es.typed-array.find-index":217,"core-js/modules/es.typed-array.for-each":221,"core-js/modules/es.typed-array.includes":222,"core-js/modules/es.typed-array.index-of":223,"core-js/modules/es.typed-array.iterator":226,"core-js/modules/es.typed-array.join":227,"core-js/modules/es.typed-array.last-index-of":228,"core-js/modules/es.typed-array.map":229,"core-js/modules/es.typed-array.reduce":231,"core-js/modules/es.typed-array.reduce-right":230,"core-js/modules/es.typed-array.reverse":232,"core-js/modules/es.typed-array.set":233,"core-js/modules/es.typed-array.slice":234,"core-js/modules/es.typed-array.some":235,"core-js/modules/es.typed-array.sort":236,"core-js/modules/es.typed-array.subarray":237,"core-js/modules/es.typed-array.to-locale-string":238,"core-js/modules/es.typed-array.to-string":239,"core-js/modules/es.typed-array.uint32-array":241,"core-js/modules/es.typed-array.uint8-array":242,"core-js/modules/web.dom-collections.for-each":245,"core-js/modules/web.dom-collections.iterator":246,omggif:256}],306:[function(t,r,o){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function s(t){return(s="function"==typeof Symbol&&"symbol"===n(Symbol.iterator)?function(t){return n(t)}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":n(t)})(t)}t("core-js/modules/es.symbol"),t("core-js/modules/es.symbol.description"),t("core-js/modules/es.symbol.iterator"),t("core-js/modules/es.array.copy-within"),t("core-js/modules/es.array.includes"),t("core-js/modules/es.array.index-of"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.array.slice"),t("core-js/modules/es.object.get-own-property-descriptor"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.promise"),t("core-js/modules/es.regexp.to-string"),t("core-js/modules/es.string.includes"),t("core-js/modules/es.string.iterator"),t("core-js/modules/es.typed-array.uint8-array"),t("core-js/modules/es.typed-array.uint8-clamped-array"),t("core-js/modules/es.typed-array.copy-within"),t("core-js/modules/es.typed-array.every"),t("core-js/modules/es.typed-array.fill"),t("core-js/modules/es.typed-array.filter"),t("core-js/modules/es.typed-array.find"),t("core-js/modules/es.typed-array.find-index"),t("core-js/modules/es.typed-array.for-each"),t("core-js/modules/es.typed-array.includes"),t("core-js/modules/es.typed-array.index-of"),t("core-js/modules/es.typed-array.iterator"),t("core-js/modules/es.typed-array.join"),t("core-js/modules/es.typed-array.last-index-of"),t("core-js/modules/es.typed-array.map"),t("core-js/modules/es.typed-array.reduce"),t("
1core-js/modules/es.typed-array.reduce-right"),t("core-js/modules/es.typed-array.reverse"),t("core-js/modules/es.typed-array.set"),t("core-js/modules/es.typed-array.slice"),t("core-js/modules/es.typed-array.some"),t("core-js/modules/es.typed-array.sort"),t("core-js/modules/es.typed-array.subarray"),t("core-js/modules/es.typed-array.to-locale-string"),t("core-js/modules/es.typed-array.to-string"),t("core-js/modules/es.weak-map"),t("core-js/modules/web.dom-collections.iterator"),t("core-js/modules/es.array.copy-within"),t("core-js/modules/es.array.includes"),t("core-js/modules/es.array.index-of"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.array.slice"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.promise"),t("core-js/modules/es.regexp.to-string"),t("core-js/modules/es.string.includes"),t("core-js/modules/es.typed-array.uint8-array"),t("core-js/modules/es.typed-array.uint8-clamped-array"),t("core-js/modules/es.typed-array.copy-within"),t("core-js/modules/es.typed-array.every"),t("core-js/modules/es.typed-array.fill"),t("core-js/modules/es.typed-array.filter"),t("core-js/modules/es.typed-array.find"),t("core-js/modules/es.typed-array.find-index"),t("core-js/modules/es.typed-array.for-each"),t("core-js/modules/es.typed-array.includes"),t("core-js/modules/es.typed-array.index-of"),t("core-js/modules/es.typed-array.iterator"),t("core-js/modules/es.typed-array.join"),t("core-js/modules/es.typed-array.last-index-of"),t("core-js/modules/es.typed-array.map"),t("core-js/modules/es.typed-array.reduce"),t("
1core-js/modules/es.typed-array.reduce-right"),t("core-js/modules/es.typed-array.reverse"),t("core-js/modules/es.typed-array.set"),t("core-js/modules/es.typed-array.slice"),t("core-js/modules/es.typed-array.some"),t("core-js/modules/es.typed-array.sort"),t("core-js/modules/es.typed-array.subarray"),t("core-js/modules/es.typed-array.to-locale-string"),t("core-js/modules/es.typed-array.to-string"),Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,t("regenerator-runtime/runtime");var i,a,l=p(t("../core/main")),u=p(t("../core/helpers")),c=function(t){if(t&&t.__esModule)return t;if(null===t||"object"!==s(t)&&"function"!=typeof t)return{default:t};var r,o=f();if(o&&o.has(t))return o.get(t);var n,i={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(n in t)Object.prototype.hasOwnProperty.call(t,n)&&((r=a?Object.getOwnPropertyDescriptor(t,n):null)&&(r.get||r.set)?Object.defineProperty(i,n,r):i[n]=t[n]);return i.default=t,o&&o.set(t,i),i}(t("../core/constants")),d=p(t("omggif")),h=t("gifenc");function f(){var t;return"function"!=typeof WeakMap?null:(t=new WeakMap,f=function(){return t},t)}function p(t){return t&&t.__esModule?t:{default:t}}function m(t,r,o,n,s,i,a){try{var l=t[i](a),u=l.value}catch(t){return void o(t)}l.done?r(u):Promise.resolve(u).then(n,s)}function y(t,r){return 0<t&&t<r?t:r}t("../core/friendly_errors/validate_params"),t("../core/friendly_errors/file_errors"),t("../core/friendly_errors/fes_core"),l.default.prototype.loadImage=function(t,r,o){l.default._validateParameters("loadImage",arguments);var n=new l.default.Image(1,1,this),s=this,i=new Request(t,{method:"GET",mode:"cors"});return fetch(t,i).then(function(i){var a,u=i.headers.get("content-type");null===u&&console.warn("The image you loaded does not have a Content-Type header. If you are using the online editor consider reuploading the asset."),u&&u.includes("image/gif")?i.arrayBuffer().then(function(t){if(t){for(var t=new Uint8Array(t),i=(function(t){s._decrementPreload()}).bind(s),a=new d.default.GifReader(t),u=(n.width=n.canvas.width=a.width,n.height=n.canvas.height=a.height,[]),c=a.numFrames(),h=new Uint8ClampedArray(n.width*n.height*4),f=0;f<c;f++){var p=a.frameInfo(f),m=n.drawingContext.getImageData(0,0,n.width,n.height),y=(h=m.data.slice(),function(t,r){try{r.decodeAndBlitFrameRGBA(t,h)}catch(t){l.default._friendlyFileLoadError(8,n.src),"function"==typeof o?o(t):console.error(t)}}(f,a),new ImageData(h,n.width,n.height)),y=(n.drawingContext.putImageData(y,0,0),p.delay);0===y&&(y=10),u.push({image:n.drawingContext.getImageData(0,0,n.width,n.height),delay:10*y}),2===p.disposal?n.drawingContext.clearRect(p.x,p.y,p.width,p.height):3===p.disposal&&n.drawingContext.putImageData(m,0,0,p.x,p.y,p.width,p.height)}null===(t=a.loopCount())?t=1:0===t&&(t=null),n.drawingContext.putImageData(u[0].image,0,0),1<u.length&&(n.gifProperties={displayIndex:0,loopLimit:t,loopCount:0,frames:u,numFrames:c,playing:!0,timeDisplayed:0,lastChangeTime:0}),"function"==typeof r&&r(n),i()}},function(t){"function"==typeof o?(o(t),s._decrementPreload()):console.error(t)}):((a=new Image).onload=function(){n.width=n.canvas.width=a.width,n.height=n.canvas.height=a.height,n.drawingContext.drawImage(a,0,0),n.modified=!0,"function"==typeof r&&r(n),s._decrementPreload()},a.onerror=function(t){l.default._friendlyFileLoadError(0,a.src),"function"==typeof o?(o(t),s._decrementPreload()):console.error(t)},0!==t.indexOf("data:image/")&&(a.crossOrigin="Anonymous"),a.src=t),n.modified=!0}).catch(function(r){l.default._friendlyFileLoadError(0,t),"function"==typeof o?(o(r),s._decrementPreload()):console.error(r)}),n},l.default.prototype.saveGif=(i=regeneratorRuntime.mark(function t(r,o){var n,s,i,a,u,c,d,f,p,m,y,g,v,b,_,j,x,w,S,T,E,M,k,O,C,P,A=arguments;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(n=2<A.length&&void 0!==A[2]?A[2]:{delay:0,units:"seconds",silent:!1,notificationDuration:0,notificationID:"progressBar"},"string"!=typeof r)throw TypeError("fileName parameter must be a string");t.next=3;break;case 3:if("number"!=typeof o)throw TypeError("Duration parameter must be a number");t.next=5;break;case 5:if(s=n&&n.delay||0,i=n&&n.units||"seconds",a=n&&n.silent||!1,u=n&&n.notificationDuration||0,c=n&&n.notificationID||"progressBar","number"!=typeof s)throw TypeError("Delay parameter must be a number");t.next=12;break;case 12:if("seconds"!==i&&"frames"!==i)throw TypeError('Units parameter must be either "frames" or "seconds"');t.next=14;break;case 14:if("boolean"!=typeof a)throw TypeError("Silent parameter must be a boolean");t.next=16;break;case 16:if("number"!=typeof u)throw TypeError("Notification duration parameter must be a number");t.next=18;break;case 18:if("string"!=typeof c)throw TypeError("Notification ID parameter must be a string");t.next=20;break;case 20:return this._recording=!0,d=(d=1/(m=(m=this._targetFrameRate)!==1/0&&void 0!==m&&0!==m?m:60)*1e3)<20?20:d,p=(f="seconds"===i?o*m:o)+(m="seconds"===i?s*m:s),this.frameCount=m,y=this._pixelDensity,this.pixelDensity(1),g=[],null!==document.getElementById(c)&&document.getElementById(c).remove(),a||((v=this.createP("")).id(c),v.style("font-size","16px"),v.style("font-family","Montserrat"),v.style("background-color","#ffffffa0"),v.style("padding","8px"),v.style("border-radius","10px"),v.position(0,0)),this._renderer instanceof l.default.RendererGL&&
1(b=new Uint8Array((_=this.drawingContext).drawingBufferWidth*_.drawingBufferHeight*4)),this.noLoop(),t.next=39,Promise.resolve();case 39:if(m<p)return this.redraw(),O=void 0,O=this._renderer instanceof l.default.RendererGL?(b=new Uint8Array(_.drawingBufferWidth*_.drawingBufferHeight*4),_.readPixels(0,0,_.drawingBufferWidth,_.drawingBufferHeight,_.RGBA,_.UNSIGNED_BYTE,b),function(t,r,o){for(var n=parseInt(o/2),s=4*r,i=new Uint8Array(4*r),a=0;a<n;++a){var l=a*s,u=(o-a-1)*s;i.set(t.subarray(l,l+s)),t.copyWithin(l,u,u+s),t.set(i,u)}return t}(b,this.width,this.height)):this.drawingContext.getImageData(0,0,this.width,this.height).data,g.push(O),m++,a||v.html("Saved frame <b>"+g.length.toString()+"</b> out of "+f.toString()),t.next=48,new Promise(function(t){return setTimeout(t,0)});t.next=50;break;case 48:t.next=39;break;case 50:a||v.html("Frames processed, generating color palette..."),this.loop(),this.pixelDensity(y),j=(0,h.GIFEncoder)(),x=function(t){for(var r=new Uint8Array(t.length*t[0].length),o=0;o<t.length;o++)r.set(t[o],o*t[0].length);var n=(0,h.quantize)(r,256,{format:"rgba4444",oneBitAlpha:!0});return 256===n.length?n[n.length-1]=[255*Math.random(),255*Math.random(),255*Math.random(),0]:n.push([255*Math.random(),255*Math.random(),255*Math.random(),0]),n}(g),w={},S=function(t){for(var r=t.length/4,o=new Uint8Array(r),n=0;n<r;n++){var s=t[4*n]<<24|t[4*n+1]<<16|t[4*n+2]<<8|t[4*n+3];void 0===w[s]&&(w[s]=(0,h.nearestColorIndex)(x,t.slice(4*n,4*(n+1)))),o[n]=w[s]}return o},T=x.length-1,E=[],M=0;case 60:if(!(M<g.length)){t.next=71;break}if(O=(k=S(g[M])).slice(),0===M)j.writeFrame(k,this.width,this.height,{palette:x,delay:d,dispose:1});else{for(C=0;C<k.length;C++)k[C]===E[C]&&(k[C]=T);j.writeFrame(k,this.width,this.height,{delay:d,transparent:!0,transparentIndex:T,dispose:1})}return E=O,a||v.html("Rendered frame <b>"+M.toString()+"</b> out of "+f.toString()),t.next=68,new Promise(function(t){return setTimeout(t,0)});case 68:M++,t.next=60;break;case 71:j.finish(),P=new Blob([P=j.bytesView()],{type:"image/gif"}),g=[],this._recording=!1,this.loop(),a||(v.html("Done. Downloading your gif!\uD83C\uDF38"),0<u&&setTimeout(function(){return v.remove()},1e3*u)),l.default.prototype.downloadFile(P,r,"gif");case 80:case"end":return t.stop()}},t,this)}),a=function(){var t=this,r=arguments;return new Promise(function(o,n){var s=i.apply(t,r);function a(t){m(s,o,n,a,l,"next",t)}function l(t){m(s,o,n,a,l,"throw",t)}a(void 0)})},function(t,r){return a.apply(this,arguments)}),l.default.prototype.image=function(t,r,o,n,s,i,a,d,h,f,p,m){l.default._validateParameters("image",arguments);var g,v,b,_,j,x,w,S,T,E,M,k,O,C,P,A,L,R,I,D,F=t.width,N=t.height,U=(m=m||c.CENTER,p=p||c.CENTER,t.elt&&(F=void 0!==F?F:t.elt.width,N=void 0!==N?N:t.elt.height),t.elt&&t.elt.videoWidth&&!t.canvas&&(F=void 0!==F?F:t.elt.videoWidth,N=void 0!==N?N:t.elt.videoHeight),n||F),s=s||N,i=i||0,a=a||0,d=y(void 0!==d?d:F,F),F=y(void 0!==h?h:N,N),h=1;t.elt&&!t.canvas&&t.elt.style.width&&(h=(t.elt.videoWidth&&!n?t.elt.videoWidth:t.elt.width)/parseInt(t.elt.style.width,10)),i*=h,a*=h,F*=h,d*=h,g=f,v=p,b=m,_=(N=u.default.modeAdjust(r,o,U,s,this._renderer._imageMode)).x,j=N.y,x=N.w,w=N.h,S=i,T=a,E=d,M=F,g===c.COVER&&(k=v,C=b,R=x,I=w,L=S,D=T,A=Math.max(R/(O=E),I/(P=M)),R/=A,I/=A,A=L,L=D,k===c.CENTER?A+=(O-R)/2:k===c.RIGHT&&(A+=O-R),C===c.CENTER?L+=(P-I)/2:C===c.BOTTOM&&(L+=P-I),S=(D={x:A,y:L,w:R,h:I}).x,T=D.y,E=D.w,M=D.h),g===c.CONTAIN&&(k=v,O=b,C=_,P=j,A=x,L=w,D=Math.max((R=E)/A,(I=M)/L),R/=D,I/=D,D=C,C=P,k===c.CENTER?D+=(A-R)/2:k===c.RIGHT&&(D+=A-R),O===c.CENTER?C+=(L-I)/2:O===c.BOTTOM&&(C+=L-I),_=(g={x:D,y:C,w:R,h:I}).x,j=g.y,x=g.w,w=g.h),N={sx:S,sy:T,sw:E,sh:M,dx:_,dy:j,dw:x,dh:w},this._renderer.image(t,N.sx,N.sy,N.sw,N.sh,N.dx,N.dy,N.dw,N.dh)},l.default.prototype.tint=function(){for(var t=arguments.length,r=Array(t),o=0;o<t;o++)r[o]=arguments[o];l.default._validateParameters("tint",r);var n=this.color.apply(this,r);this._renderer._tint=n.levels},l.default.prototype.noTint=function(){this._renderer._tint=null},l.default.prototype._getTintedImageCanvas=l.default.Renderer2D.prototype._getTintedImageCanvas,l.default.prototype.imageMode=function(t){l.default._validateParameters("imageMode",arguments),t!==c.CORNER&&t!==c.CORNERS&&t!==c.CENTER||(this._renderer._imageMode=t)},t=l.default,o.default=t},{"../core/constants":272,"../core/friendly_errors/fes_core":274,"../core/friendly_errors/file_errors":275,"../core/friendly_errors/validate_params":278,"../core/helpers":279,"../core/main":283,"core-js/modules/es.array.
1copy-within":154,"core-js/modules/es.array.includes":163,"core-js/modules/es.array.index-of":164,"core-js/modules/es.array.iterator":165,"core-js/modules/es.array.slice":169,"core-js/modules/es.object.get-own-property-descriptor":186,"core-js/modules/es.object.to-string":190,"core-js/modules/es.promise":191,"core-js/modules/es.regexp.to-string":196,"core-js/modules/es.string.includes":199,"core-js/modules/es.string.iterator":200,"core-js/modules/es.symbol":212,"core-js/modules/es.symbol.description":210,"core-js/modules/es.symbol.iterator":211,"core-js/modules/es.typed-array.copy-within":213,"core-js/modules/es.typed-array.every":214,"core-js/modules/es.typed-array.fill":215,"core-js/modules/es.typed-array.filter":216,"core-js/modules/es.typed-array.find":218,"core-js/modules/es.typed-array.find-index":217,"core-js/modules/es.typed-array.for-each":221,"core-js/modules/es.typed-array.includes":222,"core-js/modules/es.typed-array.index-of":223,"core-js/modules/es.typed-array.iterator":226,"core-js/modules/es.typed-array.join":227,"core-js/modules/es.typed-array.last-index-of":228,"core-js/modules/es.typed-array.map":229,"core-js/modules/es.typed-array.reduce":231,"core-js/modules/es.typed-array.reduce-right":230,"core-js/modules/es.typed-array.reverse":232,"core-js/modules/es.typed-array.set":233,"core-js/modules/es.typed-array.slice":234,"core-js/modules/es.typed-array.some":235,"core-js/modules/es.typed-array.sort":236,"core-js/modules/es.typed-array.subarray":237,"core-js/modules/es.typed-array.to-locale-string":238,"core-js/modules/es.typed-array.to-string":239,"core-js/modules/es.typed-array.uint8-array":242,"core-js/modules/es.typed-array.uint8-clamped-array":243,"core-js/modules/es.weak-map":244,"core-js/modules/web.dom-collections.iterator":246,gifenc:253,omggif:256,"regenerator-runtime/runtime":260}],307:[function(t,r,o){"use strict";t("core-js/modules/es.symbol"),t("core-js/modules/es.symbol.description"),t("core-js/modules/es.symbol.iterator"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.string.iterator"),t("core-js/modules/web.dom-collections.iterator"),t("core-js/modules/es.symbol"),t("core-js/modules/es.symbol.description"),t("core-js/modules/es.symbol.iterator"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.string.iterator"),t("core-js/modules/web.dom-collections.iterator"),Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;var n=i(t("../core/main")),s=i(t("./filters"));function i(t){return t&&t.__esModule?t:{default:t}}function a(t,r){for(var o=0;o<r.length;o++){var n=r[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}n.default.Image=function(){var t,r;function o(t,r){if(!(this instanceof o))throw TypeError("Cannot call a class as a function");this.width=t,this.height=r,this.canvas=document.createElement("canvas"),this.canvas.width=this.width,this.canvas.height=this.height,this.drawingContext=this.canvas.getContext("2d"),(this._pixelsState=this)._pixelDensity=1,this.gifProperties=null,this._modified=!1,this.pixels=[]}return t=[{key:"pixelDensity",value:function(t){return void 0!==t?(t<=0&&(n.default._friendlyParamError({type:"INVALID_VALUE",format:{types:["Number"]},position:1},"pixelDensity"),t=1),this._pixelDensity=t,this.width/=t,this.height/=t,this):this._pixelDensity}},{key:"_animateGif",value:function(t){var r,o=this.gifProperties,t=t._lastRealFrameTime||window.performance.now();0===o.lastChangeTime&&(o.lastChangeTime=t),o.playing&&(o.timeDisplayed=t-o.lastChangeTime,r=o.frames[o.displayIndex].delay,o.timeDisplayed>=r&&(r=Math.floor(o.timeDisplayed/r),o.timeDisplayed=0,o.lastChangeTime=t,o.displayIndex+=r,o.loopCount=Math.floor(o.displayIndex/o.numFrames),null!==o.loopLimit&&o.loopCount>=o.loopLimit?o.playing=!1:(t=o.displayIndex%o.numFrames,this.drawingContext.putImageData(o.frames[t].image,0,0),o.displayIndex=t,this.setModified(!0))))}},{key:"_setProperty",value:function(t,r){this[t]=r,this.setModified(!0)}},{key:"loadPixels",value:function(){n.default.Renderer2D.prototype.loadPixels.call(this),this.setModified(!0)}},{key:"updatePixels",value:function(t,r,o,s){n.default.Renderer2D.prototype.updatePixels.call(this,t,r,o,s),this.setModified(!0)}},{key:"get",value:function(t,r,o,s){return n.default._validateParameters("p5.Image.get",arguments),n.default.Renderer2D.prototype.get.apply(this,arguments)}},{key:"_getPixel",value:function(){for(var t=arguments.length,r=Array(t),o=0;o<t;o++)r[o]=arguments[o];return n.default.Renderer2D.prototype._getPixel.apply(this,r)}},{key:"set",value:function(t,r,o){n.default.Renderer2D.prototype.set.call(this,t,r,o),this.setModified(!0)}},{key:"resize",value:function(t,r){0===t&&0===r?(t=this.canvas.width,r=this.canvas.height):0===t?t=this.canvas.width*r/this.canvas.height:0===r&&(r=this.canvas.height*t/this.canvas.width),t=Math.floor(t),r=Math.floor(r);var o=document.createElement("canvas");if(o.width=t,o.height=r,this.gifProperties)for(var n=this.gifProperties,s=0;s<n.numFrames;s++){for(var i=this.drawingContext.createImageData(t,r),a=(d=d=c=u=l=void 0,n.frames[s].image),l=0,u=0;u<i.height;u++)for(var c=0;c<i.width;c++){var d=Math.floor(c*a.width/i.width),d=4*(Math.floor(u*a.height/i.height)*a.width+d);i.data[l++]=a.data[d++],i.data[l++]=a.data[d++],i.data[l++]=a.data[d++],i.data[l++]=a.data[+d]}n.frames[s].image=i}o.getContext("2d").drawImage(this.canvas,0,0,this.canvas.width,this.canvas.height,0,0,o.width,o.height),this.canvas.width=this.width=t,this.canvas.height=this.height=r,this.drawingContext.drawImage(o,0,0,t,r,0,0,t,r),0<this.pixels.length&&this.loadPixels(),this.setModified(!0)}},{key:"copy",value:function(){for(var t=arguments.length,r=Array(t),o=0;o<t;o++)r[o]=arguments[o];n.default.prototype.copy.apply(this,r)}},{key:"mask",value:function(t){var r=this.drawingContext.globalCompositeOperation,o=this._pixelDensity,s=1,i=[t=void 0===t?this:t,0,0,(s=t instanceof n.default.Renderer?t._pInst._pixelDensity:s)*t.width,s*t.height,0,0,o*this.width,o*this.height];if(this.drawingContext.globalCompositeOperation="destination-in",this.gifProperties){for(var a=0;a<this.gifProperties.frames.length;a++)this.drawingContext.putImageData(this.gifProperties.frames[a].image,0,0
1),this.copy.apply(this,i),this.gifProperties.frames[a].image=this.drawingContext.getImageData(0,0,o*this.width,o*this.height);this.drawingContext.putImageData(this.gifProperties.frames[this.gifProperties.displayIndex].image,0,0)}else this.copy.apply(this,i);this.drawingContext.globalCompositeOperation=r,this.setModified(!0)}},{key:"filter",value:function(t,r){s.default.apply(this.canvas,s.default[t],r),this.setModified(!0)}},{key:"blend",value:function(){for(var t=arguments.length,r=Array(t),o=0;o<t;o++)r[o]=arguments[o];n.default._validateParameters("p5.Image.blend",arguments),n.default.prototype.blend.apply(this,r),this.setModified(!0)}},{key:"setModified",value:function(t){this._modified=t}},{key:"isModified",value:function(){return this._modified}},{key:"save",value:function(t,r){this.gifProperties?n.default.prototype.encodeAndDownloadGif(this,t):n.default.prototype.saveCanvas(this.canvas,t,r)}},{key:"reset",value:function(){var t;this.gifProperties&&((t=this.gifProperties).playing=!0,t.timeSinceStart=0,t.timeDisplayed=0,t.lastChangeTime=0,t.loopCount=0,t.displayIndex=0,this.drawingContext.putImageData(t.frames[0].image,0,0))}},{key:"getCurrentFrame",value:function(){var t;if(this.gifProperties)return(t=this.gifProperties).displayIndex%t.numFrames}},{key:"setFrame",value:function(t){var r;this.gifProperties&&(t<(r=this.gifProperties).numFrames&&0<=t?(r.timeDisplayed=0,r.lastChangeTime=0,r.displayIndex=t,this.drawingContext.putImageData(r.frames[t].image,0,0)):console.log("Cannot set GIF to a frame number that is higher than total number of frames or below zero."))}},{key:"numFrames",value:function(){if(this.gifProperties)return this.gifProperties.numFrames}},{key:"play",value:function(){this.gifProperties&&(this.gifProperties.playing=!0)}},{key:"pause",value:function(){this.gifProperties&&(this.gifProperties.playing=!1)}},{key:"delay",value:function(t,r){if(this.gifProperties){var o=this.gifProperties;if(r<o.numFrames&&0<=r)o.frames[r].delay=t;else{var n=!0,r=!1,s=void 0;try{for(var i,a=o.frames[Symbol.iterator]();!(n=(i=a.next()).done);n=!0)i.value.delay=t}catch(t){r=!0,s=t}finally{try{n||null==a.return||a.return()}finally{if(r)throw s}}}}}}],a(o.prototype,t),r&&a(o,r),o}(),t=n.default.Image,o.default=t},{"../core/main":283,"./filters":304,"core-js/modules/es.array.iterator":165,"core-js/modules/es.object.to-string":190,"core-js/modules/es.string.iterator":200,"core-js/modules/es.symbol":212,"core-js/modules/es.symbol.description":210,"core-js/modules/es.symbol.iterator":211,"core-js/modules/web.dom-collections.iterator":246}],308:[function(t,r,o){"use strict";t("core-js/modules/es.array.filter"),t("core-js/modules/es.array.filter"),Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;var n=i(t("../core/main")),s=i(t("./filters"));function i(t){return t&&t.__esModule?t:{default:t}}t("../color/p5.Color"),n.default.prototype.pixels=[],n.default.prototype.blend=function(){for(var t,r=arguments.length,o=Array(r),s=0;s<r;s++)o[s]=arguments[s];n.default._validateParameters("blend",o),this._renderer?(t=this._renderer).blend.apply(t,o):n.default.Renderer2D.prototype.blend.apply(this,o)},n.default.prototype.copy=function(){for(var t,r,o,s,i,a,l,u,c,d=arguments.length,h=Array(d),f=0;f<d;f++)h[f]=arguments[f];if(n.default._validateParameters("copy",h),9===h.length)t=h[0],r=h[1],o=h[2],s=h[3],i=h[4],a=h[5],l=h[6],u=h[7],c=h[8];else{if(8!==h.length)throw Error("Signature not supported");t=this,r=h[0],o=h[1],s=h[2],i=h[3],a=h[4],l=h[5],u=h[6],c=h[7]}n.default.prototype._copyHelper(this,t,r,o,s,i,a,l,u,c)},n.default.prototype._copyHelper=function(t,r,o,s,i,a,l,u,c,d){var h=r.canvas.width/r.width,f=0,p=0;r._renderer&&r._renderer.isP3D&&(f=r.width/2,p=r.height/2),t._renderer&&t._renderer.isP3D?(t.push(),t.resetMatrix(),t.noLights(),t.blendMode(t.BLEND),t.imageMode(t.CORNER),n.default.RendererGL.prototype.image.call(t._renderer,r,o+f,s+p,i,a,l,u,c,d),t.pop()):t.drawingContext.drawImage(r.canvas,h*(o+f),h*(s+p),h*i,h*a,l,u,c,d)},n.default.prototype.getFilterGraphicsLayer=function(){return this._renderer.getFilterGraphicsLayer()},n.default.prototype.filter=function(){for(var t=arguments.length,r=Array(t),o=0;o<t;o++)r[o]=arguments[o];n.default._validateParameters("filter",r);var i=(function(){var t,r={shader:void 0,operation:void 0,value:void 0,useWebGL:!0};return(arguments.length<=0?void 0:arguments[0])instanceof n.default.Shader?r.shader=arguments.length<=0?void 0:arguments[0]:(r.operation=arguments.length<=0?void 0:arguments[0],1<arguments.length&&"number"==typeof(arguments.length<=1?void 0:arguments[1])&&(r.value=arguments.length<=1?void 0:arguments[1]),!1===((t=arguments.length-1)<0||arguments.length<=t?void 0:arguments[t])&&(r.useWebGL=!1)),r}).apply(void 0,r),a=i.shader,l=i.operation,u=i.value,i=i.useWebGL;this._renderer.isP3D&&a?n.default.RendererGL.prototype.filter.call(this._renderer,a):i||this._renderer.isP3D?(!i&&this._renderer.isP3D&&console.warn("filter() with useWebGL=false is not supported in WEBGL"),this._renderer.isP3D?n.default.RendererGL.prototype.filter.call(this._renderer,l,u):((a=this.getFilterGraphicsLayer()).copy(this._renderer,0,0,this.width,this.height,-this.width/2,-this.height/2,this.width,this.height),this._renderer.clear(),this._renderer.resetMatrix(),a.filter.apply(a,r),this.copy(a._renderer,0,0,this.width,this.height,0,0,this.width,this.height),a.clear())):void 0!==this.canvas?s.default.apply(this.canvas,s.default[l],u):s.default.apply(this.elt,s.default[l],u)},n.default.prototype.get=function(t,r,o,s){var i;return n.default._validateParameters("get",arguments),(i=this._renderer).get.apply(i,arguments)},n.default.prototype.loadPixels=function(){for(var t=arguments.length,r=Array(t),o=0;o<t;o++)r[o]=arguments[o];n.default._validateParameters("loadPixels",r),this._renderer.loadPixels()},n.default.prototype.set=function(t,r,o){this._renderer.set(t,r,o)},n.default.prototype.updatePixels=function(t,r,o,s){n.default._validateParameters("updatePixels",arguments),0!==this.pixels.length&&this._renderer.updatePixels(t,r,o,s)},t=n.default,o.default=t},{"../color/p5.Color":270,"../core/main":283,"./filters":304,"core-js/modules/es.array.filter":157}],309:[function(t,r,o){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}t("core-js/modules/es.symbol"),t("core-js/modules/es.symbol.description"),t("core-js/modules/es.symbol.iterator"),t("core-js/modules/es.array.
1concat"),t("core-js/modules/es.array.includes"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.array.last-index-of"),t("core-js/modules/es.array.map"),t("core-js/modules/es.array.slice"),t("core-js/modules/es.array.splice"),t("core-js/modules/es.function.name"),t("core-js/modules/es.object.from-entries"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.promise"),t("core-js/modules/es.regexp.exec"),t("core-js/modules/es.regexp.to-string"),t("core-js/modules/es.string.includes"),t("core-js/modules/es.string.iterator"),t("core-js/modules/es.string.replace"),t("core-js/modules/es.string.split"),t("core-js/modules/es.typed-array.uint8-array"),t("core-js/modules/es.typed-array.copy-within"),t("core-js/modules/es.typed-array.every"),t("core-js/modules/es.typed-array.fill"),t("core-js/modules/es.typed-array.filter"),t("core-js/modules/es.typed-array.find"),t("core-js/modules/es.typed-array.find-index"),t("core-js/modules/es.typed-array.for-each"),t("core-js/modules/es.typed-array.includes"),t("core-js/modules/es.typed-array.index-of"),t("core-js/modules/es.typed-array.iterator"),t("core-js/modules/es.typed-array.join"),t("core-js/modules/es.typed-array.last-index-of"),t("core-js/modules/es.typed-array.map"),t("core-js/modules/es.typed-array.reduce"),t("
1core-js/modules/es.typed-array.reduce-right"),t("core-js/modules/es.typed-array.reverse"),t("core-js/modules/es.typed-array.set"),t("core-js/modules/es.typed-array.slice"),t("core-js/modules/es.typed-array.some"),t("core-js/modules/es.typed-array.sort"),t("core-js/modules/es.typed-array.subarray"),t("core-js/modules/es.typed-array.to-locale-string"),t("core-js/modules/es.typed-array.to-string"),t("core-js/modules/web.dom-collections.iterator"),t("core-js/modules/web.url"),t("core-js/modules/es.symbol"),t("core-js/modules/es.symbol.description"),t("core-js/modules/es.symbol.iterator"),t("core-js/modules/es.array.concat"),t("core-js/modules/es.array.includes"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.array.last-index-of"),t("core-js/modules/es.array.map"),t("core-js/modules/es.array.slice"),t("core-js/modules/es.array.splice"),t("core-js/modules/es.function.name"),t("core-js/modules/es.object.from-entries"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.promise"),t("core-js/modules/es.regexp.exec"),t("core-js/modules/es.regexp.to-string"),t("core-js/modules/es.string.includes"),t("core-js/modules/es.string.iterator"),t("core-js/modules/es.string.replace"),t("core-js/modules/es.string.split"),t("core-js/modules/es.typed-array.uint8-array"),t("core-js/modules/es.typed-array.copy-within"),t("core-js/modules/es.typed-array.every"),t("core-js/modules/es.typed-array.fill"),t("core-js/modules/es.typed-array.filter"),t("core-js/modules/es.typed-array.find"),t("core-js/modules/es.typed-array.find-index"),t("core-js/modules/es.typed-array.for-each"),t("core-js/modules/es.typed-array.includes"),t("core-js/modules/es.typed-array.index-of"),t("core-js/modules/es.typed-array.iterator"),t("core-js/modules/es.typed-array.join"),t("core-js/modules/es.typed-array.last-index-of"),t("core-js/modules/es.typed-array.map"),t("core-js/modules/es.typed-array.reduce"),t("
1core-js/modules/es.typed-array.reduce-right"),t("core-js/modules/es.typed-array.reverse"),t("core-js/modules/es.typed-array.set"),t("core-js/modules/es.typed-array.slice"),t("core-js/modules/es.typed-array.some"),t("core-js/modules/es.typed-array.sort"),t("core-js/modules/es.typed-array.subarray"),t("core-js/modules/es.typed-array.to-locale-string"),t("core-js/modules/es.typed-array.to-string"),t("core-js/modules/web.dom-collections.iterator"),t("core-js/modules/web.url"),Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;var s=l(t("../core/main")),i=(t("whatwg-fetch"),t("es6-promise/auto"),l(t("fetch-jsonp"))),a=l(t("file-saver"));function l(t){return t&&t.__esModule?t:{default:t}}function u(t){return(u="function"==typeof Symbol&&"symbol"===n(Symbol.iterator)?function(t){return n(t)}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":n(t)})(t)}function c(t){return t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function d(t,r){r&&!0!==r&&"true"!==r||(r="");var o="";return(t=t||"untitled").includes(".")&&(o=t.split(".").pop()),r&&o!==r&&(o=r,t="".concat(t,".").concat(o)),[t,o]}t("../core/friendly_errors/validate_params"),t("../core/friendly_errors/file_errors"),t("../core/friendly_errors/fes_core"),s.default.prototype.loadJSON=function(){for(var t=arguments.length,r=Array(t),o=0;o<t;o++)r[o]=arguments[o];s.default._validateParameters("loadJSON",r);for(var n,i,a,l=r[0],c={},d="json",h=1;h<r.length;h++){var f=r[h];"string"==typeof f?"jsonp"!==f&&"json"!==f||(d=f):"function"==typeof f?n?i=f:n=f:"object"===u(f)&&(f.hasOwnProperty("jsonpCallback")||f.hasOwnProperty("jsonpCallbackFunction"))&&(d="jsonp",a=f)}var p=this;return this.httpDo(l,"GET",a,d,function(t){for(var r in t)c[r]=t[r];void 0!==n&&n(t),p._decrementPreload()},function(t){if(s.default._friendlyFileLoadError(5,l),!i)throw t;i(t)}),c},s.default.prototype.loadStrings=function(){for(var t=arguments.length,r=Array(t),o=0;o<t;o++)r[o]=arguments[o];s.default._validateParameters("loadStrings",r);for(var n,i,a=[],l=1;l<r.length;l++){var u=r[l];"function"==typeof u&&(void 0===n?n=u:void 0===i&&(i=u))}var c=this;return s.default.prototype.httpDo.call(this,r[0],"GET","text",function(t){for(var r=t.replace(/\r\n/g,"\r").replace(/\n/g,"\r").split(/\r/),o=0,s=r.length;o<s;o+=32768)Array.prototype.push.apply(a,r.slice(o,Math.min(o+32768,s)));void 0!==n&&n(a),c._decrementPreload()},function(t){if(s.default._friendlyFileLoadError(3,t),!i)throw t;i(t)}),a},s.default.prototype.loadTable=function(t){var r,o,n,i=[],a=!1,l=t.substring(t.lastIndexOf(".")+1,t.length);"csv"===l?n=",":"ssv"===l?n=";":"tsv"===l&&(n=" ");for(var u=1;u<arguments.length;u++)"function"==typeof arguments[u]?void 0===r?r=arguments[u]:void 0===o&&(o=arguments[u]):"string"==typeof arguments[u]&&(i.push(arguments[u]),"header"===arguments[u]&&(a=!0),"csv"===arguments[u]?n=",":"ssv"===arguments[u]?n=";":"tsv"===arguments[u]&&(n=" "));var c=new s.default.Table,d=this;return this.httpDo(t,"GET","table",function(t){for(var o,i,l={},u=[],h=0,f=null,p=function(){l.currentState=0,l.token=""},m=function(){f.push(l.token),p()},y=function(){l.currentState=4,u.push(f),f=null};;){if(null==(o=t[h++])){if(l.escaped)throw Error("Unclosed quote in file.");if(f){m(),y();break}}if(null===f&&(l.escaped=!1,f=[],p()),0===l.currentState){if('"'===o){l.escaped=!0,l.currentState=1;continue}l.currentState=1}if(1===l.currentState&&l.escaped){if('"'===o)'"'===t[h]?(l.token+='"',h++):(l.escaped=!1,l.currentState=2);else{if("\r"===o)continue;l.token+=o}}else"\r"===o?("\n"===t[h]&&h++,m(),y()):"\n"===o?(m(),y()):o===n?m():1===l.currentState&&(l.token+=o)}if(a)c.columns=u.shift();else for(var g=0;g<u[0].length;g++)c.columns[g]="null";for(var v=0;v<u.length;v++)(1!==u[v].length||"undefined"!==u[v][0]&&""!==u[v][0])&&((i=new s.default.TableRow).arr=u[v],i.obj=function(t,r){if(void 0===(r=r||[]))for(var o=0;o<t.length;o++)r[o.toString()]=o;return Object.fromEntries(r.map(function(r,o){return[r,t[o]]}))}(u[v],c.columns),c.addRow(i));"function"==typeof r&&r(c),d._decrementPreload()},function(r){s.default._friendlyFileLoadError(2,t),o?o(r):console.error(r)}),c},s.default.prototype.loadXML=function(){for(var t=arguments.length,r=Array(t),o=0;o<t;o++)r[o]=arguments[o];for(var n,i,a=new s.default.XML,l=1;l<r.length;l++){var u=r[l];"function"==typeof u&&(void 0===n?n=u:void 0===i&&(i=u))}var c=this;return this.httpDo(r[0],"GET","xml",function(t){for(var r in t)a[r]=t[r];void 0!==n&&n(a),c._decrementPreload()},function(t){if(s.default._friendlyFileLoadError(1,t),!i)throw t;i(t)}),a},s.default.prototype.loadBytes=function(t,r,o){var n={},i=this;return this.httpDo(t,"GET","arrayBuffer",function(t){n.bytes=new Uint8Array(t),"function"==typeof r&&r(n),i._decrementPreload()},function(r){if(s.default._friendlyFileLoadError(6,t),!o)throw r;o(r)}
1),n},s.default.prototype.httpGet=function(){for(var t=arguments.length,r=Array(t),o=0;o<t;o++)r[o]=arguments[o];return s.default._validateParameters("httpGet",r),r.splice(1,0,"GET"),s.default.prototype.httpDo.apply(this,r)},s.default.prototype.httpPost=function(){for(var t=arguments.length,r=Array(t),o=0;o<t;o++)r[o]=arguments[o];return s.default._validateParameters("httpPost",r),r.splice(1,0,"POST"),s.default.prototype.httpDo.apply(this,r)},s.default.prototype.httpDo=function(){for(var t,r,o,n={},a=0,l="text/plain",c=arguments.length-1;0<c&&"function"==typeof(c<0||arguments.length<=c?void 0:arguments[c]);c--)a++;var d=arguments.length-a,h=arguments.length<=0?void 0:arguments[0];if(2==d&&"string"==typeof h&&"object"===u(arguments.length<=1?void 0:arguments[1]))v=new Request(h,arguments.length<=1?void 0:arguments[1]),r=arguments.length<=2?void 0:arguments[2],o=arguments.length<=3?void 0:arguments[3];else{for(var f,p="GET",m=1;m<arguments.length;m++){var y=m<0||arguments.length<=m?void 0:arguments[m];if("string"==typeof y)"GET"===y||"POST"===y||"PUT"===y||"DELETE"===y?p=y:"json"===y||"jsonp"===y||"binary"===y||"arrayBuffer"===y||"xml"===y||"text"===y||"table"===y?t=y:f=y;else if("number"==typeof y)f=y.toString();
1else if("object"===u(y)){if(y.hasOwnProperty("jsonpCallback")||y.hasOwnProperty("jsonpCallbackFunction"))for(var g in y)n[g]=y[g];else l=y instanceof s.default.XML?(f=y.serialize(),"application/xml"):(f=JSON.stringify(y),"application/json")}else"function"==typeof y&&(r?o=y:r=y)}var d="GET"===p?new Headers:new Headers({"Content-Type":l}),v=new Request(h,{method:p,mode:"cors",body:f,headers:d})}return(d=(d="jsonp"===(t=t||(h.includes("json")?"json":h.includes("xml")?"xml":"text"))?(0,i.default)(h,n):fetch(v)).then(function(r){if(!r.ok)throw(o=Error(r.body)).status=r.status,o.ok=!1,o;var o=0;switch((o="jsonp"!==t?r.headers.get("content-length"):o)&&64e6<o&&s.default._friendlyFileLoadError(7,h),t){case"json":case"jsonp":return r.json();case"binary":return r.blob();case"arrayBuffer":return r.arrayBuffer();case"xml":return r.text().then(function(t){return t=(new DOMParser).parseFromString(t,"text/xml"),new s.default.XML(t.documentElement)});default:return r.text()}})).then(r||function(){}),d.catch(o||console.error),d},window.URL=window.URL||window.webkitURL,s.default.prototype._pWriters=[],s.default.prototype.createWriter=function(t,r){var o,n;for(n in s.default.prototype._pWriters)if(s.default.prototype._pWriters[n].name===t)return o=new s.default.PrintWriter(t+this.millis(),r),s.default.prototype._pWriters.push(o),o;return o=new s.default.PrintWriter(t,r),s.default.prototype._pWriters.push(o),o},s.default.PrintWriter=function(t,r){var o=this;this.name=t,this.content="",this.write=function(t){this.content+=t},this.print=function(t){this.content+="".concat(t,"\n")},this.clear=function(){this.content=""},this.close=function(){var n,i=[];for(n in i.push(this.content),s.default.prototype.writeFile(i,t,r),s.default.prototype._pWriters)s.default.prototype._pWriters[n].name===this.name&&s.default.prototype._pWriters.splice(n,1);o.clear(),o={}}},s.default.prototype.save=function(t,r,o){var n=arguments,i=(this._curElement||this).elt;if(0===n.length)s.default.prototype.saveCanvas(i);else if(n[0]instanceof s.default.Renderer||n[0]instanceof s.default.Graphics)s.default.prototype.saveCanvas(n[0].elt,n[1],n[2]);else if(1===n.length&&"string"==typeof n[0])s.default.prototype.saveCanvas(i,n[0]);else switch(d(n[1],n[2])[1]){case"json":return void s.default.prototype.saveJSON(n[0],n[1],n[2]);case"txt":return void s.default.prototype.saveStrings(n[0],n[1],n[2]);default:n[0]instanceof Array?s.default.prototype.saveStrings(n[0],n[1],n[2]):n[0]instanceof s.default.Table?s.default.prototype.saveTable(n[0],n[1],n[2]):n[0]instanceof s.default.Image?s.default.prototype.saveCanvas(n[0].canvas,n[1]):n[0]instanceof s.default.SoundFile&&s.default.prototype.saveSound(n[0],n[1],n[2],n[3])}},s.default.prototype.saveJSON=function(t,r,o){s.default._validateParameters("saveJSON",arguments),o=o?JSON.stringify(t):JSON.stringify(t,void 0,2),this.saveStrings(o.split("\n"),r,"json")},s.default.prototype.saveJSONObject=s.default.prototype.saveJSON,s.default.prototype.saveJSONArray=s.default.prototype.saveJSON,s.default.prototype.saveStrings=function(t,r,o,n){s.default._validateParameters("saveStrings",arguments);for(var i=this.createWriter(r,o||"txt"),a=0;a<t.length;a++)n?i.write(t[a]+"\r\n"):i.write(t[a]+"\n");i.close(),i.clear()},s.default.prototype.saveTable=function(t,r,o){s.default._validateParameters("saveTable",arguments),n=void 0===o?r.substring(r.lastIndexOf(".")+1,r.length):o;var n,i=this.createWriter(r,n),a=t.columns,l="tsv"===n?" ":",";if("html"!==n){if("0"!==a[0]){for(var u=0;u<a.length;u++)u<a.length-1?i.write(a[u]+l):i.write(a[u]);i.write("\n")}for(var d=0;d<t.rows.length;d++){for(var h=void 0,h=0;h<t.rows[d].arr.length;h++)h<t.rows[d].arr.length-1?"csv"===n&&String(t.rows[d].arr[h]).includes(",")?i.write('"'+t.rows[d].arr[h]+'"'+l):i.write(t.rows[d].arr[h]+l):"csv"===n&&String(t.rows[d].arr[h]).includes(",")?i.write('"'+t.rows[d].arr[h]+'"'):i.write(t.rows[d].arr[h]);i.write("\n")}}else{if(i.print("<html>"),i.print("<head>"),i.print(' <meta http-equiv="content-type" content="text/html;charset=utf-8" />'),i.print("</head>"),i.print("<body>"),i.print(" <table>"),"0"!==a[0]){i.print(" <tr>");for(var f=0;f<a.length;f++){var p=c(a[f]);i.print(" <td>".concat(p)),i.print(" </td>")}i.print(" </tr>")}for(var m=0;m<t.rows.length;m++){i.print(" <tr>");for(var y=0;y<t.columns.length;y++){var g=c(t.rows[m].getString(y));i.print(" <td>".concat(g)),i.print(" </td>")}i.print(" </tr>")}i.print(" </table>"),i.print("</body>"),i.print("</html>")}i.close(),i.clear()},s.default.prototype.writeFile=function(t,r,o){var n="application/octet-stream",t=(s.default.prototype._isSafari()&&(n="text/plain"),new Blob(t,{type:n}));s.default.prototype.downloadFile(t,r,o)},s.default.prototype.downloadFile=function(t,r,o){var n,r=d(r,o),o=r[0];t instanceof Blob?a.default.saveAs(t,o):((n=document.createElement("a")).href=t,n.download=o,n.onclick=function(t){document.body.removeChild(t.target),t.stopPropagation()},n.style.display="none",document.body.appendChild(n),s.default.prototype._isSafari()&&alert(t=(t='Hello, Safari user! To download this file...\n1. Go to File --> Save As.\n2. Choose "Page Source" as the Format.\n')+'3. Name it with this extension: ."'.concat(r[1],'"')),n.click())},s.default.prototype._checkFileExtension=d,s.default.prototype._isSafari=function(){return window.HTMLElement.toString().includes("Constructor")},t=s.default,o.default=t},{"../core/friendly_errors/fes_core":274,"../core/friendly_errors/file_errors":275,"../core/friendly_errors/validate_params":278,"../core/main":283,"core-js/modules/es.array.
1concat":153,"core-js/modules/es.array.includes":163,"core-js/modules/es.array.iterator":165,"core-js/modules/es.array.last-index-of":167,"core-js/modules/es.array.map":168,"core-js/modules/es.array.slice":169,"core-js/modules/es.array.splice":171,"core-js/modules/es.function.name":174,"core-js/modules/es.object.from-entries":185,"core-js/modules/es.object.to-string":190,"core-js/modules/es.promise":191,"core-js/modules/es.regexp.exec":195,"core-js/modules/es.regexp.to-string":196,"core-js/modules/es.string.includes":199,"core-js/modules/es.string.iterator":200,"core-js/modules/es.string.replace":204,"core-js/modules/es.string.split":206,"core-js/modules/es.symbol":212,"core-js/modules/es.symbol.description":210,"core-js/modules/es.symbol.iterator":211,"core-js/modules/es.typed-array.copy-within":213,"core-js/modules/es.typed-array.every":214,"core-js/modules/es.typed-array.fill":215,"core-js/modules/es.typed-array.filter":216,"core-js/modules/es.typed-array.find":218,"core-js/modules/es.typed-array.find-index":217,"core-js/modules/es.typed-array.for-each":221,"core-js/modules/es.typed-array.includes":222,"core-js/modules/es.typed-array.index-of":223,"core-js/modules/es.typed-array.iterator":226,"core-js/modules/es.typed-array.join":227,"core-js/modules/es.typed-array.last-index-of":228,"core-js/modules/es.typed-array.map":229,"core-js/modules/es.typed-array.reduce":231,"core-js/modules/es.typed-array.reduce-right":230,"core-js/modules/es.typed-array.reverse":232,"core-js/modules/es.typed-array.set":233,"core-js/modules/es.typed-array.slice":234,"core-js/modules/es.typed-array.some":235,"core-js/modules/es.typed-array.sort":236,"core-js/modules/es.typed-array.subarray":237,"core-js/modules/es.typed-array.to-locale-string":238,"core-js/modules/es.typed-array.to-string":239,"core-js/modules/es.typed-array.uint8-array":242,"core-js/modules/web.dom-collections.iterator":246,"core-js/modules/web.url":248,"es6-promise/auto":249,"fetch-jsonp":251,"file-saver":252,"whatwg-fetch":261}],310:[function(t,r,o){"use strict";t("core-js/modules/es.array.concat"),t("core-js/modules/es.array.index-of"),t("core-js/modules/es.array.join"),t("core-js/modules/es.array.splice"),t("core-js/modules/es.regexp.constructor"),t("core-js/modules/es.regexp.exec"),t("core-js/modules/es.regexp.to-string"),t("core-js/modules/es.string.match"),t("core-js/modules/es.string.replace"),t("core-js/modules/es.array.concat"),t("core-js/modules/es.array.index-of"),t("core-js/modules/es.array.join"),t("core-js/modules/es.array.splice"),t("core-js/modules/es.regexp.constructor"),t("core-js/modules/es.regexp.exec"),t("core-js/modules/es.regexp.to-string"),t("core-js/modules/es.string.match"),t("core-js/modules/es.string.replace"),Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;var n=(t=t("../core/main"))&&t.__esModule?t:{default:t};function s(t,r){for(var o=0;o<r.length;o++){var n=r[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}n.default.Table=function(){var t,r;function o(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[];if(!(this instanceof o))throw TypeError("Cannot call a class as a function");this.columns=[],this.rows=t}return t=[{key:"addRow",value:function(t){if(void 0===(t=t||new n.default.TableRow).arr||void 0===t.obj)throw Error("invalid TableRow: ".concat(t));return(t.table=this).rows.push(t),t}},{key:"removeRow",value:function(t){this.rows[t].table=null,t=this.rows.splice(t+1,this.rows.length),this.rows.pop(),this.rows=this.rows.concat(t)}},{key:"getRow",value:function(t){return this.rows[t]}},{key:"getRows",value:function(){return this.rows}},{key:"findRow",value:function(t,r){if("string"==typeof r){for(var o=0;o<this.rows.length;o++)if(this.rows[o].obj[r]===t)return this.rows[o]}else for(var n=0;n<this.rows.length;n++)if(this.rows[n].arr[r]===t)return this.rows[n];return null}},{key:"findRows",value:function(t,r){var o=[];if("string"==typeof r)for(var n=0;n<this.rows.length;n++)this.rows[n].obj[r]===t&&o.push(this.rows[n]);else for(var s=0;s<this.rows.length;s++)this.rows[s].arr[r]===t&&o.push(this.rows[s]);return o}},{key:"matchRow",value:function(t,r){if("number"==typeof r){for(var o=0;o<this.rows.length;o++)if(this.rows[o].arr[r].match(t))return this.rows[o]}else for(var n=0;n<this.rows.length;n++)if(this.rows[n].obj[r].match(t))return this.rows[n];return null}},{key:"matchRows",value:function(t,r){var o=[];if("number"==typeof r)for(var n=0;n<this.rows.length;n++)this.rows[n].arr[r].match(t)&&o.push(this.rows[n]);else for(var s=0;s<this.rows.length;s++)this.rows[s].obj[r].match(t)&&o.push(this.rows[s]);return o}},{key:"getColumn",value:function(t){var r=[];if("string"==typeof t)for(var o=0;o<this.rows.length;o++)r.push(this.rows[o].obj[t]);else for(var n=0;n<this.rows.length;n++)r.push(this.rows[n].arr[t]);return r}},{key:"clearRows",value:function(){delete this.rows,this.rows=[]}},{key:"addColumn",value:function(t){this.columns.push(t||null)}},{key:"getColumnCount",value:function(){return this.columns.length}},{key:"getRowCount",value:function(){return this.rows.length}},{key:"removeTokens",value:function(t,r){for(var o=[],n=0;n<t.length;n++)o.push(t.charAt(n).replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"));var s=RegExp(o.join("|"),"g");if(void 0===r)for(var i=0;i<this.columns.length;i++)for(var a=0;a<this.rows.length;a++){var l=(l=this.rows[a].arr[i]).replace(s,"");this.rows[a].arr[i]=l,this.rows[a].obj[this.columns[i]]=l}else if("string"==typeof r)for(var u=0;u<this.rows.length;u++){var c=(c=this.rows[u].obj[r]).replace(s,""),d=(this.rows[u].obj[r]=c,this.columns.indexOf(r));this.rows[u].arr[d]=c}else for(var h=0;h<this.rows.length;h++){var f=(f=this.rows[h].arr[r]).replace(s,"");this.rows[h].arr[r]=f,this.rows[h].obj[this.columns[r]]=f}}},{key:"trim",value:function(t){var r=RegExp(" ","g");if(void 0===t)for(var o=0;o<this.columns.length;o++)for(var n=0;n<this.rows.length;n++){var s=(s=this.rows[n].arr[o]).replace(r,"");this.rows[n].arr[o]=s,this.rows[n].obj[this.columns[o]]=s}else if("string"==typeof t)for(var i=0;i<this.rows.length;i++){var a=(a=this.rows[i].obj[t]).replace(r,""),l=(this.rows[i].obj[t]=a,this.columns.indexOf(t));this.rows[i].arr[l]=a}else for(var u=0;u<this.rows.length;u++){var c=(c=this.rows[u].arr[t]).replace(r,"");this.rows[u].arr[t]=c,this.rows[u].obj[this.columns[t]]=c}}},{key:"removeColumn",value:function(t){"string"==typeof t?o=this.columns.indexOf(r=t):r=this.columns[o=t];var r,o,t=this.columns.splice(o+1,this.columns.length);this.columns.pop(),this.columns=this.columns.concat(t);for(var n=0;n<this.rows.length;n++){var s=this.rows[n].arr,i=s.splice(o+1,s.length);s.pop(),this.rows[n].arr=s.concat(i),delete this.rows[n].obj[r]}}},{key:"set",value:function(t,r,o){this.rows[t].set(r,o)}},{key:"setNum",value:function(t,r,o){this.rows[t].setNum(r,o)}},{key:"setString",value:function(t,r,o){this.rows[t].setString(r,o)}},{key:"get",value:function(t,r){return this.rows[t].get(r)}},{key:"getNum",value:function(t,r){return this.rows[t].getNum(r)}},{key:"getString",value:function(t,r){return this.rows[t].getString(r)}},{key:"getObject",value:function(t){for(var r,o={},n=0;n<this.rows.length;n++)if(r=this.rows[n].obj,"string"==typeof t){if(!(0<=this.columns.indexOf(t)))throw Error('This table has no column named "'.concat(t,'"'));o[r[t]]=r}else o[n]=this.rows[n].obj;return o}},{key:"getArray",value:function(){for(var t=[],r=0;r<this.rows.length;r++)t.push(this.rows[r].arr);return t}}],s(o.prototype,t),r&&s(o,r),o}(),t=n.default,o.default=t}
1,{"../core/main":283,"core-js/modules/es.array.concat":153,"core-js/modules/es.array.index-of":164,"core-js/modules/es.array.join":166,"core-js/modules/es.array.splice":171,"core-js/modules/es.regexp.constructor":194,"core-js/modules/es.regexp.exec":195,"core-js/modules/es.regexp.to-string":196,"core-js/modules/es.string.match":201,"core-js/modules/es.string.replace":204}],311:[function(t,r,o){"use strict";function n(t,r){for(var o=0;o<r.length;o++){var n=r[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}t("core-js/modules/es.array.index-of"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.object.from-entries"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.regexp.exec"),t("core-js/modules/es.regexp.to-string"),t("core-js/modules/es.string.split"),t("core-js/modules/web.dom-collections.iterator"),t("core-js/modules/es.array.index-of"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.object.from-entries"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.regexp.exec"),t("core-js/modules/es.regexp.to-string"),t("core-js/modules/es.string.split"),t("core-js/modules/web.dom-collections.iterator"),Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,(t=(t=t("../core/main"))&&t.__esModule?t:{default:t}).default.TableRow=function(){var t,r;function o(t,r){if(!(this instanceof o))throw TypeError("Cannot call a class as a function");var n=[];t&&(n=t.split(r=r||",")),this.arr=n,this.obj=Object.fromEntries(n.entries()),this.table=null}return t=[{key:"set",value:function(t,r){if("string"==typeof t){var o=this.table.columns.indexOf(t);if(!(0<=o))throw Error('This table has no column named "'.concat(t,'"'));this.obj[t]=r,this.arr[o]=r}else{if(!(t<this.table.columns.length))throw Error("Column #".concat(t," is out of the range of this table"));this.arr[t]=r,o=this.table.columns[t],this.obj[o]=r}}},{key:"setNum",value:function(t,r){r=parseFloat(r),this.set(t,r)}},{key:"setString",value:function(t,r){r=r.toString(),this.set(t,r)}},{key:"get",value:function(t){return("string"==typeof t?this.obj:this.arr)[t]}},{key:"getNum",value:function(t){var r="string"==typeof t?parseFloat(this.obj[t]):parseFloat(this.arr[t]);if("NaN"===r.toString())throw"Error: ".concat(this.obj[t]," is NaN (Not a Number)");return r}},{key:"getString",value:function(t){return("string"==typeof t?this.obj:this.arr)[t].toString()}}],n(o.prototype,t),r&&n(o,r),o}(),t=t.default,o.default=t},{"../core/main":283,"core-js/modules/es.array.index-of":164,"core-js/modules/es.array.iterator":165,"core-js/modules/es.object.from-entries":185,"core-js/modules/es.object.to-string":190,"core-js/modules/es.regexp.exec":195,"core-js/modules/es.regexp.to-string":196,"core-js/modules/es.string.split":206,"core-js/modules/web.dom-collections.iterator":246}],312:[function(t,r,o){"use strict";t("core-js/modules/es.symbol"),t("core-js/modules/es.symbol.description"),t("core-js/modules/es.symbol.iterator"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.number.constructor"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.regexp.exec"),t("core-js/modules/es.string.iterator"),t("core-js/modules/es.string.replace"),t("core-js/modules/web.dom-collections.iterator"),t("core-js/modules/es.symbol"),t("core-js/modules/es.symbol.description"),t("core-js/modules/es.symbol.iterator"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.number.constructor"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.regexp.exec"),t("core-js/modules/es.string.iterator"),t("core-js/modules/es.string.replace"),t("core-js/modules/web.dom-collections.iterator"),Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;var n=(t=t("../core/main"))&&t.__esModule?t:{default:t};function s(t,r){for(var o=0;o<r.length;o++){var n=r[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}n.default.XML=function(){var t,r;function o(t){if(!(this instanceof o))throw TypeError("Cannot call a class as a function");
1t?this.DOM=t:(t=document.implementation.createDocument(null,"doc"),this.DOM=t.createElement("root"))}return t=[{key:"getParent",value:function(){return new n.default.XML(this.DOM.parentElement)}},{key:"getName",value:function(){return this.DOM.tagName}},{key:"setName",value:function(t){var r=this.DOM.innerHTML,o=this.DOM.attributes,n=document.implementation.createDocument(null,"default").createElement(t);n.innerHTML=r;for(var s=0;s<o.length;s++)n.setAttribute(o[s].nodeName,o[s].nodeValue);this.DOM=n}},{key:"hasChildren",value:function(){return 0<this.DOM.children.length}},{key:"listChildren",value:function(){for(var t=[],r=0;r<this.DOM.childNodes.length;r++)t.push(this.DOM.childNodes[r].nodeName);return t}},{key:"getChildren",value:function(t){return function(t){for(var r=[],o=0;o<t.length;o++)r.push(new n.default.XML(t[o]));return r}(t?this.DOM.getElementsByTagName(t):this.DOM.children)}},{key:"getChild",value:function(t){if("string"!=typeof t)return new n.default.XML(this.DOM.children[t]);var r=!0,o=!1,s=void 0;try{for(var i,a=this.DOM.children[Symbol.iterator]();!(r=(i=a.next()).done);r=!0){var l=i.value;if(l.tagName===t)return new n.default.XML(l)}}catch(t){o=!0,s=t}finally{try{r||null==a.return||a.return()}finally{if(o)throw s}}}},{key:"addChild",value:function(t){t instanceof n.default.XML&&this.DOM.appendChild(t.DOM)}},{key:"removeChild",value:function(t){var r=-1;if("string"==typeof t){for(var o=0;o<this.DOM.children.length;o++)if(this.DOM.children[o].tagName===t){r=o;break}}else r=t;-1!==r&&this.DOM.removeChild(this.DOM.children[r])}},{key:"getAttributeCount",value:function(){return this.DOM.attributes.length}},{key:"listAttributes",value:function(){var t=[],r=!0,o=!1,n=void 0;try{for(var s,i=this.DOM.attributes[Symbol.iterator]();!(r=(s=i.next()).done);r=!0){var a=s.value;t.push(a.nodeName)}}catch(t){o=!0,n=t}finally{try{r||null==i.return||i.return()}finally{if(o)throw n}}return t}},{key:"hasAttribute",value:function(t){var r={},o=!0,n=!1,s=void 0;try{for(var i,a=this.DOM.attributes[Symbol.iterator]();!(o=(i=a.next()).done);o=!0){var l=i.value;r[l.nodeName]=l.nodeValue}}catch(t){n=!0,s=t}finally{try{o||null==a.return||a.return()}finally{if(n)throw s}}return!!r[t]}},{key:"getNum",value:function(t,r){var o={},n=!0,s=!1,i=void 0;try{for(var a,l=this.DOM.attributes[Symbol.iterator]();!(n=(a=l.next()).done);n=!0){var u=a.value;o[u.nodeName]=u.nodeValue}}catch(t){s=!0,i=t}finally{try{n||null==l.return||l.return()}finally{if(s)throw i}}return Number(o[t])||r||0}},{key:"getString",value:function(t,r){var o={},n=!0,s=!1,i=void 0;try{for(var a,l=this.DOM.attributes[Symbol.iterator]();!(n=(a=l.next()).done);n=!0){var u=a.value;o[u.nodeName]=u.nodeValue}}catch(t){s=!0,i=t}finally{try{n||null==l.return||l.return()}finally{if(s)throw i}}return o[t]?String(o[t]):r||null}},{key:"setAttribute",value:function(t,r){this.DOM.setAttribute(t,r)}},{key:"getContent",value:function(t){var r=this.DOM.textContent;return(r=r.replace(/\s\s+/g,","))||t||null}},{key:"setContent",value:function(t){this.DOM.children.length||(this.DOM.textContent=t)}},{key:"serialize",value:function(){return(new XMLSerializer).serializeToString(this.DOM)}}],s(o.prototype,t),r&&s(o,r),o}(),t=n.default,o.default=t},{"../core/main":283,"core-js/modules/es.array.iterator":165,"core-js/modules/es.number.constructor":179,"core-js/modules/es.object.to-string":190,"core-js/modules/es.regexp.exec":195,"core-js/modules/es.string.iterator":200,"core-js/modules/es.string.replace":204,"core-js/modules/es.symbol":212,"core-js/modules/es.symbol.description":210,"core-js/modules/es.symbol.iterator":211,"core-js/modules/web.dom-collections.iterator":246}],313:[function(t,r,o){"use strict";t("core-js/modules/es.symbol"),t("core-js/modules/es.symbol.description"),t("core-js/modules/es.symbol.iterator"),t("core-js/modules/es.array.from"),t("core-js/modules/es.array.includes"),t("core-js/modules/es.array.index-of"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.array.map"),t("core-js/modules/es.array.slice"),t("core-js/modules/es.math.hypot"),t("core-js/modules/es.number.constructor"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.regexp.to-string"),t("core-js/modules/es.string.includes"),t("core-js/modules/es.string.iterator"),t("core-js/modules/web.dom-collections.iterator"),t("core-js/modules/es.array.includes"),t("core-js/modules/es.array.index-of"),t("core-js/modules/es.array.map"),t("core-js/modules/es.array.slice"),t("core-js/modules/es.math.hypot"),t("core-js/modules/es.number.constructor"),t("core-js/modules/es.string.includes"),Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;var n=(t=t("../core/main"))&&t.__esModule?t:{default:t};function s(t){return function(t){if(Array.isArray(t)){for(var r=0,o=Array(t.length);r<t.length;r++)o[r]=t[r];return o}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw TypeError("Invalid attempt to spread non-iterable instance")}()}n.default.prototype.abs=Math.abs,n.default.prototype.ceil=Math.ceil,n.default.prototype.constrain=function(t,r,o){return n.default._validateParameters("constrain",arguments),Math.max(Math.min(t,o),r)},n.default.prototype.dist=function(){for(var t=arguments.length,r=Array(t),o=0;o<t;o++)r[o]=arguments[o];return n.default._validateParameters("dist",r),4===r.length?Math.hypot(r[2]-r[0],r[3]-r[1]):6===r.length?Math.hypot(r[3]-r[0],r[4]-r[1],r[5]-r[2]):void 0},n.default.prototype.exp=Math.exp,n.default.prototype.floor=Math.floor,n.default.prototype.lerp=function(t,r,o){return n.default._validateParameters("lerp",arguments),o*(r-t)+t}
1,n.default.prototype.log=Math.log,n.default.prototype.mag=function(t,r){return n.default._validateParameters("mag",arguments),Math.hypot(t,r)},n.default.prototype.map=function(t,r,o,s,i,a){return n.default._validateParameters("map",arguments),t=(t-r)/(o-r)*(i-s)+s,a?s<i?this.constrain(t,s,i):this.constrain(t,i,s):t},n.default.prototype.max=function(){for(var t,r=arguments.length,o=Array(r),n=0;n<r;n++)o[n]=arguments[n];return t=Array.isArray(o[0])?o[0]:o,Math.max.apply(Math,s(t))},n.default.prototype.min=function(){for(var t,r=arguments.length,o=Array(r),n=0;n<r;n++)o[n]=arguments[n];return t=Array.isArray(o[0])?o[0]:o,Math.min.apply(Math,s(t))},n.default.prototype.norm=function(t,r,o){return n.default._validateParameters("norm",arguments),this.map(t,r,o,0,1)},n.default.prototype.pow=Math.pow,n.default.prototype.round=function(t,r){return r?Math.round(t*(r=Math.pow(10,r)))/r:Math.round(t)},n.default.prototype.sq=function(t){return t*t},n.default.prototype.sqrt=Math.sqrt,n.default.prototype.fract=function(t){n.default._validateParameters("fract",arguments);var r,o=0,t=Number(t);return isNaN(t)||Math.abs(t)===1/0?t:(t<0&&(t=-t,o=1),String(t).includes(".")&&!String(t).includes("e")?Math.abs(o-(r=Number("0"+(r=String(t)).slice(r.indexOf("."))))):t<1?Math.abs(o-t):0)},t=n.default,o.default=t},{"../core/main":283,"core-js/modules/es.array.from":162,"core-js/modules/es.array.includes":163,"core-js/modules/es.array.index-of":164,"core-js/modules/es.array.iterator":165,"core-js/modules/es.array.map":168,"core-js/modules/es.array.slice":169,"core-js/modules/es.math.hypot":176,"core-js/modules/es.number.constructor":179,"core-js/modules/es.object.to-string":190,"core-js/modules/es.regexp.to-string":196,"core-js/modules/es.string.includes":199,"core-js/modules/es.string.iterator":200,"core-js/modules/es.symbol":212,"core-js/modules/es.symbol.description":210,"core-js/modules/es.symbol.iterator":211,"core-js/modules/web.dom-collections.iterator":246}],314:[function(t,r,o){"use strict";t("core-js/modules/es.array.concat"),t("core-js/modules/es.array.slice"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.reflect.construct"),t("core-js/modules/es.regexp.to-string"),t("core-js/modules/es.array.concat"),t("core-js/modules/es.array.slice"),Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;var n=(t=t("../core/main"))&&t.__esModule?t:{default:t};function s(t,r,o){return(s=!function(){if("undefined"!=typeof Reflect&&Reflect.construct&&!Reflect.construct.sham){if("function"==typeof Proxy)return 1;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),1}catch(t){}}}()?function(t,r,o){var n=[null];return n.push.apply(n,r),r=new(Function.bind.apply(t,n)),o&&i(r,o.prototype),r}:Reflect.construct).apply(null,arguments)}function i(t,r){return(i=Object.setPrototypeOf||function(t,r){return t.__proto__=r,t})(t,r)}n.default.prototype.createVector=function(t,r,o){return this instanceof n.default?s(n.default.Vector,[this._fromRadians.bind(this),this._toRadians.bind(this)].concat(Array.prototype.slice.call(arguments))):new n.default.Vector(t,r,o)},t=n.default,o.default=t},{"../core/main":283,"core-js/modules/es.array.concat":153,"core-js/modules/es.array.slice":169,"core-js/modules/es.object.to-string":190,"core-js/modules/es.reflect.construct":192,"core-js/modules/es.regexp.to-string":196}],315:[function(t,r,o){"use strict";function n(t){return .5*(1-Math.cos(t*Math.PI))}Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;var s,i=4,a=.5,t=((t=(t=t("../core/main"))&&t.__esModule?t:{default:t}).default.prototype.noise=function(t){var r=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,o=2<arguments.length&&void 0!==arguments[2]?arguments[2]:0;if(null==s){s=Array(4096);for(var l=0;l<4096;l++)s[l]=Math.random()}t<0&&(t=-t),r<0&&(r=-r),o<0&&(o=-o);for(var u,c,d=Math.floor(t),h=Math.floor(r),f=Math.floor(o),p=t-d,m=r-h,y=o-f,g=0,v=.5,b=0;b<i;b++){var _=d+(h<<4)+(f<<8),j=n(p),x=n(m),w=s[4095&_];w+=j*(s[_+1&4095]-w),u=s[_+16&4095],w+=x*((u+=j*(s[_+16+1&4095]-u))-w),u=s[4095&(_+=256)],u+=j*(s[_+1&4095]-u),c=s[_+16&4095],u+=x*((c+=j*(s[_+16+1&4095]-c))-u),g+=(w+=n(y)*(u-w))*v,v*=a,d<<=1,h<<=1,f<<=1,1<=(p*=2)&&(d++,p--),1<=(m*=2)&&(h++,m--),1<=(y*=2)&&(f++,y--)}return g},t.default.prototype.noiseDetail=function(t,r){0<t&&(i=t),0<r&&(a=r)},t.default.prototype.noiseSeed=function(t){var r,o={setSeed:function(t){r=(null==t?4294967296*Math.random():t)>>>0},rand:function(){return(r=(1664525*r+1013904223)%4294967296)/4294967296}};o.setSeed(t),s=Array(4096);for(var n=0;n<4096;n++)s[n]=o.rand()},t.default);o.default=t},{"../core/main":283}],316:[function(t,r,o){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function s(t){return(s="function"==typeof Symbol&&"symbol"===n(Symbol.iterator)?function(t){return n(t)}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":n(t)})(t)}t("core-js/modules/es.symbol"),t("core-js/modules/es.symbol.description"),t("core-js/modules/es.symbol.iterator"),t("core-js/modules/es.array.
1concat"),t("core-js/modules/es.array.every"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.array.some"),t("core-js/modules/es.math.sign"),t("core-js/modules/es.number.constructor"),t("core-js/modules/es.number.epsilon"),t("core-js/modules/es.number.is-finite"),t("core-js/modules/es.object.get-own-property-descriptor"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.string.iterator"),t("core-js/modules/es.string.sub"),t("core-js/modules/es.weak-map"),t("core-js/modules/web.dom-collections.iterator"),t("core-js/modules/es.array.concat"),t("core-js/modules/es.array.every"),t("core-js/modules/es.array.some"),t("core-js/modules/es.math.sign"),t("core-js/modules/es.number.constructor"),t("core-js/modules/es.number.epsilon"),t("core-js/modules/es.number.is-finite"),t("core-js/modules/es.string.sub"),Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;var i=(c=t("../core/main"))&&c.__esModule?c:{default:c},a=function(t){if(t&&t.__esModule)return t;if(null===t||"object"!==s(t)&&"function"!=typeof t)return{default:t};var r,o=l();if(o&&o.has(t))return o.get(t);var n,i={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(n in t)Object.prototype.hasOwnProperty.call(t,n)&&((r=a?Object.getOwnPropertyDescriptor(t,n):null)&&(r.get||r.set)?Object.defineProperty(i,n,r):i[n]=t[n]);return i.default=t,o&&o.set(t,i),i}(t("../core/constants"));function l(){var t;return"function"!=typeof WeakMap?null:(t=new WeakMap,l=function(){return t},t)}function u(t,r){for(var o=0;o<r.length;o++){var n=r[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}i.default.Vector=function(){var t,r;function o(){var t=this;if(!(t instanceof o))throw TypeError("Cannot call a class as a function");var r,n,t="function"==typeof(arguments.length<=0?void 0:arguments[0])?(this.isPInst=!0,this._fromRadians=arguments.length<=0?void 0:arguments[0],this._toRadians=arguments.length<=1?void 0:arguments[1],r=(arguments.length<=2?void 0:arguments[2])||0,n=(arguments.length<=3?void 0:arguments[3])||0,(arguments.length<=4?void 0:arguments[4])||0):(r=(arguments.length<=0?void 0:arguments[0])||0,n=(arguments.length<=1?void 0:arguments[1])||0,(arguments.length<=2?void 0:arguments[2])||0);this.x=r,this.y=n,this.z=t}return r=[{key:"fromAngle",value:function(t){var r=1<arguments.length&&void 0!==arguments[1]?arguments[1]:1;return new i.default.Vector(r*Math.cos(t),r*Math.sin(t),0)}},{key:"fromAngles",value:function(t,r){var o=2<arguments.length&&void 0!==arguments[2]?arguments[2]:1,n=Math.cos(r),r=Math.sin(r),s=Math.cos(t),t=Math.sin(t);return new i.default.Vector(o*t*r,-o*s,o*t*n)}},{key:"random2D",value:function(){return this.fromAngle(Math.random()*a.TWO_PI)}},{key:"random3D",value:function(){var t=Math.random()*a.TWO_PI,r=2*Math.random()-1,o=Math.sqrt(1-r*r),n=o*Math.cos(t),o=o*Math.sin(t);return new i.default.Vector(n,o,r)}},{key:"copy",value:function(t){return t.copy(t)}},{key:"add",value:function(){for(var t=arguments.length,r=Array(t),o=0;o<t;o++)r[o]=arguments[o];var n=r[0],s=r[1],a=r[2];return a?a.set(n):(a=n.copy(),3===r.length&&i.default._friendlyError("The target parameter is undefined, it should be of type p5.Vector","p5.Vector.add")),a.add(s),a}},{key:"rem",value:function(t,r){if(t instanceof i.default.Vector&&r instanceof i.default.Vector)return(t=t.copy()).rem(r),t}},{key:"sub",value:function(){for(var t=arguments.length,r=Array(t),o=0;o<t;o++)r[o]=arguments[o];var n=r[0],s=r[1],a=r[2];return a?a.set(n):(a=n.copy(),3===r.length&&i.default._friendlyError("The target parameter is undefined, it should be of type p5.Vector","p5.Vector.sub")),a.sub(s),a}},{key:"mult",value:function(){for(var t=arguments.length,r=Array(t),o=0;o<t;o++)r[o]=arguments[o];var n=r[0],s=r[1],a=r[2];return a?a.set(n):(a=n.copy(),3===r.length&&i.default._friendlyError("The target parameter is undefined, it should be of type p5.Vector","p5.Vector.mult")),a.mult(s),a}},{key:"rotate",value:function(){for(var t=arguments.length,r=Array(t),o=0;o<t;o++)r[o]=arguments[o];var n=r[0],s=r[1],a=r[2];return 2===r.length?a=n.copy():(a instanceof i.default.Vector||i.default._friendlyError("The target parameter should be of type p5.Vector","p5.Vector.rotate"),a.set(n)),a.rotate(s),a}},{key:"div",value:function(){for(var t=arguments.length,r=Array(t),o=0;o<t;o++)r[o]=arguments[o];var n=r[0],s=r[1],a=r[2];return a?a.set(n):(a=n.copy(),3===r.length&&i.default._friendlyError("The target parameter is undefined, it should be of type p5.Vector","p5.Vector.div")),a.div(s),a}},{key:"dot",value:function(t,r){return t.dot(r)}},{key:"cross",value:function(t,r){return t.cross(r)}},{key:"dist",value:function(t,r){return t.dist(r)}},{key:"lerp",value:function(){for(var t=arguments.length,r=Array(t),o=0;o<t;o++)r[o]=arguments[o];var n=r[0],s=r[1],a=r[2],l=r[3];return l?l.set(n):(l=n.copy(),4===r.length&&i.default._friendlyError("The target parameter is undefined, it should be of type p5.Vector","p5.Vector.lerp")),l.lerp(s,a),l}},{key:"slerp",value:function(){for(var t=arguments.length,r=Array(t),o=0;o<t;o++)r[o]=arguments[o];var n=r[0],s=r[1],a=r[2],l=r[3];return l?l.set(n):(l=n.copy(),4===r.length&&i.default._friendlyError("The target parameter is undefined, it should be of type p5.Vector","p5.Vector.slerp")),l.slerp(s,a),l}},{key:"mag",value:function(t){return t.mag()}},{key:"magSq",value:function(t){return t.magSq()}},{key:"normalize",value:function(){for(var t=arguments.length,r=Array(t),o=0;o<t;o++)r[o]=arguments[o];var n=r[0],s=r[1];return r.length<2?s=n.copy():(s instanceof i.default.Vector||i.default._friendlyError("The target parameter should be of type p5.Vector","p5.Vector.normalize"),s.set(n)),s.normalize()}},{key:"limit",value:function(){for(var t=arguments.length,r=Array(t),o=0;o<t;o++)r[o]=arguments[o];var n=r[0],s=r[1],a=r[2];return r.length<3?a=n.copy():(a instanceof i.default.Vector||i.default._friendlyError("The target parameter should be of type p5.Vector","p5.Vector.limit"),a.set(n)),a.limit(s)}},{key:"setMag",value:function(){for(var t=arguments.length,r=Array(t),o=0;o<t;o++)r[o]=arguments[o];var n=r[0],s=r[1],a=r[2];return r.length<3?a=n.copy():(a instanceof i.default.Vector||i.default._friendlyError("The target parameter should be of type p5.Vector","p5.Vector.setMag"),a.set(n)),a.setMag(s)}},{key:"heading",value:function(t){return t.heading()}},{key:"angleBetween",value:function(t,r){return t.angleBetween(r)}},{key:"reflect",value:function(){for(var t=arguments.length,r=Array(t),o=0;o<t;o++)r[o]=arguments[o];var n=r[0],s=r[1],a=r[2];return r.length<3?a=n.copy():(a instanceof i.default.Vector||i.default._friendlyError("The target parameter should be of type p5.Vector","p5.Vector.reflect"),a.set(n)),a.reflect(s)}},{key:"array",value:function(t){return t.array()}},{key:"equals",value:function(t,r){var o;return t instanceof i.default.Vector?o=t:Array.isArray(t)?o=(new i.default.Vector).set(t):i.default._friendlyError("The v1 parameter should be of type Array or p5.Vector","p5.Vector.equals"),o.equals(r)}}],t=[{key:"toString",value:function(){return"p5.Vector Object : [".concat(this.x,", ").concat(this.y,", ").concat(this.z,"]")}},{key:"set",value:function(t,r,o){return t instanceof i.default.Vector?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0):Array.isArray(t)?(this.x=t[0]||0,this.y=t[1]||0,this.z=t[2]||0):(this.x=t||0,this.y=r||0,this.z=o||0),this}},{key:"copy",value:function(){return this.isPInst?new i.default.Vector(this._fromRadians,this._toRadians,this.x,this.y,this.z):new i.default.Vector(this.x,this.y,this.z)}},{key:"add",value:function(t,r,o){return t instanceof i.default.Vector?(this.x+=t.x||0,this.y+=t.y||0,this.z+=t.z||0):Array.isArray(t)?(this.x+=t[0]||0,this.y+=t[1]||0,this.z+=t[2]||0):(this.x+=t||0,this.y+=r||0,this.z+=o||0),this}},{key:"calculateRemainder2D",value:function(t,r){return 0!==t&&(this.x=this.x%t),0!==r&&(this.y=this.y%r),this}},{key:"calculateRemainder3D",value:function(t,r,o){return 0!==t&&(this.x=this.x%t),0!==r&&(this.y=this.y%r),0!==o&&(this.z=this.z%o),this}},{key:"rem",value:function(){for(var t=arguments.length,r=Array(t),o=0;o<t;o++)r[o]=arguments[o];var n,s,a,l=r[0],u=r[1],c=r[2];if(l instanceof i.default.Vector){if([l.x,l.y,l.z].every(Number.isFinite))return n=parseFloat(l.x),s=parseFloat(l.y),a=parseFloat(l.z),this.calculateRemainder3D(n,s,a)}else if(Array.isArray(l)){if(l.every(Number.isFinite))return 2===l.length?this.calculateRemainder2D(l[0],l[1]):3===l.length?this.calculateRemainder3D(l[0],l[1],l[2]):void 0}else if(1===r.length){if(Number.isFinite(l)&&0!==l)return this.x=this.x%l,this.y=this.y%l,this.z=this.z%l,this}else if(2===r.length){if(r.every(Number.isFinite))return this.calculateRemainder2D(l,u)}else if(3===r.length&&r.every(Number.isFinite))return this.calculateRemainder3D(l,u,c)}},{key:"sub",value:function(t,r,o){return t instanceof i.default.Vector?(this.x-=t.x||0,this.y-=t.y||0,this.z-=t.z||0):Array.isArray(t)?(this.x-=t[0]||0,this.y-=t[1]||0,this.z-=t[2]||0):(this.x-=t||0,this.y-=r||0,this.z-=o||0),this}},{key:"mult",value:function(){for(var t=arguments.length,r=Array(t),o=0;o<t;o++)r[o]=arguments[o];var n=r[0],s=r[1],a=r[2];return n instanceof i.default.Vector?Number.isFinite(n.x)&&Number.isFinite(n.y)&&Number.isFinite(n.z)&&"number"==typeof n.x&&"number"==typeof n.y&&"number"==typeof n.z?(this.x*=n.x,this.y*=n.y,this.z*=n.z):console.warn("p5.Vector.prototype.mult:","x contains components that are either undefined or not finite numbers"):Array.isArray(n)?n.every(function(t){return Number.isFinite(t)}
1)&&n.every(function(t){return"number"==typeof t})?1===n.length?(this.x*=n[0],this.y*=n[0],this.z*=n[0]):2===n.length?(this.x*=n[0],this.y*=n[1]):3===n.length&&(this.x*=n[0],this.y*=n[1],this.z*=n[2]):console.warn("p5.Vector.prototype.mult:","x contains elements that are either undefined or not finite numbers"):r.every(function(t){return Number.isFinite(t)})&&r.every(function(t){return"number"==typeof t})?(1===r.length&&(this.x*=n,this.y*=n,this.z*=n),2===r.length&&(this.x*=n,this.y*=s),3===r.length&&(this.x*=n,this.y*=s,this.z*=a)):console.warn("p5.Vector.prototype.mult:","x, y, or z arguments are either undefined or not a finite number"),this}},{key:"div",value:function(){for(var t=arguments.length,r=Array(t),o=0;o<t;o++)r[o]=arguments[o];var n=r[0],s=r[1],a=r[2];if(n instanceof i.default.Vector){if(Number.isFinite(n.x)&&Number.isFinite(n.y)&&Number.isFinite(n.z)&&"number"==typeof n.x&&"number"==typeof n.y&&"number"==typeof n.z){var l=0===n.z&&0===this.z;if(0===n.x||0===n.y||!l&&0===n.z)return console.warn("p5.Vector.prototype.div:","divide by 0"),this;this.x/=n.x,this.y/=n.y,l||(this.z/=n.z)}else console.warn("p5.Vector.prototype.div:","x contains components that are either undefined or not finite numbers")}else if(Array.isArray(n)){if(n.every(Number.isFinite)&&n.every(function(t){return"number"==typeof t})){if(n.some(function(t){return 0===t}))return console.warn("p5.Vector.prototype.div:","divide by 0"),this;1===n.length?(this.x/=n[0],this.y/=n[0],this.z/=n[0]):2===n.length?(this.x/=n[0],this.y/=n[1]):3===n.length&&(this.x/=n[0],this.y/=n[1],this.z/=n[2])}else console.warn("p5.Vector.prototype.div:","x contains components that are either undefined or not finite numbers")}else if(r.every(Number.isFinite)&&r.every(function(t){return"number"==typeof t})){if(r.some(function(t){return 0===t}))return console.warn("p5.Vector.prototype.div:","divide by 0"),this;1===r.length&&(this.x/=n,this.y/=n,this.z/=n),2===r.length&&(this.x/=n,this.y/=s),3===r.length&&(this.x/=n,this.y/=s,this.z/=a)}else console.warn("p5.Vector.prototype.div:","x, y, or z arguments are either undefined or not a finite number");return this}},{key:"mag",value:function(){return Math.sqrt(this.magSq())}},{key:"magSq",value:function(){var t=this.x,r=this.y,o=this.z;return t*t+r*r+o*o}},{key:"dot",value:function(t,r,o){return t instanceof i.default.Vector?this.dot(t.x,t.y,t.z):this.x*(t||0)+this.y*(r||0)+this.z*(o||0)}},{key:"cross",value:function(t){var r=this.y*t.z-this.z*t.y,o=this.z*t.x-this.x*t.z,t=this.x*t.y-this.y*t.x;return this.isPInst?new i.default.Vector(this._fromRadians,this._toRadians,r,o,t):new i.default.Vector(r,o,t)}},{key:"dist",value:function(t){return t.copy().sub(this).mag()}},{key:"normalize",value:function(){var t=this.mag();return 0!==t&&this.mult(1/t),this}},{key:"limit",value:function(t){var r=this.magSq();return t*t<r&&this.div(Math.sqrt(r)).mult(t),this}},{key:"setMag",value:function(t){return this.normalize().mult(t)}},{key:"heading",value:function(){var t=Math.atan2(this.y,this.x);return this.isPInst?this._fromRadians(t):t}},{key:"setHeading",value:function(t){this.isPInst&&(t=this._toRadians(t));var r=this.mag();return this.x=r*Math.cos(t),this.y=r*Math.sin(t),this}},{key:"rotate",value:function(t){var t=this.heading()+t,r=(this.isPInst&&(t=this._toRadians(t)),this.mag());return this.x=Math.cos(t)*r,this.y=Math.sin(t)*r,this}},{key:"angleBetween",value:function(t){var r;return 0==this.magSq()*t.magSq()?NaN:(t=Math.atan2((r=this.cross(t)).mag(),this.dot(t))*Math.sign(r.z||1),this.isPInst?this._fromRadians(t):t)}},{key:"lerp",value:function(t,r,o,n){return t instanceof i.default.Vector?this.lerp(t.x,t.y,t.z,r):(this.x+=(t-this.x)*n||0,this.y+=(r-this.y)*n||0,this.z+=(o-this.z)*n||0,this)}},{key:"slerp",value:function(t,r){if(0!==r){if(1===r)return this.set(t);var o=this.mag(),n=t.mag();if(0==o*n)this.mult(1-r).add(t.x*r,t.y*r,t.z*r);else{var s=this.cross(t),i=s.mag(),a=Math.atan2(i,this.dot(t));if(0<i)s.x/=i,s.y/=i,s.z/=i;else{if(a<.5*Math.PI)return this.mult(1-r).add(t.x*r,t.y*r,t.z*r),this;0===this.z&&0===t.z?s.set(0,0,1):0!==this.x?s.set(this.y,-this.x,0).normalize():s.set(1,0,0)}i=s.cross(this),s=(t=1-r+r*n/o)*Math.cos(r*a),n=t*Math.sin(r*a),this.x=this.x*s+i.x*n,this.y=this.y*s+i.y*n,this.z=this.z*s+i.z*n}}return this}},{key:"reflect",value:function(t){return t=i.default.Vector.normalize(t),this.sub(t.mult(2*this.dot(t)))}},{key:"array",value:function(){return[this.x||0,this.y||0,this.z||0]}},{key:"equals",value:function(t,r,o){var n,s,t=t instanceof i.default.Vector?(n=t.x||0,s=t.y||0,t.z||0):Array.isArray(t)?(n=t[0]||0,s=t[1]||0,t[2]||0):(n=t||0,s=r||0,o||0);return this.x===n&&this.y===s&&this.z===t}},{key:"clampToZero",value:function(){return this.x=this._clampToZero(this.x),this.y=this._clampToZero(this.y),this.z=this._clampToZero(this.z),this}},{key:"_clampToZero",value:function(t){return Math.abs(+(t||0))<=Number.EPSILON?0:t}}],u(o.prototype,t),r&&u(o,r),o}();var c=i.default.Vector;o.default=c},{"../core/constants":272,"../core/main":283,"core-js/modules/es.array.
1concat":153,"core-js/modules/es.array.every":155,"core-js/modules/es.array.iterator":165,"core-js/modules/es.array.some":170,"core-js/modules/es.math.sign":178,"core-js/modules/es.number.constructor":179,"core-js/modules/es.number.epsilon":180,"core-js/modules/es.number.is-finite":181,"core-js/modules/es.object.get-own-property-descriptor":186,"core-js/modules/es.object.to-string":190,"core-js/modules/es.string.iterator":200,"core-js/modules/es.string.sub":208,"core-js/modules/es.symbol":212,"core-js/modules/es.symbol.description":210,"core-js/modules/es.symbol.iterator":211,"core-js/modules/es.weak-map":244,"core-js/modules/web.dom-collections.iterator":246}],317:[function(t,r,o){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;var n=(t=t("../core/main"))&&t.__esModule?t:{default:t},s="_lcg_random_state",i=0,t=(n.default.prototype._lcg=function(t){return this[t]=(1664525*this[t]+1013904223)%4294967296,this[t]/4294967296},n.default.prototype._lcgSetSeed=function(t,r){this[t]=(null==r?4294967296*Math.random():r)>>>0},n.default.prototype.randomSeed=function(t){this._lcgSetSeed(s,t),this._gaussian_previous=!1},n.default.prototype.random=function(t,r){var o,i;return n.default._validateParameters("random",arguments),o=null!=this[s]?this._lcg(s):Math.random(),void 0===t?o:void 0===r?Array.isArray(t)?t[Math.floor(o*t.length)]:o*t:(r<t&&(i=t,t=r,r=i),o*(r-t)+t)},n.default.prototype.randomGaussian=function(t){var r,o,n,s,a=1<arguments.length&&void 0!==arguments[1]?arguments[1]:1;if(this._gaussian_previous)r=i,this._gaussian_previous=!1;else{for(;1<=(s=(o=this.random(2)-1)*o+(n=this.random(2)-1)*n););r=o*(s=Math.sqrt(-2*Math.log(s)/s)),i=n*s,this._gaussian_previous=!0}return r*a+(t||0)},n.default);o.default=t},{"../core/main":283}],318:[function(t,r,o){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function s(t){return(s="function"==typeof Symbol&&"symbol"===n(Symbol.iterator)?function(t){return n(t)}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":n(t)})(t)}t("core-js/modules/es.symbol"),t("core-js/modules/es.symbol.description"),t("core-js/modules/es.symbol.iterator"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.object.get-own-property-descriptor"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.string.iterator"),t("core-js/modules/es.weak-map"),t("core-js/modules/web.dom-collections.iterator"),Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;var i=(u=t("../core/main"))&&u.__esModule?u:{default:u},a=function(t){if(t&&t.__esModule)return t;if(null===t||"object"!==s(t)&&"function"!=typeof t)return{default:t};var r,o=l();if(o&&o.has(t))return o.get(t);var n,i={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(n in t)Object.prototype.hasOwnProperty.call(t,n)&&((r=a?Object.getOwnPropertyDescriptor(t,n):null)&&(r.get||r.set)?Object.defineProperty(i,n,r):i[n]=t[n]);return i.default=t,o&&o.set(t,i),i}(t("../core/constants"));function l(){var t;return"function"!=typeof WeakMap?null:(t=new WeakMap,l=function(){return t},t)}i.default.prototype._angleMode=a.RADIANS,i.default.prototype.acos=function(t){return this._fromRadians(Math.acos(t))},i.default.prototype.asin=function(t){return this._fromRadians(Math.asin(t))},i.default.prototype.atan=function(t){return this._fromRadians(Math.atan(t))},i.default.prototype.atan2=function(t,r){return this._fromRadians(Math.atan2(t,r))},i.default.prototype.cos=function(t){return Math.cos(this._toRadians(t))},i.default.prototype.sin=function(t){return Math.sin(this._toRadians(t))},i.default.prototype.tan=function(t){return Math.tan(this._toRadians(t))},i.default.prototype.degrees=function(t){return t*a.RAD_TO_DEG},i.default.prototype.radians=function(t){return t*a.DEG_TO_RAD},i.default.prototype.angleMode=function(t){if(i.default._validateParameters("angleMode",arguments),void 0===t)return this._angleMode;t!==a.DEGREES&&t!==a.RADIANS||t!==this._angleMode&&(t===a.RADIANS?(this._setProperty("pRotationX",this.pRotationX*a.DEG_TO_RAD),this._setProperty("pRotationY",this.pRotationY*a.DEG_TO_RAD),this._setProperty("pRotationZ",this.pRotationZ*a.DEG_TO_RAD)):(this._setProperty("pRotationX",this.pRotationX*a.RAD_TO_DEG),this._setProperty("pRotationY",this.pRotationY*a.RAD_TO_DEG),this._setProperty("pRotationZ",this.pRotationZ*a.RAD_TO_DEG)),this._angleMode=t)},i.default.prototype._toRadians=function(t){return this._angleMode===a.DEGREES?t*a.DEG_TO_RAD:t},i.default.prototype._toDegrees=function(t){return this._angleMode===a.RADIANS?t*a.RAD_TO_DEG:t},i.default.prototype._fromRadians=function(t){return this._angleMode===a.DEGREES?t*a.RAD_TO_DEG:t},i.default.prototype._fromDegrees=function(t){return this._angleMode===a.RADIANS?t*a.DEG_TO_RAD:t};var u=i.default;o.default=u},{"../core/constants":272,"../core/main":283,"core-js/modules/es.array.iterator":165,"core-js/modules/es.object.get-own-property-descriptor":186,"core-js/modules/es.object.to-string":190,"core-js/modules/es.string.iterator":200,"core-js/modules/es.symbol":212,"core-js/modules/es.symbol.description":210,"core-js/modules/es.symbol.iterator":211,"core-js/modules/es.weak-map":244,"core-js/modules/web.dom-collections.iterator":246}],319:[function(t,r,o){"use strict";t("core-js/modules/es.regexp.exec"),t("core-js/modules/es.string.replace"),t("core-js/modules/es.string.split"),t("core-js/modules/es.regexp.exec"),t("core-js/modules/es.string.replace"),t("core-js/modules/es.string.split"),Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;var n=(t=t("../core/main"))&&t.__esModule?t:{default:t};n.default.prototype.textAlign=function(t,r){var o;return n.default._validateParameters("textAlign",arguments),(o=this._renderer).textAlign.apply(o,arguments)},n.default.prototype.textLeading=function(t){var r;return n.default._validateParameters("textLeading",arguments),(r=this._renderer).textLeading.apply(r,arguments)},n.default.prototype.textSize=function(t){var r;return n.default._validateParameters("textSize",arguments),(r=this._renderer).textSize.apply(r,arguments)},n.default.prototype.textStyle=function(t){var r;return n.default._validateParameters("textStyle",arguments),(r=this._renderer).textStyle.apply(r,arguments)},n.default.prototype.textWidth=function(){for(var t=arguments.length,r=Array(t),o=0;o<t;o++)r[o]=arguments[o];if(r[0]+="",n.default._validateParameters("textWidth",r),0===r[0].length)return 0;for(var s=r[0].replace(/\t/g," ").split(/\r?\n|\r|\n/g),i=[],a=0;a<s.length;a++)i.push(this._renderer.textWidth(s[a]));return Math.max.apply(Math,i)},n.default.prototype.textAscent=function(){for(var t=arguments.length,r=Array(t),o=0;o<t;o++)r[o]=arguments[o];return n.default._validateParameters("textAscent",r),this._renderer.textAscent()},n.default.prototype.textDescent=function(){for(var t=arguments.length,r=Array(t),o=0;o<t;o++)r[o]=arguments[o];return n.default._validateParameters("textDescent",r),this._renderer.textDescent()},n.default.prototype._updateTextMetrics=function(){return this._renderer._updateTextMetrics()},n.default.prototype.textWrap=function(t){return n.default._validateParameters("textWrap",[t]),this._renderer.textWrap(t)},t=n.default,o.default=t},{"../core/main":283,"core-js/modules/es.regexp.exec":195,"core-js/modules/es.string.replace":204,"core-js/modules/es.string.split":206}],320:[function(t,r,o){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function s(t){return(s="function"==typeof Symbol&&"symbol"===n(Symbol.iterator)?function(t){return n(t)}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":n(t)})(t)}t("core-js/modules/es.symbol"),t("core-js/modules/es.symbol.description"),t("core-js/modules/es.symbol.iterator"),t("core-js/modules/es.array.
1concat"),t("core-js/modules/es.array.includes"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.array.last-index-of"),t("core-js/modules/es.array.slice"),t("core-js/modules/es.object.get-own-property-descriptor"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.regexp.exec"),t("core-js/modules/es.string.iterator"),t("core-js/modules/es.string.split"),t("core-js/modules/es.weak-map"),t("core-js/modules/web.dom-collections.iterator"),t("core-js/modules/es.array.concat"),t("core-js/modules/es.array.includes"),t("core-js/modules/es.array.last-index-of"),t("core-js/modules/es.array.slice"),t("core-js/modules/es.regexp.exec"),t("core-js/modules/es.string.split"),Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;var i=(d=t("../core/main"))&&d.__esModule?d:{default:d},a=c(t("../core/constants")),l=c(t("opentype.js"));function u(){var t;return"function"!=typeof WeakMap?null:(t=new WeakMap,u=function(){return t},t)}function c(t){if(t&&t.__esModule)return t;if(null===t||"object"!==s(t)&&"function"!=typeof t)return{default:t};var r=u();if(r&&r.has(t))return r.get(t);var o,n,i={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(o in t)Object.prototype.hasOwnProperty.call(t,o)&&((n=a?Object.getOwnPropertyDescriptor(t,o):null)&&(n.get||n.set)?Object.defineProperty(i,o,n):i[o]=t[o]);return i.default=t,r&&r.set(t,i),i}t("../core/friendly_errors/validate_params"),t("../core/friendly_errors/file_errors"),t("../core/friendly_errors/fes_core"),i.default.prototype.loadFont=function(t,r,o){i.default._validateParameters("loadFont",arguments);var n=new i.default.Font(this),s=this;return l.load(t,function(a,l){if(a)return i.default._friendlyFileLoadError(4,t),void 0!==o?o(a):void console.error(a,t);n.font=l,void 0!==r&&r(n),s._decrementPreload();var a=t.split("\\").pop().split("/").pop(),l=a.lastIndexOf("."),u=l<1?null:a.slice(l+1);["ttf","otf","woff","woff2"].includes(u)&&(u=a.slice(0,-1!==l?l:0),(a=document.createElement("style")).appendChild(document.createTextNode("\n@font-face {\nfont-family: ".concat(u,";\nsrc: url(").concat(t,");\n}\n"))),document.head.appendChild(a))}),n},i.default.prototype.text=function(t,r,o,n,s){var a;return i.default._validateParameters("text",arguments),this._renderer._doFill||this._renderer._doStroke?(a=this._renderer).text.apply(a,arguments):this},i.default.prototype.textFont=function(t,r){if(i.default._validateParameters("textFont",arguments),arguments.length){if(t)return this._renderer._setProperty("_textFont",t),r&&(this._renderer._setProperty("_textSize",r),this._renderer._leadingSet||this._renderer._setProperty("_textLeading",r*a._DEFAULT_LEADMULT)),this._renderer._applyTextProperties();throw Error("null font passed to textFont")}return this._renderer._textFont};var d=i.default;o.default=d},{"../core/constants":272,"../core/friendly_errors/fes_core":274,"../core/friendly_errors/file_errors":275,"../core/friendly_errors/validate_params":278,"../core/main":283,"core-js/modules/es.array.concat":153,"core-js/modules/es.array.includes":163,"core-js/modules/es.array.iterator":165,"core-js/modules/es.array.last-index-of":167,"core-js/modules/es.array.slice":169,"core-js/modules/es.object.get-own-property-descriptor":186,"core-js/modules/es.object.to-string":190,"core-js/modules/es.regexp.exec":195,"core-js/modules/es.string.iterator":200,"core-js/modules/es.string.split":206,"core-js/modules/es.symbol":212,"core-js/modules/es.symbol.description":210,"core-js/modules/es.symbol.iterator":211,"core-js/modules/es.weak-map":244,"core-js/modules/web.dom-collections.iterator":246,"opentype.js":257}],321:[function(t,r,o){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}t("core-js/modules/es.symbol"),t("core-js/modules/es.symbol.description"),t("core-js/modules/es.symbol.iterator"),t("core-js/modules/es.array.concat"),t("core-js/modules/es.array.fill"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.array.join"),t("core-js/modules/es.array.slice"),t("core-js/modules/es.array.splice"),t("core-js/modules/es.function.name"),t("core-js/modules/es.number.to-fixed"),t("core-js/modules/es.object.get-own-property-descriptor"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.regexp.exec"),t("core-js/modules/es.string.iterator"),t("core-js/modules/es.string.replace"),t("core-js/modules/es.string.split"),t("core-js/modules/es.weak-map"),t("core-js/modules/web.dom-collections.iterator"),t("core-js/modules/es.symbol"),t("core-js/modules/es.symbol.description"),t("core-js/modules/es.symbol.iterator"),t("core-js/modules/es.array.
1concat"),t("core-js/modules/es.array.fill"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.array.join"),t("core-js/modules/es.array.slice"),t("core-js/modules/es.array.splice"),t("core-js/modules/es.function.name"),t("core-js/modules/es.number.to-fixed"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.regexp.exec"),t("core-js/modules/es.string.iterator"),t("core-js/modules/es.string.replace"),t("core-js/modules/es.string.split"),t("core-js/modules/web.dom-collections.iterator"),Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;var s=(s=t("../core/main"))&&s.__esModule?s:{default:s},i=function(t){if(t&&t.__esModule)return t;if(null===t||"object"!==l(t)&&"function"!=typeof t)return{default:t};var r,o=a();if(o&&o.has(t))return o.get(t);var n,s={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(n in t)Object.prototype.hasOwnProperty.call(t,n)&&((r=i?Object.getOwnPropertyDescriptor(t,n):null)&&(r.get||r.set)?Object.defineProperty(s,n,r):s[n]=t[n]);return s.default=t,o&&o.set(t,s),s}(t("../core/constants"));function a(){var t;return"function"!=typeof WeakMap?null:(t=new WeakMap,a=function(){return t},t)}function l(t){return(l="function"==typeof Symbol&&"symbol"===n(Symbol.iterator)?function(t){return n(t)}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":n(t)})(t)}function u(t,r){for(var o=0;o<r.length;o++){var n=r[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function c(t,r){var o=t.length;return t[r<0?r%o+o:r%o]}function d(t,r,o,n,s,i,a,l,u){var c=1-u,d=Math.pow(c,3),h=Math.pow(c,2),f=u*u,p=f*u,m=d*t+3*h*u*o+3*c*u*u*s+p*a,d=d*r+3*h*u*n+3*c*u*u*i+p*l,h=t+2*u*(o-t)+f*(s-2*o+t),p=r+2*u*(n-r)+f*(i-2*n+r),y=o+2*u*(s-o)+f*(a-2*s+o),f=n+2*u*(i-n)+f*(l-2*i+n),t=c*t+u*o,o=c*r+u*n,r=c*s+u*a,n=c*i+u*l,s=90-180*Math.atan2(h-y,p-f)/Math.PI;return(y<h||p<f)&&(s+=180),{x:m,y:d,m:{x:h,y:p},n:{x:y,y:f},start:{x:t,y:o},end:{x:r,y:n},alpha:s}}function h(t,r,o,n,s,i,a,l,u){return null==u?y(t,r,o,n,s,i,a,l):d(t,r,o,n,s,i,a,l,function(t,r,o,n,s,i,a,l,u){if(!(u<0||y(t,r,o,n,s,i,a,l)<u)){var c,d=.5,h=.5;for(c=y(t,r,o,n,s,i,a,l,.5);.01<Math.abs(c-u);)c=y(t,r,o,n,s,i,a,l,h+=(c<u?1:-1)*(d/=2));return h}}(t,r,o,n,s,i,a,l,u))}function f(t,r,o){for(var n,s,i,a,l,u=0,c=0,f=(t=function(t,r){function o(t,r,o){var n,s,i,a,l,u,c,d,h,f,p,y,g,v,b,_,j,x;if(!t)return["C",r.x,r.y,r.x,r.y,r.x,r.y];switch((t[0]in{T:1,Q:1})||(r.qx=r.qy=null),t[0]){case"M":r.X=t[1],r.Y=t[2];break;case"A":t=["C"].concat((function t(r,o,n,s,i,a,l,u,c,d){function h(t,r,o){return{x:t*Math.cos(o)-r*Math.sin(o),y:t*Math.sin(o)+r*Math.cos(o)}}var f,p=Math.PI,m=120*p/180,y=p/180*(+i||0),g=[],v=(d?(S=d[0],f=d[1],x=d[2],w=d[3]):(r=(_=h(r,o,-y)).x,o=_.y,1<(v=(b=(r-(u=(_=h(u,c,-y)).x))/2)*b/(n*n)+(_=(o-(c=_.y))/2)*_/(s*s))&&(n*=v=Math.sqrt(v),s*=v),x=(a=(a===l?-1:1)*Math.sqrt(Math.abs(((v=n*n)*(j=s*s)-v*_*_-j*b*b)/(v*_*_+j*b*b))))*n*_/s+(r+u)/2,w=-(a*s)*b/n+(o+c)/2,S=Math.asin(((o-w)/s).toFixed(9)),f=Math.asin(((c-w)/s).toFixed(9)),(S=r<x?p-S:S)<0&&(S=2*p+S),(f=u<x?p-f:f)<0&&(f=2*p+f),l&&f<S&&(S-=2*p),!l&&S<f&&(f-=2*p)),f-S),b=(Math.abs(v)>m&&(j=f,_=u,a=c,g=t(u=x+n*Math.cos(f=S+m*(l&&S<f?1:-1)),c=w+s*Math.sin(f),n,s,i,0,l,_,a,[f,j,x,w])),v=f-S,Math.cos(S)),p=Math.sin(S),m=Math.cos(f),i=Math.sin(f),l=Math.tan(v/4),_=4/3*n*l,a=4/3*s*l,j=[r,o],x=[r+_*p,o-a*b],w=[u+_*i,c-a*m],S=[u,c];if(x[0]=2*j[0]-x[0],x[1]=2*j[1]-x[1],d)return[x,w,S].concat(g);for(var T=[],E=0,M=(g=[x,w,S].concat(g).join().split(",")).length;E<M;E++)T[E]=E%2?h(g[E-1],g[E],y).y:h(g[E],g[E+1],y).x;return T}).apply(0,[r.x,r.y].concat(t.slice(1))));break;case"S":s="C"===o||"S"===o?(n=2*r.x-r.bx,2*r.y-r.by):(n=r.x,r.y),t=["C",n,s].concat(t.slice(1));break;case"T":"Q"===o||"T"===o?(r.qx=2*r.x-r.qx,r.qy=2*r.y-r.qy):(r.qx=r.x,r.qy=r.y),t=["C"].concat(m(r.x,r.y,r.qx,r.qy,t[1],t[2]));break;case"Q":r.qx=t[1],r.qy=t[2],t=["C"].concat(m(r.x,r.y,t[1],t[2],t[3],t[4]));break;case"L":t=["C"].concat((i=r.x,a=r.y,[i,a,l=t[1],u=t[2],l,u]));break;case"H":t=["C"].concat((c=r.x,d=r.y,[c,d,h=t[1],f=r.y,h,f]));break;
1case"V":t=["C"].concat((p=r.x,y=r.y,[p,y,g=r.x,v=t[1],g,v]));break;case"Z":t=["C"].concat((b=r.x,_=r.y,[b,_,j=r.X,x=r.Y,j,x]))}return t}function n(t,r){if(7<t[r].length){t[r].shift();for(var o=t[r];o.length;)d[r]="A",l&&(h[r]="A"),t.splice(r++,0,["C"].concat(o.splice(0,6)));t.splice(r,1),i=Math.max(a.length,l&&l.length||0)}}function s(t,r,o,n,s){t&&r&&"M"===t[s][0]&&"M"!==r[s][0]&&(r.splice(s,0,["M",n.x,n.y]),o.bx=0,o.by=0,o.x=t[s][1],o.y=t[s][2],i=Math.max(a.length,l&&l.length||0))}var i,a=function(t){var r=[],o=0,n=0,s=0,i=0,a=0;if(t){"M"===t[0][0]&&(s=o=+t[0][1],i=n=+t[0][2],a++,r[0]=["M",o,n]);for(var l,u,c=3===t.length&&"M"===t[0][0]&&"R"===t[1][0].toUpperCase()&&"Z"===t[2][0].toUpperCase(),d=a,h=t.length;d<h;d++){if(r.push(l=[]),(u=t[d])[0]!==u[0].toUpperCase())switch(l[0]=u[0].toUpperCase(),l[0]){case"A":l[1]=u[1],l[2]=u[2],l[3]=u[3],l[4]=u[4],l[5]=u[5],l[6]=+(u[6]+o),l[7]=+(u[7]+n);break;case"V":l[1]=+u[1]+n;break;case"H":l[1]=+u[1]+o;break;case"R":for(var f,m=2,y=(f=[o,n].concat(u.slice(1))).length;m<y;m++)f[m]=+f[m]+o,f[++m]=+f[m]+n;r.pop(),r=r.concat(p(f,c));break;case"M":s=+u[1]+o,i=+u[2]+n;break;default:for(var g=1,v=u.length;g<v;g++)l[g]=+u[g]+(g%2?o:n)}else if("R"===u[0])f=[o,n].concat(u.slice(1)),r.pop(),r=r.concat(p(f,c)),l=["R"].concat(u.slice(-2));else for(var b=0,_=u.length;b<_;b++)l[b]=u[b];switch(l[0]){case"Z":o=s,n=i;break;case"H":o=l[1];break;case"V":n=l[1];break;case"M":s=l[l.length-2],i=l[l.length-1];break;default:o=l[l.length-2],n=l[l.length-1]}}}return r}(t),l=void 0,u={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},c={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},d=[],h=[],f="",y="";i=Math.max(a.length,l&&l.length||0);for(var g=0;g<i;g++){"C"!==(f=a[g]?a[g][0]:f)&&(d[g]=f,g&&(y=d[g-1])),a[g]=o(a[g],u,y),"A"!==d[g]&&"C"===f&&(d[g]="C"),n(a,g),l&&("C"!==(f=l[g]?l[g][0]:f)&&(h[g]=f,g&&(y=h[g-1])),l[g]=o(l[g],c,y),"A"!==h[g]&&"C"===f&&(h[g]="C"),n(l,g)),s(a,l,u,c,g),s(l,a,c,u,g);var v=a[g],b=l&&l[g],_=v.length,j=l&&b.length;u.x=v[_-2],u.y=v[_-1],u.bx=parseFloat(v[_-4])||u.x,u.by=parseFloat(v[_-3])||u.y,c.bx=l&&(parseFloat(b[j-4])||c.x),c.by=l&&(parseFloat(b[j-3])||c.y),c.x=l&&b[j-2],c.y=l&&b[j-1]}return l?[a,l]:a}(t)).length;c<f;c++){if("M"===(i=t[c])[0])n=+i[1],s=+i[2];else{if(r<u+(a=h(n,s,i[1],i[2],i[3],i[4],i[5],i[6]))&&!o)return{x:(l=h(n,s,i[1],i[2],i[3],i[4],i[5],i[6],r-u)).x,y:l.y,alpha:l.alpha};u+=a,n=+i[5],s=+i[6]}i.shift()}return(l=o?u:d(n,s,i[0],i[1],i[2],i[3],i[4],i[5],1)).alpha?{x:l.x,y:l.y,alpha:l.alpha}:l}function p(t,r){for(var o=[],n=0,s=t.length;n<s-2*!r;n+=2){var i=[{x:+t[n-2],y:+t[n-1]},{x:+t[n],y:+t[n+1]},{x:+t[n+2],y:+t[n+3]},{x:+t[n+4],y:+t[n+5]}];r?n?s-4===n?i[3]={x:+t[0],y:+t[1]}:s-2===n&&(i[2]={x:+t[0],y:+t[1]},i[3]={x:+t[2],y:+t[3]}):i[0]={x:+t[s-2],y:+t[s-1]}:s-4===n?i[3]=i[2]:n||(i[0]={x:+t[n],y:+t[n+1]}),o.push(["C",(-i[0].x+6*i[1].x+i[2].x)/6,(-i[0].y+6*i[1].y+i[2].y)/6,(i[1].x+6*i[2].x-i[3].x)/6,(i[1].y+6*i[2].y-i[3].y)/6,i[2].x,i[2].y])}return o}function m(t,r,o,n,s,i){return[1/3*t+2/3*o,1/3*r+2/3*n,1/3*s+2/3*o,1/3*i+2/3*n,s,i]}function y(t,r,o,n,s,i,a,l,u){for(var c=(u=1<(u=null==u?1:u)?1:u<0?0:u)/2,d=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],h=0,f=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],p=0;p<12;p++){var m=c*d[p]+c,y=g(m,t,o,s,a),m=g(m,r,n,i,l);h+=f[p]*Math.sqrt(y*y+m*m)}return c*h}function g(t,r,o,n,s){return t*(t*(-3*r+9*o-9*n+3*s)+6*r-12*o+6*n)-3*r+3*o}s.default.Font=function(){var t,r;function o(t){if(!(this instanceof o))throw TypeError("Cannot call a class as a function");this.parent=t,this.cache={},this.font=void 0}return t=[{key:"textBounds",value:function(t){var r=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,o=2<arguments.length&&void 0!==arguments[2]?arguments[2]:0,n=3<arguments.length?arguments[3]:void 0,s=4<arguments.length?arguments[4]:void 0,a=s&&s.renderer&&s.renderer._pInst||this.parent,l=a._renderer.drawingContext,n=(l.textAlign||i.LEFT,l.textBaseline||i.BASELINE,n||a._renderer._textSize);if(!b){for(var u=[],c=[],d=[],h=(d[0]=[],[]),f=this._scale(n),p=a._renderer.textLeading(),m=0,y=(this.font.forEachGlyph(t,r,o,n,s,function(t,r,o,n){var s=t.getMetrics();0===t.index?d[m+=1]=[]:(d[m].push(r+s.xMin*f),d[m].push(r+s.xMax*f),h.push(o+m*p+-s.yMin*f),h.push(o+m*p+-s.yMax*f))}),0<d[m].length&&(u[m]=Math.min.apply(null,d[m]),c[m]=Math.max.apply(null,d[m])),0),g=0;g<=m;g++){u[g]=Math.min.apply(null,d[g]),c[g]=Math.max.apply(null,d[g]);var v=c[g]-u[g];y<v&&(y=v)}var l=Math.min.apply(null,u),b={x:l,y:o=Math.min.apply(null,h),h:Math.max.apply(null,h)-o,w:y,advance:l-r},n=this._handleAlignment(a._renderer,t,b.x,b.y,b.w+b.advance);b.x=n.x,b.y=n.y}return b}},{key:"textToPoints",value:function(t,r,o,n,s){var i,a=r,u=[],d=this.parent,h=t.split(/\r?\n|\r|\n/g);n=n||this.parent._renderer._textSize;
1for(var p,m,y=0;y<h.length;y++){var g=0;r=a;for(var v=(v=h[y]).replace(/\t/g," "),b=this._getGlyphs(v),_=0;_<b.length;_++){if(m=v,!(b[p=_].name&&"space"===b[p].name||m.length===b.length&&" "===m[p]))for(var j=function(t){for(var r,o=[],n=0;n<t.length;n++)"M"===t[n].type&&(r&&o.push(r),r=[]),r.push(function(t){var r=[t.type];return"M"===t.type||"L"===t.type?r.push(t.x,t.y):"C"===t.type?r.push(t.x1,t.y1,t.x2,t.y2,t.x,t.y):"Q"===t.type&&r.push(t.x1,t.y1,t.x,t.y),r}(t[n]));return o.push(r),o}(b[_].getPath(r,o,n).commands),x=0;x<j.length;x++)for(var w=function(t,r){for(var r=function(t,r){if("object"!==l(t))t=r;else for(var o in r)void 0===t[o]&&(t[o]=r[o]);return t}(r,{sampleFactor:.1,simplifyThreshold:0}),o=f(t,0,1),n=o/(o*r.sampleFactor),s=[],i=0;i<o;i+=n)s.push(f(t,i));return r.simplifyThreshold&&function(t){for(var r=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,o=t.length-1;3<t.length&&0<=o;--o)(function t(r,o,n,s){var i,a;return s?(void 0===t.tmpPoint1&&(t.tmpPoint1=[],t.tmpPoint2=[]),i=t.tmpPoint1,a=t.tmpPoint2,i.x=o.x-r.x,i.y=o.y-r.y,a.x=n.x-o.x,a.y=n.y-o.y,Math.acos((i.x*a.x+i.y*a.y)/((i=Math.sqrt(i.x*i.x+i.y*i.y))*(a=Math.sqrt(a.x*a.x+a.y*a.y))))<s):0==(o[0]-r[0])*(n[1]-r[1])-(n[0]-r[0])*(o[1]-r[1])})(c(t,o-1),c(t,o),c(t,o+1),r)&&t.splice(o%t.length,1)}(s,r.simplifyThreshold),s}(j[x],s),S=0;S<w.length;S++)w[S].x+=g,i=this._handleAlignment(d._renderer,v,w[S].x,w[S].y),w[S].x=i.x,w[S].y=i.y,u.push(w[S]);g+=b[_].advanceWidth*this._scale(n)}o+=this.parent._renderer._textLeading}return u}},{key:"_getGlyphs",value:function(t){return this.font.stringToGlyphs(t)}},{key:"_getPath",value:function(t,r,o,n){var s=(n&&n.renderer&&n.renderer._pInst||this.parent)._renderer,r=this._handleAlignment(s,t,r,o);return this.font.getPath(t,r.x,r.y,s._textSize,n)}},{key:"_getPathData",value:function(t,r,o,n){var s=3;return"string"==typeof t&&2<arguments.length?t=this._getPath(t,r,o,n):"object"===l(r)&&(n=r),n&&"number"==typeof n.decimals&&(s=n.decimals),t.toPathData(s)}},{key:"_getSVG",value:function(t,r,o,n){var s=3;return"string"==typeof t&&2<arguments.length?t=this._getPath(t,r,o,n):"object"===l(r)&&(n=r),n&&("number"==typeof n.decimals&&(s=n.decimals),"number"==typeof n.strokeWidth&&(t.strokeWidth=n.strokeWidth),void 0!==n.fill&&(t.fill=n.fill),void 0!==n.stroke&&(t.stroke=n.stroke)),t.toSVG(s)}},{key:"_renderPath",value:function(t,r,o,n){var s=n&&n.renderer||this.parent._renderer,a=s.drawingContext,t=("object"===l(t)&&t.commands?t:this._getPath(t,r,o,n)).commands,u=(s._clipping||a.beginPath(),!0),r=!1,o=void 0;try{for(var c,d=t[Symbol.iterator]();!(u=(c=d.next()).done);u=!0){var h=c.value;"M"===h.type?a.moveTo(h.x,h.y):"L"===h.type?a.lineTo(h.x,h.y):"C"===h.type?a.bezierCurveTo(h.x1,h.y1,h.x2,h.y2,h.x,h.y):"Q"===h.type?a.quadraticCurveTo(h.x1,h.y1,h.x,h.y):"Z"===h.type&&a.closePath()}}catch(t){r=!0,o=t}finally{try{u||null==d.return||d.return()}finally{if(r)throw o}}return s._doStroke&&s._strokeSet&&!s._clipping&&a.stroke(),s._doFill&&!s._clipping&&(s._fillSet||s._setFill(i._DEFAULT_TEXT_FILL),a.fill()),this}},{key:"_textWidth",value:function(t,r){return this.font.getAdvanceWidth(t,r)}},{key:"_textAscent",value:function(t){return this.font.ascender*this._scale(t)}},{key:"_textDescent",value:function(t){return-this.font.descender*this._scale(t)}},{key:"_scale",value:function(t){return 1/this.font.unitsPerEm*(t||this.parent._renderer._textSize)}},{key:"_handleAlignment",value:function(t,r,o,n,s){var a=t._textSize;switch(void 0===s&&(s=this._textWidth(r,a)),t._textAlign){case i.CENTER:o-=s/2;break;case i.RIGHT:o-=s}switch(t._textBaseline){case i.TOP:n+=this._textAscent(a);break;case i.CENTER:n+=this._textAscent(a)/2;break;case i.BOTTOM:n-=this._textDescent(a)}return{x:o,y:n}}}],u(o.prototype,t),r&&u(o,r),o}(),t=s.default,o.default=t},{"../core/constants":272,"../core/main":283,"core-js/modules/es.array.concat":153,"core-js/modules/es.array.fill":156,"core-js/modules/es.array.iterator":165,"core-js/modules/es.array.join":166,"core-js/modules/es.array.slice":169,"core-js/modules/es.array.splice":171,"core-js/modules/es.function.name":174,"core-js/modules/es.number.to-fixed":182,"core-js/modules/es.object.get-own-property-descriptor":186,"core-js/modules/es.object.to-string":190,"core-js/modules/es.regexp.exec":195,"core-js/modules/es.string.iterator":200,"core-js/modules/es.string.replace":204,"core-js/modules/es.string.split":206,"core-js/modules/es.symbol":212,"core-js/modules/es.symbol.description":210,"core-js/modules/es.symbol.iterator":211,"core-js/modules/es.weak-map":244,"core-js/modules/web.dom-collections.iterator":246}],322:[function(t,r,o){"use strict";
1t("core-js/modules/es.array.concat"),t("core-js/modules/es.array.slice"),t("core-js/modules/es.array.splice"),t("core-js/modules/es.array-buffer.constructor"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.array.concat"),t("core-js/modules/es.array.slice"),t("core-js/modules/es.array.splice"),t("core-js/modules/es.array-buffer.constructor"),t("core-js/modules/es.object.to-string"),Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,(t=(t=t("../core/main"))&&t.__esModule?t:{default:t}).default.prototype.append=function(t,r){return t.push(r),t},t.default.prototype.arrayCopy=function(t,r,o,n,s){var i,a;t=void 0!==s?(a=Math.min(s,t.length),i=n,t.slice(r,a+r)):(a=void 0!==o?Math.min(a=o,t.length):t.length,o=r,t.slice(i=0,a)),Array.prototype.splice.apply(o,[i,a].concat(t))},t.default.prototype.concat=function(t,r){return t.concat(r)},t.default.prototype.reverse=function(t){return t.reverse()},t.default.prototype.shorten=function(t){return t.pop(),t},t.default.prototype.shuffle=function(t,r){for(var o,n,s=ArrayBuffer&&ArrayBuffer.isView&&ArrayBuffer.isView(t),i=(t=r||s?t:t.slice()).length;1<i;)o=this.random(0,1)*i|0,n=t[--i],t[i]=t[o],t[o]=n;return t},t.default.prototype.sort=function(t,r){var o=r?t.slice(0,Math.min(r,t.length)):t,r=r?t.slice(Math.min(r,t.length)):[];return(o="string"==typeof o[0]?o.sort():o.sort(function(t,r){return t-r})).concat(r)},t.default.prototype.splice=function(t,r,o){return Array.prototype.splice.apply(t,[o,0].concat(r)),t},t.default.prototype.subset=function(t,r,o){return void 0!==o?t.slice(r,r+o):t.slice(r,t.length)},t=t.default,o.default=t},{"../core/main":283,"core-js/modules/es.array-buffer.constructor":152,"core-js/modules/es.array.concat":153,"core-js/modules/es.array.slice":169,"core-js/modules/es.array.splice":171,"core-js/modules/es.object.to-string":190}],323:[function(t,r,o){"use strict";t("core-js/modules/es.array.map"),t("core-js/modules/es.number.constructor"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.regexp.to-string"),t("core-js/modules/es.string.repeat"),t("core-js/modules/es.array.map"),t("core-js/modules/es.number.constructor"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.regexp.to-string"),t("core-js/modules/es.string.repeat"),Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;var n=(t=t("../core/main"))&&t.__esModule?t:{default:t};n.default.prototype.float=function(t){return t instanceof Array?t.map(parseFloat):parseFloat(t)},n.default.prototype.int=function(t){var r=1<arguments.length&&void 0!==arguments[1]?arguments[1]:10;return t===1/0||"Infinity"===t?1/0:t===-1/0||"-Infinity"===t?-1/0:"string"==typeof t?parseInt(t,r):"number"==typeof t?0|t:"boolean"==typeof t?t?1:0:t instanceof Array?t.map(function(t){return n.default.prototype.int(t,r)}):void 0},n.default.prototype.str=function(t){return t instanceof Array?t.map(n.default.prototype.str):String(t)},n.default.prototype.boolean=function(t){return"number"==typeof t?0!==t:"string"==typeof t?"true"===t.toLowerCase():"boolean"==typeof t?t:t instanceof Array?t.map(n.default.prototype.boolean):void 0},n.default.prototype.byte=function(t){return"number"==typeof(t=n.default.prototype.int(t,10))?(t+128)%256-128:t instanceof Array?t.map(n.default.prototype.byte):void 0},n.default.prototype.char=function(t){return"number"!=typeof t||isNaN(t)?t instanceof Array?t.map(n.default.prototype.char):"string"==typeof t?n.default.prototype.char(parseInt(t,10)):void 0:String.fromCharCode(t)},n.default.prototype.unchar=function(t){return"string"==typeof t&&1===t.length?t.charCodeAt(0):t instanceof Array?t.map(n.default.prototype.unchar):void 0},n.default.prototype.hex=function(t,r){if(r=null==r?8:r,t instanceof Array)return t.map(function(t){return n.default.prototype.hex(t,r)});if(t===1/0||t===-1/0)return(t===1/0?"F":"0").repeat(r);if("number"==typeof t){t<0&&(t=4294967295+t+1);for(var o=Number(t).toString(16).toUpperCase();o.length<r;)o="0".concat(o);return o.length>=r?o.substring(o.length-r,o.length):o}},n.default.prototype.unhex=function(t){return t instanceof Array?t.map(n.default.prototype.unhex):parseInt("0x".concat(t),16)},t=n.default,o.default=t},{"../core/main":283,"core-js/modules/es.array.map":168,"core-js/modules/es.number.constructor":1
179,"core-js/modules/es.object.to-string":190,"core-js/modules/es.regexp.to-string":196,"core-js/modules/es.string.repeat":203}],324:[function(t,r,o){"use strict";t("core-js/modules/es.symbol"),t("core-js/modules/es.symbol.description"),t("core-js/modules/es.symbol.iterator"),t("core-js/modules/es.array.filter"),t("core-js/modules/es.array.index-of"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.array.join"),t("core-js/modules/es.array.map"),t("core-js/modules/es.array.slice"),t("core-js/modules/es.number.to-fixed"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.regexp.constructor"),t("core-js/modules/es.regexp.exec"),t("core-js/modules/es.regexp.to-string"),t("core-js/modules/es.string.iterator"),t("core-js/modules/es.string.match"),t("core-js/modules/es.string.pad-start"),t("core-js/modules/es.string.replace"),t("core-js/modules/es.string.split"),t("core-js/modules/es.string.trim"),t("core-js/modules/web.dom-collections.iterator"),t("core-js/modules/es.array.filter"),t("core-js/modules/es.array.index-of"),t("core-js/modules/es.array.join"),t("core-js/modules/es.array.map"),t("core-js/modules/es.array.slice"),t("core-js/modules/es.number.to-fixed"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.regexp.constructor"),t("core-js/modules/es.regexp.exec"),t("core-js/modules/es.regexp.to-string"),t("core-js/modules/es.string.match"),t("core-js/modules/es.string.pad-start"),t("core-js/modules/es.string.replace"),t("core-js/modules/es.string.split"),t("core-js/modules/es.string.trim"),Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;var n=(c=t("../core/main"))&&c.__esModule?c:{default:c};function s(t,r){return function(t){if(Array.isArray(t))return t}(t)||function(t,r){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t)){var o=[],n=!0,s=!1,i=void 0;try{for(var a,l=t[Symbol.iterator]();!(n=(a=l.next()).done)&&(o.push(a.value),!r||o.length!==r);n=!0);}catch(t){s=!0,i=t}finally{try{n||null==l.return||l.return()}finally{if(s)throw i}}return o}}(t,r)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance")}()}function i(t,r,o){var n,i=t<0,a=s((t=Math.abs(t)).toString().split("."),2),l=a[0],a=a[1];return void 0===o?(l=l.padStart(r,"0"),n=a?l+"."+a:l,i?"-"+n:n):(l=(n=s(t.toFixed(o).toString().split("."),2))[0],a=n[1],l=l.padStart(r,"0"),t=void 0===a?l:l+"."+a,i?"-"+t:t)}function a(t,r){var o=(t=t.toString()).indexOf("."),n=-1!==o?t.substring(o):"",t=(t=-1!==o?t.substring(0,o):t).toString().replace(/\B(?=(\d{3})+(?!\d))/g,",");if(0===r)n="";else if(void 0!==r){if(r>n.length)for(var s=r-(n+=-1===o?".":"").length+1,i=0;i<s;i++)n+="0";else n=n.substring(0,r+1)}return t+n}function l(t){return 0<parseFloat(t)?"+".concat(t.toString()):t.toString()}function u(t){return 0<=parseFloat(t)?" ".concat(t.toString()):t.toString()}t("../core/friendly_errors/validate_params"),t("../core/friendly_errors/file_errors"),t("../core/friendly_errors/fes_core"),n.default.prototype.join=function(t,r){return n.default._validateParameters("join",arguments),t.join(r)},n.default.prototype.match=function(t,r){return n.default._validateParameters("match",arguments),t.match(r)},n.default.prototype.matchAll=function(t,r){n.default._validateParameters("matchAll",arguments);for(var o=RegExp(r,"g"),s=o.exec(t),i=[];null!==s;)i.push(s),s=o.exec(t);return i},n.default.prototype.nf=function(t,r,o){return n.default._validateParameters("nf",arguments),t instanceof Array?t.map(function(t){return i(t,r,o)}):"[object Arguments]"===Object.prototype.toString.call(t)?3===t.length?this.nf(t[0],t[1],t[2]):2===t.length?this.nf(t[0],t[1]):this.nf(t[0]):i(t,r,o)},n.default.prototype.nfc=function(t,r){return n.default._validateParameters("nfc",arguments),t instanceof Array?t.map(function(t){return a(t,r)}):a(t,r)},n.default.prototype.nfp=function(){for(var t=arguments.length,r=Array(t),o=0;o<t;o++)r[o]=arguments[o];n.default._validateParameters("nfp",r);var s=n.default.prototype.nf.apply(this,r);return s instanceof Array?s.map(l):l(s)},n.default.prototype.nfs=function(){for(var t=arguments.length,r=Array(t),o=0;o<t;o++)r[o]=arguments[o];n.default._validateParameters("nfs",r);var s=n.default.prototype.nf.apply(this,r);return s instanceof Array?s.map(u):u(s)},n.default.prototype.split=function(t,r){return n.default._validateParameters("split",arguments),t.split(r)},n.default.prototype.splitTokens=function(t,r){var o,s;return n.default._validateParameters("splitTokens",arguments),s=void 0!==r?(s=/\]/g.exec(r),(o=/\[/g.exec(r))&&s?(r=r.slice(0,s.index)+r.slice(s.index+1),o=/\[/g.exec(r),r=r.slice(0,o.index)+r.slice(o.index+1),RegExp("[\\[".concat(r,"\\]]"),"g")):s?(r=r.slice(0,s.index)+r.slice(s.index+1),RegExp("[".concat(r,"\\]]"),"g")):o?(r=r.slice(0,o.index)+r.slice(o.index+1),RegExp("[".concat(r,"\\[]"),"g")):RegExp("[".concat(r,"]"),"g")):/\s/g,t.split(s).filter(function(t){return t})},n.default.prototype.trim=function(t){return n.default._validateParameters("trim",arguments),t instanceof Array?t.map(this.trim):t.trim()};var c=n.default;o.default=c},{"../core/friendly_errors/fes_core":274,"../core/friendly_errors/file_errors":275,"../core/friendly_errors/validate_params":278,"../core/main":283,"core-js/modules/es.array.filter":157,"core-js/modules/es.array.index-of":164,"core-js/modules/es.array.iterator":165,"core-js/modules/es.array.join":166,"core-js/modules/es.array.map":168,"core-js/modules/es.array.slice":169,"core-js/modules/es.number.to-fixed":182,"core-js/modules/es.object.to-string":190,"core-js/modules/es.regexp.constructor":194,"core-js/modules/es.regexp.exec":195,"core-js/modules/es.regexp.to-string":196,"core-js/modules/es.string.iterator":200,"core-js/modules/es.string.match":201,"core-js/modules/es.string.pad-start":202,"core-js/modules/es.string.replace":204,"core-js/modules/es.string.split":206,"core-js/modules/es.string.trim":209,"core-js/modules/es.symbol":212,"core-js/modules/es.symbol.description":210,"core-js/modules/es.symbol.iterator":211,"core-js/modules/web.dom-collections.iterator":246}],325:[function(t,r,o){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,(t=(t=t("../core/main"))&&t.__esModule?t:{default:t}).default.prototype.day=function(){return(new Date).getDate()},t.default.prototype.hour=function(){return(new Date).getHours()},t.default.prototype.minute=function(){return(new Date).getMinutes()},t.default.prototype.millis=function(){return -1===this._millisStart?0:window.performance.now()-this._millisStart},t.default.prototype.month=function(){return(new Date).getMonth()+1},t.default.prototype.second=function(){return(new Date).getSeconds()},t.default.prototype.year=function(){return(new Date).getFullYear()},t=t.default,o.default=t},{"../core/main":283}],326:[function(t,r,o){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function s(t){return(s="function"==typeof Symbol&&"symbol"===n(Symbol.iterator)?function(t){return n(t)}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":n(t)})(t)}t("core-js/modules/es.symbol"),t("core-js/modules/es.symbol.description"),t("core-js/modules/es.symbol.iterator"),t("core-js/modules/es.array.
1concat"),t("core-js/modules/es.array.for-each"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.array.slice"),t("core-js/modules/es.math.hypot"),t("core-js/modules/es.math.sign"),t("core-js/modules/es.number.to-fixed"),t("core-js/modules/es.object.get-own-property-descriptor"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.string.iterator"),t("core-js/modules/es.weak-map"),t("core-js/modules/web.dom-collections.iterator"),t("core-js/modules/es.symbol"),t("core-js/modules/es.symbol.description"),t("core-js/modules/es.symbol.iterator"),t("core-js/modules/es.array.concat"),t("core-js/modules/es.array.for-each"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.array.slice"),t("core-js/modules/es.math.hypot"),t("core-js/modules/es.math.sign"),t("core-js/modules/es.number.to-fixed"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.string.iterator"),t("core-js/modules/web.dom-collections.iterator"),Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;var i=(c=t("../core/main"))&&c.__esModule?c:{default:c},a=(t("./p5.Geometry"),function(t){if(t&&t.__esModule)return t;if(null===t||"object"!==s(t)&&"function"!=typeof t)return{default:t};var r,o=l();if(o&&o.has(t))return o.get(t);var n,i={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(n in t)Object.prototype.hasOwnProperty.call(t,n)&&((r=a?Object.getOwnPropertyDescriptor(t,n):null)&&(r.get||r.set)?Object.defineProperty(i,n,r):i[n]=t[n]);return i.default=t,o&&o.set(t,i),i}(t("../core/constants")));function l(){var t;return"function"!=typeof WeakMap?null:(t=new WeakMap,l=function(){return t},t)}function u(t,r,o,n,s,a,l){t=t<=0?1:t,r=r<0?0:r,o=o<=0?t:o,n=n<3?3:n;for(var u,c,d=(a=void 0===a||a)?-2:0,h=(s=s<1?1:s)+((l=void 0===l?0!==r:l)?2:0),f=Math.atan2(t-r,o),p=Math.sin(f),m=Math.cos(f),y=d;y<=h;++y){var g=y/s,v=o*g,b=y<0?(g=v=0,t):s<y?(v=o,g=1,r):t+(r-t)*g;for(-2!==y&&y!==s+2||(b=0),v-=o/2,u=0;u<n;++u){var _=u/(n-1),j=2*Math.PI*_,x=Math.sin(j),j=Math.cos(j),w=(this.vertices.push(new i.default.Vector(x*b,v,j*b)),y<0?new i.default.Vector(0,-1,0):s<y&&r?new i.default.Vector(0,1,0):new i.default.Vector(x*m,p,j*m));this.vertexNormals.push(w),this.uvs.push(_,g)}}var S=0;if(a){for(c=0;c<n;++c)this.faces.push([S+c,S+n+(c+1)%n,S+n+c]);S+=2*n}for(y=0;y<s;++y){for(u=0;u<n;++u){var T=(u+1)%n;this.faces.push([S+u,S+T,S+n+T]),this.faces.push([S+u,S+n+T,S+n+u])}S+=n}if(l)for(S+=n,u=0;u<n;++u)this.faces.push([S+u,S+(u+1)%n,S+n])}i.default.prototype.beginGeometry=function(){return this._renderer.beginGeometry()},i.default.prototype.endGeometry=function(){return this._renderer.endGeometry()},i.default.prototype.buildGeometry=function(t){return this._renderer.buildGeometry(t)},i.default.prototype.freeGeometry=function(t){this._renderer._freeBuffers(t.gid)},i.default.prototype.plane=function(){var t,r=0<arguments.length&&void 0!==arguments[0]?arguments[0]:50,o=1<arguments.length&&void 0!==arguments[1]?arguments[1]:r,n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:1,s=3<arguments.length&&void 0!==arguments[3]?arguments[3]:1,a=(this._assert3d("plane"),i.default._validateParameters("plane",arguments),"plane|".concat(n,"|").concat(s));return this._renderer.geometryInHash(a)||((t=new i.default.Geometry(n,s,function(){for(var t,r,o=0;o<=this.detailY;o++)for(var n=o/this.detailY,s=0;s<=this.detailX;s++)t=s/this.detailX,r=new i.default.Vector(t-.5,n-.5,0),this.vertices.push(r),this.uvs.push(t,n)})).computeFaces().computeNormals(),n<=1&&s<=1?t._makeTriangleEdges()._edgesToVertices():this._renderer._doStroke&&console.log("Cannot draw stroke on plane objects with more than 1 detailX or 1 detailY"),this._renderer.createBuffers(a,t)),this._renderer.drawBuffersScaled(a,r,o,1),this},i.default.prototype.box=function(t,r,o,n,s){this._assert3d("box"),i.default._validateParameters("box",arguments),void 0===t&&(t=50),void 0===r&&(r=t),void 0===o&&(o=r);var a,l=this._renderer.attributes&&this._renderer.attributes.perPixelLighting,l=(void 0===s&&(s=l?1:4),"box|".concat(n=void 0===n?l?1:4:n,"|").concat(s));return this._renderer.geometryInHash(l)||((a=new i.default.Geometry(n,s,function(){var t=this;this.edges=[[0,1],[1,3],[3,2],[6,7],[8,9],[9,11],[14,15],[16,17],[17,19],[18,19],[20,21],[22,23]],[[0,4,2,6],[1,3,5,7],[0,1,4,5],[2,6,3,7],[0,2,1,3],[4,5,6,7]].forEac
1h(function(r,o){for(var o=4*o,n=0;n<4;n++){var s=r[n],s=new i.default.Vector((2*(1&s)-1)/2,((2&s)-1)/2,((4&s)/2-1)/2);t.vertices.push(s),t.uvs.push(1&n,(2&n)/2)}t.faces.push([o,1+o,2+o]),t.faces.push([2+o,1+o,3+o])})})).computeNormals(),n<=4&&s<=4?a._edgesToVertices():this._renderer._doStroke&&console.log("Cannot draw stroke on box objects with more than 4 detailX or 4 detailY"),this._renderer.createBuffers(l,a)),this._renderer.drawBuffersScaled(l,t,r,o),this},i.default.prototype.sphere=function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:50,r=1<arguments.length&&void 0!==arguments[1]?arguments[1]:24,o=2<arguments.length&&void 0!==arguments[2]?arguments[2]:16;return this._assert3d("sphere"),i.default._validateParameters("sphere",arguments),this.ellipsoid(t,t,t,r,o),this},i.default.prototype.cylinder=function(){var t,r=0<arguments.length&&void 0!==arguments[0]?arguments[0]:50,o=1<arguments.length&&void 0!==arguments[1]?arguments[1]:r,n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:24,s=3<arguments.length&&void 0!==arguments[3]?arguments[3]:1,a=!(4<arguments.length&&void 0!==arguments[4])||arguments[4],l=!(5<arguments.length&&void 0!==arguments[5])||arguments[5],c=(this._assert3d("cylinder"),i.default._validateParameters("cylinder",arguments),"cylinder|".concat(n,"|").concat(s,"|").concat(a,"|").concat(l));return this._renderer.geometryInHash(c)||(t=new i.default.Geometry(n,s),u.call(t,1,1,1,n,s,a,l),n<=24&&s<=16?t._makeTriangleEdges()._edgesToVertices():this._renderer._doStroke&&console.log("Cannot draw stroke on cylinder objects with more than 24 detailX or 16 detailY"),this._renderer.createBuffers(c,t)),this._renderer.drawBuffersScaled(c,r,o,r),this},i.default.prototype.cone=function(){var t,r=0<arguments.length&&void 0!==arguments[0]?arguments[0]:50,o=1<arguments.length&&void 0!==arguments[1]?arguments[1]:r,n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:24,s=3<arguments.length&&void 0!==arguments[3]?arguments[3]:1,a=!(4<arguments.length&&void 0!==arguments[4])||arguments[4],l=(this._assert3d("cone"),i.default._validateParameters("cone",arguments),"cone|".concat(n,"|").concat(s,"|").concat(a));return this._renderer.geometryInHash(l)||(t=new i.default.Geometry(n,s),u.call(t,1,0,1,n,s,a,!1),n<=24&&s<=16?t._makeTriangleEdges()._edgesToVertices():this._renderer._doStroke&&console.log("Cannot draw stroke on cone objects with more than 24 detailX or 16 detailY"),this._renderer.createBuffers(l,t)),this._renderer.drawBuffersScaled(l,r,o,r),this},i.default.prototype.ellipsoid=function(){var t,r=0<arguments.length&&void 0!==arguments[0]?arguments[0]:50,o=1<arguments.length&&void 0!==arguments[1]?arguments[1]:r,n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:r,s=3<arguments.length&&void 0!==arguments[3]?arguments[3]:24,a=4<arguments.length&&void 0!==arguments[4]?arguments[4]:16,l=(this._assert3d("ellipsoid"),i.default._validateParameters("ellipsoid",arguments),"ellipsoid|".concat(s,"|").concat(a));return this._renderer.geometryInHash(l)||((t=new i.default.Geometry(s,a,function(){for(var t=0;t<=this.detailY;t++)for(var r=t/this.detailY,o=Math.PI*r-Math.PI/2,n=Math.cos(o),s=Math.sin(o),a=0;a<=this.detailX;a++){var l=a/this.detailX,u=2*Math.PI*l,c=Math.cos(u),u=Math.sin(u),u=new i.default.Vector(n*u,s,n*c);this.vertices.push(u),this.vertexNormals.push(u),this.uvs.push(l,r)}})).computeFaces(),s<=24&&a<=24?t._makeTriangleEdges()._edgesToVertices():this._renderer._doStroke&&console.log("Cannot draw stroke on ellipsoids with more than 24 detailX or 24 detailY"),this._renderer.createBuffers(l,t)),this._renderer.drawBuffersScaled(l,r,o,n),this},i.default.prototype.torus=function(t,r,o,n){if(this._assert3d("torus"),i.default._validateParameters("torus",arguments),void 0===t)t=50;else if(!t)return;if(void 0===r)r=10;else if(!r)return;void 0===o&&(o=24),void 0===n&&(n=16);var s,a=(r/t).toPrecision(4),r="torus|".concat(a,"|").concat(o,"|").concat(n);return this._renderer.geometryInHash(r)||((s=new i.default.Geometry(o,n,function(){for(var t=0;t<=this.detailY;t++)for(var r=t/this.detailY,o=2*Math.PI*r,n=Math.cos(o),s=Math.sin(o),l=1+a*n,u=0;u<=this.detailX;u++){var c=u/this.detailX,d=2*Math.PI*c,h=Math.cos(d),d=Math.sin(d),f=new i.default.Vector(l*h,l*d,a*s),h=new i.default.Vector(n*h,n*d,s);this.vertices.push(f),this.vertexNormals.push(h),this.uvs.push(c,r)}})).computeFaces(),o<=24&&n<=16?s._makeTriangleEdges()._edgesToVertices():this._renderer._doStroke&&console.log("Cannot draw strokes on torus object with more than 24 detailX or 16 detailY"),this._renderer.createBuffers(r,s)),this._renderer.drawBuffersScaled(r,t,t,t),this},i.default.RendererGL.prototype.point=function(t,r){var o=[];return o.push(new i.default.Vector(t,r,2<arguments.length&&void 0!==arguments[2]?arguments[2]:0)),this._drawPoints(o,this.immediateMode.buffers.point),this},i.default.RendererGL.prototype.triangle=function(t){var r=t[0],o=t[1],n=t[2],s=t[3],a=t[4],t=t[5],l=(this.geometryInHash("tri")||((l=new i.default.Geometry(1,1,function(){var t=[];t.push(new i.default.Vector(0,0,0)),t.push(new i.default.Vector(1,0,0)),t.push(new i.default.Vector(0,1,0)),this.edges=[[0,1],[1,2],[2,0]],this.vertices=t,this.faces=[[0,1,2]],this.uvs=[0,0,1,0,1,1]}))._edgesToVertices(),l.computeNormals(),this.createBuffers("tri",l)),this.uModelMatrix.copy());try{var u=Math.sign(r*s-n*o+n*t-a*s+a*o-r*t),c=new i.default.Matrix([n-r,s-o,0,0,a-r,t-o,0,0,0,0,u,0,r,o,0,1]).mult(this.uModelMatrix);this.uModelMatrix=c,this.drawBuffers("tri")}finally{this.uModelMatrix=l}return this},i.default.RendererGL.prototype.ellipse=function(t){this.arc(t[0],t[1],t[2],t[3],0,a.TWO_PI,a.OPEN,t[4])},i.default.RendererGL.prototype.arc=function(){var t,r=arguments.length<=0?void 0:arguments[0],o=arguments.length<=1?void 0:arguments[1],n=arguments.length<=2?void 0:arguments[2],s=arguments.length<=3?void 0:arguments[3],l=arguments.length<=4?void 0:arguments[4],u=arguments.length<=5?void 0:arguments[5],c=arguments.length<=6?void 0:arguments[6],d=(arguments.length<=7?void 0:arguments[7])||25,h=(Math.abs(u-l)>=a.TWO_PI?"".concat(f="ellipse","|"):"".concat(f="arc","|").concat(l,"|").concat(u,"|").concat(c,"|")).concat(d,"|"),f=(this.geometryInHash(h)||((t=new i.default.Geometry(d,1,function(){if(l.toFixed(10)!==u.toFixed(10)){c!==a.PIE&&void 0!==c||(this.vertices.push(new i.default.Vector(.5,.5,0)),this.uvs.push([.5,.5]));for(var t=0;t<=d;t++){var r=t/d*(u-l)+l,o=.5+Math.cos(r)/2,r=.5+Math.sin(r)/2;this.vertices.push(new i.default.Vector(o,r,0)),this.uvs.push([o,r]),t<d-1&&(this.faces.push([0,t+1,t+2]),this.edges.push([t+1,t+2]))}switch(c){case a.PIE:this.faces.push([0,this.vertices.length-2,this.vertices.length-1]),this.edges.push([0,1]),this.edges.push([this.vertices.length-2,this.vertices.length-1]),this.edges.push([0,this.vertices.length-1]);break;case a.CHORD:this.edges.push([0,1]),this.edges.push([0,this.vertices.length-1]);break;case a.OPEN:this.edges.push([0,1]);break;default:this.faces.push([0,this.vertices.length-2,this.vertices.length-1]),this.edges.push([this.vertices.length-2,this.vertices.length-1])}}})).computeNormals(),d<=50?t._edgesToVertices(t):this._doStroke&&console.log("Cannot apply a stroke to an ".concat(f," with more than 50 detail")),this.createBuffers(h,t)),this.uModelMatrix.copy());try{this.uModelMatrix.translate([r,o,0]),this.uModelMatrix.scale(n,s,1),this.drawBuffers(h)}finally{this.uModelMatrix=f}return this},i.default.RendererGL.prototype.rect=function(t){var r=t[0],o=t[1],n=t[2],s=t[3];if(void 0===t[4]){var l=this._pInst._glAttributes.perPixelLighting,u=t[4]||(l?1:24),c=t[5]||(l?1:16),l="rect|".concat(u,"|").concat(c),d=(this.geometryInHash(l)||((d=new i.default.Geometry(u,c,function(){for(var t=0;t<=this.detailY;t++)for(var r=t/this.detailY,o=0;o<=this.detailX;o++){var n=o/this.detailX,s=new i.default.Vector(n,r,0);this.vertices.push(s),this.uvs.push(n,r)}0<u&&0<c&&(this.edges=[[0,u],[u,(u+1)*(c+1)-1],[(u+1)*(c+1)-1,(u+1)*c],[(u+1)*c,0]])})).computeFaces().computeNormals()._edgesToVertices(),this.createBuffers(l,d)),this.uModelMatrix.copy());try{this.uModelMatrix.translate([r,o,0]),this.uModelMatrix.scale(n,s,1),this.drawBuffers(l)}finally{this.uModelMatrix=d}}else{var l=t[4],d=void 0===t[5]?l:t[5],h=void 0===t[6]?d:t[6],t=void 0===t[7]?h:t[7],f=n,p=s,m=((f+=r)<r&&(m=r,r=f,f=m),
1(p+=o)<o&&(m=o,o=p,p=m),Math.min((f-r)/2,(p-o)/2)),y=(m<l&&(l=m),m<d&&(d=m),m<h&&(h=m),m<t&&(t=m),r),g=o,m=f,r=p,v=(this.beginShape(),0!==d?(this.vertex(m-d,g),this.quadraticVertex(m,g,m,g+d)):this.vertex(m,g),0!==h?(this.vertex(m,r-h),this.quadraticVertex(m,r,m-h,r)):this.vertex(m,r),0!==t?(this.vertex(y+t,r),this.quadraticVertex(y,r,y,r-t)):this.vertex(y,r),0!==l?(this.vertex(y,g+l),this.quadraticVertex(y,g,y+l,g)):this.vertex(y,g),this.immediateMode.geometry.uvs.length=0,!0),o=!1,f=void 0;try{for(var b,_=this.immediateMode.geometry.vertices[Symbol.iterator]();!(v=(b=_.next()).done);v=!0){var j=b.value,x=(j.x-y)/n,w=(j.y-g)/s;this.immediateMode.geometry.uvs.push(x,w)}}catch(t){o=!0,f=t}finally{try{v||null==_.return||_.return()}finally{if(o)throw f}}this.endShape(a.CLOSE)}return this},i.default.RendererGL.prototype.quad=function(t,r,o,n,s,a,l,u,c,d,h,f){var p=12<arguments.length&&void 0!==arguments[12]?arguments[12]:2,m=13<arguments.length&&void 0!==arguments[13]?arguments[13]:2,y="quad|".concat(t,"|").concat(r,"|").concat(o,"|").concat(n,"|").concat(s,"|").concat(a,"|").concat(l,"|").concat(u,"|").concat(c,"|").concat(d,"|").concat(h,"|").concat(f,"|").concat(p,"|").concat(m);if(!this.geometryInHash(y)){var g=new i.default.Geometry(p,m,function(){for(var p=1/(this.detailX-1),m=1/(this.detailY-1),y=0;y<this.detailY;y++)for(var g=0;g<this.detailX;g++){var v=g*p,b=y*m;this.vertices.push(new i.default.Vector((1-v)*((1-b)*t+b*d)+v*((1-b)*n+b*l),(1-v)*((1-b)*r+b*h)+v*((1-b)*s+b*u),(1-v)*((1-b)*o+b*f)+v*((1-b)*a+b*c))),this.uvs.push([v,b])}});g.faces=[];for(var v=0;v<m-1;v++)for(var b=0;b<p-1;b++){var _=b+v*p,j=b+1+(v+1)*p,x=b+(v+1)*p;g.faces.push([_,b+1+v*p,j]),g.faces.push([_,j,x])}g.computeNormals();for(var w=[g.edges.length=0,2,3,1],S=0;S<w.length;S++)g.edges.push([w[S],w[(S+1)%w.length]]);g._edgesToVertices(),this.createBuffers(y,g)}return this.drawBuffers(y),this},i.default.RendererGL.prototype.bezier=function(t,r,o,n,s,i,a,l,u,c,d,h){8==arguments.length&&(d=l,c=a,l=i,a=s,s=n,n=o,o=i=u=h=0);var f=this._pInst._bezierDetail||20;this.beginShape();for(var p=0;p<=f;p++){var m=Math.pow(1-p/f,3),y=p/f*3*Math.pow(1-p/f,2),g=3*Math.pow(p/f,2)*(1-p/f),v=Math.pow(p/f,3);this.vertex(t*m+n*y+a*g+c*v,r*m+s*y+l*g+d*v,o*m+i*y+u*g+h*v)}return this.endShape(),this},i.default.RendererGL.prototype.curve=function(t,r,o,n,s,i,a,l,u,c,d,h){8==arguments.length&&(c=a,d=l,a=s,l=n,s=n=o,o=i=u=h=0);var f=this._pInst._curveDetail;this.beginShape();for(var p=0;p<=f;p++){var m=.5*Math.pow(p/f,3),y=.5*Math.pow(p/f,2),g=p/f*.5;this.vertex(m*(3*n-t-3*a+c)+y*(2*t-5*n+4*a-c)+g*(-t+a)+2*n*.5,m*(3*s-r-3*l+d)+y*(2*r-5*s+4*l-d)+g*(-r+l)+2*s*.5,m*(3*i-o-3*u+h)+y*(2*o-5*i+4*u-h)+g*(-o+u)+2*i*.5)}return this.endShape(),this},i.default.RendererGL.prototype.line=function(){return 6==arguments.length?(this.beginShape(a.LINES),this.vertex(arguments.length<=0?void 0:arguments[0],arguments.length<=1?void 0:arguments[1],arguments.length<=2?void 0:arguments[2]),this.vertex(arguments.length<=3?void 0:arguments[3],arguments.length<=4?void 0:arguments[4],arguments.length<=5?void 0:arguments[5]),this.endShape()):4==arguments.length&&(this.beginShape(a.LINES),this.vertex(arguments.length<=0?void 0:arguments[0],arguments.length<=1?void 0:arguments[1],0),this.vertex(arguments.length<=2?void 0:arguments[2],arguments.length<=3?void 0:arguments[3],0),this.endShape()),this},i.default.RendererGL.prototype.bezierVertex=function(){if(0===this.immediateMode._bezierVertex.length)throw Error("vertex() must be used once before calling bezierVertex()");var t,r,o,n,s,i,a=[],l=[],u=arguments.length;if(0===this._lookUpTableBezier.length||this._lutBezierDetail!==this._pInst._curveDetail){this._lookUpTableBezier=[],this._lutBezierDetail=this._pInst._curveDetail;for(var c=1/this._lutBezierDetail,d=c,h=1,f=0;d<1;){if(i=parseFloat(d.toFixed(6)),this._lookUpTableBezier[f]=this._bezierCoefficients(i),h.toFixed(6)===c.toFixed(6)){i=parseFloat(h.toFixed(6))+parseFloat(d.toFixed(6)),++f,this._lookUpTableBezier[f]=this._bezierCoefficients(i);break}d+=c,h-=c,++f}}for(var p=this._lookUpTableBezier.length,m=[],y=0;y<4;y++)m.push([]);m[0]=this.immediateMode.geometry.vertexColors.slice(-4),m[3]=this.curFillColor.slice();var g=[];for(y=0;y<4;y++)g.push([]);if(g[0]=this.immediateMode.geometry.vertexStrokeColors.slice(-4),g[3]=this.curStrokeColor.slice(),6===u){this.isBezier=!0;var a=[this.immediateMode._bezierVertex[0],arguments.length<=0?void 0:arguments[0],arguments.length<=2?void 0:arguments[2],arguments.length<=4?void 0:arguments[4]],l=[this.immediateMode._bezierVertex[1],arguments.length<=1?void 0:arguments[1],arguments.length<=3?void 0:arguments[3],arguments.length<=5?void 0:arguments[5]],v=Math.hypot(a[0]-a[1],l[0]-l[1]),b=Math.hypot(a[1]-a[2],l[1]-l[2]),_=Math.hypot(a[2]-a[3],l[2]-l[3]),b=v+b+_;for(v/=b,_/=b,s=0;s<4;s++)m[1].push(m[0][s]*(1-v)+m[3][s]*v),m[2].push(m[0][s]*_+m[3][s]*(1-_)),g[1].push(g[0][s]*(1-v)+g[3][s]*v),g[2].push(g[0][s]*_+g[3][s]*(1-_));for(n=0;n<p;n++){for(this.curFillColor=[0,0,0,0],this.curStrokeColor=[0,0,0,0],y=t=r=0;y<4;y++){for(s=0;s<4;s++)this.curFillColor[s]+=this._lookUpTableBezier[n][y]*m[y][s],this.curStrokeColor[s]+=this._lookUpTableBezier[n][y]*g[y][s];t+=a[y]*this._lookUpTableBezier[n][y],r+=l[y]*this._lookUpTableBezier[n][y]}this.vertex(t,r)}this.curFillColor=m[3],this.curStrokeColor=g[3],this.immediateMode._bezierVertex[0]=arguments.length<=4?void 0:arguments[4],this.immediateMode._bezierVertex[1]=arguments.length<=5?void 0:arguments[5]}else if(9===u){this.isBezier=!0,a=[this.immediateMode._bezierVertex[0],arguments.length<=0?void 0:arguments[0],arguments.length<=3?void 0:arguments[3],arguments.length<=6?void 0:arguments[6]],l=[this.immediateMode._bezierVertex[1],arguments.length<=1?void 0:arguments[1],arguments.length<=4?void 0:arguments[4],arguments.length<=7?void 0:arguments[7]];var j=[this.immediateMode._bezierVertex[2],arguments.length<=2?void 0:arguments[2],arguments.length<=5?void 0:arguments[5],arguments.length<=8?void 0:arguments[8]],x=Math.hypot(a[0]-a[1],l[0]-l[1],j[0]-j[1]),b=Math.hypot(a[1]-a[2],l[1]-l[2],j[1]-j[2]),w=Math.hypot(a[2]-a[3],l[2]-l[3],j[2]-j[3]),u=x+b+w;for(x/=u,w/=u,s=0;s<4;
1s++)m[1].push(m[0][s]*(1-x)+m[3][s]*x),m[2].push(m[0][s]*w+m[3][s]*(1-w)),g[1].push(g[0][s]*(1-x)+g[3][s]*x),g[2].push(g[0][s]*w+g[3][s]*(1-w));for(n=0;n<p;n++){for(this.curFillColor=[0,0,0,0],this.curStrokeColor=[0,0,0,0],y=t=r=o=0;y<4;y++){for(s=0;s<4;s++)this.curFillColor[s]+=this._lookUpTableBezier[n][y]*m[y][s],this.curStrokeColor[s]+=this._lookUpTableBezier[n][y]*g[y][s];t+=a[y]*this._lookUpTableBezier[n][y],r+=l[y]*this._lookUpTableBezier[n][y],o+=j[y]*this._lookUpTableBezier[n][y]}this.vertex(t,r,o)}this.curFillColor=m[3],this.curStrokeColor=g[3],this.immediateMode._bezierVertex[0]=arguments.length<=6?void 0:arguments[6],this.immediateMode._bezierVertex[1]=arguments.length<=7?void 0:arguments[7],this.immediateMode._bezierVertex[2]=arguments.length<=8?void 0:arguments[8]}},i.default.RendererGL.prototype.quadraticVertex=function(){if(0===this.immediateMode._quadraticVertex.length)throw Error("vertex() must be used once before calling quadraticVertex()");var t,r,o,n,s,i,a=[],l=[],u=arguments.length;if(0===this._lookUpTableQuadratic.length||this._lutQuadraticDetail!==this._pInst._curveDetail){this._lookUpTableQuadratic=[],this._lutQuadraticDetail=this._pInst._curveDetail;for(var c=1/this._lutQuadraticDetail,d=c,h=1,f=0;d<1;){if(i=parseFloat(d.toFixed(6)),this._lookUpTableQuadratic[f]=this._quadraticCoefficients(i),h.toFixed(6)===c.toFixed(6)){i=parseFloat(h.toFixed(6))+parseFloat(d.toFixed(6)),++f,this._lookUpTableQuadratic[f]=this._quadraticCoefficients(i);break}d+=c,h-=c,++f}}for(var p=this._lookUpTableQuadratic.length,m=[],y=0;y<3;y++)m.push([]);m[0]=this.immediateMode.geometry.vertexColors.slice(-4),m[2]=this.curFillColor.slice();var g=[];for(y=0;y<3;y++)g.push([]);if(g[0]=this.immediateMode.geometry.vertexStrokeColors.slice(-4),g[2]=this.curStrokeColor.slice(),4===u){this.isQuadratic=!0;var a=[this.immediateMode._quadraticVertex[0],arguments.length<=0?void 0:arguments[0],arguments.length<=2?void 0:arguments[2]],l=[this.immediateMode._quadraticVertex[1],arguments.length<=1?void 0:arguments[1],arguments.length<=3?void 0:arguments[3]],v=Math.hypot(a[0]-a[1],l[0]-l[1]);for(v/=v+Math.hypot(a[1]-a[2],l[1]-l[2]),s=0;s<4;s++)m[1].push(m[0][s]*(1-v)+m[2][s]*v),g[1].push(g[0][s]*(1-v)+g[2][s]*v);for(n=0;n<p;n++){for(this.curFillColor=[0,0,0,0],this.curStrokeColor=[0,0,0,0],y=t=r=0;y<3;y++){for(s=0;s<4;s++)this.curFillColor[s]+=this._lookUpTableQuadratic[n][y]*m[y][s],this.curStrokeColor[s]+=this._lookUpTableQuadratic[n][y]*g[y][s];t+=a[y]*this._lookUpTableQuadratic[n][y],r+=l[y]*this._lookUpTableQuadratic[n][y]}this.vertex(t,r)}this.curFillColor=m[2],this.curStrokeColor=g[2],this.immediateMode._quadraticVertex[0]=arguments.length<=2?void 0:arguments[2],this.immediateMode._quadraticVertex[1]=arguments.length<=3?void 0:arguments[3]}else if(6===u){this.isQuadratic=!0,a=[this.immediateMode._quadraticVertex[0],arguments.length<=0?void 0:arguments[0],arguments.length<=3?void 0:arguments[3]],l=[this.immediateMode._quadraticVertex[1],arguments.length<=1?void 0:arguments[1],arguments.length<=4?void 0:arguments[4]];var b=[this.immediateMode._quadraticVertex[2],arguments.length<=2?void 0:arguments[2],arguments.length<=5?void 0:arguments[5]],_=Math.hypot(a[0]-a[1],l[0]-l[1],b[0]-b[1]);for(_/=_+Math.hypot(a[1]-a[2],l[1]-l[2],b[1]-b[2]),s=0;s<4;s++)m[1].push(m[0][s]*(1-_)+m[2][s]*_),g[1].push(g[0][s]*(1-_)+g[2][s]*_);for(n=0;n<p;n++){for(this.curFillColor=[0,0,0,0],this.curStrokeColor=[0,0,0,0],y=t=r=o=0;y<3;y++){for(s=0;s<4;s++)this.curFillColor[s]+=this._lookUpTableQuadratic[n][y]*m[y][s],this.curStrokeColor[s]+=this._lookUpTableQuadratic[n][y]*g[y][s];t+=a[y]*this._lookUpTableQuadratic[n][y],r+=l[y]*this._lookUpTableQuadratic[n][y],o+=b[y]*this._lookUpTableQuadratic[n][y]}this.vertex(t,r,o)}this.curFillColor=m[2],this.curStrokeColor=g[2],this.immediateMode._quadraticVertex[0]=arguments.length<=3?void 0:arguments[3],this.immediateMode._quadraticVertex[1]=arguments.length<=4?void 0:arguments[4],this.immediateMode._quadraticVertex[2]=arguments.length<=5?void 0:arguments[5]}},i.default.RendererGL.prototype.curveVertex=function(){var t,r,o,n,s,i,a=[],l=[],u=arguments.length;if(0===this._lookUpTableBezier.length||this._lutBezierDetail!==this._pInst._curveDetail){this._lookUpTableBezier=[],this._lutBezierDetail=this._pInst._curveDetail;for(var c=1/this._lutBezierDetail,d=c,h=1,f=0;d<1;){if(i=parseFloat(d.toFixed(6)),this._lookUpTableBezier[f]=this._bezierCoefficients(i),h.toFixed(6)===c.toFixed(6)){i=parseFloat(h.toFixed(6))+parseFloat(d.toFixed(6)),++f,this._lookUpTableBezier[f]=this._bezierCoefficients(i);break}d+=c,h-=c,++f}}var p=this._lookUpTableBezier.length;if(2===u){if(this.immediateMode._curveVertex.push(arguments.length<=0?void 0:arguments[0]),this.immediateMode._curveVertex.push(arguments.length<=1?void 0:arguments[1]),8===this.immediateMode._curveVertex.length){for(this.isCurve=!0,a=this._bezierToCatmull([this.immediateMode._curveVertex[0],this.immediateMode._curveVertex[2],this.immediateMode._curveVertex[4],this.immediateMode._curveVertex[6]]),l=this._bezierToCatmull([this.immediateMode._curveVertex[1],this.immediateMode._curveVertex[3],this.immediateMode._curveVertex[5],this.immediateMode._curveVertex[7]]),s=0;s<p;s++)r=a[0]*this._lookUpTableBezier[s][0]+a[1]*this._lookUpTableBezier[s][1]+a[2]*this._lookUpTableBezier[s][2]+a[3]*this._lookUpTableBezier[s][3],o=l[0]*this._lookUpTableBezier[s][0]+l[1]*this._lookUpTableBezier[s][1]+l[2]*this._lookUpTableBezier[s][2]+l[3]*this._lookUpTableBezier[s][3],this.vertex(r,o);for(s=0;s<u;s++)this.immediateMode._curveVertex.shift()}}else if(3===u&&(this.immediateMode._curveVertex.push(arguments.length<=0?void 0:arguments[0]),this.immediateMode._curveVertex.push(arguments.length<=1?void 0:arguments[1]),this.immediateMode._curveVertex.push(arguments.length<=2?void 0:arguments[2]),12===this.immediateMode._curveVertex.length)){for(this.isCurve=!0,a=this._bezierToCatmull([this.immediateMode._curveVertex[0],this.immediateMode._curveVertex[3],this.immediateMode._curveVertex[6],this.immediateMode._curveVertex[9]]),l=this._bezierToCatmull([this.immediateMode._curveVertex[1],this.immediateMode._curveVertex[4],this.immediateMode._curveVertex[7],this.immediateMode._curveVertex[10]]),t=this._bezierToCatmull([this.immediateMode._curveVertex[2],this.immediateMode._curveVertex[5],this.immediateMode._curveVertex[8],this.immediateMode._curveVertex[11]]),s=0;s<p;s++)r=a[0]*this._lookUpTableBezier[s][0]+a[1]*this._lookUpTableBezier[s][1]+a[2]*this._lookUpTableBezier[s][2]+a[3]*this._lookUpTableBezier[s][3],o=l[0]*this._lookUpTableBezier[s][0]+l[1]*this._lookUpTableBezier[s][1]+l[2]*this._lookUpTableBezier[s][2]+l[3]*this._lookUpTableBezier[s][3],n=t[0]*this._lookUpTableBezier[s][0]+t[1]*this._lookUpTableBezier[s][1]+t[2]*this._lookUpTableBezier[s][2]+t[3]*this._lookUpTableBezier[s][3],this.vertex(r,o,n);for(s=0;s<u;s++)this.immediateMode._curveVertex.shift()}},i.default.RendererGL.prototype.image=function(t,r,o,n,s,i,l,u,c){this._isErasing&&this.blendMode(this._cachedBlendMode),this._pInst.push(),this._pInst.noLights(),this._pInst.noStroke(),this._pInst.texture(t),this._pInst.textureMode(a.NORMAL);
1var d=0,h=(r<=t.width&&(d=r/t.width),1),r=(r+n<=t.width&&(h=(r+n)/t.width),0),n=(o<=t.height&&(r=o/t.height),1);o+s<=t.height&&(n=(o+s)/t.height),this.beginShape(),this.vertex(i,l,0,d,r),this.vertex(i+u,l,0,h,r),this.vertex(i+u,l+c,0,h,n),this.vertex(i,l+c,0,d,n),this.endShape(a.CLOSE),this._pInst.pop(),this._isErasing&&this.blendMode(a.REMOVE)};var c=i.default;o.default=c},{"../core/constants":272,"../core/main":283,"./p5.Geometry":335,"core-js/modules/es.array.concat":153,"core-js/modules/es.array.for-each":161,"core-js/modules/es.array.iterator":165,"core-js/modules/es.array.slice":169,"core-js/modules/es.math.hypot":176,"core-js/modules/es.math.sign":178,"core-js/modules/es.number.to-fixed":182,"core-js/modules/es.object.get-own-property-descriptor":186,"core-js/modules/es.object.to-string":190,"core-js/modules/es.string.iterator":200,"core-js/modules/es.symbol":212,"core-js/modules/es.symbol.description":210,"core-js/modules/es.symbol.iterator":211,"core-js/modules/es.weak-map":244,"core-js/modules/web.dom-collections.iterator":246}],327:[function(t,r,o){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function s(t){return(s="function"==typeof Symbol&&"symbol"===n(Symbol.iterator)?function(t){return n(t)}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":n(t)})(t)}t("core-js/modules/es.symbol"),t("core-js/modules/es.symbol.description"),t("core-js/modules/es.symbol.iterator"),t("core-js/modules/es.array.every"),t("core-js/modules/es.array.from"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.array.map"),t("core-js/modules/es.object.assign"),t("core-js/modules/es.object.get-own-property-descriptor"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.regexp.to-string"),t("core-js/modules/es.string.iterator"),t("core-js/modules/es.weak-map"),t("core-js/modules/web.dom-collections.iterator"),t("core-js/modules/es.array.every"),t("core-js/modules/es.array.map"),t("core-js/modules/es.object.assign"),Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;var i=(d=t("../core/main"))&&d.__esModule?d:{default:d},a=function(t){if(t&&t.__esModule)return t;if(null===t||"object"!==s(t)&&"function"!=typeof t)return{default:t};var r,o=l();if(o&&o.has(t))return o.get(t);var n,i={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(n in t)Object.prototype.hasOwnProperty.call(t,n)&&((r=a?Object.getOwnPropertyDescriptor(t,n):null)&&(r.get||r.set)?Object.defineProperty(i,n,r):i[n]=t[n]);return i.default=t,o&&o.set(t,i),i}(t("../core/constants"));function l(){var t;return"function"!=typeof WeakMap?null:(t=new WeakMap,l=function(){return t},t)}function u(t){return function(t){if(Array.isArray(t)){for(var r=0,o=Array(t.length);r<t.length;r++)o[r]=t[r];return o}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw TypeError("Invalid attempt to spread non-iterable instance")}()}function c(t,r){for(var o=0;o<r.length;o++){var n=r[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var d=function(){var t,r;function o(t){if(!(this instanceof o))throw TypeError("Cannot call a class as a function");(this.renderer=t)._pInst.push(),this.identityMatrix=new i.default.Matrix,t.uModelMatrix=new i.default.Matrix,this.geometry=new i.default.Geometry,this.geometry.gid="_p5_GeometryBuilder_".concat(o.nextGeometryId),o.nextGeometryId++,this.hasTransform=!1}return t=[{key:"transformVertices",value:function(t){var r=this;return this.hasTransform?t.map(function(t){return r.renderer.uModelMatrix.multiplyPoint(t)}):t}},{key:"transformNormals",value:function(t){var r=this;return this.hasTransform?t.map(function(t){return r.renderer.uNMatrix.multiplyVec3(t)}):t}},{key:"addGeometry",value:function(t){for(var r,o=this,n=(this.hasTransform=!this.renderer.uModelMatrix.mat4.every(function(t,r){return t===o.identityMatrix.mat4[r]}),this.hasTransform&&this.renderer.uNMatrix.inverseTranspose(this.renderer.uModelMatrix),this.geometry.vertices.length),s=((r=this.geometry.vertices).push.apply(r,u(this.transformVertices(t.vertices))),(r=this.geometry.vertexNormals).push.apply(r,u(this.transformNormals(t.vertexNormals))),(r=this.geometry.uvs).push.apply(r,u(t.uvs)),this.renderer._doFill&&(r=this.geometry.faces).push.apply(r,u(t.faces.map(function(t){return t.map(function(t){return t+n})}))),this.renderer._doStroke&&(r=this.geometry.edges).push.apply(r,u(t.edges.map(function(t){return t.map(function(t){return t+n})}))),u(t.vertexColors));s.length<4*t.vertices.length;)s.push.apply(s,u(this.renderer.curFillColor));(r=this.geometry.vertexColors).push.apply(r,u(s))}},{key:"addImmediate",value:function(){var t=this.renderer.immediateMode.geometry,r=this.renderer.immediateMode.shapeMode,o=[];if(this.renderer._doFill){if(r===a.TRIANGLE_STRIP||r===a.QUAD_STRIP)for(var n=2;n<t.vertices.length;n++)n%2==0?o.push([n,n-1,n-2]):o.push([n,n-2,n-1]);else if(r===a.TRIANGLE_FAN)for(var s=2;s<t.vertices.length;s++)o.push([0,s-1,s]);else for(var i=0;i<t.vertices.length;i+=3)o.push([i,i+1,i+2])}this.addGeometry(Object.assign({},t,{faces:o}))}},{key:"addRetained",value:function(t){this.addGeometry(t.model)}},{key:"finish",value:function(){return this.renderer._pInst.pop(),this.geometry}}],c(o.prototype,t),r&&c(o,r),o}();d.nextGeometryId=0,o.default=d},{"../core/constants":272,"../core/main":283,"core-js/modules/es.array.every":155,"core-js/modules/es.array.from":162,"core-js/modules/es.array.iterator":165,"core-js/modules/es.array.map":168,"core-js/modules/es.object.assign":183,"core-js/modules/es.object.get-own-property-descriptor":186,"core-js/modules/es.object.to-string":190,"core-js/modules/es.regexp.to-string":196,"core-js/modules/es.string.iterator":200,"core-js/modules/es.symbol":212,"core-js/modules/es.symbol.description":210,"core-js/modules/es.symbol.iterator":211,"core-js/modules/es.weak-map":244,"core-js/modules/web.dom-collections.iterator":246}],328:[function(t,r,o){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}t("core-js/modules/es.symbol"),t("core-js/modules/es.symbol.description"),t("core-js/modules/es.symbol.iterator"),t("core-js/modules/es.array.for-each"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.array.splice"),t("core-js/modules/es.math.hypot"),t("core-js/modules/es.math.sign"),t("core-js/modules/es.object.get-own-property-descriptor"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.regexp.to-string"),t("core-js/modules/es.string.iterator"),t("core-js/modules/es.weak-map"),t("core-js/modules/web.dom-collections.for-each"),t("core-js/modules/web.dom-collections.iterator"),t("core-js/modules/es.symbol"),t("core-js/modules/es.symbol.description"),t("core-js/modules/es.symbol.iterator"),t("core-js/modules/es.array.for-each"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.array.splice"),t("core-js/modules/es.math.hypot"),t("core-js/modules/es.math.sign"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.regexp.to-string"),t("core-js/modules/es.string.iterator"),t("core-js/modules/web.dom-collections.for-each"),t("core-js/modules/web.dom-collections.iterator"),Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;
1var s=(u=t("../core/main"))&&u.__esModule?u:{default:u},i=function(t){if(t&&t.__esModule)return t;if(null===t||"object"!==l(t)&&"function"!=typeof t)return{default:t};var r,o=a();if(o&&o.has(t))return o.get(t);var n,s={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(n in t)Object.prototype.hasOwnProperty.call(t,n)&&((r=i?Object.getOwnPropertyDescriptor(t,n):null)&&(r.get||r.set)?Object.defineProperty(s,n,r):s[n]=t[n]);return s.default=t,o&&o.set(t,s),s}(t("../core/constants"));function a(){var t;return"function"!=typeof WeakMap?null:(t=new WeakMap,a=function(){return t},t)}function l(t){return(l="function"==typeof Symbol&&"symbol"===n(Symbol.iterator)?function(t){return n(t)}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":n(t)})(t)}s.default.prototype.orbitControl=function(t,r,o,n){var i=this,a=(this._assert3d("orbitControl"),s.default._validateParameters("orbitControl",arguments),this._renderer._curCamera);void 0===t&&(t=1),void 0===r&&(r=t),void 0===o&&(o=1),"object"!==l(n)&&(n={}),!0!==this.contextMenuDisabled&&(this.canvas.oncontextmenu=function(){return!1},this._setProperty("contextMenuDisabled",!0)),!0!==this.wheelDefaultDisabled&&(this.canvas.onwheel=function(){return!1},this._setProperty("wheelDefaultDisabled",!0));var u=n.disableTouchActions;!0!==this.touchActionsDisabled&&(void 0===u||u)&&(this.canvas.style["touch-action"]="none",this._setProperty("touchActionsDisabled",!0));var c,d,h,u=n.freeRotation,n=void 0!==u&&u,f=[],u=(this.touches.forEach(function(t){i._renderer.prevTouches.forEach(function(r){t.id===r.id&&(r={x:t.x,y:t.y,px:r.x,py:r.y},f.push(r))})}),this._renderer.prevTouches=this.touches,0),p=0,m=0,y=0,g=0,v=this.height<this.width?this.height:this.width,b=!1;return 0<f.length?(b=0<f[0].x&&f[0].x<this.width&&0<f[0].y&&f[0].y<this.height,1===f.length?(p=-t*((c=f[0]).x-c.px)/v,m=r*(c.y-c.py)/v):(c=f[0],d=f[1],u=-(Math.hypot(c.x-d.x,c.y-d.y)-Math.hypot(c.px-d.px,c.py-d.py))*o*4e-4,y=.5*(c.x+d.x)-.5*(c.px+d.px),g=.5*(c.y+d.y)-.5*(c.py+d.py)),0<this.touches.length?b&&(this._renderer.executeRotateAndMove=!0,this._renderer.executeZoom=!0):(this._renderer.executeRotateAndMove=!1,this._renderer.executeZoom=!1)):(b=0<this.mouseX&&this.mouseX<this.width&&0<this.mouseY&&this.mouseY<this.height,0!==this._mouseWheelDeltaY?(u=Math.sign(this._mouseWheelDeltaY)*o*.01,this._mouseWheelDeltaY=0,b&&(this._renderer.executeZoom=!0)):this._renderer.executeZoom=!1,this.mouseIsPressed?(this.mouseButton===this.LEFT?(p=-t*this.movedX/v,m=r*this.movedY/v):this.mouseButton===this.RIGHT&&(y=this.movedX,g=this.movedY*a.yScale),b&&(this._renderer.executeRotateAndMove=!0)):this._renderer.executeRotateAndMove=!1),0!==u&&this._renderer.executeZoom&&(this._renderer.zoomVelocity+=u),.001<Math.abs(this._renderer.zoomVelocity)?(n?a._orbitFree(0,0,this._renderer.zoomVelocity):a._orbit(0,0,this._renderer.zoomVelocity),0!==a.projMatrix.mat4[15]&&(a.projMatrix.mat4[0]*=Math.pow(10,-this._renderer.zoomVelocity),a.projMatrix.mat4[5]*=Math.pow(10,-this._renderer.zoomVelocity),this._renderer.uPMatrix.mat4[0]=a.projMatrix.mat4[0],this._renderer.uPMatrix.mat4[5]=a.projMatrix.mat4[5]),this._renderer.zoomVelocity*=.85):this._renderer.zoomVelocity=0,(0!==p||0!==m)&&this._renderer.executeRotateAndMove&&this._renderer.rotateVelocity.add(.6*p,.6*m),1e-6<this._renderer.rotateVelocity.magSq()?(n?a._orbitFree(-this._renderer.rotateVelocity.x,this._renderer.rotateVelocity.y,0):a._orbit(this._renderer.rotateVelocity.x,this._renderer.rotateVelocity.y,0),this._renderer.rotateVelocity.mult(.85)):this._renderer.rotateVelocity.set(0,0),(0!==y||0!==g)&&this._renderer.executeRotateAndMove&&(c=2*y/this.width,d=-(2*g)/this.height,this._renderer.moveVelocity.add(.15*c,.15*d)),1e-6<this._renderer.moveVelocity.magSq()?(o=a._getLocalAxes(),b=Math.sqrt((t=a.eyeX-a.centerX)*t+(r=a.eyeY-a.centerY)*r+(v=a.eyeZ-a.centerZ)*v),u=new s.default.Vector(a.centerX,a.centerY,a.centerZ),u=a.cameraMatrix.multiplyPoint(u),(u=this._renderer.uPMatrix.multiplyAndNormalizePoint(u)).x-=this._renderer.moveVelocity.x,u.y-=this._renderer.moveVelocity.y,m=0===(p=this._renderer.uPMatrix.mat4)[15]?(h=(p[8]+u.x)/p[0]*b,(p[9]+u.
1y)/p[5]*b):(h=(u.x-p[12])/p[0],(u.y-p[13])/p[5]),a.setPosition(a.eyeX+h*o.x[0]+m*o.y[0],a.eyeY+h*o.x[1]+m*o.y[1],a.eyeZ+h*o.x[2]+m*o.y[2]),this._renderer.moveVelocity.mult(.85)):this._renderer.moveVelocity.set(0,0),this},s.default.prototype.debugMode=function(){this._assert3d("debugMode");for(var t=arguments.length,r=Array(t),o=0;o<t;o++)r[o]=arguments[o];s.default._validateParameters("debugMode",r);for(var n=this._registeredMethods.post.length-1;0<=n;n--)this._registeredMethods.post[n].toString()!==this._grid().toString()&&this._registeredMethods.post[n].toString()!==this._axesIcon().toString()||this._registeredMethods.post.splice(n,1);r[0]===i.GRID?this.registerMethod("post",this._grid(r[1],r[2],r[3],r[4],r[5])):r[0]===i.AXES?this.registerMethod("post",this._axesIcon(r[1],r[2],r[3],r[4])):(this.registerMethod("post",this._grid(r[0],r[1],r[2],r[3],r[4])),this.registerMethod("post",this._axesIcon(r[5],r[6],r[7],r[8])))},s.default.prototype.noDebugMode=function(){this._assert3d("noDebugMode");for(var t=this._registeredMethods.post.length-1;0<=t;t--)this._registeredMethods.post[t].toString()!==this._grid().toString()&&this._registeredMethods.post[t].toString()!==this._axesIcon().toString()||this._registeredMethods.post.splice(t,1)},s.default.prototype._grid=function(t,r,o,n,s){void 0===t&&(t=this.width/2),void 0===r&&(r=4>Math.round(t/30)?4:Math.round(t/30)),void 0===o&&(o=0),void 0===n&&(n=0),void 0===s&&(s=0);var i=t/r,a=t/2;return function(){this.push(),this.stroke(255*this._renderer.curStrokeColor[0],255*this._renderer.curStrokeColor[1],255*this._renderer.curStrokeColor[2]),this._renderer.uModelMatrix.reset();for(var t=0;t<=r;t++)this.beginShape(this.LINES),this.vertex(-a+o,n,t*i-a+s),this.vertex(a+o,n,t*i-a+s),this.endShape();for(var l=0;l<=r;l++)this.beginShape(this.LINES),this.vertex(l*i-a+o,n,-a+s),this.vertex(l*i-a+o,n,a+s),this.endShape();this.pop()}},s.default.prototype._axesIcon=function(t,r,o,n){return void 0===t&&(t=40<this.width/20?this.width/20:40),void 0===r&&(r=-this.width/4),void 0===o&&(o=r),void 0===n&&(n=r),function(){this.push(),this._renderer.uModelMatrix.reset(),this.strokeWeight(2),this.stroke(255,0,0),this.beginShape(this.LINES),this.vertex(r,o,n),this.vertex(r+t,o,n),this.endShape(),this.stroke(0,255,0),this.beginShape(this.LINES),this.vertex(r,o,n),this.vertex(r,o+t,n),this.endShape(),this.stroke(0,0,255),this.beginShape(this.LINES),this.vertex(r,o,n),this.vertex(r,o,n+t),this.endShape(),this.pop()}};var u=s.default;o.default=u},{"../core/constants":272,"../core/main":283,"core-js/modules/es.array.for-each":161,"core-js/modules/es.array.iterator":165,"core-js/modules/es.array.splice":171,"core-js/modules/es.math.hypot":176,"core-js/modules/es.math.sign":178,"core-js/modules/es.object.get-own-property-descriptor":186,"core-js/modules/es.object.to-string":190,"core-js/modules/es.regexp.to-string":196,"core-js/modules/es.string.iterator":200,"core-js/modules/es.symbol":212,"core-js/modules/es.symbol.description":210,"core-js/modules/es.symbol.iterator":211,"core-js/modules/es.weak-map":244,"core-js/modules/web.dom-collections.for-each":245,"core-js/modules/web.dom-collections.iterator":246}],329:[function(t,r,o){"use strict";t("core-js/modules/es.array.filter"),t("core-js/modules/es.array.filter"),Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;var n=(t=t("../core/main"))&&t.__esModule?t:{default:t};n.default.prototype.ambientLight=function(t,r,o,s){this._assert3d("ambientLight"),n.default._validateParameters("ambientLight",arguments);var i=this.color.apply(this,arguments);return this._renderer.ambientLightColors.push(i._array[0],i._array[1],i._array[2]),this._renderer._enableLighting=!0,this},n.default.prototype.specularColor=function(t,r,o){this._assert3d("specularColor"),n.default._validateParameters("specularColor",arguments);var s=this.color.apply(this,arguments);return this._renderer.specularColors=[s._array[0],s._array[1],s._array[2]],this},n.default.prototype.directionalLight=function(t,r,o,s,i,a){this._assert3d("directionalLight"),n.default._validateParameters("directionalLight",arguments),t=t instanceof n.default.Color?t:this.color(t,r,o);var l,u,r=arguments[arguments.length-1],o="number"==typeof r?(l=arguments[arguments.length-3],u=arguments[arguments.length-2],arguments[arguments.length-1]):(l=r.x,u=r.y,r.z),r=Math.sqrt(l*l+u*u+o*o);return this._renderer.directionalLightDirections.push(l/r,u/r,o/r),this._renderer.directionalLightDiffuseColors.push(t._array[0],t._array[1],t._array[2]),Array.prototype.push.apply(this._renderer.directionalLightSpecularColors,this._renderer.specularColors),this._renderer._enableLighting=!0,this},n.default.prototype.pointLight=function(t,r,o,s,i,a){this._assert3d("pointLight"),n.default._validateParameters("pointLight",arguments),t=t instanceof n.default.Color?t:this.color(t,r,o);var l,u,r=arguments[arguments.length-1],o="number"==typeof r?(l=arguments[arguments.length-3],u=arguments[arguments.length-2],arguments[arguments.length-1]):(l=r.x,u=r.y,r.z);return this._renderer.pointLightPositions.push(l,u,o),this._renderer.pointLightDiffuseColors.push(t._array[0],t._array[1],t._array[2]),Array.prototype.push.apply(this._renderer.pointLightSpecularColors,this._renderer.specularColors),this._renderer._enableLighting=!0,this},n.default.prototype.imageLight=function(t){this._renderer.activeImageLight=t,this._renderer._enableLighting=!0},n.default.prototype.panorama=function(t){this.filter(this._renderer._getSphereMapping(t))},n.default.prototype.lights=function(){this._assert3d("lights");var t=this.color("rgb(128,128,128)");return this.ambientLight(t),this.directionalLight(t,0,0,-1),this},n.default.prototype.lightFalloff=function(t,r,o){return this._assert3d("lightFalloff"),n.default._validateParameters("lightFalloff",arguments),t<0&&(t=0,console.warn("Value of constant argument in lightFalloff() should be never be negative. Set to 0.")),r<0&&(r=0,console.warn("Value of linear argument in lightFalloff() should be never be negative. Set to 0.")),o<0&&(o=0,console.warn("Value of quadratic argument in lightFalloff() should be never be negative. Set to 0.")),0===t&&0===r&&0===o&&(t=1,console.warn("Either one of the three arguments in lightFalloff() should be greater than zero. Set constant argument to 1.")),this._renderer.constantAttenuation=t,this._renderer.linearAttenuation=r,this._renderer.quadraticAttenuation=o,this},n.default.prototype.spotLight=function(t,r,o,s,i,a,l,u,c,d,h){this._assert3d("spotLight"),n.default._validateParameters("spotLight",arguments);var f,p,m,y=arguments.length;switch(y){case 11:case 10:f=this.color(t,r,o),p=new n.default.Vector(s,i,a),m=new n.default.Vector(l,u,c);break;case 9:t instanceof n.default.Color?(f=t,p=new n.default.Vector(r,o,s),m=new n.default.Vector(i,a,l),d=u,h=c):s instanceof n.default.Vector?(f=this.color(t,r,o),p=s,m=new n.default.Vector(i,a,l),d=u,h=c):l instanceof n.default.Vector?(f=this.color(t,r,o),p=new n.default.Vector(s,i,a),m=l,d=u,h=c):(f=this.color(t,r,o),p=new n.default.Vector(s,i,a),m=new n.default.Vector(l,u,c));break;case 8:m=t instanceof n.default.Color?(f=t,p=new n.default.Vector(r,o,s),new n.default.Vector(i,a,l)):s instanceof n.default.Vector?(f=this.color(t,r,o),p=s,new n.default.Vector(i,a,l)):(f=this.color(t,r,o),p=new n.default.Vector(s,i,a),l),d=u;break;case 7:t instanceof n.default.Color&&r instanceof n.default.Vector?(f=t,p=r,m=new n.default.Vector(o,s,i),d=a,h=l):t instanceof n.default.Color&&i instanceof n.default.Vector?(f=t,p=new n.default.Vector(r,o,s),m=i,d=a,h=l):s instanceof n.default.Vector&&i instanceof n.default.Vector?(f=this.color(t,r,o),p=s,m=i,d=a,h=l):m=t instanceof n.default.Color?(f=t,p=new n.default.Vector(r,o,s),new n.default.Vector(i,a,l)):s instanceof n.default.Vector?(f=this.color(t,r,o),p=s,new n.default.Vector(i,a,l)):(f=this.color(t,r,o),p=new n.default.Vector(s,i,a),l);break;case 6:s instanceof n.default.Vector&&i instanceof n.default.Vector?(f=this.color(t,r,o),p=s,m=i,d=a):t instanceof n.default.Color&&i instanceof n.default.Vector?(f=t,p=new n.default.Vector(r,o,s),m=i,d=a):t instanceof n.default.Color&&r instanceof n.default.Vector&&(f=t,p=r,m=new n.default.Vector(o,s,i),d=a);break;case 5:t instanceof n.default.Color&&r instanceof n.default.Vector&&o instanceof n.default.Vector?(f=t,p=r,m=o,d=s,h=i):s instanceof n.default.Vector&&i instanceof n.default.Vector?(f=this.color(t,r,o),p=s,m=i):t instanceof n.default.Color&&i instanceof n.default.Vector?(f=t,p=new n.default.Vector(r,o,s),m=i):t instanceof n.default.Color&&r instanceof n.default.Vector&&(f=t,p=r,m=new n.default.Vector(o,s,i));break;case 4:f=t,p=r,m=o,d=s;break;case 3:f=t,p=r,m=o;break;default:return console.warn("Sorry, input for spotlight() is not in prescribed format. Too ".concat(y<3?"few":"many"," arguments were provided")),this}return this._renderer.spotLightDiffuseColors.push(f._array[0],f._array[1],f._array[2]),Array.prototype.push.apply(this._renderer.spotLightSpecularColors,this._renderer.specularColors),this._renderer.spotLightPositions.push(p.x,p.y,p.z),m.normalize(),this._renderer.spotLightDirections.push(m.x,m.y,m.z),void 0===d&&(d=Math.PI/3),void 0!==h&&h<1?(h=1,console.warn("Value of concentration needs to be greater than 1. Setting it to 1")):void 0===h&&(h=100),d=this._renderer._pInst._toRadians(d),this._renderer.spotLightAngle.push(Math.cos(d)),this._renderer.spotLightConc.push(h),this._renderer._enableLighting=!0,this},n.default.prototype.noLights=function(){this._assert3d("noLights");for(var t=arguments.length,r=Array(t),o=0;o<t;o++)r[o]=arguments[o];return n.default._validateParameters("noLights",r),this._renderer.activeImageLight=null,this._renderer._enableLighting=!1,this._renderer.ambientLightColors.length=0,this._renderer.specularColors=[1,1,1],this._renderer.directionalLightDirections.length=0,this._renderer.directionalLightDiffuseColors.length=0,this._renderer.directionalLightSpecularColors.length=0,this._renderer.pointLightPositions.length=0,this._renderer.pointLightDiffuseColors.length=0,this._renderer.pointLightSpecularColors.length=0,this._renderer.spotLightPositions.length=0,this._renderer.spotLightDirections.length=0,this._renderer.spotLightDiffuseColors.length=0,this._renderer.spotLightSpecularColors.length=0,this._renderer.spotLightAngle.length=0,this._renderer.spotLightConc.length=0,this._renderer.constantAttenuation=1,this._renderer.linearAttenuation=0,this._renderer.quadraticAttenuation=0,this._renderer._useShininess=1,this._renderer._useMetalness=0,this},t=n.default,o.default=t},{"../core/main":283,"core-js/modules/es.array.filter":157}],330:[function(t,r,o){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}t("core-js/modules/es.symbol"),t("core-js/modules/es.symbol.description"),t("core-js/modules/es.symbol.iterator"),t("core-js/modules/es.array.
1concat"),t("core-js/modules/es.array.from"),t("core-js/modules/es.array.index-of"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.array.join"),t("core-js/modules/es.array.slice"),t("core-js/modules/es.array.splice"),t("core-js/modules/es.object.assign"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.promise"),t("core-js/modules/es.regexp.exec"),t("core-js/modules/es.regexp.to-string"),t("core-js/modules/es.set"),t("core-js/modules/es.string.iterator"),t("core-js/modules/es.string.match"),t("core-js/modules/es.string.split"),t("core-js/modules/es.string.trim"),t("core-js/modules/web.dom-collections.iterator"),t("core-js/modules/es.symbol"),t("core-js/modules/es.symbol.description"),t("core-js/modules/es.symbol.iterator"),t("core-js/modules/es.array.concat"),t("core-js/modules/es.array.index-of"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.array.join"),t("core-js/modules/es.array.slice"),t("core-js/modules/es.array.splice"),t("core-js/modules/es.object.assign"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.promise"),t("core-js/modules/es.regexp.exec"),t("core-js/modules/es.set"),t("core-js/modules/es.string.iterator"),t("core-js/modules/es.string.match"),t("core-js/modules/es.string.split"),t("core-js/modules/es.string.trim"),t("core-js/modules/web.dom-collections.iterator"),Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,t("regenerator-runtime/runtime");var s=(h=t("../core/main"))&&h.__esModule?h:{default:h};function i(t,r,o,n,s,i,a){try{var l=t[i](a),u=l.value}catch(t){return void o(t)}l.done?r(u):Promise.resolve(u).then(n,s)}function a(t){return function(){var r=this,o=arguments;return new Promise(function(n,s){var a=t.apply(r,o);function l(t){i(a,n,s,l,u,"next",t)}function u(t){i(a,n,s,l,u,"throw",t)}l(void 0)})}}function l(t){return(l="function"==typeof Symbol&&"symbol"===n(Symbol.iterator)?function(t){return n(t)}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":n(t)})(t)}function u(t,r,o){for(var n=2<arguments.length&&void 0!==o?o:{},i={v:[],vt:[],vn:[]},a={},l=null,u=new Set,c=!1,d=!1,h=0;h<r.length;++h){var f=r[h].trim().split(/\b\s+/);if(0<f.length){if("usemtl"===f[0])l=f[1];else if("v"===f[0]||"vn"===f[0]){var p=new s.default.Vector(parseFloat(f[1]),parseFloat(f[2]),parseFloat(f[3]));i[f[0]].push(p)}else if("vt"===f[0])p=[parseFloat(f[1]),1-parseFloat(f[2])],i[f[0]].push(p);else if("f"===f[0])for(var m=3;m<f.length;++m){for(var y=[],g=[1,m-1,m],v=0;v<g.length;++v){for(var b,_=f[g[v]],j=_.split("/"),x=0;x<j.length;x++)j[x]=parseInt(j[x])-1;a[_]||(a[_]={}),void 0===a[_][l]?(b=t.vertices.length,t.vertices.push(i.v[j[0]].copy()),t.uvs.push(i.vt[j[1]]?i.vt[j[1]].slice():[0,0]),t.vertexNormals.push(i.vn[j[2]]?i.vn[j[2]].copy():new s.default.Vector),a[_][l]=b,y.push(b),l&&n[l]&&n[l].diffuseColor&&u.add(i.v[j[0]])):y.push(a[_][l])}if(y[0]!==y[1]&&y[0]!==y[2]&&y[1]!==y[2]){if(t.faces.push(y),l&&n[l]&&n[l].diffuseColor)for(var c=c=!0,w=n[l].diffuseColor,S=0;S<y.length;S++)t.vertexColors.push(w[0]),t.vertexColors.push(w[1]),t.vertexColors.push(w[2]);else d=!0}}}}if(0===t.vertexNormals.length&&t.computeNormals(),c===d)throw Error("Model coloring is inconsistent. Either all vertices should have colors or none should.")}function c(t,r){if(function(t){for(var r=new DataView(t),o=[115,111,108,105,100],n=0;n<5;n++)if(function(t,r,o){for(var n=0,s=t.length;n<s;n++)if(t[n]!==r.getUint8(o+n,!1))return;return 1}(o,r,n))return;return 1}(r)){for(var o,n,i,a,l,u,c,d=new DataView(r),h=d.getUint32(80,!0),f=!1,p=0;p<70;p++)1129270351===d.getUint32(p,!1)&&82===d.getUint8(p+4)&&61===d.getUint8(p+5)&&(f=!0,a=[],l=d.getUint8(p+6)/255,u=d.getUint8(p+7)/255,c=d.getUint8(p+8)/255);for(var m=0;m<h;m++){for(var y,g=84+50*m,v=d.getFloat32(g,!0),b=d.getFloat32(4+g,!0),_=d.getFloat32(8+g,!0),j=(f&&(i=0==(32768&(y=d.getUint16(48+g,!0)))?(o=(31&y)/31,n=(y>>5&31)/31,(y>>10&31)/31):(o=l,n=u,c)),new s.default.Vector(v,b,_)),x=1;x<=3;x++){var w=g+12*x,w=new s.default.Vector(d.getFloat32(w,!0),d.getFloat32(4+w,!0),d.getFloat32(8+w,!0));t.vertices.push(w),t.vertexNormals.push(j),f&&a.push(o,n,i)}t.faces.push([3*m,3*m+1,3*m+2]),t.uvs.push([0,0],[0,0],[0,0])}}else if(r=new DataView(r),"TextDecoder"in window)for(var S,T,E=new TextDecoder("utf-8").decode(r).split("\n"),M="",k=[],O=0;O<E.length;++O){for(var C=E[O].trim(),P=C.split(" "),A=0;A<P.length;++A)""===P[A]&&P.splice(A,1);if(0!==P.length)switch(M){case"":if("solid"!==P[0])return void(console.error(C),console.error('Invalid state "'.concat(P[0],'", should be "solid"')));M="solid";break;case"solid":if("facet"!==P[0]||"normal"!==P[1])return void(console.error(C),console.error('Invalid state "'.concat(P[0],'", should be "facet normal"')));S=new s.default.Vector(parseFloat(P[2]),parseFloat(P[3]),parseFloat(P[4])),t.vertexNormals.push(S,S,S),M="facet normal";break;case"facet normal":if("outer"!==P[0]||"loop"!==P[1])return void(console.error(C),console.error('Invalid state "'.concat(P[0],'", should be "outer loop"')));M="vertex";break;case"vertex":if("vertex"===P[0])T=new s.default.Vector(parseFloat(P[1]),parseFloat(P[2]),parseFloat(P[3])),t.vertices.push(T),t.uvs.push([0,0]),k.push(t.vertices.indexOf(T));else{if("endloop"!==P[0])return void(console.error(C),console.error('Invalid state "'.concat(P[0],'", should be "vertex" or "endloop"')));t.faces.push(k),k=[],M="endloop"}break;case"endloop":if("endfacet"!==P[0])return void(console.error(C),console.error('Invalid state "'.concat(P[0],'", should be "endfacet"')));M="endfacet";break;case"endfacet":if("endsolid"!==P[0]){if("facet"!==P[0]||"normal"!==P[1])return void(console.error(C),console.error('Invalid state "'.concat(P[0],'", should be "endsolid" or "facet normal"')));S=new s.default.Vector(parseFloat(P[2]),parseFloat(P[3]),parseFloat(P[4])),t.vertexNormals.push(S,S,S),M="facet normal"}break;default:console.error('Invalid state "'.concat(M,'"'))}}else console.warn("Sorry, ASCII STL loading only works in browsers that support TextDecoder (https://caniuse.com/#feat=textencoder)")}t("./p5.Geometry"),s.default.prototype.loadModel=function(t,r){s.default._validateParameters("loadM
1odel",arguments);var o,n,i,d=!1,h=!1,f=!1,p=t.slice(-4),m=(r&&"object"===l(r)?(d=r.normalize||!1,n=r.successCallback,i=r.failureCallback,p=r.fileType||p,h=r.flipU||!1,f=r.flipV||!1):"boolean"==typeof r?(d=r,n=arguments[2],i=arguments[3],void 0!==arguments[4]&&(p=arguments[4])):(n="function"==typeof r?r:void 0,i=arguments[2],void 0!==arguments[3]&&(p=arguments[3])),new s.default.Geometry),y=(m.gid="".concat(t,"|").concat(d),this);function g(){return(g=a(regeneratorRuntime.mark(function r(o){var n,s,i,a;return regeneratorRuntime.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:for(n=[],s=0;s<o.length;s++)(i=o[s].match(/^mtllib (.+)/))&&function(){var r="",o=i[1],s=t.split("/");r=1<s.length?(s.pop(),s.join("/")+"/"+o):o,n.push((function(){return v.apply(this,arguments)})(r).then(function(t){var o;return t?(o=r,new Promise(function(t,r){var n=null,s={};y.loadStrings(o,function(r){for(var o=0;o<r.length;++o){var i=r[o].trim().split(/\s+/);"newmtl"===i[0]?s[n=i[1]]={}:"Kd"===i[0]?s[n].diffuseColor=[parseFloat(i[1]),parseFloat(i[2]),parseFloat(i[3])]:"Ka"===i[0]?s[n].ambientColor=[parseFloat(i[1]),parseFloat(i[2]),parseFloat(i[3])]:"Ks"===i[0]?s[n].specularColor=[parseFloat(i[1]),parseFloat(i[2]),parseFloat(i[3])]:"map_Kd"===i[0]&&(s[n].texturePath=i[1])}t(s)},r)})):(console.warn("MTL file not found or error in parsing; proceeding without materials: ".concat(r)),{})}).catch(function(t){return console.warn("Error loading MTL file: ".concat(r),t),{}}))}();return r.prev=2,r.next=5,Promise.all(n);case 5:var l;return a=r.sent,a=Object.assign.apply(Object,[{}].concat(function(t){if(Array.isArray(t)){for(var r=0,o=Array(t.length);r<t.length;r++)o[r]=t[r];return o}}(l=a)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(l)||function(){throw TypeError("Invalid attempt to spread non-iterable instance")}())),r.abrupt("return",a);case 10:return r.prev=10,r.t0=r.catch(2),r.abrupt("return",{});case 13:case"end":return r.stop()}},r,null,[[2,10]])}))).apply(this,arguments)}function v(){return(v=a(regeneratorRuntime.mark(function t(r){var o;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,fetch(r,{method:"HEAD"});case 3:return o=t.sent,t.abrupt("return",o.ok);case 7:return t.prev=7,t.t0=t.catch(0),t.abrupt("return",!1);case 10:case"end":return t.stop()}},t,null,[[0,7]])}))).apply(this,arguments)}return p.match(/\.stl$/i)?this.httpDo(t,"GET","arrayBuffer",function(t){c(m,t),d&&m.normalize(),h&&m.flipU(),f&&m.flipV(),y._decrementPreload(),"function"==typeof n&&n(m)},i):p.match(/\.obj$/i)?this.loadStrings(t,(o=a(regeneratorRuntime.mark(function t(r){return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,function(){return g.apply(this,arguments)}(r);case 3:u(m,r,t.sent),t.next=11;break;case 7:return t.prev=7,t.t0=t.catch(0),i?i(t.t0):s.default._friendlyError("Error during parsing: "+t.t0.message),t.abrupt("return");case 11:return t.prev=11,d&&m.normalize(),h&&m.flipU(),f&&m.flipV(),m._makeTriangleEdges(),y._decrementPreload(),"function"==typeof n&&n(m),t.finish(11);case 19:case"end":return t.stop()}},t,null,[[0,7,11,19]])})),function(t){return o.apply(this,arguments)}),i):(s.default._friendlyFileLoadError(3,t),i?i():s.default._friendlyError("Sorry, the file type is invalid. Only OBJ and STL files are supported.")),m},s.default.prototype.model=function(t){this._assert3d("model"),s.default._validateParameters("model",arguments),0<t.vertices.length&&(this._renderer.geometryInHash(t.gid)||(t._edgesToVertices(),this._renderer.createBuffers(t.gid,t)),this._renderer.drawBuffers(t.gid))};var d=0,h=(s.default.prototype.createModel=function(t){var r,o,n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:" ",i=2<arguments.length?arguments[2]:void 0,a=(s.default._validateParameters("createModel",arguments),!1),h=!1,f=!1,i=(i&&"object"===l(i)?(a=i.normalize||!1,r=i.successCallback,o=i.failureCallback,h=i.flipU||!1,f=i.flipV||!1):o="boolean"==typeof i?(a=i,r=arguments[3],arguments[4]):(r="function"==typeof arguments[2]?arguments[2]:void 0,arguments[3]),new s.default.Geometry);if(i.gid="".concat(n,"|").concat(a,"|").concat(d++),n.match(/\.stl$/i))try{c(i,(new TextEncoder).encode(t).buffer)}catch(t){return void(o?o(t):s.default._friendlyError("Error during parsing: "+t.message))}else if(n.match(/\.obj$/i))try{u(i,t.split("\n"))}catch(t){return void(o?o(t):s.default._friendlyError("Error during parsing: "+t.message))}else s.default._friendlyFileLoadError(3,t),o?o():s.default._friendlyError("Sorry, the file type is invali
1d. Only OBJ and STL files are supported.");return a&&i.normalize(),h&&i.flipU(),f&&i.flipV(),i._makeTriangleEdges(),"function"==typeof r&&r(i),i},s.default);o.default=h},{"../core/main":283,"./p5.Geometry":335,"core-js/modules/es.array.concat":153,"core-js/modules/es.array.from":162,"core-js/modules/es.array.index-of":164,"core-js/modules/es.array.iterator":165,"core-js/modules/es.array.join":166,"core-js/modules/es.array.slice":169,"core-js/modules/es.array.splice":171,"core-js/modules/es.object.assign":183,"core-js/modules/es.object.to-string":190,"core-js/modules/es.promise":191,"core-js/modules/es.regexp.exec":195,"core-js/modules/es.regexp.to-string":196,"core-js/modules/es.set":197,"core-js/modules/es.string.iterator":200,"core-js/modules/es.string.match":201,"core-js/modules/es.string.split":206,"core-js/modules/es.string.trim":209,"core-js/modules/es.symbol":212,"core-js/modules/es.symbol.description":210,"core-js/modules/es.symbol.iterator":211,"core-js/modules/web.dom-collections.iterator":246,"regenerator-runtime/runtime":260}],331:[function(t,r,o){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function s(t){return(s="function"==typeof Symbol&&"symbol"===n(Symbol.iterator)?function(t){return n(t)}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":n(t)})(t)}t("core-js/modules/es.symbol"),t("core-js/modules/es.symbol.description"),t("core-js/modules/es.symbol.iterator"),t("core-js/modules/es.array.includes"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.array.join"),t("core-js/modules/es.object.get-own-property-descriptor"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.string.includes"),t("core-js/modules/es.string.iterator"),t("core-js/modules/es.weak-map"),t("core-js/modules/web.dom-collections.iterator"),t("core-js/modules/es.symbol"),t("core-js/modules/es.symbol.description"),t("core-js/modules/es.symbol.iterator"),t("core-js/modules/es.array.includes"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.array.join"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.string.includes"),t("core-js/modules/es.string.iterator"),t("core-js/modules/web.dom-collections.iterator"),Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;var i=(u=t("../core/main"))&&u.__esModule?u:{default:u},a=function(t){if(t&&t.__esModule)return t;if(null===t||"object"!==s(t)&&"function"!=typeof t)return{default:t};var r,o=l();if(o&&o.has(t))return o.get(t);var n,i={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(n in t)Object.prototype.hasOwnProperty.call(t,n)&&((r=a?Object.getOwnPropertyDescriptor(t,n):null)&&(r.get||r.set)?Object.defineProperty(i,n,r):i[n]=t[n]);return i.default=t,o&&o.set(t,i),i}(t("../core/constants"));function l(){var t;return"function"!=typeof WeakMap?null:(t=new WeakMap,l=function(){return t},t)}t("./p5.Texture"),i.default.prototype.loadShader=function(t,r,o,n){function s(){l._decrementPreload(),o&&o(a)}i.default._validateParameters("loadShader",arguments),n=n||console.error;var a=new i.default.Shader,l=this,u=!1,c=!1;return this.loadStrings(t,function(t){a._vertSrc=t.join("\n"),c=!0,u&&s()},n),this.loadStrings(r,function(t){a._fragSrc=t.join("\n"),u=!0,c&&s()},n),a},i.default.prototype.createShader=function(t,r,o){return i.default._validateParameters("createShader",arguments),new i.default.Shader(this._renderer,t,r,o)},i.default.prototype.createFilterShader=function(t){i.default._validateParameters("createFilterShader",arguments);var r=t.includes("#version 300 es")?"#version 300 es\n uniform mat4 uModelViewMatrix;\n uniform mat4 uProjectionMatrix;\n\n in vec3 aPosition;\n in vec2 aTexCoord;\n out vec2 vTexCoord;\n\n void main() {\n // transferring texcoords for the frag shader\n vTexCoord = aTexCoord;\n\n // copy position with a fourth coordinate for projection (1.0 is normal)\n vec4 positionVec4 = vec4(aPosition, 1.0
1);\n\n // project to 3D space\n gl_Position = uProjectionMatrix * uModelViewMatrix * positionVec4;\n }\n ":"\n uniform mat4 uModelViewMatrix;\n uniform mat4 uProjectionMatrix;\n\n attribute vec3 aPosition;\n // texcoords only come from p5 to vertex shader\n // so pass texcoords on to the fragment shader in a varying variable\n attribute vec2 aTexCoord;\n varying vec2 vTexCoord;\n\n void main() {\n // transferring texcoords for the frag shader\n vTexCoord = aTexCoord;\n\n // copy position with a fourth coordinate for projection (1.0 is normal)\n vec4 positionVec4 = vec4(aPosition, 1.0);\n\n // project to 3D space\n gl_Position = uProjectionMatrix * uModelViewMatrix * positionVec4;\n }\n ",r=new i.default.Shader(this._renderer,r,t);return this._renderer.GL?r.ensureCompiledOnContext(this):r.ensureCompiledOnContext(this._renderer.getFilterGraphicsLayer()),r},i.default.prototype.shader=function(t){return this._assert3d("shader"),i.default._validateParameters("shader",arguments),t.ensureCompiledOnContext(this),t.isStrokeShader()?this._renderer.userStrokeShader=t:(this._renderer.userFillShader=t,this._renderer._useNormalMaterial=!1),t.setDefaultUniforms(),this},i.default.prototype.baseMaterialShader=function(){return this._assert3d("baseMaterialShader"),this._renderer.baseMaterialShader()},i.default.prototype.baseNormalShader=function(){return this._assert3d("baseNormalShader"),this._renderer.baseNormalShader()},i.default.prototype.baseColorShader=function(){return this._assert3d("baseColorShader"),this._renderer.baseColorShader()},i.default.prototype.baseStrokeShader=function(){return this._assert3d("baseStrokeShader"),this._renderer.baseStrokeShader()},i.default.prototype.resetShader=function(){return this._renderer.userFillShader=this._renderer.userStrokeShader=null,this},i.default.prototype.texture=function(t){return this._assert3d("texture"),i.default._validateParameters("texture",arguments),t.gifProperties&&t._animateGif(this),this._renderer.drawMode=a.TEXTURE,this._renderer._useNormalMaterial=!1,this._renderer._tex=t,this._renderer._setProperty("_doFill",!0),this},i.default.prototype.textureMode=function(t){t!==a.IMAGE&&t!==a.NORMAL?console.warn("You tried to set ".concat(t," textureMode only supports IMAGE & NORMAL ")):this._renderer.textureMode=t},i.default.prototype.textureWrap=function(t){var r=1<arguments.length&&void 0!==arguments[1]?arguments[1]:t,o=(this._renderer.textureWrapX=t,this._renderer.textureWrapY=r,!0),n=!1,s=void 0;try{for(var i,a=this._renderer.textures.values()[Symbol.iterator]();!(o=(i=a.next()).done);o=!0)i.value.setWrapMode(t,r)}catch(t){n=!0,s=t}finally{try{o||null==a.return||a.return()}finally{if(n)throw s}}},i.default.prototype.normalMaterial=function(){this._assert3d("normalMaterial");for(var t=arguments.length,r=Array(t),o=0;o<t;o++)r[o]=arguments[o];return i.default._validateParameters("normalMaterial",r),this._renderer.drawMode=a.FILL,this._renderer._useSpecularMaterial=!1,this._renderer._useEmissiveMaterial=!1,this._renderer._useNormalMaterial=!0,this._renderer.curFillColor=[1,1,1,1],this._renderer._setProperty("_doFill",!0),this.noStroke(),this},i.default.prototype.ambientMaterial=function(t,r,o){this._assert3d("ambientMaterial"),i.default._validateParameters("ambientMaterial",arguments);var n=i.default.prototype.color.apply(this,arguments);return this._renderer._hasSetAmbient=!0,this._renderer.curAmbientColor=n._array,this._renderer._useNormalMaterial=!1,this._renderer._enableLighting=!0,this._renderer._setProperty("_doFill",!0),this},i.default.prototype.emissiveMaterial=function(t,r,o,n){this._assert3d("emissiveMaterial"),i.default._validateParameters("emissiveMaterial",arguments);var s=i.default.prototype.color.apply(this,arguments);return this._renderer.curEmissiveColor=s._array,this._renderer._useEmissiveMaterial=!0,this._renderer._useNormalMaterial=!1,this._renderer._enableLighting=!0,this},i.default.prototype.specularMaterial=function(t,r,o,n){this._assert3d("specularMaterial"),i.default._validateParameters("specularMaterial",arguments);var s=i.default.prototype.color.apply(this,arguments);return this._renderer.curSpecularColor=s._array,this._renderer._useSpecularMaterial=!0,this._renderer._useNormalMaterial=!1,this._renderer._enableLighting=!0,this},i.default.prototype.shininess=function(t){return this._assert3d("shininess"),i.default._validateParameters("shininess",arguments),this._renderer._useShininess=t=t<1?1:t,this},i.default.prototype.metalness=function(t){return this._assert3d("metalness"),t=1-Math.exp(-t/100),this._renderer._useMetalness=t,this},i.default.RendererGL.prototype._applyColorBlend=function(t,r){var o=this.GL,n=this.drawMode===a.TEXTURE,r=r||this.userFillShader||this.userStrokeShader||this.userPointShader||n||this.curBlendM
1ode!==a.BLEND||t[t.length-1]<1||this._isErasing;return r!==this._isBlending&&(r||this.curBlendMode!==a.BLEND&&this.curBlendMode!==a.ADD?o.enable(o.BLEND):o.disable(o.BLEND),o.depthMask(!0),this._isBlending=r),this._applyBlendMode(),t},i.default.RendererGL.prototype._applyBlendMode=function(){if(this._cachedBlendMode!==this.curBlendMode){var t=this.GL;switch(this.curBlendMode){case a.BLEND:t.blendEquation(t.FUNC_ADD),t.blendFunc(t.ONE,t.ONE_MINUS_SRC_ALPHA);break;case a.ADD:t.blendEquation(t.FUNC_ADD),t.blendFunc(t.ONE,t.ONE);break;case a.REMOVE:t.blendEquation(t.FUNC_ADD),t.blendFunc(t.ZERO,t.ONE_MINUS_SRC_ALPHA);break;case a.MULTIPLY:t.blendEquation(t.FUNC_ADD),t.blendFunc(t.DST_COLOR,t.ONE_MINUS_SRC_ALPHA);break;case a.SCREEN:t.blendEquation(t.FUNC_ADD),t.blendFunc(t.ONE,t.ONE_MINUS_SRC_COLOR);break;case a.EXCLUSION:t.blendEquationSeparate(t.FUNC_ADD,t.FUNC_ADD),t.blendFuncSeparate(t.ONE_MINUS_DST_COLOR,t.ONE_MINUS_SRC_COLOR,t.ONE,t.ONE);break;case a.REPLACE:t.blendEquation(t.FUNC_ADD),t.blendFunc(t.ONE,t.ZERO);break;case a.SUBTRACT:t.blendEquationSeparate(t.FUNC_REVERSE_SUBTRACT,t.FUNC_ADD),t.blendFuncSeparate(t.ONE,t.ONE,t.ONE,t.ONE_MINUS_SRC_ALPHA);break;case a.DARKEST:this.blendExt?(t.blendEquationSeparate(this.blendExt.MIN||this.blendExt.MIN_EXT,t.FUNC_ADD),t.blendFuncSeparate(t.ONE,t.ONE,t.ONE,t.ONE)):console.warn("blendMode(DARKEST) does not work in your browser in WEBGL mode.");break;case a.LIGHTEST:this.blendExt?(t.blendEquationSeparate(this.blendExt.MAX||this.blendExt.MAX_EXT,t.FUNC_ADD),t.blendFuncSeparate(t.ONE,t.ONE,t.ONE,t.ONE)):console.warn("blendMode(LIGHTEST) does not work in your browser in WEBGL mode.");break;default:console.error("Oops! Somehow RendererGL set curBlendMode to an unsupported mode.")}this._isErasing||(this._cachedBlendMode=this.curBlendMode)}};var u=i.default;o.default=u},{"../core/constants":272,"../core/main":283,"./p5.Texture":343,"core-js/modules/es.array.includes":163,"core-js/modules/es.array.iterator":165,"core-js/modules/es.array.join":166,"core-js/modules/es.object.get-own-property-descriptor":186,"core-js/modules/es.object.to-string":190,"core-js/modules/es.string.includes":199,"core-js/modules/es.string.iterator":200,"core-js/modules/es.symbol":212,"core-js/modules/es.symbol.description":210,"core-js/modules/es.symbol.iterator":211,"core-js/modules/es.weak-map":244,"core-js/modules/web.dom-collections.iterator":246}],332:[function(t,r,o){"use strict";t("core-js/modules/es.array.slice"),t("core-js/modules/es.math.hypot"),t("core-js/modules/es.string.sub"),t("core-js/modules/es.array.slice"),t("core-js/modules/es.math.hypot"),t("core-js/modules/es.string.sub"),Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;var n=(t=t("../core/main"))&&t.__esModule?t:{default:t};function s(t,r){for(var o=0;o<r.length;o++){var n=r[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}n.default.prototype.camera=function(){var t;this._assert3d("camera");for(var r=arguments.length,o=Array(r),s=0;s<r;s++)o[s]=arguments[s];return n.default._validateParameters("camera",o),(t=this._renderer._curCamera).camera.apply(t,o),this},n.default.prototype.perspective=function(){var t;this._assert3d("perspective");for(var r=arguments.length,o=Array(r),s=0;s<r;s++)o[s]=arguments[s];return n.default._validateParameters("perspective",o),(t=this._renderer._curCamera).perspective.apply(t,o),this},n.default.prototype.linePerspective=function(t){if(n.default._validateParameters("linePerspective",arguments),!(this._renderer instanceof n.default.RendererGL))throw Error("linePerspective() must be called in WebGL mode.");if(void 0===t)return this._renderer._curCamera.useLinePerspective;this._renderer._curCamera.useLinePerspective=t},n.default.prototype.ortho=function(){var t;this._assert3d("ortho");for(var r=arguments.length,o=Array(r),s=0;s<r;s++)o[s]=arguments[s];return n.default._validateParameters("ortho",o),(t=this._renderer._curCamera).ortho.apply(t,o),this},n.default.prototype.frustum=function(){var t;this._assert3d("frustum");for(var r=arguments.length,o=Array(r),s=0;s<r;s++)o[s]=arguments[s];return n.default._validateParameters("frustum",o),(t=this._renderer._curCamera).frustum.apply(t,o),this},n.default.prototype.createCamera=function(){this._assert3d("createCamera");var t=new n.default.Camera(this._renderer);return t._computeCameraDefaultSettings(),t._setDefaultCamera(),this._renderer._curCamera=t},n.default.Camera=function(){var t,r;function o(t){if(!(this instanceof o))throw TypeError("Cannot call a class as a function");this._renderer=t,this.cameraType="default",this.useLinePerspective=!0,this.cameraMatrix=new n.default.Matrix,this.projMatrix=new n.default.Matrix,this.yScale=1}return t=[{key:"perspective",value:function(t,r,o,s){this.cameraType=0<arguments.length?"custom"
1:"default",void 0===t?(t=this.defaultCameraFOV,this.cameraFOV=t):this.cameraFOV=this._renderer._pInst._toRadians(t),void 0===r&&(r=this.defaultAspectRatio),void 0===o&&(o=this.defaultCameraNear),void 0===s&&(s=this.defaultCameraFar),o<=1e-4&&(o=.01,console.log("Avoid perspective near plane values close to or below 0. Setting value to 0.01.")),s<o&&console.log("Perspective far plane value is less than near plane value. Nothing will be shown."),this.aspectRatio=r,this.cameraNear=o,this.cameraFar=s,this.projMatrix=n.default.Matrix.identity();var t=1/Math.tan(this.cameraFOV/2),i=1/(this.cameraNear-this.cameraFar);this.projMatrix.set(t/r,0,0,0,0,-t*this.yScale,0,0,0,0,(s+o)*i,-1,0,0,2*s*o*i,0),this._isActive()&&this._renderer.uPMatrix.set(this.projMatrix)}},{key:"ortho",value:function(t,r,o,s,i,a){var l=this.fbo||this._renderer,l=(void 0===t&&(t=-l.width/2),void 0===r&&(r=+l.width/2),void 0===o&&(o=-l.height/2),void 0===s&&(s=+l.height/2),void 0===i&&(i=0),void 0===a&&(a=Math.max(l.width,l.height)+800),this.cameraNear=i,r-t),u=s-o,c=(this.cameraFar=a)-i,d=2/l,h=2/u*this.yScale,r=-(r+t)/l,t=-(s+o)/u,l=-(a+i)/c;this.projMatrix=n.default.Matrix.identity(),this.projMatrix.set(d,0,0,0,0,-h,0,0,0,0,-2/c,0,r,t,l,1),this._isActive()&&this._renderer.uPMatrix.set(this.projMatrix),this.cameraType="custom"}},{key:"frustum",value:function(t,r,o,s,i,a){void 0===t&&(t=-(.05*this._renderer.width)),void 0===r&&(r=.05*+this._renderer.width),void 0===o&&(o=.05*+this._renderer.height),void 0===s&&(s=-(.05*this._renderer.height)),void 0===i&&(i=this.defaultCameraNear),void 0===a&&(a=this.defaultCameraFar),this.cameraNear=i;var l=r-t,u=s-o,c=(this.cameraFar=a)-i,d=2*i/l,h=2*i/u*this.yScale,f=-2*a*i/c,r=(r+t)/l,t=(s+o)/u,l=-(a+i)/c;this.projMatrix=n.default.Matrix.identity(),this.projMatrix.set(d,0,0,0,0,-h,0,0,r,t,l,-1,0,0,f,0),this._isActive()&&this._renderer.uPMatrix.set(this.projMatrix),this.cameraType="custom"}},{key:"_rotateView",value:function(t,r,o,s){var i=this.centerX,a=this.centerY,l=this.centerZ,u=(i-=this.eyeX,a-=this.eyeY,l-=this.eyeZ,n.default.Matrix.identity(this._renderer._pInst)),t=(u.rotate(this._renderer._pInst._toRadians(t),r,o,s),[i*u.mat4[0]+a*u.mat4[4]+l*u.mat4[8],i*u.mat4[1]+a*u.mat4[5]+l*u.mat4[9],i*u.mat4[2]+a*u.mat4[6]+l*u.mat4[10]]),r=(t[0]+=this.eyeX,t[1]+=this.eyeY,t[2]+=this.eyeZ,this.upX*u.mat4[0]+this.upY*u.mat4[4]+this.upZ*u.mat4[8]),o=this.upX*u.mat4[1]+this.upY*u.mat4[5]+this.upZ*u.mat4[9],s=this.upX*u.mat4[2]+this.upY*u.mat4[6]+this.upZ*u.mat4[10];this.camera(this.eyeX,this.eyeY,this.eyeZ,t[0],t[1],t[2],r,o,s)}},{key:"roll",value:function(t){var r=this._getLocalAxes(),t=n.default.Quat.fromAxisAngle(this._renderer._pInst._toRadians(t),r.z[0],r.z[1],r.z[2]).rotateVector(new n.default.Vector(this.upX,this.upY,this.upZ));this.camera(this.eyeX,this.eyeY,this.eyeZ,this.centerX,this.centerY,this.centerZ,t.x,t.y,t.z)}},{key:"pan",value:function(t){var r=this._getLocalAxes();this._rotateView(t,r.y[0],r.y[1],r.y[2])}},{key:"tilt",value:function(t){var r=this._getLocalAxes();this._rotateView(t,r.x[0],r.x[1],r.x[2])}},{key:"lookAt",value:function(t,r,o){this.camera(this.eyeX,this.eyeY,this.eyeZ,t,r,o,this.upX,this.upY,this.upZ)}},{key:"camera",value:function(t,r,o,n,s,i,a,l,u){return void 0===t&&(t=this.defaultEyeX,r=this.defaultEyeY,o=this.defaultEyeZ,n=t,s=r,l=1,u=a=i=0),this.eyeX=t,this.eyeY=r,this.eyeZ=o,void 0!==n&&(this.centerX=n,this.centerY=s,this.centerZ=i),void 0!==a&&(this.upX=a,this.upY=l,this.upZ=u),n=this._getLocalAxes(),this.cameraMatrix.set(n.x[0],n.y[0],n.z[0],0,n.x[1],n.y[1],n.z[1],0,n.x[2],n.y[2],n.z[2],0,0,0,0,1),s=-t,this.cameraMatrix.translate([s,-r,-o]),this._isActive()&&this._renderer.uViewMatrix.set(this.cameraMatrix),this}},{key:"move",value:function(t,r,o){var n=this._getLocalAxes(),t=[n.x[0]*t,n.x[1]*t,n.x[2]*t],r=[n.y[0]*r,n.y[1]*r,n.y[2]*r],n=[n.z[0]*o,n.z[1]*o,n.z[2]*o];this.camera(this.eyeX+t[0]+r[0]+n[0],this.eyeY+t[1]+r[1]+n[1],this.eyeZ+t[2]+r[2]+n[2],this.centerX+t[0]+r[0]+n[0],this.centerY+t[1]+r[1]+n[1],this.centerZ+t[2]+r[2]+n[2],this.upX,this.upY,this.upZ)}},{key:"setPosition",value:function(t,r,o){var n=t-this.eyeX,s=r-this.eyeY,i=o-this.eyeZ;this.camera(t,r,o,this.centerX+n,this.centerY+s,this.centerZ+i,this.upX,this.upY,this.upZ)}},{key:"set",value:function(t){for(var r=0,o=["eyeX","eyeY","eyeZ","centerX","centerY","centerZ","upX","upY","upZ","cameraFOV","aspectRatio","cameraNear","cameraFar","cameraType","yScale","useLinePerspective"];r<o.length;r++){var n=o[r];this[n]=t[n]}this.cameraMatrix=t.cameraMatrix.copy(),this.projMatrix=t.projMatrix.copy(),this._isActive()&&(this._renderer.uModelMatrix.reset(),this._renderer.uViewMatrix.set(this.cameraMatrix),this._renderer.uPMatrix.set(this.projMatrix))}},{key:"slerp",value:function(t,r,o){var s,i,a,l,u,c,d,h,f,p,m,y,g,v,b,_,j,x;0===o?this.set(t):1===o?this.set(r):(0!==this.projMatrix.mat4[15]&&(this.projMatrix.mat4[0]=t.projMatrix.mat4[0]*Math.pow(r.projMatrix.mat4[0]/t.projMatrix.mat4[0],o),this.projMatrix.mat4[5]=t.projMatrix.mat4[5]*Math.pow(r.projMatrix.mat4[5]/t.projMatrix.mat4[5],o),this._isActive()&&(this._renderer.uPMatrix.mat4=this.projMatrix.mat4.slice())),l=new n.default.Vector(t.eyeX,t.eyeY,t.eyeZ),u=new n.default.Vector(r.eyeX,r.eyeY,r.eyeZ),_=new n.default.Vector(t.centerX,t.centerY,t.centerZ),x=new n.default.Vector(r.centerX,r.centerY,r.centerZ),s=(a=n.default.Vector.dist(l,_))*Math.pow((s=n.default.Vector.dist(u,x))/a,o),a=n.default.Vector.sub(l,u),i=1,1e-6<(j=(v=l.copy().sub(u).sub(_).add(x)).magSq())&&(i=Math.max(0,Math.min(i=n.default.Vector.dot(a,v)/j,1))),a=n.default.Vector.lerp(n.default.Vector.lerp(l,_,i),n.default.Vector.lerp(u,x,i),o),v=t.cameraMatrix.createSubMatrix3x3(),j=r.cameraMatrix.createSubMatrix3x3(),l=v.row(2),_=j.row(2),u=v.row(1),x=j.row(1),t=new n.default.Vector,r=new n.default.Vector,c=new n.default.Vector,d=new n.default.Vector,1-(h=.5*((v=(j=j.mult3x3(v.copy().transpose3x3())).diagonal())[0]+v[1]+v[2]-1))<1e-7?(t.
1set(n.default.Vector.lerp(l,_,o)).normalize(),c.set(t).mult(i*s).add(a),d.set(t).mult((i-1)*s).add(a),r.set(n.default.Vector.lerp(u,x,o)).normalize()):(_=1/(1-h),x=Math.max(v[0],v[1],v[2]),y=j.mat3[1]+j.mat3[3],g=j.mat3[2]+j.mat3[6],b=j.mat3[5]+j.mat3[7],g=Math.cos(y=o*Math.atan2(x=x===v[0]?(p=.5*y*(_/=f=Math.sqrt((v[0]-h)*_)),m=.5*g*_,.5*(j.mat3[7]-j.mat3[5])/f):x===v[1]?(m=.5*b*(_/=p=Math.sqrt((v[1]-h)*_)),f=.5*y*_,.5*(j.mat3[2]-j.mat3[6])/p):(f=.5*g*(_/=m=Math.sqrt((v[2]-h)*_)),p=.5*b*_,.5*(j.mat3[3]-j.mat3[1])/m),h)),v=Math.sin(y),(x=new n.default.Matrix("mat3",[g+(b=1-g)*f*f,b*(_=f*p)+v*m,b*(j=m*f)-v*p,b*_-v*m,g+b*p*p,b*(o=p*m)+v*f,b*j+v*p,b*o-v*f,g+b*m*m])).multiplyVec3(l,t),c.set(t).mult(i*s).add(a),d.set(t).mult((i-1)*s).add(a),x.multiplyVec3(u,r)),this.camera(c.x,c.y,c.z,d.x,d.y,d.z,r.x,r.y,r.z))}},{key:"_computeCameraDefaultSettings",value:function(){this.defaultAspectRatio=this._renderer.width/this._renderer.height,this.defaultEyeX=0,this.defaultEyeY=0,this.defaultEyeZ=800,this.defaultCameraFOV=2*Math.atan(this._renderer.height/2/this.defaultEyeZ),this.defaultCenterX=0,this.defaultCenterY=0,this.defaultCenterZ=0,this.defaultCameraNear=.1*this.defaultEyeZ,this.defaultCameraFar=10*this.defaultEyeZ}},{key:"_setDefaultCamera",value:function(){this.cameraFOV=this.defaultCameraFOV,this.aspectRatio=this.defaultAspectRatio,this.eyeX=this.defaultEyeX,this.eyeY=this.defaultEyeY,this.eyeZ=this.defaultEyeZ,this.centerX=this.defaultCenterX,this.centerY=this.defaultCenterY,this.centerZ=this.defaultCenterZ,this.upX=0,this.upY=1,this.upZ=0,this.cameraNear=this.defaultCameraNear,this.cameraFar=this.defaultCameraFar,this.perspective(),this.camera(),this.cameraType="default"}},{key:"_resize",value:function(){"default"===this.cameraType&&(this._computeCameraDefaultSettings(),this.cameraFOV=this.defaultCameraFOV,this.aspectRatio=this.defaultAspectRatio,this.perspective())}},{key:"copy",value:function(){var t=new n.default.Camera(this._renderer);return t.cameraFOV=this.cameraFOV,t.aspectRatio=this.aspectRatio,t.eyeX=this.eyeX,t.eyeY=this.eyeY,t.eyeZ=this.eyeZ,t.centerX=this.centerX,t.centerY=this.centerY,t.centerZ=this.centerZ,t.upX=this.upX,t.upY=this.upY,t.upZ=this.upZ,t.cameraNear=this.cameraNear,t.cameraFar=this.cameraFar,t.cameraType=this.cameraType,t.useLinePerspective=this.useLinePerspective,t.cameraMatrix=this.cameraMatrix.copy(),t.projMatrix=this.projMatrix.copy(),t.yScale=this.yScale,t}},{key:"_getLocalAxes",value:function(){var t=this.eyeX-this.centerX,r=this.eyeY-this.centerY,o=this.eyeZ-this.centerZ,n=Math.sqrt(t*t+r*r+o*o),n=(0!==n&&(t/=n,r/=n,o/=n),this.upX),s=(l=this.upY)*o-(u=this.upZ)*r,i=-n*o+u*t,a=n*r-l*t,n=r*a-o*i,l=-t*a+o*s,u=t*i-r*s,c=Math.sqrt(s*s+i*i+a*a),c=(0!==c&&(s/=c,i/=c,a/=c),Math.sqrt(n*n+l*l+u*u));return 0!==c&&(n/=c,l/=c,u/=c),{x:[s,i,a],y:[n,l,u],z:[t,r,o]}}},{key:"_orbit",value:function(t,r,o){var s=this.eyeX-this.centerX,i=this.eyeY-this.centerY,a=this.eyeZ-this.centerZ,l=Math.hypot(s,i,a),s=new n.default.Vector(s,i,a).normalize(),i=new n.default.Vector(this.upX,this.upY,this.upZ).normalize(),a=n.default.Vector.cross(i,s).normalize(),u=n.default.Vector.cross(a,i),o=((l=(l*=Math.pow(10,o))<this.cameraNear?this.cameraNear:l)>this.cameraFar&&(l=this.cameraFar),Math.acos(Math.max(-1,Math.min(1,n.default.Vector.dot(s,i))))+r),r=t;(o<=0||o>=Math.PI)&&(this.upX*=-1,this.upY*=-1,this.upZ*=-1),i.mult(Math.cos(o)),u.mult(Math.cos(r)*Math.sin(o)),a.mult(Math.sin(r)*Math.sin(o)),s.set(i).add(u).add(a),this.eyeX=l*s.x+this.centerX,this.eyeY=l*s.y+this.centerY,this.eyeZ=l*s.z+this.centerZ,this.camera(this.eyeX,this.eyeY,this.eyeZ,this.centerX,this.centerY,this.centerZ,this.upX,this.upY,this.upZ)}},{key:"_orbitFree",value:function(t,r,o){var s=this.eyeX-this.centerX,i=this.eyeY-this.centerY,a=this.eyeZ-this.centerZ,l=Math.hypot(s,i,a),s=new n.default.Vector(s,i,a).normalize(),i=new n.default.Vector(this.upX,this.upY,this.upZ),a=n.default.Vector.cross(i,s).normalize(),u=n.default.Vector.cross(s,a),c=Math.atan2(r,t),c=(u.mult(Math.sin(c)),a.mult(Math.cos(c)).add(u),Math.sqrt(t*t+r*r)),u=n.default.Vector.cross(s,a),t=((l=(l*=Math.pow(10,o))<this.cameraNear?this.cameraNear:l)>
1this.cameraFar&&(l=this.cameraFar),Math.cos(c)),r=Math.sin(c),o=i.dot(s),c=i.dot(a),d=o*t+c*r,o=-o*r+c*t,c=i.dot(u);i.x=d*s.x+o*a.x+c*u.x,i.y=d*s.y+o*a.y+c*u.y,i.z=d*s.z+o*a.z+c*u.z,a.mult(-r),s.mult(t).add(a).mult(l),this.camera(s.x+this.centerX,s.y+this.centerY,s.z+this.centerZ,this.centerX,this.centerY,this.centerZ,i.x,i.y,i.z)}},{key:"_isActive",value:function(){return this===this._renderer._curCamera}}],s(o.prototype,t),r&&s(o,r),o}(),n.default.prototype.setCamera=function(t){this._renderer._curCamera=t,this._renderer.uPMatrix.set(t.projMatrix),this._renderer.uViewMatrix.set(t.cameraMatrix)},t=n.default.Camera,o.default=t},{"../core/main":283,"core-js/modules/es.array.slice":169,"core-js/modules/es.math.hypot":176,"core-js/modules/es.string.sub":208}],333:[function(t,r,o){"use strict";function n(t,r){for(var o=0;o<r.length;o++){var n=r[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}t("core-js/modules/es.array.iterator"),t("core-js/modules/es.array.slice"),t("core-js/modules/es.math.log2"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.typed-array.float32-array"),t("core-js/modules/es.typed-array.copy-within"),t("core-js/modules/es.typed-array.every"),t("core-js/modules/es.typed-array.fill"),t("core-js/modules/es.typed-array.filter"),t("core-js/modules/es.typed-array.find"),t("core-js/modules/es.typed-array.find-index"),t("core-js/modules/es.typed-array.for-each"),t("core-js/modules/es.typed-array.includes"),t("core-js/modules/es.typed-array.index-of"),t("core-js/modules/es.typed-array.iterator"),t("core-js/modules/es.typed-array.join"),t("core-js/modules/es.typed-array.last-index-of"),t("core-js/modules/es.typed-array.map"),t("core-js/modules/es.typed-array.reduce"),t("
1core-js/modules/es.typed-array.reduce-right"),t("core-js/modules/es.typed-array.reverse"),t("core-js/modules/es.typed-array.set"),t("core-js/modules/es.typed-array.slice"),t("core-js/modules/es.typed-array.some"),t("core-js/modules/es.typed-array.sort"),t("core-js/modules/es.typed-array.subarray"),t("core-js/modules/es.typed-array.to-locale-string"),t("core-js/modules/es.typed-array.to-string"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.array.slice"),t("core-js/modules/es.math.log2"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.typed-array.float32-array"),t("core-js/modules/es.typed-array.copy-within"),t("core-js/modules/es.typed-array.every"),t("core-js/modules/es.typed-array.fill"),t("core-js/modules/es.typed-array.filter"),t("core-js/modules/es.typed-array.find"),t("core-js/modules/es.typed-array.find-index"),t("core-js/modules/es.typed-array.for-each"),t("core-js/modules/es.typed-array.includes"),t("core-js/modules/es.typed-array.index-of"),t("core-js/modules/es.typed-array.iterator"),t("core-js/modules/es.typed-array.join"),t("core-js/modules/es.typed-array.last-index-of"),t("core-js/modules/es.typed-array.map"),t("core-js/modules/es.typed-array.reduce"),t("
1core-js/modules/es.typed-array.reduce-right"),t("core-js/modules/es.typed-array.reverse"),t("core-js/modules/es.typed-array.set"),t("core-js/modules/es.typed-array.slice"),t("core-js/modules/es.typed-array.some"),t("core-js/modules/es.typed-array.sort"),t("core-js/modules/es.typed-array.subarray"),t("core-js/modules/es.typed-array.to-locale-string"),t("core-js/modules/es.typed-array.to-string"),Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,(t=(t=t("../core/main"))&&t.__esModule?t:{default:t}).default.DataArray=function(){var t,r;function o(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:128;if(!(this instanceof o))throw TypeError("Cannot call a class as a function");this.length=0,this.data=new Float32Array(t),this.initialLength=t}return t=[{key:"dataArray",value:function(){return this.subArray(0,this.length)}},{key:"clear",value:function(){this.length=0}},{key:"rescale",value:function(){var t;this.length<this.data.length/2&&((t=new Float32Array(t=1<<Math.ceil(Math.log2(this.length)))).set(this.data.subarray(0,this.length),0),this.data=t)}},{key:"reset",value:function(){this.clear(),this.data=new Float32Array(this.initialLength)}},{key:"push",value:function(){for(var t=arguments.length,r=Array(t),o=0;o<t;o++)r[o]=arguments[o];this.ensureLength(this.length+r.length),this.data.set(r,this.length),this.length+=r.length}},{key:"slice",value:function(t,r){return this.data.slice(t,Math.min(r,this.length))}},{key:"subArray",value:function(t,r){return this.data.subarray(t,Math.min(r,this.length))}},{key:"ensureLength",value:function(t){for(;this.data.length<t;){var r=new Float32Array(2*this.data.length);r.set(this.data,0),this.data=r}}}],n(o.prototype,t),r&&n(o,r),o}(),t=t.default.DataArray,o.default=t},{"../core/main":283,"core-js/modules/es.array.iterator":165,"core-js/modules/es.array.slice":169,"core-js/modules/es.math.log2":177,"core-js/modules/es.object.to-string":190,"core-js/modules/es.typed-array.copy-within":213,"core-js/modules/es.typed-array.every":214,"core-js/modules/es.typed-array.fill":215,"core-js/modules/es.typed-array.filter":216,"core-js/modules/es.typed-array.find":218,"core-js/modules/es.typed-array.find-index":217,"core-js/modules/es.typed-array.float32-array":219,"core-js/modules/es.typed-array.for-each":221,"core-js/modules/es.typed-array.includes":222,"core-js/modules/es.typed-array.index-of":223,"core-js/modules/es.typed-array.iterator":226,"core-js/modules/es.typed-array.join":227,"core-js/modules/es.typed-array.last-index-of":228,"core-js/modules/es.typed-array.map":229,"core-js/modules/es.typed-array.reduce":231,"core-js/modules/es.typed-array.reduce-right":230,"core-js/modules/es.typed-array.reverse":232,"core-js/modules/es.typed-array.set":233,"core-js/modules/es.typed-array.slice":234,"core-js/modules/es.typed-array.some":235,"core-js/modules/es.typed-array.sort":236,"core-js/modules/es.typed-array.subarray":237,"core-js/modules/es.typed-array.to-locale-string":238,"core-js/modules/es.typed-array.to-string":239}],334:[function(t,r,o){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function s(t){return(s="function"==typeof Symbol&&"symbol"===n(Symbol.iterator)?function(t){return n(t)}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":n(t)})(t)}t("core-js/modules/es.symbol"),t("core-js/modules/es.symbol.description"),t("core-js/modules/es.symbol.iterator"),t("core-js/modules/es.array.fill"),t("core-js/modules/es.array.includes"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.object.get-own-property-descriptor"),t("core-js/modules/es.object.get-prototype-of"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.reflect.construct"),t("core-js/modules/es.reflect.get"),t("core-js/modules/es.regexp.to-string"),t("core-js/modules/es.string.includes"),t("core-js/modules/es.string.iterator"),t("core-js/modules/es.typed-array.float32-array"),t("core-js/modules/es.typed-array.uint8-array"),t("core-js/modules/es.typed-array.uint8-clamped-array"),t("core-js/modules/es.typed-array.copy-within"),t("core-js/modules/es.typed-array.every"),t("core-js/modules/es.typed-array.fill"),t("core-js/modules/es.typed-array.filter"),t("core-js/modules/es.typed-array.find"),t("core-js/modules/es.typed-array.find-index"),t("core-js/modules/es.typed-array.for-each"),t("core-js/modules/es.typed-array.includes"),t("core-js/modules/es.typed-array.index-of"),t("core-js/modules/es.typed-array.iterator"),t("core-js/modules/es.typed-array.join"),t("core-js/modules/es.typed-array.last-index-of"),t("core-js/modules/es.typed-array.map"),t("core-js/modules/es.typed-array.reduce"),t("
1core-js/modules/es.typed-array.reduce-right"),t("core-js/modules/es.typed-array.reverse"),t("core-js/modules/es.typed-array.set"),t("core-js/modules/es.typed-array.slice"),t("core-js/modules/es.typed-array.some"),t("core-js/modules/es.typed-array.sort"),t("core-js/modules/es.typed-array.subarray"),t("core-js/modules/es.typed-array.to-locale-string"),t("core-js/modules/es.typed-array.to-string"),t("core-js/modules/es.weak-map"),t("core-js/modules/web.dom-collections.iterator"),t("core-js/modules/es.array.fill"),t("core-js/modules/es.array.includes"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.object.get-prototype-of"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.string.includes"),t("core-js/modules/es.typed-array.float32-array"),t("core-js/modules/es.typed-array.uint8-array"),t("core-js/modules/es.typed-array.uint8-clamped-array"),t("core-js/modules/es.typed-array.copy-within"),t("core-js/modules/es.typed-array.every"),t("core-js/modules/es.typed-array.fill"),t("core-js/modules/es.typed-array.filter"),t("core-js/modules/es.typed-array.find"),t("core-js/modules/es.typed-array.find-index"),t("core-js/modules/es.typed-array.for-each"),t("core-js/modules/es.typed-array.includes"),t("core-js/modules/es.typed-array.index-of"),t("core-js/modules/es.typed-array.iterator"),t("core-js/modules/es.typed-array.join"),t("core-js/modules/es.typed-array.last-index-of"),t("core-js/modules/es.typed-array.map"),t("core-js/modules/es.typed-array.reduce"),t("
1core-js/modules/es.typed-array.reduce-right"),t("core-js/modules/es.typed-array.reverse"),t("core-js/modules/es.typed-array.set"),t("core-js/modules/es.typed-array.slice"),t("core-js/modules/es.typed-array.some"),t("core-js/modules/es.typed-array.sort"),t("core-js/modules/es.typed-array.subarray"),t("core-js/modules/es.typed-array.to-locale-string"),t("core-js/modules/es.typed-array.to-string"),Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;var i=(_=t("../core/main"))&&_.__esModule?_:{default:_},a=function(t){if(t&&t.__esModule)return t;if(null===t||"object"!==s(t)&&"function"!=typeof t)return{default:t};var r,o=c();if(o&&o.has(t))return o.get(t);var n,i={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(n in t)Object.prototype.hasOwnProperty.call(t,n)&&((r=a?Object.getOwnPropertyDescriptor(t,n):null)&&(r.get||r.set)?Object.defineProperty(i,n,r):i[n]=t[n]);return i.default=t,o&&o.set(t,i),i}(t("../core/constants")),l=t("./p5.Texture"),u=t("./p5.RendererGL");function c(){var t;return"function"!=typeof WeakMap?null:(t=new WeakMap,c=function(){return t},t)}function d(t,r,o){return r in t?Object.defineProperty(t,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[r]=o,t}function h(t,r){if(!(t instanceof r))throw TypeError("Cannot call a class as a function")}function f(t,r){for(var o=0;o<r.length;o++){var n=r[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function p(t,r,o){r&&f(t.prototype,r),o&&f(t,o)}function m(t,r,o){return(m="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,r,o){var t=function(t,r){for(;!Object.prototype.hasOwnProperty.call(t,r)&&null!==(t=g(t)););return t}(t,r);if(t)return(t=Object.getOwnPropertyDescriptor(t,r)).get?t.get.call(o):t.value})(t,r,o||t)}function y(t,r){return(y=Object.setPrototypeOf||function(t,r){return t.__proto__=r,t})(t,r)}function g(t){return(g=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var v=function(t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");o.prototype=Object.create(t&&t.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),t&&y(o,t);var r=function(){var t,r=g(o),r=(t=!function(){if("undefined"!=typeof Reflect&&Reflect.construct&&!Reflect.construct.sham){if("function"==typeof Proxy)return 1;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),1}catch(t){}}}()?r.apply(this,arguments):Reflect.construct(r,arguments,t=g(this).constructor),this);if(!t||"object"!==s(t)&&"function"!=typeof t){if(void 0!==r)return r;throw ReferenceError("this hasn't been initialised - super() hasn't been called")}return t};function o(t){var n;return h(this,o),(n=r.call(this,t.target._renderer)).fbo=t,n.yScale=-1,n}return p(o,[{key:"_computeCameraDefaultSettings",value:function(){m(g(o.prototype),"_computeCameraDefaultSettings",this).call(this),this.defaultAspectRatio=this.fbo.width/this.fbo.height,this.defaultCameraFOV=2*Math.atan(this.fbo.height/2/this.defaultEyeZ)}}]),o}(i.default.Camera),b=(i.default.FramebufferCamera=v,function(){function t(r,o){h(this,t),this.framebuffer=r,this.property=o}return p(t,[{key:"rawTexture",value:function(){return this.framebuffer[this.property]}},{key:"width",get:function(){return this.framebuffer.width*this.framebuffer.density}},{key:"height",get:function(){return this.framebuffer.height*this.framebuffer.density}}]),t}()),_=(i.default.FramebufferTexture=b,function(){function t(r){var o=this,n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},s=(h(this,t),this.target=r,this.target._renderer.framebuffers.add(this),this._isClipApplied=!1,this.pixels=[],this.format=n.format||a.UNSIGNED_BYTE,this.channels=n.channels||(r._renderer._pInst._glAttributes.alpha?a.RGBA:a.RGB),this.useDepth=void 0===n.depth||n.depth,this.depthFormat=n.depthFormat||a.FLOAT,this.textureFiltering=n.textureFiltering||a.LINEAR,void 0===n.antialias?this.antialiasSamples=r._renderer._pInst._glAttributes.antialias?2:0:"number"==typeof n.antialias?this.antialiasSamples=n.antialias:this.antialiasSamples=n.antialias?2:0,this.antialias=0<this.antialiasSamples,this.antialias&&r.webglVersion!==a.WEBGL2&&(console.warn("Antialiasing is unsupported in a WebGL 1 context"),this.antialias=!1),this.density=n.density||r.pixelDensity(),r._renderer.GL);if(this.gl=s,n.width&&n.height?(i=r._renderer._adjustDimensions(n.width,n.height),this.width=i.adjustedWidth,this.height=i.adjustedHeight,this._autoSized=!1):(void 0===n.width!=(void 0===n.height)&&console.warn("Please supply both width and height for a framebuffer to give it a size. Only one was given, so the framebuffer will match the size of its canvas."),this.width=r.width,this.height=r.height,this._autoSized=!0),this._checkIfFormatsAvailable(),n.stencil&&!this.useDepth&&console.warn("A stencil buffer can only be used if also using depth. Since the framebuffer has no depth buffer, the stencil buffer will be ignored."),this.useStencil=this.useDepth&&(void 0===n.stencil||n.stencil),this.framebuffer=s.createFramebuffer(),!this.framebuffer)throw Error("Unable to create a framebuffer");if(this.antialias&&(this.aaFramebuffer=s.createFramebuffer(),!this.aaFramebuffer))throw Error("Unable to create a framebuffer for antialiasing");this._recreateTextures();var i=this.target._renderer._curCamera;this.defaultCamera=this.createCamera(),this.filterCamera=this.createCamera(),this.target._renderer._curCamera=i,this.draw(function(){return o.target.clear()})}return p(t,[{key:"resize",value:function(t,r){this._autoSized=!1;var o=this.target._renderer._adjustDimensions(t,r);t=o.adjustedWidth,r=o.adjustedHeight,this.width=t,this.height=r,this._handleResize()}},{key:"pixelDensity",value:function(t){if(!t)return this.density;this._autoSized=!1,this.density=t,this._handleResize()}},{key:"autoSized",value:function(t){if(void 0===t)return this._autoSized;this._autoSized=t,this._handleResize()}},{key:"_checkIfFormatsAvailable",value:function(){var t=this.gl,t=(this.useDepth&&this.target.webglVersion===a.WEBGL&&
1!t.getExtension("WEBGL_depth_texture")&&(console.warn("Unable to create depth textures in this environment. Falling back to a framebuffer without depth."),this.useDepth=!1),this.useDepth&&this.target.webglVersion===a.WEBGL&&this.depthFormat===a.FLOAT&&(console.warn("FLOAT depth format is unavailable in WebGL 1. Defaulting to UNSIGNED_INT."),this.depthFormat=a.UNSIGNED_INT),[a.UNSIGNED_BYTE,a.FLOAT,a.HALF_FLOAT].includes(this.format)||(console.warn("Unknown Framebuffer format. Please use UNSIGNED_BYTE, FLOAT, or HALF_FLOAT. Defaulting to UNSIGNED_BYTE."),this.format=a.UNSIGNED_BYTE),this.useDepth&&![a.UNSIGNED_INT,a.FLOAT].includes(this.depthFormat)&&(console.warn("Unknown Framebuffer depth format. Please use UNSIGNED_INT or FLOAT. Defaulting to FLOAT."),this.depthFormat=a.FLOAT),(0,l.checkWebGLCapabilities)(this.target._renderer));t.float||this.format!==a.FLOAT||(console.warn("This environment does not support FLOAT textures. Falling back to UNSIGNED_BYTE."),this.format=a.UNSIGNED_BYTE),this.useDepth&&!t.float&&this.depthFormat===a.FLOAT&&(console.warn("This environment does not support FLOAT depth textures. Falling back to UNSIGNED_INT."),this.depthFormat=a.UNSIGNED_INT),t.halfFloat||this.format!==a.HALF_FLOAT||(console.warn("This environment does not support HALF_FLOAT textures. Falling back to UNSIGNED_BYTE."),this.format=a.UNSIGNED_BYTE),this.channels===a.RGB&&[a.FLOAT,a.HALF_FLOAT].includes(this.format)&&(console.warn("FLOAT and HALF_FLOAT formats do not work cross-platform with only RGB channels. Falling back to RGBA."),this.channels=a.RGBA)}},{key:"_recreateTextures",value:function(){var t=this.gl,r=(this._updateSize(),t.getParameter(t.TEXTURE_BINDING_2D)),o=t.getParameter(t.FRAMEBUFFER_BINDING),n=t.createTexture();if(!n)throw Error("Unable to create color texture");t.bindTexture(t.TEXTURE_2D,n);var s=this._glColorFormat();if(t.texImage2D(t.TEXTURE_2D,0,s.internalFormat,this.width*this.density,this.height*this.density,0,s.format,s.type,null),this.colorTexture=n,t.bindFramebuffer(t.FRAMEBUFFER,this.framebuffer),t.framebufferTexture2D(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,n,0),this.useDepth){var n=t.createTexture();if(!n)throw Error("Unable to create depth texture");var l=this._glDepthFormat();t.bindTexture(t.TEXTURE_2D,n),t.texImage2D(t.TEXTURE_2D,0,l.internalFormat,this.width*this.density,this.height*this.density,0,l.format,l.type,null),t.framebufferTexture2D(t.FRAMEBUFFER,this.useStencil?t.DEPTH_STENCIL_ATTACHMENT:t.DEPTH_ATTACHMENT,t.TEXTURE_2D,n,0),this.depthTexture=n}this.antialias&&(this.colorRenderbuffer=t.createRenderbuffer(),t.bindRenderbuffer(t.RENDERBUFFER,this.colorRenderbuffer),t.renderbufferStorageMultisample(t.RENDERBUFFER,Math.max(0,Math.min(this.antialiasSamples,t.getParameter(t.MAX_SAMPLES))),s.internalFormat,this.width*this.density,this.height*this.density),this.useDepth&&(l=this._glDepthFormat(),this.depthRenderbuffer=t.createRenderbuffer(),t.bindRenderbuffer(t.RENDERBUFFER,this.depthRenderbuffer),t.renderbufferStorageMultisample(t.RENDERBUFFER,Math.max(0,Math.min(this.antialiasSamples,t.getParameter(t.MAX_SAMPLES))),l.internalFormat,this.width*this.density,this.height*this.density)),t.bindFramebuffer(t.FRAMEBUFFER,this.aaFramebuffer),t.framebufferRenderbuffer(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.RENDERBUFFER,this.colorRenderbuffer),this.useDepth&&t.framebufferRenderbuffer(t.FRAMEBUFFER,this.useStencil?t.DEPTH_STENCIL_ATTACHMENT:t.DEPTH_ATTACHMENT,t.RENDERBUFFER,this.depthRenderbuffer)),this.useDepth&&(this.depth=new b(this,"depthTexture"),n=t.NEAREST,this.depthP5Texture=new i.default.Texture(this.target._renderer,this.depth,{minFilter:n,magFilter:n}),this.target._renderer.textures.set(this.depth,this.depthP5Texture)),this.color=new b(this,"colorTexture"),s=this.textureFiltering===a.LINEAR?t.LINEAR:t.NEAREST,this.colorP5Texture=new i.default.Texture(this.target._renderer,this.color,{minFilter:s,magFilter:s}),this.target._renderer.textures.set(this.color,this.colorP5Texture),t.bindTexture(t.TEXTURE_2D,r),t.bindFramebuffer(t.FRAMEBUFFER,o)}},{key:"_glColorFormat",value:function(){var t,r,o=this.gl,n=this.format===a.FLOAT?o.FLOAT:this.format===a.HALF_FLOAT?this.target.webglVersion===a.WEBGL2?o.HALF_FLOAT:o.getExtension("OES_texture_half_float").HALF_FLOAT_OES:o.UNSIGNED_BYTE,s=this.channels===a.RGBA?o.RGBA:o.RGB;return{internalFormat:this.target.webglVersion===a.WEBGL2?(d(r={},o.FLOAT,d({},o.RGBA,o.RGBA32F)),d(r,o.HALF_FLOAT,d({},o.RGBA,o.RGBA16F)),d(r,o.UNSIGNED_BYTE,(d(t={},o.RGBA,o.RGBA8),d(t,o.RGB,o.RGB8),t)),r[n][s]):this.format===a.HALF_FLOAT?o.RGBA:s,format:s,type:n}}},{key:"_glDepthFormat",value:function(){var t=this.gl,r=this.useStencil?this.depthFormat===a.FLOAT?t.FLOAT_32_UNSIGNED_INT_24_8_REV:this.target.webglVersion===a.WEBGL2?t.UNSIGNED_INT_24_8:t.getExtension("WEBGL_depth_texture").UNSIGNED_INT_24_8_WEBGL:this.depthFormat===a.FLOAT?t.FLOAT:t.UNSIGNED_INT,o=this.useStencil?t.DEPTH_STENCIL:t.DEPTH_COMPONENT,t=this.useStencil?this.depthFormat===a.FLOAT?t.DEPTH32F_STENCIL8:this.target.webglVersion===a.WEBGL2?t.DEPTH24_STENCIL8:t.DEPTH_STENCIL:this.target.webglVersion===a.WEBGL2?this.depthFormat===a.FLOAT?t.DEPTH_COMPONENT32F:t.DEPTH_COMPONENT24:t.DEPTH_COMPONENT;return{internalFormat:t,format:o,type:r}}},{key:"_updateSize",value:function(){this._autoSized&&(this.width=this.target.width,this.height=this.target.height,this.density=this.target.pixelDensity())}},{key:"_canvasSizeChanged",value:function(){this._autoSized&&this._handleResize()}},{key:"_handleResize",value:function(){var t=this.color,r=this.depth,o=this.colorRen
1derbuffer,n=this.depthRenderbuffer,t=(this._deleteTexture(t),r&&this._deleteTexture(r),this.gl);o&&t.deleteRenderbuffer(o),n&&t.deleteRenderbuffer(n),this._recreateTextures(),this.defaultCamera._resize()}},{key:"createCamera",value:function(){var t=new v(this);return t._computeCameraDefaultSettings(),t._setDefaultCamera(),this.target._renderer._curCamera=t}},{key:"_deleteTexture",value:function(t){this.gl.deleteTexture(t.rawTexture()),this.target._renderer.textures.delete(t)}},{key:"remove",value:function(){var t=this.gl;this._deleteTexture(this.color),this.depth&&this._deleteTexture(this.depth),t.deleteFramebuffer(this.framebuffer),this.aaFramebuffer&&t.deleteFramebuffer(this.aaFramebuffer),this.depthRenderbuffer&&t.deleteRenderbuffer(this.depthRenderbuffer),this.colorRenderbuffer&&t.deleteRenderbuffer(this.colorRenderbuffer),this.target._renderer.framebuffers.delete(this)}},{key:"begin",value:function(){this.prevFramebuffer=this.target._renderer.activeFramebuffer(),this.prevFramebuffer&&this.prevFramebuffer._beforeEnd(),this.target._renderer.activeFramebuffers.push(this),this._beforeBegin(),this.target.push(),this.target.setCamera(this.defaultCamera),this.target.resetMatrix(),this.target._renderer.uViewMatrix.set(this.target._renderer._curCamera.cameraMatrix),this.target._renderer.uModelMatrix.reset(),this.target._renderer._applyStencilTestIfClipping()}},{key:"_framebufferToBind",value:function(){return this.antialias?this.aaFramebuffer:this.framebuffer}},{key:"_beforeBegin",value:function(){var t=this.gl;t.bindFramebuffer(t.FRAMEBUFFER,this._framebufferToBind()),this.target._renderer.viewport(this.width*this.density,this.height*this.density)}},{key:"_beforeEnd",value:function(){if(this.antialias){var t=this.gl,r=(t.bindFramebuffer(t.READ_FRAMEBUFFER,this.aaFramebuffer),t.bindFramebuffer(t.DRAW_FRAMEBUFFER,this.framebuffer),[[t.COLOR_BUFFER_BIT,this.colorP5Texture.glMagFilter]]);this.useDepth&&r.push([t.DEPTH_BUFFER_BIT,this.depthP5Texture.glMagFilter]);for(var o=0;o<r.length;o++){var n,s=function(t){if(Array.isArray(t))return t}(n=r[o])||function(t,r){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t)){var o=[],n=!0,s=!1,i=void 0;try{for(var a,l=t[Symbol.iterator]();!(n=(a=l.next()).done)&&(o.push(a.value),2!==o.length);n=!0);}catch(t){s=!0,i=t}finally{try{n||null==l.return||l.return()}finally{if(s)throw i}}return o}}(n,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance")}(),i=s[0],s=s[1];t.blitFramebuffer(0,0,this.width*this.density,this.height*this.density,0,0,this.width*this.density,this.height*this.density,i,s)}}}},{key:"end",value:function(){var t=this.gl;if(this.target.pop(),this.target._renderer.activeFramebuffers.pop()!==this)throw Error("It looks like you've called end() while another Framebuffer is active.");this._beforeEnd(),this.prevFramebuffer?this.prevFramebuffer._beforeBegin():(t.bindFramebuffer(t.FRAMEBUFFER,null),this.target._renderer.viewport(this.target._renderer._origViewport.width,this.target._renderer._origViewport.height)),this.target._renderer._applyStencilTestIfClipping()}},{key:"draw",value:function(t){this.begin(),t(),this.end()}},{key:"loadPixels",value:function(){var t=this.gl,r=this.target._renderer.activeFramebuffer(),o=(t.bindFramebuffer(t.FRAMEBUFFER,this.framebuffer),this._glColorFormat());this.pixels=(0,u.readPixelsWebGL)(this.pixels,t,this.framebuffer,0,0,this.width*this.density,this.height*this.density,o.format,o.type),r?t.bindFramebuffer(t.FRAMEBUFFER,r._framebufferToBind()):t.bindFramebuffer(t.FRAMEBUFFER,null)}},{key:"get",value:function(t,r,o,n){i.default._validateParameters("p5.Framebuffer.get",arguments);var s=this._glColorFormat();if(void 0===t&&void 0===r)r=t=0,o=this.width,n=this.height;else if(void 0===o&&void 0===n)return(t<0||r<0||t>=this.width||r>=this.height)&&(console.warn("The x and y values passed to p5.Framebuffer.get are outside of its range and will be clamped."),t=this.target.constrain(t,0,this.width-1),r=this.target.constrain(r,0,this.height-1)),(0,u.readPixelWebGL)(this.gl,this.framebuffer,t*this.density,r*this.density,s.format,s.type);t=this.target.constrain(t,0,this.width-1),r=this.target.constrain(r,0,this.height-1),o=this.target.constrain(o,1,this.width-t),n=this.target.constrain(n,1,this.height-r);for(var a=(0,u.readPixelsWebGL)(void 0,this.gl,this.framebuffer,t*this.density,r*this.density,o*this.density,n*this.density,s.format,s.type),l=new Uint8ClampedArray(o*n*this.density*this.density*4),c=(l.f
1ill(255),s.type===this.gl.RGB?3:4),d=0;d<n*this.density;d++)for(var h=0;h<o*this.density;h++)for(var f=0;f<4;f++){var p,m=4*(d*o*this.density+h)+f;f<c&&(p=4==c?m:(d*o*this.density+h)*c+f,l[m]=a[p])}return(t=new i.default.Image(o*this.density,n*this.density)).imageData=t.canvas.getContext("2d").createImageData(t.width,t.height),t.imageData.data.set(l),t.pixels=t.imageData.data,t.updatePixels(),1!==this.density&&t.resize(o,n),t}},{key:"updatePixels",value:function(){var t=this.gl,r=(this.colorP5Texture.bindTexture(),this._glColorFormat()),o=r.format===t.RGBA?4:3,o=this.width*this.height*this.density*this.density*o,n=r.type===t.UNSIGNED_BYTE?Uint8Array:Float32Array;if(!(this.pixels instanceof n)||this.pixels.length!==o)throw Error("The pixels array has not been set correctly. Please call loadPixels() before updatePixels().");t.texImage2D(t.TEXTURE_2D,0,r.internalFormat,this.width*this.density,this.height*this.density,0,r.format,r.type,this.pixels),this.colorP5Texture.unbindTexture(),n=this.target._renderer.activeFramebuffer(),this.antialias?(this.begin(),this.target.push(),this.target.imageMode(this.target.CENTER),this.target.resetMatrix(),this.target.noStroke(),this.target.clear(),this.target.image(this,0,0),this.target.pop(),this.useDepth&&(t.clearDepth(1),t.clear(t.DEPTH_BUFFER_BIT)),this.end()):(t.bindFramebuffer(t.FRAMEBUFFER,this.framebuffer),this.useDepth&&(t.clearDepth(1),t.clear(t.DEPTH_BUFFER_BIT)),n?t.bindFramebuffer(t.FRAMEBUFFER,n._framebufferToBind()):t.bindFramebuffer(t.FRAMEBUFFER,null))}}]),t}()),t=i.default.Framebuffer=_;o.default=t},{"../core/constants":272,"../core/main":283,"./p5.RendererGL":341,"./p5.Texture":343,"core-js/modules/es.array.fill":156,"core-js/modules/es.array.includes":163,"core-js/modules/es.array.iterator":165,"core-js/modules/es.object.get-own-property-descriptor":186,"core-js/modules/es.object.get-prototype-of":188,"core-js/modules/es.object.to-string":190,"core-js/modules/es.reflect.construct":192,"core-js/modules/es.reflect.get":193,"core-js/modules/es.regexp.to-string":196,"core-js/modules/es.string.includes":199,"core-js/modules/es.string.iterator":200,"core-js/modules/es.symbol":212,"core-js/modules/es.symbol.description":210,"core-js/modules/es.symbol.iterator":211,"core-js/modules/es.typed-array.copy-within":213,"core-js/modules/es.typed-array.every":214,"core-js/modules/es.typed-array.fill":215,"core-js/modules/es.typed-array.filter":216,"core-js/modules/es.typed-array.find":218,"core-js/modules/es.typed-array.find-index":217,"core-js/modules/es.typed-array.float32-array":219,"core-js/modules/es.typed-array.for-each":221,"core-js/modules/es.typed-array.includes":222,"core-js/modules/es.typed-array.index-of":223,"core-js/modules/es.typed-array.iterator":226,"core-js/modules/es.typed-array.join":227,"core-js/modules/es.typed-array.last-index-of":228,"core-js/modules/es.typed-array.map":229,"core-js/modules/es.typed-array.reduce":231,"core-js/modules/es.typed-array.reduce-right":230,"core-js/modules/es.typed-array.reverse":232,"core-js/modules/es.typed-array.set":233,"core-js/modules/es.typed-array.slice":234,"core-js/modules/es.typed-array.some":235,"core-js/modules/es.typed-array.sort":236,"core-js/modules/es.typed-array.subarray":237,"core-js/modules/es.typed-array.to-locale-string":238,"core-js/modules/es.typed-array.to-string":239,"core-js/modules/es.typed-array.uint8-array":242,"core-js/modules/es.typed-array.uint8-clamped-array":243,"core-js/modules/es.weak-map":244,"core-js/modules/web.dom-collections.iterator":246}],335:[function(t,r,o){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function s(t){return(s="function"==typeof Symbol&&"symbol"===n(Symbol.iterator)?function(t){return n(t)}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":n(t)})(t)}t("core-js/modules/es.symbol"),t("core-js/modules/es.symbol.description"),t("core-js/modules/es.symbol.iterator"),t("core-js/modules/es.array.
1concat"),t("core-js/modules/es.array.flat"),t("core-js/modules/es.array.for-each"),t("core-js/modules/es.array.from"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.array.last-index-of"),t("core-js/modules/es.array.map"),t("core-js/modules/es.array.slice"),t("core-js/modules/es.array.unscopables.flat"),t("core-js/modules/es.array-buffer.constructor"),t("core-js/modules/es.map"),t("core-js/modules/es.number.constructor"),t("core-js/modules/es.object.entries"),t("core-js/modules/es.object.get-own-property-descriptor"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.regexp.to-string"),t("core-js/modules/es.set"),t("core-js/modules/es.string.iterator"),t("core-js/modules/es.string.sub"),t("core-js/modules/es.weak-map"),t("core-js/modules/web.dom-collections.for-each"),t("core-js/modules/web.dom-collections.iterator"),t("core-js/modules/es.symbol"),t("core-js/modules/es.symbol.description"),t("core-js/modules/es.symbol.iterator"),t("core-js/modules/es.array.concat"),t("core-js/modules/es.array.flat"),t("core-js/modules/es.array.for-each"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.array.last-index-of"),t("core-js/modules/es.array.map"),t("core-js/modules/es.array.slice"),t("core-js/modules/es.array.unscopables.flat"),t("core-js/modules/es.array-buffer.constructor"),t("core-js/modules/es.map"),t("core-js/modules/es.number.constructor"),t("core-js/modules/es.object.entries"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.set"),t("core-js/modules/es.string.iterator"),t("core-js/modules/es.string.sub"),t("core-js/modules/web.dom-collections.for-each"),t("core-js/modules/web.dom-collections.iterator"),Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;var i=(h=t("../core/main"))&&h.__esModule?h:{default:h},a=function(t){if(t&&t.__esModule)return t;if(null===t||"object"!==s(t)&&"function"!=typeof t)return{default:t};var r,o=l();if(o&&o.has(t))return o.get(t);var n,i={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(n in t)Object.prototype.hasOwnProperty.call(t,n)&&((r=a?Object.getOwnPropertyDescriptor(t,n):null)&&(r.get||r.set)?Object.defineProperty(i,n,r):i[n]=t[n]);return i.default=t,o&&o.set(t,i),i}(t("../core/constants"));function l(){var t;return"function"!=typeof WeakMap?null:(t=new WeakMap,l=function(){return t},t)}function u(t){return function(t){if(Array.isArray(t)){for(var r=0,o=Array(t.length);r<t.length;r++)o[r]=t[r];return o}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw TypeError("Invalid attempt to spread non-iterable instance")}()}function c(t,r){return function(t){if(Array.isArray(t))return t}(t)||function(t,r){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t)){var o=[],n=!0,s=!1,i=void 0;try{for(var a,l=t[Symbol.iterator]();!(n=(a=l.next()).done)&&(o.push(a.value),!r||o.length!==r);n=!0);}catch(t){s=!0,i=t}finally{try{n||null==l.return||l.return()}finally{if(s)throw i}}return o}}(t,r)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance")}()}function d(t,r){for(var o=0;o<r.length;o++){var n=r[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}i.default.Geometry=function(){var t,r;function o(t,r,n){if(!(this instanceof o))throw TypeError("Cannot call a class as a function");this.vertices=[],this.boundingBoxCache=null,this.lineVertices=new i.default.DataArray,this.lineTangentsIn=new i.default.DataArray,this.lineTangentsOut=new i.default.DataArray,this.lineSides=new i.default.DataArray,this.vertexNormals=[],this.faces=[],this.uvs=[],this.edges=[],this.vertexColors=[],this.vertexStrokeColors=[],this.lineVertexColors=new i.default.DataArray,this.detailX=void 0!==t?t:1,this.detailY=void 0!==r?r:1,this.dirtyFlags={},this._hasFillTransparency=void 0,this._hasStrokeTransparency=void 0,n instanceof Function&&n.call(this)}return t=[{key:"calculateBoundingBox",value:function(){if(!this.boundingBoxCache){for(var t=new i.default.Vector(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE),r=new i.default.Vector(Number.MIN_VALUE,Number.MIN_VALUE,Number.MIN_VALUE),o=0;o<this.vertices.length;o++){var n=this.vertices[o];t.x=Math.min(t.x,n.x),t.y=Math.min(t.y,n.y),t.z=Math.min(t.z,n.z),r.x=Math.max(r.x,n.x),r.y=Math.max(r.y,n.y),r.z=Math.max(r.z,n.z)}var s=new i.default.Vector(r.x-t.x,r.y-t.y,r.z-t.z),a=new i.default.Vector((t.x+r.x)/2,(t.y+r.y)
1/2,(t.z+r.z)/2);this.boundingBoxCache={min:t,max:r,size:s,offset:a}}return this.boundingBoxCache}},{key:"reset",value:function(){this._hasFillTransparency=void 0,this._hasStrokeTransparency=void 0,this.lineVertices.clear(),this.lineTangentsIn.clear(),this.lineTangentsOut.clear(),this.lineSides.clear(),this.vertices.length=0,this.edges.length=0,this.vertexColors.length=0,this.vertexStrokeColors.length=0,this.lineVertexColors.clear(),this.vertexNormals.length=0,this.uvs.length=0,this.dirtyFlags={}}},{key:"hasFillTransparency",value:function(){if(void 0===this._hasFillTransparency){this._hasFillTransparency=!1;for(var t=0;t<this.vertexColors.length;t+=4)if(this.vertexColors[t+3]<1){this._hasFillTransparency=!0;break}}return this._hasFillTransparency}},{key:"hasStrokeTransparency",value:function(){if(void 0===this._hasStrokeTransparency){this._hasStrokeTransparency=!1;for(var t=0;t<this.lineVertexColors.length;t+=4)if(this.lineVertexColors[t+3]<1){this._hasStrokeTransparency=!0;break}}return this._hasStrokeTransparency}},{key:"clearColors",value:function(){return this.vertexColors=[],this}},{key:"saveObj",value:function(){var t=this,r=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"model.obj",o="";if(this.vertices.forEach(function(t){o+="v ".concat(t.x," ").concat(t.y," ").concat(t.z,"\n")}),this.uvs&&0<this.uvs.length)for(var n=0;n<this.uvs.length;n+=2)o+="vt ".concat(this.uvs[n]," ").concat(this.uvs[n+1],"\n");this.vertexNormals&&0<this.vertexNormals.length&&this.vertexNormals.forEach(function(t){o+="vn ".concat(t.x," ").concat(t.y," ").concat(t.z,"\n")}),this.faces.forEach(function(r){var n="f";r.forEach(function(r){n=n+" "+(r+1),(0<t.vertexNormals.length||0<t.uvs.length)&&(n+="/",0<t.uvs.length&&(n+=r+1),n+="/",0<t.vertexNormals.length&&(n+=r+1))}),o+=n+"\n"});var s=new Blob([o],{type:"text/plain"});i.default.prototype.downloadFile(s,r,"obj")}},{key:"saveStl",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"model.stl",r=(1<arguments.length&&void 0!==arguments[1]?arguments[1]:{}).binary,r=void 0!==r&&r,o=t.substring(0,t.lastIndexOf(".")),n=[],s=!0,a=!1,l=void 0;try{for(var u,d=this.faces[Symbol.iterator]();!(s=(u=d.next()).done);s=!0){var h=u.value,f=i.default.Vector.sub(this.vertices[h[1]],this.vertices[h[0]]),p=i.default.Vector.sub(this.vertices[h[2]],this.vertices[h[0]]),m=f.y*p.z-f.z*p.y,y=f.z*p.x-f.x*p.z,g=f.x*p.y-f.y*p.x;n.push(new i.default.Vector(m,y,g).normalize())}}catch(t){a=!0,l=t}finally{try{s||null==d.return||d.return()}finally{if(a)throw l}}if(r){var v,b=80,a=2*this.faces.length+3*this.faces.length*16+80+4,l=new ArrayBuffer(a);(v=new DataView(l)).setUint32(b,this.faces.length,!0),b+=4;for(var _=0,j=Object.entries(this.faces);_<j.length;_++){var x=c(j[_],2),w=x[0],x=x[1],w=n[w],S=(v.setFloat32(b,w.x,!0),b+=4,v.setFloat32(b,w.y,!0),b+=4,v.setFloat32(b,w.z,!0),b+=4,!0),w=!1,T=void 0;try{for(var E,M=x[Symbol.iterator]();!(S=(E=M.next()).done);S=!0){var k=E.value,O=this.vertices[k];v.setFloat32(b,O.x,!0),b+=4,v.setFloat32(b,O.y,!0),b+=4,v.setFloat32(b,O.z,!0),b+=4}}catch(t){w=!0,T=t}finally{try{S||null==M.return||M.return()}finally{if(w)throw T}}v.setUint16(b,0,!0),b+=2}}else{v="solid "+o+"\n";for(var C=0,P=Object.entries(this.faces);C<P.length;C++){var A=c(P[C],2),L=A[0],A=A[1],L=n[L],R=(v=v+(" facet norm "+L.x+" "+L.y)+" "+L.z+"\n outer loop\n",!0),L=!1,I=void 0;try{for(var D,F=A[Symbol.iterator]();!(R=(D=F.next()).done);R=!0){var N=D.value,U=this.vertices[N];v+=" vertex "+U.x+" "+U.y+" "+U.z+"\n"}}catch(t){L=!0,I=t}finally{try{R||null==F.return||F.return()}finally{if(L)throw I}}v+=" endloop\n endfacet\n"}v+="endsolid "+o+"\n"}r=new Blob([v],{type:"text/plain"}),i.default.prototype.downloadFile(r,t,"stl")}},{key:"flipU",value:function(){this.uvs=this.uvs.flat().map(function(t,r){return r%2==0?1-t:t})}},{key:"flipV",value:function(){this.uvs=this.uvs.flat().map(function(t,r){return r%2==0?t:1-t})}},{key:"computeFaces",value:function(){this.faces.length=0;for(var t,r,o,n=this.detailX+1,s=0;s<this.detailY;s++)for(var i=0;i<this.detailX;i++)r=(s+1)*n+i+1,this.faces.push([s*n+i,t=s*n+i+1,o=(s+1)*n+i]),this.faces.push([o,t,r]);return this}}
1,{key:"_getFaceNormal",value:function(t){var t=this.faces[t],r=this.vertices[t[0]],o=this.vertices[t[1]],t=this.vertices[t[2]],o=i.default.Vector.sub(o,r),t=i.default.Vector.sub(t,r),r=i.default.Vector.cross(o,t),n=i.default.Vector.mag(r),o=n/(i.default.Vector.mag(o)*i.default.Vector.mag(t));return 0===o||isNaN(o)?(console.warn("p5.Geometry.prototype._getFaceNormal:","face has colinear sides or a repeated vertex"),r):(1<o&&(o=1),r.mult(Math.asin(o)/n))}},{key:"computeNormals",value:function(){var t,r=this,o=0<arguments.length&&void 0!==arguments[0]?arguments[0]:a.FLAT,n=(1<arguments.length&&void 0!==arguments[1]?arguments[1]:{}).roundToPrecision,s=this.vertexNormals,l=this.vertices,u=this.faces;if(o===a.SMOOTH){for(var c={},d=[],h=Math.pow(10,void 0===n?3:n),f=function(t){return Math.round(t*h)/h},p=function(t){return"".concat(f(t.x),",").concat(f(t.y),",").concat(f(t.z))},m=0;m<l.length;m++){var y=l[m],g=p(y);void 0===c[g]&&(c[g]=d.length,d.push(y))}u.forEach(function(t){for(var r=0;r<3;++r){var o=t[r],o=l[o],o=p(o);t[r]=c[o]}}
1),this.edges.forEach(function(t){for(var r=0;r<2;++r){var o=t[r],o=l[o],o=p(o);t[r]=c[o]}}),this.vertices=l=d}for(t=s.length=0;t<l.length;++t)s.push(new i.default.Vector);for(u.forEach(function(t,o){for(var n=r._getFaceNormal(o),i=0;i<3;++i)s[t[i]].add(n)}),t=0;t<l.length;++t)s[t].normalize();return this}},{key:"averageNormals",value:function(){for(var t=0;t<=this.detailY;t++){var r=this.detailX+1,o=i.default.Vector.add(this.vertexNormals[t*r],this.vertexNormals[t*r+this.detailX]),o=i.default.Vector.div(o,2);this.vertexNormals[t*r]=o,this.vertexNormals[t*r+this.detailX]=o}return this}},{key:"averagePoleNormals",value:function(){for(var t=new i.default.Vector(0,0,0),r=0;r<this.detailX;r++)t.add(this.vertexNormals[r]);for(var t=i.default.Vector.div(t,this.detailX),o=0;o<this.detailX;o++)this.vertexNormals[o]=t;t=new i.default.Vector(0,0,0);for(var n=this.vertices.length-1;n>this.vertices.length-1-this.detailX;n--)t.add(this.vertexNormals[n]);t=i.default.Vector.div(t,this.detailX);for(var s=this.vertices.length-1;s>this.vertices.length-1-this.detailX;s--)this.vertexNormals[s]=t;return this}},{key:"_makeTriangleEdges",value:function(){for(var t=this.edges.length=0;t<this.faces.length;t++)this.edges.push([this.faces[t][0],this.faces[t][1]]),this.edges.push([this.faces[t][1],this.faces[t][2]]),this.edges.push([this.faces[t][2],this.faces[t][0]]);return this}},{key:"_edgesToVertices",value:function(){this.lineVertices.clear(),this.lineTangentsIn.clear(),this.lineTangentsOut.clear(),this.lineSides.clear();for(var t,r=new Map,o=new Set,n=0;n<this.edges.length;n++){var s,i=this.edges[n-1],a=this.edges[n],l=this.vertices[a[0]],u=this.vertices[a[1]],c=0<this.vertexStrokeColors.length&&i?this.vertexStrokeColors.slice(4*i[1],4*(i[1]+1)):[0,0,0,0],d=0<this.vertexStrokeColors.length?this.vertexStrokeColors.slice(4*a[0],4*(a[0]+1)):[0,0,0,0],h=0<this.vertexStrokeColors.length?this.vertexStrokeColors.slice(4*a[1],4*(a[1]+1)):[0,0,0,0],f=u.copy().sub(l).normalize(),p=0<f.magSq();p&&this._addSegment(l,u,d,h,f),0<n&&i[1]===a[0]?o.has(a[0])||(o.add(a[0]),r.delete(a[0]),t&&p&&f.dot(t)<1-1e-8&&this._addJoin(l,t,f,d)):(p&&!o.has(a[0])&&((s=r.get(a[0]))?(this._addJoin(l,s.dir,f,d),r.delete(a[0]),o.add(a[0])):r.set(a[0],{point:l,dir:f.copy().mult(-1),color:d})),t&&!o.has(i[1])&&((s=r.get(i[1]))?(this._addJoin(this.vertices[i[1]],t,s.dir.copy().mult(-1),c),r.delete(i[1]),o.add(i[1])):r.set(i[1],{point:this.vertices[i[1]],dir:t,color:c}
1),t=void 0)),n!==this.edges.length-1||o.has(a[1])||((l=r.get(a[1]))?(this._addJoin(u,f,l.dir.copy().mult(-1),h),r.delete(a[1]),o.add(a[1])):r.set(a[1],{point:u,dir:f,color:h})),p&&(t=f)}var m=!0,y=!1,g=void 0;try{for(var v,b=r.values()[Symbol.iterator]();!(m=(v=b.next()).done);m=!0){var _=v.value,j=_.point,x=_.dir,w=_.color;this._addCap(j,x,w)}}catch(t){y=!0,g=t}finally{try{m||null==b.return||b.return()}finally{if(y)throw g}}return this}},{key:"_addSegment",value:function(t,r,o,n,s){var t=t.array(),r=r.array(),i=s.array();this.lineSides.push(1,1,-1,1,-1,-1);for(var a=0,l=[this.lineTangentsIn,this.lineTangentsOut];a<l.length;a++)for(var c=l[a],d=0;d<6;d++)c.push.apply(c,u(i));return(s=this.lineVertices).push.apply(s,u(t).concat(u(r),u(t),u(r),u(r),u(t))),(s=this.lineVertexColors).push.apply(s,u(o).concat(u(n),u(o),u(n),u(n),u(o))),this}},{key:"_addCap",value:function(t,r,o){for(var n,s=t.array(),i=r.array(),a=[0,0,0],l=0;l<6;l++)(n=this.lineVertices).push.apply(n,u(s)),(n=this.lineTangentsIn).push.apply(n,u(i)),(n=this.lineTangentsOut).push.apply(n,a),(n=this.lineVertexColors).push.apply(n,u(o));return this.lineSides.push(-1,2,-2,1,2,-1),this}},{key:"_addJoin",value:function(t,r,o,n){for(var s,i=t.array(),a=r.array(),l=o.array(),c=0;c<12;c++)(s=this.lineVertices).push.apply(s,u(i)),(s=this.lineTangentsIn).push.apply(s,u(a)),(s=this.lineTangentsOut).push.apply(s,u(l)),(s=this.lineVertexColors).push.apply(s,u(n));return this.lineSides.push(-1,-3,-2,-1,0,-3),this.lineSides.push(3,1,2,3,0,1),this}},{key:"normalize",value:function(){if(0<this.vertices.length){for(var t=this.vertices[0].copy(),r=this.vertices[0].copy(),o=0;o<this.vertices.length;o++)t.x=Math.max(t.x,this.vertices[o].x),r.x=Math.min(r.x,this.vertices[o].x),t.y=Math.max(t.y,this.vertices[o].y),r.y=Math.min(r.y,this.vertices[o].y),t.z=Math.max(t.z,this.vertices[o].z),r.z=Math.min(r.z,this.vertices[o].z);for(var n=i.default.Vector.lerp(t,r,.5),s=i.default.Vector.sub(t,r),a=200/Math.max(Math.max(s.x,s.y),s.z),l=0;l<this.vertices.length;l++)this.vertices[l].sub(n),this.vertices[l].mult(a)}return this}}],d(o.prototype,t),r&&d(o,r),o}();var h=i.default.Geometry;o.default=h},{"../core/constants":272,"../core/main":283,"core-js/modules/es.array-buffer.constructor":152,"core-js/modules/es.array.concat":153,"core-js/modules/es.array.flat":160,"core-js/modules/es.array.for-each":161,"core-js/modules/es.array.from":162,"core-js/modules/es.array.iterator":165,"core-js/modules/es.array.last-index-of":167,"core-js/modules/es.array.map":168,"core-js/modules/es.array.slice":169,"core-js/modules/es.array.unscopables.flat":173,"core-js/modules/es.map":175,"core-js/modules/es.number.constructor":179,"core-js/modules/es.object.entries":184,"core-js/modules/es.object.get-own-property-descriptor":186,"core-js/modules/es.object.to-string":190,"core-js/modules/es.regexp.to-string":196,"core-js/modules/es.set":197,"core-js/modules/es.string.iterator":200,"core-js/modules/es.string.sub":208,"core-js/modules/es.symbol":212,"core-js/modules/es.symbol.description":210,"core-js/modules/es.symbol.iterator":211,"core-js/modules/es.weak-map":244,"core-js/modules/web.dom-collections.for-each":245,"core-js/modules/web.dom-collections.iterator":246}],336:[function(t,r,o){"use strict";t("core-js/modules/es.array.iterator"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.typed-array.float32-array"),t("core-js/modules/es.typed-array.copy-within"),t("core-js/modules/es.typed-array.every"),t("core-js/modules/es.typed-array.fill"),t("core-js/modules/es.typed-array.filter"),t("core-js/modules/es.typed-array.find"),t("core-js/modules/es.typed-array.find-index"),t("core-js/modules/es.typed-array.for-each"),t("core-js/modules/es.typed-array.includes"),t("core-js/modules/es.typed-array.index-of"),t("core-js/modules/es.typed-array.iterator"),t("core-js/modules/es.typed-array.join"),t("core-js/modules/es.typed-array.last-index-of"),t("core-js/modules/es.typed-array.map"),t("core-js/modules/es.typed-array.reduce"),t("
1core-js/modules/es.typed-array.reduce-right"),t("core-js/modules/es.typed-array.reverse"),t("core-js/modules/es.typed-array.set"),t("core-js/modules/es.typed-array.slice"),t("core-js/modules/es.typed-array.some"),t("core-js/modules/es.typed-array.sort"),t("core-js/modules/es.typed-array.subarray"),t("core-js/modules/es.typed-array.to-locale-string"),t("core-js/modules/es.typed-array.to-string"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.typed-array.float32-array"),t("core-js/modules/es.typed-array.copy-within"),t("core-js/modules/es.typed-array.every"),t("core-js/modules/es.typed-array.fill"),t("core-js/modules/es.typed-array.filter"),t("core-js/modules/es.typed-array.find"),t("core-js/modules/es.typed-array.find-index"),t("core-js/modules/es.typed-array.for-each"),t("core-js/modules/es.typed-array.includes"),t("core-js/modules/es.typed-array.index-of"),t("core-js/modules/es.typed-array.iterator"),t("core-js/modules/es.typed-array.join"),t("core-js/modules/es.typed-array.last-index-of"),t("core-js/modules/es.typed-array.map"),t("core-js/modules/es.typed-array.reduce"),t("
1core-js/modules/es.typed-array.reduce-right"),t("core-js/modules/es.typed-array.reverse"),t("core-js/modules/es.typed-array.set"),t("core-js/modules/es.typed-array.slice"),t("core-js/modules/es.typed-array.some"),t("core-js/modules/es.typed-array.sort"),t("core-js/modules/es.typed-array.subarray"),t("core-js/modules/es.typed-array.to-locale-string"),t("core-js/modules/es.typed-array.to-string"),Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;var n=(t=t("../core/main"))&&t.__esModule?t:{default:t};function s(t,r){for(var o=0;o<r.length;o++){var n=r[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var i=Array,a=function(t){return Array.isArray(t)},t=("undefined"!=typeof Float32Array&&(i=Float32Array,a=function(t){return Array.isArray(t)||t instanceof Float32Array}),n.default.Matrix=function(){var t,r;function o(){var t=this,r=o;if(t instanceof r)return arguments.length&&((t=arguments.length-1)<0||arguments.length<=t?void 0:arguments[t])instanceof n.default&&(this.p5=(r=arguments.length-1)<0||arguments.length<=r?void 0:arguments[r]),"mat3"===(arguments.length<=0?void 0:arguments[0])?this.mat3=Array.isArray(arguments.length<=1?void 0:arguments[1])?arguments.length<=1?void 0:arguments[1]:new i([1,0,0,0,1,0,0,0,1]):this.mat4=Array.isArray(arguments.length<=0?void 0:arguments[0])?arguments.length<=0?void 0:arguments[0]:new i([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),this;throw TypeError("Cannot call a class as a function")}return r=[{key:"identity",value:function(t){return new n.default.Matrix(t)}}],t=[{key:"reset",value:function(){return this.mat3?this.mat3.set([1,0,0,0,1,0,0,0,1]):this.mat4&&this.mat4.set([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),this}},{key:"set",value:function(t){var r=arguments;if(t instanceof n.default.Matrix?r=t.mat4:a(t)&&(r=t),16!==r.length)n.default._friendlyError("Expected 16 values but received ".concat(r.length,"."),"p5.Matrix.set");else for(var o=0;o<16;o++)this.mat4[o]=r[o];return this}},{key:"get",value:function(){return new n.default.Matrix(this.mat4,this.p5)}},{key:"copy",value:function(){var t;return void 0!==this.mat3?((t=new n.default.Matrix("mat3",this.p5)).mat3[0]=this.mat3[0],t.mat3[1]=this.mat3[1],t.mat3[2]=this.mat3[2],t.mat3[3]=this.mat3[3],t.mat3[4]=this.mat3[4],t.mat3[5]=this.mat3[5],t.mat3[6]=this.mat3[6],t.mat3[7]=this.mat3[7],t.mat3[8]=this.mat3[8]):((t=new n.default.Matrix(this.p5)).mat4[0]=this.mat4[0],t.mat4[1]=this.mat4[1],t.mat4[2]=this.mat4[2],t.mat4[3]=this.mat4[3],t.mat4[4]=this.mat4[4],t.mat4[5]=this.mat4[5],t.mat4[6]=this.mat4[6],t.mat4[7]=this.mat4[7],t.mat4[8]=this.mat4[8],t.mat4[9]=this.mat4[9],t.mat4[10]=this.mat4[10],t.mat4[11]=this.mat4[11],t.mat4[12]=this.mat4[12],t.mat4[13]=this.mat4[13],t.mat4[14]=this.mat4[14],t.mat4[15]=this.mat4[15]),t}},{key:"transpose",value:function(t){var r,o,s,i,l,u;return t instanceof n.default.Matrix?(r=t.mat4[1],o=t.mat4[2],s=t.mat4[3],i=t.mat4[6],l=t.mat4[7],u=t.mat4[11],this.mat4[0]=t.mat4[0],this.mat4[1]=t.mat4[4],this.mat4[2]=t.mat4[8],this.mat4[3]=t.mat4[12],this.mat4[4]=r,this.mat4[5]=t.mat4[5],this.mat4[6]=t.mat4[9],this.mat4[7]=t.mat4[13],this.mat4[8]=o,this.mat4[9]=i,this.mat4[10]=t.mat4[10],this.mat4[11]=t.mat4[14],this.mat4[12]=s,this.mat4[13]=l,this.mat4[14]=u,this.mat4[15]=t.mat4[15]):a(t)&&(r=t[1],o=t[2],s=t[3],i=t[6],l=t[7],u=t[11],this.mat4[0]=t[0],this.mat4[1]=t[4],this.mat4[2]=t[8],this.mat4[3]=t[12],this.mat4[4]=r,this.mat4[5]=t[5],this.mat4[6]=t[9],this.mat4[7]=t[13],this.mat4[8]=o,this.mat4[9]=i,this.mat4[10]=t[10],this.mat4[11]=t[14],this.mat4[12]=s,this.mat4[13]=l,this.mat4[14]=u,this.mat4[15]=t[15]),this}},{key:"invert",value:function(t){t instanceof n.default.Matrix?(r=t.mat4[0],o=t.mat4[1],s=t.mat4[2],i=t.mat4[3],l=t.mat4[4],u=t.mat4[5],c=t.mat4[6],d=t.mat4[7],h=t.mat4[8],f=t.mat4[9],p=t.mat4[10],m=t.mat4[11],y=t.mat4[12],g=t.mat4[13],v=t.mat4[14],b=t.mat4[15]):a(t)&&(r=t[0],o=t[1],s=t[2],i=t[3],l=t[4],u=t[5],c=t[6],d=t[7],h=t[8],f=t[9],p=t[10],m=t[11],y=t[12],g=t[13],v=t[14],b=t[15]);var r,o,s,i,l,u,c,d,h,f,p,m,y,g,v,b,t=r*u-o*l,_=r*c-s*l,j=r*d-i*l,x=o*c-s*u,w=o*d-i*u,S=s*d-i*c,T=h*g-f*y,E=h*v-p*y,M=h*b-m*y,k=f*v-p*g,O=f*b-m*g,C=p*b-m*v,P=t*C-_*O+j*k+x*M-w*E+S*T;return P?(this.mat4[0]=(u*C-c*O+d*k)*(P=1/P),this.mat4[1]=(s*O-o*C-i*k)*P,this.mat4[2]=(g*S-v*w+b*x)*P,this.mat4[3]=(p*w-f*S-m*x)*P,this.mat4[4]=(c*M-l*C-d*E)*P,this.mat4[5]=(r*C-s*M+i*E)*P,this.mat4[6]=(v*j-y*S-b*_)*P,this.mat4[7]=(h*S-p*j+m*_)*P,this.mat4[8]=(l*O-u*M+d*T)*P,this.mat4[9]=(o*M-r*O-i*T)*P,this.mat4[10]=(y*w-g*j+b*t)*P,this.mat4[11]=(f*j-h*w-m*t)*P,this.mat4[12]=(u*E-l*k-c*T)*P,this.mat4[13]=(r*k-o*E+s*T)*P,this.mat4[14]=(g*_-y*x-v*t)*P,this.mat4[15]=(h*x-f*_+p*t)*P,this):null}},{key:"invert3x3",value:function(){var t=this.mat3[0],r=this.mat3[1],o=this.mat3[2],n=this.mat3[3],s=this.mat3[4],i=this.mat3[5],a=this.mat3[6],l=this.mat3[7],u=this.mat3[8],c=u*s-i*l,d=-u*n+i*a,h=l*n-s*a,f=t*c+r*d+o*h;return f?(this.mat3[0]=c*(f=1/f),this.mat3[1]=(-u*r+o*l)*f,this.mat3[2]=(i*r-o*s)*f,this.mat3[3]=d*f,this.mat3[4]=(u*t-o*a)*f,this.mat3[5]=(-i*t+o*n)*f,this.mat3[6]=h*f,this.mat3[7]=(-l*t+r*a)*f,this.mat3[8]=(s*t-r*n)*f,this):null}},{key:"transpose3x3",value:function(t){var r=(t=void 0===t?this.mat3:t)[1],o=t[2],n=t[5];return this.mat3[0]=t[0],this.mat3[1]=t[3],this.mat3[2]=t[6],this.mat3[3]=r,this.mat3[4]=t[4],this.mat3[5]=t[7],this.mat3[6]=o,this.mat3[7]=n,this.mat3[8]=t[8],this}},{key:"inverseTranspose",value:function(t){if(t=t.mat4,void 0===this.mat3?n.default._friendlyError("sorry, this function only works with mat3"):(this.mat3[0]=t[0],this.mat3[1]=t[1],this.mat3[2]=t[2],this.mat3[3]=t[4],this.mat3[4]=t[5],this.mat3[5]=t[6],this.mat3[6]=t[8],this.mat3[7]=t[9],this.mat3[8]=t[10]),t=this.invert3x3())t.transpose3x3(this.mat3);else for(var r=0;r<9;r++)this.mat3[r]=0;return this}},{key:"determinant",value:function(){var t=this.mat4[0]*this.mat4[5]-this.mat4[1]*this.mat4[4],r=this.mat4[0]*this.mat4[6]-this.mat4[2]*this.mat4[4],o=this.mat4[0]*this.mat4[7]-this.mat4[3]*this.mat4[4],n=this.mat4[1]*this.mat4[6]-this.mat4[2]*this.mat4[5],s=this.mat4[1]*this.mat4[7]-this.mat4[3]*this.mat4[5],i=this.mat4[2]*this.mat4[7]-this.mat4[3]*this.mat4[6],a=this.mat4[8]*this.mat4[13]-this.mat4[9]*this.mat4[12],l=this.mat4[8]*this.mat4[14]-this.mat4[10]*this.mat4[12],u=this.mat4[8]*this.mat4[15]-this.mat4[11]*this.mat4[12],c=this.mat4[9]*this.mat4[14]-this.mat4[10]*this.mat4[13],d=this.mat4[9]*this.mat4[15]-this.mat4[11]*this.mat4[13];return t*(this.mat4[10]*this.mat4[15]-this.mat4[11]*this.mat4[14])-r*d+o*c+n*u-s*l+i*a}},{key:"mult",value:function(t){if(t===this||t===this.mat4)r=this.copy().mat4;else if(t instanceof n.default.Matrix)r=t.mat4;else if(a(t))r=t;else{if(16!=arguments.length)return;r=arguments}var r,t=this.mat4[0],o=this.mat4[1],s=this.mat4[2],i=this.mat4[3];return this.mat4[0]=t*r[0]+o*r[4]+s*r[8]+i*r[12],this.mat4[1]=t*r[1]+o*r[5]+s*r[9]+i*r[13],this.mat4[2]=t*r[2]+o*r[6]+s*r[10]+i*r[14],this.mat4[3]=t*r[3]+o*r[7]+s*r[11]+i*r[15],t=this.mat4[4],o=this.mat4[5],s=this.mat4[6],i=this.mat4[7],this.mat4[4]=t*r[0]+o*r[4]+s*r[8]+i*r[12],this.mat4[5]=t*r[1]+o*r[5]+s*r[9]+i*r[13],this.mat4[6]=t*r[2]+o*r[6]+s*r[10]+i*r[14],this.mat4[7]=t*r[3]+o*r[7]+s*r[11]+i*r[15],t=this.mat4[8],o=this.mat4[9],s=this.mat4[10],i=this.mat4[11],this.mat4[8]=t*r[0]+o*r[4]+s*r[8]+i*r[12],this.mat4[9]=t*r[1]+o*r[5]+s*r[9]+i*r[13],this.mat4[10]=t*r[2]+o*r[6]+s*r[10]+i*r[14],this.mat4[11]=t*r[3]+o*r[7]+s*r[11]+i*r[15],t=this.mat4[12],o=this.mat4[13],s=this.mat4[14],i=this.mat4[15],this.mat4[12]=t*r[0]+o*r[4]+s*r[8]+i*r[12],this.mat4[13]=t*r[1]+o*r[5]+s*r[9]+i*r[13],this.mat4[14]=t*r[2]+o*r[6]+s*r[10]+i*r[14],this.mat4[15]=t*r[3]+o*r[7]+s*r[11]+i*r[15],this}},{key:"apply",value:function(t){if(t===this||t===this.mat4)r=this.copy().mat4;else if(t instanceof n.default.Matrix)r=t.mat4;else if(a(t))r=t;else{if(16!=arguments.length)return;r=arguments}var r,t=this.mat4,o=t[0],s=t[4],i=t[8],l=t[12],o=(t[0]=r[0]*o+r[1]*s+r[2]*i+r[3]*l,t[4]=r[4]*o+r[5]*s+r[6]*i+r[7]*l,t[8]=r[8]*o+r[9]*s+r[10]*i+r[11]*l,t[12]=r[12]*o+r[13]*s+r[14]*i+r[15]*l,t[1]),s=t[5],i=t[9],l=t[13],o=(t[1]=r[0]*o+r[1]*s+r[2]*i+r[3]*l,t[5]=r[4]*o+r[5]*s+r[6]*i+r[7]*l,t[9]=r[8]*o+r[9]*s+r[10]*i+r[11]*l,t[13]=r[12]*o+r[13]*s+r[14]*i+r[15]*l,t[2]),s=t[6],i=t[10],l=t[14],o=(t[2]=r[0]*o+r[1]*s+r[2]*i+r[3]*l,t[6]=r[4]*o+r[5]*s+r[6]*i+r[7]*l,t[10]=r[8]*o+r[9]*s+r[10]*i+r[11]*l,t[14]=r[12]*o+r[13]*s+r[14]*i+r[15]*l,t[3]),s=t[7],i=t[11],l=t[15];return t[3]=r[0]*o+r[1]*s+r[2]*i+r[3]*l,t[7]=r[4]*o+r[5]*s+r[6]*i+r[7]*l,t[11]=r[8]*o+r[9]*s+r[10]*i+r[11]*l,t[15]=r[12]*o+r[13]*s+r[14]*i+r[15]*l,this}},{key:"scale",value:function(t,r,o){return t instanceof n.default.Vector?(r=t.y,o=t.z,t=t.x):t instanceof Array&&(r=t[1],o=t[2],t=t[0]),this.mat4[0]*=t,this.mat4[1]*=t,this.mat4[2]*=t,this.mat4[3]*=t,this.mat4[4]*=r,this.mat4[5]*=r,this.mat4[6]*=r,this.mat4[7]*=r,this.mat4[8]*=o,this.mat4[9]*=o,this.mat4[10]*=o,this.mat4[11]*=o,this}},{key:"rotate",value:function(t,r,o,s){r instanceof n.default.Vector?(o=r.y,s=r.z,r=r.x):r instanceof Array&&(o=r[1],s=r[2],r=r[0]);var i=Math.sqrt(r*r+o*o+s*s),i=(r*=1/i,o*=1/i,s*=1/i,this.mat4[0]),a=this.mat4[1],l=this.mat4[2],u=this.mat4[3],c=this.mat4[4],d=this.mat4[5],h=this.mat4[6],f=this.mat4[7],p=this.mat4[8],m=this.mat4[9],y=this.mat4[10],g=this.mat4[11],v=Math.sin(t),t=Math.cos(t),b=1-t,_=r*r*b+t,j=o*r*b+s*v,x=s*r*b-o*v,w=r*o*b-s*v,S=o*o*b+t,T=s*o*b+r*v,E=r*s*b+o*v,o=o*s*b-r*v,r=s*s*b+t;return this.mat4[0]=i*_+c*j+p*x,this.mat4[1]=a*_+d*j+m*x,this.mat4[2]=l*_+h*j+y*x,this.mat4[3]=u*_+f*j+g*x,this.mat4[4]=i*w+c*S+p*T,this.mat4[5]=a*w+d*S+m*T,this.mat4[6]=l*w+h*S+y*T,this.mat4[7]=u*w+f*S+g*T,this.mat4[8]=i*E+c*o+p*r,this.mat4[9]=a*E+d*o+m*r,this.mat4[10]=l*E+h*o+y*r,this.mat4[11]=u*E+f*o+g*r,this}},{key:"translate",value:function(t){var r=t[0],o=t[1],t=t[2]||0;this.mat4[12]+=this.mat4[0]*r+this.mat4[4]*o+this.mat4[8]*t,this.mat4[13]+=this.mat4[1]*r+this.mat4[5]*o+this.mat4[9]*t,this.mat4[14]+=this.mat4[2]*r+this.mat4[6]*o+this.mat4[10]*t,this.mat4[15]+=this.mat4[3]*r+this.mat4[7]*o+this.mat4[11]*t}},{key:"rotateX",value:function(t){this.rotate(t,1,0,0)}},{key:"rotateY",value:function(t){this.rotate(t,0,1,0)}},{key:"rotateZ",value:function(t){this.rotate(t,0,0,1)}},{key:"perspective",value:function(t,r,o,n){var t=1/Math.tan(t/2),s=1/(o-n);return this.mat4[0]=t/r,this.mat4[1]=0,this.mat4[2]=0,this.mat4[3]=0,this.mat4[4]=0,this.mat4[5]=t,this.mat4[6]=0,this.mat4[7]=0,this.mat4[8]=0,this.mat4[9]=0,this.mat4[10]=(n+o)*s,this.mat4[11]=-1,this.mat4[12]=0,this.mat4[13]=0,this.mat4[14]=2*n*o*s,this.mat4[15]=0,this}},{key:"ortho",value:function(t,r,o,n,s,i){var a=1/(t-r),l=1/(o-n),u=1/(s-i);return this.mat4[0]=-2*a,this.mat4[1]=0,this.mat4[2]=0,this.mat4[3]=0,this.mat4[4]=0,this.mat4[5]=-2*l,this.mat4[6]=0,this.mat4[7]=0,this.mat4[8]=0,this.mat4[9]=0,this.mat4[10]=2*u,this.mat4[11]=0,this.mat4[12]=(t+r)*a,this.mat4[13]=(n+o)*l,this.mat4[14]=(i+s)*u,this.mat4[15]=1,this}},{key:"multiplyVec4",value:function(t,r,o,n){var s=[,,,,],i=this.mat4;return s[0]=i[0]*t+i[4]*r+i[8]*o+i[12]*n,s[1]=i[1]*t+i[5]*r+i[9]*o+i[13]*n,s[2]=i[2]*t+i[6]*r+i[10]*o+i[14]*n,s[3]=i[3]*t+i[7]*r+i[11]*o+i[15]*n,s}},{key:"multiplyPoint",value:function(t){var r=t.x,o=t.y,t=t.z,r=this.multiplyVec4(r,o,t,1);return new n.default.Vector(r[0],r[1],r[2])}},{key:"multiplyAndNormalizePoint",value:function(t){var r=t.x,o=t.y,t=t.z,r=this.multiplyVec4(r,o,t,1);return r[0]/=r[3],r[1]/=r[3],r[2]/=r[3],new n.default.Vector(r[0],r[1],r[2])}},{key:"multiplyDirection",value:function(t){var r=t.x,o=t.y,t=t.z,r=this.multiplyVec4(r,o,t,0);return new n.default.Vector(r[0],r[1],r[2])}},{key:"mult3x3",value:function(t){if(t===this||t===this.mat3)r=this.copy().mat3;else if(t instanceof n.default.Matrix)r=t.mat3;else if(a(t))r=t;else{if(9!=arguments.length)return;r=arguments}var r,t=this.mat3[0],o=this.mat3[1],s=this.mat3[2];return this.mat3[0]=t*r[0]+o*r[3]+s*r[6],this.mat3[1]=t*r[1]+o*r[4]+s*r[7],this.mat3[2]=t*r[2]+o*r[5]+s*r[8],t=this.mat3[3],o=this.mat3[4],s=this.mat3[5],this.mat3[3]=t*r[0]+o*r[3]+s*r[6],this.mat3[4]=t*r[1]+o*r[4]+s*r[7],this.mat3[5]=t*r[2]+o*r[5]+s*r[8],t=this.mat3[6],o=this.mat3[7],s=this.mat3[8],this.mat3[6]=t*r[0]+o*r[3]+s*r[6],this.mat3[7]=t*r[1]+o*r[4]+s*r[7],this.mat3[8]=t*r[2]+o*r[5]+s*r[8],this}},{key:"column",value:function(t){return new n.default.Vector(this.mat3[3*t],this.mat3[3*t
1+1],this.mat3[3*t+2])}},{key:"row",value:function(t){return new n.default.Vector(this.mat3[t],this.mat3[t+3],this.mat3[t+6])}},{key:"diagonal",value:function(){return void 0!==this.mat3?[this.mat3[0],this.mat3[4],this.mat3[8]]:[this.mat4[0],this.mat4[5],this.mat4[10],this.mat4[15]]}},{key:"multiplyVec3",value:function(t,r){return(r=void 0===r?t.copy():r).x=this.row(0).dot(t),r.y=this.row(1).dot(t),r.z=this.row(2).dot(t),r}},{key:"createSubMatrix3x3",value:function(){var t=new n.default.Matrix("mat3");return t.mat3[0]=this.mat4[0],t.mat3[1]=this.mat4[1],t.mat3[2]=this.mat4[2],t.mat3[3]=this.mat4[4],t.mat3[4]=this.mat4[5],t.mat3[5]=this.mat4[6],t.mat3[6]=this.mat4[8],t.mat3[7]=this.mat4[9],t.mat3[8]=this.mat4[10],t}}],s(o.prototype,t),r&&s(o,r),o}(),n.default.Matrix);o.default=t},{"../core/main":283,"core-js/modules/es.array.iterator":165,"core-js/modules/es.object.to-string":190,"core-js/modules/es.typed-array.copy-within":213,"core-js/modules/es.typed-array.every":214,"core-js/modules/es.typed-array.fill":215,"core-js/modules/es.typed-array.filter":216,"core-js/modules/es.typed-array.find":218,"core-js/modules/es.typed-array.find-index":217,"core-js/modules/es.typed-array.float32-array":219,"core-js/modules/es.typed-array.for-each":221,"core-js/modules/es.typed-array.includes":222,"core-js/modules/es.typed-array.index-of":223,"core-js/modules/es.typed-array.iterator":226,"core-js/modules/es.typed-array.join":227,"core-js/modules/es.typed-array.last-index-of":228,"core-js/modules/es.typed-array.map":229,"core-js/modules/es.typed-array.reduce":231,"core-js/modules/es.typed-array.reduce-right":230,"core-js/modules/es.typed-array.reverse":232,"core-js/modules/es.typed-array.set":233,"core-js/modules/es.typed-array.slice":234,"core-js/modules/es.typed-array.some":235,"core-js/modules/es.typed-array.sort":236,"core-js/modules/es.typed-array.subarray":237,"core-js/modules/es.typed-array.to-locale-string":238,"core-js/modules/es.typed-array.to-string":239}],337:[function(t,r,o){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;var n=(t=t("../core/main"))&&t.__esModule?t:{default:t};function s(t,r){for(var o=0;o<r.length;o++){var n=r[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}n.default.Quat=function(){var t,r;function o(t,r,s,i){if(!(this instanceof o))throw TypeError("Cannot call a class as a function");this.w=t,this.vec=new n.default.Vector(r,s,i)}return r=[{key:"fromAxisAngle",value:function(t,r,o,s){var r=new n.default.Vector(r,o,s).normalize().mult(Math.sin(t/2));return new n.default.Quat(Math.cos(t/2),r.x,r.y,r.z)}}],t=[{key:"conjugate",value:function(){return new n.default.Quat(this.w,-this.vec.x,-this.vec.y,-this.vec.z)}},{key:"multiply",value:function(t){return new n.default.Quat(this.w*t.w-this.vec.x*t.vec.x-this.vec.y*t.vec.y-this.vec.z-t.vec.z,this.w*t.vec.x+this.vec.x*t.w+this.vec.y*t.vec.z-this.vec.z*t.vec.y,this.w*t.vec.y-this.vec.x*t.vec.z+this.vec.y*t.w+this.vec.z*t.vec.x,this.w*t.vec.z+this.vec.x*t.vec.y-this.vec.y*t.vec.x+this.vec.z*t.w)}},{key:"rotateVector",value:function(t){return new n.default.Vector.mult(t,this.w*this.w-this.vec.dot(this.vec)).add(n.default.Vector.mult(this.vec,2*t.dot(this.vec))).add(n.default.Vector.mult(this.vec,2*this.w).cross(t)).clampToZero()}},{key:"rotateBy",value:function(t){return t.multiply(this).multiply(t.conjugate()).vec.clampToZero()}}],s(o.prototype,t),r&&s(o,r),o}(),t=n.default.Quat,o.default=t},{"../core/main":283}],338:[function(t,r,o){"use strict";function n(t,r){for(var o=0;o<r.length;o++){var n=r[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}t("core-js/modules/es.array.map"),t("core-js/modules/es.array.map"),Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,(t=(t=t("../core/main"))&&t.__esModule?t:{default:t}).default.RenderBuffer=function(){var t,r;function o(t,r,n,s,i,a){if(!(this instanceof o))throw TypeError("Cannot call a class as a function");this.size=t,this.src=r,this.dst=n,this.attr=s,this._renderer=i,this.map=a}return t=[{key:"_prepareBuffer",value:function(t,r){var o,n,s,i=r.attributes,a=this._renderer.GL,l=t.model||t,i=i[this.attr];i&&(o=t[this.dst],0<(n=l[this.src]).length?((s=!o)&&(t[this.dst]=o=a.createBuffer()),a.bindBuffer(a.ARRAY_BUFFER,o),(s||!1!==l.dirtyFlags[this.src])&&(s=(t=this.map)?t(n):n,this._renderer._bindBuffer(o,a.ARRAY_BUFFER,s),l.dirtyFlags[this.src]=!1),r.enableAttrib(i,this.size)):-1!==(t=i.location)&&this._renderer.registerEnabled.has(t)&&(a.disableVertexAttribArray(t),this._renderer.registerEnabled.delete(t)))}}],n(o.prototype,t),r&&n(o,r),o}(),t=t.default.RenderBuffer,o.default=t},{"../core/main":283,"core-js/modules/es.array.map":168}],339:[function(t,r,o){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function s(t){return(s="function"==typeof Symbol&&"symbol"===n(Symbol.iterator)?function(t){return n(t)}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":n(t)})(t)}t("core-js/modules/es.symbol"),t("core-js/modules/es.symbol.description"),t("core-js/modules/es.symbol.iterator"),t("core-js/modules/es.array.
1concat"),t("core-js/modules/es.array.fill"),t("core-js/modules/es.array.find-index"),t("core-js/modules/es.array.from"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.array.map"),t("core-js/modules/es.array.slice"),t("core-js/modules/es.map"),t("core-js/modules/es.object.get-own-property-descriptor"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.regexp.to-string"),t("core-js/modules/es.string.iterator"),t("core-js/modules/es.weak-map"),t("core-js/modules/web.dom-collections.iterator"),t("core-js/modules/es.symbol"),t("core-js/modules/es.symbol.description"),t("core-js/modules/es.symbol.iterator"),t("core-js/modules/es.array.concat"),t("core-js/modules/es.array.fill"),t("core-js/modules/es.array.find-index"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.array.map"),t("core-js/modules/es.array.slice"),t("core-js/modules/es.map"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.string.iterator"),t("core-js/modules/web.dom-collections.iterator"),Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;var i=(d=t("../core/main"))&&d.__esModule?d:{default:d},a=function(t){if(t&&t.__esModule)return t;if(null===t||"object"!==s(t)&&"function"!=typeof t)return{default:t};var r,o=l();if(o&&o.has(t))return o.get(t);var n,i={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(n in t)Object.prototype.hasOwnProperty.call(t,n)&&((r=a?Object.getOwnPropertyDescriptor(t,n):null)&&(r.get||r.set)?Object.defineProperty(i,n,r):i[n]=t[n]);return i.default=t,o&&o.set(t,i),i}(t("../core/constants"));function l(){var t;return"function"!=typeof WeakMap?null:(t=new WeakMap,l=function(){return t},t)}function u(t){return function(t){if(Array.isArray(t)){for(var r=0,o=Array(t.length);r<t.length;r++)o[r]=t[r];return o}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw TypeError("Invalid attempt to spread non-iterable instance")}()}t("./p5.RenderBuffer"),i.default.RendererGL.prototype.beginShape=function(t){return this.immediateMode.shapeMode=void 0!==t?t:a.TESS,this.immediateMode.geometry.reset(),this.immediateMode.contourIndices=[],this};var c={vertices:1,vertexNormals:1,vertexColors:4,vertexStrokeColors:4,uvs:2},d=(i.default.RendererGL.prototype.beginContour=function(){if(this.immediateMode.shapeMode!==a.TESS)throw Error("WebGL mode can only use contours with beginShape(TESS).");this.immediateMode.contourIndices.push(this.immediateMode.geometry.vertices.length)},i.default.RendererGL.prototype.vertex=function(t,r){if(this.immediateMode.shapeMode===a.QUADS&&this.immediateMode.geometry.vertices.length%6==3)for(var o in c){var n=c[o],o=this.immediateMode.geometry[o];o.push.apply(o,u(o.slice(o.length-3*n,o.length-2*n)).concat(u(o.slice(o.length-n,o.length))))}var s,l,d=s=l=0,h=(3==arguments.length?d=arguments[2]:4==arguments.length?(s=arguments[2],l=arguments[3]):5==arguments.length&&(d=arguments[2],s=arguments[3],l=arguments[4]),new i.default.Vector(t,r,d)),h=(this.immediateMode.geometry.vertices.push(h),this.immediateMode.geometry.vertexNormals.push(this._currentNormal),this.curFillColor||[.5,.5,.5,1]),h=(this.immediateMode.geometry.vertexColors.push(h[0],h[1],h[2],h[3]),this.curStrokeColor||[.5,.5,.5,1]);return this.immediateMode.geometry.vertexStrokeColors.push(h[0],h[1],h[2],h[3]),this.textureMode!==a.IMAGE||this.isProcessingVertices||(null!==this._tex?0<this._tex.width&&0<this._tex.height&&(s/=this._tex.width,l/=this._tex.height):void 0===this.userFillShader&&void 0===this.userStrokeShader&&void 0===this.userPointShader&&null===this._tex&&4<=arguments.length&&console.warn("You must first call texture() before using vertex() with image based u and v coordinates")),this.immediateMode.geometry.uvs.push(s,l),this.immediateMode._bezierVertex[0]=t,this.immediateMode._bezierVertex[1]=r,this.immediateMode._bezierVertex[2]=d,this.immediateMode._quadraticVertex[0]=t,this.immediateMode._quadraticVertex[1]=r,this.immediateMode._quadraticVertex[2]=d,this},i.default.RendererGL.prototype.normal=function(t,r,o){return t instanceof i.default.Vector?this._currentNormal=t:this._currentNormal=new i.default.Vector(t,r,o),this},i.default.RendererGL.prototype.endShape=function(t,r,o,n,s,i){var l,u=6<arguments.length&&void 0!==arguments[6]?arguments[6]:1;return this.immediateMode.shapeMode===a.POINTS?this._drawPoints(this.immediateMode.geometry.vertices,this.immediateMode.buffers.point):(3===this.immediateMode.geometry.vertices.length&&this.immediateMode.shapeMode===a.TESS&&(this.immediateMode.shapeMode=a.TRIANGLES),this.isProcessingVertices=!0,this._processVertices.apply(this,arguments),l=this.isProcessingVertices=!1,this.immediateMode.shapeMode!==a.LINE_STRIP&&this.immediateMode.shapeMode!==a.LINES||(this.immediateMode.shapeMode=a.TRIANGLE_FAN,l=!0),this.immediateMode.shapeMode===a.QUADS?this.immediateMode.shapeMode=a.TRIANGLES:this.immediateMode.shapeMode===a.QUAD_STRIP&&(this.immediateMode.shapeMode=a.TRIANGLE_STRIP),this._doFill&&!l&&!this.geometryBuilder&&3<=this.immediateMode.geometry.vertices.length&&this._drawImmediateFill(u),this._doStroke&&!this.geometryBuilder&&1<=this.immediateMode.geometry.lineVertices.length&&this._drawImmediateStroke(),this.geometryBuilder&&this.geometryBuilder.addImmediate(),this.isBezier=!1,this.isQuadratic=!1,this.isCurve=!1,this.immediateMode._bezierVertex.length=0,this.immediateMode._quadraticVertex.length=0,this.immediateMode._curveVertex.length=0),this},i.default.RendererGL.prototype._processVertices=function(t){var r;0!==this.immediateMode.geometry.vertices.length&&(r=this._doStroke,t=t===a.CLOSE,r&&(this.immediateMode.geometry.edges=this._calculateEdges(this.immediateMode.shapeMode,this.immediateMode.geometry.vertices,t),this.geometryBuilder||this.immediateMode.geometry._edgesToVertices()),r=this.immediateMode.shapeMode===a.TESS,t=0<this.immediateMode.contourIndices.length,this._doFill&&(this.isBezier||this.isQuadratic||this.isCurve||r||t)&&this.immediateMode.shapeMode!==a.LINES&&this._tesselateShape())},i.default.RendererGL.prototype._calculateEdges=function(t,r,o){var n=[],s=0,i=this.immediateMode.contourIndices.slice(),l=0;switch(t){case a.TRIANGLE_STRIP:for(s=0;s<r.length-2;s++)n.push([s,s+1]),n.push([s,s+2]);n.push([s,s+1]);break;case a.TRIANGLE_FAN:for(s=1;s<r.length-1;s++)n.push([0,s]),n.push([s,s+1]);n.push([0,r.length-1]);break;case a.TRIANGLES:for(s=0;s<r.length-2;s+=3)n.push([s,s+1]),n.push([s+1,s+2]),n.push([s+2,s]);break;case a.LINES:for(s=0;s<r.length-1;s+=2)n.push([s,s+1]);break;case a.QUADS:for(s=0;s<r.length-5;s+=6)n.push([s,s+1]),n.push([s+1,s+2]),n.push([s+3,s+5]),n.push([s+4,s+5]);break;case a.QUAD_STRIP:for(s=0;s<r.length-2;s+=2)n.push([s,s+1]),n.push([s,s+2]),n.push([s+1,s+3]);n.push([s,s+1]);break;default:for(s=0;s<r.length;s++)s+1<r.length&&s+1!==i[0]?n.push([s,s+1]):((o||l)&&n.push([s,l]),0<i.length&&(l=i.shift()))}return t!==a.TESS&&o&&n.push([r.length-1,0]),n},i.default.RendererGL.prototype._tesselateShape=function(){for(var t=this,r=(this.immediateMode.shapeMode=a.TRIANGLES,[[]]),o=0;o<this.immediateMode.geometry.vertices.length;o++)0<this.immediateMode.contourIndices.length&&this.immediateMode.contourIndices[0]===o&&(this.immediateMode.contourIndices.shift(),r.push([])),r[r.length-1].push(this.immediateMode.geometry.vertices[o].x,this.immediateMode.geometry.vertices[o].y,this.immediateMode.geometry.vertices[o].z,this.immediateMode.geometry.uvs[2*o],this.immediateMode.geometry.uvs[2*o+1],this.immediateMode.geometry.vertexColors[4*o],this.immediateMode.geometry.vertexColors[4*o+1],this.immediateMode.geometry.vertexColors[4*o+2],this.immediateMode.geometry.vertexColors[4*o+3],this.immediateMode.geometry.vertexNormals[o].x,this.immediateMode.geometry.vertexNormals[o].y,this.immediateMode.geometry.vertexNormals[o].z);for(var n,s=this._triangulate(r),l=this.immediateMode.geometry.vertices,c=(this.immediateMode.geometry.vertices=[],this.immediateMode.geometry.vertexNormals=[],this.immediateMode.geometry.uvs=[],[]),d=0,h=s.length;d<h;d+=i.default.RendererGL.prototype.tessyVertexSize)c.push.apply(c,u(s.slice(d+5,d+9))),this.normal.apply(this,u(s.slice(d+9,d+12))),this.vertex.apply(this,u(s.slice(d,d+5)));this.geometryBuilder&&(n=new Map,this.immediateMode.geometry.edges=this.immediateMode.geometry.edges.map(function(r){return r.map(function(r){if(!n.has(r)){var o=l[r],s=t.immediateMode.geometry.vertices.findIndex(function(t){return o.x===t.x&&o.y===t.y&&o.z===t.z});if(-1===s){for(var i=1/0,a=0,u=0;u<t.immediateMode.geometry.vertices.length;u++){var c=t.immediateMode.geometry.vertices[u],d=o.x-c.x,h=o.y-c.y,c=o.z-c.z,d=d*d+h*h+c*c;d<i&&(i=d,a=u)}s=a}n.set(r,s)}return n.get(r)})})),this.immediateMode.geometry.vertexColors=c},i.default.RendererGL.prototype._drawImmediateFill=function(){var t,r=0<arguments.length&&void 0!==arguments[0]?arguments[0]:1,o=this.GL,n=(this._useVertexColor=0<this.immediateMode.geometry.vertexColors.length,t=this._getImmediateFillShader(),this._setFillUniforms(t),!0),s=!1,i=void 0;try{for(var a,l=this.immediateMode.buffers.fill[Symbol.iterator]();!(n=(a=l.next()).done);
1n=!0)a.value._prepareBuffer(this.immediateMode.geometry,t)}catch(t){s=!0,i=t}finally{try{n||null==l.return||l.return()}finally{if(s)throw i}}if(t.disableRemainingAttributes(),this._applyColorBlend(this.curFillColor,this.immediateMode.geometry.hasFillTransparency()),1===r)o.drawArrays(this.immediateMode.shapeMode,0,this.immediateMode.geometry.vertices.length);else try{o.drawArraysInstanced(this.immediateMode.shapeMode,0,this.immediateMode.geometry.vertices.length,r)}catch(t){console.log("\uD83C\uDF38 p5.js says: Instancing is only supported in WebGL2 mode")}t.unbindShader()},i.default.RendererGL.prototype._drawImmediateStroke=function(){var t=this.GL,r=(this._useLineColor=0<this.immediateMode.geometry.vertexStrokeColors.length,this._getImmediateStrokeShader()),o=(this._setStrokeUniforms(r),!0),n=!1,s=void 0;try{for(var i,a=this.immediateMode.buffers.stroke[Symbol.iterator]();!(o=(i=a.next()).done);o=!0)i.value._prepareBuffer(this.immediateMode.geometry,r)}catch(t){n=!0,s=t}finally{try{o||null==a.return||a.return()}finally{if(n)throw s}}r.disableRemainingAttributes(),this._applyColorBlend(this.curStrokeColor,this.immediateMode.geometry.hasFillTransparency()),t.drawArrays(t.TRIANGLES,0,this.immediateMode.geometry.lineVertices.length/3),r.unbindShader()},i.default.RendererGL);o.default=d},{"../core/constants":272,"../core/main":283,"./p5.RenderBuffer":338,"core-js/modules/es.array.concat":153,"core-js/modules/es.array.fill":156,"core-js/modules/es.array.find-index":158,"core-js/modules/es.array.from":162,"core-js/modules/es.array.iterator":165,"core-js/modules/es.array.map":168,"core-js/modules/es.array.slice":169,"core-js/modules/es.map":175,"core-js/modules/es.object.get-own-property-descriptor":186,"core-js/modules/es.object.to-string":190,"core-js/modules/es.regexp.to-string":196,"core-js/modules/es.string.iterator":200,"core-js/modules/es.symbol":212,"core-js/modules/es.symbol.description":210,"core-js/modules/es.symbol.iterator":211,"core-js/modules/es.weak-map":244,"core-js/modules/web.dom-collections.iterator":246}],340:[function(t,r,o){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function s(t){return(s="function"==typeof Symbol&&"symbol"===n(Symbol.iterator)?function(t){return n(t)}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":n(t)})(t)}t("core-js/modules/es.symbol"),t("core-js/modules/es.symbol.description"),t("core-js/modules/es.symbol.iterator"),t("core-js/modules/es.array.fill"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.array.some"),t("core-js/modules/es.object.get-own-property-descriptor"),t("core-js/modules/es.object.keys"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.string.iterator"),t("core-js/modules/es.typed-array.float32-array"),t("core-js/modules/es.typed-array.uint16-array"),t("core-js/modules/es.typed-array.uint32-array"),t("core-js/modules/es.typed-array.copy-within"),t("core-js/modules/es.typed-array.every"),t("core-js/modules/es.typed-array.fill"),t("core-js/modules/es.typed-array.filter"),t("core-js/modules/es.typed-array.find"),t("core-js/modules/es.typed-array.find-index"),t("core-js/modules/es.typed-array.for-each"),t("core-js/modules/es.typed-array.includes"),t("core-js/modules/es.typed-array.index-of"),t("core-js/modules/es.typed-array.iterator"),t("core-js/modules/es.typed-array.join"),t("core-js/modules/es.typed-array.last-index-of"),t("core-js/modules/es.typed-array.map"),t("core-js/modules/es.typed-array.reduce"),t("
1core-js/modules/es.typed-array.reduce-right"),t("core-js/modules/es.typed-array.reverse"),t("core-js/modules/es.typed-array.set"),t("core-js/modules/es.typed-array.slice"),t("core-js/modules/es.typed-array.some"),t("core-js/modules/es.typed-array.sort"),t("core-js/modules/es.typed-array.subarray"),t("core-js/modules/es.typed-array.to-locale-string"),t("core-js/modules/es.typed-array.to-string"),t("core-js/modules/es.weak-map"),t("core-js/modules/web.dom-collections.iterator"),t("core-js/modules/es.symbol"),t("core-js/modules/es.symbol.description"),t("core-js/modules/es.symbol.iterator"),t("core-js/modules/es.array.fill"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.array.some"),t("core-js/modules/es.object.keys"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.string.iterator"),t("core-js/modules/es.typed-array.float32-array"),t("core-js/modules/es.typed-array.uint16-array"),t("core-js/modules/es.typed-array.uint32-array"),t("core-js/modules/es.typed-array.copy-within"),t("core-js/modules/es.typed-array.every"),t("core-js/modules/es.typed-array.fill"),t("core-js/modules/es.typed-array.filter"),t("core-js/modules/es.typed-array.find"),t("core-js/modules/es.typed-array.find-index"),t("core-js/modules/es.typed-array.for-each"),t("core-js/modules/es.typed-array.includes"),t("core-js/modules/es.typed-array.index-of"),t("core-js/modules/es.typed-array.iterator"),t("core-js/modules/es.typed-array.join"),t("core-js/modules/es.typed-array.last-index-of"),t("core-js/modules/es.typed-array.map"),t("core-js/modules/es.typed-array.reduce"),t("
1core-js/modules/es.typed-array.reduce-right"),t("core-js/modules/es.typed-array.reverse"),t("core-js/modules/es.typed-array.set"),t("core-js/modules/es.typed-array.slice"),t("core-js/modules/es.typed-array.some"),t("core-js/modules/es.typed-array.sort"),t("core-js/modules/es.typed-array.subarray"),t("core-js/modules/es.typed-array.to-locale-string"),t("core-js/modules/es.typed-array.to-string"),t("core-js/modules/web.dom-collections.iterator"),Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;var i=(u=t("../core/main"))&&u.__esModule?u:{default:u},a=(t("./p5.RendererGL"),t("./p5.RenderBuffer"),function(t){if(t&&t.__esModule)return t;if(null===t||"object"!==s(t)&&"function"!=typeof t)return{default:t};var r,o=l();if(o&&o.has(t))return o.get(t);var n,i={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(n in t)Object.prototype.hasOwnProperty.call(t,n)&&((r=a?Object.getOwnPropertyDescriptor(t,n):null)&&(r.get||r.set)?Object.defineProperty(i,n,r):i[n]=t[n]);return i.default=t,o&&o.set(t,i),i}(t("../core/constants")));function l(){var t;return"function"!=typeof WeakMap?null:(t=new WeakMap,l=function(){return t},t)}i.default.RendererGL.prototype.freeGeometry=function(t){t.gid?this._freeBuffers(t.gid):console.warn("The model you passed to freeGeometry does not have an id!")},i.default.RendererGL.prototype._initBufferDefaults=function(t){var r;return this._freeBuffers(t),1e3<Object.keys(this.retainedMode.geometry).length&&(r=Object.keys(this.retainedMode.geometry)[0],this._freeBuffers(r)),this.retainedMode.geometry[t]={}},i.default.RendererGL.prototype._freeBuffers=function(t){var r,o=this.retainedMode.geometry[t];function n(t){var n=!0,s=!1,i=void 0;try{for(var a,l=t[Symbol.iterator]();!(n=(a=l.next()).done);n=!0){var u=a.value;o[u.dst]&&(r.deleteBuffer(o[u.dst]),o[u.dst]=null)}}catch(t){s=!0,i=t}finally{try{n||null==l.return||l.return()}finally{if(s)throw i}}}o&&(delete this.retainedMode.geometry[t],r=this.GL,o.indexBuffer&&r.deleteBuffer(o.indexBuffer),n(this.retainedMode.buffers.stroke),n(this.retainedMode.buffers.fill))},i.default.RendererGL.prototype.createBuffers=function(t,r){var o,n,s,a=this.GL,t=this._initBufferDefaults(t),l=(t.model=r,t.indexBuffer);return r.faces.length?(l=l||(t.indexBuffer=a.createBuffer()),s=(n=(o=i.default.RendererGL.prototype._flatten(r.faces)).some(function(t){return 65535<t}))?Uint32Array:Uint16Array,this._bindBuffer(l,a.ELEMENT_ARRAY_BUFFER,o,s),t.indexBufferType=n?a.UNSIGNED_INT:a.UNSIGNED_SHORT,t.vertexCount=3*r.faces.length):(l&&(a.deleteBuffer(l),t.indexBuffer=null),t.vertexCount=r.vertices?r.vertices.length:0),t.lineVertexCount=r.lineVertices?r.lineVertices.length/3:0,t},i.default.RendererGL.prototype.drawBuffers=function(t){var r=this.GL,o=this.retainedMode.geometry[t];if(!this.geometryBuilder&&this._doFill&&0<this.retainedMode.geometry[t].vertexCount){this._useVertexColor=0<o.model.vertexColors.length;var n=this._getRetainedFillShader(),s=(this._setFillUniforms(n),!0),i=!1,a=void 0;try{for(var l,u=this.retainedMode.buffers.fill[Symbol.iterator]();!(s=(l=u.next()).done);s=!0)l.value._prepareBuffer(o,n)}catch(t){i=!0,a=t}finally{try{s||null==u.return||u.return()}finally{if(i)throw a}}n.disableRemainingAttributes(),o.indexBuffer&&this._bindBuffer(o.indexBuffer,r.ELEMENT_ARRAY_BUFFER),this._applyColorBlend(this.curFillColor,o.model.hasFillTransparency()),this._drawElements(r.TRIANGLES,t),n.unbindShader()}if(!this.geometryBuilder&&this._doStroke&&0<o.lineVertexCount){this._useLineColor=0<o.model.vertexStrokeColors.length;var c=this._getRetainedStrokeShader(),d=(this._setStrokeUniforms(c),!0),i=!1,a=void 0;try{for(var h,f=this.retainedMode.buffers.stroke[Symbol.iterator]();!(d=(h=f.next()).done);d=!0)h.value._prepareBuffer(o,c)}catch(t){i=!0,a=t}finally{try{d||null==f.return||f.return()}finally{if(i)throw a}}c.disableRemainingAttributes(),this._applyColorBlend(this.curStrokeColor,o.model.hasStrokeTransparency()),this._drawArrays(r.TRIANGLES,t),c.unbindShader()}return this.geometryBuilder&&this.geometryBuilder.addRetained(o),this},i.default.RendererGL.prototype.drawBuffersScaled=function(t,r,o,n){var s=this.uModelMatrix.copy();try{this.uModelMatrix.scale(r,o,n),this.drawBuffers(t)}finally{this.uModelMatrix=s}},i.default.RendererGL.prototype._drawArrays=function(t,r){return this.GL.drawArrays(t,0,this.retainedMode.geometry[r].lineVertexCount),this},i.default.RendererGL.prototype._drawElements=function(t,r){var r=this.retainedMode.geometry[r],o=this.GL;if(r.indexBuffer){if(this._pInst.webglVersion!==a.WEBGL2&&r.indexBufferType===o.UNSIGNED_INT&&!o.getExtension("OES_element_index_uint"))throw Error("Unable to render a 3d model with > 65535 triangles. Your web browser does not support the WebGL Extension OES_element_index_uint.");o.drawElements(o.TRIANGLES,r.vertexCount,r.indexBufferType,0)}else o.drawArrays(t||o.TRIANGLES,0,r.vertexCount)},i.default.RendererGL.prototype._drawPoints=function(t,r){var o=this.GL,n=this._getImmediatePointShader();this._setPointUniforms(n),this._bindBuffer(r,o.ARRAY_BUFFER,this._vToNArray(t),Float32Array,o.STATIC_DRAW),n.enableAttrib(n.attributes.aPosition,3),this._applyColorBlend(this.curStrokeColor),o.drawArrays(o.Points,0,t.length),n.unbindShader()};var u=i.default.RendererGL;o.default=u},{"../core/constants":272,"../core/main":283,"./p5.RenderBuffer":338,"./p5.RendererGL":341,"core-js/modules/es.array.fill":156,"core-js/modules/es.array.iterator":165,"core-js/modules/es.array.some":170,"core-js/modules/es.object.get-own-property-descriptor":186,"core-js/modules/es.object.keys":189,"core-js/modules/es.object.to-string":190,"core-js/modules/es.string.iterator":200,"core-js/modules/es.symbol":212,"core-js/modules/es.symbol.description":210,"core-js/modules/es.symbol.iterator":211,"core-js/modules/es.typed-array.copy-within":213,"core-js/modules/es.typed-array.every":214,"core-js/modules/es.typed-array.fill":215,"core-js/modules/es.typed-array.filter":216,"core-js/modules/es.typed-array.find":218,"core-js/modules/es.typed-array.find-index":217,"core-js/modules/es.typed-array.float32-array":219,"core-js/modules/es.typed-array.for-each":221,"core-js/modules/es.typed-array.includes":222,"core-js/modules/es.typed-array.index-of":223,"core-js/modules/es.typed-array.iterator":226,"core-js/modules/es.typed-array.join":227,"core-js/modules/es.typed-array.last-index-of":228,"core-js/modules/es.typed-array.map":229,"core-js/modules/es.typed-array.reduce":231,"core-js/modules/es.typed-array.reduce-right":230,"core-js/modules/es.typed-array.reverse":232,"core-js/modules/es.typed-array.set":233,"core-js/modules/es.typed-array.slice":234,"core-js/modules/es.typed-array.some":235,"core-js/modules/es.typed-array.sort":236,"core-js/modules/es.typed-array.subarray":237,"core-js/modules/es.typed-array.to-locale-string":238,"core-js/modules/es.typed-array.to-string":239,"core-js/modules/es.typed-array.uint16-array":240,"core-js/modules/es.typed-array.uint32-array":241,"core-js/modules/es.weak-map":244,"core-js/modules/web.dom-collections.iterator":246}],341:[function(t,r,o){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function s(t){return(s="function"==typeof Symbol&&"symbol"===n(Symbol.iterator)?function(t){return n(t)}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":n(t)})(t)}t("core-js/modules/es.symbol"),t("core-js/modules/es.symbol.description"),t("core-js/modules/es.symbol.iterator"),t("core-js/modules/es.array.
1concat"),t("core-js/modules/es.array.copy-within"),t("core-js/modules/es.array.every"),t("core-js/modules/es.array.fill"),t("core-js/modules/es.array.flat"),t("core-js/modules/es.array.flat-map"),t("core-js/modules/es.array.from"),t("core-js/modules/es.array.includes"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.array.map"),t("core-js/modules/es.array.slice"),t("core-js/modules/es.array.some"),t("core-js/modules/es.array.unscopables.flat"),t("core-js/modules/es.array.unscopables.flat-map"),t("core-js/modules/es.map"),t("core-js/modules/es.object.assign"),t("core-js/modules/es.object.get-own-property-descriptor"),t("core-js/modules/es.object.get-prototype-of"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.reflect.construct"),t("core-js/modules/es.reflect.get"),t("core-js/modules/es.regexp.to-string"),t("core-js/modules/es.set"),t("core-js/modules/es.string.includes"),t("core-js/modules/es.string.iterator"),t("core-js/modules/es.typed-array.float32-array"),t("core-js/modules/es.typed-array.float64-array"),t("core-js/modules/es.typed-array.int16-array"),t("core-js/modules/es.typed-array.uint8-array"),t("core-js/modules/es.typed-array.uint16-array"),t("core-js/modules/es.typed-array.uint32-array"),t("core-js/modules/es.typed-array.copy-within"),t("core-js/modules/es.typed-array.every"),t("core-js/modules/es.typed-array.fill"),t("core-js/modules/es.typed-array.filter"),t("core-js/modules/es.typed-array.find"),t("core-js/modules/es.typed-array.find-index"),t("core-js/modules/es.typed-array.for-each"),t("core-js/modules/es.typed-array.includes"),t("core-js/modules/es.typed-array.index-of"),t("core-js/modules/es.typed-array.iterator"),t("core-js/modules/es.typed-array.join"),t("core-js/modules/es.typed-array.last-index-of"),t("core-js/modules/es.typed-array.map"),t("core-js/modules/es.typed-array.reduce"),t("
1core-js/modules/es.typed-array.reduce-right"),t("core-js/modules/es.typed-array.reverse"),t("core-js/modules/es.typed-array.set"),t("core-js/modules/es.typed-array.slice"),t("core-js/modules/es.typed-array.some"),t("core-js/modules/es.typed-array.sort"),t("core-js/modules/es.typed-array.subarray"),t("core-js/modules/es.typed-array.to-locale-string"),t("core-js/modules/es.typed-array.to-string"),t("core-js/modules/es.weak-map"),t("core-js/modules/web.dom-collections.iterator"),t("core-js/modules/es.symbol"),t("core-js/modules/es.symbol.description"),t("core-js/modules/es.symbol.iterator"),t("core-js/modules/es.array.concat"),t("core-js/modules/es.array.copy-within"),t("core-js/modules/es.array.every"),t("core-js/modules/es.array.fill"),t("core-js/modules/es.array.flat"),t("core-js/modules/es.array.flat-map"),t("core-js/modules/es.array.from"),t("core-js/modules/es.array.includes"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.array.map"),t("core-js/modules/es.array.slice"),t("core-js/modules/es.array.some"),t("core-js/modules/es.array.unscopables.flat"),t("core-js/modules/es.array.unscopables.flat-map"),t("core-js/modules/es.map"),t("core-js/modules/es.object.assign"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.set"),t("core-js/modules/es.string.includes"),t("core-js/modules/es.string.iterator"),t("core-js/modules/es.typed-array.float32-array"),t("core-js/modules/es.typed-array.float64-array"),t("core-js/modules/es.typed-array.int16-array"),t("core-js/modules/es.typed-array.uint8-array"),t("core-js/modules/es.typed-array.uint16-array"),t("core-js/modules/es.typed-array.uint32-array"),t("core-js/modules/es.typed-array.copy-within"),t("core-js/modules/es.typed-array.every"),t("core-js/modules/es.typed-array.fill"),t("core-js/modules/es.typed-array.filter"),t("core-js/modules/es.typed-array.find"),t("core-js/modules/es.typed-array.find-index"),t("core-js/modules/es.typed-array.for-each"),t("core-js/modules/es.typed-array.includes"),t("core-js/modules/es.typed-array.index-of"),t("core-js/modules/es.typed-array.iterator"),t("core-js/modules/es.typed-array.join"),t("core-js/modules/es.typed-array.last-index-of"),t("core-js/modules/es.typed-array.map"),t("core-js/modules/es.typed-array.reduce"),t("
1core-js/modules/es.typed-array.reduce-right"),t("core-js/modules/es.typed-array.reverse"),t("core-js/modules/es.typed-array.set"),t("core-js/modules/es.typed-array.slice"),t("core-js/modules/es.typed-array.some"),t("core-js/modules/es.typed-array.sort"),t("core-js/modules/es.typed-array.subarray"),t("core-js/modules/es.typed-array.to-locale-string"),t("core-js/modules/es.typed-array.to-string"),t("core-js/modules/web.dom-collections.iterator"),Object.defineProperty(o,"__esModule",{value:!0}),o.readPixelsWebGL=O,o.readPixelWebGL=C,o.default=void 0;var i=h(t("../core/main")),a=function(t){if(t&&t.__esModule)return t;if(null===t||"object"!==s(t)&&"function"!=typeof t)return{default:t};var r,o=d();if(o&&o.has(t))return o.get(t);var n,i={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(n in t)Object.prototype.hasOwnProperty.call(t,n)&&((r=a?Object.getOwnPropertyDescriptor(t,n):null)&&(r.get||r.set)?Object.defineProperty(i,n,r):i[n]=t[n]);return i.default=t,o&&o.set(t,i),i}(t("../core/constants")),l=h(t("./GeometryBuilder")),u=h(t("libtess")),c=(t("./p5.Shader"),t("./p5.Camera"),t("../core/p5.Renderer"),t("./p5.Matrix"),t("./p5.Framebuffer"),t("path"),t("./p5.Texture"));function d(){var t;return"function"!=typeof WeakMap?null:(t=new WeakMap,d=function(){return t},t)}function h(t){return t&&t.__esModule?t:{default:t}}function f(t){return function(t){if(Array.isArray(t)){for(var r=0,o=Array(t.length);r<t.length;r++)o[r]=t[r];return o}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw TypeError("Invalid attempt to spread non-iterable instance")}()}function p(t,r){for(var o=0;o<r.length;o++){var n=r[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function m(t,r,o){return(m="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,r,o){var t=function(t,r){for(;!Object.prototype.hasOwnProperty.call(t,r)&&null!==(t=v(t)););return t}(t,r);if(t)return(t=Object.getOwnPropertyDescriptor(t,r)).get?t.get.call(o):t.value})(t,r,o||t)}function y(t,r){return(y=Object.setPrototypeOf||function(t,r){return t.__proto__=r,t})(t,r)}function g(t){if(void 0===t)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function v(t){return(v=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function b(t,r,o){r in t?Object.defineProperty(t,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[r]=o}function _(t,r){T+="#define STROKE_CAP_".concat(t," ").concat(r,"\n"),w[a[t]]=r}function j(t,r){T+="#define STROKE_JOIN_".concat(t," ").concat(r,"\n"),S[a[t]]=r}var x,w={},S={},T="",t=(_("ROUND",0),_("PROJECT",1),_("SQUARE",2),j("ROUND",0),j("MITER",1),j("BEVEL",2),'#define PI 3.141592\n\nprecision highp float;\nprecision highp int;\n\nuniform mat4 uViewMatrix;\n\nuniform bool uUseLighting;\n\nuniform int uAmbientLightCount;\nuniform vec3 uAmbientColor[5];\nuniform mat3 uCameraRotation;\nuniform int uDirectionalLightCount;\nuniform vec3 uLightingDirection[5];\nuniform vec3 uDirectionalDiffuseColors[5];\nuniform vec3 uDirectionalSpecularColors[5];\n\nuniform int uPointLightCount;\nuniform vec3 uPointLightLocation[5];\nuniform vec3 uPointLightDiffuseColors[5]; \nuniform vec3 uPointLightSpecularColors[5];\n\nuniform int uSpotLightCount;\nuniform float uSpotLightAngle[5];\nuniform float uSpotLightConc[5];\nuniform vec3 uSpotLightDiffuseColors[5];\nuniform vec3 uSpotLightSpecularColors[5];\nuniform vec3 uSpotLightLocation[5];\nuniform vec3 uSpotLightDirection[5];\n\nuniform bool uSpecular;\nuniform float uShininess;\nuniform float uMetallic;\n\nuniform float uConstantAttenuation;\nuniform float uLinearAttenuation;\nuniform float uQuadraticAttenuation;\n\n// setting from _setImageLightUniforms()\n// boolean to initiate the calculateImageDiffuse and calculateImageSpecular\nuniform bool uUseImageLight;\n// texture for use in calculateImageDiffuse\nuniform sampler2D environmentMapDiffused;\n// texture for use in calculateImageSpecular\nuniform sampler2D environmentMapSpecular;\n\nconst float specularFactor = 2.0;\nconst float diffuseFactor = 0.73;\n\nstruct LightResult {\n float specular;\n float diffuse;\n};\n\nfloat _phongSpecular(\n vec3 lightDirection,\n vec3 viewDirection,\n vec3 surfaceNormal,\n float shininess) {\
1n\n vec3 R = reflect(lightDirection, surfaceNormal);\n return pow(max(0.0, dot(R, viewDirection)), shininess);\n}\n\nfloat _lambertDiffuse(vec3 lightDirection, vec3 surfaceNormal) {\n return max(0.0, dot(-lightDirection, surfaceNormal));\n}\n\nLightResult _light(vec3 viewDirection, vec3 normal, vec3 lightVector, float shininess, float metallic) {\n\n vec3 lightDir = normalize(lightVector);\n\n //compute our diffuse & specular terms\n LightResult lr;\n float specularIntensity = mix(1.0, 0.4, metallic);\n float diffuseIntensity = mix(1.0, 0.1, metallic);\n if (uSpecular)\n lr.specular = (_phongSpecular(lightDir, viewDirection, normal, shininess)) * specularIntensity;\n lr.diffuse = _lambertDiffuse(lightDir, normal) * diffuseIntensity;\n return lr;\n}\n\n// converts the range of "value" from [min1 to max1] to [min2 to max2]\nfloat map(float value, float min1, float max1, float min2, float max2) {\n return min2 + (value - min1) * (max2 - min2) / (max1 - min1);\n}\n\nvec2 mapTextureToNormal( vec3 v ){\n // x = r sin(phi) cos(theta) \n // y = r cos(phi) \n // z = r sin(phi) sin(theta)\n float phi = acos( v.y );\n // if phi is 0, then there are no x, z components\n float theta = 0.0;\n // else \n theta = acos(v.x / sin(phi));\n float sinTheta = v.z / sin(phi);\n if (sinTheta < 0.0) {\n // Turn it into -theta, but in the 0-2PI range\n theta = 2.0 * PI - theta;\n }\n theta = theta / (2.0 * 3.14159);\n phi = phi / 3.14159 ;\n \n vec2 angles = vec2( fract(theta + 0.25), 1.0 - phi );\n return angles;\n}\n\n\nvec3 calculateImageDiffuse(vec3 vNormal, vec3 vViewPosition, float metallic){\n // make 2 separate builds \n vec3 worldCameraPosition = vec3(0.0, 0.0, 0.0); // hardcoded world camera position\n vec3 worldNormal = normalize(vNormal * uCameraRotation);\n vec2 newTexCoor = mapTextureToNormal( worldNormal );\n vec4 texture = TEXTURE( environmentMapDiffused, newTexCoor );\n // this is to make the darker sections more dark\n // png and jpg usually flatten the brightness so it is to reverse that\n return mix(smoothstep(vec3(0.0), vec3(1.0), texture.xyz), vec3(0.0), metallic);\n}\n\nvec3 calculateImageSpecular(vec3 vNormal, vec3 vViewPosition, float shininess, float metallic){\n vec3 worldCameraPosition = vec3(0.0, 0.0, 0.0);\n vec3 worldNormal = normalize(vNormal);\n vec3 lightDirection = normalize( vViewPosition - worldCameraPosition );\n vec3 R = reflect(lightDirection, worldNormal) * uCameraRotation;\n vec2 newTexCoor = mapTextureToNormal( R );\n#ifdef WEBGL2\n // In p5js the range of shininess is >= 1,\n // Therefore roughness range will be ([0,1]*8)*20 or [0, 160]\n // The factor of 8 is because currently the getSpecularTexture\n // only calculated 8 different levels of roughness\n // The factor of 20 is just to spread up this range so that,\n // [1, max] of shininess is converted to [0,160] of roughness\n float roughness = 20. / shininess;\n vec4 outColor = textureLod(environmentMapSpecular, newTexCoor, roughness * 8.);\n#else\n vec4 outColor = TEXTURE(environmentMapSpecular, newTexCoor);\n#endif\n // this is to make the darker sections more dark\n // png and jpg usually flatten the brightness so it is to reverse that\n return mix(\n pow(outColor.xyz, vec3(10)),\n pow(outColor.xyz, vec3(1.2)),\n metallic \n );\n}\n\nvoid totalLight(\n vec3 modelPosition,\n vec3 normal,\n float shininess,\n float metallic,\n out vec3 totalDiffuse,\n out vec3 totalSpecular\n) {\n\n totalSpecular = vec3(0.0);\n\n if (!uUseLighting) {\n totalDiffuse = vec3(1.0);\n return;\n }\n\n totalDiffuse = vec3(0.0);\n\n vec3 viewDirection = normalize(-modelPosition);\n\n for (int j = 0; j < 5; j++) {\n if (j < uDirectionalLightCount) {\n vec3 lightVector = (uViewMatrix * vec4(uLightingDirection[j], 0.0)).xyz;\n vec3 lightColor = uDirectionalDiffuseColors[j];\n vec3 specularColor = uDirectionalSpecularColors[j];\n LightResult result = _light(viewDirection, normal, lightVector, shininess, metallic);\n totalDiffuse += result.diffuse * lightColor;\n totalSpecular += result.specular * lightColor * specularColor;\n }\n\n if (j < uPointLightCount) {\n vec3 lightPosition = (uViewMatrix * vec4(uPointLightLocation[j], 1.0)).xyz;\n vec3 lightVector = modelPosition - lightPosition;\n //calculate attenuation\n float lightDistance = length(lightVector);\n float lightFalloff = 1.0 / (uConstantAttenuation + lightDistance * uLinearAttenuation + (lightDistance * lightDistance) * uQuadraticAttenuation);\n vec3 lightColor = lightFalloff * uPointLightDiffuseColors[j];\n vec3 specularColor = lightFalloff * uPointLightSpecularColors[j];\n\n LightResult result = _light(viewDirection, normal, lightVector, shininess, metallic);\n totalDiffuse += result.diffuse * lightColor;\n totalSpecular += result.specular * lightColor * specularColor;\n }\n\n if(j < uSpotLightCount) {\n vec3 lightPosition = (uViewMatrix * vec4(uSpotLightLocation[j], 1.0)).xyz;\n vec3 lightVector = modelPosition - lightPosition;\n \n float lightDistance = length(lightVector);\n float lightFalloff = 1.0 / (uConstantAttenuation + lightDistance * uLinearAttenuation + (lightDistance * lightDistance) * uQuadraticAttenuation);\n\n vec3 lightDirection = (uViewMatrix * vec4(uSpotLightDirection[j], 0.0)).xyz;\n float spotDot = dot(normalize(lightVector), normalize(lightDirection));\n float spotFalloff;\n if(spotDot < uSpotLightAngle[j]) {\n spotFalloff = 0.0;\n }\n else {\n spotFalloff = pow(spotDot, uSpotLightConc[j]);\n }\n lightFalloff *= spotFalloff;\n\n vec3 lightColor = uSpotLightDiffuseColors[j];\n vec3 specularColor = uSpotLightSpecularColors[j];\n \n LightResult result = _light(viewDirection, normal, lightVector, shininess, metallic);\n \n totalDiffuse += result.diffuse * lightColor * lightFalloff;\n totalSpecular += result.specular * lightColor * specularColor * lightFalloff;\n }\n }\n\n if( uUseImageLight ){\n totalDiffuse += calculateImageDiffuse(normal, modelPosition, metallic);\n totalSpecular += calculateImageSpecular(normal, modelPosition, shininess, metallic);\n }\n\n totalDiffuse *= diffuseFactor;
1\n totalSpecular *= specularFactor;\n}\n'),E={sphereMappingFrag:"#define PI 3.141592\n\nprecision highp float;\n \nuniform sampler2D uSampler;\nuniform mat3 uNewNormalMatrix;\nuniform float uFovY;\nuniform float uAspect;\n\nvarying vec2 vTexCoord;\n \nvoid main() {\n float uFovX = uFovY * uAspect; \n vec4 newTexColor = texture2D(uSampler, vTexCoord);\n float angleY = mix(uFovY/2.0, -uFovY/2.0, vTexCoord.y);\n float angleX = mix(uFovX/2.0, -uFovX/2.0, vTexCoord.x);\n vec3 rotatedNormal = vec3( angleX, angleY, 1.0 );\n rotatedNormal = uNewNormalMatrix * normalize(rotatedNormal);\n float temp = rotatedNormal.z;\n rotatedNormal.z = rotatedNormal.x;\n rotatedNormal.x = -temp;\n vec2 suv;\n suv.y = 0.5 + 0.5 * (-rotatedNormal.y);\n suv.x = atan(rotatedNormal.z, rotatedNormal.x) / (2.0 * PI) + 0.5;\n newTexColor = texture2D(uSampler, suv.xy);\n gl_FragColor = newTexColor;\n}\n",immediateVert:"IN vec3 aPosition;\nIN vec4 aVertexColor;\n\nuniform mat4 uModelViewMatrix;\nuniform mat4 uProjectionMatrix;\nuniform float uResolution;\nuniform float uPointSize;\n\nOUT vec4 vColor;
1\nvoid main(void) {\n vec4 positionVec4 = vec4(aPosition, 1.0);\n gl_Position = uProjectionMatrix * uModelViewMatrix * positionVec4;\n vColor = aVertexColor;\n gl_PointSize = uPointSize;\n}\n",vertexColorVert:"IN vec3 aPosition;\nIN vec4 aVertexColor;\n\nuniform mat4 uModelViewMatrix;\nuniform mat4 uProjectionMatrix;\n\nOUT vec4 vColor;\n\nvoid main(void) {\n vec4 positionVec4 = vec4(aPosition, 1.0);\n gl_Position = uProjectionMatrix * uModelViewMatrix * positionVec4;\n vColor = aVertexColor;\n}\n",vertexColorFrag:"IN vec4 vColor;\nvoid main(void) {\n OUT_COLOR = vec4(vColor.rgb, 1.) * vColor.a;\n}\n",normalVert:"IN vec3 aPosition;\nIN vec3 aNormal;\nIN vec2 aTexCoord;\nIN vec4 aVertexColor;\n\nuniform mat4 uModelViewMatrix;\nuniform mat4 uProjectionMatrix;\nuniform mat3 uNormalMatrix;\n\nuniform vec4 uMaterialColor;\nuniform bool uUseVertexColor;\n\nOUT vec3 vVertexNormal;\nOUT highp vec2 vVertTexCoord;\nOUT vec4 vColor;\n\nvoid main(void) {\n HOOK_beforeVertex();\n vec4 positionVec4 = vec4(HOOK_getWorldPosition(\n (uModelViewMatrix * vec4(HOOK_getLocalPosition(aPosition), 1.0)).xyz\n ), 1.);\n\n gl_Position = uProjectionMatrix * positionVec4;\n\n vVertexNormal = HOOK_getWorldNormal(normalize(uNormalMatrix * HOOK_getLocalNormal(aNormal)));\n vVertTexCoord = HOOK_getUV(aTexCoord);\n vColor = HOOK_getVertexColor(uUseVertexColor ? aVertexColor : uMaterialColor);\n HOOK_afterVertex();\n}\n",normalFrag:"IN vec3 vVertexNormal;\nvoid main(void) {\n HOOK_beforeFragment();\n OUT_COLOR = HOOK_getFinalColor(vec4(vVertexNormal, 1.0));\n HOOK_afterFragment();\n}\n",basicFrag:"IN vec4 vColor;\nvoid main(void) {\n HOOK_beforeFragment();\n OUT_COLOR = HOOK_getFinalColor(vec4(vColor.rgb, 1.) * vColor.a);\n HOOK_afterFragment();\n}\n",lightVert:t+"// include lighting.glgl\n\nIN vec3 aPosition;\nIN vec3 aNormal;\nIN vec2 aTexCoord;\nIN vec4 aVertexColor;\n\nuniform mat4 uModelViewMatrix;\nuniform mat4 uProjectionMatrix;\nuniform mat3 uNormalMatrix;\n\nuniform bool uUseVertexColor;\nuniform vec4 uMaterialColor;\n\nOUT highp vec2 vVertTexCoord;\nOUT vec3 vDiffuseColor;\nOUT vec3 vSpecularColor;\nOUT vec4 vColor;\n\nvoid main(void) {\n\n vec4 viewModelPosition = uModelViewMatrix * vec4(aPosition, 1.0
1);\n gl_Position = uProjectionMatrix * viewModelPosition;\n\n vec3 vertexNormal = normalize(uNormalMatrix * aNormal);\n vVertTexCoord = aTexCoord;\n\n totalLight(viewModelPosition.xyz, vertexNormal, vDiffuseColor, vSpecularColor);\n\n for (int i = 0; i < 8; i++) {\n if (i < uAmbientLightCount) {\n vDiffuseColor += uAmbientColor[i];\n }\n }\n \n vColor = (uUseVertexColor ? aVertexColor : uMaterialColor);\n}\n",lightTextureFrag:"uniform vec4 uTint;\nuniform sampler2D uSampler;\nuniform bool isTexture;\nuniform bool uEmissive;\n\nIN highp vec2 vVertTexCoord;\nIN vec3 vDiffuseColor;\nIN vec3 vSpecularColor;\nIN vec4 vColor;\n\nvoid main(void) {\n if(uEmissive && !isTexture) {\n OUT_COLOR = vColor;\n }\n else {\n vec4 baseColor = isTexture\n // Textures come in with premultiplied alpha. To apply tint and still have\n // premultiplied alpha output, we need to multiply the RGB channels by the\n // tint RGB, and all channels by the tint alpha.\n ? TEXTURE(uSampler, vVertTexCoord) * vec4(uTint.rgb/255., 1.) * (uTint.a/255.)\n // Colors come in with unmultiplied alpha, so we need to multiply the RGB\n // channels by alpha to convert it to premultiplied alpha.\n : vec4(vColor.rgb * vColor.a, vColor.a);\n OUT_COLOR = vec4(baseColor.rgb * vDiffuseColor + vSpecularColor, baseColor.a);\n }\n}\n",phongVert:"precision highp int;\n\nIN vec3 aPosition;\nIN vec3 aNormal;\nIN vec2 aTexCoord;\nIN vec4 aVertexColor;\n\nuniform vec3 uAmbientColor[5];\n\nuniform mat4 uModelViewMatrix;\nuniform mat4 uProjectionMatrix;\nuniform mat3 uNormalMatrix;\nuniform int uAmbientLightCount;\n\nuniform bool uUseVertexColor;\nuniform vec4 uMaterialColor;\n\nOUT vec3 vNormal;\nOUT vec2 vTexCoord;\nOUT vec3 vViewPosition;\nOUT vec3 vAmbientColor;\nOUT vec4 vColor;\n\nvoid main(void) {\n HOOK_beforeVertex();\n vec4 viewModelPosition = vec4(HOOK_getWorldPosition(\n (uModelViewMatrix * vec4(HOOK_getLocalPosition(aPosition), 1.0)).xyz\n ), 1.);\n\n // Pass varyings to fragment shader\n vViewPosition = viewModelPosition.xyz;\n gl_Position = uProjectionMatrix * viewModelPosition; \n\n vNormal = HOOK_getWorldNormal(uNormalMatrix * HOOK_getLocalNormal(aNormal));\n vTexCoord = HOOK_getUV(aTexCoord);\n\n // TODO: this should be a uniform\n vAmbientColor = vec3(0.0);\n for (int i = 0; i < 5; i++) {\n if (i < uAmbientLightCount) {\n vAmbientColor += uAmbientColor[i];\n }\n }\n \n vColor = HOOK_getVertexColor((uUseVertexColor ? aVertexColor : uMaterialColor));\n HOOK_afterVertex();\n}\n",phongFrag:t+"// include lighting.glsl\nprecision highp int;\n\nuniform bool uHasSetAmbient;\nuniform vec4 uSpecularMatColor;\nuniform vec4 uAmbientMatColor;\nuniform vec4 uEmissiveMatColor;\n\nuniform vec4 uTint;\nuniform sampler2D uSampler;\nuniform bool isTexture;\n\nIN vec3 vNormal;\nIN vec2 vTexCoord;\nIN vec3 vViewPosition;\nIN vec3 vAmbientColor;\nIN vec4 vColor;\n\nstruct ColorComponents {\n vec3 baseColor;\n float opacity;\n vec3 ambientColor;\n vec3 specularColor;\n vec3 diffuse;\n vec3 ambient;\n vec3 specular;\n vec3 emissive;\n};\n\nstruct Inputs {\n vec3 normal;\n vec2 texCoord;\n vec3 ambientLight;\n vec3 ambientMaterial;\n vec3 specularMaterial;\n vec3 emissiveMaterial;\n vec4 color;\n float shininess;\n float metalness;\n};\n\nvoid main(void) {\n HOOK_beforeFragment();\n\n Inputs inputs;\n inputs.normal = normalize(vNormal);\n inputs.texCoord = vTexCoord;\n inputs.ambientLight = vAmbientColor;\n inputs.color = isTexture\n // Textures come in with premultiplied alpha. To apply tint and still have\n // premultiplied alpha output, we need to multiply the RGB channels by the\n // tint RGB, and all channels by the tint alpha.\n ? TEXTURE(uSampler, vTexCoord) * vec4(uTint.rgb/255., 1.) * (uTint.a/255.)\n // Colors come in with unmultiplied alpha, so we need to multiply the RGB\n // channels by alpha to convert it to premultiplied alpha.\n : vec4(vColor.rgb * vColor.a, vColor.a);\n inputs.shininess = uShininess;\n inputs.metalness = uMetallic;\n inputs.ambientMaterial = uHasSetAmbient ? uAmbientMatColor.rgb : inputs.color.rgb;\n inputs.specularMaterial = uSpecularMatColor.rgb;\n inputs.emissiveMaterial = uEmissiveMatColor.rgb;\n inputs = HOOK_getPixelInputs(inputs);\n\n vec3 diffuse;\n vec3 specular;\n totalLight(vViewPosition, inputs.normal, inputs.shininess, inputs.metalness, diffuse, specular);\n\n // Calculating final color as result of all lights (plus emissive term).\n\n vec2 texCoord = input
1s.texCoord;\n vec4 baseColor = inputs.color;\n ColorComponents c;\n c.opacity = baseColor.a;\n c.baseColor = baseColor.rgb;\n c.ambientColor = inputs.ambientMaterial;\n c.specularColor = inputs.specularMaterial;\n c.diffuse = diffuse;\n c.ambient = inputs.ambientLight;\n c.specular = specular;\n c.emissive = inputs.emissiveMaterial;\n OUT_COLOR = HOOK_getFinalColor(HOOK_combineColors(c));\n HOOK_afterFragment();\n}\n",fontVert:"IN vec3 aPosition;\nIN vec2 aTexCoord;\nuniform mat4 uModelViewMatrix;\nuniform mat4 uProjectionMatrix;\n\nuniform vec4 uGlyphRect;\nuniform float uGlyphOffset;\n\nOUT vec2 vTexCoord;\nOUT float w;\n\nvoid main() {\n vec4 positionVec4 = vec4(aPosition, 1.0);\n\n // scale by the size of the glyph's rectangle\n positionVec4.xy *= uGlyphRect.zw - uGlyphRect.xy;\n\n // Expand glyph bounding boxes by 1px on each side to give a bit of room\n // for antialiasing\n vec3 newOrigin = (uModelViewMatrix * vec4(0., 0., 0., 1.)).xyz;\n vec3 newDX = (uModelViewMatrix * vec4(1., 0., 0., 1.)).xyz;\n vec3 newDY = (uModelViewMatrix * vec4(0., 1., 0., 1.)).xyz;\n vec2 pixelScale = vec2(\n 1. / length(newOrigin - newDX),\n 1. / length(newOrigin - newDY)\n );\n vec2 offset = pixelScale * normalize(aTexCoord - vec2(0.5, 0.5)) * vec2(1., -1.);\n vec2 textureOffset = offset * (1. / vec2(\n uGlyphRect.z - uGlyphRect.x,\n uGlyphRect.w - uGlyphRect.y\n ));\n\n // move to the corner of the glyph\n positionVec4.xy += uGlyphRect.xy;\n\n // move to the letter's line offset\n positionVec4.x += uGlyphOffset;\n\n positionVec4.xy += offset;\n \n gl_Position = uProjectionMatrix * uModelViewMatrix * positionVec4;\n vTexCoord = aTexCoord + textureOffset;\n w = gl_Position.w;\n}\n",fontFrag:"#ifndef WEBGL2\n#extension GL_OES_standard_derivatives : enable\n#endif\n\n#if 0\n // simulate integer math using floats\n #define int float\n #define ivec2 vec2\n #define INT(x) float(x)\n\n int ifloor(float v) { return floor(v); }\n ivec2 ifloor(vec2 v) { return floor(v); }\n\n#else\n // use native integer math\n precision highp int;\n #define INT(x) x\n\n int ifloor(float v) { return int(v); }\n int ifloor(int v) { return v; }\n ivec2 ifloor(vec2 v) { return ivec2(v); }\n\n#endif\n\nuniform sampler2D uSamplerStrokes;\nuniform sampler2D uSamplerRowStrokes;\nuniform sampler2D uSamplerRows;\nuniform sampler2D uSamplerColStrokes;\nuniform sampler2D uSamplerCols;\n\nuniform ivec2 uStrokeImageSize;\nuniform ivec2 uCellsImageSize;\nuniform ivec2 uGridImageSize;\n\nuniform ivec2 uGridOffset;\nuniform ivec2 uGridSize;\nuniform vec4 uMaterialColor;\n\nIN vec2 vTexCoord;\n\n// some helper functions\nint ROUND(float v) { return ifloor(v + 0.5); }\nivec2 ROUND(vec2 v) { return ifloor(v + 0.5); }\nfloat saturate(float v) { return clamp(v, 0.0, 1.0); }\nvec2 saturate(vec2 v) { return clamp(v, 0.0, 1.0); }\n\nint mul(float v1, int v2) {\n return ifloor(v1 * float(v2));\n}\n\nivec2 mul(vec2 v1, ivec2 v2) {\n return ifloor(v1 * vec2(v2) + 0.5);\n}\n\n// unpack a 16-bit integer from a float vec2\nint getInt16(vec2 v) {\n ivec2 iv = ROUND(v * 255.0);\n return iv.x * INT(128) + iv.y;\n}\n\nvec2 pixelScale;\nvec2 coverage = vec2(0.0);\nvec2 weight = vec2(0.5);\nconst float minDistance = 1.0/8192.0;\nconst float hardness = 1.05; // amount of antialias\n\n// the maximum number of curves in a glyph\nconst int N = INT(250);\n\n// retrieves an indexed pixel from a sampler\nvec4 getTexel(sampler2D sampler, int pos, ivec2 size) {\n int width = size.x;\n int y = ifloor(pos / width);\n int x = pos - y * width; // pos % width\n\n return TEXTURE(sampler, (vec2(x, y) + 0.5) / vec2(size));\n}\n\nvoid calulateCrossings(vec2 p0, vec2 p1, vec2 p2, out vec2 C1, out vec2 C2) {\n\n // get the coefficients of the quadratic in t\n vec2 a = p0 - p1 * 2.0 + p2;\n vec2 b = p0 - p1;\n vec2 c = p0 - vTexCoord;\n\n // found out which values of 't' it crosses the axes\n vec2 surd = sqrt(max(vec2(0.0), b * b - a * c));\n vec2 t1 = ((b - surd) / a).yx;\n vec2 t2 = ((b + surd) / a).yx;\n\n // approximate straight lines to avoid rounding errors\n if (abs(a.y) < 0.001)\n t1.x = t2.x = c.y / (2.0 * b.y);\n\n if (abs(a.x) < 0.001)\n t1.y = t2.y = c.x / (2.0 * b.x);\n\n // plug into quadratic formula to find the corrdinates of the crossings\n C1 = ((a * t1 - b * 2.0) * t1 + c) * pixelScale;\n C2 = ((a * t2 - b * 2.0) * t2 + c) * pixelScale;\n}\n\nvoid coverageX(vec2 p0, vec2 p1, vec2 p2) {\n\n vec2 C1, C2;\n calulateCrossings(p0, p1, p2, C1, C2);\n\n // determine on which side of the x-axis the points lie\n bool y0 = p0.y > vTexCoord.y;\n bool y1 = p1.y > vTexCoord.y;\n bool y2 = p2.y > vTexCoord.y;\n\n // could web be under the curve (after t1)?\n if (y1 ? !y2 : y0) {\n // add the coverage for t1\n coverage.x += saturate(C1.x + 0.5);
1\n // calculate the anti-aliasing for t1\n weight.x = min(weight.x, abs(C1.x));\n }\n\n // are we outside the curve (after t2)?\n if (y1 ? !y0 : y2) {\n // subtract the coverage for t2\n coverage.x -= saturate(C2.x + 0.5);\n // calculate the anti-aliasing for t2\n weight.x = min(weight.x, abs(C2.x));\n }\n}\n\n// this is essentially the same as coverageX, but with the axes swapped\nvoid coverageY(vec2 p0, vec2 p1, vec2 p2) {\n\n vec2 C1, C2;\n calulateCrossings(p0, p1, p2, C1, C2);\n\n bool x0 = p0.x > vTexCoord.x;\n bool x1 = p1.x > vTexCoord.x;\n bool x2 = p2.x > vTexCoord.x;\n\n if (x1 ? !x2 : x0) {\n coverage.y -= saturate(C1.y + 0.5);\n weight.y = min(weight.y, abs(C1.y));\n }\n\n if (x1 ? !x0 : x2) {\n coverage.y += saturate(C2.y + 0.5);\n weight.y = min(weight.y, abs(C2.y));\n }\n}\n\nvoid main() {\n\n // calculate the pixel scale based on screen-coordinates\n pixelScale = hardness / fwidth(vTexCoord);\n\n // which grid cell is this pixel in?\n ivec2 gridCoord = ifloor(vTexCoord * vec2(uGridSize));\n\n // intersect curves in this row\n {\n // the index into the row info bitmap\n int rowIndex = gridCoord.y + uGridOffset.y;\n // fetch the info texel\n vec4 rowInfo = getTexel(uSamplerRows, rowIndex, uGridImageSize);\n // unpack the rowInfo\n int rowStrokeIndex = getInt16(rowInfo.xy);\n int rowStrokeCount = getInt16(rowInfo.zw);\n\n for (int iRowStroke = INT(0); iRowStroke < N; iRowStroke++) {\n if (iRowStroke >= rowStrokeCount)\n break;\n\n // each stroke is made up of 3 points: the start and control point\n // and the start of the next curve.\n // fetch the indices of this pair of strokes:\n vec4 strokeIndices = getTexel(uSamplerRowStrokes, rowStrokeIndex++, uCellsImageSize);\n\n // unpack the stroke index\n int strokePos = getInt16(strokeIndices.xy);\n\n // fetch the two strokes\n vec4 stroke0 = getTexel(uSamplerStrokes, strokePos + INT(0), uStrokeImageSize);\n vec4 stroke1 = getTexel(uSamplerStrokes, strokePos + INT(1), uStrokeImageSize);\n\n // calculate the coverage\n coverageX(stroke0.xy, stroke0.zw, stroke1.xy);\n }\n }\n\n // intersect curves in this column\n {\n int colIndex = gridCoord.x + uGridOffset.x;\n vec4 colInfo = getTexel(uSamplerCols, colIndex, uGridImageSize);\n int colStrokeIndex = getInt16(colInfo.xy);\n int colStrokeCount = getInt16(colInfo.zw);\n \n for (int iColStroke = INT(0); iColStroke < N; iColStroke++) {\n if (iColStroke >= colStrokeCount)\n break;\n\n vec4 strokeIndices = getTexel(uSamplerColStrokes, colStrokeIndex++, uCellsImageSize);\n\n int strokePos = getInt16(strokeIndices.xy);\n vec4 stroke0 = getTexel(uSamplerStrokes, strokePos + INT(0), uStrokeImageSize);\n vec4 stroke1 = getTexel(uSamplerStrokes, strokePos + INT(1), uStrokeImageSize);\n coverageY(stroke0.xy, stroke0.zw, stroke1.xy);\n }\n }\n\n weight = saturate(1.0 - weight * 2.0);\n float distance = max(weight.x + weight.y, minDistance); // manhattan approx.\n float antialias = abs(dot(coverage, weight) / distance);\n float cover = min(abs(coverage.x), abs(coverage.y));\n OUT_COLOR = vec4(uMaterialColor.rgb, 1.) * uMaterialColor.a;\n OUT_COLOR *= saturate(max(antialias, cover));\n}\n",lineVert:T+"/*\n Part of the Processing project - http://processing.org\n Copyright (c) 2012-15 The Processing Foundation\n Copyright (c) 2004-12 Ben Fry and Casey Reas\n Copyright (c) 2001-04 Massachusetts Institute of Technology\n This library is free software; you can redistribute it and/or\n modify it under the terms of the GNU Lesser General Public\n License as published by the Free Software Foundation, version 2.1.\n This library is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n Lesser General Public License for more details.\n You should have received a copy of the GNU Lesser General\n Public License along with this library;
1 if not, write to the\n Free Software Foundation, Inc., 59 Temple Place, Suite 330,\n Boston, MA 02111-1307 USA\n*/\n\n#define PROCESSING_LINE_SHADER\n\nprecision highp int;\nprecision highp float;\n\nuniform mat4 uModelViewMatrix;\nuniform mat4 uProjectionMatrix;\nuniform float uStrokeWeight;\n\nuniform bool uUseLineColor;\nuniform vec4 uMaterialColor;\n\nuniform vec4 uViewport;\nuniform int uPerspective;\nuniform int uStrokeJoin;\n\nIN vec4 aPosition;\nIN vec3 aTangentIn;\nIN vec3 aTangentOut;\nIN float aSide;\nIN vec4 aVertexColor;\n\nOUT vec4 vColor;\nOUT vec2 vTangent;\nOUT vec2 vCenter;\nOUT vec2 vPosition;\nOUT float vMaxDist;\nOUT float vCap;\nOUT float vJoin;\nOUT float vStrokeWeight;\n\nvec2 lineIntersection(vec2 aPoint, vec2 aDir, vec2 bPoint, vec2 bDir) {\n // Rotate and translate so a starts at the origin and goes out to the right\n bPoint -= aPoint;\n vec2 rotatedBFrom = vec2(\n bPoint.x*aDir.x + bPoint.y*aDir.y,\n bPoint.y*aDir.x - bPoint.x*aDir.y\n );\n vec2 bTo = bPoint + bDir;\n vec2 rotatedBTo = vec2(\n bTo.x*aDir.x + bTo.y*aDir.y,\n bTo.y*aDir.x - bTo.x*aDir.y\n );\n float intersectionDistance =\n rotatedBTo.x + (rotatedBFrom.x - rotatedBTo.x) * rotatedBTo.y /\n (rotatedBTo.y - rotatedBFrom.y);\n return aPoint + aDir * intersectionDistance;\n}\n\nvoid main() {\n HOOK_beforeVertex();\n // Caps have one of either the in or out tangent set to 0\n vCap = (aTangentIn == vec3(0.)) != (aTangentOut == (vec3(0.)))\n ? 1. : 0.;\n\n // Joins have two unique, defined tangents\n vJoin = (\n aTangentIn != vec3(0.) &&\n aTangentOut != vec3(0.) &&\n aTangentIn != aTangentOut\n ) ? 1. : 0.;\n\n vec4 localPosition = vec4(HOOK_getLocalPosition(aPosition.xyz), 1.);\n vec4 posp = vec4(HOOK_getWorldPosition((uModelViewMatrix * localPosition).xyz), 1.);\n vec4 posqIn = posp + uModelViewMatrix * vec4(aTangentIn, 0);\n vec4 posqOut = posp + uModelViewMatrix * vec4(aTangentOut, 0);\n float strokeWeight = HOOK_getStrokeWeight(uStrokeWeight);\n vStrokeWeight = strokeWeight;\n\n float facingCamera = pow(\n // The word space tangent's z value is 0 if it's facing the camera\n abs(normalize(posqIn-posp).z),\n\n // Using pow() here to ramp `facingCamera` up from 0 to 1 really quickly\n // so most lines get scaled and don't get clipped\n 0.25\n );\n\n // Moving vertices slightly toward the camera\n // to avoid depth-fighting with the fill triangles.\n // A mix of scaling and offsetting is used based on distance\n // Discussion here:\n // https://github.com/processing/p5.js/issues/7200 \n\n // using a scale <1 moves the lines towards nearby camera\n // in order to prevent popping effects due to half of\n // the line disappearing behind the geometry faces.\n float zDistance = -posp.z; \n float distanceFactor = smoothstep(0.0, 800.0, zDistance); \n \n // Discussed here:\n // http://www.opengl.org/discussion_boards/ubbthreads.php?ubb=showflat&Number=252848 \n float scale = mix(1., 0.995, facingCamera);\n float dynamicScale = mix(scale, 1.0, distanceFactor); // Closer = more scale, farther = less\n\n posp.xyz = posp.xyz * dynamicScale;\n posqIn.xyz = posqIn.xyz * dynamicScale;\n posqOut.xyz = posqOut.xyz * dynamicScale;\n\n // Moving vertices slightly toward camera when far away \n // https://github.com/processing/p5.js/issues/6956 \n float zOffset = mix(0., -1., facingCamera);\n float dynamicZAdjustment = mix(0.0, zOffset, distanceFactor); // Closer = less zAdjustment, farther = more\n\n posp.z -= dynamicZAdjustment;\n posqIn.z -= dynamicZAdjustment;\n posqOut.z -= dynamicZAdjustment;\n \n vec4 p = uProjectionMatrix * posp;\n vec4 qIn = uProjectionMatrix * posqIn;\n vec4 qOut = uProjectionMatrix * posqOut;\n vCenter = HOOK_getLineCenter(p.xy);\n\n // formula to convert from clip space (range -1..1) to screen space (range 0..[width or height])\n // screen_p = (p.xy/p.w + <1,1>) * 0.5 * uViewport.zw\n\n // prevent division by W by transforming the tangent formula (div by 0 causes\n // the line to disappear, see https://github.com/processing/processing/issues/5183)\n // t = screen_q - screen_p\n //\n // tangent is normalized and we don't care which aDirection it points to (+-)\n // t = +- normalize( screen_q - screen_p )\n // t = +- normalize( (q.xy/q.w+<1,1>)*0.5*uViewport.zw - (p.xy/p.w+<1,1>)*0.5*uViewport.zw )\n //\n // extract common factor, <1,1> - <1,1> cancels out\n // t = +- normalize( (q.xy/q.w - p.xy/p.w) * 0.5 * uViewport.zw )\n //\n // convert to common divisor\n // t = +- normalize( ((q.xy*p.w - p.xy*q.w) / (p.w*q.w)) * 0.5 * uViewport.zw )\n //\n // remove the common scalar divisor/factor, not needed due to normalize and +-\n // (keep uViewport - can't remove because it has different c
1omponents for x and y\n // and corrects for aspect ratio, see https://github.com/processing/processing/issues/5181)\n // t = +- normalize( (q.xy*p.w - p.xy*q.w) * uViewport.zw )\n\n vec2 tangentIn = normalize((qIn.xy*p.w - p.xy*qIn.w) * uViewport.zw);\n vec2 tangentOut = normalize((qOut.xy*p.w - p.xy*qOut.w) * uViewport.zw);\n\n vec2 curPerspScale;\n if(uPerspective == 1) {\n // Perspective ---\n // convert from world to clip by multiplying with projection scaling factor\n // to get the right thickness (see https://github.com/processing/processing/issues/5182)\n\n // The y value of the projection matrix may be flipped if rendering to a Framebuffer.\n // Multiplying again by its sign here negates the flip to get just the scale.\n curPerspScale = (uProjectionMatrix * vec4(1, sign(uProjectionMatrix[1][1]), 0, 0)).xy;\n } else {\n // No Perspective ---\n // multiply by W (to cancel out division by W later in the pipeline) and\n // convert from screen to clip (derived from clip to screen above)\n curPerspScale = p.w / (0.5 * uViewport.zw);\n }\n\n vec2 offset;\n if (vJoin == 1.) {\n vTangent = normalize(tangentIn + tangentOut);\n vec2 normalIn = vec2(-tangentIn.y, tangentIn.x);\n vec2 normalOut = vec2(-tangentOut.y, tangentOut.x);\n float side = sign(aSide);\n float sideEnum = abs(aSide);\n\n // We generate vertices for joins on either side of the centerline, but\n // the \"elbow\" side is the only one needing a join. By not setting the\n // offset for the other side, all its vertices will end up in the same\n // spot and not render, effectively discarding it.\n if (sign(dot(tangentOut, vec2(-tangentIn.y, tangentIn.x))) != side) {\n // Side enums:\n // 1: the side going into the join\n // 2: the middle of the join\n // 3: the side going out of the join\n if (sideEnum == 2.) {\n // Calculate the position + tangent on either side of the join, and\n // find where the lines intersect to find the elbow of the join\n vec2 c = (posp.xy/posp.w + vec2(1.,1.)) * 0.5 * uViewport.zw;\n vec2 intersection = lineIntersection(\n c + (side * normalIn * strokeWeight / 2.),\n tangentIn,\n c + (side * normalOut * strokeWeight / 2.),\n tangentOut\n );\n offset = (intersection - c);\n\n // When lines are thick and the angle of the join approaches 180, the\n // elbow might be really far from the center. We'll apply a limit to\n // the magnitude to avoid lines going across the whole screen when this\n // happens.\n float mag = length(offset);\n float maxMag = 3. * strokeWeight;\n if (mag > maxMag) {\n offset *= maxMag / mag;\n }\n } else if (sideEnum == 1.) {\n offset = side * normalIn * strokeWeight / 2.;\n } else if (sideEnum == 3.) {\n offset = side * normalOut * strokeWeight / 2.;\n }\n }\n if (uStrokeJoin == STROKE_JOIN_BEVEL) {\n vec2 avgNormal = vec2(-vTangent.y, vTangent.x);\n vMaxDist = abs(dot(avgNormal, normalIn * strokeWeight / 2.));\n } else {\n vMaxDist = strokeWeight / 2.;\n }\n } else {\n vec2 tangent = aTangentIn == vec3(0.) ? tangentOut : tangentIn;\n vTangent = tangent;\n vec2 normal = vec2(-tangent.y, tangent.x);\n\n float normalOffset = sign(aSide);\n // Caps will have side values of -2 or 2 on the edge of the cap that\n // extends out from the line\n float tangentOffset = abs(aSide) - 1.;\n offset = (normal * normalOffset + tangent * tangentOffset) *\n strokeWeight * 0.5;\n vMaxDist = strokeWeight / 2.;\n }\n vPosition = HOOK_getLinePosition(vCenter + offset);\n\n gl_Position.xy = p.xy + offset.xy * curPerspScale;\n gl_Position.zw = p.zw;\n \n vColor = HOOK_getVertexColor(uUseLineColor ? aVertexColor : uMaterialColor);\n HOOK_afterVertex();\n}\n",lineFrag:T+"precision highp int;\nprecision highp float;\n\nuniform vec4 uMaterialColor;\nuniform int uStrokeCap;\nuniform int uStrokeJoin;\n\nIN vec4 vColor;\nIN vec2 vTangent;\nIN vec2 vCenter;\nIN vec2 vPosition;\nIN float vStrokeWeight;\nIN float vMaxDist;\nIN float vCap;\nIN float vJoin;\n\nfloat distSquared(vec2 a, vec2 b) {\n vec2 aToB = b - a;\n return dot(aToB, aToB);\n}\n\nstruct Inputs {\n vec4 color;\n vec2 tangent;\n vec2 center;\n vec2 position;\n float strokeWeight;\n};\n\nvoid main() {\n HOOK_beforeFragment();
1\n\n Inputs inputs;\n inputs.color = vColor;\n inputs.tangent = vTangent;\n inputs.center = vCenter;\n inputs.position = vPosition;\n inputs.strokeWeight = vStrokeWeight;\n inputs = HOOK_getPixelInputs(inputs);\n\n if (vCap > 0.) {\n if (\n uStrokeCap == STROKE_CAP_ROUND &&\n HOOK_shouldDiscard(distSquared(inputs.position, inputs.center) > inputs.strokeWeight * inputs.strokeWeight * 0.25)\n ) {\n discard;\n } else if (\n uStrokeCap == STROKE_CAP_SQUARE &&\n HOOK_shouldDiscard(dot(inputs.position - inputs.center, inputs.tangent) > 0.)\n ) {\n discard;\n // Use full area for PROJECT\n } else if (HOOK_shouldDiscard(false)) {\n discard;\n }\n } else if (vJoin > 0.) {\n if (\n uStrokeJoin == STROKE_JOIN_ROUND &&\n HOOK_shouldDiscard(distSquared(inputs.position, inputs.center) > inputs.strokeWeight * inputs.strokeWeight * 0.25)\n ) {\n discard;\n } else if (uStrokeJoin == STROKE_JOIN_BEVEL) {\n vec2 normal = vec2(-inputs.tangent.y, inputs.tangent.x);\n if (HOOK_shouldDiscard(abs(dot(inputs.position - inputs.center, normal)) > vMaxDist)) {\n discard;\n }\n // Use full area for MITER\n } else if (HOOK_shouldDiscard(false)) {\n discard;\n }\n }\n OUT_COLOR = HOOK_getFinalColor(vec4(inputs.color.rgb, 1.) * inputs.color.a);\n HOOK_afterFragment();\n}\n",pointVert:"IN vec3 aPosition;\nuniform float uPointSize;\nOUT float vStrokeWeight;\nuniform mat4 uModelViewMatrix;\nuniform mat4 uProjectionMatrix;\n\nvoid main() {\n HOOK_beforeVertex();\n vec4 viewModelPosition = vec4(HOOK_getWorldPosition(\n (uModelViewMatrix * vec4(HOOK_getLocalPosition(aPosition), 1.0)).xyz\n ), 1.);\n gl_Position = uProjectionMatrix * viewModelPosition; \n\n float pointSize = HOOK_getPointSize(uPointSize);\n\n gl_PointSize = pointSize;\n vStrokeWeight = pointSize;\n HOOK_afterVertex();\n}\n",pointFrag:"precision mediump int;\nuniform vec4 uMaterialColor;\nIN float vStrokeWeight;\n\nvoid main(){\n HOOK_beforeFragment();\n float mask = 0.0;\n\n // make a circular mask using the gl_PointCoord (goes from 0 - 1 on a point)\n // might be able to get a nicer edge on big strokeweights with smoothstep but slightly less performant\n\n mask = step(0.98, length(gl_PointCoord * 2.0 - 1.0));\n\n // if strokeWeight is 1 or less lets just draw a square\n // this prevents weird artifacting from carving circles when our points are really small\n // if strokeWeight is larger than 1, we just use it as is\n\n mask = mix(0.0, mask, clamp(floor(vStrokeWeight - 0.5),0.0,1.0));\n\n // throw away the borders of the mask\n // otherwise we get weird alpha blending issues\n\n if(HOOK_shouldDiscard(mask > 0.98)){\n discard;\n }\n\n OUT_COLOR = HOOK_getFinalColor(vec4(uMaterialColor.rgb, 1.) * uMaterialColor.a);\n HOOK_afterFragment();\n}\n",imageLightVert:"precision highp float;\nattribute vec3 aPosition;\nattribute vec3 aNormal;\nattribute vec2 aTexCoord;\n\nvarying vec3 localPos;\nvarying vec3 vWorldNormal;\nvarying vec3 vWorldPosition;\nvarying vec2 vTexCoord;\n\nuniform mat4 uModelViewMatrix;\nuniform mat4 uProjectionMatrix;\nuniform mat3 uNormalMatrix;\n\nvoid main() {\n // Multiply the position by the matrix.\n vec4 viewModelPosition = uModelViewMatrix * vec4(aPosition, 1.0
1);\n gl_Position = uProjectionMatrix * viewModelPosition; \n \n // orient the normals and pass to the fragment shader\n vWorldNormal = uNormalMatrix * aNormal;\n \n // send the view position to the fragment shader\n vWorldPosition = (uModelViewMatrix * vec4(aPosition, 1.0)).xyz;\n \n localPos = vWorldPosition;\n vTexCoord = aTexCoord;\n}\n\n\n/*\nin the vertex shader we'll compute the world position and world oriented normal of the vertices and pass those to the fragment shader as varyings.\n*/\n",imageLightDiffusedFrag:"precision highp float;\nvarying vec3 localPos;\n\n// the HDR cubemap converted (can be from an equirectangular environment map.)\nuniform sampler2D environmentMap;\nvarying vec2 vTexCoord;\n\nconst float PI = 3.14159265359;\n\nvec2 nTOE( vec3 v ){\n // x = r sin(phi) cos(theta) \n // y = r cos(phi) \n // z = r sin(phi) sin(theta)\n float phi = acos( v.y );\n // if phi is 0, then there are no x, z components\n float theta = 0.0;\n // else \n theta = acos(v.x / sin(phi));\n float sinTheta = v.z / sin(phi);\n if (sinTheta < 0.0) {\n // Turn it into -theta, but in the 0-2PI range\n theta = 2.0 * PI - theta;\n }\n theta = theta / (2.0 * 3.14159);\n phi = phi / 3.14159 ;\n \n vec2 angles = vec2( phi, theta );\n return angles;\n}\n\nfloat random(vec2 p) {\n vec3 p3 = fract(vec3(p.xyx) * .1031);\n p3 += dot(p3, p3.yzx + 33.33);\n return fract((p3.x + p3.y) * p3.z);\n}\n\nvoid main()\n{ \n // the sample direction equals the hemisphere's orientation\n float phi = vTexCoord.x * 2.0 * PI;\n float theta = vTexCoord.y * PI;\n float x = sin(theta) * cos(phi);\n float y = sin(theta) * sin(phi);\n float z = cos(theta);\n vec3 normal = vec3( x, y, z);\n\n // Discretely sampling the hemisphere given the integral's\n // spherical coordinates translates to the following fragment code:\n vec3 irradiance = vec3(0.0); \n vec3 up = vec3(0.0, 1.0, 0.0);\n vec3 right = normalize(cross(up, normal));\n up = normalize(cross(normal, right));\n\n // We specify a fixed sampleDelta delta value to traverse\n // the hemisphere; decreasing or increasing the sample delta\n // will increase or decrease the accuracy respectively.\n const float sampleDelta = 0.100;\n float nrSamples = 0.0;\n float randomOffset = random(gl_FragCoord.xy) * sampleDelta;\n for(float rawPhi = 0.0; rawPhi < 2.0 * PI; rawPhi += sampleDelta)\n {\n float phi = rawPhi + randomOffset;\n for(float rawTheta = 0.0; rawTheta < ( 0.5 ) * PI; rawTheta += sampleDelta)\n {\n float theta = rawTheta + randomOffset;\n // spherical to cartesian (in tangent space) // tangent space to world // add each sample result to irradiance\n float x = sin(theta) * cos(phi);\n float y = sin(theta) * sin(phi);\n float z = cos(theta);\n vec3 tangentSample = vec3( x, y, z);\n \n vec3 sampleVec = tangentSample.x * right + tangentSample.y * up + tangentSample.z * normal;\n irradiance += (texture2D(environmentMap, nTOE(sampleVec)).xyz) * cos(theta) * sin(theta);\n nrSamples++;\n }\n }\n // divide by the total number of samples taken, giving us the average sampled irradiance.\n irradiance = PI * irradiance * (1.0 / float(nrSamples )) ;\n \n \n gl_FragColor = vec4(irradiance, 1.0);\n}",imageLightSpecularFrag:"precision highp float;\r\nvarying vec3 localPos;\r\nvarying vec2 vTexCoord;\r\n\r\n// our texture\r\nuniform sampler2D environmentMap;\r\nuniform float roughness;\r\n\r\nconst float PI = 3.14159265359;\r\n\r\nfloat VanDerCorput(int bits);\r\nvec2 HammersleyNoBitOps(int i, int N);\r\nvec3 ImportanceSampleGGX(vec2 Xi, vec3 N, float roughness);\r\n\r\n\r\nvec2 nTOE( vec3 v ){\r\n // x = r sin(phi) cos(theta) \r\n // y = r cos(phi) \r\n // z = r sin(phi) sin(theta)\r\n float phi = acos( v.y );\r\n // if phi is 0, then there are no x, z components\r\n float theta = 0.0;\r\n // else \r\n theta = acos(v.x / sin(phi));\r\n float sinTheta = v.z / sin(phi);\r\n if (sinTheta < 0.0) {\r\n // Turn it into -theta, but in the 0-2PI range\r\n theta = 2.0 * PI - theta;\r\n }\r\n theta = theta / (2.0 * 3.14159);\r\n phi = phi / 3.14159 ;\r\n \r\n vec2 angles = vec2( phi, theta );\r\n return angles;\r\n}\r\n\r\n\r\nvoid main(){\r\n const int SAMPLE_COUNT = 400; // 4096\r\n int lowRoughnessLimit = int(pow(2.0,(roughness+0.1)*20.0));\r\n float totalWeight = 0.0;\r\n vec3 prefilteredColor = vec3(0.0);\r\n float phi = vTexCoord.x * 2.0 * PI;\r\n float theta = vTexCoord.y * PI;\r\n float x = sin(theta) * cos(phi);\r\n float y = sin(theta) * sin(phi);\r\n float z = cos(theta);\r\n vec3 N = vec3(x,y,z);\r\n vec3 V = N;\r\n for (int i = 0; i < SAMPLE_COUNT; ++i)\r\n {\r\n // break at smaller sample numbers for low roughness levels\r\n if(i == lowRoughnessLimit)\r\n {\r\n break;\r\n }\r\n vec2 Xi = HammersleyNoBitOps(i, SAMPLE_COUNT);\r\n vec3 H = ImportanceSampleGGX(Xi, N, roughness);\r\n vec3 L = normalize(2.0 * dot(V, H) * H - V);\r\n\r\n float NdotL = max(dot(N, L), 0.0);\r\n if (NdotL > 0.0)\r\n {\r\n prefilteredColor += texture2D(environmentMap, nTOE(L)).xyz * NdotL;\r\n totalWeight += NdotL;\r\n }\r\n }\r\n prefilteredColor = prefilteredColor / totalWeight;\r\n\r\n gl_FragColor = vec4(prefilteredColor, 1.0);\r\n}\r\n\r\nvec3 ImportanceSampleGGX(vec2 Xi, vec3 N, float roughness){\r\n float a = roughness * roughness;\r\n\r\n float phi = 2.0 * PI * Xi.x;\r\n float cosTheta = sqrt((1.0 - Xi.y) / (1.0 + (a * a - 1.0) * Xi.y));\r\n float sinTheta = sqrt(1.0 - cosTheta * cosTheta);\r\n // from spherical coordinates to cartesian coordinates\r\n vec3 H;\r\n H.x = cos(phi) * sinTheta;\r\n H.y = sin(phi) * sinTheta;\r\n H.z = cosTheta;\r\n\r\n // from tangent-space vector to world-space sample vector\r\n vec3 up = abs(N.z) < 0.999 ? vec3(0.0, 0.0, 1.0) : vec3(1.0, 0.0, 0.0);\r\n vec3 tangent = normalize(cross(up, N));\r\n vec3 bitangent = cross(N, tangent);\r\n\r\n vec3 sampleVec = tangent * H.x + bitangent * H.y + N * H.z;\r\n return normalize(sampleVec);\r\n}\r\n\r\n\r\nfloat VanDerCorput(int n, int base)\r\n{\r\n#ifdef WEBGL2\r\n\r\n uint bits = uint(n);\r\n bits = (bits << 16u) | (bits >> 16u);\r\n bits = ((bits & 0x55555555u) << 1u) | ((bits & 0xAAAAAAAAu) >> 1u);\r\n bits = ((bits & 0x33333333u) << 2u) | ((bits & 0xCCCCCCCCu) >> 2u);\r\n bits = ((bits & 0x0F0F0F0Fu) << 4u) | ((bits & 0xF0F0F0F0u) >> 4u);\r\n bits = ((bits & 0x00FF00FFu) << 8u) | ((bits & 0xFF00FF00u) >> 8u);\r\n return float(bits) * 2.3283064365386963e-10; // / 0x100000000\r\n\r\n#else\r\n\r\n float invBase = 1.0 / float(base);\r\n float denom = 1.0;\r\n float result = 0.0;\r\n\r\n\r\n for (int i = 0; i < 32; ++i)\r\n {\r\n if (n > 0)\r\n {\r\n denom = mod(float(n), 2.0);
1\r\n result += denom * invBase;\r\n invBase = invBase / 2.0;\r\n n = int(float(n) / 2.0);\r\n }\r\n }\r\n\r\n\r\n return result;\r\n\r\n#endif\r\n}\r\n\r\nvec2 HammersleyNoBitOps(int i, int N)\r\n{\r\n return vec2(float(i) / float(N), VanDerCorput(i, 2));\r\n}\r\n"},M=E.sphereMappingFrag;for(x in E)E[x]="#ifdef WEBGL2\n\n#define IN in\n#define OUT out\n\n#ifdef FRAGMENT_SHADER\nout vec4 outColor;\n#define OUT_COLOR outColor\n#endif\n#define TEXTURE texture\n\n#else\n\n#ifdef FRAGMENT_SHADER\n#define IN varying\n#else\n#define IN attribute\n#endif\n#define OUT varying\n#define TEXTURE texture2D\n\n#ifdef FRAGMENT_SHADER\n#define OUT_COLOR gl_FragColor\n#endif\n\n#endif\n"+E[x];b(t={},a.GRAY,"precision highp float;\n\nvarying vec2 vTexCoord;\n\nuniform sampler2D tex0;\n\nfloat luma(vec3 color) {\n // weighted grayscale with luminance values\n return dot(color, vec3(0.2126, 0.7152, 0.0722));\n}\n\nvoid main() {\n vec4 tex = texture2D(tex0, vTexCoord);\n float gray = luma(tex.rgb);\n gl_FragColor = vec4(gray, gray, gray, tex.a);\n}\n"),b(t,a.ERODE,"// Reduces the bright areas in an image\n\nprecision highp float;\n\nvarying vec2 vTexCoord;\n\nuniform sampler2D tex0;\nuniform vec2 texelSize;\n\nfloat luma(vec3 color) {\n // weighted grayscale with luminance values\n // weights 77, 151, 28 taken from src/image/filters.js\n return dot(color, vec3(0.300781, 0.589844, 0.109375));\n}\n\nvoid main() {\n vec4 color = texture2D(tex0, vTexCoord);\n float lum = luma(color.rgb);\n\n // set current color as the darkest neighbor color\n\n vec4 neighbors[4];\n neighbors[0] = texture2D(tex0, vTexCoord + vec2( texelSize.x, 0.0));\n neighbors[1] = texture2D(tex0, vTexCoord + vec2(-texelSize.x, 0.0));\n neighbors[2] = texture2D(tex0, vTexCoord + vec2(0.0, texelSize.y));\n neighbors[3] = texture2D(tex0, vTexCoord + vec2(0.0, -texelSize.y));\n\n for (int i = 0; i < 4; i++) {\n vec4 neighborColor = neighbors[i];\n float neighborLum = luma(neighborColor.rgb);\n\n if (neighborLum < lum) {\n color = neighborColor;\n lum = neighborLum;\n }\n }\n\n gl_FragColor = color;\n}\n"),b(t,a.DILATE,"// Increase the bright areas in an image\n\nprecision highp float;\n\nvarying vec2 vTexCoord;\n\nuniform sampler2D tex0;\nuniform vec2 texelSize;\n\nfloat luma(vec3 color) {\n // weighted grayscale with luminance values\n // weights 77, 151, 28 taken from src/image/filters.js\n return dot(color, vec3(0.300781, 0.589844, 0.109375));\n}\n\nvoid main() {\n vec4 color = texture2D(tex0, vTexCoord);\n float lum = luma(color.rgb);\n\n // set current color as the brightest neighbor color\n\n vec4 neighbors[4];\n neighbors[0] = texture2D(tex0, vTexCoord + vec2( texelSize.x, 0.0));\n neighbors[1] = texture2D(tex0, vTexCoord + vec2(-texelSize.x, 0.0));\n neighbors[2] = texture2D(tex0, vTexCoord + vec2(0.0, texelSize.y));\n neighbors[3] = texture2D(tex0, vTexCoord + vec2(0.0, -texelSize.y));\n\n for (int i = 0; i < 4; i++) {\n vec4 neighborColor = neighbors[i];\n float neighborLum = luma(neighborColor.rgb);\n\n if (neighborLum > lum) {\n color = neighborColor;\n lum = neighborLum;\n }\n }\n\n gl_FragColor = color;\n}\n"),b(t,a.BLUR,"precision highp float;\n\n// Two-pass blur filter, unweighted kernel.\n// See also a similar blur at Adam Ferriss' repo of shader examples:\n// https://github.com/aferriss/p5jsShaderExamples/blob/gh-pages/4_image-effects/4-9_single-pass-blur/effect.frag\n\n\nuniform sampler2D tex0;\nvarying vec2 vTexCoord;\nuniform vec2 direction;\nuniform vec2 canvasSize;\nuniform float radius;\n\nfloat random(vec2 p) {\n vec3 p3 = fract(vec3(p.xyx) * .1031);\n p3 += dot(p3, p3.yzx + 33.33);\n return fract((p3.x + p3.y) * p3.z);\n}\n\n// This isn't a real Gaussian weight, it's a quadratic weight. It's what the\n// CPU mode's blur uses though, so we also use it here to match.\nfloat quadWeight(float x, float e) {\n return pow(e-abs(x), 2.);\n}\n\nvoid main(){\n vec2 uv = vTexCoord;\n\n // A reasonable maximum number of samples\n const float maxSamples = 64.0;\n\n float numSamples = floor(7. * radius);\n if (fract(numSamples / 2.) == 0.) {\n numSamples++;\n }\n vec4 avg = vec4(0.0);\n float total = 0.0;\n\n // Calculate the spacing to avoid skewing if numSamples > maxSamples\n float spacing = 1.0;\n if (numSamples > maxSamples) {\n spacing = numSamples / maxSamples;\n numSamples = maxSamples;\n }\n\n float randomOffset = (spacing - 1.0) * mix(-0.5, 0.5, random(gl_FragCoord.xy));\n for (float i = 0.0; i < maxSamples;
1 i++) {\n if (i >= numSamples) break;\n\n float sample = i * spacing - (numSamples - 1.0) * 0.5 * spacing + randomOffset;\n vec2 sampleCoord = uv + vec2(sample, sample) / canvasSize * direction;\n float weight = quadWeight(sample, (numSamples - 1.0) * 0.5 * spacing);\n\n avg += weight * texture2D(tex0, sampleCoord);\n total += weight;\n }\n\n avg /= total;\n gl_FragColor = avg;\n}\n"),b(t,a.POSTERIZE,"// Limit color space for a stylized cartoon / poster effect\n\nprecision highp float;\n\nvarying vec2 vTexCoord;\n\nuniform sampler2D tex0;\nuniform float filterParameter;\n\nvec3 quantize(vec3 color, float n) {\n // restrict values to N options/bins\n // and floor each channel to nearest value\n //\n // eg. when N = 5, values = 0.0, 0.25, 0.50, 0.75, 1.0\n // then quantize (0.1, 0.7, 0.9) -> (0.0, 0.5, 1.0)\n\n color = color * n;\n color = floor(color);\n color = color / (n - 1.0);\n return color;\n}\n\nvoid main() {\n vec4 color = texture2D(tex0, vTexCoord);\n\n vec3 restrictedColor = quantize(color.rgb / color.a, filterParameter);\n\n gl_FragColor = vec4(restrictedColor.rgb * color.a, color.a);\n}\n"),b(t,a.OPAQUE,"// Set alpha channel to entirely opaque\n\nprecision highp float;\n\nvarying vec2 vTexCoord;\n\nuniform sampler2D tex0;\n\nvoid main() {\n vec4 color = texture2D(tex0, vTexCoord);\n gl_FragColor = vec4(color.rgb / color.a, 1.0);\n}\n"),b(t,a.INVERT,"// Set each pixel to inverse value\n// Note that original INVERT does not change the opacity, so this follows suit\n\nprecision highp float;\n\nvarying vec2 vTexCoord;\n\nuniform sampler2D tex0;\n\nvoid main() {\nvec4 color = texture2D(tex0, vTexCoord);\nvec3 origColor = color.rgb / color.a;\nvec3 invertedColor = vec3(1.0) - origColor;\ngl_FragColor = vec4(invertedColor * color.a, color.a);\n}\n"),b(t,a.THRESHOLD,"// Convert pixels to either white or black, \n// depending on if their luma is above or below filterParameter\n\nprecision highp float;\n\nvarying vec2 vTexCoord;\n\nuniform sampler2D tex0;\nuniform float filterParameter;\n\nfloat luma(vec3 color) {\n // weighted grayscale with luminance values\n return dot(color, vec3(0.2126, 0.7152, 0.0722));\n}\n\nvoid main() {\n vec4 color = texture2D(tex0, vTexCoord);\n float gray = luma(color.rgb / color.a);\n // floor() used to match src/image/filters.js\n float threshold = floor(filterParameter * 255.0) / 255.0;\n float blackOrWhite = step(threshold, gray);\n gl_FragColor = vec4(vec3(blackOrWhite) * color.a, color.a);\n}\n");var k=t;function O(t,r,o,n,s,i,a,l,u,c){var d=r.getParameter(r.FRAMEBUFFER_BINDING),o=(r.bindFramebuffer(r.FRAMEBUFFER,o),l===r.RGBA?4:3),h=i*a*o,f=u===r.UNSIGNED_BYTE?Uint8Array:Float32Array;if(t instanceof f&&t.length===h||(t=new f(h)),r.readPixels(n,c?c-s-a:s,i,a,l,u,t),r.bindFramebuffer(r.FRAMEBUFFER,d),c)for(var p=Math.floor(a/2),m=new f(i*o),y=0;y<p;y++){var g=y*i*4,v=(a-y-1)*i*4;m.set(t.subarray(g,g+4*i)),t.copyWithin(g,v,v+4*i),t.set(m,v)}return t}function C(t,r,o,n,s,i,a){var l=t.getParameter(t.FRAMEBUFFER_BINDING),r=(t.bindFramebuffer(t.FRAMEBUFFER,r),s===t.RGBA?4:3),r=new(i===t.UNSIGNED_BYTE?Uint8Array:Float32Array)(r);return t.readPixels(o,a?a-n-1:n,1,1,s,i,r),t.bindFramebuffer(t.FRAMEBUFFER,l),Array.from(r)}i.default.prototype.setAttributes=function(t,r){if(void 0===this._glAttributes)console.log("You are trying to use setAttributes on a p5.Graphics object that does not use a WEBGL renderer.");else{var o=!0;if(void 0!==r?(null===this._glAttributes&&(this._glAttributes={}),this._glAttributes[t]!==r&&(this._glAttributes[t]=r,o=!1)):t instanceof Object&&this._glAttributes!==t&&(this._glAttributes=t,o=!1),this._renderer.isP3D&&!o){if(!this._setupDone){for(var n in this._renderer.retainedMode.geometry)if(this._renderer.retainedMode.geometry.hasOwnProperty(n))return void i.default._friendlyError("Sorry, Could not set the attributes, you need to call setAttributes() before calling the other drawing methods in setup()")}this.push(),this._renderer._resetContext(),this.pop(),this._renderer._curCamera&&(this._renderer._curCamera._renderer=this._renderer)}}},i.default.RendererGL=function(t){var r=d;if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");r.prototype=Object.create(t&&t.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),t&&y(r,t);var o,n=function(){var t,r,o=v(d);return t=!function(){if("undefined"!=typeof Reflect&&Reflect.construct&&!Reflect.construct.sham){if("function"==typeof Proxy)return 1;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),1}catch(t){}}}()?o.apply(this,arguments):Reflect.construct(o,arguments,t=v(this).constructor),o=this,(r=t)&&("object"===s(r)||"function"==typeof r)?r:g(o)};function d(t,r,o,s){if(this instanceof d)return(t=n.call(this,t,r,o))._setAttributeDefaults(r),t._initContext(),t.isP3D=!0,t.geometryBuilder=void 0,t.GL=t.drawingContext,t._pInst._setProperty("drawingContext",t.drawingContext),t._isErasing=!1,t._clipDepths=[],t._isClipApplied=!1,t._stencilTestOn=!1,t._enableLighting=!1,t.ambientLightColors=[],t.mixedAmbientLight=[],t.mixedSpecularColor=[],t.specularColors=[1,1,1],t.directionalLightDirections=[],t.directionalLightDiffuseColors=[],t.directionalLightSpecularColors=[],t.pointLightPositions=[],t.pointLightDiffuseColors=[],t.pointLightSpecularColors=[],t.spotLightPositions=[],t.spotLightDirections=[],t.spotLightDiffuseColors=[],t.spotLightSpecularColors=[],t.spotLightAngle=[],t.spotLightConc=[],t.activeImageLight=null,t.diffusedTextures=new Map,t.specularTextures=new Map,t.drawMode=a.FILL,t.curFillColor=t._cachedFillStyle=[1,1,1,1],t.curAmbientColor=t._cachedFillStyle=[1,1,1,1],t.cur
1SpecularColor=t._cachedFillStyle=[0,0,0,0],t.curEmissiveColor=t._cachedFillStyle=[0,0,0,0],t.curStrokeColor=t._cachedStrokeStyle=[0,0,0,1],t.curBlendMode=a.BLEND,t.preEraseBlend=void 0,t._cachedBlendMode=void 0,t.webglVersion===a.WEBGL2?t.blendExt=t.GL:t.blendExt=t.GL.getExtension("EXT_blend_minmax"),t._isBlending=!1,t._hasSetAmbient=!1,t._useSpecularMaterial=!1,t._useEmissiveMaterial=!1,t._useNormalMaterial=!1,t._useShininess=1,t._useMetalness=0,t._useLineColor=!1,t._useVertexColor=!1,t.registerEnabled=new Set,t._tint=[255,255,255,255],t.constantAttenuation=1,t.linearAttenuation=0,t.quadraticAttenuation=0,t.uModelMatrix=new i.default.Matrix,t.uViewMatrix=new i.default.Matrix,t.uMVMatrix=new i.default.Matrix,t.uPMatrix=new i.default.Matrix,t.uNMatrix=new i.default.Matrix("mat3"),t.curMatrix=new i.default.Matrix("mat3"),t._currentNormal=new i.default.Vector(0,0,1),t._curCamera=new i.default.Camera(g(t)),t._curCamera._computeCameraDefaultSettings(),t._curCamera._setDefaultCamera(),t.filterCamera=new i.default.Camera(g(t)),t.filterCamera._computeCameraDefaultSettings(),t.filterCamera._setDefaultCamera(),t.prevTouches=[],t.zoomVelocity=0,t.rotateVelocity=new i.default.Vector(0,0),t.moveVelocity=new i.default.Vector(0,0),t.executeZoom=!1,t.executeRotateAndMove=!1,t.specularShader=void 0,t.sphereMapping=void 0,t.diffusedShader=void 0,t._defaultLightShader=void 0,t._defaultImmediateModeShader=void 0,t._defaultNormalShader=void 0,t._defaultColorShader=void 0,t._defaultPointShader=void 0,t.userFillShader=void 0,t.userStrokeShader=void 0,t.userPointShader=void 0,t.retainedMode={geometry:{},buffers:{stroke:[new i.default.RenderBuffer(4,"lineVertexColors","lineColorBuffer","aVertexColor",g(t)),new i.default.RenderBuffer(3,"lineVertices","lineVerticesBuffer","aPosition",g(t)),new i.default.RenderBuffer(3,"lineTangentsIn","lineTangentsInBuffer","aTangentIn",g(t)),new i.default.RenderBuffer(3,"lineTangentsOut","lineTangentsOutBuffer","aTangentOut",g(t)),new i.default.RenderBuffer(1,"lineSides","lineSidesBuffer","aSide",g(t))],fill:[new i.default.RenderBuffer(3,"vertices","vertexBuffer","aPosition",g(t),t._vToNArray),new i.default.RenderBuffer(3,"vertexNormals","normalBuffer","aNormal",g(t),t._vToNArray),new i.default.RenderBuffer(4,"vertexColors","colorBuffer","aVertexColor",g(t)),new i.default.RenderBuffer(3,"vertexAmbients","ambientBuffer","aAmbientColor",g(t)),new i.default.RenderBuffer(2,"uvs","uvBuffer","aTexCoord",g(t),t._flatten)],text:[new i.default.RenderBuffer(3,"vertices","vertexBuffer","aPosition",g(t),t._vToNArray),new i.default.RenderBuffer(2,"uvs","uvBuffer","aTexCoord",g(t),t._flatten)]}},t.immediateMode={geometry:new i.default.Geometry,shapeMode:a.TRIANGLE_FAN,contourIndices:[],_bezierVertex:[],_quadraticVertex:[],_curveVertex:[],buffers:{fill:[new i.default.RenderBuffer(3,"vertices","vertexBuffer","aPosition",g(t),t._vToNArray),new i.default.RenderBuffer(3,"vertexNormals","normalBuffer","aNormal",g(t),t._vToNArray),new i.default.RenderBuffer(4,"vertexColors","colorBuffer","aVertexColor",g(t)),new i.default.RenderBuffer(3,"vertexAmbients","ambientBuffer","aAmbientColor",g(t)),new i.default.RenderBuffer(2,"uvs","uvBuffer","aTexCoord",g(t),t._flatten)],stroke:[new i.default.RenderBuffer(4,"lineVertexColors","lineColorBuffer","aVertexColor",g(t)),new i.default.RenderBuffer(3,"lineVertices","lineVerticesBuffer","aPosition",g(t)),new i.default.RenderBuffer(3,"lineTangentsIn","lineTangentsInBuffer","aTangentIn",g(t)),new i.default.RenderBuffer(3,"lineTangentsOut","lineTangentsOutBuffer","aTangentOut",g(t)),new i.default.RenderBuffer(1,"lineSides","lineSidesBuffer","aSide",g(t))],point:t.GL.createBuffer()}},t.pointSize=5,t.curStrokeWeight=1,t.curStrokeCap=a.ROUND,t.curStrokeJoin=a.ROUND,t.textures=new Map,t.framebuffers=new Set,t.activeFramebuffers=[],t.filterShader=void 0,t.filterLayer=void 0,t.filterLayerTemp=void 0,t.defaultFilterShaders={},t.textureMode=a.IMAGE,t.textureWrapX=a.CLAMP,t.textureWrapY=a.CLAMP,t._tex=null,t._curveTightness=6,t._lookUpTableBezier=[],t._lookUpTableQuadratic=[],t._lutBezierDetail=0,t._lutQuadraticDetail
1=0,t.isProcessingVertices=!1,t._tessy=t._initTessy(),t.fontInfos={},t._curShader=void 0,t;throw TypeError("Cannot call a class as a function")}return r=d,t=[{key:"beginGeometry",value:function(){if(this.geometryBuilder)throw Error("It looks like `beginGeometry()` is being called while another p5.Geometry is already being build.");this.geometryBuilder=new l.default(this)}},{key:"endGeometry",value:function(){var t;if(this.geometryBuilder)return t=this.geometryBuilder.finish(),this.geometryBuilder=void 0,t;throw Error("Make sure you call beginGeometry() before endGeometry()!")}},{key:"buildGeometry",value:function(t){return this.beginGeometry(),t(),this.endGeometry()}},{key:"_setAttributeDefaults",value:function(t){var r={alpha:!0,depth:!0,stencil:!0,antialias:navigator.userAgent.toLowerCase().includes("safari"),premultipliedAlpha:!0,preserveDrawingBuffer:!0,perPixelLighting:!0,version:2};null===t._glAttributes?t._glAttributes=r:t._glAttributes=Object.assign(r,t._glAttributes)}},{key:"_initContext",value:function(){if(1!==this._pInst._glAttributes.version&&(this.drawingContext=this.canvas.getContext("webgl2",this._pInst._glAttributes)),this.webglVersion=this.drawingContext?a.WEBGL2:a.WEBGL,this._pInst._setProperty("webglVersion",this.webglVersion),this.drawingContext||(this.drawingContext=this.canvas.getContext("webgl",this._pInst._glAttributes)||this.canvas.getContext("experimental-webgl",this._pInst._glAttributes)),null===this.drawingContext)throw Error("Error creating webgl context");var t=this.drawingContext;t.enable(t.DEPTH_TEST),t.depthFunc(t.LEQUAL),t.viewport(0,0,t.drawingBufferWidth,t.drawingBufferHeight),t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0),this._viewport=this.drawingContext.getParameter(this.drawingContext.VIEWPORT)}},{key:"_getParam",value:function(){var t=this.drawingContext;return t.getParameter(t.MAX_TEXTURE_SIZE)}},{key:"_adjustDimensions",value:function(t,r){this._maxTextureSize||(this._maxTextureSize=this._getParam());var o=this._maxTextureSize,o=(i.default.prototype._maxAllowedPixelDimensions,Math.floor(o/this.pixelDensity())),n=Math.min(t,o),o=Math.min(r,o);return n===t&&o===r||console.warn("Warning: The requested width/height exceeds hardware limits. "+"Adjusting dimensions to width: ".concat(n,", height: ").concat(o,".")),{adjustedWidth:n,adjustedHeight:o}}},{key:"_resetContext",value:function(t,r){var o,n=this.width,s=this.height,a=this.canvas.id,l=this._pInst instanceof i.default.Graphics,a=(l?((o=this._pInst).canvas.parentNode.removeChild(o.canvas),o.canvas=document.createElement("canvas"),(o._pInst._userNode||document.body).appendChild(o.canvas),i.default.Element.call(o,o.canvas,o._pInst),o.width=n,o.height=s):((o=this.canvas)&&o.parentNode.removeChild(o),(o=document.createElement("canvas")).id=a,(this._pInst._userNode||document.body).appendChild(o),this._pInst.canvas=o,this.canvas=o),new i.default.RendererGL(this._pInst.canvas,this._pInst,!l));this._pInst._setProperty("_renderer",a),a.resize(n,s),a._applyDefaults(),l||this._pInst._elements.push(a),"function"==typeof r&&setTimeout(function(){r.apply(window._renderer,t)},0)}},{key:"_update",value:function(){this.uModelMatrix.reset(),this.uViewMatrix.set(this._curCamera.cameraMatrix),this.ambientLightColors.length=0,this.specularColors=[1,1,1],this.directionalLightDirections.length=0,this.directionalLightDiffuseColors.length=0,this.directionalLightSpecularColors.length=0,this.pointLightPositions.length=0,this.pointLightDiffuseColors.length=0,this.pointLightSpecularColors.length=0,this.spotLightPositions.length=0,this.spotLightDirections.length=0,this.spotLightDiffuseColors.length=0,this.spotLightSpecularColors.length=0,this.spotLightAngle.length=0,this.spotLightConc.length=0,this._enableLighting=!1,this._tint=[255,255,255,255],this.GL.clearStencil(0),this.GL.clear(this.GL.DEPTH_BUFFER_BIT|this.GL.STENCIL_BUFFER_BIT),this.GL.disable(this.GL.STENCIL_TEST)}},{key:"background",value:function(){var t=(t=this._pInst).color.apply(t,arguments),r=t.levels[0]/255,o=t.levels[1]/255,n=t.levels[2]/255,t=t.levels[3]/255;this.clear(r,o,n,t)}},{key:"fill",value:function(t,r,o,n){var s=i.default.prototype.color.apply(this._pInst,arguments);this.curFillColor=s._array,this.drawMode=a.FILL,this._useNormalMaterial=!1,this._tex=null}},{key:"stroke",value:function(t,r,o,n){var s=i.default.prototype.color.apply(this._pInst,arguments);this.curStrokeColor=s._array}},{key:"strokeCap",value:function(t){this.curStrokeCap=t}},{key:"strokeJoin",value:function(t){this.curStrokeJoin=t}},{key:"getFilterLayer",value:function(){return this.filterLayer||(this.filterLayer=this._pInst.createFramebuffer()),this.filterLayer}},{key:"getFilterLayerTemp",value:function(){return this.filterLayerTemp||(this.filterLayerTemp=this._pInst.createFramebuffer()),this.filterLayerTemp}},{key:"matchSize",value:function(t,r){t.width===r.width&&t.height===r.height||t.resize(r.width,r.height),t.pixelDensity()!==r.pixelDensity()&&t.pixelDensity(r.pixelDensity())}},{key:"filter",value:function(){var t,r,o=this,n=this.getFilterLayer(),s=void 0,l=void 0,u=("string"==typeof(arguments.length<=0?void 0:arguments[0])?(l=arguments.length<=0?void 0:arguments[0],b(t={},a.BLUR,3),b(t,a.POSTERIZE,4),b(t,a.THRESHOLD,.5),s=l in t&&void 0===(arguments.length<=1?void 0:arguments[1])?t[l]:arguments.length<=1?void 0:arguments[1],l in this.defaultFilterShaders||(this.defaultFilterShaders[l]=new i.default.Shader(n._renderer,"uniform mat4 uModelViewMatrix;\nuniform mat4 uProjectionMatrix;\n\nattribute vec3 aPosition;\n// texcoords only come from p5 to vertex shader\n// so pass texcoords on to the fragment shader in a varying variable\nattribute vec2 aTexCoord;\nvarying vec2 vTexCoord;\n\nvoid main() {\n // transferring texcoords for the frag shader\n vTexCoord = aTexCoord;\n\n // copy position with a fourth coordinate for projection (1.0 is normal)\n vec4 positionVec4 = vec4(aPosition, 1.0
1);\n\n gl_Position = uProjectionMatrix * uModelViewMatrix * positionVec4;\n}\n",k[l])),this.filterShader=this.defaultFilterShaders[l]):this.filterShader=arguments.length<=0?void 0:arguments[0],this.activeFramebuffer()||this),c=(this.matchSize(n,u),n.draw(function(){return o._pInst.clear()}),[1/(u.width*u.pixelDensity()),1/(u.height*u.pixelDensity())]);l===a.BLUR?(r=this.getFilterLayerTemp(),this.matchSize(r,u),this._pInst.push(),this._pInst.noStroke(),this._pInst.blendMode(a.BLEND),this._pInst.shader(this.filterShader),this.filterShader.setUniform("texelSize",c),this.filterShader.setUniform("canvasSize",[u.width,u.height]),this.filterShader.setUniform("radius",Math.max(1,s)),r.draw(function(){o.filterShader.setUniform("direction",[1,0]),o.filterShader.setUniform("tex0",u),o._pInst.clear(),o._pInst.shader(o.filterShader),o._pInst.noLights(),o._pInst.plane(u.width,u.height)}),n.draw(function(){o.filterShader.setUniform("direction",[0,1]),o.filterShader.setUniform("tex0",r),o._pInst.clear(),o._pInst.shader(o.filterShader),o._pInst.noLights(),o._pInst.plane(u.width,u.height)}),this._pInst.pop()):n.draw(function(){o._pInst.noStroke(),o._pInst.blendMode(a.BLEND),o._pInst.shader(o.filterShader),o.filterShader.setUniform("tex0",u),o.filterShader.setUniform("texelSize",c),o.filterShader.setUniform("canvasSize",[u.width,u.height]),o.filterShader.setUniform("filterParameter",s),o._pInst.noLights(),o._pInst.plane(u.width,u.height)}),this._pInst.push(),this._pInst.noStroke(),this.clear(),this._pInst.push(),this._pInst.imageMode(a.CORNER),this._pInst.blendMode(a.BLEND),u.filterCamera._resize(),this._pInst.setCamera(u.filterCamera),this._pInst.resetMatrix(),this._pInst.image(n,-u.width/2,-u.height/2,u.width,u.height),this._pInst.clearDepth(),this._pInst.pop(),this._pInst.pop()}},{key:"pixelDensity",value:function(t){return t?this._pInst.pixelDensity(t):this._pInst.pixelDensity()}},{key:"blendMode",value:function(t){t===a.DARKEST||t===a.LIGHTEST||t===a.ADD||t===a.BLEND||t===a.SUBTRACT||t===a.SCREEN||t===a.EXCLUSION||t===a.REPLACE||t===a.MULTIPLY||t===a.REMOVE?this.curBlendMode=t:t!==a.BURN&&t!==a.OVERLAY&&t!==a.HARD_LIGHT&&t!==a.SOFT_LIGHT&&t!==a.DODGE||console.warn("BURN, OVERLAY, HARD_LIGHT, SOFT_LIGHT, and DODGE only w
1ork for blendMode in 2D mode.")}},{key:"erase",value:function(t,r){this._isErasing||(this.preEraseBlend=this.curBlendMode,this._isErasing=!0,this.blendMode(a.REMOVE),this._cachedFillStyle=this.curFillColor.slice(),this.curFillColor=[1,1,1,t/255],this._cachedStrokeStyle=this.curStrokeColor.slice(),this.curStrokeColor=[1,1,1,r/255])}},{key:"noErase",value:function(){this._isErasing&&(this.curFillColor=this._cachedFillStyle.slice(),this.curStrokeColor=this._cachedStrokeStyle.slice(),this.curBlendMode=this.preEraseBlend,this.blendMode(this.preEraseBlend),this._isErasing=!1,this._applyBlendMode())}},{key:"drawTarget",value:function(){return this.activeFramebuffers[this.activeFramebuffers.length-1]||this}},{key:"beginClip",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},t=(m(v(d.prototype),"beginClip",this).call(this,t),this.drawTarget()._isClipApplied=!0,this.GL);t.clearStencil(0),t.clear(t.STENCIL_BUFFER_BIT),t.enable(t.STENCIL_TEST),this._stencilTestOn=!0,t.stencilFunc(t.ALWAYS,1,255),t.stencilOp(t.KEEP,t.KEEP,t.REPLACE),t.disable(t.DEPTH_TEST),this._pInst.push(),this._pInst.resetShader(),this._doFill&&this._pInst.fill(0,0),this._doStroke&&this._pInst.stroke(0,0)}},{key:"endClip",value:function(){this._pInst.pop();var t=this.GL;t.stencilOp(t.KEEP,t.KEEP,t.KEEP),t.stencilFunc(this._clipInvert?t.EQUAL:t.NOTEQUAL,0,255),t.enable(t.DEPTH_TEST),this._clipDepths.push(this._pushPopDepth),m(v(d.prototype),"endClip",this).call(this)}},{key:"_clearClip",value:function(){this.GL.clearStencil(1),this.GL.clear(this.GL.STENCIL_BUFFER_BIT),0<this._clipDepths.length&&this._clipDepths.pop(),this.drawTarget()._isClipApplied=!1}},{key:"strokeWeight",value:function(t){this.curStrokeWeight!==t&&(this.pointSize=t,this.curStrokeWeight=t)}},{key:"_getPixel",value:function(t,r){var o=this.GL;return C(o,null,t,r,o.RGBA,o.UNSIGNED_BYTE,this._pInst.height*this._pInst.pixelDensity())}},{key:"loadPixels",value:function(){var t,r,o=this._pixelsState;!0!==this._pInst._glAttributes.preserveDrawingBuffer?console.log("loadPixels only works in WebGL when preserveDrawingBuffer is true."):(t=this._pInst._pixelDensity,r=this.GL,o._setProperty("pixels",O(o.pixels,r,null,0,0,this.width*t,this.height*t,r.RGBA,r.UNSIGNED_BYTE,this.height*t)))}},{key:"updatePixels",value:function(){var t=this._getTempFramebuffer();t.pixels=this._pixelsState.pixels,t.updatePixels(),this._pInst.push(),this._pInst.resetMatrix(),this._pInst.clear(),this._pInst.imageMode(a.CENTER),this._pInst.image(t,0,0),this._pInst.pop(),this.GL.clearDepth(1),this.GL.clear(this.GL.DEPTH_BUFFER_BIT)}},{key:"_getTempFramebuffer",value:function(){return this._tempFramebuffer||(this._tempFramebuffer=this._pInst.createFramebuffer({format:a.UNSIGNED_BYTE,useDepth:this._pInst._glAttributes.depth,depthFormat:a.UNSIGNED_INT,antialias:this._pInst._glAttributes.antialias})),this._tempFramebuffer}},{key:"geometryInHash",value:function(t){return void 0!==this.retainedMode.geometry[t]}},{key:"viewport",value:function(t,r){this._viewport=[0,0,t,r],this.GL.viewport(0,0,t,r)}},{key:"resize",value:function(t,r){i.default.Renderer.prototype.resize.call(this,t,r),this._origViewport={width:this.GL.drawingBufferWidth,height:this.GL.drawingBufferHeight},this.viewport(this._origViewport.width,this._origViewport.height),this._curCamera._resize();var t=this._pixelsState,o=(void 0!==t.pixels&&t._setProperty("pixels",new Uint8Array(this.GL.drawingBufferWidth*this.GL.drawingBufferHeight*4)),!0),r=!1,t=void 0;try{for(var n,s=this.framebuffers[Symbol.iterator]();!(o=(n=s.next()).done);o=!0)n.value._canvasSizeChanged()}catch(o){r=!0,t=o}finally{try{o||null==s.return||s.return()}finally{if(r)throw t}}}},{key:"clear",value:function(){var t=(arguments.length<=0?void 0:arguments[0])||0,r=(arguments.length<=1?void 0:arguments[1])||0,o=(arguments.length<=2?void 0:arguments[2])||0,n=(arguments.length<=3?void 0:arguments[3])||0,s=this.activeFramebuffer();s&&s.format===a.UNSIGNED_BYTE&&!s.antialias&&0===n&&(n=1e-10),this.GL.clearColor(t*n,r*n,o*n,n),this.GL.clearDepth(1),this.GL.clear(this.GL.COLOR_BUFFER_BIT|this.GL.DEPTH_BUFFER_BIT)}},{key:"clearDepth",value:function(){this.GL.clearDepth(0<arguments.length&&void 0!==arguments[0]?arguments[0]:1),this.GL.clear(this.GL.DEPTH_BUFFER_BIT)}},{key:"applyMatrix",value:function(t,r,o,n,s,a){16==arguments.length?i.default.Matrix.prototype.apply.apply(this.uModelMatrix,arguments):this.uModelMatrix.apply([t,r,0,0,o,n,0,0,0,0,1,0,s,a,0,1])}},{key:"translate",value:function(t,r,o){return t instanceof i.default.Vector&&(o=t.z,r=t.y,t=t.x),this.uModelMatrix.translate([t,r,o]),this}},{key:"scale",value:function(t,r,o){return this.uModelMatrix.scale(t,r,o),this}},{key:"rotate",value:function(t,r){return void 0===r?this.rotateZ(t):(i.default.Matrix.prototype.rotate.apply(this.uModelMatrix,arguments),this)}},{key:"rotateX",value:function(t){return this.rotate(t,1,0,0),this}},{key:"rotateY",value:function(t){return this.rotate(t,0,1,0),this}},{key:"rotateZ",value:function(t){return this.rotate(t,0,0,1),this}},{key:"push",value:function(){var t=i.default.Renderer.prototype.push.apply(this),r=t.properties;return r.uModelMatrix=this.uModelMatrix.copy(),r.uViewMatrix=this.uViewMatrix.copy(),r.uPMatrix=this.uPMatrix.copy(),r._curCamera=this._curCamera,this._curCamera=this._curCamera.copy(),r.ambientLightColors=this.ambientLightColors.slice(),r.specularColors=this.specularColors.slice(),r.directionalLightDirections=this.directionalLightDirections.slice(),r.directionalLightDiffuseColors=this.directionalLightDiffuseColors.slice(),r.directionalLightSpecularColors=this.directionalLightSpecularColors.slice(),r.pointLightPositions=this.pointLightPositions.slice(),r.pointLightDiffuseColors=this.pointLightDiffuseColors.slice(),r.pointLightSpecularColors=this.pointLightSpecularColors.slice(),r.spotLightPositions=this.spotLightPositions.slice(),r.spotLightDirections=this.spotLightDirections.slice(),r.spotLightDiffuseColors=this.spotLightDiffuseColors.slice(),r.spotLightSpecularColors=this.spotLightSpecularColors.slice(),r.spotLightAngle=this.spotLightAngle.slice(),r.spotLightConc=this.spotLightConc.slice(),r.userFillShader=this.userFillShader,r.userStrokeShader=this.userStrokeShader,r.userPointShader=this.userPointShader,r.pointSize=this.pointSize,r.curStrokeWeight=this.curStrokeWeight,r.curStrokeColor=this.curStrokeColor,r.curFillColor=this.curFillColor,r.curAmbientColor=this.curAmbientColor,r.cur
1SpecularColor=this.curSpecularColor,r.curEmissiveColor=this.curEmissiveColor,r._hasSetAmbient=this._hasSetAmbient,r._useSpecularMaterial=this._useSpecularMaterial,r._useEmissiveMaterial=this._useEmissiveMaterial,r._useShininess=this._useShininess,r._useMetalness=this._useMetalness,r.constantAttenuation=this.constantAttenuation,r.linearAttenuation=this.linearAttenuation,r.quadraticAttenuation=this.quadraticAttenuation,r._enableLighting=this._enableLighting,r._useNormalMaterial=this._useNormalMaterial,r._tex=this._tex,r.drawMode=this.drawMode,r._currentNormal=this._currentNormal,r.curBlendMode=this.curBlendMode,r.activeImageLight=this.activeImageLight,r.textureMode=this.textureMode,t}},{key:"pop",value:function(){var t;0<this._clipDepths.length&&this._pushPopDepth===this._clipDepths[this._clipDepths.length-1]&&this._clearClip();for(var r=arguments.length,o=Array(r),n=0;n<r;n++)o[n]=arguments[n];(t=m(v(d.prototype),"pop",this)).call.apply(t,[this].concat(o)),this._applyStencilTestIfClipping()}},{key:"_applyStencilTestIfClipping",value:function(){var t=this.drawTarget();t._isClipApplied!==this._stencilTestOn&&(t._isClipApplied?(this.GL.enable(this.GL.STENCIL_TEST),this._stencilTestOn=!0):(this.GL.disable(this.GL.STENCIL_TEST),this._stencilTestOn=!1))}},{key:"resetMatrix",value:function(){return this.uModelMatrix.reset(),this.uViewMatrix.set(this._curCamera.cameraMatrix),this}},{key:"_getImmediateStrokeShader",value:function(){var t=this.userStrokeShader;return t&&t.isStrokeShader()?t:this._getLineShader()}},{key:"_getRetainedStrokeShader",value:function(){return this._getImmediateStrokeShader()}},{key:"_getSphereMapping",value:function(t){return this.sphereMapping||(this.sphereMapping=this._pInst.createFilterShader(M)),this.uNMatrix.inverseTranspose(this.uViewMatrix),this.uNMatrix.invert3x3(this.uNMatrix),this.sphereMapping.setUniform("uFovY",this._curCamera.cameraFOV),this.sphereMapping.setUniform("uAspect",this._curCamera.aspectRatio),this.sphereMapping.setUniform("uNewNormalMatrix",this.uNMatrix.mat3),this.sphereMapping.setUniform("uSampler",t),this.sphereMapping}},{key:"_getImmediateFillShader",value:function(){var t=this.userFillShader;if(this._useNormalMaterial&&(!t||!t.isNormalShader()))return this._getNormalShader();if(this._enableLighting){if(!t||!t.isLightShader())return this._getLightShader()}else if(this._tex){if(!t||!t.isTextureShader())return this._getLightShader()}else if(!t)return this._getImmediateModeShader();return t}},{key:"_getRetainedFillShader",value:function(){if(this._useNormalMaterial)return this._getNormalShader();var t=this.userFillShader;if(this._enableLighting){if(!t||!t.isLightShader())return this._getLightShader()}else if(this._tex){if(!t||!t.isTextureShader())return this._getLightShader()}else if(!t)return this._getColorShader();return t}},{key:"_getImmediatePointShader",value:function(){var t=this.userPointShader;return t&&t.isPointShader()?t:this._getPointShader()}},{key:"_getRetainedLineShader",value:function(){return this._getImmediateLineShader()}},{key:"baseMaterialShader",value:function(){if(this._pInst._glAttributes.perPixelLighting)return this._getLightShader();throw Error("The material shader does not support hooks without perPixelLighting. Try turning it back on.")}},{key:"_getLightShader",value:function(){return this._defaultLightShader||(this._pInst._glAttributes.perPixelLighting?this._defaultLightShader=new i.default.Shader(this,this._webGL2CompatibilityPrefix("vert","highp")+E.phongVert,this._webGL2CompatibilityPrefix("frag","highp")+E.phongFrag,{vertex:{"void beforeVertex":"() {}","vec3 getLocalPosition":"(vec3 position) { return position; }","vec3 getWorldPosition":"(vec3 position) { return position; }","vec3 getLocalNormal":"(vec3 normal) { return normal; }","vec3 getWorldNormal":"(vec3 normal) { return normal; }","vec2 getUV":"(vec2 uv) { return uv; }","vec4 getVertexColor":"(vec4 color) { return color; }","void afterVertex":"() {}"},fragment:{"void beforeFragment":"() {}","Inputs getPixelInputs":"(Inputs inputs) { return inputs; }","vec4 combineColors":"(ColorComponents components) {\n vec4 color = vec4(0.);\n color.rgb += components.diffuse * components.baseColor;\n color.rgb += components.ambient * components.ambientColor;\n color.rgb += components.specular * components.specularColor;\n color.rgb += components.emissive;\n color.a = components.opacity;\n return color;\n }","vec4 getFinalColor":"(vec4 color) { return color; }","void afterFragment":"() {}"}}):this._defaultLightShader=new i.default.Shader(this,this._webGL2CompatibilityPrefix("vert","highp")+E.lightVert,this._webGL2CompatibilityPrefix("frag","highp")+E.lightTextureFrag)),this._defaultLightShader}},{key:"_getImmediateModeShader",value:function(){return this._defaultImmediateModeShader||(this._defaultImmediateModeShader=new i.default.Shader(this,this._webGL2CompatibilityPrefix("vert","mediump")+E.immediateVert,this._webGL2CompatibilityPrefix("frag","mediump")+E.vertexColorFrag)),this._defaultImmediateModeShader}},{key:"baseNormalShader",value:function(){return this._getNormalShader()}},{key:"_getNormalShader",value:function(){return this._defaultNormalShader||(this._defaultNormalShader=new i.default.Shader(this,this._webGL2CompatibilityPrefix("vert","mediump")+E.normalVert,this._webGL2CompatibilityPrefix("frag","mediump")+E.normalFrag,{vertex:{"void beforeVertex":"() {}","vec3 getLocalPosition":"(vec3 position) { return position; }","vec3 getWorldPosition":"(vec3 position) { return position; }","vec3 getLocalNormal":"(vec3 normal) { return normal; }","vec3 getWorldNormal":"(vec3 normal) { return normal; }","vec2 getUV":"(vec2 uv) { return uv; }","vec4 getVertexColor":"(vec4 color) { return color; }","void afterVertex":"() {}"},fragment:{"void beforeFragment":"() {}","vec4 getFinalColor":"(vec4 color) { return color; }","void afterFragment":"() {}"}})),this._defaultNormalShader}},{key:"baseColorShader",value:function(){return this._getColorShader()}},{key:"_getColorShader",value:function(){return this._defaultColorShader||(this._defaultColorShader=new i.default.Shader(this,this._webGL2CompatibilityPrefix("vert","mediump")+E.normalVert,this._webGL2CompatibilityPrefix("frag","mediump")+E.basicFrag,{vertex:{"void beforeVertex":"() {}","vec3 getLocalPosition":"(vec3 position) { return position; }","vec3 getWorldPosition":"(vec3 position) { return position; }","vec3 getLocalNormal":"(vec3 normal) { return normal; }","vec3 getWorldNormal":"(vec3 normal) { return normal; }","vec2 getUV":"(vec2 uv) { return uv; }","vec4 getVertexColor":"(vec4 color) { return color; }","void afterVertex":"() {}"},fragment:{"void beforeFragment":"() {}","vec4 getFinalColor":"(vec4 color) { return color; }","void afterFragment":"() {}"}})),this._defaultColorShader}},{key:"pointShader",value:function(){return this._getPointShader()}},{key:"_getPointShader",value:function(){return this._defaultPointShader||(this._defaultPointShader=new i.default.Shader(this,this._webGL2CompatibilityPrefix("vert","mediump")+E.pointVert,this._webGL2CompatibilityPrefix("frag","mediump")+E.pointFrag,{vertex:{"void beforeVertex":"() {}","vec3 getLocalPosition":"(vec3 position) { return position; }","vec3 getWorldPosition":"(vec3 position) { return position; }","float getPointSize":"(float size) { return size; }","void afterVertex":"() {}"},fragment:{"void beforeFragment":"() {}","vec4 getFinalColor":"(vec4 color) { return color; }","bool shouldDiscard":"(bool outside) { return outside; }","void afterFragment":"() {}"}})),this._defaultPointShader}},{key:"baseStrokeShader",value:function(){return this._getLineShader()}},{key:"_getLineShader",value:function(){return this._defaultLineShader||(this._defaultLineShader=new i.default.Shader(this,this._webGL2CompatibilityPrefix("vert","mediump")+E.lineVert,this._webGL2CompatibilityPrefix("frag","mediump")+E.lineFrag,{vertex:{"void beforeVertex":"() {}","vec3 getLocalPosition":"(vec3 position) { return position; }","vec3 getWorldPosition":"(vec3 position) { return position; }","float getStrokeWeight":"(float weight) { return weight; }","vec2 getLineCenter":"(vec2 center) { return center; }","vec2 getLinePosition":"(vec2 position) { return position; }","vec4 getVertexColor":"(vec4 color) { return color; }","void afterVertex":"() {}"},fragment:{"void beforeFragment":"() {}
1","Inputs getPixelInputs":"(Inputs inputs) { return inputs; }","vec4 getFinalColor":"(vec4 color) { return color; }","bool shouldDiscard":"(bool outside) { return outside; }","void afterFragment":"() {}"}})),this._defaultLineShader}},{key:"_getFontShader",value:function(){return this._defaultFontShader||(this.webglVersion===a.WEBGL&&this.GL.getExtension("OES_standard_derivatives"),this._defaultFontShader=new i.default.Shader(this,this._webGL2CompatibilityPrefix("vert","highp")+E.fontVert,this._webGL2CompatibilityPrefix("frag","highp")+E.fontFrag)),this._defaultFontShader}},{key:"_webGL2CompatibilityPrefix",value:function(t,r){var o="";return this.webglVersion===a.WEBGL2&&(o+="#version 300 es\n#define WEBGL2\n"),"vert"===t?o+="#define VERTEX_SHADER\n":"frag"===t&&(o+="#define FRAGMENT_SHADER\n"),r&&(o+="precision ".concat(r," float;\n")),o}},{key:"_getEmptyTexture",value:function(){var t;return this._emptyTexture||((t=new i.default.Image(1,1)).set(0,0,255),this._emptyTexture=new i.default.Texture(this,t)),this._emptyTexture}},{key:"getTexture",value:function(t){t instanceof i.default.Framebuffer&&(t=t.color);var r=this.textures.get(t);return r||(r=new i.default.Texture(this,t),this.textures.set(t,r),r)}},{key:"getDiffusedTexture",value:function(t){var r,o,n=this;return null!=this.diffusedTextures.get(t)?this.diffusedTextures.get(t):(r=Math.floor(t.height/t.width*200),o=this._pInst.createFramebuffer({width:200,height:r,density:1}),this.diffusedShader||(this.diffusedShader=this._pInst.createShader(E.imageLightVert,E.imageLightDiffusedFrag)),o.draw(function(){n._pInst.shader(n.diffusedShader),n.diffusedShader.setUniform("environmentMap",t),n._pInst.noStroke(),n._pInst.rectMode(a.CENTER),n._pInst.noLights(),n._pInst.rect(0,0,200,r)}),this.diffusedTextures.set(t,o),o)}},{key:"getSpecularTexture",value:function(t){var r=this;if(null!=this.specularTextures.get(t))return this.specularTextures.get(t);for(var o,n=[],s=this._pInst.createFramebuffer({width:512,height:512,density:1}),i=Math.log(512)/Math.log(2),a=(this.specularShader||(this.specularShader=this._pInst.createShader(E.imageLightVert,E.imageLightSpecularFrag)),512);1<=a;a/=2)!function(o){s.resize(o,o);var a=1-Math.log(o)/Math.log(2)/i;s.draw(function(){r._pInst.shader(r.specularShader),r._pInst.clear(),r.specularShader.setUniform("environmentMap",t),r.specularShader.setUniform("roughness",a),r._pInst.noStroke(),r._pInst.noLights(),r._pInst.plane(o,o)}),n.push(s.get().drawingContext.getImageData(0,0,o,o))}(a);return s.remove(),o=new c.MipmapTexture(this,n,{}),this.specularTextures.set(t,o),o}},{key:"activeFramebuffer",value:function(){return this.activeFramebuffers[this.activeFramebuffers.length-1]||null}},{key:"createFramebuffer",value:function(t){return new i.default.Framebuffer(this,t)}},{key:"_setStrokeUniforms",value:function(t){t.bindShader(),t.setUniform("uUseLineColor",this._useLineColor),t.setUniform("uMaterialColor",this.curStrokeColor),t.setUniform("uStrokeWeight",this.curStrokeWeight),t.setUniform("uStrokeCap",w[this.curStrokeCap]),t.setUniform("uStrokeJoin",S[this.curStrokeJoin])}},{key:"_setFillUniforms",value:function(t){var r=this,o=(t.bindShader(),this.mixedSpecularColor=f(this.curSpecularColor),0<this._useMetalness&&(this.mixedSpecularColor=this.mixedSpecularColor.map(function(t,o){return r.curFillColor[o]*r._useMetalness+t*(1-r._useMetalness)})),t.setUniform("uUseVertexColor",this._useVertexColor),t.setUniform("uMaterialColor",this.curFillColor),t.setUniform("isTexture",!!this._tex),this._tex&&t.setUniform("uSampler",this._tex),t.setUniform("uTint",this._tint),t.setUniform("uHasSetAmbient",this._hasSetAmbient),t.setUniform("uAmbientMatColor",this.curAmbientColor),t.setUniform("uSpecularMatColor",this.mixedSpecularColor),t.setUniform("uEmissiveMatColor",this.curEmissiveColor),t.setUniform("uSpecular",this._useSpecularMaterial),t.setUniform("uEmissive",this._useEmissiveMaterial),t.setUniform("uShininess",this._useShininess),t.setUniform("uMetallic",this._useMetalness),this._setImageLightUniforms(t),t.setUniform("uUseLighting",this._enableLighting),this.pointLightDiffuseColors.length/3),o=(t.setUniform("uPointLightCount",o),t.setUniform("uPointLightLocation",this.pointLightPositions),t.setUniform("uPointLightDiffuseColors",this.pointLightDiffuseColors),t.setUniform("uPointLightSpecularColors",this.pointLightSpecularColors),this.directionalLightDiffuseColors.length/3),o=(t.setUniform("uDirectionalLightCount",o),t.setUniform("uLightingDirection",this.directionalLightDirections),t.setUniform("uDirectionalDiffuseColors",this.directionalLightDiffuseColors),t.setUniform("uDirectionalSpecularColors",this.directionalLightSpecularColors),this.ambientLightColors.length/3),o=(this.mixedAmbientLight=f(this.ambientLightColors),0<this._useMetalness&&(this.mixedAmbientLight=this.mixedAmbientLight.map(function(t){return Math.max(0,t-=r._useMetalness)})),t.setUniform("uAmbientLightCount",o),t.setUniform("uAmbientColor",this.mixedAmbientLight),this.spotLightDiffuseColors.length/3);t.setUniform("uSpotLightCount",o),t.setUniform("uSpotLightAngle",this.spotLightAngle),t.setUniform("uSpotLightConc",this.spotLightConc),t.setUniform("uSpotLightDiffuseColors",this.spotLightDiffuseColors),t.setUniform("uSpotLightSpecularColors",this.spotLightSpecularColors),t.setUniform("uSpotLightLocation",this.spotLightPositions),t.setUniform("uSpotLightDirection",this.spotLightDirections),t.setUniform("uConstantAttenuation",this.constantAttenuation),t.setUniform("uLinearAttenuation",this.linearAttenuation),t.setUniform("uQuadraticAttenuation",this.quadraticAttenuation),t.bindTextures()}},{key:"_setImageLightUniforms",value:function(t){var r;t.setUniform("uUseImageLight",null!=this.activeImageLight),this.activeImageLight&&(r=this.getDiffusedTexture(this.activeImageLight),t.setUniform("environmentMapDiffused",r),r=this.getSpecularTexture(this.activeImageLight),t.setUniform("environmentMapSpecular",r))}},{key:"_setPointUniforms",value:function(t){t.bindShader(),t.setUniform("uMaterialColor",this.curStrokeColor),t.setUniform("uPointSize",this.pointSize*this._pInst._pixelDensity)}},{key:"_bindBuffer",value:function(t,r,o,n,s){r=r||this.GL.ARRAY_BUFFER,this.GL.bindBuffer(r,t),void 0!==o&&((t=o)instanceof i.default.DataArray?t=o.dataArray():t instanceof(n||Float32Array)||(t=new(n||Float32Array)(t)),this.GL.bufferData(r,t,s||this.GL.STATIC_DRAW))}},{key:"_arraysEqual",value:function(t,r){return t.length===r.length&&t.every(function(t,o){return t===r[o]})}},{key:"_isTypedArray",value:function(t){return[Float32Array,Float64Array,Int16Array,Uint16Array,Uint32Array].some(function(r){return t instanceof r})}},{key:"_flatten",value:function(t){return t.flat()}},{key:"_vToNArray",value:function(t){return t.flatMap(function(t){return[t.x,t.y,t.z]})}},{key:"_bezierCoefficients",value:function(t){var r=t*t,o=1-t,n=o*o;return[n*o,3*n*t,3*o*r,r*t]}},{key:"_quadraticCoefficients",value:function(t){var r=1-t;return[r*r,2*r*t,t*t]}},{key:"_bezierToCatmull",value:function(t){return[t[1],t[1]+(t[2]-t[0])/this._curveTightness,t[2]-(t[3]-t[1])/this._curveTightness,t[2]]}},{key:"_initTessy",value:function(){var t=new u.default.GluTesselator;return t.gluTessCallback(u.default.gluEnum.GLU_TESS_VERTEX_DATA,function(t,r){var o=!0,n=!1,s=void 0;try{for(var i,a=t[Symbol.iterator]();!(o=(i=a.next()).done);o=!0){var l=i.value;r.push(l)}}catch(t){n=!0,s=t}finally{try{o||null==a.return||a.return()}finally{if(n)throw s}}}),t.gluTessCallback(u.default.gluEnum.GLU_TESS_BEGIN,function(t){t!==u.default.primitiveType.GL_TRIANGLES&&console.log("expected TRIANGLES but got type: ".concat(t))}),t.gluTessCallback(u.default.gluEnum.GLU_TESS_ERROR,function(t){console.log("error callback"),
1console.log("error number: ".concat(t))}),t.gluTessCallback(u.default.gluEnum.GLU_TESS_COMBINE,function(t,r,o){for(var n=Array(i.default.RendererGL.prototype.tessyVertexSize).fill(0),s=0;s<o.length;s++)for(var a=0;a<n.length;a++)0!==o[s]&&r[s]&&(n[a]+=r[s][a]*o[s]);return n}),t.gluTessCallback(u.default.gluEnum.GLU_TESS_EDGE_FLAG,function(t){}),t.gluTessProperty(u.default.gluEnum.GLU_TESS_WINDING_RULE,u.default.windingRule.GLU_TESS_WINDING_NONZERO),t}},{key:"_triangulate",value:function(t){var r=t[0]?t[0][2]:void 0,o=!0,n=!0,s=!1,a=void 0;try{for(var l,u=t[Symbol.iterator]();!(n=(l=u.next()).done);n=!0)for(var c=l.value,d=0;d<c.length;d+=i.default.RendererGL.prototype.tessyVertexSize)if(c[d+2]!==r){o=!1;break}}catch(t){s=!0,a=t}finally{try{n||null==u.return||u.return()}finally{if(s)throw a}}o?this._tessy.gluTessNormal(0,0,1):this._tessy.gluTessNormal(0,0,0);var s=[],h=(this._tessy.gluTessBeginPolygon(s),!0),a=!1,f=void 0;try{for(var p,m=t[Symbol.iterator]();!(h=(p=m.next()).done);h=!0){var y=p.value;this._tessy.gluTessBeginContour();for(var g=0;g<y.length;g+=i.default.RendererGL.prototype.tessyVertexSize){var v=y.slice(g,g+i.default.RendererGL.prototype.tessyVertexSize);this._tessy.gluTessVertex(v,v)}this._tessy.gluTessEndContour()}}catch(t){a=!0,f=t}finally{try{h||null==m.return||m.return()}finally{if(a)throw f}}return this._tessy.gluTessEndPolygon(),s}}],p(r.prototype,t),o&&p(r,o),d}(i.default.Renderer),i.default.prototype._assert3d=function(t){if(!this._renderer.isP3D)throw Error("".concat(t,"() is only supported in WEBGL mode. If you'd like to use 3D graphics and WebGL, see https://p5js.org/examples/3d-geometries/ for more information."))},i.default.RendererGL.prototype.tessyVertexSize=12,t=i.default.RendererGL,o.default=t},{"../core/constants":272,"../core/main":283,"../core/p5.Renderer":286,"./GeometryBuilder":327,"./p5.Camera":332,"./p5.Framebuffer":334,"./p5.Matrix":336,"./p5.Shader":342,"./p5.Texture":343,"core-js/modules/es.array.concat":153,"core-js/modules/es.array.copy-within":154,"core-js/modules/es.array.every":155,"core-js/modules/es.array.fill":156,"core-js/modules/es.array.flat":160,"core-js/modules/es.array.flat-map":159,"core-js/modules/es.array.from":162,"core-js/modules/es.array.includes":163,"core-js/modules/es.array.iterator":165,"core-js/modules/es.array.map":168,"core-js/modules/es.array.slice":169,"core-js/modules/es.array.some":170,"core-js/modules/es.array.unscopables.flat":173,"core-js/modules/es.array.unscopables.flat-map":172,"core-js/modules/es.map":175,"core-js/modules/es.object.assign":183,"core-js/modules/es.object.get-own-property-descriptor":186,"core-js/modules/es.object.get-prototype-of":188,"core-js/modules/es.object.to-string":190,"core-js/modules/es.reflect.construct":192,"core-js/modules/es.reflect.get":193,"core-js/modules/es.regexp.to-string":196,"core-js/modules/es.set":197,"core-js/modules/es.string.includes":199,"core-js/modules/es.string.iterator":200,"core-js/modules/es.symbol":212,"core-js/modules/es.symbol.description":210,"core-js/modules/es.symbol.iterator":211,"core-js/modules/es.typed-array.copy-within":213,"core-js/modules/es.typed-array.every":214,"core-js/modules/es.typed-array.fill":215,"core-js/modules/es.typed-array.filter":216,"core-js/modules/es.typed-array.find":218,"core-js/modules/es.typed-array.find-index":217,"core-js/modules/es.typed-array.float32-array":219,"core-js/modules/es.typed-array.float64-array":220,"core-js/modules/es.typed-array.for-each":221,"core-js/modules/es.typed-array.includes":222,"core-js/modules/es.typed-array.index-of":223,"core-js/modules/es.typed-array.int16-array":224,"core-js/modules/es.typed-array.iterator":226,"core-js/modules/es.typed-array.join":227,"core-js/modules/es.typed-array.last-index-of":228,"core-js/modules/es.typed-array.map":229,"core-js/modules/es.typed-array.reduce":231,"core-js/modules/es.typed-array.reduce-right":230,"core-js/modules/es.typed-array.reverse":232,"core-js/modules/es.typed-array.set":233,"core-js/modules/es.typed-array.slice":234,"core-js/modules/es.typed-array.some":235,"core-js/modules/es.typed-array.sort":236,"core-js/modules/es.typed-array.subarray":237,"core-js/modules/es.typed-array.to-locale-string":238,"core-js/modules/es.typed-array.to-string":239,"core-js/modules/es.typed-array.uint16-array":240,"core-js/modules/es.typed-array.uint32-array":241,"core-js/modules/es.typed-array.uint8-array":242,"core-js/modules/es.weak-map":244,"core-js/modules/web.dom-collections.iterator":246,libtess:255,path:258}],342:[function(t,r,o){"use strict";t("core-js/modules/es.symbol"),t("core-js/modules/es.symbol.description"),t("core-js/modules/es.symbol.iterator"),t("core-js/modules/es.array.
1concat"),t("core-js/modules/es.array.index-of"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.array.slice"),t("core-js/modules/es.array.some"),t("core-js/modules/es.function.name"),t("core-js/modules/es.object.assign"),t("core-js/modules/es.object.keys"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.regexp.exec"),t("core-js/modules/es.regexp.to-string"),t("core-js/modules/es.string.iterator"),t("core-js/modules/es.string.split"),t("core-js/modules/web.dom-collections.iterator"),t("core-js/modules/es.symbol"),t("core-js/modules/es.symbol.description"),t("core-js/modules/es.symbol.iterator"),t("core-js/modules/es.array.concat"),t("core-js/modules/es.array.index-of"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.array.slice"),t("core-js/modules/es.array.some"),t("core-js/modules/es.function.name"),t("core-js/modules/es.object.assign"),t("core-js/modules/es.object.keys"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.regexp.exec"),t("core-js/modules/es.string.iterator"),t("core-js/modules/es.string.split"),t("core-js/modules/web.dom-collections.iterator"),Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;var n=(t=t("../core/main"))&&t.__esModule?t:{default:t};function s(t,r){return function(t){if(Array.isArray(t))return t}(t)||function(t,r){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t)){var o=[],n=!0,s=!1,i=void 0;try{for(var a,l=t[Symbol.iterator]();!(n=(a=l.next()).done)&&(o.push(a.value),!r||o.length!==r);n=!0);}catch(t){s=!0,i=t}finally{try{n||null==l.return||l.return()}finally{if(s)throw i}}return o}}(t,r)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance")}()}function i(t,r){for(var o=0;o<r.length;o++){var n=r[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}n.default.Shader=function(){var t,r;function o(t,r,n){var s=3<arguments.length&&void 0!==arguments[3]?arguments[3]:{};if(!(this instanceof o))throw TypeError("Cannot call a class as a function");this._renderer=t,this._vertSrc=r,this._fragSrc=n,this._vertShader=-1,this._fragShader=-1,this._glProgram=0,this._loadedAttributes=!1,this.attributes={},this._loadedUniforms=!1,this.uniforms={},this._bound=!1,this.samplers=[],this.hooks={uniforms:s.uniforms||{},declarations:s.declarations,helpers:s.helpers||{},vertex:s.vertex||{},fragment:s.fragment||{},modified:{vertex:s.modified&&s.modified.vertex||{},fragment:s.modified&&s.modified.fragment||{}}}}return t=[{key:"shaderSrc",value:function(t,r){var o,n,i,a,l,t=s(t.split("void main"),2),u=t[0],t=t[1],c="";for(o in this.hooks.uniforms)c+="uniform ".concat(o,";\n");for(n in this.hooks.declarations&&(c+=this.hooks.declarations+"\n"),this.hooks[r].declarations&&(c+=this.hooks[r].declarations+"\n"),this.hooks.helpers)c+="".concat(n).concat(this.hooks.helpers[n],"\n");for(i in this.hooks[r])"declarations"!==i&&(a=(l=s(i.split(" "),2))[0],l=l[1],this.hooks.modified[r][i]&&(c+="#define AUGMENTED_HOOK_"+l+"\n"),c+=a+" HOOK_"+l+this.hooks[r][i]+"\n");return u+c+"void main"+t}},{key:"version",value:function(){var t=/#version (.+)$/.exec(this.vertSrc());return t?t[1]:"100 es"}},{key:"vertSrc",value:function(){return this.shaderSrc(this._vertSrc,"vertex")}},{key:"fragSrc",value:function(){return this.shaderSrc(this._fragSrc,"fragment")}},{key:"inspectHooks",value:function(){for(var t in console.log("==== Vertex shader hooks: ===="),this.hooks.vertex)console.log((this.hooks.modified.vertex[t]?"[MODIFIED] ":"")+t+this.hooks.vertex[t]);for(var r in console.log(""),console.log("==== Fragment shader hooks: ===="),this.hooks.fragment)console.log((this.hooks.modified.fragment[r]?"[MODIFIED] ":"")+r+this.hooks.fragment[r]);for(var o in console.log(""),console.log("==== Helper functions: ===="),this.hooks.helpers)console.log(o+this.hooks.helpers[o])}},{key:"modify",value:function(t){n.default._validateParameters("p5.Shader.modify",arguments);var r,o={vertex:{},fragment:{},helpers:{}};for(r in t)"declarations"!==r&&"uniforms"!==r&&("vertexDeclarations"===r?o.vertex.declarations=(o.vertex.declarations||"")+"\n"+t[r]:"fragmentDeclarations"===r?o.fragment.declarations=(o.fragment.declarations||"")+"\n"+t[r]:this.hooks.vertex[r]?o.vertex[r]=t[r]:this.hooks.fragment[r]?o.fragment[r]=t[r]:o.helpers[r]=t[r]);var s,i,a=Object.assign({},this.hooks.modified.vertex),l=Object.assign({},this.hooks.modified.fragment);for(s in o.vertex||{})"declarations"!==s&&(a[s]=!0);for(i in o.fragment||{})"declarations"!==i&&(l[i]=!0);return new n.default.Shader(this._renderer,this._vertSrc,this._fragSrc,{declarations:(this.hooks.declarations||"")+"\n"+(t.declarations||""),uniforms:Object.assign({},this.hooks.uniforms,t.uniforms||{}),fragment:Object.assign({},this.hooks.fragment,o.fragment||{}),vertex:Object.assign({},this.hooks.vertex,o.vertex||{}),helpers:Object.assign({},this.hooks.helpers,o.helpers||{}),modified:{vertex:a,fragment:l}})}},{key:"init",value:function(){if(0===this._glProgram){var t=this._renderer.GL;if(this._vertShader=t.createShader(t.VERTEX_SHADER),t.shaderSource(this._vertShader,this.vertSrc()),t.compileShader(this._vertShader),!t.getShaderParameter(this._vertShader,t.COMPILE_STATUS))return console.error(t.getShaderInfoLog(this._vertShader)),null;if(this._fragShader=t.createShader(t.FRAGMENT_SHADER),t.shaderSource(this._fragShader,this.fragSrc()),t.compileShader(this._fragShader),!t.getShaderParameter(this._fragShader,t.COMPILE_STATUS))return console.error(t.getShaderInfoLog(this._fragShader)),null;this._glProgram=t.createProgram(),t.attachShader(this._glProgram,this._vertShader),t.attachShader(this._glProgram,this._fragShader),t.linkProgram(this._glProgram),t.getProgramParameter(this._glProgram,t.LINK_STATUS)||n.default._friendlyError("Snap! Error linking shader program: ".concat(t.getProgramInfoLog(this._glProgram))),this._loadAttributes(),this._loadUniforms()}return this}},{key:"setDefaultUniforms",value:function(){for(var t in this.hooks.uniforms){var r=s(t.split(" "),2)[1],t=this.hooks.uniforms[t],o=void 0;null!=(o=t instanceof Function?t():t)&&this.setUniform(r,o)}}},{key:"copyToContext",value:function(t){var r=new n.default.Shader(t._renderer,this._vertSrc,this._fragSrc);return r.ensureCompiledOnContext(t),r}},{key:"ensureCompiledOnContext",value:function(t){if(0!==this._glProgram&&this._renderer!==t._renderer)throw Error("The shader being run is attached to a different c
1ontext. Do you need to copy it to this context first with .copyToContext()?");0===this._glProgram&&(this._renderer=t._renderer,this.init())}},{key:"_loadAttributes",value:function(){if(!this._loadedAttributes){this.attributes={};for(var t=this._renderer.GL,r=t.getProgramParameter(this._glProgram,t.ACTIVE_ATTRIBUTES),o=0;o<r;++o){var n=t.getActiveAttrib(this._glProgram,o),s=n.name,i=t.getAttribLocation(this._glProgram,s),a={};a.name=s,a.location=i,a.index=o,a.type=n.type,a.size=n.size,this.attributes[s]=a}this._loadedAttributes=!0}}},{key:"_loadUniforms",value:function(){if(!this._loadedUniforms){for(var t=this._renderer.GL,r=t.getProgramParameter(this._glProgram,t.ACTIVE_UNIFORMS),o=0,n=0;n<r;++n){var s=t.getActiveUniform(this._glProgram,n),i={},a=(i.location=t.getUniformLocation(this._glProgram,s.name),i.size=s.size,s.name);1<s.size&&(a=a.substring(0,a.indexOf("[0]"))),i.name=a,i.type=s.type,i._cachedData=void 0,i.type===t.SAMPLER_2D&&(i.samplerIndex=o,o++,this.samplers.push(i)),i.isArray=1<s.size||i.type===t.FLOAT_MAT3||i.type===t.FLOAT_MAT4||i.type===t.FLOAT_VEC2||i.type===t.FLOAT_VEC3||i.type===t.FLOAT_VEC4||i.type===t.INT_VEC2||i.type===t.INT_VEC4||i.type===t.INT_VEC3,this.uniforms[a]=i}this._loadedUniforms=!0}}},{key:"compile",value:function(){}},{key:"bindShader",value:function(){this.init(),this._bound||(this.useProgram(),this._bound=!0,this._setMatrixUniforms(),this.setUniform("uViewport",this._renderer._viewport))}},{key:"unbindShader",value:function(){return this._bound&&(this.unbindTextures(),this._bound=!1),this}},{key:"bindTextures",value:function(){var t=this._renderer.GL,r=!0,o=!1,n=void 0;try{for(var s,i=this.samplers[Symbol.iterator]();!(r=(s=i.next()).done);r=!0){var a=s.value,l=a.texture;void 0===l&&(l=this._renderer._getEmptyTexture()),t.activeTexture(t.TEXTURE0+a.samplerIndex),l.bindTexture(),l.update(),t.uniform1i(a.location,a.samplerIndex)}}catch(t){o=!0,n=t}finally{try{r||null==i.return||i.return()}finally{if(o)throw n}}}},{key:"updateTextures",value:function(){var t=!0,r=!1,o=void 0;try{for(var n,s=this.samplers[Symbol.iterator]();!(t=(n=s.next()).done);t=!0){var i=n.value.texture;i&&i.update()}}catch(t){r=!0,o=t}finally{try{t||null==s.return||s.return()}finally{if(r)throw o}}}},{key:"unbindTextures",value:function(){var t=!0,r=!1,o=void 0;try{for(var n,s=this.samplers[Symbol.iterator]();!(t=(n=s.next()).done);t=!0){var i=n.value;this.setUniform(i.name,this._renderer._getEmptyTexture())}}catch(t){r=!0,o=t}finally{try{t||null==s.return||s.return()}finally{if(r)throw o}}}},{key:"_setMatrixUniforms",value:function(){var t=this._renderer.uModelMatrix,r=this._renderer.uViewMatrix,o=this._renderer.uPMatrix,n=t.copy().mult(r),s=(this._renderer.uMVMatrix=n).copy();s.mult(o),this.isStrokeShader()&&this.setUniform("uPerspective",this._renderer._curCamera.useLinePerspective?1:0),this.setUniform("uViewMatrix",r.mat4),this.setUniform("uProjectionMatrix",o.mat4),this.setUniform("uModelMatrix",t.mat4),this.setUniform("uModelViewMatrix",n.mat4),this.setUniform("uModelViewProjectionMatrix",s.mat4),this.uniforms.uNormalMatrix&&(this._renderer.uNMatrix.inverseTranspose(this._renderer.uMVMatrix),this.setUniform("uNormalMatrix",this._renderer.uNMatrix.mat3)),this.uniforms.uCameraRotation&&(this._renderer.curMatrix.inverseTranspose(this._renderer.uViewMatrix),this.setUniform("uCameraRotation",this._renderer.curMatrix.mat3))}},{key:"useProgram",value:function(){var t=this._renderer.GL;return this._renderer._curShader!==this&&(t.useProgram(this._glProgram),this._renderer._curShader=this),this}},{key:"setUniform",value:function(t,r){var o=this.uniforms[t];if(o){var s=this._renderer.GL;if(o.isArray){if(o._cachedData&&this._renderer._arraysEqual(o._cachedData,r))return;o._cachedData=r.slice(0)}else{if(o._cachedData&&o._cachedData===r)return;Array.isArray(r)?o._cachedData=r.slice(0):o._cachedData=r}var i=o.location;switch(this.useProgram(),o.type){case s.BOOL:!0===r?s.uniform1i(i,1):s.uniform1i(i,0);break;case s.INT:1<o.size?r.length&&s.uniform1iv(i,r):s.uniform1i(i,r);break;case s.FLOAT:1<o.size?r.length&&s.uniform1fv(i,r):s.uniform1f(i,r);break;case s.FLOAT_MAT3:s.uniformMatrix3fv(i,!1,r);break;case s.FLOAT_MAT4:s.uniformMatrix4fv(i,!1,r);break;case s.FLOAT_VEC2:1<o.size?r.length&&s.uniform2fv(i,r):s.uniform2f(i,r[0],r[1]);break;case s.FLOAT_VEC3:1<o.size?r.length&&s.uniform3fv(i,r):s.uniform3f(i,r[0],r[1],r[2]);break;case s.FLOAT_VEC4:1<o.size?r.length&&s.uniform4fv(i,r):s.uniform4f(i,r[0],r[1],r[2],r[3]);break;case s.INT_VEC2:1<o.size?r.length&&s.uniform2iv(i,r):s.uniform2i(i,r[0],r[1]);break;case s.INT_VEC3:1<o.size?r.length&&s.uniform3iv(i,r):s.uniform3i(i,r[0],r[1],r[2]);break;case s.INT_VEC4:1<o.size?r.length&&s.uniform4iv(i,r):s.uniform4i(i,r[0],r[1],r[2],r[3]);break;case s.SAMPLER_2D:if("number"==typeof r){if(r<s.TEXTURE0||r>s.TEXTURE31||r!==Math.ceil(r))return console.log("\uD83C\uDF38 p5.js says: You're trying to use a number as the data for a texture.Please use a texture."),this;s.activeTexture(r),s.uniform1i(i,r)}else s.activeTexture(s.TEXTURE0+o.samplerIndex),o.texture=r instanceof n.default.Texture?r:this._renderer.getTexture(r),s.uniform1i(i,o.samplerIndex),o.texture.src.gifProperties&&o.texture.src._animateGif(this._renderer._pInst);break;case s.SAMPLER_CUBE:case s.SAMPLER_3D:case s.SAMPLER_2D_SHADOW:case s.SAMPLER_2D_ARRAY:case s.SAMPLER_2D_ARRAY_SHADOW:case s.SAMPLER_CUBE_SHADOW:case s.INT_SAMPLER_2D:case s.INT_SAMPLER_3D:case s.INT_SAMPLER_CUBE:case s.INT_SAMPLER_2D_ARRAY:case s.UNSIGNED_INT_SAMPLER_2D:case s.UNSIGNED_INT_SAMPLER_3D:case s.UNSIGNED_INT_SAMPLER_CUBE:case s.UNSIGNED_INT_SAMPLER_2D_ARRAY:"number"==typeof r&&(r<s.TEXTURE0||r>s.TEXTURE31||r!==Math.ceil(r)?console.log("\uD83C\uDF38 p5.js says: You're trying to use a number as the data for a texture.Please use a texture."):(s.activeTexture(r),s.uniform1i(i,r)))}return this}}},{key:"isLightShader",value:function(){return[this.attributes.aNormal,this.uniforms.uUseLighting,this.uniforms.uAmbientLightCount,this.uniforms.uDirectionalLightCount,this.uniforms.uPointLightCount,this.uniforms.uAmbientColor,this.uniforms.uDirectionalDiffuseColors,this.uniforms.uDirectionalSpecularColors,this.uniforms.uPointLightLocation,this.uniforms.uPointLightDiffuseColors,this.uniforms.uPointLightSpecularColors,this.uniforms.uLightingDirection,this.uniforms.uSpecular].some(function(t){return void 0!==t})}},{key:"isNormalShader",value:function(){return void 0!==this.attributes.aNormal}},{key:"isTextureShader",value:function(){return 0<this.samplers.length}},{key:"isColorShader",value:function(){return void 0!==this.attributes.aVertexColor||void 0!==this.uniforms.uMaterialColor}},{key:"isTexLightShader",value:function(){return this.isLightShader()&&this.isTextureShader()}},{key:"isStrokeShader",value:function(){return void 0!==this.uniforms.uStrokeWeight}},{key:"enableAttrib",value:function(t,r,o,n,s,i){var a;return t&&-1!==(t=t.location)&&(a=this._renderer.GL,this._renderer.registerEnabled.has(t)||(a.enableVertexAttribArray(t),this._renderer.registerEnabled.add(t)),this._renderer.GL.vertexAttribPointer(t,r,o||a.FLOAT,n||!1,s||0,i||0)),this}},{key:"disableRemainingAttributes",value:function(){var t=this,r=!0,o=!1,n=void 0;try{for(var s,i=this._renderer.registerEnabled.values()[Symbol.iterator]();!(r=(s=i.next()).done);r=!0)!function(){var r=s.value;Object.keys(t.attributes).some(function(o){return t.attributes[o].location===r})||(t._renderer.GL.disableVertexAttribArray(r),t._renderer.registerEnabled.delete(r))}()}catch(t){o=!0,n=t}finally{try{r||null==i.return||i.return()}finally{if(o)throw n}}}}],i(o.prototype,t),r&&i(o,r),o}(),t=n.default.Shader,o.default=t}
1,{"../core/main":283,"core-js/modules/es.array.concat":153,"core-js/modules/es.array.index-of":164,"core-js/modules/es.array.iterator":165,"core-js/modules/es.array.slice":169,"core-js/modules/es.array.some":170,"core-js/modules/es.function.name":174,"core-js/modules/es.object.assign":183,"core-js/modules/es.object.keys":189,"core-js/modules/es.object.to-string":190,"core-js/modules/es.regexp.exec":195,"core-js/modules/es.regexp.to-string":196,"core-js/modules/es.string.iterator":200,"core-js/modules/es.string.split":206,"core-js/modules/es.symbol":212,"core-js/modules/es.symbol.description":210,"core-js/modules/es.symbol.iterator":211,"core-js/modules/web.dom-collections.iterator":246}],343:[function(t,r,o){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function s(t){return(s="function"==typeof Symbol&&"symbol"===n(Symbol.iterator)?function(t){return n(t)}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":n(t)})(t)}t("core-js/modules/es.symbol"),t("core-js/modules/es.symbol.description"),t("core-js/modules/es.symbol.iterator"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.object.get-own-property-descriptor"),t("core-js/modules/es.object.get-prototype-of"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.reflect.construct"),t("core-js/modules/es.regexp.to-string"),t("core-js/modules/es.string.iterator"),t("core-js/modules/es.typed-array.uint8-array"),t("core-js/modules/es.typed-array.copy-within"),t("core-js/modules/es.typed-array.every"),t("core-js/modules/es.typed-array.fill"),t("core-js/modules/es.typed-array.filter"),t("core-js/modules/es.typed-array.find"),t("core-js/modules/es.typed-array.find-index"),t("core-js/modules/es.typed-array.for-each"),t("core-js/modules/es.typed-array.includes"),t("core-js/modules/es.typed-array.index-of"),t("core-js/modules/es.typed-array.iterator"),t("core-js/modules/es.typed-array.join"),t("core-js/modules/es.typed-array.last-index-of"),t("core-js/modules/es.typed-array.map"),t("core-js/modules/es.typed-array.reduce"),t("
1core-js/modules/es.typed-array.reduce-right"),t("core-js/modules/es.typed-array.reverse"),t("core-js/modules/es.typed-array.set"),t("core-js/modules/es.typed-array.slice"),t("core-js/modules/es.typed-array.some"),t("core-js/modules/es.typed-array.sort"),t("core-js/modules/es.typed-array.subarray"),t("core-js/modules/es.typed-array.to-locale-string"),t("core-js/modules/es.typed-array.to-string"),t("core-js/modules/es.weak-map"),t("core-js/modules/web.dom-collections.iterator"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.typed-array.uint8-array"),t("core-js/modules/es.typed-array.copy-within"),t("core-js/modules/es.typed-array.every"),t("core-js/modules/es.typed-array.fill"),t("core-js/modules/es.typed-array.filter"),t("core-js/modules/es.typed-array.find"),t("core-js/modules/es.typed-array.find-index"),t("core-js/modules/es.typed-array.for-each"),t("core-js/modules/es.typed-array.includes"),t("core-js/modules/es.typed-array.index-of"),t("core-js/modules/es.typed-array.iterator"),t("core-js/modules/es.typed-array.join"),t("core-js/modules/es.typed-array.last-index-of"),t("core-js/modules/es.typed-array.map"),t("core-js/modules/es.typed-array.reduce"),t("
1core-js/modules/es.typed-array.reduce-right"),t("core-js/modules/es.typed-array.reverse"),t("core-js/modules/es.typed-array.set"),t("core-js/modules/es.typed-array.slice"),t("core-js/modules/es.typed-array.some"),t("core-js/modules/es.typed-array.sort"),t("core-js/modules/es.typed-array.subarray"),t("core-js/modules/es.typed-array.to-locale-string"),t("core-js/modules/es.typed-array.to-string"),Object.defineProperty(o,"__esModule",{value:!0}),o.checkWebGLCapabilities=m,o.default=o.MipmapTexture=void 0;var i=(p=t("../core/main"))&&p.__esModule?p:{default:p},a=function(t){if(t&&t.__esModule)return t;if(null===t||"object"!==s(t)&&"function"!=typeof t)return{default:t};var r,o=l();if(o&&o.has(t))return o.get(t);var n,i={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(n in t)Object.prototype.hasOwnProperty.call(t,n)&&((r=a?Object.getOwnPropertyDescriptor(t,n):null)&&(r.get||r.set)?Object.defineProperty(i,n,r):i[n]=t[n]);return i.default=t,o&&o.set(t,i),i}(t("../core/constants"));function l(){var t;return"function"!=typeof WeakMap?null:(t=new WeakMap,l=function(){return t},t)}function u(t,r){return(u=Object.setPrototypeOf||function(t,r){return t.__proto__=r,t})(t,r)}function c(t){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function d(t,r){if(!(t instanceof r))throw TypeError("Cannot call a class as a function")}function h(t,r){for(var o=0;o<r.length;o++){var n=r[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function f(t,r,o){r&&h(t.prototype,r),o&&h(t,o)}i.default.Texture=function(){function t(r,o,n){d(this,t),this._renderer=r;var s=this._renderer.GL,n=(n=n||{},this.src=o,this.glTex=void 0,this.glTarget=s.TEXTURE_2D,this.glFormat=n.format||s.RGBA,this.mipmaps=!1,this.glMinFilter=n.minFilter||s.LINEAR,this.glMagFilter=n.magFilter||s.LINEAR,this.glWrapS=n.wrapS||s.CLAMP_TO_EDGE,this.glWrapT=n.wrapT||s.CLAMP_TO_EDGE,this.glDataType=n.dataType||s.UNSIGNED_BYTE,m(r)),r=(this.glFormat!==s.HALF_FLOAT||n.halfFloat||(console.log("This device does not support dataType HALF_FLOAT. Falling back to FLOAT."),this.glDataType=s.FLOAT),this.glFormat!==s.HALF_FLOAT||this.glMinFilter!==s.LINEAR&&this.glMagFilter!==s.LINEAR||n.halfFloatLinear||(console.log("This device does not support linear filtering for dataType FLOAT. Falling back to NEAREST."),this.glMinFilter===s.LINEAR&&(this.glMinFilter=s.NEAREST),this.glMagFilter===s.LINEAR&&(this.glMagFilter=s.NEAREST)),this.glFormat!==s.FLOAT||n.float||(console.log("This device does not support dataType FLOAT. Falling back to UNSIGNED_BYTE."),this.glDataType=s.UNSIGNED_BYTE),this.glFormat!==s.FLOAT||this.glMinFilter!==s.LINEAR&&this.glMagFilter!==s.LINEAR||n.floatLinear||(console.log("This device does not support linear filtering for dataType FLOAT. Falling back to NEAREST."),this.glMinFilter===s.LINEAR&&(this.glMinFilter=s.NEAREST),this.glMagFilter===s.LINEAR&&(this.glMagFilter=s.NEAREST)),this.isSrcMediaElement=void 0!==i.default.MediaElement&&o instanceof i.default.MediaElement,this._videoPrevUpdateTime=0,this.isSrcHTMLElement=void 0!==i.default.Element&&o instanceof i.default.Element&&!(o instanceof i.default.Graphics)&&!(o instanceof i.default.Renderer),this.isSrcP5Image=o instanceof i.default.Image,this.isSrcP5Graphics=o instanceof i.default.Graphics,this.isSrcP5Renderer=o instanceof i.default.Renderer,this.isImageData="undefined"!=typeof ImageData&&o instanceof ImageData,this.isFramebufferTexture=o instanceof i.default.FramebufferTexture,this._getTextureDataFromSource());return this.width=r.width,this.height=r.height,this.init(r),this}return f(t,[{key:"_getTextureDataFromSource",value:function(){var t;return this.isFramebufferTexture?t=this.src.rawTexture():this.isSrcP5Image?t=this.src.canvas:this.isSrcMediaElement||this.isSrcP5Graphics||this.isSrcP5Renderer||this.isSrcHTMLElement?(this.src._ensureCanvas&&this.src._ensureCanvas(),t=this.src.canvas||this.src.elt):this.isImageData&&(t=this.src),t}},{key:"init",value:function(t){var r,o=this._renderer.GL;this.isFramebufferTexture||(this.glTex=o.createTexture()),this.glWrapS=this._renderer.textureWrapX,this.glWrapT=this._renderer.textureWrapY,this.setWrapMode(this.glWrapS,this.glWrapT),this.bindTexture(),o.texParameteri(o.TEXTURE_2D,o.TEXTURE_MAG_FILTER,this.glMagFilter),o.texParameteri(o.TEXTURE_2D,o.TEXTURE_MIN_FILTER,this.glMinFilter),this.isFramebufferTexture||(0===this.width||0===this.height||this.isSrcMediaElement&&!this.src.loadedmetadata?(r=new Uint8Array([1,1,1,1]),o.texImage2D(this.glTarget,0,o.RGBA,1,1,0,this.glFormat,this.glDataType,r)):o.texImage2D(this.glTarget,0,this.glFormat,this.glFormat,this.glDataType,t))}},{key:"update",value:function(){var t,r,o,n=this.src;return 0!==n.width&&0!==n.height&&!this.isFramebufferTexture&&(t=this._getTextureDataFromSource(),r
1=!1,o=this._renderer.GL,t.width!==this.width||t.height!==this.height?(r=!0,this.width=t.width||n.width,this.height=t.height||n.height,this.isSrcP5Image?n.setModified(!1):(this.isSrcMediaElement||this.isSrcHTMLElement)&&n.setModified(!0)):this.isSrcP5Image?n.isModified()&&n.setModified((r=!0,!1)):this.isSrcMediaElement?n.isModified()?n.setModified((r=!0,!1)):n.loadedmetadata&&this._videoPrevUpdateTime!==n.time()&&(this._videoPrevUpdateTime=n.time(),r=!0):this.isImageData?n._dirty&&(n._dirty=!1,r=!0):r=!0,r&&(this.bindTexture(),o.texImage2D(this.glTarget,0,this.glFormat,this.glFormat,this.glDataType,t)),r)}},{key:"bindTexture",value:function(){return this._renderer.GL.bindTexture(this.glTarget,this.getTexture()),this}},{key:"unbindTexture",value:function(){this._renderer.GL.bindTexture(this.glTarget,null)}},{key:"getTexture",value:function(){return this.isFramebufferTexture?this.src.rawTexture():this.glTex}},{key:"setInterpolation",value:function(t,r){var o=this._renderer.GL;this.glMinFilter=this.glFilter(t),this.glMagFilter=this.glFilter(r),this.bindTexture(),o.texParameteri(o.TEXTURE_2D,o.TEXTURE_MIN_FILTER,this.glMinFilter),o.texParameteri(o.TEXTURE_2D,o.TEXTURE_MAG_FILTER,this.glMagFilter),this.unbindTexture()}},{key:"glFilter",value:function(t){var r=this._renderer.GL;return t===a.NEAREST?r.NEAREST:r.LINEAR}},{key:"setWrapMode",value:function(t,r){var o,n,s=this._renderer.GL,i=this._getTextureDataFromSource(),i=i.naturalWidth&&i.naturalHeight?(l=i.naturalWidth,i.naturalHeight):(l=this.width,this.height),l=0==((o=l)&o-1),i=0==((n=i)&n-1);t===a.REPEAT?this._renderer.webglVersion===a.WEBGL2||l&&i?this.glWrapS=s.REPEAT:(console.warn("You tried to set the wrap mode to REPEAT but the texture size is not a power of two. Setting to CLAMP instead"),this.glWrapS=s.CLAMP_TO_EDGE):t===a.MIRROR?this._renderer.webglVersion===a.WEBGL2||l&&i?this.glWrapS=s.MIRRORED_REPEAT:(console.warn("You tried to set the wrap mode to MIRROR but the texture size is not a power of two. Setting to CLAMP instead"),this.glWrapS=s.CLAMP_TO_EDGE):this.glWrapS=s.CLAMP_TO_EDGE,r===a.REPEAT?this._renderer.webglVersion===a.WEBGL2||l&&i?this.glWrapT=s.REPEAT:(console.warn("You tried to set the wrap mode to REPEAT but the texture size is not a power of two. Setting to CLAMP instead"),this.glWrapT=s.CLAMP_TO_EDGE):r===a.MIRROR?this._renderer.webglVersion===a.WEBGL2||l&&i?this.glWrapT=s.MIRRORED_REPEAT:(console.warn("You tried to set the wrap mode to MIRROR but the texture size is not a power of two. Setting to CLAMP instead"),this.glWrapT=s.CLAMP_TO_EDGE):this.glWrapT=s.CLAMP_TO_EDGE,this.bindTexture(),s.texParameteri(s.TEXTURE_2D,s.TEXTURE_WRAP_S,this.glWrapS),s.texParameteri(s.TEXTURE_2D,s.TEXTURE_WRAP_T,this.glWrapT),this.unbindTexture()}}]),t}();var p=function(t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");o.prototype=Object.create(t&&t.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),t&&u(o,t);var r=function(){var t,r=c(o),r=(t=!function(){if("undefined"!=typeof Reflect&&Reflect.construct&&!Reflect.construct.sham){if("function"==typeof Proxy)return 1;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),1}catch(t){}}}()?r.apply(this,arguments):Reflect.construct(r,arguments,t=c(this).constructor),this);if(!t||"object"!==s(t)&&"function"!=typeof t){if(void 0!==r)return r;throw ReferenceError("this hasn't been initialised - super() hasn't been called")}return t};function o(t,n,s){return d(this,o),n=(t=r.call(this,t,n,s))._renderer.GL,t.glMinFilter===n.LINEAR&&(t.glMinFilter=n.LINEAR_MIPMAP_LINEAR),t}return f(o,[{key:"glFilter",value:function(t){return this._renderer.GL.LINEAR_MIPMAP_LINEAR}},{key:"_getTextureDataFromSource",value:function(){return this.src}},{key:"init",value:function(t){var r=this._renderer.GL;this.glTex=r.createTexture(),this.bindTexture();for(var o=0;o<t.length;o++)r.texImage2D(this.glTarget,o,this.glFormat,this.glFormat,this.glDataType,t[o]);this.glMinFilter=r.LINEAR_MIPMAP_LINEAR,r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MAG_FILTER,this.glMagFilter),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MIN_FILTER,this.glMinFilter),this.unbindTexture()}},{key:"update",value:function(){}}]),o}(i.default.Texture);function m(t){var r=t.GL,t=t.webglVersion,o=t===a.WEBGL2?r.getExtension("EXT_color_buffer_float")&&r.getExtension("EXT_float_blend"):r.getExtension("OES_texture_float"),n=o&&r.getExtension("OES_texture_float_linear"),t=t===a.WEBGL2?r.getExtension("EXT_color_buffer_float"):r.getExtension("OES_texture_half_float");return{float:o,floatLinear:n,halfFloat:t,halfFloatLinear:t&&r.getExtension("OES_texture_half_float_linear")}}o.MipmapTexture=p,t=i.default.Texture,o.default=t},{"../core/constants":272,"../core/main":283,"core-js/modules/es.array.iterator":165,"core-js/modules/es.object.get-own-property-descriptor":186,"core-js/modules/es.object.get-prototype-of":188,"core-js/modules/es.object.to-string":190,"core-js/modules/es.reflect.construct":192,"core-js/modules/es.regexp.to-string":196,"core-js/modules/es.string.iterator":200,"core-js/modules/es.symbol":212,"core-js/modules/es.symbol.description":210,"core-js/modules/es.symbol.iterator":211,"core-js/modules/es.typed-array.copy-within":213,"core-js/modules/es.typed-array.every":214,"core-js/modules/es.typed-array.fill":215,"core-js/modules/es.typed-array.filter":216,"core-js/modules/es.typed-array.find":218,"core-js/modules/es.typed-array.find-index":217,"core-js/modules/es.typed-array.for-each":221,"core-js/modules/es.typed-array.includes":222,"core-js/modules/es.typed-array.index-of":223,"core-js/modules/es.typed-array.iterator":226,"core-js/modules/es.typed-array.join":227,"core-js/modules/es.typed-array.last-index-of":228,"core-js/modules/es.typed-array.map":229,"core-js/modules/es.typed-array.reduce":231,"core-js/modules/es.typed-array.reduce-right":230,"core-js/modules/es.typed-array.reverse":232,"core-js/modules/es.typed-array.set":233,"core-js/modules/es.typed-array.slice":234,"core-js/modules/es.typed-array.some":235,"core-js/modules/es.typed-array.sort":236,"core-js/modules/es.typed-array.subarray":237,"core-js/modules/es.typed-array.to-locale-string":238,"core-js/modules/es.typed-array.to-string":239,"core-js/modules/es.typed-array.uint8-array":242,"core-js/modules/es.weak-map":244,"core-js/modules/web.dom-collections.iterator":246}],344:[function(t,r,o){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function s(t){return(s="function"==typeof Symbol&&"symbol"===n(Symbol.iterator)?function(t){return n(t)}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":n(t)})(t)}t("core-js/modules/es.symbol"),t("core-js/modules/es.symbol.description"),t("core-js/modules/es.symbol.iterator"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.object.get-own-property-descriptor"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.regexp.exec"),t("core-js/modules/es.string.iterator"),t("core-js/modules/es.string.split"),t("core-js/modules/es.string.sub"),t("core-js/modules/es.weak-map"),t("core-js/modules/web.dom-collections.iterator"),t("core-js/modules/es.symbol"),t("core-js/modules/es.symbol.description"),t("core-js/modules/es.symbol.iterator"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.regexp.exec"),t("core-js/modules/es.string.iterator"),t("core-js/modules/es.string.split"),t("core-js/modules/es.string.sub"),t("core-js/modules/web.dom-collections.iterator");var i,a=(i=t("../core/main"))&&i.__esModule?i:{default:i},l=function(t){if(t&&t.__esModule)return t;if(null===t||"object"!==s(t)&&"function"!=typeof t)return{default:t};var r,o=u();if(o&&o.has(t))return o.get(t);var n,i={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(n in t)Object.prototype.hasOwnProperty.call(t,n)&&((r=a?Object.getOwnPropertyDescriptor(t,n):null)&&(r.get||r.set)?Object.defineProperty(i,n,r):i[n]=t[n]);return i.default=t,o&&o.set(t,i),i}(t("../core/constants"));function u(){var t;return"function"!=typeof WeakMap?null:(t=new WeakMap,u=function(){return t},t)}function c(t,r){if(!(t instanceof r))throw TypeError("Cannot call a class as a function")}function d(t,r){for(var o=0;o<r.length;o++){var n=r[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function h(t,r,o){r&&d(t.prototype,r),o&&d(t,o)}
1t("./p5.Shader"),t("./p5.RendererGL.Retained"),a.default.RendererGL.prototype._applyTextProperties=function(){this._setProperty("_textAscent",null),this._setProperty("_textDescent",null)},a.default.RendererGL.prototype.textWidth=function(t){return this._isOpenType()?this._textFont._textWidth(t,this._textSize):0};var f=function(){function t(r,o){c(this,t),this.width=r,this.height=o,this.infos=[]}return h(t,[{key:"findImage",value:function(t){var r,o,n=this.width*this.height;if(n<t)throw Error("font is too complex to render in 3D");for(var s=this.infos.length-1;0<=s;--s){var i=this.infos[s];if(i.index+t<n){o=(r=i).imageData;break}}if(!r){try{o=new ImageData(this.width,this.height)}catch(t){var a=document.getElementsByTagName("canvas")[0],l=!a,u=(a||((a=document.createElement("canvas")).style.display="none",document.body.appendChild(a)),a.getContext("2d"));u&&(o=u.createImageData(this.width,this.height)),l&&document.body.removeChild(a)}this.infos.push(r={index:0,imageData:o})}return u=r.index,r.index+=t,o._dirty=!0,{imageData:o,index:u}}}]),t}();function p(t,r,o,n,s){var i=t.imageData.data,t=4*t.index++;i[t++]=r,i[t++]=o,i[t++]=n,i[+t]=s}var m=Math.sqrt(3),y=function(){function t(r){c(this,t),this.font=r,this.strokeImageInfos=new f(64,64),this.colDimImageInfos=new f(64,64),this.rowDimImageInfos=new f(64,64),this.colCellImageInfos=new f(64,64),this.rowCellImageInfos=new f(64,64),this.glyphInfos={}}return h(t,[{key:"getGlyphInfo",value:function(t){var r=this.glyphInfos[t.index];if(!r){var o=t.getBoundingBox(),n=o.x1,s=o.y1,i=o.x2-n,l=o.y2-s,u=t.path.commands;if(0==i||0==l||!u.length)return this.glyphInfos[t.index]={};for(var d=[],f=[],y=[],g=8;0<=g;--g)y.push([]);for(g=8;0<=g;--g)f.push([]);var v,b,_,j,x=function(){function t(r,o,n,s){c(this,t),this.p0=r,this.c0=o,this.c1=n,this.p1=s}return h(t,[{key:"toQuadratic",value:function(){return{x:this.p0.x,y:this.p0.y,x1:this.p1.x,y1:this.p1.y,cx:(3*(this.c0.x+this.c1.x)-(this.p0.x+this.p1.x))/4,cy:(3*(this.c0.y+this.c1.y)-(this.p0.y+this.p1.y))/4}}},{key:"quadError",value:function(){return a.default.Vector.sub(a.default.Vector.sub(this.p1,this.p0),a.default.Vector.mult(a.default.Vector.sub(this.c1,this.c0),3)).mag()/2}},{key:"split",value:function(r){var o=a.default.Vector.lerp(this.p0,this.c0,r),n=a.default.Vector.lerp(this.c0,this.c1,r),s=a.default.Vector.lerp(o,n,r),n=(this.c1=a.default.Vector.lerp(this.c1,this.p1,r),this.c0=a.default.Vector.lerp(n,this.c1,r),a.default.Vector.lerp(s,this.c0,r)),r=new t(this.p0,o,s,n);return this.p0=n,r}},{key:"splitInflections",value:function(){var t=a.default.Vector.sub(this.c0,this.p0),r=a.default.Vector.sub(a.default.Vector.sub(this.c1,this.c0),t),o=a.default.Vector.sub(a.default.Vector.sub(a.default.Vector.sub(this.p1,this.c1),t),a.default.Vector.mult(r,2)),n=[],s=r.x*o.y-r.y*o.x;return 0!==s&&0<=(t=(o=t.x*o.y-t.y*o.x)*o-4*s*(t.x*r.y-t.y*r.x))&&(s<0&&(s=-s,o=-o),t=(-o+(r=Math.sqrt(t)))/(2*s),0<(o=(-o-r)/(2*s))&&o<1&&(n.push(this.split(o)),t=1-(1-t)/(1-o)),0<t&&t<1&&n.push(this.split(t))),n.push(this),n}}]),t}(),w=!0,S=!1,T=void 0;try{for(var E,M=u[Symbol.iterator]();!(w=(E=M.next()).done);w=!0){var k=E.value,O=(k.x-n)/i,C=(k.y-s)/l;if(!H(v,b,O,C)){switch(k.type){case"M":_=O,j=C;break;case"L":z(v,b,O,C);break;case"Q":var P=(k.x1-n)/i,A=(k.y1-s)/l;G([v,O,P],[b,C,A],{x:v,y:b,cx:P,cy:A});break;case"Z":H(v,b,_,j)?d.push({x:v,y:b}):(z(v,b,_,j),d.push({x:_,y:j}));break;case"C":for(var L=function(t,r,o,n,s,i,l,u){var t=new x(new a.default.Vector(t,r),new a.default.Vector(o,n),new a.default.Vector(s,i),new a.default.Vector(l,u)).splitInflections(),c=[],d=30/m,h=!0,r=!1,o=void 0;try{for(var f,p=t[Symbol.iterator]();!(h=(f=p.next()).done);h=!0){for(var y=f.value,g=[],v=void 0;!(.125<=(v=d/y.quadError()));){var b=Math.pow(v,1/3),_=y.split(b),j=y.split(1-b/(1-b));c.push(_),g.push(y),y=j}v<1&&c.push(y.split(.5)),c.push(y),Array.prototype.push.apply(c,g.reverse())}}catch(t){r=!0,o=t}finally{try{h||null==p.return||p.return()}finally{if(r)throw o}}return c}(v,b,(k.x1-n)/i,(k.y1-s)/l,(k.x2-n)/i,(k.y2-s)/l,O,C),R=0;R<L.length;R++){var I=L[R].toQuadratic();G([I.x,I.x1,I.cx],[I.y,I.y1,I.cy],I)}break;default:throw Error("unknown command type: ".concat(k.type))}v=O,b=C}}}catch(t){S=!0,T=t}finally{try{w||null==M.return||M.return()}finally{if(S)throw T}}for(var D=d.length,F=this.strokeImageInfos.findImage(D),N=F.index,U=0;U<D;++U){var B=d[U];p(F,V(B.x),V(B.y),V(B.cx),V(B.cy))}(r=this.glyphInfos[t.index]={glyph:t,uGlyphRect:[o.x1,-o.y1,o.x2,-o.y2],strokeImageInfo:F,strokes:d,colInfo:W(y,this.colDimImageInfos,this.colCellImageInfos),rowInfo:W(f,this.rowDimImageInfos,this.rowCellImageInfos)}).uGridOffset=[r.colInfo.dimOffset,r.rowInfo.dimOffset]}return r;function G(t,r,o){var n=d.length;function s(t,r,o){for(var n=t.length;0<n--;){var s=t[n];s<r&&(r=s),o<s&&(o=s)}return{min:r,max:o}}d.push(o);
1for(var o=s(t,1,0),t=Math.max(Math.floor(9*o.min-.5),0),i=Math.min(Math.ceil(9*o.max+.5),9),a=t;a<i;++a)y[a].push(n);for(var o=s(r,1,0),t=Math.max(Math.floor(9*o.min-.5),0),l=Math.min(Math.ceil(9*o.max+.5),9),u=t;u<l;++u)f[u].push(n)}function V(t){return(t*=255)<0?0:255<t?255:t}function z(t,r,o,n){G([t,o],[r,n],{x:t,y:r,cx:(t+o)/2,cy:(r+n)/2})}function H(t,r,o,n){return 1e-5>Math.abs(o-t)&&1e-5>Math.abs(n-r)}function W(t,r,o){for(var n=t.length,s=r.findImage(n),r=s.index,i=0,a=0;a<n;++a)i+=t[a].length;for(var l=o.findImage(i),u=0;u<n;++u){var c=t[u],d=c.length,h=l.index;p(s,h>>7,127&h,d>>7,127&d);for(var f=0;f<d;++f){var m=c[f]+N;p(l,m>>7,127&m,0,0)}}return{cellImageInfo:l,dimOffset:r,dimImageInfo:s}}}}]),t}();a.default.RendererGL.prototype._renderText=function(t,r,o,n,s){if(this._textFont&&"string"!=typeof this._textFont){if(!(s<=n)&&this._doFill){if(this._isOpenType()){t.push();var s=this._doStroke,i=this.drawMode,u=(this._doStroke=!1,this.drawMode=l.TEXTURE,this._textFont.font),c=(c=this._textFont._fontInfo)||(this._textFont._fontInfo=new y(u)),o=this._textFont._handleAlignment(this,r,o,n),n=this._textSize/u.unitsPerEm,d=(this.translate(o.x,o.y,0),this.scale(n,n,1),this.GL),o=!this._defaultFontShader,h=this._getFontShader(),f=(h.init(),h.bindShader(),o&&(h.setUniform("uGridImageSize",[64,64]),h.setUniform("uCellsImageSize",[64,64]),h.setUniform("uStrokeImageSize",[64,64]),h.setUniform("uGridSize",[9,9])),this._applyColorBlend(this.curFillColor),this.retainedMode.geometry.glyph),p=(f||((n=this._textGeom=new a.default.Geometry(1,1,function(){for(var t=0;t<=1;t++)for(var r=0;r<=1;r++)this.vertices.push(new a.default.Vector(r,t,0)),this.uvs.push(r,t)})).computeFaces().computeNormals(),f=this.createBuffers("glyph",n)),!0),o=!1,n=void 0;try{for(var m,g=this.retainedMode.buffers.text[Symbol.iterator]();!(p=(m=g.next()).done);p=!0)m.value._prepareBuffer(f,h)}catch(t){o=!0,n=t}finally{try{p||null==g.return||g.return()}finally{if(o)throw n}}this._bindBuffer(f.indexBuffer,d.ELEMENT_ARRAY_BUFFER),h.setUniform("uMaterialColor",this.curFillColor),d.pixelStorei(d.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1);try{var v=0,b=null,_=u.stringToGlyphs(r),j=!0,x=!1,w=void 0;try{for(var S,T=_[Symbol.iterator]();!(j=(S=T.next()).done);j=!0){var E,M,k=S.value,O=(b&&(v+=u.getKerningValue(b,k)),c.getGlyphInfo(k));O.uGlyphRect&&(E=O.rowInfo,M=O.colInfo,h.setUniform("uSamplerStrokes",O.strokeImageInfo.imageData),h.setUniform("uSamplerRowStrokes",E.cellImageInfo.imageData),h.setUniform("uSamplerRows",E.dimImageInfo.imageData),h.setUniform("uSamplerColStrokes",M.cellImageInfo.imageData),h.setUniform("uSamplerCols",M.dimImageInfo.imageData),h.setUniform("uGridOffset",O.uGridOffset),h.setUniform("uGlyphRect",O.uGlyphRect),h.setUniform("uGlyphOffset",v),h.bindTextures(),d.drawElements(d.TRIANGLES,6,this.GL.UNSIGNED_SHORT,0)),v+=k.advanceWidth,b=k}}catch(t){x=!0,w=t}finally{try{j||null==T.return||T.return()}finally{if(x)throw w}}}finally{h.unbindShader(),this._doStroke=s,this.drawMode=i,d.pixelStorei(d.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0),t.pop()}}else console.log("WEBGL: only Opentype (.otf) and Truetype (.ttf) fonts are supported");return t}}else console.log("WEBGL: you must load and set a font before drawing text. See `loadFont` and `textFont` for more details.")}},{"../core/constants":272,"../core/main":283,"./p5.RendererGL.Retained":340,"./p5.Shader":342,"core-js/modules/es.array.iterator":165,"core-js/modules/es.object.get-own-property-descriptor":186,"core-js/modules/es.object.to-string":190,"core-js/modules/es.regexp.exec":195,"core-js/modules/es.string.iterator":200,"core-js/modules/es.string.split":206,"core-js/modules/es.string.sub":208,"core-js/modules/es.symbol":212,"core-js/modules/es.symbol.description":210,"core-js/modules/es.symbol.iterator":211,"core-js/modules/es.weak-map":244,"core-js/modules/web.dom-collections.iterator":246}]},{},[267])(267)},t.exports=n()}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.