>>=1,++o,r+=t.table[o],0<=(n-=t.table[o]););return e.tag=a,e.bitcount-=o,t.trans[r+n]}function w(e,t,r){var n,o,a,i,s,l;for(n=x(e,5,257),o=x(e,5,1),a=x(e,4,4),i=0;i<19;++i)m[i]=0;for(i=0;ithis.x2&&(this.x2=e)),"number"==typeof t&&((isNaN(this.y1)||isNaN(this.y2))&&(this.y1=t,this.y2=t),tthis.y2&&(this.y2=t))},M.prototype.addX=function(e){this.addPoint(e,null)},M.prototype.addY=function(e){this.addPoint(null,e)},M.prototype.addBezier=function(e,t,r,n,o,a,i,s){var l=[e,t],u=[r,n],c=[o,a],d=[i,s];this.addPoint(e,t),this.addPoint(i,s);for(var f=0;f<=1;f++){var h=6*l[f]-12*u[f]+6*c[f],p=-3*l[f]+9*u[f]-9*c[f]+3*d[f],m=3*u[f]-3*l[f];if(0!=p){var y=Math.pow(h,2)-4*m*p;if(!(y<0)){var g=(-h+Math.sqrt(y))/(2*p);0"},k.prototype.toDOMElement=function(e){var t=this.toPathData(e),r=document.createElementNS("http://www.w3.org/2000/svg","path");return r.setAttribute("d",t),r};var O={fail:T,argument:C,assert:C},P={},L={},A={};function R(e){return function(){return e}}L.BYTE=function(e){return O.argument(0<=e&&e<=255,"Byte value should be between 0 and 255."),[e]},A.BYTE=R(1),L.CHAR=function(e){return[e.charCodeAt(0)]},A.CHAR=R(1),L.CHARARRAY=function(e){for(var t=[],r=0;r>8&255,255&e]},A.USHORT=R(2),L.SHORT=function(e){return 32768<=e&&(e=-(65536-e)),[e>>8&255,255&e]},A.SHORT=R(2),L.UINT24=function(e){return[e>>16&255,e>>8&255,255&e]},A.UINT24=R(3),L.ULONG=function(e){return[e>>24&255,e>>16&255,e>>8&255,255&e]},A.ULONG=R(4),L.LONG=function(e){return 2147483648<=e&&(e=-(4294967296-e)),[e>>24&255,e>>16&255,e>>8&255,255&e]},A.LONG=R(4),L.FIXED=L.ULONG,A.FIXED=A.ULONG,L.FWORD=L.SHORT,A.FWORD=A.SHORT,L.UFWORD=L.USHORT,A.UFWORD=A.USHORT,L.LONGDATETIME=function(e){return[0,0,0,0,e>>24&255,e>>16&255,e>>8&255,255&e]},A.LONGDATETIME=R(8),L.TAG=function(e){return O.argument(4===e.length,"Tag should be exactly 4 ASCII characters."),[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)]},A.TAG=R(4),L.Card8=L.BYTE,A.Card8=A.BYTE,L.Card16=L.USHORT,A.Card16=A.USHORT,L.OffSize=L.BYTE,A.OffSize=A.BYTE,L.SID=L.USHORT,A.SID=A.USHORT,L.NUMBER=function(e){return-107<=e&&e<=107?[e+139]:108<=e&&e<=1131?[247+((e-=108)>>8),255&e]:-1131<=e&&e<=-108?[251+((e=-e-108)>>8),255&e]:-32768<=e&&e<=32767?L.NUMBER16(e):L.NUMBER32(e)},A.NUMBER=function(e){return L.NUMBER(e).length},L.NUMBER16=function(e){return[28,e>>8&255,255&e]},A.NUMBER16=R(3),L.NUMBER32=function(e){return[29,e>>24&255,e>>16&255,e>>8&255,255&e]},A.NUMBER32=R(5),L.REAL=function(e){var t=e.toString(),r=/\.(\d*?)(?:9{5,20}|0{5,20})\d{0,2}(?:e(.+)|$)/.exec(t);if(r){var n=parseFloat("1e"+((r[2]?+r[2]:0)+r[1].length));t=(Math.round(e*n)/n).toString()}for(var o="",a=0,i=t.length;a>8&255,t[t.length]=255&n}return t},A.UTF16=function(e){return 2*e.length};var D={"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\u2020\xb0\xa2\xa3\xa7\u2022\xb6\xdf\xae\u0160\u2122\xb4\xa8\u2260\u017d\xd8\u221e\xb1\u2264\u2265\u2206\xb5\u2202\u2211\u220f\u0161\u222b\xaa\xba\u03a9\u017e\xf8\xbf\xa1\xac\u221a\u0192\u2248\u0106\xab\u010c\u2026\xa0\xc0\xc3\xd5\u0152\u0153\u0110\u2014\u201c\u201d\u2018\u2019\xf7\u25ca\uf8ff\xa9\u2044\u20ac\u2039\u203a\xc6\xbb\u2013\xb7\u201a\u201e\u2030\xc2\u0107\xc1\u010d\xc8\xcd\xce\xcf\xcc\xd3\xd4\u0111\xd2\xda\xdb\xd9\u0131\u02c6\u02dc\xaf\u03c0\xcb\u02da\xb8\xca\xe6\u02c7","x-mac-cyrillic":"\u0410\u0411\u0412\u0413\u0414\u0415\u0416\u0417\u0418\u0419\u041a\u041b\u041c\u041d\u041e\u041f\u0420\u0421\u0422\u0423\u0424\u0425\u0426\u0427\u0428\u0429\u042a\u042b\u042c\u042d\u042e\u042f\u2020\xb0\u0490\xa3\xa7\u2022\xb6\u0406\xae\xa9\u2122\u0402\u0452\u2260\u0403\u0453\u221e\xb1\u2264\u2265\u0456\xb5\u0491\u0408\u0404\u0454\u0407\u0457\u0409\u0459\u040a\u045a\u0458\u0405\xac\u221a\u0192\u2248\u2206\xab\xbb\u2026\xa0\u040b\u045b\u040c\u045c\u0455\u2013\u2014\u201c\u201d\u2018\u2019\xf7\u201e\u040e\u045e\u040f\u045f\u2116\u0401\u0451\u044f\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043a\u043b\u043c\u043d\u043e\u043f\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044a\u044b\u044c\u044d\u044e","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\u2020\xb0\xa2\xa3\xa7\u2022\xb6\xdf\xae\xa9\u2122\xb4\xa8\u2260\xc6\xd8\u1e02\xb1\u2264\u2265\u1e03\u010a\u010b\u1e0a\u1e0b\u1e1e\u1e1f\u0120\u0121\u1e40\xe6\xf8\u1e41\u1e56\u1e57\u027c\u0192\u017f\u1e60\xab\xbb\u2026\xa0\xc0\xc3\xd5\u0152\u0153\u2013\u2014\u201c\u201d\u2018\u2019\u1e61\u1e9b\xff\u0178\u1e6a\u20ac\u2039\u203a\u0176\u0177\u1e6b\xb7\u1ef2\u1ef3\u204a\xc2\xca\xc1\xcb\xc8\xcd\xce\xcf\xcc\xd3\xd4\u2663\xd2\xda\xdb\xd9\u0131\xdd\xfd\u0174\u0175\u1e84\u1e85\u1e80\u1e81\u1e82\u1e83","x-mac-greek":"\xc4\xb9\xb2\xc9\xb3\xd6\xdc\u0385\xe0\xe2\xe4\u0384\xa8\xe7\xe9\xe8\xea\xeb\xa3\u2122\xee\xef\u2022\xbd\u2030\xf4\xf6\xa6\u20ac\xf9\xfb\xfc\u2020\u0393\u0394\u0398\u039b\u039e\u03a0\xdf\xae\xa9\u03a3\u03aa\xa7\u2260\xb0\xb7\u0391\xb1\u2264\u2265\xa5\u0392\u0395\u0396\u0397\u0399\u039a\u039c\u03a6\u03ab\u03a8\u03a9\u03ac\u039d\xac\u039f\u03a1\u2248\u03a4\xab\xbb\u2026\xa0\u03a5\u03a7\u0386\u0388\u0153\u2013\u2015\u201c\u201d\u2018\u2019\xf7\u0389\u038a\u038c\u038e\u03ad\u03ae\u03af\u03cc\u038f\u03cd\u03b1\u03b2\u03c8\u03b4\u03b5\u03c6\u03b3\u03b7\u03b9\u03be\u03ba\u03bb\u03bc\u03bd\u03bf\u03c0\u03ce\u03c1\u03c3\u03c4\u03b8\u03c9\u03c2\u03c7\u03c5\u03b6\u03ca\u03cb\u0390\u03b0\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\u2022\xb6\xdf\xae\xa9\u2122\xb4\xa8\u2260\xc6\xd8\u221e\xb1\u2264\u2265\xa5\xb5\u2202\u2211\u220f\u03c0\u222b\xaa\xba\u03a9\xe6\xf8\xbf\xa1\xac\u221a\u0192\u2248\u2206\xab\xbb\u2026\xa0\xc0\xc3\xd5\u0152\u0153\u2013\u2014\u201c\u201d\u2018\u2019\xf7\u25ca\xff\u0178\u2044\u20ac\xd0\xf0\xde\xfe\xfd\xb7\u201a\u201e\u2030\xc2\xca\xc1\xcb\xc8\xcd\xce\xcf\xcc\xd3\xd4\uf8ff\xd2\xda\xdb\xd9\u0131\u02c6\u02dc\xaf\u02d8\u02d9\u02da\xb8\u02dd\u02db\u02c7","x-mac-inuit":"\u1403\u1404\u1405\u1406\u140a\u140b\u1431\u1432\u1433\u1434\u1438\u1439\u1449\u144e\u144f\u1450\u1451\u1455\u1456\u1466\u146d\u146e\u146f\u1470\u1472\u1473\u1483\u148b\u148c\u148d\u148e\u1490\u1491\xb0\u14a1\u14a5\u14a6\u2022\xb6\u14a7\xae\xa9\u2122\u14a8\u14aa\u14ab\u14bb\u14c2\u14c3\u14c4\u14c5\u14c7\u14c8\u14d0\u14ef\u14f0\u14f1\u14f2\u14f4\u14f5\u1505\u14d5\u14d6\u14d7\u14d8\u14da\u14db\u14ea\u1528\u1529\u152a\u152b\u152d\u2026\xa0\u152e\u153e\u1555\u1556\u1557\u2013\u2014\u201c\u201d\u2018\u2019\u1558\u1559\u155a\u155d\u1546\u1547\u1548\u1549\u154b\u154c\u1550\u157f\u1580\u1581\u1582\u1583\u1584\u1585\u158f\u1590\u1591\u1592\u1593\u1594\u1595\u1671\u1672\u1673\u1674\u1675\u1676\u1596\u15a0\u15a1\u15a2\u15a3\u15a4\u15a5\u15a6\u157c\u0141\u0142","x-mac-ce":"\xc4\u0100\u0101\xc9\u0104\xd6\xdc\xe1\u0105\u010c\xe4\u010d\u0106\u0107\xe9\u0179\u017a\u010e\xed\u010f\u0112\u0113\u0116\xf3\u0117\xf4\xf6\xf5\xfa\u011a\u011b\xfc\u2020\xb0\u0118\xa3\xa7\u2022\xb6\xdf\xae\xa9\u2122\u0119\xa8\u2260\u0123\u012e\u012f\u012a\u2264\u2265\u012b\u0136\u2202\u2211\u0142\u013b\u013c\u013d\u013e\u0139\u013a\u0145\u0146\u0143\xac\u221a\u0144\u0147\u2206\xab\xbb\u2026\xa0\u0148\u0150\xd5\u0151\u014c\u2013\u2014\u201c\u201d\u2018\u2019\xf7\u25ca\u014d\u0154\u0155\u0158\u2039\u203a\u0159\u0156\u0157\u0160\u201a\u201e\u0161\u015a\u015b\xc1\u0164\u0165\xcd\u017d\u017e\u016a\xd3\xd4\u016b\u016e\xda\u016f\u0170\u0171\u0172\u0173\xdd\xfd\u0137\u017b\u0141\u017c\u0122\u02c7",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\u2020\xb0\xa2\xa3\xa7\u2022\xb6\xdf\xae\xa9\u2122\xb4\xa8\u2260\xc6\xd8\u221e\xb1\u2264\u2265\xa5\xb5\u2202\u2211\u220f\u03c0\u222b\xaa\xba\u03a9\xe6\xf8\xbf\xa1\xac\u221a\u0192\u2248\u2206\xab\xbb\u2026\xa0\xc0\xc3\xd5\u0152\u0153\u2013\u2014\u201c\u201d\u2018\u2019\xf7\u25ca\xff\u0178\u2044\u20ac\u2039\u203a\ufb01\ufb02\u2021\xb7\u201a\u201e\u2030\xc2\xca\xc1\xcb\xc8\xcd\xce\xcf\xcc\xd3\xd4\uf8ff\xd2\xda\xdb\xd9\u0131\u02c6\u02dc\xaf\u02d8\u02d9\u02da\xb8\u02dd\u02db\u02c7","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\u2020\xb0\xa2\xa3\xa7\u2022\xb6\xdf\xae\xa9\u2122\xb4\xa8\u2260\u0102\u0218\u221e\xb1\u2264\u2265\xa5\xb5\u2202\u2211\u220f\u03c0\u222b\xaa\xba\u03a9\u0103\u0219\xbf\xa1\xac\u221a\u0192\u2248\u2206\xab\xbb\u2026\xa0\xc0\xc3\xd5\u0152\u0153\u2013\u2014\u201c\u201d\u2018\u2019\xf7\u25ca\xff\u0178\u2044\u20ac\u2039\u203a\u021a\u021b\u2021\xb7\u201a\u201e\u2030\xc2\xca\xc1\xcb\xc8\xcd\xce\xcf\xcc\xd3\xd4\uf8ff\xd2\xda\xdb\xd9\u0131\u02c6\u02dc\xaf\u02d8\u02d9\u02da\xb8\u02dd\u02db\u02c7","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\u2020\xb0\xa2\xa3\xa7\u2022\xb6\xdf\xae\xa9\u2122\xb4\xa8\u2260\xc6\xd8\u221e\xb1\u2264\u2265\xa5\xb5\u2202\u2211\u220f\u03c0\u222b\xaa\xba\u03a9\xe6\xf8\xbf\xa1\xac\u221a\u0192\u2248\u2206\xab\xbb\u2026\xa0\xc0\xc3\xd5\u0152\u0153\u2013\u2014\u201c\u201d\u2018\u2019\xf7\u25ca\xff\u0178\u011e\u011f\u0130\u0131\u015e\u015f\u2021\xb7\u201a\u201e\u2030\xc2\xca\xc1\xcb\xc8\xcd\xce\xcf\xcc\xd3\xd4\uf8ff\xd2\xda\xdb\xd9\uf8a0\u02c6\u02dc\xaf\u02d8\u02d9\u02da\xb8\u02dd\u02db\u02c7"};P.MACSTRING=function(e,t,r,n){var o=D[n];if(void 0!==o){for(var a="",i=0;i>8&255,l+256&255)}return a}L.MACSTRING=function(e,t){var r=function(e){if(!I)for(var t in I={},D)I[t]=new String(t);var r=I[e];if(void 0!==r){if(N){var n=N.get(r);if(void 0!==n)return n}var o=D[e];if(void 0!==o){for(var a={},i=0;i>8,t[d+1]=255&f,t=t.concat(n[c])}return t},A.TABLE=function(e){for(var t=0,r=e.fields.length,n=0;n>1,t.skip("uShort",3),e.glyphIndexMap={};for(var i=new ae.Parser(r,n+o+14),s=new ae.Parser(r,n+o+16+2*a),l=new ae.Parser(r,n+o+16+4*a),u=new ae.Parser(r,n+o+16+6*a),c=n+o+16+8*a,d=0;d>4,a=15&n;if(15==o)break;if(t+=r[o],15==a)break;t+=r[a]}return parseFloat(t)}(e);if(32<=t&&t<=246)return t-139;if(247<=t&&t<=250)return 256*(t-247)+e.parseByte()+108;if(251<=t&&t<=254)return 256*-(t-251)-e.parseByte()-108;throw new Error("Invalid b0 "+t)}function Ee(e,t,r){t=void 0!==t?t:0;var n=new ae.Parser(e,t),o=[],a=[];for(r=void 0!==r?r:e.length;n.relativeOffset>1,f.length=0,p=!0}return function r(u){for(var v,b,S,j,E,M,k,T,C,O,P,L,A=0;AMath.abs(L-g)?y=P+f.shift():g=L+f.shift(),d.curveTo(n,o,a,i,k,T),d.curveTo(C,O,P,L,y,g);break;default:console.log("Glyph "+t.index+": unknown operator 1200"+R),f.length=0}break;case 14:0>3;break;case 21:2>16),A+=2;break;case 29:E=f.pop()+e.gsubrsBias,(M=e.gsubrs[E])&&r(M);break;case 30:for(;0=r.begin&&e=de.length){var i=n.parseChar();r.names.push(n.parseString(i))}break;case 2.5:r.numberOfGlyphs=n.parseUShort(),r.offset=new Array(r.numberOfGlyphs);for(var s=0;st.value.tag?1:-1})),t.fields=t.fields.concat(n),t.fields=t.fields.concat(o),t}function kt(e,t,r){for(var n=0;n 123 are reserved for internal usage");h|=1<>>1,a=e[o].tag;if(a===t)return o;a>>1,a=e[o];if(a===t)return o;a>>1,i=(r=e[a]).start;if(i===t)return r;i(r=e[n-1]).end?0:r}function Lt(e,t){this.font=e,this.tableName=t}function At(e){Lt.call(this,e,"gpos")}function Rt(e){Lt.call(this,e,"gsub")}function Dt(e,t){var r=e.length;if(r!==t.length)return!1;for(var n=0;nt.points.length-1||n.matchedPoints[1]>o.points.length-1)throw Error("Matched points out of range in "+t.name);var i=t.points[n.matchedPoints[0]],s=o.points[n.matchedPoints[1]],l={xScale:n.xScale,scale01:n.scale01,scale10:n.scale10,yScale:n.yScale,dx:0,dy:0};s=Gt([s],l)[0],l.dx=i.x-s.x,l.dy=i.y-s.y,a=Gt(o.points,l)}t.points=t.points.concat(a)}}return zt(t.points)}(At.prototype=Lt.prototype={searchTag:Ct,binSearch:Ot,getTable:function(e){var t=this.font.tables[this.tableName];return!t&&e&&(t=this.font.tables[this.tableName]=this.createDefaultTable()),t},getScriptNames:function(){var e=this.getTable();return e?e.scripts.map((function(e){return e.tag})):[]},getDefaultScriptName:function(){var e=this.getTable();if(e){for(var t=!1,r=0;r=s[u-1].tag,"Features must be added in alphabetical order."),a={tag:r,feature:{params:0,lookupListIndexes:[]}},s.push(a),i.push(u),a.feature}}},getLookupTables:function(e,t,r,n,o){var a=this.getFeatureTable(e,t,r,o),i=[];if(a){for(var s,l=a.lookupListIndexes,u=this.font.tables[this.tableName].lookups,c=0;c",l),r.stack.push(Math.round(64*l))}function Tr(e,r){var n=r.stack,o=n.pop(),a=r.fv,i=r.pv,s=r.ppem,l=r.deltaBase+16*(e-1),u=r.deltaShift,c=r.z0;t.DEBUG&&console.log(r.step,"DELTAP["+e+"]",o,n);for(var d=0;d>4)===s){var p=(15&h)-8;0<=p&&p++,t.DEBUG&&console.log(r.step,"DELTAPFIX",f,"by",p*u);var m=c[f];a.setRelative(m,m,p*u,i)}}}function Cr(e,r){var n=r.stack,o=n.pop();t.DEBUG&&console.log(r.step,"ROUND[]"),n.push(64*r.round(o/64))}function Or(e,r){var n=r.stack,o=n.pop(),a=r.ppem,i=r.deltaBase+16*(e-1),s=r.deltaShift;t.DEBUG&&console.log(r.step,"DELTAC["+e+"]",o,n);for(var l=0;l>4)===a){var d=(15&c)-8;0<=d&&d++;var f=d*s;t.DEBUG&&console.log(r.step,"DELTACFIX",u,"by",f),r.cvt[u]+=f}}}function Pr(e,r){var n,o,a=r.stack,i=a.pop(),s=a.pop(),l=r.z2[i],u=r.z1[s];t.DEBUG&&console.log(r.step,"SDPVTL["+e+"]",i,s),o=e?(n=l.y-u.y,u.x-l.x):(n=u.x-l.x,u.y-l.y),r.dpv=ir(n,o)}function Lr(e,r){var n=r.stack,o=r.prog,a=r.ip;t.DEBUG&&console.log(r.step,"PUSHB["+e+"]");for(var i=0;i":"_")+(o?"R":"_")+(0===a?"Gr":1===a?"Bl":2===a?"Wh":"")+"]",e?f+"("+i.cvt[f]+","+c+")":"",h,"(d =",s,"->",u*l,")"),i.rp1=i.rp0,i.rp2=h,r&&(i.rp0=h)}Qt.prototype.exec=function(e,r){if("number"!=typeof r)throw new Error("Point size is not a number!");if(!(2",o),l.interpolate(f,i,s,u),l.touch(f)}e.loop=1},jr.bind(void 0,0),jr.bind(void 0,1),function(e){for(var r=e.stack,n=e.rp0,o=e.z0[n],a=e.loop,i=e.fv,s=e.pv,l=e.z1;a--;){var u=r.pop(),c=l[u];t.DEBUG&&console.log(e.step,(1| ").concat(t," | ");this.dummyDOM||(this.dummyDOM=document.getElementById(n).parentNode),this.descriptions?this.descriptions.fallbackElements||(this.descriptions.fallbackElements={}):this.descriptions={fallbackElements:{}},this.descriptions.fallbackElements[e]?this.descriptions.fallbackElements[e].innerHTML!==i&&(this.descriptions.fallbackElements[e].innerHTML=i):this._describeElementHTML("fallback",e,i),r===this.LABEL&&(this.descriptions.labelElements||(this.descriptions.labelElements={}),this.descriptions.labelElements[e]?this.descriptions.labelElements[e].innerHTML!==i&&(this.descriptions.labelElements[e].innerHTML=i):this._describeElementHTML("label",e,i))}},o.default.prototype._describeHTML=function(e,t){var r=this.canvas.id;if("fallback"===e){if(this.dummyDOM.querySelector("#".concat(r+a)))this.dummyDOM.querySelector("#"+r+s).insertAdjacentHTML("beforebegin",''));else{var n='');this.dummyDOM.querySelector("#".concat(r,"accessibleOutput"))?this.dummyDOM.querySelector("#".concat(r,"accessibleOutput")).insertAdjacentHTML("beforebegin",n):this.dummyDOM.querySelector("#".concat(r)).innerHTML=n}return this.descriptions.fallback=this.dummyDOM.querySelector("#".concat(r).concat(i)),void(this.descriptions.fallback.innerHTML=t)}if("label"===e){if(this.dummyDOM.querySelector("#".concat(r+l)))this.dummyDOM.querySelector("#".concat(r+c))&&this.dummyDOM.querySelector("#".concat(r+c)).insertAdjacentHTML("beforebegin",''));else{var o='');this.dummyDOM.querySelector("#".concat(r,"accessibleOutputLabel"))?this.dummyDOM.querySelector("#".concat(r,"accessibleOutputLabel")).insertAdjacentHTML("beforebegin",o):this.dummyDOM.querySelector("#"+r).insertAdjacentHTML("afterend",o)}return this.descriptions.label=this.dummyDOM.querySelector("#"+r+u),void(this.descriptions.label.innerHTML=t)}},o.default.prototype._describeElementHTML=function(e,t,r){var n=this.canvas.id;if("fallback"===e){if(this.dummyDOM.querySelector("#".concat(n+a)))this.dummyDOM.querySelector("#"+n+s)||this.dummyDOM.querySelector("#"+n+i).insertAdjacentHTML("afterend",'Canvas elements and their descriptions
'));else{var o='Canvas elements and their descriptions
');this.dummyDOM.querySelector("#".concat(n,"accessibleOutput"))?this.dummyDOM.querySelector("#".concat(n,"accessibleOutput")).insertAdjacentHTML("beforebegin",o):this.dummyDOM.querySelector("#"+n).innerHTML=o}var d=document.createElement("tr");return d.id=n+"_fte_"+t,this.dummyDOM.querySelector("#"+n+s).appendChild(d),this.descriptions.fallbackElements[t]=this.dummyDOM.querySelector("#".concat(n).concat("_fte_").concat(t)),void(this.descriptions.fallbackElements[t].innerHTML=r)}if("label"===e){if(this.dummyDOM.querySelector("#".concat(n+l)))this.dummyDOM.querySelector("#".concat(n+c))||this.dummyDOM.querySelector("#"+n+u).insertAdjacentHTML("afterend",''));else{var f='');this.dummyDOM.querySelector("#".concat(n,"accessibleOutputLabel"))?this.dummyDOM.querySelector("#".concat(n,"accessibleOutputLabel")).insertAdjacentHTML("beforebegin",f):this.dummyDOM.querySelector("#"+n).insertAdjacentHTML("afterend",f)}var h=document.createElement("tr");h.id=n+"_lte_"+t,this.dummyDOM.querySelector("#"+n+c).appendChild(h),this.descriptions.labelElements[t]=this.dummyDOM.querySelector("#".concat(n).concat("_lte_").concat(t)),this.descriptions.labelElements[t].innerHTML=r}};var f=o.default;r.default=f},{"../core/main":260,"core-js/modules/es.array.concat":148,"core-js/modules/es.regexp.exec":178,"core-js/modules/es.string.ends-with":181,"core-js/modules/es.string.replace":186}],242:[function(e,t,r){"use strict";e("core-js/modules/es.array.concat"),e("core-js/modules/es.array.map"),Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n,o=(n=e("../core/main"))&&n.__esModule?n:{default:n};o.default.prototype._updateGridOutput=function(e){if(this.dummyDOM.querySelector("#".concat(e,"_summary"))){var t=this._accessibleOutputs[e],r=function(e,t){var r="",n="",o=0;for(var a in t){var i=0;for(var s in t[a]){var l='').concat(t[a][s].color," ").concat(a,",");"line"===a?l+=" location = ".concat(t[a][s].pos,", length = ").concat(t[a][s].length," pixels"):(l+=" location = ".concat(t[a][s].pos),"point"!==a&&(l+=", area = ".concat(t[a][s].area," %")),l+=""),r+=l,i++,o++}n=1').concat(t[i][s].color," ").concat(i,""):'').concat(t[i][s].color," ").concat(i," midpoint"),o[t[i][s].loc.locY][t[i][s].loc.locX]?o[t[i][s].loc.locY][t[i][s].loc.locX]=o[t[i][s].loc.locY][t[i][s].loc.locX]+" "+l:o[t[i][s].loc.locY][t[i][s].loc.locX]=l,r++}for(var u in o){var c="";for(var d in o[u])c+="| ",void 0!==o[u][d]&&(c+=o[u][d]),c+=" | ";n=n+c+"
"}return n}(e,this.ingredients.shapes);n!==t.summary.innerHTML&&(t.summary.innerHTML=n),o!==t.map.innerHTML&&(t.map.innerHTML=o),r.details!==t.shapeDetails.innerHTML&&(t.shapeDetails.innerHTML=r.details),this._accessibleOutputs[e]=t}};var a=o.default;r.default=a},{"../core/main":260,"core-js/modules/es.array.concat":148,"core-js/modules/es.array.map":159}],243:[function(e,t,r){"use strict";e("core-js/modules/es.array.concat"),e("core-js/modules/es.array.fill"),e("core-js/modules/es.array.map"),e("core-js/modules/es.number.to-fixed"),Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n,o=(n=e("../core/main"))&&n.__esModule?n:{default:n};function a(e,t,r){return e[0]<.4*t?e[1]<.4*r?"top left":e[1]>.6*r?"bottom left":"mid left":e[0]>.6*t?e[1]<.4*r?"top right":e[1]>.6*r?"bottom right":"mid right":e[1]<.4*r?"top middle":e[1]>.6*r?"bottom middle":"middle"}function i(e,t,r){var n=Math.floor(e[0]/t*10),o=Math.floor(e[1]/r*10);return 10===n&&--n,10===o&&--o,{locX:n,locY:o}}o.default.prototype.textOutput=function(e){o.default._validateParameters("textOutput",arguments),this._accessibleOutputs.text||(this._accessibleOutputs.text=!0,this._createOutput("textOutput","Fallback"),e===this.LABEL&&(this._accessibleOutputs.textLabel=!0,this._createOutput("textOutput","Label")))},o.default.prototype.gridOutput=function(e){o.default._validateParameters("gridOutput",arguments),this._accessibleOutputs.grid||(this._accessibleOutputs.grid=!0,this._createOutput("gridOutput","Fallback"),e===this.LABEL&&(this._accessibleOutputs.gridLabel=!0,this._createOutput("gridOutput","Label")))},o.default.prototype._addAccsOutput=function(){return this._accessibleOutputs||(this._accessibleOutputs={text:!1,grid:!1,textLabel:!1,gridLabel:!1}),this._accessibleOutputs.grid||this._accessibleOutputs.text},o.default.prototype._createOutput=function(e,t){var r,n,o,a=this.canvas.id;this.ingredients||(this.ingredients={shapes:{},colors:{background:"white",fill:"white",stroke:"black"},pShapes:""}),this.dummyDOM||(this.dummyDOM=document.getElementById(a).parentNode);var i="";"Fallback"===t?(r=a+e,n=a+"accessibleOutput",this.dummyDOM.querySelector("#".concat(n))||(this.dummyDOM.querySelector("#".concat(a,"_Description"))?this.dummyDOM.querySelector("#".concat(a,"_Description")).insertAdjacentHTML("afterend",'')):this.dummyDOM.querySelector("#".concat(a)).innerHTML=''))):"Label"===t&&(r=a+e+(i=t),n=a+"accessibleOutput"+t,this.dummyDOM.querySelector("#".concat(n))||(this.dummyDOM.querySelector("#".concat(a,"_Label"))?this.dummyDOM.querySelector("#".concat(a,"_Label")).insertAdjacentHTML("afterend",'')):this.dummyDOM.querySelector("#".concat(a)).insertAdjacentHTML("afterend",'')))),this._accessibleOutputs[r]={},"textOutput"===e?(i="#".concat(a,"gridOutput").concat(i),o=''),this.dummyDOM.querySelector(i)?this.dummyDOM.querySelector(i).insertAdjacentHTML("beforebegin",o):this.dummyDOM.querySelector("#".concat(n)).innerHTML=o,this._accessibleOutputs[r].list=this.dummyDOM.querySelector("#".concat(r,"_list"))):"gridOutput"===e&&(i="#".concat(a,"textOutput").concat(i),o=''),this.dummyDOM.querySelector(i)?this.dummyDOM.querySelector(i).insertAdjacentHTML("afterend",o):this.dummyDOM.querySelector("#".concat(n)).innerHTML=o,this._accessibleOutputs[r].map=this.dummyDOM.querySelector("#".concat(r,"_map"))),this._accessibleOutputs[r].shapeDetails=this.dummyDOM.querySelector("#".concat(r,"_shapeDetails")),this._accessibleOutputs[r].summary=this.dummyDOM.querySelector("#".concat(r,"_summary"))},o.default.prototype._updateAccsOutput=function(){var e=this.canvas.id;JSON.stringify(this.ingredients.shapes)!==this.ingredients.pShapes&&(this.ingredients.pShapes=JSON.stringify(this.ingredients.shapes),this._accessibleOutputs.text&&this._updateTextOutput(e+"textOutput"),this._accessibleOutputs.grid&&this._updateGridOutput(e+"gridOutput"),this._accessibleOutputs.textLabel&&this._updateTextOutput(e+"textOutputLabel"),this._accessibleOutputs.gridLabel&&this._updateGridOutput(e+"gridOutputLabel"))},o.default.prototype._accsBackground=function(e){this.ingredients.pShapes=JSON.stringify(this.ingredients.shapes),this.ingredients.shapes={},this.ingredients.colors.backgroundRGBA!==e&&(this.ingredients.colors.backgroundRGBA=e,this.ingredients.colors.background=this._rgbColorName(e))},o.default.prototype._accsCanvasColors=function(e,t){"fill"===e?this.ingredients.colors.fillRGBA!==t&&(this.ingredients.colors.fillRGBA=t,this.ingredients.colors.fill=this._rgbColorName(t)):"stroke"===e&&this.ingredients.colors.strokeRGBA!==t&&(this.ingredients.colors.strokeRGBA=t,this.ingredients.colors.stroke=this._rgbColorName(t))},o.default.prototype._accsOutput=function(e,t){"ellipse"===e&&t[2]===t[3]?e="circle":"rectangle"===e&&t[2]===t[3]&&(e="square");var r={},n=!0,o=function(e,t){var r,n;return n="rectangle"===e||"ellipse"===e||"arc"===e||"circle"===e||"square"===e?(r=Math.round(t[0]+t[2]/2),Math.round(t[1]+t[3]/2)):"triangle"===e?(r=(t[0]+t[2]+t[4])/3,(t[1]+t[3]+t[5])/3):"quadrilateral"===e?(r=(t[0]+t[2]+t[4]+t[6])/4,(t[1]+t[3]+t[5]+t[7])/4):"line"===e?(r=(t[0]+t[2])/2,(t[1]+t[3])/2):(r=t[0],t[1]),[r,n]}(e,t);if("line"===e){r.color=this.ingredients.colors.stroke,r.length=Math.round(this.dist(t[0],t[1],t[2],t[3]));var s=a([t[0],[1]],this.width,this.height),l=a([t[2],[3]],this.width,this.height);r.loc=i(o,this.width,this.height),r.pos=s===l?"at ".concat(s):"from ".concat(s," to ").concat(l)}else"point"===e?r.color=this.ingredients.colors.stroke:(r.color=this.ingredients.colors.fill,r.area=function(e,t,r,n){var o=0;if("arc"===e){var a=((t[5]-t[4])%(2*Math.PI)+2*Math.PI)%(2*Math.PI);if(o=a*t[2]*t[3]/8,"open"===t[6]||"chord"===t[6]){var i=t[0],s=t[1],l=t[0]+t[2]/2*Math.cos(t[4]).toFixed(2),u=t[1]+t[3]/2*Math.sin(t[4]).toFixed(2),c=t[0]+t[2]/2*Math.cos(t[5]).toFixed(2),d=t[1]+t[3]/2*Math.sin(t[5]).toFixed(2),f=Math.abs(i*(u-d)+l*(d-s)+c*(s-u))/2;a>Math.PI?o+=f:o-=f}}else"ellipse"===e||"circle"===e?o=3.14*t[2]/2*t[3]/2:"line"===e||"point"===e?o=0:"quadrilateral"===e?o=Math.abs((t[6]+t[0])*(t[7]-t[1])+(t[0]+t[2])*(t[1]-t[3])+(t[2]+t[4])*(t[3]-t[5])+(t[4]+t[6])*(t[5]-t[7]))/2:"rectangle"===e||"square"===e?o=t[2]*t[3]:"triangle"===e&&(o=Math.abs(t[0]*(t[3]-t[5])+t[2]*(t[5]-t[1])+t[4]*(t[1]-t[3]))/2);return Math.round(100*o/(r*n))}(e,t,this.width,this.height)),r.pos=a(o,this.width,this.height),r.loc=i(o,this.width,this.height);if(this.ingredients.shapes[e]){if(this.ingredients.shapes[e]!==[r]){for(var u in this.ingredients.shapes[e])JSON.stringify(this.ingredients.shapes[e][u])===JSON.stringify(r)&&(n=!1);!0===n&&this.ingredients.shapes[e].push(r)}}else this.ingredients.shapes[e]=[r]};var s=o.default;r.default=s},{"../core/main":260,"core-js/modules/es.array.concat":148,"core-js/modules/es.array.fill":150,"core-js/modules/es.array.map":159,"core-js/modules/es.number.to-fixed":169}],244:[function(e,t,r){"use strict";e("core-js/modules/es.array.concat"),Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n,o=(n=e("../core/main"))&&n.__esModule?n:{default:n};o.default.prototype._updateTextOutput=function(e){if(this.dummyDOM.querySelector("#".concat(e,"_summary"))){var t=this._accessibleOutputs[e],r=function(e,t){var r="",n=0;for(var o in t)for(var a in t[o]){var i='').concat(t[o][a].color," ").concat(o,"");"line"===o?i+=", ".concat(t[o][a].pos,", ").concat(t[o][a].length," pixels long."):(i+=", at ".concat(t[o][a].pos),"point"!==o&&(i+=", covering ".concat(t[o][a].area,"% of the canvas")),i+="."),r+=i,n++}return{numShapes:n,listShapes:r}}(e,this.ingredients.shapes),n=function(e,t,r,n){var o="Your output is a, ".concat(r," by ").concat(n," pixels, ").concat(t," canvas containing the following");return 1===e?"".concat(o," shape:"):"".concat(o," ").concat(e," shapes:")}(r.numShapes,this.ingredients.colors.background,this.width,this.height),o=function(e,t){var r="",n=0;for(var o in t)for(var a in t[o]){var i='| ').concat(t[o][a].color," ").concat(o," | ");"line"===o?i+="location = ".concat(t[o][a].pos," | length = ").concat(t[o][a].length," pixels |
"):(i+="location = ".concat(t[o][a].pos," | "),"point"!==o&&(i+=" area = ".concat(t[o][a].area,"% | ")),i+=""),r+=i,n++}return r}(e,this.ingredients.shapes);n!==t.summary.innerHTML&&(t.summary.innerHTML=n),r.listShapes!==t.list.innerHTML&&(t.list.innerHTML=r.listShapes),o!==t.shapeDetails.innerHTML&&(t.shapeDetails.innerHTML=o),this._accessibleOutputs[e]=t}};var a=o.default;r.default=a},{"../core/main":260,"core-js/modules/es.array.concat":148}],245:[function(e,t,r){"use strict";var n,o=(n=e("./core/main"))&&n.__esModule?n:{default:n};e("./core/constants"),e("./core/environment"),e("./core/friendly_errors/stacktrace"),e("./core/friendly_errors/validate_params"),e("./core/friendly_errors/file_errors"),e("./core/friendly_errors/fes_core"),e("./core/helpers"),e("./core/legacy"),e("./core/preload"),e("./core/p5.Element"),e("./core/p5.Graphics"),e("./core/p5.Renderer"),e("./core/p5.Renderer2D"),e("./core/rendering"),e("./core/shim"),e("./core/structure"),e("./core/transform"),e("./core/shape/2d_primitives"),e("./core/shape/attributes"),e("./core/shape/curves"),e("./core/shape/vertex"),e("./accessibility/outputs"),e("./accessibility/textOutput"),e("./accessibility/gridOutput"),e("./accessibility/color_namer"),e("./color/color_conversion"),e("./color/creating_reading"),e("./color/p5.Color"),e("./color/setting"),e("./data/p5.TypedDict"),e("./data/local_storage.js"),e("./dom/dom"),e("./accessibility/describe"),e("./events/acceleration"),e("./events/keyboard"),e("./events/mouse"),e("./events/touch"),e("./image/filters"),e("./image/image"),e("./image/loading_displaying"),e("./image/p5.Image"),e("./image/pixels"),e("./io/files"),e("./io/p5.Table"),e("./io/p5.TableRow"),e("./io/p5.XML"),e("./math/calculation"),e("./math/math"),e("./math/noise"),e("./math/p5.Vector"),e("./math/random"),e("./math/trigonometry"),e("./typography/attributes"),e("./typography/loading_displaying"),e("./typography/p5.Font"),e("./utilities/array_functions"),e("./utilities/conversion"),e("./utilities/string_functions"),e("./utilities/time_date"),e("./webgl/3d_primitives"),e("./webgl/interaction"),e("./webgl/light"),e("./webgl/loading"),e("./webgl/material"),e("./webgl/p5.Camera"),e("./webgl/p5.Geometry"),e("./webgl/p5.Matrix"),e("./webgl/p5.RendererGL.Immediate"),e("./webgl/p5.RendererGL"),e("./webgl/p5.RendererGL.Retained"),e("./webgl/p5.Shader"),e("./webgl/p5.RenderBuffer"),e("./webgl/p5.Texture"),e("./webgl/text"),e("./core/init"),t.exports=o.default},{"./accessibility/color_namer":240,"./accessibility/describe":241,"./accessibility/gridOutput":242,"./accessibility/outputs":243,"./accessibility/textOutput":244,"./color/color_conversion":246,"./color/creating_reading":247,"./color/p5.Color":248,"./color/setting":249,"./core/constants":250,"./core/environment":251,"./core/friendly_errors/fes_core":252,"./core/friendly_errors/file_errors":253,"./core/friendly_errors/stacktrace":254,"./core/friendly_errors/validate_params":255,"./core/helpers":256,"./core/init":257,"./core/legacy":259,"./core/main":260,"./core/p5.Element":261,"./core/p5.Graphics":262,"./core/p5.Renderer":263,"./core/p5.Renderer2D":264,"./core/preload":265,"./core/rendering":266,"./core/shape/2d_primitives":267,"./core/shape/attributes":268,"./core/shape/curves":269,"./core/shape/vertex":270,"./core/shim":271,"./core/structure":272,"./core/transform":273,"./data/local_storage.js":274,"./data/p5.TypedDict":275,"./dom/dom":276,"./events/acceleration":277,"./events/keyboard":278,"./events/mouse":279,"./events/touch":280,"./image/filters":281,"./image/image":282,"./image/loading_displaying":283,"./image/p5.Image":284,"./image/pixels":285,"./io/files":286,"./io/p5.Table":287,"./io/p5.TableRow":288,"./io/p5.XML":289,"./math/calculation":290,"./math/math":291,"./math/noise":292,"./math/p5.Vector":293,"./math/random":294,"./math/trigonometry":295,"./typography/attributes":296,"./typography/loading_displaying":297,"./typography/p5.Font":298,"./utilities/array_functions":299,"./utilities/conversion":300,"./utilities/string_functions":301,"./utilities/time_date":302,"./webgl/3d_primitives":303,"./webgl/interaction":304,"./webgl/light":305,"./webgl/loading":306,"./webgl/material":307,"./webgl/p5.Camera":308,"./webgl/p5.Geometry":309,"./webgl/p5.Matrix":310,"./webgl/p5.RenderBuffer":311,"./webgl/p5.RendererGL":314,"./webgl/p5.RendererGL.Immediate":312,"./webgl/p5.RendererGL.Retained":313,"./webgl/p5.Shader":315,"./webgl/p5.Texture":316,"./webgl/text":317}],246:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n,o=(n=e("../core/main"))&&n.__esModule?n:{default:n};o.default.ColorConversion={},o.default.ColorConversion._hsbaToHSLA=function(e){var t=e[0],r=e[1],n=e[2],o=(2-r)*n/2;return 0!=o&&(1==o?r=0:o<.5?r/=2-r:r=r*n/(2-2*o)),[t,r,o,e[3]]},o.default.ColorConversion._hsbaToRGBA=function(e){var t=6*e[0],r=e[1],n=e[2],o=[];if(0===r)o=[n,n,n,e[3]];else{var a,i,s,l=Math.floor(t),u=n*(1-r),c=n*(1-r*(t-l)),d=n*(1-r*(1+l-t));s=1===l?(a=c,i=n,u):2===l?(a=u,i=n,d):3===l?(a=u,i=c,n):4===l?(a=d,i=u,n):5===l?(a=n,i=u,c):(a=n,i=d,u),o=[a,i,s,e[3]]}return o},o.default.ColorConversion._hslaToHSBA=function(e){var t,r=e[0],n=e[1],o=e[2];return[r,n=2*((t=o<.5?(1+n)*o:o+n-o*n)-o)/t,t,e[3]]},o.default.ColorConversion._hslaToRGBA=function(e){var t=6*e[0],r=e[1],n=e[2],o=[];if(0===r)o=[n,n,n,e[3]];else{var a,i=2*n-(a=n<.5?(1+r)*n:n+r-n*r),s=function(e,t,r){return e<0?e+=6:6<=e&&(e-=6),e<1?t+(r-t)*e:e<3?r:e<4?t+(r-t)*(4-e):t};o=[s(2+t,i,a),s(t,i,a),s(t-2,i,a),e[3]]}return o},o.default.ColorConversion._rgbaToHSBA=function(e){var t,r,n=e[0],o=e[1],a=e[2],i=Math.max(n,o,a),s=i-Math.min(n,o,a);return 0==s?r=t=0:(r=s/i,n===i?t=(o-a)/s:o===i?t=2+(a-n)/s:a===i&&(t=4+(n-o)/s),t<0?t+=6:6<=t&&(t-=6)),[t/6,r,i,e[3]]},o.default.ColorConversion._rgbaToHSLA=function(e){var t,r,n=e[0],o=e[1],a=e[2],i=Math.max(n,o,a),s=Math.min(n,o,a),l=i+s,u=i-s;return 0==u?r=t=0:(r=l<1?u/l:u/(2-l),n===i?t=(o-a)/u:o===i?t=2+(a-n)/u:a===i&&(t=4+(n-o)/u),t<0?t+=6:6<=t&&(t-=6)),[t/6,r,l/2,e[3]]};var a=o.default.ColorConversion;r.default=a},{"../core/main":260}],247:[function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}e("core-js/modules/es.array.map"),Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var o,a=(o=e("../core/main"))&&o.__esModule?o:{default:o},i=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==n(e)&&"function"!=typeof e)return{default:e};var t="function"!=typeof WeakMap?null:new WeakMap;if(t&&t.has(e))return t.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var i=o?Object.getOwnPropertyDescriptor(e,a):null;i&&(i.get||i.set)?Object.defineProperty(r,a,i):r[a]=e[a]}return r.default=e,t&&t.set(e,r),r}(e("../core/constants"));e("./p5.Color"),e("../core/friendly_errors/validate_params"),e("../core/friendly_errors/file_errors"),e("../core/friendly_errors/fes_core"),a.default.prototype.alpha=function(e){return a.default._validateParameters("alpha",arguments),this.color(e)._getAlpha()},a.default.prototype.blue=function(e){return a.default._validateParameters("blue",arguments),this.color(e)._getBlue()},a.default.prototype.brightness=function(e){return a.default._validateParameters("brightness",arguments),this.color(e)._getBrightness()},a.default.prototype.color=function(){if(a.default._validateParameters("color",arguments),arguments[0]instanceof a.default.Color)return arguments[0];var e=arguments[0]instanceof Array?arguments[0]:arguments;return new a.default.Color(this,e)},a.default.prototype.green=function(e){return a.default._validateParameters("green",arguments),this.color(e)._getGreen()},a.default.prototype.hue=function(e){return a.default._validateParameters("hue",arguments),this.color(e)._getHue()},a.default.prototype.lerpColor=function(e,t,r){a.default._validateParameters("lerpColor",arguments);var n,o,s,l,u,c,d=this._colorMode,f=this._colorMaxes;if(d===i.RGB)u=e.levels.map((function(e){return e/255})),c=t.levels.map((function(e){return e/255}));else if(d===i.HSB)e._getBrightness(),t._getBrightness(),u=e.hsba,c=t.hsba;else{if(d!==i.HSL)throw new Error("".concat(d,"cannot be used for interpolation."));e._getLightness(),t._getLightness(),u=e.hsla,c=t.hsla}return r=Math.max(Math.min(r,1),0),void 0===this.lerp&&(this.lerp=function(e,t,r){return r*(t-e)+e}),n=this.lerp(u[0],c[0],r),o=this.lerp(u[1],c[1],r),s=this.lerp(u[2],c[2],r),l=this.lerp(u[3],c[3],r),n*=f[d][0],o*=f[d][1],s*=f[d][2],l*=f[d][3],this.color(n,o,s,l)},a.default.prototype.lightness=function(e){return a.default._validateParameters("lightness",arguments),this.color(e)._getLightness()},a.default.prototype.red=function(e){return a.default._validateParameters("red",arguments),this.color(e)._getRed()},a.default.prototype.saturation=function(e){return a.default._validateParameters("saturation",arguments),this.color(e)._getSaturation()};var s=a.default;r.default=s},{"../core/constants":250,"../core/friendly_errors/fes_core":252,"../core/friendly_errors/file_errors":253,"../core/friendly_errors/validate_params":255,"../core/main":260,"./p5.Color":248,"core-js/modules/es.array.map":159}],248:[function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}e("core-js/modules/es.array.join"),e("core-js/modules/es.array.map"),e("core-js/modules/es.array.slice"),e("core-js/modules/es.object.to-string"),e("core-js/modules/es.regexp.constructor"),e("core-js/modules/es.regexp.exec"),e("core-js/modules/es.regexp.to-string"),e("core-js/modules/es.string.trim"),Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var o=s(e("../core/main")),a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==n(e)&&"function"!=typeof e)return{default:e};var t="function"!=typeof WeakMap?null:new WeakMap;if(t&&t.has(e))return t.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var i=o?Object.getOwnPropertyDescriptor(e,a):null;i&&(i.get||i.set)?Object.defineProperty(r,a,i):r[a]=e[a]}return r.default=e,t&&t.set(e,r),r}(e("../core/constants")),i=s(e("./color_conversion"));function s(e){return e&&e.__esModule?e:{default:e}}o.default.Color=function(e,t){if(this._storeModeAndMaxes(e._colorMode,e._colorMaxes),this.mode!==a.RGB&&this.mode!==a.HSL&&this.mode!==a.HSB)throw new Error("".concat(this.mode," is an invalid colorMode."));return this._array=o.default.Color._parseInputs.apply(this,t),this._calculateLevels(),this},o.default.Color.prototype.toString=function(e){var t=this.levels,r=this._array,n=r[3];switch(e){case"#rrggbb":return"#".concat(t[0]<16?"0".concat(t[0].toString(16)):t[0].toString(16),t[1]<16?"0".concat(t[1].toString(16)):t[1].toString(16),t[2]<16?"0".concat(t[2].toString(16)):t[2].toString(16));case"#rrggbbaa":return"#".concat(t[0]<16?"0".concat(t[0].toString(16)):t[0].toString(16),t[1]<16?"0".concat(t[1].toString(16)):t[1].toString(16),t[2]<16?"0".concat(t[2].toString(16)):t[2].toString(16),t[3]<16?"0".concat(t[3].toString(16)):t[3].toString(16));case"#rgb":return"#".concat(Math.round(15*r[0]).toString(16),Math.round(15*r[1]).toString(16),Math.round(15*r[2]).toString(16));case"#rgba":return"#".concat(Math.round(15*r[0]).toString(16),Math.round(15*r[1]).toString(16),Math.round(15*r[2]).toString(16),Math.round(15*r[3]).toString(16));case"rgb":return"rgb(".concat(t[0],", ",t[1],", ",t[2],")");case"rgb%":return"rgb(".concat((100*r[0]).toPrecision(3),"%, ",(100*r[1]).toPrecision(3),"%, ",(100*r[2]).toPrecision(3),"%)");case"rgba%":return"rgba(".concat((100*r[0]).toPrecision(3),"%, ",(100*r[1]).toPrecision(3),"%, ",(100*r[2]).toPrecision(3),"%, ",(100*r[3]).toPrecision(3),"%)");case"hsb":case"hsv":return this.hsba||(this.hsba=i.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=i.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=i.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=i.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=i.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=i.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=i.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=i.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(t[0],",",t[1],",",t[2],",",n,")")}},o.default.Color.prototype.setRed=function(e){this._array[0]=e/this.maxes[a.RGB][0],this._calculateLevels()},o.default.Color.prototype.setGreen=function(e){this._array[1]=e/this.maxes[a.RGB][1],this._calculateLevels()},o.default.Color.prototype.setBlue=function(e){this._array[2]=e/this.maxes[a.RGB][2],this._calculateLevels()},o.default.Color.prototype.setAlpha=function(e){this._array[3]=e/this.maxes[this.mode][3],this._calculateLevels()},o.default.Color.prototype._calculateLevels=function(){for(var e=this._array,t=this.levels=new Array(e.length),r=e.length-1;0<=r;--r)t[r]=Math.round(255*e[r])},o.default.Color.prototype._getAlpha=function(){return this._array[3]*this.maxes[this.mode][3]},o.default.Color.prototype._storeModeAndMaxes=function(e,t){this.mode=e,this.maxes=t},o.default.Color.prototype._getMode=function(){return this.mode},o.default.Color.prototype._getMaxes=function(){return this.maxes},o.default.Color.prototype._getBlue=function(){return this._array[2]*this.maxes[a.RGB][2]},o.default.Color.prototype._getBrightness=function(){return this.hsba||(this.hsba=i.default._rgbaToHSBA(this._array)),this.hsba[2]*this.maxes[a.HSB][2]},o.default.Color.prototype._getGreen=function(){return this._array[1]*this.maxes[a.RGB][1]},o.default.Color.prototype._getHue=function(){return this.mode===a.HSB?(this.hsba||(this.hsba=i.default._rgbaToHSBA(this._array)),this.hsba[0]*this.maxes[a.HSB][0]):(this.hsla||(this.hsla=i.default._rgbaToHSLA(this._array)),this.hsla[0]*this.maxes[a.HSL][0])},o.default.Color.prototype._getLightness=function(){return this.hsla||(this.hsla=i.default._rgbaToHSLA(this._array)),this.hsla[2]*this.maxes[a.HSL][2]},o.default.Color.prototype._getRed=function(){return this._array[0]*this.maxes[a.RGB][0]},o.default.Color.prototype._getSaturation=function(){return this.mode===a.HSB?(this.hsba||(this.hsba=i.default._rgbaToHSBA(this._array)),this.hsba[1]*this.maxes[a.HSB][1]):(this.hsla||(this.hsla=i.default._rgbaToHSLA(this._array)),this.hsla[1]*this.maxes[a.HSL][1])};var l={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",salmon:"#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"},u=/\s*/,c=/(\d{1,3})/,d=/((?:\d+(?:\.\d+)?)|(?:\.\d+))/,f=new RegExp("".concat(d.source,"%")),h={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:new RegExp(["^rgb\\(",c.source,",",c.source,",",c.source,"\\)$"].join(u.source),"i"),RGB_PERCENT:new RegExp(["^rgb\\(",f.source,",",f.source,",",f.source,"\\)$"].join(u.source),"i"),RGBA:new RegExp(["^rgba\\(",c.source,",",c.source,",",c.source,",",d.source,"\\)$"].join(u.source),"i"),RGBA_PERCENT:new RegExp(["^rgba\\(",f.source,",",f.source,",",f.source,",",d.source,"\\)$"].join(u.source),"i"),HSL:new RegExp(["^hsl\\(",c.source,",",f.source,",",f.source,"\\)$"].join(u.source),"i"),HSLA:new RegExp(["^hsla\\(",c.source,",",f.source,",",f.source,",",d.source,"\\)$"].join(u.source),"i"),HSB:new RegExp(["^hsb\\(",c.source,",",f.source,",",f.source,"\\)$"].join(u.source),"i"),HSBA:new RegExp(["^hsba\\(",c.source,",",f.source,",",f.source,",",d.source,"\\)$"].join(u.source),"i")};o.default.Color._parseInputs=function(e,t,r,n){var s,u=arguments.length,c=this.mode,d=this.maxes[c],f=[];if(3<=u){for(f[0]=e/d[0],f[1]=t/d[1],f[2]=r/d[2],f[3]="number"==typeof n?n/d[3]:1,s=f.length-1;0<=s;--s){var p=f[s];p<0?f[s]=0:1"].indexOf(o[0])?void 0:o[0],lineNumber:o[1],columnNumber:o[2],source:e}}),this)},parseFFOrSafari:function(e){return e.stack.split("\n").filter((function(e){return!e.match(r)}),this).map((function(e){if(-1 eval")&&(e=e.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),-1===e.indexOf("@")&&-1===e.indexOf(":"))return{functionName:e};var t=/((.*".+"[^@]*)?[^@]*)(?:@)/,r=e.match(t),n=r&&r[1]?r[1]:void 0,o=this.extractLocation(e.replace(t,""));return{functionName:n,fileName:o[0],lineNumber:o[1],columnNumber:o[2],source:e}}),this)},parseOpera:function(e){return!e.stacktrace||-1e.stacktrace.split("\n").length?this.parseOpera9(e):e.stack?this.parseOpera11(e):this.parseOpera10(e)},parseOpera9:function(e){for(var t=/Line (\d+).*script (?:in )?(\S+)/i,r=e.message.split("\n"),n=[],o=2,a=r.length;o/,"$2").replace(/\([^)]*\)/g,"")||void 0;return o.match(/\(([^)]*)\)/)&&(t=o.replace(/^[^(]+\(([^)]*)\)$/,"$1")),{functionName:a,args:void 0===t||"[arguments not available]"===t?void 0:t.split(","),fileName:n[0],lineNumber:n[1],columnNumber:n[2],source:e}}),this)}}}o.default._getErrorStackParser=function(){return new a};var i=o.default;r.default=i},{"../main":260,"core-js/modules/es.array.filter":151,"core-js/modules/es.array.index-of":155,"core-js/modules/es.array.join":157,"core-js/modules/es.array.map":159,"core-js/modules/es.array.slice":160,"core-js/modules/es.regexp.exec":178,"core-js/modules/es.string.match":184,"core-js/modules/es.string.replace":186,"core-js/modules/es.string.split":188}],255:[function(e,t,r){"use strict";e("core-js/modules/es.symbol"),e("core-js/modules/es.symbol.description"),e("core-js/modules/es.symbol.iterator"),e("core-js/modules/es.array.concat"),e("core-js/modules/es.array.for-each"),e("core-js/modules/es.array.includes"),e("core-js/modules/es.array.index-of"),e("core-js/modules/es.array.iterator"),e("core-js/modules/es.array.join"),e("core-js/modules/es.array.last-index-of"),e("core-js/modules/es.array.map"),e("core-js/modules/es.array.slice"),e("core-js/modules/es.function.name"),e("core-js/modules/es.map"),e("core-js/modules/es.number.constructor"),e("core-js/modules/es.object.get-prototype-of"),e("core-js/modules/es.object.keys"),e("core-js/modules/es.object.to-string"),e("core-js/modules/es.reflect.construct"),e("core-js/modules/es.regexp.exec"),e("core-js/modules/es.regexp.to-string"),e("core-js/modules/es.set"),e("core-js/modules/es.string.includes"),e("core-js/modules/es.string.iterator"),e("core-js/modules/es.string.split"),e("core-js/modules/web.dom-collections.for-each"),e("core-js/modules/web.dom-collections.iterator"),Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n,o=(n=e("../main"))&&n.__esModule?n:{default:n};(function(e){if(!(e&&e.__esModule||null===e||"object"!==function(e){return("function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}(e)&&"function"!=typeof e)){var t="function"!=typeof WeakMap?null:new WeakMap;if(t&&t.has(e))return t.get(e);var r={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var a=n?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(r,o,a):r[o]=e[o]}r.default=e,t&&t.set(e,r)}})(e("../constants")),e("../internationalization"),o.default._validateParameters=o.default._clearValidateParamsCache=function(){};var a=o.default;r.default=a},{"../../../docs/parameterData.json":void 0,"../constants":250,"../internationalization":258,"../main":260,"core-js/modules/es.array.concat":148,"core-js/modules/es.array.for-each":152,"core-js/modules/es.array.includes":154,"core-js/modules/es.array.index-of":155,"core-js/modules/es.array.iterator":156,"core-js/modules/es.array.join":157,"core-js/modules/es.array.last-index-of":158,"core-js/modules/es.array.map":159,"core-js/modules/es.array.slice":160,"core-js/modules/es.function.name":163,"core-js/modules/es.map":164,"core-js/modules/es.number.constructor":167,"core-js/modules/es.object.get-prototype-of":172,"core-js/modules/es.object.keys":173,"core-js/modules/es.object.to-string":174,"core-js/modules/es.reflect.construct":176,"core-js/modules/es.regexp.exec":178,"core-js/modules/es.regexp.to-string":179,"core-js/modules/es.set":180,"core-js/modules/es.string.includes":182,"core-js/modules/es.string.iterator":183,"core-js/modules/es.string.split":188,"core-js/modules/es.symbol":193,"core-js/modules/es.symbol.description":191,"core-js/modules/es.symbol.iterator":192,"core-js/modules/web.dom-collections.for-each":225,"core-js/modules/web.dom-collections.iterator":226}],256:[function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==n(e)&&"function"!=typeof e)return{default:e};var t="function"!=typeof WeakMap?null:new WeakMap;if(t&&t.has(e))return t.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var i=o?Object.getOwnPropertyDescriptor(e,a):null;i&&(i.get||i.set)?Object.defineProperty(r,a,i):r[a]=e[a]}return r.default=e,t&&t.set(e,r),r}(e("./constants")),a={modeAdjust:function(e,t,r,n,a){return a===o.CORNER?{x:e,y:t,w:r,h:n}:a===o.CORNERS?{x:e,y:t,w:r-e,h:n-t}:a===o.RADIUS?{x:e-r,y:t-n,w:2*r,h:2*n}:a===o.CENTER?{x:e-.5*r,y:t-.5*n,w:r,h:n}:void 0}};r.default=a},{"./constants":250}],257:[function(e,t,r){"use strict";e("core-js/modules/es.array.iterator"),e("core-js/modules/es.object.to-string"),e("core-js/modules/es.promise"),e("core-js/modules/es.string.iterator"),e("core-js/modules/web.dom-collections.iterator");var n,o=(n=e("../core/main"))&&n.__esModule?n:{default:n};e("./internationalization");var a=Promise.resolve();Promise.all([new Promise((function(e,t){"complete"===document.readyState?e():window.addEventListener("load",e,!1)})),a]).then((function(){void 0===window._setupDone?window.mocha||(window.setup&&"function"==typeof window.setup||window.draw&&"function"==typeof window.draw)&&!o.default.instance&&new o.default:console.warn("p5.js seems to have been imported multiple times. Please remove the duplicate import")}))},{"../core/main":260,"./internationalization":258,"core-js/modules/es.array.iterator":156,"core-js/modules/es.object.to-string":174,"core-js/modules/es.promise":175,"core-js/modules/es.string.iterator":183,"core-js/modules/web.dom-collections.iterator":226}],258:[function(e,t,r){"use strict";e("core-js/modules/es.array.includes"),e("core-js/modules/es.array.iterator"),e("core-js/modules/es.array.join"),e("core-js/modules/es.array.slice"),e("core-js/modules/es.object.keys"),e("core-js/modules/es.object.to-string"),e("core-js/modules/es.promise"),e("core-js/modules/es.regexp.exec"),e("core-js/modules/es.string.includes"),e("core-js/modules/es.string.iterator"),e("core-js/modules/es.string.split"),e("core-js/modules/web.dom-collections.iterator"),Object.defineProperty(r,"__esModule",{value:!0}),r.initialize=r.translator=void 0;var n,o=i(e("i18next")),a=i(e("i18next-browser-languagedetector"));function i(e){return e&&e.__esModule?e:{default:e}}function s(e,t){for(var r=0;r=s.width||t>=s.height?[0,0,0,0]:this._getPixel(e,t);var l=new o.default.Image(r,n);return l.canvas.getContext("2d").drawImage(s,e,t,r*i,n*i,0,0,r,n),l},o.default.Renderer.prototype.textLeading=function(e){return"number"==typeof e?(this._setProperty("_textLeading",e),this._pInst):this._textLeading},o.default.Renderer.prototype.textSize=function(e){return"number"==typeof e?(this._setProperty("_textSize",e),this._setProperty("_textLeading",e*a._DEFAULT_LEADMULT),this._applyTextProperties()):this._textSize},o.default.Renderer.prototype.textStyle=function(e){return e?(e!==a.NORMAL&&e!==a.ITALIC&&e!==a.BOLD&&e!==a.BOLDITALIC||this._setProperty("_textStyle",e),this._applyTextProperties()):this._textStyle},o.default.Renderer.prototype.textAscent=function(){return null===this._textAscent&&this._updateTextMetrics(),this._textAscent},o.default.Renderer.prototype.textDescent=function(){return null===this._textDescent&&this._updateTextMetrics(),this._textDescent},o.default.Renderer.prototype.textAlign=function(e,t){return void 0!==e?(this._setProperty("_textAlign",e),void 0!==t&&this._setProperty("_textBaseline",t),this._applyTextProperties()):{horizontal:this._textAlign,vertical:this._textBaseline}},o.default.Renderer.prototype.text=function(e,t,r,n,o){var i,s,l,u,c,d,f,h,p,m,y=this._pInst,g=Number.MAX_VALUE;if((this._doFill||this._doStroke)&&void 0!==e){if("string"!=typeof e&&(e=e.toString()),i=(e=e.replace(/(\t)/g," ")).split("\n"),void 0!==n){for(f=1,l=p=0;la.HALF_PI&&e<=3*a.HALF_PI?Math.atan(r/n*Math.tan(e))+a.PI:Math.atan(r/n*Math.tan(e))+a.TWO_PI,t=t<=a.HALF_PI?Math.atan(r/n*Math.tan(t)):t>a.HALF_PI&&t<=3*a.HALF_PI?Math.atan(r/n*Math.tan(t))+a.PI:Math.atan(r/n*Math.tan(t))+a.TWO_PI),th||Math.abs(this.accelerationY-this.pAccelerationY)>h||Math.abs(this.accelerationZ-this.pAccelerationZ)>h)&&r.deviceMoved(),"function"==typeof r.deviceTurned){var n=this.rotationX+180,o=this.pRotationX+180,a=s+180;0>>16,e[r+1]=(65280&t[n])>>>8,e[r+2]=255&t[n],e[r+3]=(4278190080&t[n])>>>24},_toImageData:function(e){return e instanceof ImageData?e:e.getContext("2d").getImageData(0,0,e.width,e.height)},_createImageData:function(e,t){return s._tmpCanvas=document.createElement("canvas"),s._tmpCtx=s._tmpCanvas.getContext("2d"),this._tmpCtx.createImageData(e,t)},apply:function(e,t,r){var n=e.getContext("2d"),o=n.getImageData(0,0,e.width,e.height),a=t(o,r);a instanceof ImageData?n.putImageData(a,0,0,0,0,e.width,e.height):n.putImageData(o,0,0,0,0,e.width,e.height)},threshold:function(e,t){var r=s._toPixels(e);void 0===t&&(t=.5);for(var n=Math.floor(255*t),o=0;o>8)/n,r[o+1]=255*(i*t>>8)/n,r[o+2]=255*(l*t>>8)/n}},dilate:function(e){for(var t,r,n,o,a,i,l,u,c,d,f,h,p,m,y,g,v,b=s._toPixels(e),x=0,_=b.length?b.length/4:0,w=new Int32Array(_);x<_;)for(r=(t=x)+e.width;x>16&255)+151*(n>>8&255)+28*(255&n))<(y=77*(f>>16&255)+151*(f>>8&255)+28*(255&f))&&(o=f,a=y),a<(m=77*((d=s._getARGB(b,i))>>16&255)+151*(d>>8&255)+28*(255&d))&&(o=d,a=m),a<(g=77*(h>>16&255)+151*(h>>8&255)+28*(255&h))&&(o=h,a=g),a<(v=77*(p>>16&255)+151*(p>>8&255)+28*(255&p))&&(o=p,a=v),w[x++]=o;s._setPixels(b,w)},erode:function(e){for(var t,r,n,o,a,i,l,u,c,d,f,h,p,m,y,g,v,b=s._toPixels(e),x=0,_=b.length?b.length/4:0,w=new Int32Array(_);x<_;)for(r=(t=x)+e.width;x>16&255)+151*(f>>8&255)+28*(255&f))<(a=77*(n>>16&255)+151*(n>>8&255)+28*(255&n))&&(o=f,a=y),(m=77*((d=s._getARGB(b,i))>>16&255)+151*(d>>8&255)+28*(255&d))>16&255)+151*(h>>8&255)+28*(255&h))>16&255)+151*(p>>8&255)+28*(255&p))>>24],l+=M[(16711680&L)>>16],u+=M[(65280&L)>>8],c+=M[255&L],r+=a[E],f++}k[h=P+S]=d/r,T[h]=l/r,C[h]=u/r,O[h]=c/r}P+=v}for(m=(p=-n)*v,j=P=0;j=n){var o=Math.floor(t.timeDisplayed/n);if(t.timeDisplayed=0,t.lastChangeTime=r,t.displayIndex+=o,t.loopCount=Math.floor(t.displayIndex/t.numFrames),null!==t.loopLimit&&t.loopCount>=t.loopLimit)t.playing=!1;else{var a=t.displayIndex%t.numFrames;this.drawingContext.putImageData(t.frames[a].image,0,0),t.displayIndex=a,this.setModified(!0)}}}},n.default.Image.prototype._setProperty=function(e,t){this[e]=t,this.setModified(!0)},n.default.Image.prototype.loadPixels=function(){n.default.Renderer2D.prototype.loadPixels.call(this),this.setModified(!0)},n.default.Image.prototype.updatePixels=function(e,t,r,o){n.default.Renderer2D.prototype.updatePixels.call(this,e,t,r,o),this.setModified(!0)},n.default.Image.prototype.get=function(e,t,r,o){return n.default._validateParameters("p5.Image.get",arguments),n.default.Renderer2D.prototype.get.apply(this,arguments)},n.default.Image.prototype._getPixel=n.default.Renderer2D.prototype._getPixel,n.default.Image.prototype.set=function(e,t,r){n.default.Renderer2D.prototype.set.call(this,e,t,r),this.setModified(!0)},n.default.Image.prototype.resize=function(e,t){0===e&&0===t?(e=this.canvas.width,t=this.canvas.height):0===e?e=this.canvas.width*t/this.canvas.height:0===t&&(t=this.canvas.height*e/this.canvas.width),e=Math.floor(e),t=Math.floor(t);var r=document.createElement("canvas");if(r.width=e,r.height=t,this.gifProperties)for(var n=this.gifProperties,o=function(e,t){for(var r=0,n=0;n/g,">").replace(/"/g,""").replace(/'/g,"'")}function c(e,t){t&&!0!==t&&"true"!==t||(t="");var r="";return(e=e||"untitled")&&e.includes(".")&&(r=e.split(".").pop()),t&&r!==t&&(r=t,e="".concat(e,".").concat(r)),[e,r]}e("../core/friendly_errors/validate_params"),e("../core/friendly_errors/file_errors"),e("../core/friendly_errors/fes_core"),n.default.prototype.loadJSON=function(){for(var e=arguments.length,t=new Array(e),r=0;r"),a.print(""),a.print(' '),a.print(""),a.print(""),a.print(" "),"0"!==i[0]){a.print(" ");for(var f=0;f".concat(h)),a.print(" ")}a.print("
")}for(var p=0;p");for(var m=0;m".concat(y)),a.print(" ")}a.print(" ")}a.print("
"),a.print(""),a.print("