diff --git a/gather-snippets/interpret/langs/md/index.js b/gather-snippets/interpret/langs/md/index.js index 74afe09..d75cc67 100644 --- a/gather-snippets/interpret/langs/md/index.js +++ b/gather-snippets/interpret/langs/md/index.js @@ -56,16 +56,8 @@ export const md = ({ title, text }) => { }); } - const tags = staticLabels({ - text, - label: 'tags', - begin: /(\(|)/gi, - }); - const newppet = { forelinks: Array.from(forelinks).sort(), - tags, text: toMarkdown(mdAST), ...parsedFrontmatter, }; diff --git a/public/bundle/min.js b/public/bundle/min.js index 1e0c273..0136b19 100644 --- a/public/bundle/min.js +++ b/public/bundle/min.js @@ -1,7 +1,7 @@ -var yn=Object.defineProperty;var Ce=(b,w)=>()=>(b&&(w=b(b=0)),w);var wn=(b,w)=>{for(var p in w)yn(b,p,{get:w[p],enumerable:!0})};var Ve,It=Ce(()=>{Ve=class{#e;constructor(w=[]){this.#e=w}get stack(){return this.#e.map(w=>({...w}))}pushScope(w={}){return this.#e.push(w),{...w}}popScope(){if(this.#e.length===0)throw new RangeError("cannot pop scope from an empty stack");return{...this.#e.pop()}}#t(w=""){let p=[...this.#e].reverse().find(g=>w in g);if(p)return JSON.parse(JSON.stringify(p[w]))}read(w=""){if(this.#e.length===0)throw new RangeError("cannot read from an empty scope stack");return this.#t(w)}write(w="",p){if(this.#e.length===0)throw new RangeError("cannot write to an empty scope stack");return JSON.parse(JSON.stringify(this.#e[this.#e.length-1][w]=p))}}});var De,tt=Ce(()=>{De={";":()=>{},"+":(...b)=>b.reduce((w,p)=>w+p),"-":(...b)=>b.length===1?-b[0]:b.reduce((w,p)=>w-p),"*":(...b)=>b.reduce((w,p)=>w*p),"/":(...b)=>b.reduce((w,p)=>w/p),"=":(...b)=>b.slice(1).map((w,p)=>b[p]===w).every(w=>w),">":(...b)=>b.slice(1).map((w,p)=>b[p]>w).every(w=>w),"<":(...b)=>b.slice(1).map((w,p)=>b[p]w),">=":(...b)=>b.slice(1).map((w,p)=>b[p]>=w).every(w=>w),"<=":(...b)=>b.slice(1).map((w,p)=>b[p]<=w).every(w=>w),and:(...b)=>!!b.reduce((w,p)=>w&&p),or:(...b)=>!!b.reduce((w,p)=>w||p),not:(...b)=>!b[0],log:(...b)=>(console.log(...b),b.pop()),prompt:b=>prompt(b),alert:b=>alert(b),confirm:b=>confirm(b),assert:(b,w)=>{if(!b)throw new Error(w||`Assertion Error: ${b}`)}}});var ye,Nt=Ce(()=>{tt();ye={if:"if",cond:"cond",else:"else",define:"define",comment:";",commentProgram:";;",pipeLog:"*log",debug:"*debug",list:"list",...Object.keys(De).reduce((b,w)=>({...b,[w]:De[w]}),{})}});var Ft={};wn(Ft,{evaluate:()=>$e});var $e,Bt=Ce(()=>{It();tt();Nt();$e=(b,{env:w=Object.assign({},De),scopes:p=new Ve([{}])}={})=>{let g;try{if(Array.isArray(b)){let e=!1;if(b[0]===ye.pipeLog&&(e=!0,b.shift()),typeof b[0]=="string"&&b[0].startsWith(ye.commentProgram))return;if(b=b.filter(i=>typeof i=="string"?!i.startsWith(ye.comment):!0).filter(i=>i!==void 0),b[0]==="list")return b;if(b[0]===ye.if){let[i,n,r,l]=b;g=$e(n,{env:w,scopes:p})?$e(r,{env:w,scopes:p}):$e(l,{env:w,scopes:p})}else if(b[0]===ye.cond){let[i,...n]=b;for(let[r,l]of n){if(r==="else")return $e(l,{env:w,scopes:p});if($e(r,{env:w,scopes:p}))return $e(l,{env:w,scopes:p})}return}else if(b[0]===ye.define){if(Object.values(ye).includes(b[1]))throw new SyntaxError(`"${b[0]}" is reserved, you can't use it as a variable`);if(Array.isArray(b[1])){let[i,[n,...r],l]=b,h={params:r,body:l};p.write(n,h),g=n}else{let[i,n,r]=b,l=$e(r,{env:w,scopes:p});p.write(n,l),g=l}}else if(p.read(b[0])!==void 0){let i=p.read(b[0]);if(Object(i)===i){let[n,...r]=b,{params:l,body:h}=i,a=[...l.map((S,t)=>["define",S,r[t]]),h];p.pushScope({}),g=$e(a,{env:w,scopes:p}),p.popScope()}else g=i}else if(b[0]in w&&typeof w[b[0]]!="function")g=w[b[0]];else{let i=b.map(n=>$e(n,{env:w,scopes:p})).filter(n=>n!==void 0);if(typeof i[0]=="function"){let[n,...r]=i;g=n(...r)}else g=i[i.length-1]}e&&console.log(g)}else if(typeof b=="string"&&b.startsWith(ye.comment))g=void 0;else if(typeof b=="string"&&p.read(b)!==void 0)g=p.read(b);else if(typeof b=="string"&&b in w)g=w[b];else if(typeof b=="string"||typeof b=="number"||typeof b=="boolean"||b===null)g=b;else{if(b===void 0)return;throw new Error("Invalid program.")}}catch(e){throw{error:e.error||e,program:b,stack:p.stack}}return g}});var mi={};var tn=Ce(()=>{(function(){"use strict";var b=b||{};b.scope={},b.ASSUME_ES5=!1,b.ASSUME_NO_NATIVE_MAP=!1,b.ASSUME_NO_NATIVE_SET=!1,b.SIMPLE_FROUND_POLYFILL=!1,b.ISOLATE_POLYFILLS=!1,b.FORCE_POLYFILL_PROMISE=!1,b.FORCE_POLYFILL_PROMISE_WHEN_NO_UNHANDLED_REJECTION=!1,b.defineProperty=b.ASSUME_ES5||typeof Object.defineProperties=="function"?Object.defineProperty:function(p,g,e){return p==Array.prototype||p==Object.prototype||(p[g]=e.value),p},b.getGlobal=function(p){p=[typeof globalThis=="object"&&globalThis,p,typeof window=="object"&&window,typeof self=="object"&&self,typeof global=="object"&&global];for(var g=0;ge&&(e=Math.max(e+n,0));e{Sk.abstr.setUpSlots(i),Sk.abstr.setUpMethods(i),Sk.abstr.setUpGetSets(i),Sk.abstr.setUpClassMethods(i)}),e(19),e(20),e(21),[Sk.builtin.str,Sk.builtin.none,Sk.builtin.NotImplemented,Sk.builtin.object].forEach(i=>{i=i.prototype,i.__doc__=i.hasOwnProperty("tp$doc")?new Sk.builtin.str(i.tp$doc):Sk.builtin.none.none$}),e(22),e(23),e(24),e(25),e(26),e(27),e(28),e(29),e(31),e(32),e(33),e(34),e(35),e(36),e(37),e(38),e(39),e(40),e(41),e(42),e(43),e(44),e(45),e(46),e(47),e(48),e(49),e(50),e(51),e(52),e(53),e(66),e(54),e(55),e(56),e(57),e(58),e(59),e(60),e(61),e(62),e(63),e(64),e(65)},function(p,g,e){(function(i){var n={build:{githash:"41334b9bc0f020b876f81d7426b97aba2f3d79de",date:"2024-04-30T00:34:54.034Z"}};n.global=typeof i<"u"?i:typeof self<"u"?self:typeof window<"u"?window:{},n.exportSymbol=function(r,l){r=r.split(".");var h=n.global,a;for(a=0;aR.getHours()?H.am:H.pm;break;case 82:Y+=f(H.formats.R,R,H,ee);break;case 83:Y+=i(R.getSeconds(),k);break;case 84:Y+=f(H.formats.T,R,H,ee);break;case 85:Y+=i(l(R,"sunday"),k);break;case 87:Y+=i(l(R,"monday"),k);break;case 88:Y+=f(H.formats.X,R,H,ee);break;case 89:Y+=R.getFullYear();break;case 90:_&&m===0?Y+="GMT":(k=R,k=(k=k.toString().match(/\(([\w\s]+)\)/))&&k[1],Y+=k||"");break;case 97:Y+=H.shortDays[R.getDay()];break;case 98:Y+=H.shortMonths[R.getMonth()];break;case 99:Y+=f(H.formats.c,R,H,ee);break;case 100:Y+=i(R.getDate(),k);break;case 101:Y+=i(R.getDate(),k??" ");break;case 104:Y+=H.shortMonths[R.getMonth()];break;case 106:k=new Date(R.getFullYear(),0,1),k=Math.ceil((R.getTime()-k.getTime())/864e5),Y+=n(k);break;case 107:Y+=i(R.getHours(),k??" ");break;case 108:Y+=i(r(R.getHours()),k??" ");break;case 109:Y+=i(R.getMonth()+1,k);break;case 110:Y+=` -`;break;case 111:k=R.getDate(),Y=H.ordinalSuffixes?Y+(String(k)+(H.ordinalSuffixes[k-1]||h(k))):Y+(String(k)+h(k));break;case 112:Y+=12>R.getHours()?H.AM:H.PM;break;case 114:Y+=f(H.formats.r,R,H,ee);break;case 115:Y+=Math.floor(ee/1e3);break;case 116:Y+=" ";break;case 117:k=R.getDay(),Y+=k===0?7:k;break;case 118:Y+=f(H.formats.v,R,H,ee);break;case 119:Y+=R.getDay();break;case 120:Y+=f(H.formats.x,R,H,ee);break;case 121:Y+=(""+R.getFullYear()).slice(2);break;case 122:_&&m===0?Y+=F?"+00:00":"+0000":(k=m!==0?m/6e4:-R.getTimezoneOffset(),x=F?":":"",L=Math.abs(k%60),Y+=(0>k?"-":"+")+i(Math.floor(Math.abs(k/60)))+x+i(L));break;default:x&&(Y+="%"),Y+=M[P]}k=null,x=!1}else L===37?x=!0:Y+=M[P]}return Y}var $=o||t,m=d||0,_=u||!1,v=0,A,N=function(M,R){if(R){var H=R.getTime();if(_){var ee=6e4*(R.getTimezoneOffset()||0);R=new Date(H+ee+m),6e4*(R.getTimezoneOffset()||0)!==ee&&(R=6e4*(R.getTimezoneOffset()||0),R=new Date(H+R+m))}}else H=Date.now(),H>v?(v=H,A=new Date(v),H=v,_&&(A=new Date(v+6e4*(A.getTimezoneOffset()||0)+m))):H=v,R=A;return f(M,R,$,H)};return N.localize=function(M){return new e(M||$,m,_)},N.localizeByIdentifier=function(M){var R=S[M];return R?N.localize(R):(a('[WARNING] No locale found with identifier "'+M+'".'),N)},N.timezone=function(M){var R=m,H=_,ee=typeof M;return(ee==="number"||ee==="string")&&(H=!0,ee==="string"?(R=M[0]==="-"?-1:1,ee=parseInt(M.slice(1,3),10),M=parseInt(M.slice(3,5),10),R=R*(60*ee+M)*6e4):ee==="number"&&(R=6e4*M)),new e($,R,H)},N.utc=function(){return new e($,m,!0)},N}function i(o,d){return d===""||9=o||d===0||4<=d)return"th";switch(d){case 1:return"st";case 2:return"nd";case 3:return"rd"}}function a(o){typeof console<"u"&&typeof console.warn=="function"&&console.warn(o)}var S={de_DE:{identifier:"de-DE",days:"Sonntag Montag Dienstag Mittwoch Donnerstag Freitag Samstag".split(" "),shortDays:"So Mo Di Mi Do Fr Sa".split(" "),months:"Januar Februar M\xE4rz April Mai Juni Juli August September Oktober November Dezember".split(" "),shortMonths:"Jan Feb M\xE4r Apr Mai Jun Jul Aug Sep Okt Nov Dez".split(" "),AM:"AM",PM:"PM",am:"am",pm:"pm",formats:{c:"%a %d %b %Y %X %Z",D:"%d.%m.%Y",F:"%Y-%m-%d",R:"%H:%M",r:"%I:%M:%S %p",T:"%H:%M:%S",v:"%e-%b-%Y",X:"%T",x:"%D"}},en_CA:{identifier:"en-CA",days:"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),shortDays:"Sun Mon Tue Wed Thu Fri Sat".split(" "),months:"January February March April May June July August September October November December".split(" "),shortMonths:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),ordinalSuffixes:"st nd rd th th th th th th th th th th th th th th th th th st nd rd th th th th th th th st".split(" "),AM:"AM",PM:"PM",am:"am",pm:"pm",formats:{c:"%a %d %b %Y %X %Z",D:"%d/%m/%y",F:"%Y-%m-%d",R:"%H:%M",r:"%I:%M:%S %p",T:"%H:%M:%S",v:"%e-%b-%Y",X:"%r",x:"%D"}},en_US:{identifier:"en-US",days:"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),shortDays:"Sun Mon Tue Wed Thu Fri Sat".split(" "),months:"January February March April May June July August September October November December".split(" "),shortMonths:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),ordinalSuffixes:"st nd rd th th th th th th th th th th th th th th th th th st nd rd th th th th th th th st".split(" "),AM:"AM",PM:"PM",am:"am",pm:"pm",formats:{c:"%a %d %b %Y %X %Z",D:"%m/%d/%y",F:"%Y-%m-%d",R:"%H:%M",r:"%I:%M:%S %p",T:"%H:%M:%S",v:"%e-%b-%Y",X:"%r",x:"%D"}},es_MX:{identifier:"es-MX",days:"domingo lunes martes mi\xE9rcoles jueves viernes s\xE1bado".split(" "),shortDays:"dom lun mar mi\xE9 jue vie s\xE1b".split(" "),months:"enero;febrero;marzo;abril;mayo;junio;julio;agosto;septiembre;octubre;noviembre; diciembre".split(";"),shortMonths:"ene feb mar abr may jun jul ago sep oct nov dic".split(" "),AM:"AM",PM:"PM",am:"am",pm:"pm",formats:{c:"%a %d %b %Y %X %Z",D:"%d/%m/%Y",F:"%Y-%m-%d",R:"%H:%M",r:"%I:%M:%S %p",T:"%H:%M:%S",v:"%e-%b-%Y",X:"%T",x:"%D"}},fr_FR:{identifier:"fr-FR",days:"dimanche lundi mardi mercredi jeudi vendredi samedi".split(" "),shortDays:"dim. lun. mar. mer. jeu. ven. sam.".split(" "),months:"janvier f\xE9vrier mars avril mai juin juillet ao\xFBt septembre octobre novembre d\xE9cembre".split(" "),shortMonths:"janv. f\xE9vr. mars avril mai juin juil. ao\xFBt sept. oct. nov. d\xE9c.".split(" "),AM:"AM",PM:"PM",am:"am",pm:"pm",formats:{c:"%a %d %b %Y %X %Z",D:"%d/%m/%Y",F:"%Y-%m-%d",R:"%H:%M",r:"%I:%M:%S %p",T:"%H:%M:%S",v:"%e-%b-%Y",X:"%T",x:"%D"}},it_IT:{identifier:"it-IT",days:"domenica luned\xEC marted\xEC mercoled\xEC gioved\xEC venerd\xEC sabato".split(" "),shortDays:"dom lun mar mer gio ven sab".split(" "),months:"gennaio febbraio marzo aprile maggio giugno luglio agosto settembre ottobre novembre dicembre".split(" "),shortMonths:"gen feb mar apr mag giu lug ago set ott nov dic".split(" "),AM:"AM",PM:"PM",am:"am",pm:"pm",formats:{c:"%a %d %b %Y %X %Z",D:"%d/%m/%Y",F:"%Y-%m-%d",R:"%H:%M",r:"%I:%M:%S %p",T:"%H:%M:%S",v:"%e-%b-%Y",X:"%T",x:"%D"}},nl_NL:{identifier:"nl-NL",days:"zondag maandag dinsdag woensdag donderdag vrijdag zaterdag".split(" "),shortDays:"zo ma di wo do vr za".split(" "),months:"januari februari maart april mei juni juli augustus september oktober november december".split(" "),shortMonths:"jan feb mrt apr mei jun jul aug sep okt nov dec".split(" "),AM:"AM",PM:"PM",am:"am",pm:"pm",formats:{c:"%a %d %b %Y %X %Z",D:"%d-%m-%y",F:"%Y-%m-%d",R:"%H:%M",r:"%I:%M:%S %p",T:"%H:%M:%S",v:"%e-%b-%Y",X:"%T",x:"%D"}},pt_BR:{identifier:"pt-BR",days:"domingo segunda ter\xE7a quarta quinta sexta s\xE1bado".split(" "),shortDays:"Dom Seg Ter Qua Qui Sex S\xE1b".split(" "),months:"janeiro fevereiro mar\xE7o abril maio junho julho agosto setembro outubro novembro dezembro".split(" "),shortMonths:"Jan Fev Mar Abr Mai Jun Jul Ago Set Out Nov Dez".split(" "),AM:"AM",PM:"PM",am:"am",pm:"pm",formats:{c:"%a %d %b %Y %X %Z",D:"%d-%m-%Y",F:"%Y-%m-%d",R:"%H:%M",r:"%I:%M:%S %p",T:"%H:%M:%S",v:"%e-%b-%Y",X:"%T",x:"%D"}},ru_RU:{identifier:"ru-RU",days:"\u0412\u043E\u0441\u043A\u0440\u0435\u0441\u0435\u043D\u044C\u0435 \u041F\u043E\u043D\u0435\u0434\u0435\u043B\u044C\u043D\u0438\u043A \u0412\u0442\u043E\u0440\u043D\u0438\u043A \u0421\u0440\u0435\u0434\u0430 \u0427\u0435\u0442\u0432\u0435\u0440\u0433 \u041F\u044F\u0442\u043D\u0438\u0446\u0430 \u0421\u0443\u0431\u0431\u043E\u0442\u0430".split(" "),shortDays:"\u0412\u0441 \u041F\u043D \u0412\u0442 \u0421\u0440 \u0427\u0442 \u041F\u0442 \u0421\u0431".split(" "),months:"\u042F\u043D\u0432\u0430\u0440\u044C \u0424\u0435\u0432\u0440\u0430\u043B\u044C \u041C\u0430\u0440\u0442 \u0410\u043F\u0440\u0435\u043B\u044C \u041C\u0430\u0439 \u0418\u044E\u043D\u044C \u0418\u044E\u043B\u044C \u0410\u0432\u0433\u0443\u0441\u0442 \u0421\u0435\u043D\u0442\u044F\u0431\u0440\u044C \u041E\u043A\u0442\u044F\u0431\u0440\u044C \u041D\u043E\u044F\u0431\u0440\u044C \u0414\u0435\u043A\u0430\u0431\u0440\u044C".split(" "),shortMonths:"\u044F\u043D\u0432 \u0444\u0435\u0432 \u043C\u0430\u0440 \u0430\u043F\u0440 \u043C\u0430\u0439 \u0438\u044E\u043D \u0438\u044E\u043B \u0430\u0432\u0433 \u0441\u0435\u043D \u043E\u043A\u0442 \u043D\u043E\u044F \u0434\u0435\u043A".split(" "),AM:"AM",PM:"PM",am:"am",pm:"pm",formats:{c:"%a %d %b %Y %X",D:"%d.%m.%y",F:"%Y-%m-%d",R:"%H:%M",r:"%I:%M:%S %p",T:"%H:%M:%S",v:"%e-%b-%Y",X:"%T",x:"%D"}},tr_TR:{identifier:"tr-TR",days:"Pazar Pazartesi Sal\u0131 \xC7ar\u015Famba Per\u015Fembe Cuma Cumartesi".split(" "),shortDays:"Paz Pzt Sal \xC7r\u015F Pr\u015F Cum Cts".split(" "),months:"Ocak \u015Eubat Mart Nisan May\u0131s Haziran Temmuz A\u011Fustos Eyl\xFCl Ekim Kas\u0131m Aral\u0131k".split(" "),shortMonths:"Oca \u015Eub Mar Nis May Haz Tem A\u011Fu Eyl Eki Kas Ara".split(" "),AM:"\xD6\xD6",PM:"\xD6S",am:"\xD6\xD6",pm:"\xD6S",formats:{c:"%a %d %b %Y %X %Z",D:"%d-%m-%Y",F:"%Y-%m-%d",R:"%H:%M",r:"%I:%M:%S %p",T:"%H:%M:%S",v:"%e-%b-%Y",X:"%T",x:"%D"}},zh_CN:{identifier:"zh-CN",days:"\u661F\u671F\u65E5 \u661F\u671F\u4E00 \u661F\u671F\u4E8C \u661F\u671F\u4E09 \u661F\u671F\u56DB \u661F\u671F\u4E94 \u661F\u671F\u516D".split(" "),shortDays:"\u65E5\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D".split(""),months:"\u4E00\u6708\u4EFD \u4E8C\u6708\u4EFD \u4E09\u6708\u4EFD \u56DB\u6708\u4EFD \u4E94\u6708\u4EFD \u516D\u6708\u4EFD \u4E03\u6708\u4EFD \u516B\u6708\u4EFD \u4E5D\u6708\u4EFD \u5341\u6708\u4EFD \u5341\u4E00\u6708\u4EFD \u5341\u4E8C\u6708\u4EFD".split(" "),shortMonths:"\u4E00\u6708 \u4E8C\u6708 \u4E09\u6708 \u56DB\u6708 \u4E94\u6708 \u516D\u6708 \u4E03\u6708 \u516B\u6708 \u4E5D\u6708 \u5341\u6708 \u5341\u4E00\u6708 \u5341\u4E8C\u6708".split(" "),AM:"\u4E0A\u5348",PM:"\u4E0B\u5348",am:"\u4E0A\u5348",pm:"\u4E0B\u5348",formats:{c:"%a %d %b %Y %X %Z",D:"%d/%m/%y",F:"%Y-%m-%d",R:"%H:%M",r:"%I:%M:%S %p",T:"%H:%M:%S",v:"%e-%b-%Y",X:"%r",x:"%D"}}},t=S.en_US,s=new e(t,0,!1);if(typeof p<"u")var c=p.exports=s;else c=function(){return this||(0,eval)("this")}(),c.strftime=s;typeof Date.now!="function"&&(Date.now=function(){return+new Date})})()},function(p,g,e){p=e(5);let i=Sk.global.JSBI=Sk.global.BigInt!==void 0?{}:p;Sk.global.BigInt===void 0?(i.__isBigInt||(i.__isBigInt=n=>n instanceof i),i.powermod=(n,r,l)=>{let h=i.BigInt(1),a=h;for(r=i.greaterThan(r,i.__ZERO)?r:i.unaryMinus(r);i.greaterThan(r,i.__ZERO);)i.bitwiseAnd(r,h)&&(a=i.remainder(i.multiply(a,n),l)),r=i.signedRightShift(r,h),n=i.remainder(i.multiply(n,n),l);return a}):Object.assign(i,{BigInt:Sk.global.BigInt,toNumber:n=>Number(n),toString:n=>n.toString(),__isBigInt:n=>typeof n=="bigint",unaryMinus:n=>-n,bitwiseNot:n=>~n,bitwiseAnd:(n,r)=>n&r,bitwiseOr:(n,r)=>n|r,bitwiseXor:(n,r)=>n^r,exponentiate:(n,r)=>{let l=i.BigInt(1),h=l;for(r=r>i.__ZERO?r:-r;r>i.__ZERO;)r&l&&(h*=n),r>>=l,n*=n;return h},powermod:(n,r,l)=>{let h=i.BigInt(1),a=h;for(r=r>i.__ZERO?r:-r;r>i.__ZERO;)r&h&&(a=a*n%l),r>>=h,n=n*n%l;return a},multiply:(n,r)=>n*r,divide:(n,r)=>n/r,remainder:(n,r)=>n%r,add:(n,r)=>n+r,subtract:(n,r)=>n-r,leftShift:(n,r)=>n<n>>r,unsignedRightShift:(n,r)=>n>>>r,lessThan:(n,r)=>nn<=r,greaterThan:(n,r)=>n>r,greaterThanOrEqual:(n,r)=>n>=r,equal:(n,r)=>n===r,notEqual:(n,r)=>n!==r}),i.__ZERO=i.BigInt(0),i.__MAX_SAFE=i.BigInt(Number.MAX_SAFE_INTEGER),i.__MIN_SAFE=i.BigInt(-Number.MAX_SAFE_INTEGER),i.numberIfSafe=n=>i.lessThan(n,i.__MAX_SAFE)&&i.greaterThan(n,i.__MIN_SAFE)?i.toNumber(n):n,i.BigUp=n=>i.__isBigInt(n)?n:i.BigInt(n)},function(p,g,e){(function(i,n){p.exports=n()})(this,function(){var i=Math.imul,n=Math.clz32,r=Math.abs,l=Math.max,h=Math.floor;class a extends Array{constructor(t,s){if(super(t),this.sign=s,t>a.__kMaxLength)throw new RangeError("Maximum BigInt size exceeded")}static BigInt(t){var s=Number.isFinite;if(typeof t=="number"){if(t===0)return a.__zero();if(a.__isOneDigitInt(t))return 0>t?a.__oneDigit(-t,!0):a.__oneDigit(t,!1);if(!s(t)||h(t)!==t)throw new RangeError("The number "+t+" cannot be converted to BigInt because it is not an integer");return a.__fromDouble(t)}if(typeof t=="string"){if(s=a.__fromString(t),s===null)throw new SyntaxError("Cannot convert "+t+" to a BigInt");return s}if(typeof t=="boolean")return t===!0?a.__oneDigit(1,!1):a.__zero();if(typeof t=="object")return t.constructor===a?t:(t=a.__toPrimitive(t),a.BigInt(t));throw new TypeError("Cannot convert "+t+" to a BigInt")}toDebugString(){let t=["BigInt["];for(let s of this)t.push((s&&(s>>>0).toString(16))+", ");return t.push("]"),t.join("")}toString(t){if(t=t===void 0?10:t,2>t||36>>12;let $=f-12;for(s=12<=f?0:o<<20+f,f=20+f,0<$&&0>>30-$,s=o<<$+2,f=$+2);0>>30-f,f-=30;return o=a.__decideRounding(t,f,u,o),(o===1||o===0&&(1&s)==1)&&(s=s+1>>>0,s===0&&(d++,d>>>20!=0&&(d=0,c++,1023=a.__kMaxLengthBits)throw new RangeError("BigInt too big");if(t.length===1&&t.__digit(0)===2){var c=1+(0|s/30);return t=new a(c,t.sign&&(1&s)!=0),t.__initializeDigits(),t.__setDigit(c-1,1<>=1;s!==0;s>>=1)o=a.multiply(o,o),1&s&&(c===null?c=o:c=a.multiply(c,o));return c}static multiply(t,s){if(t.length===0)return t;if(s.length===0)return s;var c=t.length+s.length;30<=t.__clzmsd()+s.__clzmsd()&&c--,c=new a(c,t.sign!==s.sign),c.__initializeDigits();for(let o=0;oa.__absoluteCompare(t,s))return a.__zero();let c=t.sign!==s.sign,o=s.__unsignedDigit(0);if(s.length===1&&32767>=o){if(o===1)return c===t.sign?t:a.unaryMinus(t);t=a.__absoluteDivSmall(t,o,null)}else t=a.__absoluteDivLarge(t,s,!0,!1);return t.sign=c,t.__trim()}static remainder(t,s){if(s.length===0)throw new RangeError("Division by zero");if(0>a.__absoluteCompare(t,s))return t;let c=s.__unsignedDigit(0);return s.length===1&&32767>=c?c===1?a.__zero():(s=a.__absoluteModSmall(t,c),s===0?a.__zero():a.__oneDigit(s,t.sign)):(s=a.__absoluteDivLarge(t,s,!1,!0),s.sign=t.sign,s.__trim())}static add(t,s){let c=t.sign;return c===s.sign?a.__absoluteAdd(t,s,c):0<=a.__absoluteCompare(t,s)?a.__absoluteSub(t,s,c):a.__absoluteSub(s,t,!c)}static subtract(t,s){let c=t.sign;return c===s.sign?0<=a.__absoluteCompare(t,s)?a.__absoluteSub(t,s,c):a.__absoluteSub(s,t,!c):a.__absoluteAdd(t,s,c)}static leftShift(t,s){return s.length===0||t.length===0?t:s.sign?a.__rightShiftByAbsolute(t,s):a.__leftShiftByAbsolute(t,s)}static signedRightShift(t,s){return s.length===0||t.length===0?t:s.sign?a.__leftShiftByAbsolute(t,s):a.__rightShiftByAbsolute(t,s)}static unsignedRightShift(){throw new TypeError("BigInts have no unsigned right shift; use >> instead")}static lessThan(t,s){return 0>a.__compareToBigInt(t,s)}static lessThanOrEqual(t,s){return 0>=a.__compareToBigInt(t,s)}static greaterThan(t,s){return 0t)throw new RangeError("Invalid value: not (convertible to) a safe integer");if(t===0)return a.__zero();if(t>=a.__kMaxLengthBits)return s;let c=0|(t+29)/30;if(s.lengtht)throw new RangeError("Invalid value: not (convertible to) a safe integer");if(t===0)return a.__zero();if(s.sign){if(t>a.__kMaxLengthBits)throw new RangeError("BigInt too big");return a.__truncateAndSubFromPowerOfTwo(t,s,!1)}if(t>=a.__kMaxLengthBits)return s;let c=0|(t+29)/30;if(s.length>>o?a.__truncateToNBits(t,s):s}static ADD(t,s){if(t=a.__toPrimitive(t),s=a.__toPrimitive(s),typeof t=="string")return typeof s!="string"&&(s=s.toString()),t+s;if(typeof s=="string")return t.toString()+s;if(t=a.__toNumeric(t),s=a.__toNumeric(s),a.__isBigInt(t)&&a.__isBigInt(s))return a.add(t,s);if(typeof t=="number"&&typeof s=="number")return t+s;throw new TypeError("Cannot mix BigInt and other types, use explicit conversions")}static LT(t,s){return a.__compare(t,s,0)}static LE(t,s){return a.__compare(t,s,1)}static GT(t,s){return a.__compare(t,s,2)}static GE(t,s){return a.__compare(t,s,3)}static EQ(t,s){for(;;){if(a.__isBigInt(t))return a.__isBigInt(s)?a.equal(t,s):a.EQ(s,t);if(typeof t=="number"){if(a.__isBigInt(s))return a.__equalToNumber(s,t);if(typeof s!="object")return t==s;s=a.__toPrimitive(s)}else if(typeof t=="string"){if(a.__isBigInt(s))return t=a.__fromString(t),t!==null&&a.equal(t,s);if(typeof s!="object")return t==s;s=a.__toPrimitive(s)}else if(typeof t=="boolean"){if(a.__isBigInt(s))return a.__equalToNumber(s,+t);if(typeof s!="object")return t==s;s=a.__toPrimitive(s)}else if(typeof t=="symbol"){if(a.__isBigInt(s))return!1;if(typeof s!="object")return t==s;s=a.__toPrimitive(s)}else if(typeof t=="object"){if(typeof s=="object"&&s.constructor!==a)return t==s;t=a.__toPrimitive(t)}else return t==s}}static NE(t,s){return!a.EQ(t,s)}static __zero(){return new a(0,!1)}static __oneDigit(t,s){return s=new a(1,s),s.__setDigit(0,t),s}__copy(){let t=new a(this.length,this.sign);for(let s=0;ss)s=-s-1;else{if(c===0)return-1;c--,o=t.__digit(c),s=29}if(s=1<>>20)-1023,c=(0|s/30)+1;t=new a(c,0>t);let o=1048575&a.__kBitConversionInts[1]|1048576,d=a.__kBitConversionInts[0];s%=30;let u;if(20>s){var f=20-s;u=f+32,s=o>>>f,o=o<<32-f|d>>>f,d<<=32-f}else s===20?(u=32,s=o,o=d):(f=s-20,u=32-f,s=o<>>32-f,o=d<>>2,o=o<<30|d>>>2,d<<=30):s=0,t.__setDigit(c,s);return t.__trim()}static __isWhitespace(t){return 13>=t&&9<=t||(159>=t?t==32:131071>=t?t==160||t==5760:196607>=t?(t&=131071,10>=t||t==40||t==41||t==47||t==95||t==4096):t==65279)}static __fromString(t,s){s=s===void 0?0:s;let c=0,o=t.length,d=0;if(d===o)return a.__zero();let u=t.charCodeAt(d);for(;a.__isWhitespace(u);){if(++d===o)return a.__zero();u=t.charCodeAt(d)}if(u===43){if(++d===o)return null;u=t.charCodeAt(d),c=1}else if(u===45){if(++d===o)return null;u=t.charCodeAt(d),c=-1}if(s===0){if(s=10,u===48){if(++d===o)return a.__zero();if(u=t.charCodeAt(d),u===88||u===120){if(s=16,++d===o)return null;u=t.charCodeAt(d)}else if(u===79||u===111){if(s=8,++d===o)return null;u=t.charCodeAt(d)}else if(u===66||u===98){if(s=2,++d===o)return null;u=t.charCodeAt(d)}}}else if(s===16&&u===48){if(++d===o)return a.__zero();if(u=t.charCodeAt(d),u===88||u===120){if(++d===o)return null;u=t.charCodeAt(d)}}if(c!=0&&s!==10)return null;for(;u===48;){if(++d===o)return a.__zero();u=t.charCodeAt(d)}var f=o-d;let $=a.__kMaxBitsPerChar[s];var m=a.__kBitsPerCharTableMultiplier-1;if(f>1073741824/$)return null;f=new a(0|(($*f+m>>>a.__kBitsPerCharTableShift)+29)/30,!1);let _=10>s?s:10,v=10>>0<_)m=u-48;else if((32|u)-97>>>0>>a.__kBitsPerCharTableShift)/30)}while(!A)}else{$>>=a.__kBitsPerCharTableShift,s=[];var A=[],N=!1;do{for(var M=0,R=0;;){if(u-48>>>0<_)m=u-48;else if((32|u)-97>>>0>>m-u)}if(d!==0){if(o>=t.length)throw Error("implementation bug");t.__setDigit(o++,d)}for(;o>>1)+(85&o),o=(51&o>>>2)+(51&o),o=(15&o>>>4)+(15&o),--s;let d=t.__digit(c-1);var u=a.__clz30(d),f=0|(30*c-u+o-1)/o;if(t.sign&&f++,268435456>>m,m=30-m;m>=o;)u[f--]=a.__kConversionChars[$&s],$>>>=o,m-=o}for(u[f--]=a.__kConversionChars[($|d<>>o-m;$!==0;)u[f--]=a.__kConversionChars[$&s],$>>>=o;if(t.sign&&(u[f--]="-"),f!=-1)throw Error("implementation bug");return u.join("")}static __toStringGeneric(t,s,c){var o=t.length;if(o===0)return"";if(o===1)return s=t.__unsignedDigit(0).toString(s),c===!1&&t.sign&&(s="-"+s),s;var d=30*o-a.__clz30(t.__digit(o-1));o=a.__kMaxBitsPerChar[s]-1,d*=a.__kBitsPerCharTableMultiplier,o=(0|(d+(o-1))/o)+1>>1,d=a.exponentiate(a.__oneDigit(s,!1),a.__oneDigit(o,!1));var u=d.__unsignedDigit(0);if(d.length===1&&32767>=u){d=new a(t.length,!1),d.__initializeDigits();var f=0;for(let $=2*t.length-1;0<=$;$--)f=f<<15|t.__halfDigit($),d.__setHalfDigit($,0|f/u),f=0|f%u;u=f.toString(s)}else u=a.__absoluteDivLarge(t,d,!0,!0),d=u.quotient,u=u.remainder.__trim(),u=a.__toStringGeneric(u,s,!0);for(d.__trim(),s=a.__toStringGeneric(d,s,!0);u.lengtht?a.__absoluteLess(c):0)}static __compareToNumber(t,s){if(a.__isOneDigitInt(s)){let c=t.sign,o=0>s;if(c!==o)return a.__unequalSign(c);if(t.length===0){if(o)throw Error("implementation bug");return s===0?0:-1}return 1s?a.__absoluteGreater(c):ts)return a.__unequalSign(c);if(s===0)throw Error("implementation bug: should be handled elsewhere");if(t.length===0)return-1;if(a.__kBitConversionDouble[0]=s,s=2047&a.__kBitConversionInts[1]>>>20,s==2047)throw Error("implementation bug: handled elsewhere");var o=s-1023;if(0>o)return a.__absoluteGreater(c);s=t.length;var d=t.__digit(s-1),u=a.__clz30(d),f=30*s-u;if(o+=1,fo)return a.__absoluteGreater(c);o=1048576|1048575&a.__kBitConversionInts[1];let $=a.__kBitConversionInts[0];if(u=29-u,u!==(0|(f-1)%30))throw Error("implementation bug");if(20>u){var m=20-u;u=m+32,f=o>>>m,o=o<<32-m|$>>>m,$<<=32-m}else u===20?(u=32,f=o,o=$):(m=u-20,u=32-m,f=o<>>32-m,o=$<>>=0,f>>>=0,d>f)return a.__absoluteGreater(c);if(d>>2,o=o<<30|$>>>2,$<<=30):f=0,d=t.__unsignedDigit(s),d>f)return a.__absoluteGreater(c);if(ds&&t.__unsignedDigit(0)===r(s):a.__compareToDouble(t,s)===0}static __comparisonResultToBool(t,s){return s===0?0>t:s===1?0>=t:s===2?0s;case 3:return t>=s}if(a.__isBigInt(t)&&typeof s=="string")return s=a.__fromString(s),s!==null&&a.__comparisonResultToBool(a.__compareToBigInt(t,s),c);if(typeof t=="string"&&a.__isBigInt(s))return t=a.__fromString(t),t!==null&&a.__comparisonResultToBool(a.__compareToBigInt(t,s),c);if(t=a.__toNumeric(t),s=a.__toNumeric(s),a.__isBigInt(t)){if(a.__isBigInt(s))return a.__comparisonResultToBool(a.__compareToBigInt(t,s),c);if(typeof s!="number")throw Error("implementation bug");return a.__comparisonResultToBool(a.__compareToNumber(t,s),c)}if(typeof t!="number")throw Error("implementation bug");if(a.__isBigInt(s))return a.__comparisonResultToBool(a.__compareToNumber(s,t),2^c);if(typeof s!="number")throw Error("implementation bug");return c===0?ts:c===3?t>=s:void 0}__clzmsd(){return a.__clz30(this.__digit(this.length-1))}static __absoluteAdd(t,s,c){if(t.length>>30,c.__setDigit(d,1073741823&u)}for(;d>>30,c.__setDigit(d,1073741823&s);return d>>30,c.__setDigit(d,1073741823&u)}for(;d>>30,c.__setDigit(d,1073741823&s);return c.__trim()}static __absoluteAddOne(t,s,c){c=c===void 0?null:c;let o=t.length;c===null?c=new a(o,s):c.sign=s,s=1;for(let d=0;d>>30,c.__setDigit(d,1073741823&u)}return s!=0&&c.__setDigitGrow(o,1),c}static __absoluteSubOne(t,s){let c=t.length;s=s||c;let o=new a(s,!1),d=1;for(let u=0;u>>30,o.__setDigit(u,1073741823&f)}if(d!=0)throw Error("implementation bug");for(t=c;tc?0:t.__unsignedDigit(c)>s.__unsignedDigit(c)?1:-1}static __multiplyAccumulate(t,s,c,o){if(s!==0){var d=32767&s,u=s>>>15,f=s=0;for(let v,A=0;A>>15;$=a.__imul(m,d),m=a.__imul(m,u);let N=a.__imul(_,d);_=a.__imul(_,u),v+=f+$+s,s=v>>>30,v&=1073741823,v+=((32767&m)<<15)+((32767&N)<<15),s+=v>>>30,f=_+(m>>>15)+(N>>>15),c.__setDigit(o,1073741823&v)}for(;s!=0||f!==0;o++)t=c.__digit(o),t+=s+f,f=0,s=t>>>30,c.__setDigit(o,1073741823&t)}}static __internalMultiplyAdd(t,s,c,o,d){let u=0;for(let m=0;m>>15,s),$=$+((32767&f)<<15)+u+c,c=$>>>30,u=f>>>15,d.__setDigit(m,1073741823&$)}if(d.length>o)for(d.__setDigit(o++,c+u);othis.length&&(c=this.length);let o=32767&t;t>>>=15;let d=0;for(let m=0;m>>15;u=a.__imul(f,o),f=a.__imul(f,t);let _=a.__imul($,o);$=a.__imul($,t),u=s+u+d,d=u>>>30,u&=1073741823,u+=((32767&f)<<15)+((32767&_)<<15),d+=u>>>30,s=$+(f>>>15)+(_>>>15),this.__setDigit(m,1073741823&u)}if(d!=0||s!==0)throw Error("implementation bug")}static __absoluteDivSmall(t,s,c){c=c===void 0?null:c,c===null&&(c=new a(t.length,!1));let o=0;for(let d,u=2*t.length-1;0<=u;u-=2){d=(o<<15|t.__halfDigit(u))>>>0;let f=0|d/s;o=0|d%s,d=(o<<15|t.__halfDigit(u-1))>>>0;let $=0|d/s;o=0|d%s,c.__setDigit(u>>>1,f<<15|$)}return c}static __absoluteModSmall(t,s){let c=0;for(let o=2*t.length-1;0<=o;o--)c=0|((c<<15|t.__halfDigit(o))>>>0)%s;return c}static __absoluteDivLarge(t,s,c,o){let d=s.__halfDigitLength(),u=s.length;var f=t.__halfDigitLength()-d;let $=null;c&&($=new a(f+2>>>1,!1),$.__initializeDigits());let m=new a(d+2>>>1,!1);m.__initializeDigits();let _=a.__clz15(s.__halfDigit(d-1));0<_&&(s=a.__specialLeftShift(s,_,0)),t=a.__specialLeftShift(t,_,1);let v=s.__halfDigit(d-1),A=0;for(let N,M=f;0<=M;M--){if(N=32767,f=t.__halfDigit(M+d),f!==v){f=(f<<15|t.__halfDigit(M+d-1))>>>0,N=0|f/v,f=0|f%v;let R=s.__halfDigit(d-2),H=t.__halfDigit(M+d-2);for(;a.__imul(N,R)>>>0>(f<<16|H)>>>0&&(N--,f+=v,!(32767>>1,A|N))}if(o)return t.__inplaceRightShift(_),c?{quotient:$,remainder:t}:t;if(c)return $;throw Error("unreachable")}static __clz15(t){return a.__clz30(t)-15}__inplaceAdd(t,s,c){let o=0;for(let d=0;d>>15,this.__setHalfDigit(s+d,32767&u)}return o}__inplaceSub(t,s,c){let o=0;if(1&s){s>>=1;for(var d=this.__digit(s),u=32767&d,f=0;f>>1;f++){var $=t.__digit(f);d=(d>>>15)-(32767&$)-o,o=1&d>>>15,this.__setDigit(s+f,(32767&d)<<15|32767&u),d=this.__digit(s+f+1),u=(32767&d)-($>>>15)-o,o=1&u>>>15}$=t.__digit(f);let m=(d>>>15)-(32767&$)-o;if(o=1&m>>>15,this.__setDigit(s+f,(32767&m)<<15|32767&u),s+f+1>=this.length)throw new RangeError("out of bounds");!(1&c)&&(d=this.__digit(s+f+1),u=(32767&d)-($>>>15)-o,o=1&u>>>15,this.__setDigit(s+t.length,1073709056&d|32767&u))}else{for(s>>=1,u=0;u>>15,d=(d>>>15)-($>>>15)-o,o=1&d>>>15,this.__setDigit(s+u,(32767&d)<<15|32767&f);f=this.__digit(s+u),t=t.__digit(u),d=(32767&f)-(32767&t)-o,o=1&d>>>15,$=0,!(1&c)&&($=(f>>>15)-(t>>>15)-o,o=1&$>>>15),this.__setDigit(s+u,(32767&$)<<15|32767&d)}return o}__inplaceRightShift(t){if(t!==0){var s=this.__digit(0)>>>t,c=this.length-1;for(let o=0;o>>t}this.__setDigit(c,s)}}static __specialLeftShift(t,s,c){let o=t.length,d=new a(o+c,!1);if(s===0){for(s=0;s>>30-s}return 0c)throw new RangeError("BigInt too big");s=0|c/30;var o=c%30;let d=t.length,u=o!==0&&t.__digit(d-1)>>>30-o!=0;var f=d+s+(u?1:0);if(c=new a(f,t.sign),o===0){for(o=0;o>>30-o}if(u)c.__setDigit(d+s,f);else if(f!==0)throw Error("implementation bug")}return c.__trim()}static __rightShiftByAbsolute(t,s){var c=t.length,o=t.sign,d=a.__toShiftAmount(s);if(0>d)return a.__rightShiftByMaximum(o);s=0|d/30;var u=d%30,f=c-s;if(0>=f)return a.__rightShiftByMaximum(o);if(d=!1,o){if(t.__digit(s)&(1<>>u,c=c-s-1,$=0;$>>u}o.__setDigit(c,f)}return d&&(o=a.__absoluteAddOne(o,!0,o)),o.__trim()}static __rightShiftByMaximum(t){return t?a.__oneDigit(1,!0):a.__zero()}static __toShiftAmount(t){return 1a.__kMaxLengthBits?-1:t)}static __toPrimitive(t,s){if(s=s===void 0?"default":s,typeof t!="object"||t.constructor===a)return t;let c=t[Symbol.toPrimitive];if(c){if(t=c(s),typeof t!="object")return t;throw new TypeError("Cannot convert object to primitive value")}if((s=t.valueOf)&&(s=s.call(t),typeof s!="object"))return s;if((s=t.toString)&&(t=s.call(t),typeof t!="object"))return t;throw new TypeError("Cannot convert object to primitive value")}static __toNumeric(t){return a.__isBigInt(t)?t:+t}static __isBigInt(t){return typeof t=="object"&&t!==null&&t.constructor===a}static __truncateToNBits(t,s){var c=0|(t+29)/30;let o=new a(c,s.sign);--c;for(let d=0;d>>t),o.__setDigit(c,s),o.__trim()}static __truncateAndSubFromPowerOfTwo(t,s,c){var o=Math.min,d=0|(t+29)/30;c=new a(d,c);let u=0;--d;var f=0;for(o=o(d,s.length);u>>30,c.__setDigit(u,1073741823&$)}for(;u>>t,t=1<<32-t,f=t-s-f,f&=t-1),c.__setDigit(d,f),c.__trim()}__digit(t){return this[t]}__unsignedDigit(t){return this[t]>>>0}__setDigit(t,s){this[t]=0|s}__setDigitGrow(t,s){this[t]=0|s}__halfDigitLength(){let t=this.length;return 32767>=this.__unsignedDigit(t-1)?2*t-1:2*t}__halfDigit(t){return 32767&this[t>>>1]>>>15*(1&t)}__setHalfDigit(t,s){let c=t>>>1,o=this.__digit(c);this.__setDigit(c,1&t?32767&o|s<<15:1073709056&o|32767&s)}static __digitPow(t,s){let c=1;for(;0>>=1,t*=t;return c}static __isOneDigitInt(t){return(1073741823&t)===t}}return a.__kMaxLength=33554432,a.__kMaxLengthBits=a.__kMaxLength<<5,a.__kMaxBitsPerChar=[0,0,32,51,64,75,83,90,96,102,107,111,115,119,122,126,128,131,134,136,139,141,143,145,147,149,151,153,154,156,158,159,160,162,163,165,166],a.__kBitsPerCharTableShift=5,a.__kBitsPerCharTableMultiplier=1<>>0)/t)},a.__imul=i||function(S,t){return 0|S*t},a})},function(p,g){[..."abc"].flat(),"a".matchAll(/a/g)},function(p,g,e){(function(i,n){(function(r,l){function h(A){delete f[A]}function a(A){if($)setTimeout(a,0,A);else{var N=f[A];if(N){$=!0;try{var M=N.callback,R=N.args;switch(R.length){case 0:M();break;case 1:M(R[0]);break;case 2:M(R[0],R[1]);break;case 3:M(R[0],R[1],R[2]);break;default:M.apply(l,R)}}finally{h(A),$=!1}}}}function S(){_=function(A){n.nextTick(function(){a(A)})}}function t(){if(r.postMessage&&!r.importScripts){var A=!0,N=r.onmessage;return r.onmessage=function(){A=!1},r.postMessage("","*"),r.onmessage=N,A}}function s(){var A="setImmediate$"+Math.random()+"$",N=function(M){M.source===r&&typeof M.data=="string"&&M.data.indexOf(A)===0&&a(+M.data.slice(A.length))};r.addEventListener?r.addEventListener("message",N,!1):r.attachEvent("onmessage",N),_=function(M){r.postMessage(A+M,"*")}}function c(){var A=new MessageChannel;A.port1.onmessage=function(N){a(N.data)},_=function(N){A.port2.postMessage(N)}}function o(){var A=m.documentElement;_=function(N){var M=m.createElement("script");M.onreadystatechange=function(){a(N),M.onreadystatechange=null,A.removeChild(M),M=null},A.appendChild(M)}}function d(){_=function(A){setTimeout(a,0,A)}}if(!r.setImmediate){var u=1,f={},$=!1,m=r.document,_,v=Object.getPrototypeOf&&Object.getPrototypeOf(r);v=v&&v.setTimeout?v:r,{}.toString.call(r.process)==="[object process]"?S():t()?s():r.MessageChannel?c():m&&"onreadystatechange"in m.createElement("script")?o():d(),v.setImmediate=function(A){typeof A!="function"&&(A=new Function(""+A));for(var N=Array(arguments.length-1),M=0;M"u"?typeof i>"u"?this:i:self)}).call(this,e(0),e(8))},function(p,g){function e(){throw Error("setTimeout has not been defined")}function i(){throw Error("clearTimeout has not been defined")}function n(f){if(t===setTimeout)return setTimeout(f,0);if((t===e||!t)&&setTimeout)return t=setTimeout,setTimeout(f,0);try{return t(f,0)}catch{try{return t.call(null,f,0)}catch{return t.call(this,f,0)}}}function r(f){if(s===clearTimeout)return clearTimeout(f);if((s===i||!s)&&clearTimeout)return s=clearTimeout,clearTimeout(f);try{return s(f)}catch{try{return s.call(null,f)}catch{return s.call(this,f)}}}function l(){o&&d&&(o=!1,d.length?c=d.concat(c):u=-1,c.length&&h())}function h(){if(!o){var f=n(l);o=!0;for(var $=c.length;$;){for(d=c,c=[];++u<$;)d&&d[u].run();u=-1,$=c.length}d=null,o=!1,r(f)}}function a(f,$){this.fun=f,this.array=$}function S(){}p=p.exports={};try{var t=typeof setTimeout=="function"?setTimeout:e}catch{t=e}try{var s=typeof clearTimeout=="function"?clearTimeout:i}catch{s=i}var c=[],o=!1,d,u=-1;p.nextTick=function(f){var $=Array(arguments.length-1);if(1"u"),Sk.filewrite=e.filewrite||void 0,Sk.asserts.assert(typeof Sk.filewrite=="function"||typeof Sk.filewrite>"u"),Sk.timeoutMsg=e.timeoutMsg||Sk.timeoutMsg,Sk.asserts.assert(typeof Sk.timeoutMsg=="function"),Sk.exportSymbol("Sk.timeoutMsg",Sk.timeoutMsg),Sk.sysargv=e.sysargv||Sk.sysargv,Sk.asserts.assert(Sk.isArrayLike(Sk.sysargv)),Sk.__future__=e.__future__||Sk.python3,Sk.bool_check(Sk.__future__.print_function,"Sk.__future__.print_function"),Sk.bool_check(Sk.__future__.division,"Sk.__future__.division"),Sk.bool_check(Sk.__future__.unicode_literals,"Sk.__future__.unicode_literals"),Sk.bool_check(Sk.__future__.class_repr,"Sk.__future__.class_repr"),Sk.bool_check(Sk.__future__.inherit_from_object,"Sk.__future__.inherit_from_object"),Sk.bool_check(Sk.__future__.super_args,"Sk.__future__.super_args"),Sk.bool_check(Sk.__future__.octal_number_literal,"Sk.__future__.octal_number_literal"),Sk.bool_check(Sk.__future__.bankers_rounding,"Sk.__future__.bankers_rounding"),Sk.bool_check(Sk.__future__.python_version,"Sk.__future__.python_version"),Sk.bool_check(Sk.__future__.dunder_round,"Sk.__future__.dunder_round"),Sk.bool_check(Sk.__future__.exceptions,"Sk.__future__.exceptions"),Sk.bool_check(Sk.__future__.no_long_type,"Sk.__future__.no_long_type"),Sk.bool_check(Sk.__future__.ceil_floor_int,"Sk.__future__.ceil_floor_int"),Sk.bool_check(Sk.__future__.silent_octal_literal,"Sk.__future__.silent_octal_literal"),Sk.imageProxy=e.imageProxy||"http://localhost:8080/320x",Sk.asserts.assert(typeof Sk.imageProxy=="string"||typeof Sk.imageProxy=="function"),Sk.inputfun=e.inputfun||Sk.inputfun,Sk.asserts.assert(typeof Sk.inputfun=="function"),Sk.inputfunTakesPrompt=e.inputfunTakesPrompt||!1,Sk.asserts.assert(typeof Sk.inputfunTakesPrompt=="boolean"),Sk.retainGlobals=e.retainglobals||e.retainGlobals||!1,Sk.asserts.assert(typeof Sk.retainGlobals=="boolean"),Sk.debugging=e.debugging||!1,Sk.asserts.assert(typeof Sk.debugging=="boolean"),Sk.killableWhile=e.killableWhile||!1,Sk.asserts.assert(typeof Sk.killableWhile=="boolean"),Sk.killableFor=e.killableFor||!1,Sk.asserts.assert(typeof Sk.killableFor=="boolean"),Sk.signals=e.signals,Sk.signals=Sk.signals===!0?{listeners:[],addEventListener(i){Sk.signals.listeners.push(i)},removeEventListener(i){i=Sk.signals.listeners.indexOf(i),0<=i&&Sk.signals.listeners.splice(i,1)},signal(i,n){for(var r=0;r{m+=f,u[$.$mangled]=new Sk.builtin.getset_descriptor(d,{$get(){let _=this.$s[m];if(_===void 0)throw new Sk.builtin.AttributeError($);return _},$set(_){this.$s[m]=_}})})}function a(o){for(;o.prototype.tp$base!==null;){if(o.sk$klass===void 0&&o.prototype.hasOwnProperty("__dict__"))return o=o.prototype.__dict__,Sk.builtin.checkDataDescr(o)?o:void 0;o=o.prototype.tp$base}}function S(o,d,u){if(o.sk$klass===void 0)throw new Sk.builtin.TypeError("can't set "+o.prototype.tp$name+"."+u.$jsstr());if(d===void 0)throw new Sk.builtin.TypeError("can't delete "+o.prototype.tp$name+"."+u.$jsstr())}function t(o,d){o=new Sk.builtin.super_(o,o).tp$getattr(Sk.builtin.str.$initsubclass),Sk.misceval.callsimArray(o,[],d)}function s(o){let d=o.prototype;Object.keys(d).forEach(u=>{let f=Sk.abstr.lookupSpecial(d[u],Sk.builtin.str.$setname);if(f!==void 0){let $=Sk.unfixReserved(u);try{Sk.misceval.callsimArray(f,[o,new Sk.builtin.str($)])}catch(m){throw u=new Sk.builtin.RuntimeError("Error calling __set_name__ on '"+Sk.abstr.typeName(d[u])+"' instance '"+$+"' in '"+o.prototype.tp$name+"'"),u.$cause=m,u}}})}Sk.builtin===void 0&&(Sk.builtin={}),Sk.builtin.type=function(o){return this instanceof Sk.builtin.type&&Sk.asserts.fail("calling new Sk.builtin.type is not safe"),o.ob$type},Object.defineProperties(Sk.builtin.type.prototype,{call:{value:Function.prototype.call},apply:{value:Function.prototype.apply},tp$slots:{value:{tp$doc:`type(object_or_name, bases, dict) +var vn=Object.defineProperty;var Ce=(k,w)=>()=>(k&&(w=k(k=0)),w);var xn=(k,w)=>{for(var p in w)vn(k,p,{get:w[p],enumerable:!0})};var Ve,Ft=Ce(()=>{Ve=class{#e;constructor(w=[]){this.#e=w}get stack(){return this.#e.map(w=>({...w}))}pushScope(w={}){return this.#e.push(w),{...w}}popScope(){if(this.#e.length===0)throw new RangeError("cannot pop scope from an empty stack");return{...this.#e.pop()}}#t(w=""){let p=[...this.#e].reverse().find(b=>w in b);if(p)return JSON.parse(JSON.stringify(p[w]))}read(w=""){if(this.#e.length===0)throw new RangeError("cannot read from an empty scope stack");return this.#t(w)}write(w="",p){if(this.#e.length===0)throw new RangeError("cannot write to an empty scope stack");return JSON.parse(JSON.stringify(this.#e[this.#e.length-1][w]=p))}}});var je,it=Ce(()=>{je={";":()=>{},"+":(...k)=>k.reduce((w,p)=>w+p),"-":(...k)=>k.length===1?-k[0]:k.reduce((w,p)=>w-p),"*":(...k)=>k.reduce((w,p)=>w*p),"/":(...k)=>k.reduce((w,p)=>w/p),"=":(...k)=>k.slice(1).map((w,p)=>k[p]===w).every(w=>w),">":(...k)=>k.slice(1).map((w,p)=>k[p]>w).every(w=>w),"<":(...k)=>k.slice(1).map((w,p)=>k[p]w),">=":(...k)=>k.slice(1).map((w,p)=>k[p]>=w).every(w=>w),"<=":(...k)=>k.slice(1).map((w,p)=>k[p]<=w).every(w=>w),and:(...k)=>!!k.reduce((w,p)=>w&&p),or:(...k)=>!!k.reduce((w,p)=>w||p),not:(...k)=>!k[0],log:(...k)=>(console.log(...k),k.pop()),prompt:k=>prompt(k),alert:k=>alert(k),confirm:k=>confirm(k),assert:(k,w)=>{if(!k)throw new Error(w||`Assertion Error: ${k}`)}}});var ye,Bt=Ce(()=>{it();ye={if:"if",cond:"cond",else:"else",define:"define",comment:";",commentProgram:";;",pipeLog:"*log",debug:"*debug",list:"list",...Object.keys(je).reduce((k,w)=>({...k,[w]:je[w]}),{})}});var Ot={};xn(Ot,{evaluate:()=>$e});var $e,Mt=Ce(()=>{Ft();it();Bt();$e=(k,{env:w=Object.assign({},je),scopes:p=new Ve([{}])}={})=>{let b;try{if(Array.isArray(k)){let e=!1;if(k[0]===ye.pipeLog&&(e=!0,k.shift()),typeof k[0]=="string"&&k[0].startsWith(ye.commentProgram))return;if(k=k.filter(i=>typeof i=="string"?!i.startsWith(ye.comment):!0).filter(i=>i!==void 0),k[0]==="list")return k;if(k[0]===ye.if){let[i,n,r,l]=k;b=$e(n,{env:w,scopes:p})?$e(r,{env:w,scopes:p}):$e(l,{env:w,scopes:p})}else if(k[0]===ye.cond){let[i,...n]=k;for(let[r,l]of n){if(r==="else")return $e(l,{env:w,scopes:p});if($e(r,{env:w,scopes:p}))return $e(l,{env:w,scopes:p})}return}else if(k[0]===ye.define){if(Object.values(ye).includes(k[1]))throw new SyntaxError(`"${k[0]}" is reserved, you can't use it as a variable`);if(Array.isArray(k[1])){let[i,[n,...r],l]=k,h={params:r,body:l};p.write(n,h),b=n}else{let[i,n,r]=k,l=$e(r,{env:w,scopes:p});p.write(n,l),b=l}}else if(p.read(k[0])!==void 0){let i=p.read(k[0]);if(Object(i)===i){let[n,...r]=k,{params:l,body:h}=i,a=[...l.map((S,t)=>["define",S,r[t]]),h];p.pushScope({}),b=$e(a,{env:w,scopes:p}),p.popScope()}else b=i}else if(k[0]in w&&typeof w[k[0]]!="function")b=w[k[0]];else{let i=k.map(n=>$e(n,{env:w,scopes:p})).filter(n=>n!==void 0);if(typeof i[0]=="function"){let[n,...r]=i;b=n(...r)}else b=i[i.length-1]}e&&console.log(b)}else if(typeof k=="string"&&k.startsWith(ye.comment))b=void 0;else if(typeof k=="string"&&p.read(k)!==void 0)b=p.read(k);else if(typeof k=="string"&&k in w)b=w[k];else if(typeof k=="string"||typeof k=="number"||typeof k=="boolean"||k===null)b=k;else{if(k===void 0)return;throw new Error("Invalid program.")}}catch(e){throw{error:e.error||e,program:k,stack:p.stack}}return b}});var ki={};var rn=Ce(()=>{(function(){"use strict";var k=k||{};k.scope={},k.ASSUME_ES5=!1,k.ASSUME_NO_NATIVE_MAP=!1,k.ASSUME_NO_NATIVE_SET=!1,k.SIMPLE_FROUND_POLYFILL=!1,k.ISOLATE_POLYFILLS=!1,k.FORCE_POLYFILL_PROMISE=!1,k.FORCE_POLYFILL_PROMISE_WHEN_NO_UNHANDLED_REJECTION=!1,k.defineProperty=k.ASSUME_ES5||typeof Object.defineProperties=="function"?Object.defineProperty:function(p,b,e){return p==Array.prototype||p==Object.prototype||(p[b]=e.value),p},k.getGlobal=function(p){p=[typeof globalThis=="object"&&globalThis,p,typeof window=="object"&&window,typeof self=="object"&&self,typeof global=="object"&&global];for(var b=0;be&&(e=Math.max(e+n,0));e{Sk.abstr.setUpSlots(i),Sk.abstr.setUpMethods(i),Sk.abstr.setUpGetSets(i),Sk.abstr.setUpClassMethods(i)}),e(19),e(20),e(21),[Sk.builtin.str,Sk.builtin.none,Sk.builtin.NotImplemented,Sk.builtin.object].forEach(i=>{i=i.prototype,i.__doc__=i.hasOwnProperty("tp$doc")?new Sk.builtin.str(i.tp$doc):Sk.builtin.none.none$}),e(22),e(23),e(24),e(25),e(26),e(27),e(28),e(29),e(31),e(32),e(33),e(34),e(35),e(36),e(37),e(38),e(39),e(40),e(41),e(42),e(43),e(44),e(45),e(46),e(47),e(48),e(49),e(50),e(51),e(52),e(53),e(66),e(54),e(55),e(56),e(57),e(58),e(59),e(60),e(61),e(62),e(63),e(64),e(65)},function(p,b,e){(function(i){var n={build:{githash:"41334b9bc0f020b876f81d7426b97aba2f3d79de",date:"2024-04-30T00:34:54.034Z"}};n.global=typeof i<"u"?i:typeof self<"u"?self:typeof window<"u"?window:{},n.exportSymbol=function(r,l){r=r.split(".");var h=n.global,a;for(a=0;aR.getHours()?H.am:H.pm;break;case 82:J+=f(H.formats.R,R,H,ee);break;case 83:J+=i(R.getSeconds(),g);break;case 84:J+=f(H.formats.T,R,H,ee);break;case 85:J+=i(l(R,"sunday"),g);break;case 87:J+=i(l(R,"monday"),g);break;case 88:J+=f(H.formats.X,R,H,ee);break;case 89:J+=R.getFullYear();break;case 90:_&&m===0?J+="GMT":(g=R,g=(g=g.toString().match(/\(([\w\s]+)\)/))&&g[1],J+=g||"");break;case 97:J+=H.shortDays[R.getDay()];break;case 98:J+=H.shortMonths[R.getMonth()];break;case 99:J+=f(H.formats.c,R,H,ee);break;case 100:J+=i(R.getDate(),g);break;case 101:J+=i(R.getDate(),g??" ");break;case 104:J+=H.shortMonths[R.getMonth()];break;case 106:g=new Date(R.getFullYear(),0,1),g=Math.ceil((R.getTime()-g.getTime())/864e5),J+=n(g);break;case 107:J+=i(R.getHours(),g??" ");break;case 108:J+=i(r(R.getHours()),g??" ");break;case 109:J+=i(R.getMonth()+1,g);break;case 110:J+=` +`;break;case 111:g=R.getDate(),J=H.ordinalSuffixes?J+(String(g)+(H.ordinalSuffixes[g-1]||h(g))):J+(String(g)+h(g));break;case 112:J+=12>R.getHours()?H.AM:H.PM;break;case 114:J+=f(H.formats.r,R,H,ee);break;case 115:J+=Math.floor(ee/1e3);break;case 116:J+=" ";break;case 117:g=R.getDay(),J+=g===0?7:g;break;case 118:J+=f(H.formats.v,R,H,ee);break;case 119:J+=R.getDay();break;case 120:J+=f(H.formats.x,R,H,ee);break;case 121:J+=(""+R.getFullYear()).slice(2);break;case 122:_&&m===0?J+=F?"+00:00":"+0000":(g=m!==0?m/6e4:-R.getTimezoneOffset(),x=F?":":"",D=Math.abs(g%60),J+=(0>g?"-":"+")+i(Math.floor(Math.abs(g/60)))+x+i(D));break;default:x&&(J+="%"),J+=M[P]}g=null,x=!1}else D===37?x=!0:J+=M[P]}return J}var $=o||t,m=d||0,_=u||!1,v=0,A,N=function(M,R){if(R){var H=R.getTime();if(_){var ee=6e4*(R.getTimezoneOffset()||0);R=new Date(H+ee+m),6e4*(R.getTimezoneOffset()||0)!==ee&&(R=6e4*(R.getTimezoneOffset()||0),R=new Date(H+R+m))}}else H=Date.now(),H>v?(v=H,A=new Date(v),H=v,_&&(A=new Date(v+6e4*(A.getTimezoneOffset()||0)+m))):H=v,R=A;return f(M,R,$,H)};return N.localize=function(M){return new e(M||$,m,_)},N.localizeByIdentifier=function(M){var R=S[M];return R?N.localize(R):(a('[WARNING] No locale found with identifier "'+M+'".'),N)},N.timezone=function(M){var R=m,H=_,ee=typeof M;return(ee==="number"||ee==="string")&&(H=!0,ee==="string"?(R=M[0]==="-"?-1:1,ee=parseInt(M.slice(1,3),10),M=parseInt(M.slice(3,5),10),R=R*(60*ee+M)*6e4):ee==="number"&&(R=6e4*M)),new e($,R,H)},N.utc=function(){return new e($,m,!0)},N}function i(o,d){return d===""||9=o||d===0||4<=d)return"th";switch(d){case 1:return"st";case 2:return"nd";case 3:return"rd"}}function a(o){typeof console<"u"&&typeof console.warn=="function"&&console.warn(o)}var S={de_DE:{identifier:"de-DE",days:"Sonntag Montag Dienstag Mittwoch Donnerstag Freitag Samstag".split(" "),shortDays:"So Mo Di Mi Do Fr Sa".split(" "),months:"Januar Februar M\xE4rz April Mai Juni Juli August September Oktober November Dezember".split(" "),shortMonths:"Jan Feb M\xE4r Apr Mai Jun Jul Aug Sep Okt Nov Dez".split(" "),AM:"AM",PM:"PM",am:"am",pm:"pm",formats:{c:"%a %d %b %Y %X %Z",D:"%d.%m.%Y",F:"%Y-%m-%d",R:"%H:%M",r:"%I:%M:%S %p",T:"%H:%M:%S",v:"%e-%b-%Y",X:"%T",x:"%D"}},en_CA:{identifier:"en-CA",days:"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),shortDays:"Sun Mon Tue Wed Thu Fri Sat".split(" "),months:"January February March April May June July August September October November December".split(" "),shortMonths:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),ordinalSuffixes:"st nd rd th th th th th th th th th th th th th th th th th st nd rd th th th th th th th st".split(" "),AM:"AM",PM:"PM",am:"am",pm:"pm",formats:{c:"%a %d %b %Y %X %Z",D:"%d/%m/%y",F:"%Y-%m-%d",R:"%H:%M",r:"%I:%M:%S %p",T:"%H:%M:%S",v:"%e-%b-%Y",X:"%r",x:"%D"}},en_US:{identifier:"en-US",days:"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),shortDays:"Sun Mon Tue Wed Thu Fri Sat".split(" "),months:"January February March April May June July August September October November December".split(" "),shortMonths:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),ordinalSuffixes:"st nd rd th th th th th th th th th th th th th th th th th st nd rd th th th th th th th st".split(" "),AM:"AM",PM:"PM",am:"am",pm:"pm",formats:{c:"%a %d %b %Y %X %Z",D:"%m/%d/%y",F:"%Y-%m-%d",R:"%H:%M",r:"%I:%M:%S %p",T:"%H:%M:%S",v:"%e-%b-%Y",X:"%r",x:"%D"}},es_MX:{identifier:"es-MX",days:"domingo lunes martes mi\xE9rcoles jueves viernes s\xE1bado".split(" "),shortDays:"dom lun mar mi\xE9 jue vie s\xE1b".split(" "),months:"enero;febrero;marzo;abril;mayo;junio;julio;agosto;septiembre;octubre;noviembre; diciembre".split(";"),shortMonths:"ene feb mar abr may jun jul ago sep oct nov dic".split(" "),AM:"AM",PM:"PM",am:"am",pm:"pm",formats:{c:"%a %d %b %Y %X %Z",D:"%d/%m/%Y",F:"%Y-%m-%d",R:"%H:%M",r:"%I:%M:%S %p",T:"%H:%M:%S",v:"%e-%b-%Y",X:"%T",x:"%D"}},fr_FR:{identifier:"fr-FR",days:"dimanche lundi mardi mercredi jeudi vendredi samedi".split(" "),shortDays:"dim. lun. mar. mer. jeu. ven. sam.".split(" "),months:"janvier f\xE9vrier mars avril mai juin juillet ao\xFBt septembre octobre novembre d\xE9cembre".split(" "),shortMonths:"janv. f\xE9vr. mars avril mai juin juil. ao\xFBt sept. oct. nov. d\xE9c.".split(" "),AM:"AM",PM:"PM",am:"am",pm:"pm",formats:{c:"%a %d %b %Y %X %Z",D:"%d/%m/%Y",F:"%Y-%m-%d",R:"%H:%M",r:"%I:%M:%S %p",T:"%H:%M:%S",v:"%e-%b-%Y",X:"%T",x:"%D"}},it_IT:{identifier:"it-IT",days:"domenica luned\xEC marted\xEC mercoled\xEC gioved\xEC venerd\xEC sabato".split(" "),shortDays:"dom lun mar mer gio ven sab".split(" "),months:"gennaio febbraio marzo aprile maggio giugno luglio agosto settembre ottobre novembre dicembre".split(" "),shortMonths:"gen feb mar apr mag giu lug ago set ott nov dic".split(" "),AM:"AM",PM:"PM",am:"am",pm:"pm",formats:{c:"%a %d %b %Y %X %Z",D:"%d/%m/%Y",F:"%Y-%m-%d",R:"%H:%M",r:"%I:%M:%S %p",T:"%H:%M:%S",v:"%e-%b-%Y",X:"%T",x:"%D"}},nl_NL:{identifier:"nl-NL",days:"zondag maandag dinsdag woensdag donderdag vrijdag zaterdag".split(" "),shortDays:"zo ma di wo do vr za".split(" "),months:"januari februari maart april mei juni juli augustus september oktober november december".split(" "),shortMonths:"jan feb mrt apr mei jun jul aug sep okt nov dec".split(" "),AM:"AM",PM:"PM",am:"am",pm:"pm",formats:{c:"%a %d %b %Y %X %Z",D:"%d-%m-%y",F:"%Y-%m-%d",R:"%H:%M",r:"%I:%M:%S %p",T:"%H:%M:%S",v:"%e-%b-%Y",X:"%T",x:"%D"}},pt_BR:{identifier:"pt-BR",days:"domingo segunda ter\xE7a quarta quinta sexta s\xE1bado".split(" "),shortDays:"Dom Seg Ter Qua Qui Sex S\xE1b".split(" "),months:"janeiro fevereiro mar\xE7o abril maio junho julho agosto setembro outubro novembro dezembro".split(" "),shortMonths:"Jan Fev Mar Abr Mai Jun Jul Ago Set Out Nov Dez".split(" "),AM:"AM",PM:"PM",am:"am",pm:"pm",formats:{c:"%a %d %b %Y %X %Z",D:"%d-%m-%Y",F:"%Y-%m-%d",R:"%H:%M",r:"%I:%M:%S %p",T:"%H:%M:%S",v:"%e-%b-%Y",X:"%T",x:"%D"}},ru_RU:{identifier:"ru-RU",days:"\u0412\u043E\u0441\u043A\u0440\u0435\u0441\u0435\u043D\u044C\u0435 \u041F\u043E\u043D\u0435\u0434\u0435\u043B\u044C\u043D\u0438\u043A \u0412\u0442\u043E\u0440\u043D\u0438\u043A \u0421\u0440\u0435\u0434\u0430 \u0427\u0435\u0442\u0432\u0435\u0440\u0433 \u041F\u044F\u0442\u043D\u0438\u0446\u0430 \u0421\u0443\u0431\u0431\u043E\u0442\u0430".split(" "),shortDays:"\u0412\u0441 \u041F\u043D \u0412\u0442 \u0421\u0440 \u0427\u0442 \u041F\u0442 \u0421\u0431".split(" "),months:"\u042F\u043D\u0432\u0430\u0440\u044C \u0424\u0435\u0432\u0440\u0430\u043B\u044C \u041C\u0430\u0440\u0442 \u0410\u043F\u0440\u0435\u043B\u044C \u041C\u0430\u0439 \u0418\u044E\u043D\u044C \u0418\u044E\u043B\u044C \u0410\u0432\u0433\u0443\u0441\u0442 \u0421\u0435\u043D\u0442\u044F\u0431\u0440\u044C \u041E\u043A\u0442\u044F\u0431\u0440\u044C \u041D\u043E\u044F\u0431\u0440\u044C \u0414\u0435\u043A\u0430\u0431\u0440\u044C".split(" "),shortMonths:"\u044F\u043D\u0432 \u0444\u0435\u0432 \u043C\u0430\u0440 \u0430\u043F\u0440 \u043C\u0430\u0439 \u0438\u044E\u043D \u0438\u044E\u043B \u0430\u0432\u0433 \u0441\u0435\u043D \u043E\u043A\u0442 \u043D\u043E\u044F \u0434\u0435\u043A".split(" "),AM:"AM",PM:"PM",am:"am",pm:"pm",formats:{c:"%a %d %b %Y %X",D:"%d.%m.%y",F:"%Y-%m-%d",R:"%H:%M",r:"%I:%M:%S %p",T:"%H:%M:%S",v:"%e-%b-%Y",X:"%T",x:"%D"}},tr_TR:{identifier:"tr-TR",days:"Pazar Pazartesi Sal\u0131 \xC7ar\u015Famba Per\u015Fembe Cuma Cumartesi".split(" "),shortDays:"Paz Pzt Sal \xC7r\u015F Pr\u015F Cum Cts".split(" "),months:"Ocak \u015Eubat Mart Nisan May\u0131s Haziran Temmuz A\u011Fustos Eyl\xFCl Ekim Kas\u0131m Aral\u0131k".split(" "),shortMonths:"Oca \u015Eub Mar Nis May Haz Tem A\u011Fu Eyl Eki Kas Ara".split(" "),AM:"\xD6\xD6",PM:"\xD6S",am:"\xD6\xD6",pm:"\xD6S",formats:{c:"%a %d %b %Y %X %Z",D:"%d-%m-%Y",F:"%Y-%m-%d",R:"%H:%M",r:"%I:%M:%S %p",T:"%H:%M:%S",v:"%e-%b-%Y",X:"%T",x:"%D"}},zh_CN:{identifier:"zh-CN",days:"\u661F\u671F\u65E5 \u661F\u671F\u4E00 \u661F\u671F\u4E8C \u661F\u671F\u4E09 \u661F\u671F\u56DB \u661F\u671F\u4E94 \u661F\u671F\u516D".split(" "),shortDays:"\u65E5\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D".split(""),months:"\u4E00\u6708\u4EFD \u4E8C\u6708\u4EFD \u4E09\u6708\u4EFD \u56DB\u6708\u4EFD \u4E94\u6708\u4EFD \u516D\u6708\u4EFD \u4E03\u6708\u4EFD \u516B\u6708\u4EFD \u4E5D\u6708\u4EFD \u5341\u6708\u4EFD \u5341\u4E00\u6708\u4EFD \u5341\u4E8C\u6708\u4EFD".split(" "),shortMonths:"\u4E00\u6708 \u4E8C\u6708 \u4E09\u6708 \u56DB\u6708 \u4E94\u6708 \u516D\u6708 \u4E03\u6708 \u516B\u6708 \u4E5D\u6708 \u5341\u6708 \u5341\u4E00\u6708 \u5341\u4E8C\u6708".split(" "),AM:"\u4E0A\u5348",PM:"\u4E0B\u5348",am:"\u4E0A\u5348",pm:"\u4E0B\u5348",formats:{c:"%a %d %b %Y %X %Z",D:"%d/%m/%y",F:"%Y-%m-%d",R:"%H:%M",r:"%I:%M:%S %p",T:"%H:%M:%S",v:"%e-%b-%Y",X:"%r",x:"%D"}}},t=S.en_US,s=new e(t,0,!1);if(typeof p<"u")var c=p.exports=s;else c=function(){return this||(0,eval)("this")}(),c.strftime=s;typeof Date.now!="function"&&(Date.now=function(){return+new Date})})()},function(p,b,e){p=e(5);let i=Sk.global.JSBI=Sk.global.BigInt!==void 0?{}:p;Sk.global.BigInt===void 0?(i.__isBigInt||(i.__isBigInt=n=>n instanceof i),i.powermod=(n,r,l)=>{let h=i.BigInt(1),a=h;for(r=i.greaterThan(r,i.__ZERO)?r:i.unaryMinus(r);i.greaterThan(r,i.__ZERO);)i.bitwiseAnd(r,h)&&(a=i.remainder(i.multiply(a,n),l)),r=i.signedRightShift(r,h),n=i.remainder(i.multiply(n,n),l);return a}):Object.assign(i,{BigInt:Sk.global.BigInt,toNumber:n=>Number(n),toString:n=>n.toString(),__isBigInt:n=>typeof n=="bigint",unaryMinus:n=>-n,bitwiseNot:n=>~n,bitwiseAnd:(n,r)=>n&r,bitwiseOr:(n,r)=>n|r,bitwiseXor:(n,r)=>n^r,exponentiate:(n,r)=>{let l=i.BigInt(1),h=l;for(r=r>i.__ZERO?r:-r;r>i.__ZERO;)r&l&&(h*=n),r>>=l,n*=n;return h},powermod:(n,r,l)=>{let h=i.BigInt(1),a=h;for(r=r>i.__ZERO?r:-r;r>i.__ZERO;)r&h&&(a=a*n%l),r>>=h,n=n*n%l;return a},multiply:(n,r)=>n*r,divide:(n,r)=>n/r,remainder:(n,r)=>n%r,add:(n,r)=>n+r,subtract:(n,r)=>n-r,leftShift:(n,r)=>n<n>>r,unsignedRightShift:(n,r)=>n>>>r,lessThan:(n,r)=>nn<=r,greaterThan:(n,r)=>n>r,greaterThanOrEqual:(n,r)=>n>=r,equal:(n,r)=>n===r,notEqual:(n,r)=>n!==r}),i.__ZERO=i.BigInt(0),i.__MAX_SAFE=i.BigInt(Number.MAX_SAFE_INTEGER),i.__MIN_SAFE=i.BigInt(-Number.MAX_SAFE_INTEGER),i.numberIfSafe=n=>i.lessThan(n,i.__MAX_SAFE)&&i.greaterThan(n,i.__MIN_SAFE)?i.toNumber(n):n,i.BigUp=n=>i.__isBigInt(n)?n:i.BigInt(n)},function(p,b,e){(function(i,n){p.exports=n()})(this,function(){var i=Math.imul,n=Math.clz32,r=Math.abs,l=Math.max,h=Math.floor;class a extends Array{constructor(t,s){if(super(t),this.sign=s,t>a.__kMaxLength)throw new RangeError("Maximum BigInt size exceeded")}static BigInt(t){var s=Number.isFinite;if(typeof t=="number"){if(t===0)return a.__zero();if(a.__isOneDigitInt(t))return 0>t?a.__oneDigit(-t,!0):a.__oneDigit(t,!1);if(!s(t)||h(t)!==t)throw new RangeError("The number "+t+" cannot be converted to BigInt because it is not an integer");return a.__fromDouble(t)}if(typeof t=="string"){if(s=a.__fromString(t),s===null)throw new SyntaxError("Cannot convert "+t+" to a BigInt");return s}if(typeof t=="boolean")return t===!0?a.__oneDigit(1,!1):a.__zero();if(typeof t=="object")return t.constructor===a?t:(t=a.__toPrimitive(t),a.BigInt(t));throw new TypeError("Cannot convert "+t+" to a BigInt")}toDebugString(){let t=["BigInt["];for(let s of this)t.push((s&&(s>>>0).toString(16))+", ");return t.push("]"),t.join("")}toString(t){if(t=t===void 0?10:t,2>t||36>>12;let $=f-12;for(s=12<=f?0:o<<20+f,f=20+f,0<$&&0>>30-$,s=o<<$+2,f=$+2);0>>30-f,f-=30;return o=a.__decideRounding(t,f,u,o),(o===1||o===0&&(1&s)==1)&&(s=s+1>>>0,s===0&&(d++,d>>>20!=0&&(d=0,c++,1023=a.__kMaxLengthBits)throw new RangeError("BigInt too big");if(t.length===1&&t.__digit(0)===2){var c=1+(0|s/30);return t=new a(c,t.sign&&(1&s)!=0),t.__initializeDigits(),t.__setDigit(c-1,1<>=1;s!==0;s>>=1)o=a.multiply(o,o),1&s&&(c===null?c=o:c=a.multiply(c,o));return c}static multiply(t,s){if(t.length===0)return t;if(s.length===0)return s;var c=t.length+s.length;30<=t.__clzmsd()+s.__clzmsd()&&c--,c=new a(c,t.sign!==s.sign),c.__initializeDigits();for(let o=0;oa.__absoluteCompare(t,s))return a.__zero();let c=t.sign!==s.sign,o=s.__unsignedDigit(0);if(s.length===1&&32767>=o){if(o===1)return c===t.sign?t:a.unaryMinus(t);t=a.__absoluteDivSmall(t,o,null)}else t=a.__absoluteDivLarge(t,s,!0,!1);return t.sign=c,t.__trim()}static remainder(t,s){if(s.length===0)throw new RangeError("Division by zero");if(0>a.__absoluteCompare(t,s))return t;let c=s.__unsignedDigit(0);return s.length===1&&32767>=c?c===1?a.__zero():(s=a.__absoluteModSmall(t,c),s===0?a.__zero():a.__oneDigit(s,t.sign)):(s=a.__absoluteDivLarge(t,s,!1,!0),s.sign=t.sign,s.__trim())}static add(t,s){let c=t.sign;return c===s.sign?a.__absoluteAdd(t,s,c):0<=a.__absoluteCompare(t,s)?a.__absoluteSub(t,s,c):a.__absoluteSub(s,t,!c)}static subtract(t,s){let c=t.sign;return c===s.sign?0<=a.__absoluteCompare(t,s)?a.__absoluteSub(t,s,c):a.__absoluteSub(s,t,!c):a.__absoluteAdd(t,s,c)}static leftShift(t,s){return s.length===0||t.length===0?t:s.sign?a.__rightShiftByAbsolute(t,s):a.__leftShiftByAbsolute(t,s)}static signedRightShift(t,s){return s.length===0||t.length===0?t:s.sign?a.__leftShiftByAbsolute(t,s):a.__rightShiftByAbsolute(t,s)}static unsignedRightShift(){throw new TypeError("BigInts have no unsigned right shift; use >> instead")}static lessThan(t,s){return 0>a.__compareToBigInt(t,s)}static lessThanOrEqual(t,s){return 0>=a.__compareToBigInt(t,s)}static greaterThan(t,s){return 0t)throw new RangeError("Invalid value: not (convertible to) a safe integer");if(t===0)return a.__zero();if(t>=a.__kMaxLengthBits)return s;let c=0|(t+29)/30;if(s.lengtht)throw new RangeError("Invalid value: not (convertible to) a safe integer");if(t===0)return a.__zero();if(s.sign){if(t>a.__kMaxLengthBits)throw new RangeError("BigInt too big");return a.__truncateAndSubFromPowerOfTwo(t,s,!1)}if(t>=a.__kMaxLengthBits)return s;let c=0|(t+29)/30;if(s.length>>o?a.__truncateToNBits(t,s):s}static ADD(t,s){if(t=a.__toPrimitive(t),s=a.__toPrimitive(s),typeof t=="string")return typeof s!="string"&&(s=s.toString()),t+s;if(typeof s=="string")return t.toString()+s;if(t=a.__toNumeric(t),s=a.__toNumeric(s),a.__isBigInt(t)&&a.__isBigInt(s))return a.add(t,s);if(typeof t=="number"&&typeof s=="number")return t+s;throw new TypeError("Cannot mix BigInt and other types, use explicit conversions")}static LT(t,s){return a.__compare(t,s,0)}static LE(t,s){return a.__compare(t,s,1)}static GT(t,s){return a.__compare(t,s,2)}static GE(t,s){return a.__compare(t,s,3)}static EQ(t,s){for(;;){if(a.__isBigInt(t))return a.__isBigInt(s)?a.equal(t,s):a.EQ(s,t);if(typeof t=="number"){if(a.__isBigInt(s))return a.__equalToNumber(s,t);if(typeof s!="object")return t==s;s=a.__toPrimitive(s)}else if(typeof t=="string"){if(a.__isBigInt(s))return t=a.__fromString(t),t!==null&&a.equal(t,s);if(typeof s!="object")return t==s;s=a.__toPrimitive(s)}else if(typeof t=="boolean"){if(a.__isBigInt(s))return a.__equalToNumber(s,+t);if(typeof s!="object")return t==s;s=a.__toPrimitive(s)}else if(typeof t=="symbol"){if(a.__isBigInt(s))return!1;if(typeof s!="object")return t==s;s=a.__toPrimitive(s)}else if(typeof t=="object"){if(typeof s=="object"&&s.constructor!==a)return t==s;t=a.__toPrimitive(t)}else return t==s}}static NE(t,s){return!a.EQ(t,s)}static __zero(){return new a(0,!1)}static __oneDigit(t,s){return s=new a(1,s),s.__setDigit(0,t),s}__copy(){let t=new a(this.length,this.sign);for(let s=0;ss)s=-s-1;else{if(c===0)return-1;c--,o=t.__digit(c),s=29}if(s=1<>>20)-1023,c=(0|s/30)+1;t=new a(c,0>t);let o=1048575&a.__kBitConversionInts[1]|1048576,d=a.__kBitConversionInts[0];s%=30;let u;if(20>s){var f=20-s;u=f+32,s=o>>>f,o=o<<32-f|d>>>f,d<<=32-f}else s===20?(u=32,s=o,o=d):(f=s-20,u=32-f,s=o<>>32-f,o=d<>>2,o=o<<30|d>>>2,d<<=30):s=0,t.__setDigit(c,s);return t.__trim()}static __isWhitespace(t){return 13>=t&&9<=t||(159>=t?t==32:131071>=t?t==160||t==5760:196607>=t?(t&=131071,10>=t||t==40||t==41||t==47||t==95||t==4096):t==65279)}static __fromString(t,s){s=s===void 0?0:s;let c=0,o=t.length,d=0;if(d===o)return a.__zero();let u=t.charCodeAt(d);for(;a.__isWhitespace(u);){if(++d===o)return a.__zero();u=t.charCodeAt(d)}if(u===43){if(++d===o)return null;u=t.charCodeAt(d),c=1}else if(u===45){if(++d===o)return null;u=t.charCodeAt(d),c=-1}if(s===0){if(s=10,u===48){if(++d===o)return a.__zero();if(u=t.charCodeAt(d),u===88||u===120){if(s=16,++d===o)return null;u=t.charCodeAt(d)}else if(u===79||u===111){if(s=8,++d===o)return null;u=t.charCodeAt(d)}else if(u===66||u===98){if(s=2,++d===o)return null;u=t.charCodeAt(d)}}}else if(s===16&&u===48){if(++d===o)return a.__zero();if(u=t.charCodeAt(d),u===88||u===120){if(++d===o)return null;u=t.charCodeAt(d)}}if(c!=0&&s!==10)return null;for(;u===48;){if(++d===o)return a.__zero();u=t.charCodeAt(d)}var f=o-d;let $=a.__kMaxBitsPerChar[s];var m=a.__kBitsPerCharTableMultiplier-1;if(f>1073741824/$)return null;f=new a(0|(($*f+m>>>a.__kBitsPerCharTableShift)+29)/30,!1);let _=10>s?s:10,v=10>>0<_)m=u-48;else if((32|u)-97>>>0>>a.__kBitsPerCharTableShift)/30)}while(!A)}else{$>>=a.__kBitsPerCharTableShift,s=[];var A=[],N=!1;do{for(var M=0,R=0;;){if(u-48>>>0<_)m=u-48;else if((32|u)-97>>>0>>m-u)}if(d!==0){if(o>=t.length)throw Error("implementation bug");t.__setDigit(o++,d)}for(;o>>1)+(85&o),o=(51&o>>>2)+(51&o),o=(15&o>>>4)+(15&o),--s;let d=t.__digit(c-1);var u=a.__clz30(d),f=0|(30*c-u+o-1)/o;if(t.sign&&f++,268435456>>m,m=30-m;m>=o;)u[f--]=a.__kConversionChars[$&s],$>>>=o,m-=o}for(u[f--]=a.__kConversionChars[($|d<>>o-m;$!==0;)u[f--]=a.__kConversionChars[$&s],$>>>=o;if(t.sign&&(u[f--]="-"),f!=-1)throw Error("implementation bug");return u.join("")}static __toStringGeneric(t,s,c){var o=t.length;if(o===0)return"";if(o===1)return s=t.__unsignedDigit(0).toString(s),c===!1&&t.sign&&(s="-"+s),s;var d=30*o-a.__clz30(t.__digit(o-1));o=a.__kMaxBitsPerChar[s]-1,d*=a.__kBitsPerCharTableMultiplier,o=(0|(d+(o-1))/o)+1>>1,d=a.exponentiate(a.__oneDigit(s,!1),a.__oneDigit(o,!1));var u=d.__unsignedDigit(0);if(d.length===1&&32767>=u){d=new a(t.length,!1),d.__initializeDigits();var f=0;for(let $=2*t.length-1;0<=$;$--)f=f<<15|t.__halfDigit($),d.__setHalfDigit($,0|f/u),f=0|f%u;u=f.toString(s)}else u=a.__absoluteDivLarge(t,d,!0,!0),d=u.quotient,u=u.remainder.__trim(),u=a.__toStringGeneric(u,s,!0);for(d.__trim(),s=a.__toStringGeneric(d,s,!0);u.lengtht?a.__absoluteLess(c):0)}static __compareToNumber(t,s){if(a.__isOneDigitInt(s)){let c=t.sign,o=0>s;if(c!==o)return a.__unequalSign(c);if(t.length===0){if(o)throw Error("implementation bug");return s===0?0:-1}return 1s?a.__absoluteGreater(c):ts)return a.__unequalSign(c);if(s===0)throw Error("implementation bug: should be handled elsewhere");if(t.length===0)return-1;if(a.__kBitConversionDouble[0]=s,s=2047&a.__kBitConversionInts[1]>>>20,s==2047)throw Error("implementation bug: handled elsewhere");var o=s-1023;if(0>o)return a.__absoluteGreater(c);s=t.length;var d=t.__digit(s-1),u=a.__clz30(d),f=30*s-u;if(o+=1,fo)return a.__absoluteGreater(c);o=1048576|1048575&a.__kBitConversionInts[1];let $=a.__kBitConversionInts[0];if(u=29-u,u!==(0|(f-1)%30))throw Error("implementation bug");if(20>u){var m=20-u;u=m+32,f=o>>>m,o=o<<32-m|$>>>m,$<<=32-m}else u===20?(u=32,f=o,o=$):(m=u-20,u=32-m,f=o<>>32-m,o=$<>>=0,f>>>=0,d>f)return a.__absoluteGreater(c);if(d>>2,o=o<<30|$>>>2,$<<=30):f=0,d=t.__unsignedDigit(s),d>f)return a.__absoluteGreater(c);if(ds&&t.__unsignedDigit(0)===r(s):a.__compareToDouble(t,s)===0}static __comparisonResultToBool(t,s){return s===0?0>t:s===1?0>=t:s===2?0s;case 3:return t>=s}if(a.__isBigInt(t)&&typeof s=="string")return s=a.__fromString(s),s!==null&&a.__comparisonResultToBool(a.__compareToBigInt(t,s),c);if(typeof t=="string"&&a.__isBigInt(s))return t=a.__fromString(t),t!==null&&a.__comparisonResultToBool(a.__compareToBigInt(t,s),c);if(t=a.__toNumeric(t),s=a.__toNumeric(s),a.__isBigInt(t)){if(a.__isBigInt(s))return a.__comparisonResultToBool(a.__compareToBigInt(t,s),c);if(typeof s!="number")throw Error("implementation bug");return a.__comparisonResultToBool(a.__compareToNumber(t,s),c)}if(typeof t!="number")throw Error("implementation bug");if(a.__isBigInt(s))return a.__comparisonResultToBool(a.__compareToNumber(s,t),2^c);if(typeof s!="number")throw Error("implementation bug");return c===0?ts:c===3?t>=s:void 0}__clzmsd(){return a.__clz30(this.__digit(this.length-1))}static __absoluteAdd(t,s,c){if(t.length>>30,c.__setDigit(d,1073741823&u)}for(;d>>30,c.__setDigit(d,1073741823&s);return d>>30,c.__setDigit(d,1073741823&u)}for(;d>>30,c.__setDigit(d,1073741823&s);return c.__trim()}static __absoluteAddOne(t,s,c){c=c===void 0?null:c;let o=t.length;c===null?c=new a(o,s):c.sign=s,s=1;for(let d=0;d>>30,c.__setDigit(d,1073741823&u)}return s!=0&&c.__setDigitGrow(o,1),c}static __absoluteSubOne(t,s){let c=t.length;s=s||c;let o=new a(s,!1),d=1;for(let u=0;u>>30,o.__setDigit(u,1073741823&f)}if(d!=0)throw Error("implementation bug");for(t=c;tc?0:t.__unsignedDigit(c)>s.__unsignedDigit(c)?1:-1}static __multiplyAccumulate(t,s,c,o){if(s!==0){var d=32767&s,u=s>>>15,f=s=0;for(let v,A=0;A>>15;$=a.__imul(m,d),m=a.__imul(m,u);let N=a.__imul(_,d);_=a.__imul(_,u),v+=f+$+s,s=v>>>30,v&=1073741823,v+=((32767&m)<<15)+((32767&N)<<15),s+=v>>>30,f=_+(m>>>15)+(N>>>15),c.__setDigit(o,1073741823&v)}for(;s!=0||f!==0;o++)t=c.__digit(o),t+=s+f,f=0,s=t>>>30,c.__setDigit(o,1073741823&t)}}static __internalMultiplyAdd(t,s,c,o,d){let u=0;for(let m=0;m>>15,s),$=$+((32767&f)<<15)+u+c,c=$>>>30,u=f>>>15,d.__setDigit(m,1073741823&$)}if(d.length>o)for(d.__setDigit(o++,c+u);othis.length&&(c=this.length);let o=32767&t;t>>>=15;let d=0;for(let m=0;m>>15;u=a.__imul(f,o),f=a.__imul(f,t);let _=a.__imul($,o);$=a.__imul($,t),u=s+u+d,d=u>>>30,u&=1073741823,u+=((32767&f)<<15)+((32767&_)<<15),d+=u>>>30,s=$+(f>>>15)+(_>>>15),this.__setDigit(m,1073741823&u)}if(d!=0||s!==0)throw Error("implementation bug")}static __absoluteDivSmall(t,s,c){c=c===void 0?null:c,c===null&&(c=new a(t.length,!1));let o=0;for(let d,u=2*t.length-1;0<=u;u-=2){d=(o<<15|t.__halfDigit(u))>>>0;let f=0|d/s;o=0|d%s,d=(o<<15|t.__halfDigit(u-1))>>>0;let $=0|d/s;o=0|d%s,c.__setDigit(u>>>1,f<<15|$)}return c}static __absoluteModSmall(t,s){let c=0;for(let o=2*t.length-1;0<=o;o--)c=0|((c<<15|t.__halfDigit(o))>>>0)%s;return c}static __absoluteDivLarge(t,s,c,o){let d=s.__halfDigitLength(),u=s.length;var f=t.__halfDigitLength()-d;let $=null;c&&($=new a(f+2>>>1,!1),$.__initializeDigits());let m=new a(d+2>>>1,!1);m.__initializeDigits();let _=a.__clz15(s.__halfDigit(d-1));0<_&&(s=a.__specialLeftShift(s,_,0)),t=a.__specialLeftShift(t,_,1);let v=s.__halfDigit(d-1),A=0;for(let N,M=f;0<=M;M--){if(N=32767,f=t.__halfDigit(M+d),f!==v){f=(f<<15|t.__halfDigit(M+d-1))>>>0,N=0|f/v,f=0|f%v;let R=s.__halfDigit(d-2),H=t.__halfDigit(M+d-2);for(;a.__imul(N,R)>>>0>(f<<16|H)>>>0&&(N--,f+=v,!(32767>>1,A|N))}if(o)return t.__inplaceRightShift(_),c?{quotient:$,remainder:t}:t;if(c)return $;throw Error("unreachable")}static __clz15(t){return a.__clz30(t)-15}__inplaceAdd(t,s,c){let o=0;for(let d=0;d>>15,this.__setHalfDigit(s+d,32767&u)}return o}__inplaceSub(t,s,c){let o=0;if(1&s){s>>=1;for(var d=this.__digit(s),u=32767&d,f=0;f>>1;f++){var $=t.__digit(f);d=(d>>>15)-(32767&$)-o,o=1&d>>>15,this.__setDigit(s+f,(32767&d)<<15|32767&u),d=this.__digit(s+f+1),u=(32767&d)-($>>>15)-o,o=1&u>>>15}$=t.__digit(f);let m=(d>>>15)-(32767&$)-o;if(o=1&m>>>15,this.__setDigit(s+f,(32767&m)<<15|32767&u),s+f+1>=this.length)throw new RangeError("out of bounds");!(1&c)&&(d=this.__digit(s+f+1),u=(32767&d)-($>>>15)-o,o=1&u>>>15,this.__setDigit(s+t.length,1073709056&d|32767&u))}else{for(s>>=1,u=0;u>>15,d=(d>>>15)-($>>>15)-o,o=1&d>>>15,this.__setDigit(s+u,(32767&d)<<15|32767&f);f=this.__digit(s+u),t=t.__digit(u),d=(32767&f)-(32767&t)-o,o=1&d>>>15,$=0,!(1&c)&&($=(f>>>15)-(t>>>15)-o,o=1&$>>>15),this.__setDigit(s+u,(32767&$)<<15|32767&d)}return o}__inplaceRightShift(t){if(t!==0){var s=this.__digit(0)>>>t,c=this.length-1;for(let o=0;o>>t}this.__setDigit(c,s)}}static __specialLeftShift(t,s,c){let o=t.length,d=new a(o+c,!1);if(s===0){for(s=0;s>>30-s}return 0c)throw new RangeError("BigInt too big");s=0|c/30;var o=c%30;let d=t.length,u=o!==0&&t.__digit(d-1)>>>30-o!=0;var f=d+s+(u?1:0);if(c=new a(f,t.sign),o===0){for(o=0;o>>30-o}if(u)c.__setDigit(d+s,f);else if(f!==0)throw Error("implementation bug")}return c.__trim()}static __rightShiftByAbsolute(t,s){var c=t.length,o=t.sign,d=a.__toShiftAmount(s);if(0>d)return a.__rightShiftByMaximum(o);s=0|d/30;var u=d%30,f=c-s;if(0>=f)return a.__rightShiftByMaximum(o);if(d=!1,o){if(t.__digit(s)&(1<>>u,c=c-s-1,$=0;$>>u}o.__setDigit(c,f)}return d&&(o=a.__absoluteAddOne(o,!0,o)),o.__trim()}static __rightShiftByMaximum(t){return t?a.__oneDigit(1,!0):a.__zero()}static __toShiftAmount(t){return 1a.__kMaxLengthBits?-1:t)}static __toPrimitive(t,s){if(s=s===void 0?"default":s,typeof t!="object"||t.constructor===a)return t;let c=t[Symbol.toPrimitive];if(c){if(t=c(s),typeof t!="object")return t;throw new TypeError("Cannot convert object to primitive value")}if((s=t.valueOf)&&(s=s.call(t),typeof s!="object"))return s;if((s=t.toString)&&(t=s.call(t),typeof t!="object"))return t;throw new TypeError("Cannot convert object to primitive value")}static __toNumeric(t){return a.__isBigInt(t)?t:+t}static __isBigInt(t){return typeof t=="object"&&t!==null&&t.constructor===a}static __truncateToNBits(t,s){var c=0|(t+29)/30;let o=new a(c,s.sign);--c;for(let d=0;d>>t),o.__setDigit(c,s),o.__trim()}static __truncateAndSubFromPowerOfTwo(t,s,c){var o=Math.min,d=0|(t+29)/30;c=new a(d,c);let u=0;--d;var f=0;for(o=o(d,s.length);u>>30,c.__setDigit(u,1073741823&$)}for(;u>>t,t=1<<32-t,f=t-s-f,f&=t-1),c.__setDigit(d,f),c.__trim()}__digit(t){return this[t]}__unsignedDigit(t){return this[t]>>>0}__setDigit(t,s){this[t]=0|s}__setDigitGrow(t,s){this[t]=0|s}__halfDigitLength(){let t=this.length;return 32767>=this.__unsignedDigit(t-1)?2*t-1:2*t}__halfDigit(t){return 32767&this[t>>>1]>>>15*(1&t)}__setHalfDigit(t,s){let c=t>>>1,o=this.__digit(c);this.__setDigit(c,1&t?32767&o|s<<15:1073709056&o|32767&s)}static __digitPow(t,s){let c=1;for(;0>>=1,t*=t;return c}static __isOneDigitInt(t){return(1073741823&t)===t}}return a.__kMaxLength=33554432,a.__kMaxLengthBits=a.__kMaxLength<<5,a.__kMaxBitsPerChar=[0,0,32,51,64,75,83,90,96,102,107,111,115,119,122,126,128,131,134,136,139,141,143,145,147,149,151,153,154,156,158,159,160,162,163,165,166],a.__kBitsPerCharTableShift=5,a.__kBitsPerCharTableMultiplier=1<>>0)/t)},a.__imul=i||function(S,t){return 0|S*t},a})},function(p,b){[..."abc"].flat(),"a".matchAll(/a/g)},function(p,b,e){(function(i,n){(function(r,l){function h(A){delete f[A]}function a(A){if($)setTimeout(a,0,A);else{var N=f[A];if(N){$=!0;try{var M=N.callback,R=N.args;switch(R.length){case 0:M();break;case 1:M(R[0]);break;case 2:M(R[0],R[1]);break;case 3:M(R[0],R[1],R[2]);break;default:M.apply(l,R)}}finally{h(A),$=!1}}}}function S(){_=function(A){n.nextTick(function(){a(A)})}}function t(){if(r.postMessage&&!r.importScripts){var A=!0,N=r.onmessage;return r.onmessage=function(){A=!1},r.postMessage("","*"),r.onmessage=N,A}}function s(){var A="setImmediate$"+Math.random()+"$",N=function(M){M.source===r&&typeof M.data=="string"&&M.data.indexOf(A)===0&&a(+M.data.slice(A.length))};r.addEventListener?r.addEventListener("message",N,!1):r.attachEvent("onmessage",N),_=function(M){r.postMessage(A+M,"*")}}function c(){var A=new MessageChannel;A.port1.onmessage=function(N){a(N.data)},_=function(N){A.port2.postMessage(N)}}function o(){var A=m.documentElement;_=function(N){var M=m.createElement("script");M.onreadystatechange=function(){a(N),M.onreadystatechange=null,A.removeChild(M),M=null},A.appendChild(M)}}function d(){_=function(A){setTimeout(a,0,A)}}if(!r.setImmediate){var u=1,f={},$=!1,m=r.document,_,v=Object.getPrototypeOf&&Object.getPrototypeOf(r);v=v&&v.setTimeout?v:r,{}.toString.call(r.process)==="[object process]"?S():t()?s():r.MessageChannel?c():m&&"onreadystatechange"in m.createElement("script")?o():d(),v.setImmediate=function(A){typeof A!="function"&&(A=new Function(""+A));for(var N=Array(arguments.length-1),M=0;M"u"?typeof i>"u"?this:i:self)}).call(this,e(0),e(8))},function(p,b){function e(){throw Error("setTimeout has not been defined")}function i(){throw Error("clearTimeout has not been defined")}function n(f){if(t===setTimeout)return setTimeout(f,0);if((t===e||!t)&&setTimeout)return t=setTimeout,setTimeout(f,0);try{return t(f,0)}catch{try{return t.call(null,f,0)}catch{return t.call(this,f,0)}}}function r(f){if(s===clearTimeout)return clearTimeout(f);if((s===i||!s)&&clearTimeout)return s=clearTimeout,clearTimeout(f);try{return s(f)}catch{try{return s.call(null,f)}catch{return s.call(this,f)}}}function l(){o&&d&&(o=!1,d.length?c=d.concat(c):u=-1,c.length&&h())}function h(){if(!o){var f=n(l);o=!0;for(var $=c.length;$;){for(d=c,c=[];++u<$;)d&&d[u].run();u=-1,$=c.length}d=null,o=!1,r(f)}}function a(f,$){this.fun=f,this.array=$}function S(){}p=p.exports={};try{var t=typeof setTimeout=="function"?setTimeout:e}catch{t=e}try{var s=typeof clearTimeout=="function"?clearTimeout:i}catch{s=i}var c=[],o=!1,d,u=-1;p.nextTick=function(f){var $=Array(arguments.length-1);if(1"u"),Sk.filewrite=e.filewrite||void 0,Sk.asserts.assert(typeof Sk.filewrite=="function"||typeof Sk.filewrite>"u"),Sk.timeoutMsg=e.timeoutMsg||Sk.timeoutMsg,Sk.asserts.assert(typeof Sk.timeoutMsg=="function"),Sk.exportSymbol("Sk.timeoutMsg",Sk.timeoutMsg),Sk.sysargv=e.sysargv||Sk.sysargv,Sk.asserts.assert(Sk.isArrayLike(Sk.sysargv)),Sk.__future__=e.__future__||Sk.python3,Sk.bool_check(Sk.__future__.print_function,"Sk.__future__.print_function"),Sk.bool_check(Sk.__future__.division,"Sk.__future__.division"),Sk.bool_check(Sk.__future__.unicode_literals,"Sk.__future__.unicode_literals"),Sk.bool_check(Sk.__future__.class_repr,"Sk.__future__.class_repr"),Sk.bool_check(Sk.__future__.inherit_from_object,"Sk.__future__.inherit_from_object"),Sk.bool_check(Sk.__future__.super_args,"Sk.__future__.super_args"),Sk.bool_check(Sk.__future__.octal_number_literal,"Sk.__future__.octal_number_literal"),Sk.bool_check(Sk.__future__.bankers_rounding,"Sk.__future__.bankers_rounding"),Sk.bool_check(Sk.__future__.python_version,"Sk.__future__.python_version"),Sk.bool_check(Sk.__future__.dunder_round,"Sk.__future__.dunder_round"),Sk.bool_check(Sk.__future__.exceptions,"Sk.__future__.exceptions"),Sk.bool_check(Sk.__future__.no_long_type,"Sk.__future__.no_long_type"),Sk.bool_check(Sk.__future__.ceil_floor_int,"Sk.__future__.ceil_floor_int"),Sk.bool_check(Sk.__future__.silent_octal_literal,"Sk.__future__.silent_octal_literal"),Sk.imageProxy=e.imageProxy||"http://localhost:8080/320x",Sk.asserts.assert(typeof Sk.imageProxy=="string"||typeof Sk.imageProxy=="function"),Sk.inputfun=e.inputfun||Sk.inputfun,Sk.asserts.assert(typeof Sk.inputfun=="function"),Sk.inputfunTakesPrompt=e.inputfunTakesPrompt||!1,Sk.asserts.assert(typeof Sk.inputfunTakesPrompt=="boolean"),Sk.retainGlobals=e.retainglobals||e.retainGlobals||!1,Sk.asserts.assert(typeof Sk.retainGlobals=="boolean"),Sk.debugging=e.debugging||!1,Sk.asserts.assert(typeof Sk.debugging=="boolean"),Sk.killableWhile=e.killableWhile||!1,Sk.asserts.assert(typeof Sk.killableWhile=="boolean"),Sk.killableFor=e.killableFor||!1,Sk.asserts.assert(typeof Sk.killableFor=="boolean"),Sk.signals=e.signals,Sk.signals=Sk.signals===!0?{listeners:[],addEventListener(i){Sk.signals.listeners.push(i)},removeEventListener(i){i=Sk.signals.listeners.indexOf(i),0<=i&&Sk.signals.listeners.splice(i,1)},signal(i,n){for(var r=0;r{m+=f,u[$.$mangled]=new Sk.builtin.getset_descriptor(d,{$get(){let _=this.$s[m];if(_===void 0)throw new Sk.builtin.AttributeError($);return _},$set(_){this.$s[m]=_}})})}function a(o){for(;o.prototype.tp$base!==null;){if(o.sk$klass===void 0&&o.prototype.hasOwnProperty("__dict__"))return o=o.prototype.__dict__,Sk.builtin.checkDataDescr(o)?o:void 0;o=o.prototype.tp$base}}function S(o,d,u){if(o.sk$klass===void 0)throw new Sk.builtin.TypeError("can't set "+o.prototype.tp$name+"."+u.$jsstr());if(d===void 0)throw new Sk.builtin.TypeError("can't delete "+o.prototype.tp$name+"."+u.$jsstr())}function t(o,d){o=new Sk.builtin.super_(o,o).tp$getattr(Sk.builtin.str.$initsubclass),Sk.misceval.callsimArray(o,[],d)}function s(o){let d=o.prototype;Object.keys(d).forEach(u=>{let f=Sk.abstr.lookupSpecial(d[u],Sk.builtin.str.$setname);if(f!==void 0){let $=Sk.unfixReserved(u);try{Sk.misceval.callsimArray(f,[o,new Sk.builtin.str($)])}catch(m){throw u=new Sk.builtin.RuntimeError("Error calling __set_name__ on '"+Sk.abstr.typeName(d[u])+"' instance '"+$+"' in '"+o.prototype.tp$name+"'"),u.$cause=m,u}}})}Sk.builtin===void 0&&(Sk.builtin={}),Sk.builtin.type=function(o){return this instanceof Sk.builtin.type&&Sk.asserts.fail("calling new Sk.builtin.type is not safe"),o.ob$type},Object.defineProperties(Sk.builtin.type.prototype,{call:{value:Function.prototype.call},apply:{value:Function.prototype.apply},tp$slots:{value:{tp$doc:`type(object_or_name, bases, dict) type(object) -> the object's type -type(name, bases, dict) -> a new type`,tp$call:function(o,d){if(this===Sk.builtin.type){if(o.length===1&&(d===void 0||!d.length))return o[0].ob$type;if(o.length!==3)throw new Sk.builtin.TypeError("type() takes 1 or 3 arguments")}let u=this.prototype.tp$new(o,d);if(u.$isSuspension)return Sk.misceval.chain(u,f=>{if(u=f,u.ob$type.$isSubType(this))return u.tp$init(o,d)},()=>u);if(u.ob$type.$isSubType(this)){let f=u.tp$init(o,d);return f!==void 0&&f.$isSuspension?Sk.misceval.chain(f,()=>u):u}return u},tp$new:function(o,d){if(o.length!==3){if(o.length===1&&(d===void 0||!d.length))return o[0].ob$type;throw new Sk.builtin.TypeError("type() takes 1 or 3 arguments")}let u=o[0];var f=o[1];let $=o[2];if($.tp$name!=="dict")throw new Sk.builtin.TypeError("type() argument 3 must be dict, not "+Sk.abstr.typeName($));if(!Sk.builtin.checkString(u))throw new Sk.builtin.TypeError("type() argument 1 must be str, not "+Sk.abstr.typeName(u));let m=u.$jsstr();if(f.tp$name!=="tuple")throw new Sk.builtin.TypeError("type() argument 2 must be tuple, not "+Sk.abstr.typeName(f));f=f.sk$asarray(),o=function(){this.sk$hasDict&&(this.$d=new Sk.builtin.dict),this.$s=[]},r(m,o,f,this.constructor);let _=o.prototype;Sk.globals&&(_.__module__=Sk.globals.__name__),_.__doc__=Sk.builtin.none.none$,f=$.quick$lookup(Sk.builtin.str.$slots);let v=f===void 0,A=o.$typeLookup(Sk.builtin.str.$dict)!==void 0,N;if(f!==void 0&&(N=new Set,f=Sk.builtin.checkString(f)?[f]:Sk.misceval.arrayFromIterable(f),f.forEach(M=>{if(!Sk.builtin.checkString(M))throw new Sk.builtin.TypeError("__slots__ items must be strings, not '"+Sk.abstr.typeName(M)+"'");if(!M.$isIdentifier())throw new Sk.builtin.TypeError("__slots__ must be identifiers");if(M===Sk.builtin.str.$dict){if(A)throw new Sk.builtin.TypeError("__dict__ slot disallowed: we already got one");v=!0}else N.add(Sk.mangleName(u,M))}),f=[...N].sort((M,R)=>M.toString().localeCompare(R.toString())),h(f,o)),v&&!A&&(_.__dict__=new Sk.builtin.getset_descriptor(o,c),A=!0),Object.defineProperties(_,{ht$slots:{value:f||null,writable:!0},sk$hasDict:{value:A,writable:!0}}),$.$items().forEach(M=>{var[R,H]=M;if(N&&N.has(R))throw new Sk.builtin.ValueError("'"+R.toString()+"' in __slots__ conflicts with class variable");_[R.$mangled]=H}),_.hasOwnProperty("__qualname__")){if(f=_.__qualname__,!Sk.builtin.checkString(f))throw new Sk.builtin.TypeError("type __qualname__ must be a str, not '"+Sk.abstr.typeName(f)+"'");_.ht$qualname=f}return f=o.prototype,e(f,"__init_subclass__","classmethod"),e(f,"__new__","staticmethod"),e(f,"__class_getitem__","classmethod"),o.$allocateSlots(),s(o),t(o,d),o},tp$init:function(o,d){if(o&&o.length==1&&d&&d.length)throw new Sk.builtin.TypeError("type.__init__() takes no keyword arguments");if(o.length!=3&&o.length!=1)throw new Sk.builtin.TypeError("type.__init__() takes 1 or 3 arguments");return Sk.builtin.object.prototype.tp$init.call(this,[])},tp$getattr:function(o,d){var u=this.ob$type;let f=u.$typeLookup(o),$;if(f!==void 0&&($=f.tp$descr_get,$!==void 0&&f.tp$descr_set!==void 0))return d=$.call(f,this,u,d);if(o=this.$typeLookup(o),o!==void 0)return u=o.tp$descr_get,u!==void 0?d=u.call(o,null,this,d):o;if($!==void 0)return d=$.call(f,this,u,d);if(f!==void 0)return f},tp$setattr:function(o,d,u){if(!this.sk$klass)throw d!==void 0?new Sk.builtin.TypeError("can't set attributes of built-in/extension type '"+this.prototype.tp$name+"'"):new Sk.builtin.TypeError("can't delete attributes on type object '"+this.prototype.tp$name+"'");let f=this.ob$type.$typeLookup(o);if(f!==void 0){let $=f.tp$descr_set;if($)return $.call(f,this,d,u)}if(u=o.$mangled,d===void 0)if(d=this.prototype,d.hasOwnProperty(u))delete d[u],o=Sk.dunderToSkulpt[u],o!==void 0&&(delete this.prototype[o],d.sk$prototypical||this.$allocateGetterSlot(u));else throw new Sk.builtin.AttributeError("type object '"+this.prototype.tp$name+"' has no attribute '"+o.$jsstr()+"'");else this.prototype[u]=d,u in Sk.dunderToSkulpt&&this.$allocateSlot(u,d)},$r:function(){let o=this.prototype.__module__,d="",u="class";return o&&Sk.builtin.checkString(o)?d=o.v+".":o=null,o||this.sk$klass||Sk.__future__.class_repr||(u="type"),new Sk.builtin.str("<"+u+" '"+d+this.prototype.tp$name+"'>")}},writable:!0},tp$methods:{value:null,writable:!0},tp$classmethods:{value:null,writable:!0},tp$getsets:{value:null,writable:!0},sk$type:{value:!0},$isSubType:{value:function(o){return this===o||this.prototype instanceof o||!this.prototype.sk$prototypical&&this.prototype.tp$mro.includes(o)}},$allocateSlot:{value:function(o,d){o=Sk.slots[o];let u=o.$slot_name,f=this.prototype;f.hasOwnProperty(u)&&delete f[u],Object.defineProperty(f,u,{value:o.$slot_func(d),writable:!0,configurable:!0})}},$allocateSlots:{value:function(){let o=this.prototype;this.prototype.sk$prototypical?Object.keys(o).forEach(d=>{d in Sk.slots&&this.$allocateSlot(d,o[d])}):Object.keys(Sk.slots).forEach(d=>{o.hasOwnProperty(d)?this.$allocateSlot(d,o[d]):this.$allocateGetterSlot(d)}),o.hasOwnProperty("__eq__")&&!o.hasOwnProperty("__hash__")&&(o.tp$hash=o.__hash__=Sk.builtin.none.none$)}},$allocateGetterSlot:{value:function(o){let d=Sk.slots[o].$slot_name,u=this.prototype;u.hasOwnProperty(d)||Object.defineProperty(u,d,{configurable:!0,get(){let f=u.tp$mro;for(let $=1;$e.length)throw e=n.tp$name,new Sk.builtin.TypeError(e+".__new__(): not enough arguments");var r=e.shift();if(r.sk$type===void 0)throw e=n.tp$name,new Sk.builtin.TypeError(e+"__new__(X): X is not a type object ("+Sk.abstr.typeName(r)+")");if(!r.$isSubType(this))throw e=n.tp$name,r=r.prototype.tp$name,new Sk.builtin.TypeError(e+".__new__("+r+"): "+r+" is not a subtype of "+e);let l=r.prototype.sk$staticNew.prototype;if(l.tp$new!==n.tp$new)throw e=n.tp$name,r=r.prototype.tp$name,new Sk.builtin.TypeError(e+".__new__("+r+") is not safe, use "+l.tp$name+".__new__()");return n.tp$new.call(r.prototype,e,i)},$flags:{FastCall:!0},$textsig:"($type, *args, **kwargs)",$name:"__new__"},Sk.generic.selfIter=function(){return this},Sk.generic.iterNextWithArrayCheckSize=function(){if(this.$seq.length!==this.$orig.get$size()){let e=this.tp$name.split("_")[0];throw new Sk.builtin.RuntimeError(e+" changed size during iteration")}if(!(this.$index>=this.$seq.length))return this.$seq[this.$index++]},Sk.generic.iterNextWithArray=function(){let e=this.$seq[this.$index++];return e===void 0&&(this.tp$iternext=()=>{}),e},Sk.generic.iterLengthHintWithArrayMethodDef={$meth:function(){return new Sk.builtin.int_(this.$seq.length-this.$index)},$flags:{NoArgs:!0}},Sk.generic.iterReverseLengthHintMethodDef={$meth:function(){return new Sk.builtin.int_(this.$index)},$flags:{NoArgs:!0}},Sk.generic.getSetDict={$get(){return this.$d},$set(e){if(e===void 0)throw new Sk.builtin.TypeError("cannot delete __dict__");if(e instanceof Sk.builtin.dict)this.$d=e;else throw new Sk.builtin.TypeError("__dict__ must be set to a dictionary, not a '"+Sk.abstr.typeName(e)+"'")},$doc:"dictionary for instance variables (if defined)",$name:"__dict__"},Sk.generic.seqCompare=function(e,i){if(this===e&&Sk.misceval.opAllowsEquality(i))return!0;if(!(e instanceof this.sk$builtinBase))return Sk.builtin.NotImplemented.NotImplemented$;let n=this.v;e=e.v;let r;if(n.length!==e.length&&(i==="Eq"||i==="NotEq"))return i!=="Eq";for(r=0;r=l||r>=h)switch(i){case"Lt":return lh;case"GtE":return l>=h;default:Sk.asserts.fail()}return i==="Eq"?!1:i==="NotEq"?!0:Sk.misceval.richCompareBool(n[r],e[r],i)},Sk.generic.classGetItem={__class_getitem__:{$meth(e){return new Sk.builtin.GenericAlias(this,e)},$flags:{OneArg:!0}}}},function(p,g){Sk.builtin.pyCheckArgs=function(e,i,n,r,l,h){if(i=i.length,r===void 0&&(r=1/0),l&&--i,h&&--i,ir)throw new Sk.builtin.TypeError((n===r?e+"() takes exactly "+n+" arguments":ir)throw new Sk.builtin.TypeError((n===r?e+"() takes exactly "+n+" arguments":i{var[$,m]=f;u[m]=function(_){return this.tp$richcompare(_,$)}})}function a(u){let f=Sk.reflectedNumberSlots;Object.keys(f).forEach($=>{if(u[$]!==void 0){let m=f[$],_=m.reflected,v=u[_];v!==void 0?v===null&&delete u[_]:u[_]=m.slot||u[$]}})}function S(u){let f=Sk.sequenceAndMappingSlots;Object.keys(f).forEach($=>{u[$]!==void 0&&f[$].forEach(m=>{u[m]=u[$]})})}Sk.abstr={},Sk.abstr.typeName=function(u){if(u!=null&&u.tp$name!==void 0){let f=u.ht$name;return f!==void 0?f.toString():(f=u.tp$name,f.includes(".")&&(f=f.slice(f.lastIndexOf(".")+1)),f)}return Sk.asserts.fail(u+" passed to typeName"),""};let t={Add:"+",Sub:"-",Mult:"*",MatMult:"@",Div:"/",FloorDiv:"//",Mod:"%",DivMod:"divmod()",Pow:"** or pow()",LShift:"<<",RShift:">>",BitAnd:"&",BitXor:"^",BitOr:"|"},s={UAdd:"+",USub:"-",Invert:"~"};Sk.abstr.numberBinOp=function(u,f,$){var m;if(!(m=r(u,f,$)))throw u=Sk.abstr.typeName(u),f=Sk.abstr.typeName(f),new Sk.builtin.TypeError("unsupported operand type(s) for "+t[$]+": '"+u+"' and '"+f+"'");return m},Sk.exportSymbol("Sk.abstr.numberBinOp",Sk.abstr.numberBinOp),Sk.abstr.numberInplaceBinOp=function(u,f,$){var m;if(!(m=l(u,f,$)))throw u=Sk.abstr.typeName(u),f=Sk.abstr.typeName(f),new Sk.builtin.TypeError("unsupported operand type(s) for "+t[$]+"=: '"+u+"' and '"+f+"'");return m},Sk.exportSymbol("Sk.abstr.numberInplaceBinOp",Sk.abstr.numberInplaceBinOp),Sk.abstr.numberUnaryOp=function(u,f){if(f==="Not")return Sk.misceval.isTrue(u)?Sk.builtin.bool.false$:Sk.builtin.bool.true$;e:{switch(f){case"USub":var $=u.nb$negative;break e;case"UAdd":$=u.nb$positive;break e;case"Invert":$=u.nb$invert;break e}$=void 0}if($=$!==void 0?$.call(u):void 0,!$)throw u=Sk.abstr.typeName(u),new Sk.builtin.TypeError("bad operand type for unary "+s[f]+": '"+u+"'");return $},Sk.exportSymbol("Sk.abstr.numberUnaryOp",Sk.abstr.numberUnaryOp),Sk.abstr.fixSeqIndex_=function(u,f){return f=Sk.builtin.asnum$(f),0>f&&u.sq$length&&(f+=u.sq$length()),f},Sk.abstr.sequenceContains=function(u,f,$){return u.sq$contains?u.sq$contains(f,$):(u=Sk.misceval.iterFor(Sk.abstr.iter(u),function(m){return m===f||Sk.misceval.richCompareBool(m,f,"Eq")?new Sk.misceval.Break(!0):!1},!1),$?u:Sk.misceval.retryOptionalSuspensionOrThrow(u))},Sk.abstr.sequenceConcat=function(u,f){if(u.sq$concat)return u.sq$concat(f);if(Sk.builtin.checkSequence(u)&&Sk.builtin.checkSequence(f)&&(f=r(u,f,"Add"),f!==void 0))return f;throw new Sk.builtin.TypeError("'"+Sk.abstr.typeName(u)+"' object can't be concatenated")},Sk.abstr.sequenceInPlaceConcat=function(u,f){if(u.sq$inplace_concat)return u.sq$inplace_concat(f);if(u.sq$concat)return u.sq$concat(f);if(Sk.builtin.checkSequence(u)&&Sk.builtin.checkSequence(f)&&(f=l(u,f,"Add"),f!==void 0))return f;throw new Sk.builtin.TypeError("'"+Sk.abstr.typeName(u)+"' object can't be concatenated")},Sk.abstr.sequenceGetIndexOf=function(u,f){if(u.index)return Sk.misceval.callsimArray(u.index,[u,f]);let $=0;for(let m=Sk.abstr.iter(u),_=m.tp$iternext();_!==void 0;_=m.tp$iternext()){if(Sk.misceval.richCompareBool(f,_,"Eq"))return new Sk.builtin.int_($);$+=1}throw new Sk.builtin.ValueError("sequence.index(x): x not in sequence")},Sk.abstr.sequenceGetCountOf=function(u,f){if(u.count)return Sk.misceval.callsimArray(u.count,[u,f]);let $=0;for(let m=Sk.abstr.iter(u),_=m.tp$iternext();_!==void 0;_=m.tp$iternext())Sk.misceval.richCompareBool(f,_,"Eq")&&($+=1);return new Sk.builtin.int_($)},Sk.abstr.sequenceGetItem=function(u,f,$){return typeof f=="number"&&(f=new Sk.builtin.int_(f)),Sk.abstr.objectGetItem(u,f,$)},Sk.abstr.sequenceSetItem=function(u,f,$,m){return typeof f=="number"&&(f=new Sk.builtin.int_(f)),Sk.abstr.objectSetItem(u,f,$,m)},Sk.abstr.sequenceDelItem=function(u,f,$){return Sk.abstr.objectDelItem(u,f,$)},Sk.abstr.sequenceGetSlice=function(u,f,$){return Sk.abstr.objectGetItem(u,new Sk.builtin.slice(f,$))},Sk.abstr.sequenceDelSlice=function(u,f,$){return Sk.abstr.objectDelItem(u,new Sk.builtin.slice(f,$))},Sk.abstr.sequenceSetSlice=function(u,f,$,m){return Sk.abstr.objectSetItem(u,new Sk.builtin.slice(f,$))},Sk.abstr.sequenceUnpack=function(u,f,$,m){if(!Sk.builtin.checkIterable(u))throw new Sk.builtin.TypeError("cannot unpack non-iterable "+Sk.abstr.typeName(u)+" object");let _=Sk.abstr.iter(u),v=[],A=0,N;return 0{if(v.push(M),++A===f)return new Sk.misceval.Break})),Sk.misceval.chain(N,()=>{if(v.length{if(R!==void 0)throw new Sk.builtin.ValueError("too many values to unpack (expected "+f+")");return v});let M=[];return Sk.misceval.chain(Sk.misceval.iterFor(_,R=>{M.push(R)}),()=>{let R=M.length+f-$;if(0>R)throw new Sk.builtin.ValueError("not enough values to unpack (expected at least "+$+", got "+($+R)+")");return v.push(new Sk.builtin.list(M.slice(0,R))),v.push(...M.slice(R)),v})})},Sk.abstr.mappingUnpackIntoKeywordArray=function(u,f,$){if(f instanceof Sk.builtin.dict)f.$items().forEach(_=>{var[v,A]=_;if(!Sk.builtin.checkString(v))throw new Sk.builtin.TypeError(($.$qualname?$.$qualname+"() ":"")+"keywords must be strings");u.push(v.v),u.push(A)});else{var m=Sk.abstr.lookupSpecial(f,Sk.builtin.str.$keys);if(m===void 0)throw new Sk.builtin.TypeError("Object is not a mapping");return Sk.misceval.chain(Sk.misceval.callsimOrSuspendArray(m),_=>Sk.misceval.iterFor(Sk.abstr.iter(_),v=>{if(!Sk.builtin.checkString(v))throw new Sk.builtin.TypeError(($.$qualname?$.$qualname+"() ":"")+"keywords must be strings");return Sk.misceval.chain(f.mp$subscript(v,!0),A=>{u.push(v.v),u.push(A)})}))}},Sk.abstr.keywordArrayFromPyDict=function(u){let f=[];return u.$items().forEach($=>{var[m,_]=$;if(!Sk.builtin.checkString(m))throw new Sk.builtin.TypeError("keywords must be strings");f.push(m.toString()),f.push(_)}),f},Sk.abstr.keywordArrayToPyDict=function(u){let f=new Sk.builtin.dict;for(let $=0;$f.length)throw new Sk.builtin.TypeError(u+"() expected at most "+f.length+" arguments ("+v+" given)");if(m.length||_!==void 0){if(v===f.length&&!m.length)return $;if(v===0&&f.length===(_&&_.length))return _}else return $;for($=$.slice(0),v=0;v$[N]===void 0),f.length)throw new Sk.builtin.TypeError(u+"() missing "+f.length+" required positional arguments: "+f.join(", "))}return $},Sk.exportSymbol("Sk.abstr.copyKeywordsToNamedArgs",Sk.abstr.copyKeywordsToNamedArgs),Sk.abstr.checkNoKwargs=function(u,f){if(f&&f.length)throw new Sk.builtin.TypeError(u+"() takes no keyword arguments")},Sk.exportSymbol("Sk.abstr.checkNoKwargs",Sk.abstr.checkNoKwargs),Sk.abstr.checkNoArgs=function(u,f,$){if(f=f.length+($?$.length:0))throw new Sk.builtin.TypeError(u+"() takes no arguments ("+f+" given)")},Sk.exportSymbol("Sk.abstr.checkNoArgs",Sk.abstr.checkNoArgs),Sk.abstr.checkOneArg=function(u,f,$){if(Sk.abstr.checkNoKwargs(u,$),f.length!==1)throw new Sk.builtin.TypeError(u+"() takes exactly one argument ("+f.length+" given)")},Sk.exportSymbol("Sk.abstr.checkOneArg",Sk.abstr.checkOneArg),Sk.abstr.checkArgsLen=function(u,f,$,m){if(f=f.length,m===void 0&&(m=1/0),f<$||f>m)throw new Sk.builtin.TypeError(($===m?u+"() takes exactly "+$+" arguments":f<$?u+"() takes at least "+$+" arguments":u+"() takes at most "+m+" arguments")+(" ("+f+" given)"))},Sk.exportSymbol("Sk.abstr.checkArgsLen",Sk.abstr.checkArgsLen),Sk.abstr.objectFormat=function(u,f){if(f===void 0)f=Sk.builtin.str.$emptystr;else if(!Sk.builtin.checkString(f))throw new Sk.builtin.TypeError("Format specifier must be a string, not "+Sk.abstr.typeName(f));if(u=Sk.abstr.lookupSpecial(u,Sk.builtin.str.$format),f=Sk.misceval.callsimArray(u,[f]),!Sk.builtin.checkString(f))throw new Sk.builtin.TypeError("__format__ must return a str, not "+Sk.abstr.typeName(f));return f},Sk.abstr.objectHash=function(u){let f=u.tp$hash;if(f!==void 0){if(Sk.builtin.checkNone(f))throw new Sk.builtin.TypeError("unhashable type: '"+Sk.abstr.typeName(u)+"'");return u.tp$hash()}throw new Sk.builtin.TypeError("unsupported Javascript type")},Sk.abstr.objectAdd=function(u,f){if(u.nb$add)return u.nb$add(f);throw u=Sk.abstr.typeName(u),f=Sk.abstr.typeName(f),new Sk.builtin.TypeError("unsupported operand type(s) for +: '"+u+"' and '"+f+"'")},Sk.abstr.objectNegative=function(u){if(u.nb$negative)return u.nb$negative();throw new Sk.builtin.TypeError("bad operand type for unary -: '"+Sk.abstr.typeName(u)+"'")},Sk.abstr.objectPositive=function(u){if(u.nb$positive)return u.nb$positive();throw new Sk.builtin.TypeError("bad operand type for unary +: '"+Sk.abstr.typeName(u)+"'")},Sk.abstr.objectDelItem=function(u,f,$){if(u.mp$ass_subscript)return u.mp$ass_subscript(f,void 0,$);throw new Sk.builtin.TypeError("'"+Sk.abstr.typeName(u)+"' object does not support item deletion")},Sk.exportSymbol("Sk.abstr.objectDelItem",Sk.abstr.objectDelItem),Sk.abstr.objectGetItem=function(u,f,$){if(u.mp$subscript)return u.mp$subscript(f,$);if(Sk.builtin.checkClass(u)){if(u===Sk.builtin.type)return new Sk.builtin.GenericAlias(u,f);let m=Sk.abstr.typeLookup(u,Sk.builtin.str.$class_getitem);if(m!==void 0)return u=Sk.misceval.callsimOrSuspendArray(m,[f]),$?u:Sk.misceval.retryOptionalSuspensionOrThrow(u)}throw new Sk.builtin.TypeError("'"+Sk.abstr.typeName(u)+"' does not support indexing")},Sk.exportSymbol("Sk.abstr.objectGetItem",Sk.abstr.objectGetItem),Sk.abstr.objectSetItem=function(u,f,$,m){if(u.mp$ass_subscript)return u.mp$ass_subscript(f,$,m);throw new Sk.builtin.TypeError("'"+Sk.abstr.typeName(u)+"' does not support item assignment")},Sk.exportSymbol("Sk.abstr.objectSetItem",Sk.abstr.objectSetItem),Sk.abstr.gattr=function(u,f,$){if($=u.tp$getattr(f,$),$===void 0)throw new Sk.builtin.AttributeError(u.sk$attrError()+" has no attribute '"+f.$jsstr()+"'");return $.$isSuspension?Sk.misceval.chain($,function(m){if(m===void 0)throw new Sk.builtin.AttributeError(u.sk$attrError()+" has no attribute '"+f.$jsstr()+"'");return m}):$},Sk.exportSymbol("Sk.abstr.gattr",Sk.abstr.gattr),Sk.abstr.sattr=function(u,f,$,m){return u.tp$setattr(f,$,m)},Sk.exportSymbol("Sk.abstr.sattr",Sk.abstr.sattr),Sk.abstr.iternext=function(u,f){return u.tp$iternext(f)},Sk.exportSymbol("Sk.abstr.iternext",Sk.abstr.iternext),Sk.abstr.iter=function(u){if(u.tp$iter){if(u=u.tp$iter(),u.tp$iternext)return u;throw new Sk.builtin.TypeError("iter() returned non-iterator of type '"+Sk.abstr.typeName(u)+"'")}if(u.mp$subscript)return new Sk.builtin.seq_iter_(u);throw new Sk.builtin.TypeError("'"+Sk.abstr.typeName(u)+"' object is not iterable")},Sk.exportSymbol("Sk.abstr.iter",Sk.abstr.iter),Sk.abstr.lookupSpecial=function(u,f){var $=u.ob$type;if($===void 0)Sk.asserts.fail("javascript object sent to lookupSpecial");else if(f=$.$typeLookup(f),f!==void 0)return f.tp$descr_get!==void 0&&(f=f.tp$descr_get(u,$)),f},Sk.exportSymbol("Sk.abstr.lookupSpecial",Sk.abstr.lookupSpecial),Sk.abstr.lookupAttr=function(u,f){try{return u.tp$getattr(f)}catch($){if(!($ instanceof Sk.builtin.AttributeError))throw $}},Sk.abstr.typeLookup=function(u,f){return f=u.$typeLookup(f),f!==void 0&&f.tp$descr_get?f.tp$descr_get(null,u):f},Sk.abstr.markUnhashable=function(u){u=u.prototype,u.__hash__=Sk.builtin.none.none$,u.tp$hash=Sk.builtin.none.none$},Sk.abstr.setUpInheritance=function(u,f,$,m){m=m||Sk.builtin.type,$=$===void 0?Sk.builtin.object:$;let _=$!==null?$.prototype:null;Object.setPrototypeOf(f,m.prototype),Object.setPrototypeOf(f.prototype,_),Object.defineProperties(f.prototype,{sk$object:{value:f,writable:!0},ob$type:{value:f,writable:!0},tp$name:{value:u,writable:!0},tp$base:{value:$,writable:!0}})},Sk.abstr.setUpBuiltinMro=function(u){let f=u.prototype.tp$base,$=f===null?[]:[f];(f===Sk.builtin.object||f===null)&&(Object.defineProperty(u,"sk$baseClass",{value:!0,writable:!0}),Object.defineProperty(u.prototype,"sk$builtinBase",{value:u,writable:!0})),Object.defineProperty(u,"sk$solidBase",{value:!0,writable:!0});let m=[u];for(;f!==null;)m.push(f),f=f.prototype.tp$base;Object.defineProperties(u.prototype,{sk$prototypical:{value:!0,writable:!0},tp$bases:{value:$,writable:!0},tp$mro:{value:m,writable:!0}}),Object.defineProperty(u,"$typeLookup",{value:function(_){return this.prototype[_.$mangled]},writable:!0})};let c=u=>Sk.builtin.str&&Sk.builtin.str.$fixReserved?(c=Sk.builtin.str.$fixReserved,Sk.builtin.str.$fixReserved(u)):u;Sk.abstr.setUpGetSets=function(u,f){if(Sk.builtin.getset_descriptor!==void 0){var $=u.prototype;f=f||$.tp$getsets||{},Object.entries(f).forEach(m=>{var[_,v]=m;v.$name=_,$[c(_)]=new Sk.builtin.getset_descriptor(u,v)}),Object.defineProperty($,"tp$getsets",{value:null,writable:!0})}},Sk.abstr.setUpMethods=function(u,f){if(Sk.builtin.method_descriptor!==void 0){var $=u.prototype;f=f||$.tp$methods||{},Object.entries(f).forEach(m=>{var[_,v]=m;v.$name=_,$[c(_)]=new Sk.builtin.method_descriptor(u,v)}),Object.defineProperty($,"tp$methods",{value:null,writable:!0})}},Sk.abstr.setUpClassMethods=function(u,f){if(Sk.builtin.classmethod_descriptor!==void 0){var $=u.prototype;f=f||$.tp$classmethods||{},Object.entries(f).forEach(m=>{var[_,v]=m;v.$name=_,$[c(_)]=new Sk.builtin.classmethod_descriptor(u,v)}),Object.defineProperty($,"tp$classmethods",{value:null,writable:!0})}};let o={Eq:"ob$eq",NotEq:"ob$ne",Gt:"ob$gt",GtE:"ob$ge",Lt:"ob$lt",LtE:"ob$le"},d=Object.entries(o);Sk.abstr.setUpSlots=function(u,f){function $(A,N){_[A]=new Sk.builtin.wrapper_descriptor(u,Sk.slots[A],N)}function m(A,N){typeof A=="string"?$(A,N):A.forEach(M=>{$(M,N)})}if(Sk.builtin.wrapper_descriptor!==void 0){var _=u.prototype;f=f||_.tp$slots||{},f.tp$new===Sk.generic.new&&(f.tp$new=Sk.generic.new(u)),f.tp$richcompare?h(f):f.ob$eq&&(f.tp$richcompare=function(A,N){return this[o[N]].call(this,A)}),f.tp$as_number&&a(f),f.tp$as_sequence_or_mapping&&S(f),Object.entries(f).forEach(A=>{var[N,M]=A;Object.defineProperty(_,N,{value:M,writable:!0})}),f.tp$new&&(_.__new__=new Sk.builtin.sk_method(Sk.generic.newMethodDef,u),Object.defineProperty(_,"sk$staticNew",{value:u,writable:!0})),Sk.subSlots.main_slots.forEach(A=>{var[N,M]=A;A=f[N],A!==void 0&&m(M,A)});var v=f.tp$hash;v!==void 0&&(typeof v=="function"?$("__hash__",v):v===Sk.builtin.none.none$?_.__hash__=v:Sk.asserts.fail("invalid tp$hash")),f.tp$as_number&&Sk.subSlots.number_slots.forEach(A=>{var[N,M]=A;A=f[N],A!==void 0&&m(M,A)}),f.tp$as_sequence_or_mapping&&Sk.subSlots.sequence_and_mapping_slots.forEach(A=>{var[N,M]=A;A=f[N],A!==void 0&&m(M,A)}),Object.defineProperty(_,"tp$slots",{value:null,writable:!0})}},Sk.abstr.buildNativeClass=function(u,f){f=f||{},Sk.asserts.assert(f.hasOwnProperty("constructor"),"A constructor is required to build a native class");let $=f.constructor;Sk.abstr.setUpInheritance(u,$,f.base,f.meta),Sk.abstr.setUpBuiltinMro($);let m=$.prototype;return Object.defineProperties(m,{tp$slots:{value:f.slots,writable:!0},tp$getsets:{value:f.getsets,writable:!0},tp$methods:{value:f.methods,writable:!0},tp$classmethods:{value:f.classmethods,writable:!0}}),Sk.abstr.setUpSlots($,f.slots||{}),Sk.abstr.setUpMethods($,f.methods),Sk.abstr.setUpGetSets($,f.getsets),Sk.abstr.setUpClassMethods($,f.classmethods),Object.entries(f.proto||{}).forEach(_=>{var[v,A]=_;Object.defineProperty(m,v,{value:A,writable:!0,enumerable:!(v.includes("$")||v in Object.prototype)})}),Object.entries(f.flags||{}).forEach(_=>{var[v,A]=_;Object.defineProperty($,v,{value:A,writable:!0})}),m.hasOwnProperty("tp$iter")&&(m[Symbol.iterator]=function(){return this.tp$iter()[Symbol.iterator]()}),Sk.builtin.str!==void 0&&m.hasOwnProperty("tp$doc")&&!m.hasOwnProperty("__doc__")&&(u=m.tp$doc||null,m.__doc__=typeof u=="string"?new Sk.builtin.str(u):Sk.builtin.none.none$),$},Sk.abstr.buildIteratorClass=function(u,f){return Sk.asserts.assert(f.hasOwnProperty("constructor"),"must provide a constructor"),f.slots=f.slots||{},f.slots.tp$iter=Sk.generic.selfIter,f.slots.tp$iternext=f.slots.tp$iternext||f.iternext,f.slots.tp$getattr=f.slots.tp$getattr||Sk.generic.getAttr,u=Sk.abstr.buildNativeClass(u,f),Sk.abstr.built$iterators.push(u),u.prototype[Symbol.iterator]=function(){return{next:()=>{let $=this.tp$iternext();return{value:$,done:$===void 0}}}},u},Sk.abstr.built$iterators=[],Sk.abstr.setUpModuleMethods=function(u,f,$){return Object.entries($).forEach(m=>{var[_,v]=m;v.$name=v.$name||_,f[_]=new Sk.builtin.sk_method(v,null,u)}),f},Sk.abstr.superConstructor=function(u,f,$){var m=Array.prototype.slice.call(arguments,2);u.prototype.tp$base.apply(f,m)}},function(p,g){function e(r){let l=r.prototype,h=l.tp$base;if(h==null)return!1;let a=h.prototype;return!(h.sk$solidSlotBase||r.sk$solidSlotBase||a.sk$hasDict!==l.sk$hasDict||h.sk$solidBase&&h!==Sk.builtin.module)}function i(r,l){r=r.prototype,l=l.prototype;let h=r.ht$slots,a=l.ht$slots;return r.sk$hasDict!==l.sk$hasDict?!1:h===a?!0:h&&a?h.length===a.length&&h.every((S,t)=>S===a[t]):(h&&(h.length||null))===(a&&(a.length||null))}let n=new WeakMap;Sk.builtin.object=Sk.abstr.buildNativeClass("object",{constructor:function(){Sk.asserts.assert(this instanceof Sk.builtin.object,"bad call to object, use 'new'")},base:null,slots:{tp$new(r,l){if(r.length||l&&l.length){if(this.tp$new!==Sk.builtin.object.prototype.tp$new)throw new Sk.builtin.TypeError("object.__new__() takes exactly one argument (the type to instantiate)");if(this.tp$init===Sk.builtin.object.prototype.tp$init)throw new Sk.builtin.TypeError(Sk.abstr.typeName(this)+"() takes no arguments")}return new this.constructor},tp$init(r,l){if(r.length||l&&l.length){if(this.tp$init!==Sk.builtin.object.prototype.tp$init)throw new Sk.builtin.TypeError("object.__init__() takes exactly one argument (the instance to initialize)");if(this.tp$new===Sk.builtin.object.prototype.tp$new)throw new Sk.builtin.TypeError(Sk.abstr.typeName(this)+".__init__() takes exactly one argument (the instance to initialize)")}},tp$getattr:Sk.generic.getAttr,tp$setattr:Sk.generic.setAttr,$r(){let r=Sk.abstr.lookupSpecial(this,Sk.builtin.str.$module),l="";return r&&Sk.builtin.checkString(r)&&(l=r.v+"."),new Sk.builtin.str("<"+l+Sk.abstr.typeName(this)+" object>")},tp$str(){return this.$r()},tp$hash(){let r=n.get(this);return r!==void 0||(r=Math.floor(Math.random()*Number.MAX_SAFE_INTEGER-Number.MAX_SAFE_INTEGER/2),n.set(this,r)),r},tp$richcompare(r,l){switch(l){case"Eq":r=this===r||Sk.builtin.NotImplemented.NotImplemented$;break;case"NotEq":r=this.ob$eq(r,"Eq"),r!==Sk.builtin.NotImplemented.NotImplemented$&&(r=!Sk.misceval.isTrue(r));break;default:r=Sk.builtin.NotImplemented.NotImplemented$}return r},tp$doc:"The most base type"},getsets:{__class__:{$get(){return this.ob$type},$set(r){if(r===void 0)throw new Sk.builtin.TypeError("can't delete __class__ attribute");if(!Sk.builtin.checkClass(r))throw new Sk.builtin.TypeError("__class__ must be set to a class, not '"+Sk.abstr.typeName(r)+"' object");let l=this.ob$type;if(!(l.$isSubType(Sk.builtin.module)&&r.$isSubType(Sk.builtin.module)||l.prototype.ht$type!==void 0&&r.prototype.ht$type!==void 0))throw new Sk.builtin.TypeError(" __class__ assignment only supported for heap types or ModuleType subclasses");{let h=l,a=r;for(;e(h);)h=h.prototype.tp$base;for(;e(a);)a=a.prototype.tp$base;if(h!==a&&(h.prototype.tp$base!==a.prototype.tp$base||!i(h,a)))throw new Sk.builtin.TypeError("__class__ assignment: '"+r.prototype.tp$name+"' object layout differs from '"+l.prototype.tp$name+"'")}Object.setPrototypeOf(this,r.prototype)},$doc:"the object's class"}},methods:{__dir__:{$meth:function(){let r=Sk.abstr.lookupAttr(this,Sk.builtin.str.$dict);r=r===void 0?new Sk.builtin.dict([]):r instanceof Sk.builtin.dict?r.dict$copy():new Sk.builtin.dict([]);let l=Sk.abstr.lookupAttr(this,Sk.builtin.str.$class);return l!==void 0&&l.$mergeClassDict(r),new Sk.builtin.list(r.sk$asarray())},$flags:{NoArgs:!0},$doc:"Default dir() implementation."},__format__:{$meth(r){if(!Sk.builtin.checkString(r))throw new Sk.builtin.TypeError("__format__() argument must be str, not "+Sk.abstr.typeName(r));if(r!==Sk.builtin.str.$empty)throw new Sk.builtin.TypeError(`unsupported format string passed to ${Sk.abstr.typeName(this)}.__format__`);return this.tp$str()},$flags:{OneArg:!0},$doc:"Default object formatter."}},classmethods:{__init_subclass__:{$meth(r){return Sk.builtin.none.none$},$flags:{FastCall:!0,NoKwargs:!0}}},proto:{valueOf:Object.prototype.valueOf,toString(){return this.tp$str().v},hasOwnProperty:Object.prototype.hasOwnProperty,ht$type:void 0,sk$attrError(){return"'"+this.tp$name+"' object"},$mergeClassDict(r){var l=Sk.abstr.lookupAttr(this,Sk.builtin.str.$dict);if(l!==void 0&&r.dict$merge(l),l=Sk.abstr.lookupAttr(this,Sk.builtin.str.$bases),l!==void 0){var h=Sk.builtin.len(l).valueOf();for(let a=0;aN===void 0?Sk.builtin.none.none$:N)}function r(_,v,A){return Sk.abstr.checkNoKwargs(this.$name,A),Sk.abstr.checkArgsLen(this.$name,v,1,2),_=this.call(_,...v),_===void 0?Sk.builtin.none.none$:_}function l(_,v,A){return Sk.abstr.checkNoKwargs(this.$name,A),Sk.abstr.checkArgsLen(this.$name,v,2,2),Sk.misceval.chain(this.call(_,v[0],v[1],!0),()=>Sk.builtin.none.none$)}function h(_,v,A){return Sk.abstr.checkOneArg(this.$name,v,A),_=this.call(_,v[0],void 0,!0),Sk.misceval.chain(_,N=>N===void 0?Sk.builtin.none.none$:N)}function a(_,v,A){return _=i.call(this,_,v,A),_===Sk.builtin.NotImplemented.NotImplemented$?_:new Sk.builtin.bool(_)}function S(_,v,A){return function(N,M,R){return N=_.call(this,N,M,R),A?Sk.misceval.chain(N,v):v(Sk.misceval.retryOptionalSuspensionOrThrow(N))}}function t(_){return function(){let v=_.tp$descr_get?_.tp$descr_get(this,this.ob$type):_;return Sk.misceval.callsimArray(v,[])}}function s(_,v,A,N){return function(M){return function(){var R=M.tp$descr_get?M.tp$descr_get(this,this.ob$type):M;if(R=Sk.misceval.callsimArray(R,[]),!v(R))throw new Sk.builtin.TypeError(_+" should return "+A+" (returned "+Sk.abstr.typeName(R)+")");return N!==void 0?N(R):R}}}function c(_){return function(v){let A=_.tp$descr_get?_.tp$descr_get(this,this.ob$type):_;return Sk.misceval.callsimArray(A,[v])}}function o(_,v){let A=this.ob$type.$typeLookup(Sk.builtin.str.$getattribute);if(A instanceof Sk.builtin.wrapper_descriptor)return A.d$wrapped.call(this,_,v);A.tp$descr_get&&(A=A.tp$descr_get(this,this.ob$type));let N=Sk.misceval.tryCatch(()=>Sk.misceval.callsimOrSuspendArray(A,[_]),M=>{if(!(M instanceof Sk.builtin.AttributeError))throw M});return v?N:Sk.misceval.retryOptionalSuspensionOrThrow(N)}function d(_,v,A){return function(N){return function(M,R,H){let ee;R===void 0?(ee=v,A=null):ee=_;let Y=this.ob$type.$typeLookup(new Sk.builtin.str(ee));if(Y instanceof Sk.builtin.wrapper_descriptor)return Y.d$wrapped.call(this,M,R);if(Y.tp$descr_get&&(Y=Y.tp$descr_get(this,this.ob$type,H)),Y!==void 0)M=Sk.misceval.callsimOrSuspendArray(Y,R===void 0?[M]:[M,R]);else throw A?new Sk.builtin.TypeError("'"+Sk.abstr.typeName(this)+"' object "+A):new Sk.builtin.AttributeError(ee);return H?M:Sk.misceval.retryOptionalSuspensionOrThrow(M)}}}function u(_,v){let A=_.ob$type;for(;A&&A.sk$klass!==void 0;)A=A.prototype.tp$base;if(A&&A.prototype.tp$setattr!==v)throw new Sk.builtin.TypeError("can't apply this "+v.$name+" to "+Sk.abstr.typeName(_)+" object")}Sk.slots=Object.create(null),p=Sk.slots,Sk.slots.__init__={$name:"__init__",$slot_name:"tp$init",$slot_func:function(_){return function(v,A){let N=_.tp$descr_get?_.tp$descr_get(this,this.ob$type):_;return v=Sk.misceval.callsimOrSuspendArray(N,v,A),Sk.misceval.chain(v,M=>{if(!Sk.builtin.checkNone(M)&&M!==void 0)throw new Sk.builtin.TypeError("__init__() should return None, not "+Sk.abstr.typeName(M))})}},$wrapper:function(_,v,A){return this.call(_,v,A),Sk.builtin.none.none$},$textsig:"($self, /, *args, **kwargs)",$flags:{FastCall:!0},$doc:"Initialize self. See help(type(self)) for accurate signature."},p.__new__={$name:"__new__",$slot_name:"tp$new",$slot_func:function(_){let v=function(A,N){let M=_;return _.tp$descr_get&&(M=_.tp$descr_get(null,this.constructor)),Sk.misceval.callsimOrSuspendArray(M,[this.constructor,...A],N)};return v.sk$static_new=!1,v},$wrapper:null,$textsig:"($self, /, *args, **kwargs)",$flags:{FastCall:!0},$doc:"Create and return a new object."},p.__call__={$name:"__call__",$slot_name:"tp$call",$slot_func:function(_){return function(v,A){let N=_.tp$descr_get?_.tp$descr_get(this,this.ob$type):_;return Sk.misceval.callsimOrSuspendArray(N,v,A)}},$wrapper:function(_,v,A){return _=this.call(_,v,A),_===void 0?Sk.builtin.none.none$:_},$textsig:"($self, /, *args, **kwargs)",$flags:{FastCall:!0},$doc:"Call self as a function."},p.__repr__={$name:"__repr__",$slot_name:"$r",$slot_func:s("__repr__",Sk.builtin.checkString,"str"),$wrapper:e,$textsig:"($self, /)",$flags:{NoArgs:!0},$doc:"Return repr(self)."},p.__str__={$name:"__str__",$slot_name:"tp$str",$slot_func:s("__str__",Sk.builtin.checkString,"str"),$wrapper:e,$textsig:"($self, /)",$flags:{NoArgs:!0},$doc:"Return str(self)."};var f=s("__hash__",Sk.builtin.checkInt,"int",_=>typeof _.v=="number"?_.v:_.tp$hash());p.__hash__={$name:"__hash__",$slot_name:"tp$hash",$slot_func:function(_){return _===Sk.builtin.none.none$?Sk.builtin.none.none$:f(_)},$wrapper:S(e,_=>new Sk.builtin.int_(_)),$textsig:"($self, /)",$flags:{NoArgs:!0},$doc:"Return hash(self)."},p.__getattribute__={$name:"__getattribute__",$slot_name:"tp$getattr",$slot_func:function(_){return function(v,A){let N=this.ob$type.$typeLookup(Sk.builtin.str.$getattr);if(N===void 0)return o.call(this,v,A);let M=Sk.misceval.chain(o.call(this,v,A),R=>Sk.misceval.tryCatch(()=>R!==void 0?R:(N.tp$descr_get&&(N=N.tp$descr_get(this,this.ob$type)),Sk.misceval.callsimOrSuspendArray(N,[v])),function(H){if(!(H instanceof Sk.builtin.AttributeError))throw H}));return A?M:Sk.misceval.retryOptionalSuspensionOrThrow(M)}},$wrapper:function(_,v,A){Sk.abstr.checkOneArg(this.$name,v,A);let N=v[0];if(!Sk.builtin.checkString(N))throw new Sk.builtin.TypeError("attribute name must be string, not '"+Sk.abstr.typeName(N)+"'");return v=this.call(_,N,!0),Sk.misceval.chain(v,M=>{if(M===void 0)throw new Sk.builtin.AttributeError(Sk.abstr.typeName(_)+" has no attribute "+N.$jsstr());return M})},$textsig:"($self, name, /)",$flags:{OneArg:!0},$doc:"Return getattr(self, name)."},p.__getattr__={$name:"__getattr__",$slot_name:"tp$getattr",$slot_func:p.__getattribute__.$slot_func,$wrapper:null,$textsig:"($self, name, /)",$flags:{OneArg:!0},$doc:"Return getattr(self, name)."},p.__setattr__={$name:"__setattr__",$slot_name:"tp$setattr",$slot_func:d("__setattr__","__delattr__"),$wrapper:function(_,v,A){return Sk.abstr.checkNoKwargs(this.$name,A),Sk.abstr.checkArgsLen(this.$name,v,2,2),u(_,this),Sk.misceval.chain(this.call(_,v[0],v[1],!0),()=>Sk.builtin.none.none$)},$textsig:"($self, name, value, /)",$flags:{MinArgs:2,MaxArgs:2},$doc:"Implement setattr(self, name, value)."},p.__delattr__={$name:"__delattr__",$slot_name:"tp$setattr",$slot_func:p.__setattr__.$slot_func,$wrapper:function(_,v,A){return Sk.abstr.checkOneArg(this.$name,v,A),u(_,this),this.call(_,v[0]),Sk.builtin.none.none$},$textsig:"($self, name, /)",$flags:{OneArg:!0},$doc:"Implement delattr(self, name)."},p.__get__={$name:"__get__",$slot_name:"tp$descr_get",$slot_func:function(_){return function(v,A,N){v===null&&(v=Sk.builtin.none.none$),A==null&&(A=Sk.builtin.none.none$);let M=_.tp$descr_get?_.tp$descr_get(this,this.ob$type):_;return v=Sk.misceval.callsimOrSuspendArray(M,[v,A]),N?v:Sk.misceval.retryOptionalSuspensionOrThrow(v)}},$wrapper:function(_,v,A){if(Sk.abstr.checkNoKwargs(this.$name,A),Sk.abstr.checkArgsLen(this.$name,v,1,2),A=v[0],v=v[1],A===Sk.builtin.none.none$&&(A=null),v===Sk.builtin.none.none$&&(v=null),v===null&&A===null)throw new Sk.builtin.TypeError("__get__(None, None) is invalid");return this.call(_,A,v,!0)},$textsig:"($self, instance, owner, /)",$flags:{MinArgs:2,MaxArgs:2},$doc:"Return an attribute of instance, which is of type owner."},p.__set__={$name:"__set__",$slot_name:"tp$descr_set",$slot_func:d("__set__","__delete__"),$wrapper:l,$textsig:"($self, instance, value, /)",$flags:{MinArgs:2,MaxArgs:2},$doc:"Set an attribute of instance to value."},p.__delete__={$name:"__delete__",$slot_name:"tp$descr_set",$slot_func:p.__set__.$slot_func,$wrapper:h,$textsig:"($self, instance, /)",$flags:{OneArg:!0},$doc:"Delete an attribute of instance."},p.__eq__={$name:"__eq__",$slot_name:"ob$eq",$slot_func:c,$wrapper:a,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return self==value."},p.__ge__={$name:"__ge__",$slot_name:"ob$ge",$slot_func:c,$wrapper:a,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return self>=value."},p.__gt__={$name:"__gt__",$slot_name:"ob$gt",$slot_func:c,$wrapper:a,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return self>value."},p.__le__={$name:"__le__",$slot_name:"ob$le",$slot_func:c,$wrapper:a,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return self<=value."},p.__lt__={$name:"__lt__",$slot_name:"ob$lt",$slot_func:c,$wrapper:a,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return selfSk.misceval.callsimOrSuspendArray(A,[]),M=>{if(M instanceof Sk.builtin.StopIteration)this.gi$ret=M.$value;else throw M});return v?N:Sk.misceval.retryOptionalSuspensionOrThrow(N)}},$wrapper:function(_,v,A){return Sk.abstr.checkNoArgs(this.$name,v,A),Sk.misceval.chain(_.tp$iternext(!0),N=>{if(N===void 0)throw new Sk.builtin.StopIteration;return N})},$textsig:"($self, /)",$flags:{NoArgs:!0},$doc:"Implement next(self)."},p.__len__={$name:"__len__",$slot_name:"sq$length",$slot_func:function(_){return function(v){let A=_.tp$descr_get?_.tp$descr_get(this,this.ob$type):_;return v?(v=Sk.misceval.callsimOrSuspendArray(A,[]),Sk.misceval.chain(v,N=>Sk.misceval.asIndexOrThrow(N))):(v=Sk.misceval.callsimArray(A,[]),Sk.misceval.asIndexOrThrow(v))}},$wrapper:S(function(_,v,A){return Sk.abstr.checkNoArgs(this.$name,v,A),_=this.call(_,!0),Sk.misceval.chain(_,N=>N===void 0?Sk.builtin.none.none$:N)},_=>new Sk.builtin.int_(_),!0),$flags:{NoArgs:!0},$textsig:"($self, /)",$doc:"Return len(self)."},p.__contains__={$name:"__contains__",$slot_name:"sq$contains",$slot_func:function(_){return function(v,A){let N=_.tp$descr_get?_.tp$descr_get(this,this.ob$type):_;return v=Sk.misceval.callsimOrSuspendArray(N,[v]),v=Sk.misceval.chain(v,M=>Sk.misceval.isTrue(M)),v.$isSuspension?A?v:Sk.misceval.retryOptionalSuspensionOrThrow(v):v}},$wrapper:S(n,_=>new Sk.builtin.bool(_),!0),$textsig:"($self, key, /)",$flags:{OneArg:!0},$doc:"Return key in self."},p.__getitem__={$name:"__getitem__",$slot_name:"mp$subscript",$slot_func:function(_){return function(v,A){let N=_.tp$descr_get?_.tp$descr_get(this,this.ob$type):_;return v=Sk.misceval.callsimOrSuspendArray(N,[v]),A?v:Sk.misceval.retryOptionalSuspensionOrThrow(v)}},$wrapper:n,$textsig:"($self, key, /)",$flags:{OneArg:!0},$doc:"Return self[key]."},p.__setitem__={$name:"__setitem__",$slot_name:"mp$ass_subscript",$slot_func:d("__setitem__","__delitem__","does not support item assignment"),$wrapper:l,$textsig:"($self, key, value, /)",$flags:{MinArgs:2,MaxArgs:2},$doc:"Set self[key] to value."},p.__delitem__={$name:"__delitem__",$slot_name:"mp$ass_subscript",$slot_func:p.__setitem__.$slot_func,$wrapper:h,$textsig:"($self, key, /)",$flags:{OneArg:!0},$doc:"Delete self[key]."},p.__add__={$name:"__add__",$slot_name:"nb$add",$slot_func:c,$wrapper:i,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return self+value."},p.__radd__={$name:"__radd__",$slot_name:"nb$reflected_add",$slot_func:c,$wrapper:i,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return value+self."},p.__iadd__={$name:"__iadd__",$slot_name:"nb$inplace_add",$slot_func:c,$wrapper:i,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Implement self+=value."},p.__sub__={$name:"__sub__",$slot_name:"nb$subtract",$slot_func:c,$wrapper:i,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return self-value."},p.__rsub__={$name:"__rsub__",$slot_name:"nb$reflected_subtract",$slot_func:c,$wrapper:i,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return value-self."},p.__imul__={$name:"__imul__",$slot_name:"nb$inplace_multiply",$slot_func:c,$wrapper:i,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Implement self*=value."},p.__mul__={$name:"__mul__",$slot_name:"nb$multiply",$slot_func:c,$wrapper:i,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return self*value."},p.__rmul__={$name:"__rmul__",$slot_name:"nb$reflected_multiply",$slot_func:c,$wrapper:i,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return value*self."},p.__isub__={$name:"__isub__",$slot_name:"nb$inplace_subtract",$slot_func:c,$wrapper:i,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Implement self-=value."},p.__mod__={$name:"__mod__",$slot_name:"nb$remainder",$slot_func:c,$wrapper:i,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return self%value."},p.__rmod__={$name:"__rmod__",$slot_name:"nb$reflected_remainder",$slot_func:c,$wrapper:i,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return value%self."},p.__imod__={$name:"__imod__",$slot_name:"nb$inplace_remainder",$slot_func:c,$wrapper:i,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Implement value%=self."},p.__divmod__={$name:"__divmod__",$slot_name:"nb$divmod",$slot_func:c,$wrapper:i,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return divmod(self, value)."},p.__rdivmod__={$name:"__rdivmod__",$slot_name:"nb$reflected_divmod",$slot_func:c,$wrapper:i,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return divmod(value, self)"},p.__pos__={$name:"__pos__",$slot_name:"nb$positive",$slot_func:t,$wrapper:e,$textsig:"($self, /)",$flags:{NoArgs:!0},$doc:"+self"},p.__neg__={$name:"__neg__",$slot_name:"nb$negative",$slot_func:t,$wrapper:e,$textsig:"($self, /)",$flags:{NoArgs:!0},$doc:"-self"},p.__abs__={$name:"__abs__",$slot_name:"nb$abs",$slot_func:t,$wrapper:e,$textsig:"($self, /)",$flags:{NoArgs:!0},$doc:"abs(self)"},p.__bool__={$name:"__bool__",$slot_name:"nb$bool",$slot_func:s("__bool__",Sk.builtin.checkBool,"bool",_=>_.v!==0),$wrapper:S(e,_=>new Sk.builtin.bool(_)),$textsig:"($self, /)",$flags:{NoArgs:!0},$doc:"self != 0"},p.__invert__={$name:"__invert__",$slot_name:"nb$invert",$slot_func:t,$wrapper:e,$textsig:"($self, /)",$flags:{NoArgs:!0},$doc:"~self"},p.__lshift__={$name:"__lshift__",$slot_name:"nb$lshift",$slot_func:c,$wrapper:i,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return self<>value."},p.__rrshift__={$name:"__rrshift__",$slot_name:"nb$reflected_rshift",$slot_func:c,$wrapper:i,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return value>>self."},p.__ilshift__={$name:"__ilshift__",$slot_name:"nb$inplace_lshift",$slot_func:c,$wrapper:i,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Implement self<<=value."},p.__irshift__={$name:"__irshift__",$slot_name:"nb$inplace_rshift",$slot_func:c,$wrapper:i,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Implement self=>>value."},p.__and__={$name:"__and__",$slot_name:"nb$and",$slot_func:c,$wrapper:i,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return self&value."},p.__rand__={$name:"__rand__",$slot_name:"nb$refelcted_and",$slot_func:c,$wrapper:i,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return value&self."},p.__iand__={$name:"__iand__",$slot_name:"nb$and",$slot_func:c,$wrapper:i,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Implement self&=value."},p.__xor__={$name:"__xor__",$slot_name:"nb$xor",$slot_func:c,$wrapper:i,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return self^value."},p.__rxor__={$name:"__rxor__",$slot_name:"nb$reflected_xor",$slot_func:c,$wrapper:i,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return value^self."},p.__ixor__={$name:"__ixor__",$slot_name:"nb$inplace_xor",$slot_func:c,$wrapper:i,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Implement self^=value."},p.__or__={$name:"__or__",$slot_name:"nb$or",$slot_func:c,$wrapper:i,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return self|value."},p.__ror__={$name:"__ror__",$slot_name:"nb$reflected_or",$slot_func:c,$wrapper:i,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return value|self."},p.__ior__={$name:"__ior__",$slot_name:"nb$inplace_or",$slot_func:c,$wrapper:i,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Implement self|=value."},p.__int__={$name:"__int__",$slot_name:"nb$int",$slot_func:s("__int__",Sk.builtin.checkInt,"int"),$wrapper:e,$textsig:"($self, /)",$flags:{NoArgs:!0},$doc:"int(self)"},p.__float__={$name:"__float__",$slot_name:"nb$float",$slot_func:s("__float__",Sk.builtin.checkFloat,"float"),$wrapper:e,$textsig:"($self, /)",$flags:{NoArgs:!0},$doc:"float(self)"},p.__floordiv__={$name:"__floordiv__",$slot_name:"nb$floor_divide",$slot_func:c,$wrapper:i,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return self//value."},p.__rfloordiv__={$name:"__rfloordiv__",$slot_name:"nb$reflected_floor_divide",$slot_func:c,$wrapper:i,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return value//self."},p.__ifloordiv__={$name:"__ifloordiv__",$slot_name:"nb$inplace_floor_divide",$slot_func:c,$wrapper:i,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Implement self//=value."},p.__truediv__={$name:"__truediv__",$slot_name:"nb$divide",$slot_func:c,$wrapper:i,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return self/value."},p.__rtruediv__={$name:"__rtruediv__",$slot_name:"nb$reflected_divide",$slot_func:c,$wrapper:i,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return value/self."},p.__itruediv__={$name:"__itruediv__",$slot_name:"nb$inplace_divide",$slot_func:c,$wrapper:i,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Implement self/=value."},p.__index__={$name:"__index__",$slot_name:"nb$index",$slot_func:s("__index__",Sk.builtin.checkInt,"int",_=>_.v),$wrapper:S(e,_=>new Sk.builtin.int_(_)),$textsig:"($self, /)",$flags:{NoArgs:!0},$doc:"Return self converted to an integer, if self is suitable for use as an index into a list."},p.__pow__={$name:"__pow__",$slot_name:"nb$power",$slot_func:function(_){return function(v,A){let N=_.tp$descr_get?_.tp$descr_get(this,this.ob$type):_;return A==null?Sk.misceval.callsimArray(N,[v]):Sk.misceval.callsimArray(N,[v,A])}},$wrapper:r,$textsig:"($self, value, mod=None, /)",$flags:{MinArgs:1,MaxArgs:2},$doc:"Return pow(self, value, mod)."},p.__rpow__={$name:"__rpow__",$slot_name:"nb$reflected_power",$slot_func:p.__pow__.$slot_func,$wrapper:r,$textsig:"($self, value, mod=None, /)",$flags:{MinArgs:1,MaxArgs:2},$doc:"Return pow(value, self, mod)."},p.__ipow__={$name:"__ipow__",$slot_name:"nb$inplace_power",$slot_func:p.__pow__.$slot_func,$wrapper:r,$textsig:"($self, value, mod=None, /)",$flags:{MinArgs:1,MaxArgs:2},$doc:"Implement **="},p.__matmul__={$name:"__matmul__",$slot_name:"nb$matrix_multiply",$slot_func:c,$wrapper:i,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return self@value."},p.__rmatmul__={$name:"__rmatmul__",$slot_name:"nb$reflected_matrix_multiply",$slot_func:c,$wrapper:i,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return value@self."},p.__imatmul__={$name:"__imatmul__",$slot_name:"nb$inplace_matrix_multiply",$slot_func:c,$wrapper:i,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Implement self@=value."},p.__long__={$name:"__long__",$slot_name:"nb$long",$slot_func:s("__long__",Sk.builtin.checkInt,"int"),$wrapper:e,$textsig:"($self, /)",$flags:{NoArgs:!0},$doc:"int(self)"};var $,m={next:{$name:"next",$slot_name:"tp$iternext",$slot_func:p.__next__.$slot_func,$wrapper:p.__next__.$wrapper,$textsig:p.__next__.$textsig,$flags:p.__next__.$flags},__nonzero__:{$name:"__nonzero__",$slot_name:"nb$bool",$slot_func:s("__nonzero__",Sk.builtin.checkInt,"int",_=>_.v!==0),$wrapper:S(e,_=>new Sk.builtin.bool(_)),$textsig:"($self, /)",$flags:{NoArgs:!0},$doc:"x.__nonzero__() <==> x != 0"},__div__:{$name:"__div__",$slot_name:"nb$divide",$slot_func:c,$wrapper:i,$textsig:"($self, other/)",$flags:{OneArg:!0},$doc:"x.__div__(y) <==> x/y"},__rdiv__:{$name:"__rdiv__",$slot_name:"nb$reflected_divide",$slot_func:c,$wrapper:i,$textsig:"($self, other/)",$flags:{OneArg:!0},$doc:"x.__rdiv__(y) <==> x/y"},__idiv__:{$name:"__idiv__",$slot_name:"nb$inplace_divide",$slot_func:c,$wrapper:i,$textsig:"($self, other/)",$flags:{OneArg:!0},$doc:"implement self /= other"}};Sk.subSlots={main_slots:Object.entries({tp$init:"__init__",tp$call:"__call__",$r:"__repr__",tp$str:"__str__",tp$getattr:"__getattribute__",tp$setattr:["__setattr__","__delattr__"],ob$eq:"__eq__",ob$ne:"__ne__",ob$lt:"__lt__",ob$le:"__le__",ob$gt:"__gt__",ob$ge:"__ge__",tp$descr_get:"__get__",tp$descr_set:["__set__","__delete__"],tp$iter:"__iter__",tp$iternext:"__next__"}),number_slots:Object.entries({nb$abs:"__abs__",nb$negative:"__neg__",nb$positive:"__pos__",nb$int:"__int__",nb$long:"__long__",nb$float:"__float__",nb$index:"__index__",nb$add:"__add__",nb$reflected_add:"__radd__",nb$inplace_add:"__iadd__",nb$subtract:"__sub__",nb$reflected_subtract:"__rsub__",nb$inplace_subtract:"__isub__",nb$multiply:"__mul__",nb$reflected_multiply:"__rmul__",nb$inplace_multiply:"__imul__",nb$floor_divide:"__floordiv__",nb$reflected_floor_divide:"__rfloordiv__",nb$inplace_floor_divide:"__ifloordiv__",nb$invert:"__invert__",nb$remainder:"__mod__",nb$reflected_remainder:"__rmod__",nb$inplace_remainder:"__imod__",nb$divmod:"__divmod__",nb$reflected_divmod:"__rdivmod__",nb$power:"__pow__",nb$reflected_power:"__rpow__",nb$inplace_power:"__ipow__",nb$divide:"__truediv__",nb$reflected_divide:"__rtruediv__",nb$inplace_divide:"__itruediv__",nb$bool:"__bool__",nb$and:"__and__",nb$reflected_and:"__rand__",nb$inplace_and:"__iand__",nb$or:"__or__",nb$reflected_or:"__ror__",nb$inplace_or:"__ior__",nb$xor:"__xor__",nb$reflected_xor:"__rxor__",nb$inplace_xor:"__ixor__",nb$lshift:"__lshift__",nb$reflected_lshift:"__rlshift__",nb$rshift:"__rshift__",nb$reflected_rshift:"__rrshift__",nb$inplace_lshift:"__ilshift__",nb$inplace_rshift:"__irshift__",nb$matrix_multiply:"__matmul__",nb$reflected_matrix_multiply:"__rmatmul__",nb$inplace_matrix_multiply:"__imatmul__"}),sequence_and_mapping_slots:Object.entries({sq$length:"__len__",sq$contains:"__contains__",mp$subscript:"__getitem__",mp$ass_subscript:["__setitem__","__delitem__"],nb$add:"__add__",nb$multiply:"__mul__",nb$reflected_multiply:"__rmul__",nb$inplace_add:"__iadd__",nb$inplace_multiply:"__imul__"})},Sk.reflectedNumberSlots={nb$add:{reflected:"nb$reflected_add"},nb$subtract:{reflected:"nb$reflected_subtract",slot:function(_){return _ instanceof this.constructor?_.nb$subtract(this):Sk.builtin.NotImplemented.NotImplemented$}},nb$multiply:{reflected:"nb$reflected_multiply"},nb$divide:{reflected:"nb$reflected_divide",slot:function(_){return _ instanceof this.constructor?_.nb$divide(this):Sk.builtin.NotImplemented.NotImplemented$}},nb$floor_divide:{reflected:"nb$reflected_floor_divide",slot:function(_){return _ instanceof this.constructor?_.nb$floor_divide(this):Sk.builtin.NotImplemented.NotImplemented$}},nb$remainder:{reflected:"nb$reflected_remainder",slot:function(_){return _ instanceof this.constructor?_.nb$remainder(this):Sk.builtin.NotImplemented.NotImplemented$}},nb$divmod:{reflected:"nb$reflected_divmod",slot:function(_){return _ instanceof this.constructor?_.nb$divmod(this):Sk.builtin.NotImplemented.NotImplemented$}},nb$power:{reflected:"nb$reflected_power",slot:function(_,v){return _ instanceof this.constructor?_.nb$power(this,v):Sk.builtin.NotImplemented.NotImplemented$}},nb$and:{reflected:"nb$reflected_and"},nb$or:{reflected:"nb$reflected_or"},nb$xor:{reflected:"nb$reflected_xor"},nb$lshift:{reflected:"nb$reflected_lshift",slot:function(_){return _ instanceof this.constructor?_.nb$lshift(this):Sk.builtin.NotImplemented.NotImplemented$}},nb$rshift:{reflected:"nb$reflected_rshift",slot:function(_){return _ instanceof this.constructor?_.nb$rshift(this):Sk.builtin.NotImplemented.NotImplemented$}},nb$matrix_multiply:{reflected:"nb$reflexted_matrix_multiply",slot:function(_){return _ instanceof this.constructor?_.nb$matrix_multiply(this):Sk.builtin.NotImplemented.NotImplemented$}}},Sk.sequenceAndMappingSlots={sq$concat:["nb$add"],sq$repeat:["nb$multiply","nb$reflected_multiply"],mp$length:["sq$length"],sq$inplace_repeat:["nb$inplace_multiply"],sq$inplace_concat:["nb$inplace_add"]},Sk.dunderToSkulpt={__repr__:"$r",__str__:"tp$str",__init__:"tp$init",__new__:"tp$new",__hash__:"tp$hash",__call__:"tp$call",__iter__:"tp$iter",__next__:"tp$iternext",__eq__:"ob$eq",__ne__:"ob$ne",__lt__:"ob$lt",__le__:"ob$le",__gt__:"ob$gt",__ge__:"ob$ge",__abs__:"nb$abs",__neg__:"nb$negative",__pos__:"nb$positive",__int__:"nb$int",__float__:"nb$float",__index__:"nb$index",__add__:"nb$add",__radd__:"nb$reflected_add",__iadd__:"nb$inplace_add",__sub__:"nb$subtract",__rsub__:"nb$reflected_subtract",__isub__:"nb$inplace_subtract",__mul__:"nb$multiply",__rmul__:"nb$reflected_multiply",__imul__:"nb$inplace_multiply",__truediv__:"nb$divide",__rtruediv__:"nb$reflected_divide",__itruediv__:"nb$inplace_divide",__floordiv__:"nb$floor_divide",__rfloordiv__:"nb$reflected_floor_divide",__ifloordiv__:"nb$inplace_floor_divide",__invert__:"nb$invert",__mod__:"nb$remainder",__rmod__:"nb$reflected_remainder",__imod__:"nb$inplace_remainder",__divmod__:"nb$divmod",__rdivmod__:"nb$reflected_divmod",__pow__:"nb$power",__rpow__:"nb$reflected_power",__ipow__:"nb$inplace_power",__bool__:"nb$bool",__long__:"nb$long",__lshift__:"nb$lshift",__rlshift__:"nb$reflected_lshift",__ilshift__:"nb$inplace_lshift",__rshift__:"nb$rshift",__rrshift__:"nb$reflected_rshift",__irshift__:"nb$inplace_rshift",__and__:"nb$and",__rand__:"nb$reflected_and",__iand__:"nb$inplace_and",__or__:"nb$or",__ror__:"nb$reflected_or",__ior__:"nb$inplace_or",__xor__:"nb$xor",__rxor__:"nb$reflected_xor",__ixor__:"nb$inplace_xor",__matmul__:"nb$matrix_multiply",__rmatmul__:"nb$reflected_matrix_multiply",__imatmul__:"nb$inplace_matrix_multiply",__get__:"tp$descr_get",__set__:"tp$descr_set",__delete__:"tp$descr_set",__getattribute__:"tp$getattr",__getattr__:"tp$getattr",__setattr__:"tp$setattr",__delattr__:"tp$setattr",__len__:"sq$length",__contains__:"sq$contains",__getitem__:"mp$subscript",__setitem__:"mp$ass_subscript",__delitem__:"mp$ass_subscript"},Sk.exportSymbol("Sk.setupDunderMethods",Sk.setupDunderMethods),Sk.setupDunderMethods=function(_){function v(x,C,F){for(let P=0;Px[0]==="tp$iternext"),Y=R.findIndex(x=>x[0]==="nb$bool"),k=Sk.dunderToSkulpt;if(_){k.__bool__="nb$bool",k.__next__="tp$iternext",delete k.__nonzero__,delete k.__div__,delete k.__rdiv__,delete k.__idiv__,delete k.next;for(let x in $)A[x]=$[x];for(let x in m)delete A[x];for(_=0;_")}let l={__doc__:{$get(){return this.d$def.$doc?new Sk.builtin.str(this.d$def.$doc):Sk.builtin.none.none$}},__objclass__:{$get(){return this.d$type}},__name__:{$get(){return new Sk.builtin.str(this.d$name)}}};p={__text_signature__:{$get(){return this.d$def.$textsig?new Sk.builtin.str(this.d$def.$textsig):Sk.builtin.none.none$}}},Sk.builtin.getset_descriptor=e("getset_descriptor",void 0,{constructor:function(h,a){this.d$def=a,this.$get=a.$get,this.$set=a.$set,this.d$type=h,this.d$name=a.$name},slots:{tp$descr_get(h,a,S){if(a=this.d$check(h))return a;if(this.$get!==void 0)return h=this.$get.call(h),S?h:Sk.misceval.retryOptionalSuspensionOrThrow(h);throw new Sk.builtin.AttributeError("getset_descriptor '"+this.d$name+"' of '"+this.d$type.prototype.tp$name+"' objects is not readable")},tp$descr_set(h,a,S){if(this.d$set_check(h),this.$set!==void 0)return h=this.$set.call(h,a),S?h:Sk.misceval.retryOptionalSuspensionOrThrow(h);throw new Sk.builtin.AttributeError("attribute '"+this.d$name+"' of '"+this.d$type.prototype.tp$name+"' objects is readonly")}}}),Sk.builtin.method_descriptor=e("method_descriptor","method",{constructor:function(h,a){this.d$def=a,this.$meth=a.$meth,this.d$type=h,this.d$name=a.$name||"",this.$flags=h=a.$flags||{},h.FastCall&&h.NoKwargs?this.tp$call=this.$methodFastCallNoKwargs:h.FastCall?this.tp$call=this.$methodFastCall:h.NoArgs?this.tp$call=this.$methodCallNoArgs:h.OneArg?this.tp$call=this.$methodCallOneArg:h.NamedArgs?this.tp$call=this.$methodCallNamedArgs:h.MinArgs!==void 0?this.tp$call=this.$methodCallMinArgs:(this.func_code=a.$meth,this.tp$call=this.$defaultCall,this.$memoiseFlags=Sk.builtin.func.prototype.$memoiseFlags,this.$resolveArgs=Sk.builtin.func.prototype.$resolveArgs)},slots:{tp$call(h,a){return this.tp$call(h,a)},tp$descr_get(h,a){let S;return(S=this.d$check(h))?S:new Sk.builtin.sk_method(this.d$def,h)}},getsets:p,proto:{$methodFastCall(h,a){let S=h.shift();return this.m$checkself(S),this.$meth.call(S,h,a)},$methodFastCallNoKwargs(h,a){let S=h.shift();return this.m$checkself(S),Sk.abstr.checkNoKwargs(this.d$name,a),this.$meth.call(S,h)},$methodCallNoArgs(h,a){let S=h.shift();return this.m$checkself(S),Sk.abstr.checkNoArgs(this.d$name,h,a),this.$meth.call(S)},$methodCallOneArg(h,a){let S=h.shift();return this.m$checkself(S),Sk.abstr.checkOneArg(this.d$name,h,a),this.$meth.call(S,h[0])},$methodCallNamedArgs(h,a){let S=h.shift();return this.m$checkself(S),h=Sk.abstr.copyKeywordsToNamedArgs(this.d$name,this.$flags.NamedArgs,h,a,this.$flags.Defaults),this.$meth.call(S,...h)},$methodCallMinArgs(h,a){let S=h.shift();return this.m$checkself(S),Sk.abstr.checkNoKwargs(this.d$name,a),Sk.abstr.checkArgsLen(this.d$name,h,this.$flags.MinArgs,this.$flags.MaxArgs),this.$meth.call(S,...h)},$defaultCall(h,a){return this.m$checkself(h[0]),Sk.builtin.func.prototype.tp$call.call(this,h,a)},m$checkself(h){if(h===void 0)throw new Sk.builtin.TypeError("descriptor '"+this.d$name+"' of '"+this.d$type.prototype.tp$name+"' object needs an argument");this.d$check(h)}}}),Sk.builtin.wrapper_descriptor=e("wrapper_descriptor","slot wrapper",{constructor:function(h,a,S){this.d$def=a,this.d$type=h,this.d$name=S.$name=a.$name,this.d$wrapped=S},slots:{tp$descr_get(h,a){let S;return(S=this.d$check(h))?S:new Sk.builtin.method_wrapper(this,h)},tp$call(h,a){if(1>h.length)throw new Sk.builtin.TypeError("descriptor '"+this.d$name+"' of '"+this.d$type.prototype.tp$name+"' object needs an argument");let S=h.shift();if(!S.ob$type.$isSubType(this.d$type))throw new Sk.builtin.TypeError("descriptor '"+this.d$name+"' requires a '"+this.d$type.prototype.tp$name+"' object but received a '"+Sk.abstr.typeName(S)+"'");return this.raw$call(S,h,a)}},proto:{raw$call(h,a,S){return this.d$wrapped.$name=this.d$name,this.d$def.$wrapper.call(this.d$wrapped,h,a,S)}}}),Sk.builtin.method_wrapper=e("method_wrapper",void 0,{constructor:function(h,a){this.m$descr=h,this.m$self=a,this.d$def=h.d$def,this.d$name=h.d$name,this.d$type=h.d$type},slots:{tp$call(h,a){return this.m$descr.raw$call(this.m$self,h,a)},tp$richcompare(h,a){return a!=="Eq"&&a!=="NotEq"||!(h instanceof Sk.builtin.method_wrapper)?Sk.builtin.NotImplemented.NotImplemented$:(h=this.m$self===h.m$self&&this.m$descr===h.m$descr,a==="Eq"?h:!h)},$r(){return new Sk.builtin.str("")}},getsets:{__self__:{$get(){return this.m$self}}}}),Sk.builtin.classmethod_descriptor=e("classmethod_descriptor","method",{constructor:function(h,a){this.d$def=a,this.$meth=a.$meth,this.d$type=h,this.d$name=a.$name||""},slots:{tp$call(h,a){if(1>h.length)throw new Sk.builtin.TypeError("descriptor '"+this.d$name+"' of '"+this.d$type.prototype.tp$name+"' object needs an argument");let S=h.shift();return this.tp$descr_get(null,S).tp$call(h,a)},tp$descr_get(h,a,S){if(a===void 0)if(h!==null)a=a||h.ob$type;else throw new Sk.builtin.TypeError("descriptor '"+this.d$name+"' for type '"+this.d$type.prototype.tp$name+"' needs an object or a type");if(!a.ob$type.$isSubType(Sk.builtin.type))throw new Sk.builtin.TypeError("descriptor '"+this.d$name+"' for type '"+this.d$type.prototype.tp$name+"' needs a type not a '"+Sk.abstr.typeName(a)+"' as arg 2");if(!a.$isSubType(this.d$type))throw new Sk.builtin.TypeError("descriptor '"+this.d$name+"' requires a '"+this.d$type.prototype.tp$name+"' object but received a '"+Sk.abstr.typeName(a)+"' object");return new Sk.builtin.sk_method(this.d$def,a)}},getsets:p}),[Sk.builtin.method_descriptor,Sk.builtin.getset_descriptor,Sk.builtin.wrapper_descriptor,Sk.builtin.method_wrapper,Sk.builtin.classmethod_descriptor].forEach(h=>{Sk.abstr.setUpSlots(h),Sk.abstr.setUpMethods(h),Sk.abstr.setUpGetSets(h)})},function(p,g){Sk.builtin.sk_method=Sk.abstr.buildNativeClass("builtin_function_or_method",{constructor:function(e,i,n){this.$meth=e.$meth.bind(i),this.$doc=e.$doc,this.$self=i||null,this.$module=n?new Sk.builtin.str(n):null,this.$name=e.$name||e.$meth.name||"",this.m$def=e,this.$textsig=e.$textsig,this.$flags=e=e.$flags||{},e.FastCall&&e.NoKwargs?this.tp$call=this.$fastCallNoKwargs:e.FastCall?this.tp$call=this.$meth:e.NoArgs?this.tp$call=this.$callNoArgs:e.OneArg?this.tp$call=this.$callOneArg:e.NamedArgs?this.tp$call=this.$callNamedArgs:e.MinArgs!==void 0?this.tp$call=this.$callMinArgs:(this.func_code=this.$meth,this.tp$call=this.$defaultCallMethod)},proto:{$fastCallNoKwargs(e,i){return Sk.abstr.checkNoKwargs(this.$name,i),this.$meth(e)},$callNoArgs(e,i){return Sk.abstr.checkNoArgs(this.$name,e,i),this.$meth()},$callOneArg(e,i){return Sk.abstr.checkOneArg(this.$name,e,i),this.$meth(e[0])},$callNamedArgs(e,i){return e=Sk.abstr.copyKeywordsToNamedArgs(this.$name,this.$flags.NamedArgs,e,i,this.$flags.Defaults),this.$meth(...e)},$callMinArgs(e,i){return Sk.abstr.checkNoKwargs(this.$name,i),Sk.abstr.checkArgsLen(this.$name,e,this.$flags.MinArgs,this.$flags.MaxArgs),this.$meth(...e)},$defaultCallMethod(e,i){return this.$self!==null?Sk.builtin.func.prototype.tp$call.call(this,[this.$self,...e],i):Sk.builtin.func.prototype.tp$call.call(this,e,i)},$memoiseFlags(){return Sk.builtin.func.prototype.$memoiseFlags.call(this)},$resolveArgs(){return Sk.builtin.func.prototype.$resolveArgs.call(this)}},flags:{sk$unacceptableBase:!0},slots:{tp$getattr:Sk.generic.getAttr,$r(){return this.$self===null?new Sk.builtin.str(""):new Sk.builtin.str("")},tp$call(e,i){return this.tp$call(e,i)},tp$richcompare(e,i){return i!=="Eq"&&i!=="NotEq"||!(e instanceof Sk.builtin.sk_method)?Sk.builtin.NotImplemented.NotImplemented$:(e=this.$self===e.$self&&this.m$def.$meth===e.m$def.$meth,i==="Eq"?e:!e)}},getsets:{__module__:{$get(){return this.$module||Sk.builtin.none.none$},$set(e){this.$module=e=e||Sk.builtin.none.none$}},__doc__:{$get(){return this.$doc?new Sk.builtin.str(this.$doc):Sk.builtin.none.none$}},__name__:{$get(){return new Sk.builtin.str(this.$name)}},__text_signature__:{$get(){return new Sk.builtin.str(this.$textsig)}},__self__:{$get(){return this.$self||Sk.sysModules.mp$lookup(this.$module)||Sk.builtin.none.none$}}}})},function(p,g){Sk.builtin.none=Sk.abstr.buildNativeClass("NoneType",{constructor:function(){return Sk.builtin.none.none$},slots:{tp$new(e,i){return Sk.abstr.checkNoArgs("NoneType",e,i),Sk.builtin.none.none$},$r(){return new Sk.builtin.str("None")},tp$as_number:!0,nb$bool(){return!1}},proto:{valueOf(){return null}},flags:{sk$unacceptableBase:!0}}),Sk.builtin.none.none$=Object.create(Sk.builtin.none.prototype,{v:{value:null,enumerable:!0}}),Sk.builtin.NotImplemented=Sk.abstr.buildNativeClass("NotImplementedType",{constructor:function(){return Sk.builtin.NotImplemented.NotImplemented$},slots:{$r(){return new Sk.builtin.str("NotImplemented")},tp$new(e,i){return Sk.abstr.checkNoArgs("NotImplementedType",e,i),Sk.builtin.NotImplemented.NotImplemented$}},flags:{sk$unacceptableBase:!0}}),Sk.builtin.NotImplemented.NotImplemented$=Object.create(Sk.builtin.NotImplemented.prototype,{v:{value:null,enumerable:!0}}),p=Sk.abstr.buildNativeClass("ellipsis",{constructor:function(){return Sk.builtin.Ellipsis},slots:{tp$new(e,i){return Sk.abstr.checkNoArgs("ellipsis",e,i),Sk.builtin.Ellipsis},$r(){return new Sk.builtin.str("Ellipsis")}},flags:{sk$unacceptableBase:!0}}),Sk.builtin.Ellipsis=Object.create(p.prototype,{v:{value:"..."}})},function(p,g){let e=/^(?:(.)?([<>=\^]))?([\+\-\s])?(#)?(0)?(\d+)?(,|_)?(?:\.(\d+))?([bcdeEfFgGnosxX%])?$/;Sk.formatting={};let i=function(s,c,o,d){if(Sk.asserts.assert(typeof c=="string"),s[6]){var u=parseInt(s[6],10);d=s[2]||(s[5]?"=":d?">":"<");let f=u-(c.length+(o?o.length:0));if(0>=f)return o+c;switch(u=(s[1]||(s[5]?"0":" ")).repeat(f),d){case"=":if(s[9]==="s")throw new Sk.builtin.ValueError("'=' alignment not allowed in string format specifier");return o+u+c;case">":return u+o+c;case"<":return o+c+u;case"^":return s=Math.floor(f/2),u.substring(0,s)+o+c+u.substring(s)}}return o+c},n=function(s,c){return c?"-":s[3]==="+"?"+":s[3]===" "?" ":""},r=/\B(?=(\d{3})+(?!\d))/g,l=/\B(?=([A-Za-z0-9]{4})+(?![A-Za-z0-9]))/g,h=function(s,c,o){if(Sk.asserts.assert(c instanceof Sk.builtin.int_||c instanceof Sk.builtin.lng),s[8])throw new Sk.builtin.ValueError("Precision not allowed in integer format");var d=c.str$(o,!1);c=c.nb$isnegative(),c=n(s,c),s[4]&&(o===16?c+="0x":o===8?c+="0o":o===2&&(c+="0b"));let u=s[9];if(u==="X"&&(d=d.toUpperCase()),s[9]==="n")d=(+d).toLocaleString();else if(s[7]){d=d.split(".");let f=s[7];if(f===","&&o!==10)throw new Sk.builtin.ValueError(`Cannot specify ',' with '${u}'`);d[0]=d[0].replace(o===10?r:l,f),d=d.join(".")}return i(s,d,c,!0)},a=function(s,c,o){if(!c)return s.str$(10,!0);if(c=c.match(e),!c)throw new Sk.builtin.ValueError("Invalid format specifier");var d=c[9];if(d||(d=o?"g":"d"),(o?"fFeEgG%":"bcdoxXnfFeEgG%").indexOf(d)==-1)throw new Sk.builtin.ValueError("Unknown format code '"+c[9]+"' for object of type '"+Sk.abstr.typeName(s)+"'");switch(d){case"d":case"n":return h(c,s,10);case"x":case"X":return h(c,s,16);case"o":return h(c,s,8);case"b":return h(c,s,2);case"c":if(c[3])throw new Sk.builtin.ValueError("Sign not allowed with integer format specifier 'c'");if(c[4])throw new Sk.builtin.ValueError("Alternate form not allowed with integer format specifier 'c'");if(c[7])throw new Sk.builtin.ValueError("Cannot specify ',' with 'c'");if(c[8])throw new Sk.builtin.ValueError("Cannot specify ',' with 'c'");return i(c,String.fromCodePoint(Sk.builtin.asnum$(s)),"",!0);case"f":case"F":case"e":case"E":case"g":case"G":{if(c[4])throw new Sk.builtin.ValueError("Alternate form (#) not allowed in float format specifier");if(o=Sk.builtin.asnum$(s),typeof o=="string"&&(o=Number(o)),o===1/0)return i(c,"inf","",!0);if(o===-1/0)return i(c,"inf","-",!0);if(isNaN(o))return i(c,"nan","",!0);s=!1,0>o&&(o=-o,s=!0);var u=["toExponential","toFixed","toPrecision"]["efg".indexOf(d.toLowerCase())];let f=c[8]?parseInt(c[8],10):6;if(o=o[u](f),"EFG".indexOf(d)!==-1&&(o=o.toUpperCase()),d.toLowerCase()==="g"||!c[9]){if(u=o.match(/\.(\d*[1-9])?(0+)$/)){let[,$,m]=u;o=o.slice(0,$?-m.length:-(m.length+1))}o.indexOf(".")!=-1||c[9]||(o+=".0")}return d.toLowerCase()==="e"&&(o=o.replace(/^([-+]?[0-9]*\.?[0-9]+[eE][-+]?)([0-9])?$/,"$10$2")),c[7]&&(d=o.toString().split("."),d[0]=d[0].replace(/\B(?=(\d{3})+(?!\d))/g,","),o=d.join(".")),i(c,o,n(c,s),!0)}case"%":if(c[4])throw new Sk.builtin.ValueError("Alternate form (#) not allowed with format specifier '%'");return s=Sk.builtin.asnum$(s),typeof s=="string"&&(s=Number(s)),s===1/0?i(c,"inf%","",!0):s===-1/0?i(c,"inf%","-",!0):isNaN(s)?i(c,"nan%","",!0):(d=!1,0>s&&(s=-s,d=!0),o=c[8]?parseInt(c[8],10):6,s=(100*s).toFixed(o)+"%",i(c,s,n(c,d),!0));default:throw new Sk.builtin.ValueError("Unknown format code '"+c[9]+"'")}};Sk.formatting.mkNumber__format__=s=>function(c){if(!Sk.builtin.checkString(c))throw new Sk.builtin.TypeError("format() argument 2 must be str, not "+Sk.abstr.typeName(c));return new Sk.builtin.str(a(this,c.$jsstr(),s))};let S=/^\d+$/,t=/{(((?:\d+)|(?:\w+))?((?:\.(\w+))|(?:\[((?:\d+)|(?:\w+))\])?))?(?:!(.))?(?::([^}]*))?}/g;Sk.formatting.format=function(s,c){c=c||[];let o={};for(let m=0;m{if(d===void 0)d=m;else if(d!==m)throw new Sk.builtin.ValueError(`cannot switch from ${d} to ${m}`)},f=m=>{let _;if(typeof m=="number")u("manual field specification"),_=s[m];else if(S.test(m))u("automatic field numbering"),_=s[m];else if(_=o[m],_===void 0)throw new Sk.builtin.KeyError(m);if(_===void 0)throw new Sk.builtin.IndexError(`Replacement index ${m} out of range for positional args tuple`);return _},$=0;return c=this.v.replace(t,function(m,_,v,A,N,M,R,H,ee,Y){let k;if(M!==void 0&&M!==""?(N=f(v),k=N.constructor===Array?N[M]:S.test(M)?Sk.abstr.objectGetItem(N,new Sk.builtin.int_(parseInt(M,10)),!1):Sk.abstr.objectGetItem(N,new Sk.builtin.str(M),!1),$++):N!==void 0&&N!==""?(M=f(v||$++),k=Sk.abstr.gattr(M,new Sk.builtin.str(N))):v!==void 0&&v!==""?k=f(v):_===void 0||_===""?(k=f($),$++):S.test(_)&&(k=f(_),$++),R==="s")k=new Sk.builtin.str(k);else if(R==="r")k=Sk.builtin.repr(k);else if(R==="a")k=Sk.builtin.ascii(k);else if(R!==""&&R!==void 0)throw new Sk.builtin.ValueError("Unknown conversion specifier "+R);return Sk.abstr.objectFormat(k,new Sk.builtin.str(H)).$jsstr()}),new Sk.builtin.str(c)},Sk.formatting.formatString=function(s){if(!Sk.builtin.checkString(s))throw new Sk.builtin.TypeError("format() argument 2 must be str, not "+Sk.abstr.typeName(s));if(s=s.$jsstr().match(e),s[9]&&s[9]!=="s")throw new Sk.builtin.ValueError("Unknown format code '"+s[9]+"' for object of type 'str'");if(s[3])throw new Sk.builtin.ValueError("Sign not allowed in string format specifier");if(s[4])throw new Sk.builtin.ValueError("Alternate form (#) not allowed with string format specifier");if(s[7])throw new Sk.builtin.ValueError("Cannot specify ',' with 's'");let c=this.v;return s[8]&&(c=c.substring(0,s[8])),new Sk.builtin.str(i(s,c,"",!1))}},function(p,g){function e(m){let _,v=[];for(let A=0;Av?1/0:v;(ee=N.exec(m))!=null&&HA)return new Sk.builtin.tuple([new Sk.builtin.str(""),new Sk.builtin.str(""),new Sk.builtin.str(v)])}else if(A=v.indexOf(_),0>A)return new Sk.builtin.tuple([new Sk.builtin.str(v),new Sk.builtin.str(""),new Sk.builtin.str("")]);return new Sk.builtin.tuple([new Sk.builtin.str(v.substring(0,A)),new Sk.builtin.str(_),new Sk.builtin.str(v.substring(A+_.length))])}}function l(m,_){return function(v,A){if(v=Sk.misceval.asIndexSized(v,Sk.builtin.OverflowError),A===void 0)A=" ";else if(A instanceof Sk.builtin.str&&A.sq$length()===1)A=A.v;else throw new Sk.builtin.TypeError("the fill character must be a str of length 1");var N=this.sq$length();return N>=v?new Sk.builtin.str(this.v):_?(N=v-N,v=Math.floor(N/2)+(N&v&1),A=A.repeat(v)+this.v+A.repeat(N-v),new Sk.builtin.str(A)):(A=A.repeat(v-N),new Sk.builtin.str(m?A+this.v:this.v+A))}}function h(m,_,v){if({start:_,end:v}=Sk.builtin.slice.startEnd$wrt(m,_,v),m.$hasAstralCodePoints()){let A=m.codepoints[_];_=A===void 0?_+m.v.length-m.codepoints.length:A,v=m.codepoints[v],v=v===void 0?m.v.length:v}return{start:_,end:v}}function a(m){return function(_,v,A){if(_=this.get$tgt(_),{start:v,end:A}=h(this,v,A),A=v&&_<=A?_:-1,this.codepoints){A=this.sq$length(),v=-1;for(let N=0;NN)return Sk.builtin.bool.false$;if(A=this.v.slice(A,N),v instanceof Sk.builtin.tuple){for(let M=Sk.abstr.iter(v),R=M.tp$iternext();R!==void 0;R=M.tp$iternext()){if(!(R instanceof Sk.builtin.str))throw new Sk.builtin.TypeError("tuple for "+m+" must only contain str, not "+Sk.abstr.typeName(R));if(_(A,R.v))return Sk.builtin.bool.true$}return Sk.builtin.bool.false$}return new Sk.builtin.bool(_(A,v.v))}}function t(m){return $[m]===void 0?m:m+"_$rw$"}var s=/^[0-9!#_]/,c=Object.create(null);Sk.builtin.str=Sk.abstr.buildNativeClass("str",{constructor:function(m){if(Sk.asserts.assert(this instanceof Sk.builtin.str,"bad call to str - use 'new'"),typeof m!="string")if(m===void 0)m="";else if(m===null)m="None";else{if(m.tp$str!==void 0)return m.tp$str();if(typeof m=="number")m=Number.isFinite(m)?String(m):String(m).replace("Infinity","inf").replace("NaN","nan");else throw new Sk.builtin.TypeError("could not convert object of type '"+Sk.abstr.typeName(m)+"' to str")}let _=c[m];if(_!==void 0)return _;c[m]=this,this.$mangled=t(m),this.$savedKeyHash=m.replace(s,"!$&"),this.v=m},slots:{tp$getattr:Sk.generic.getAttr,tp$as_sequence_or_mapping:!0,tp$doc:`str(object='') -> str +type(name, bases, dict) -> a new type`,tp$call:function(o,d){if(this===Sk.builtin.type){if(o.length===1&&(d===void 0||!d.length))return o[0].ob$type;if(o.length!==3)throw new Sk.builtin.TypeError("type() takes 1 or 3 arguments")}let u=this.prototype.tp$new(o,d);if(u.$isSuspension)return Sk.misceval.chain(u,f=>{if(u=f,u.ob$type.$isSubType(this))return u.tp$init(o,d)},()=>u);if(u.ob$type.$isSubType(this)){let f=u.tp$init(o,d);return f!==void 0&&f.$isSuspension?Sk.misceval.chain(f,()=>u):u}return u},tp$new:function(o,d){if(o.length!==3){if(o.length===1&&(d===void 0||!d.length))return o[0].ob$type;throw new Sk.builtin.TypeError("type() takes 1 or 3 arguments")}let u=o[0];var f=o[1];let $=o[2];if($.tp$name!=="dict")throw new Sk.builtin.TypeError("type() argument 3 must be dict, not "+Sk.abstr.typeName($));if(!Sk.builtin.checkString(u))throw new Sk.builtin.TypeError("type() argument 1 must be str, not "+Sk.abstr.typeName(u));let m=u.$jsstr();if(f.tp$name!=="tuple")throw new Sk.builtin.TypeError("type() argument 2 must be tuple, not "+Sk.abstr.typeName(f));f=f.sk$asarray(),o=function(){this.sk$hasDict&&(this.$d=new Sk.builtin.dict),this.$s=[]},r(m,o,f,this.constructor);let _=o.prototype;Sk.globals&&(_.__module__=Sk.globals.__name__),_.__doc__=Sk.builtin.none.none$,f=$.quick$lookup(Sk.builtin.str.$slots);let v=f===void 0,A=o.$typeLookup(Sk.builtin.str.$dict)!==void 0,N;if(f!==void 0&&(N=new Set,f=Sk.builtin.checkString(f)?[f]:Sk.misceval.arrayFromIterable(f),f.forEach(M=>{if(!Sk.builtin.checkString(M))throw new Sk.builtin.TypeError("__slots__ items must be strings, not '"+Sk.abstr.typeName(M)+"'");if(!M.$isIdentifier())throw new Sk.builtin.TypeError("__slots__ must be identifiers");if(M===Sk.builtin.str.$dict){if(A)throw new Sk.builtin.TypeError("__dict__ slot disallowed: we already got one");v=!0}else N.add(Sk.mangleName(u,M))}),f=[...N].sort((M,R)=>M.toString().localeCompare(R.toString())),h(f,o)),v&&!A&&(_.__dict__=new Sk.builtin.getset_descriptor(o,c),A=!0),Object.defineProperties(_,{ht$slots:{value:f||null,writable:!0},sk$hasDict:{value:A,writable:!0}}),$.$items().forEach(M=>{var[R,H]=M;if(N&&N.has(R))throw new Sk.builtin.ValueError("'"+R.toString()+"' in __slots__ conflicts with class variable");_[R.$mangled]=H}),_.hasOwnProperty("__qualname__")){if(f=_.__qualname__,!Sk.builtin.checkString(f))throw new Sk.builtin.TypeError("type __qualname__ must be a str, not '"+Sk.abstr.typeName(f)+"'");_.ht$qualname=f}return f=o.prototype,e(f,"__init_subclass__","classmethod"),e(f,"__new__","staticmethod"),e(f,"__class_getitem__","classmethod"),o.$allocateSlots(),s(o),t(o,d),o},tp$init:function(o,d){if(o&&o.length==1&&d&&d.length)throw new Sk.builtin.TypeError("type.__init__() takes no keyword arguments");if(o.length!=3&&o.length!=1)throw new Sk.builtin.TypeError("type.__init__() takes 1 or 3 arguments");return Sk.builtin.object.prototype.tp$init.call(this,[])},tp$getattr:function(o,d){var u=this.ob$type;let f=u.$typeLookup(o),$;if(f!==void 0&&($=f.tp$descr_get,$!==void 0&&f.tp$descr_set!==void 0))return d=$.call(f,this,u,d);if(o=this.$typeLookup(o),o!==void 0)return u=o.tp$descr_get,u!==void 0?d=u.call(o,null,this,d):o;if($!==void 0)return d=$.call(f,this,u,d);if(f!==void 0)return f},tp$setattr:function(o,d,u){if(!this.sk$klass)throw d!==void 0?new Sk.builtin.TypeError("can't set attributes of built-in/extension type '"+this.prototype.tp$name+"'"):new Sk.builtin.TypeError("can't delete attributes on type object '"+this.prototype.tp$name+"'");let f=this.ob$type.$typeLookup(o);if(f!==void 0){let $=f.tp$descr_set;if($)return $.call(f,this,d,u)}if(u=o.$mangled,d===void 0)if(d=this.prototype,d.hasOwnProperty(u))delete d[u],o=Sk.dunderToSkulpt[u],o!==void 0&&(delete this.prototype[o],d.sk$prototypical||this.$allocateGetterSlot(u));else throw new Sk.builtin.AttributeError("type object '"+this.prototype.tp$name+"' has no attribute '"+o.$jsstr()+"'");else this.prototype[u]=d,u in Sk.dunderToSkulpt&&this.$allocateSlot(u,d)},$r:function(){let o=this.prototype.__module__,d="",u="class";return o&&Sk.builtin.checkString(o)?d=o.v+".":o=null,o||this.sk$klass||Sk.__future__.class_repr||(u="type"),new Sk.builtin.str("<"+u+" '"+d+this.prototype.tp$name+"'>")}},writable:!0},tp$methods:{value:null,writable:!0},tp$classmethods:{value:null,writable:!0},tp$getsets:{value:null,writable:!0},sk$type:{value:!0},$isSubType:{value:function(o){return this===o||this.prototype instanceof o||!this.prototype.sk$prototypical&&this.prototype.tp$mro.includes(o)}},$allocateSlot:{value:function(o,d){o=Sk.slots[o];let u=o.$slot_name,f=this.prototype;f.hasOwnProperty(u)&&delete f[u],Object.defineProperty(f,u,{value:o.$slot_func(d),writable:!0,configurable:!0})}},$allocateSlots:{value:function(){let o=this.prototype;this.prototype.sk$prototypical?Object.keys(o).forEach(d=>{d in Sk.slots&&this.$allocateSlot(d,o[d])}):Object.keys(Sk.slots).forEach(d=>{o.hasOwnProperty(d)?this.$allocateSlot(d,o[d]):this.$allocateGetterSlot(d)}),o.hasOwnProperty("__eq__")&&!o.hasOwnProperty("__hash__")&&(o.tp$hash=o.__hash__=Sk.builtin.none.none$)}},$allocateGetterSlot:{value:function(o){let d=Sk.slots[o].$slot_name,u=this.prototype;u.hasOwnProperty(d)||Object.defineProperty(u,d,{configurable:!0,get(){let f=u.tp$mro;for(let $=1;$e.length)throw e=n.tp$name,new Sk.builtin.TypeError(e+".__new__(): not enough arguments");var r=e.shift();if(r.sk$type===void 0)throw e=n.tp$name,new Sk.builtin.TypeError(e+"__new__(X): X is not a type object ("+Sk.abstr.typeName(r)+")");if(!r.$isSubType(this))throw e=n.tp$name,r=r.prototype.tp$name,new Sk.builtin.TypeError(e+".__new__("+r+"): "+r+" is not a subtype of "+e);let l=r.prototype.sk$staticNew.prototype;if(l.tp$new!==n.tp$new)throw e=n.tp$name,r=r.prototype.tp$name,new Sk.builtin.TypeError(e+".__new__("+r+") is not safe, use "+l.tp$name+".__new__()");return n.tp$new.call(r.prototype,e,i)},$flags:{FastCall:!0},$textsig:"($type, *args, **kwargs)",$name:"__new__"},Sk.generic.selfIter=function(){return this},Sk.generic.iterNextWithArrayCheckSize=function(){if(this.$seq.length!==this.$orig.get$size()){let e=this.tp$name.split("_")[0];throw new Sk.builtin.RuntimeError(e+" changed size during iteration")}if(!(this.$index>=this.$seq.length))return this.$seq[this.$index++]},Sk.generic.iterNextWithArray=function(){let e=this.$seq[this.$index++];return e===void 0&&(this.tp$iternext=()=>{}),e},Sk.generic.iterLengthHintWithArrayMethodDef={$meth:function(){return new Sk.builtin.int_(this.$seq.length-this.$index)},$flags:{NoArgs:!0}},Sk.generic.iterReverseLengthHintMethodDef={$meth:function(){return new Sk.builtin.int_(this.$index)},$flags:{NoArgs:!0}},Sk.generic.getSetDict={$get(){return this.$d},$set(e){if(e===void 0)throw new Sk.builtin.TypeError("cannot delete __dict__");if(e instanceof Sk.builtin.dict)this.$d=e;else throw new Sk.builtin.TypeError("__dict__ must be set to a dictionary, not a '"+Sk.abstr.typeName(e)+"'")},$doc:"dictionary for instance variables (if defined)",$name:"__dict__"},Sk.generic.seqCompare=function(e,i){if(this===e&&Sk.misceval.opAllowsEquality(i))return!0;if(!(e instanceof this.sk$builtinBase))return Sk.builtin.NotImplemented.NotImplemented$;let n=this.v;e=e.v;let r;if(n.length!==e.length&&(i==="Eq"||i==="NotEq"))return i!=="Eq";for(r=0;r=l||r>=h)switch(i){case"Lt":return lh;case"GtE":return l>=h;default:Sk.asserts.fail()}return i==="Eq"?!1:i==="NotEq"?!0:Sk.misceval.richCompareBool(n[r],e[r],i)},Sk.generic.classGetItem={__class_getitem__:{$meth(e){return new Sk.builtin.GenericAlias(this,e)},$flags:{OneArg:!0}}}},function(p,b){Sk.builtin.pyCheckArgs=function(e,i,n,r,l,h){if(i=i.length,r===void 0&&(r=1/0),l&&--i,h&&--i,ir)throw new Sk.builtin.TypeError((n===r?e+"() takes exactly "+n+" arguments":ir)throw new Sk.builtin.TypeError((n===r?e+"() takes exactly "+n+" arguments":i{var[$,m]=f;u[m]=function(_){return this.tp$richcompare(_,$)}})}function a(u){let f=Sk.reflectedNumberSlots;Object.keys(f).forEach($=>{if(u[$]!==void 0){let m=f[$],_=m.reflected,v=u[_];v!==void 0?v===null&&delete u[_]:u[_]=m.slot||u[$]}})}function S(u){let f=Sk.sequenceAndMappingSlots;Object.keys(f).forEach($=>{u[$]!==void 0&&f[$].forEach(m=>{u[m]=u[$]})})}Sk.abstr={},Sk.abstr.typeName=function(u){if(u!=null&&u.tp$name!==void 0){let f=u.ht$name;return f!==void 0?f.toString():(f=u.tp$name,f.includes(".")&&(f=f.slice(f.lastIndexOf(".")+1)),f)}return Sk.asserts.fail(u+" passed to typeName"),""};let t={Add:"+",Sub:"-",Mult:"*",MatMult:"@",Div:"/",FloorDiv:"//",Mod:"%",DivMod:"divmod()",Pow:"** or pow()",LShift:"<<",RShift:">>",BitAnd:"&",BitXor:"^",BitOr:"|"},s={UAdd:"+",USub:"-",Invert:"~"};Sk.abstr.numberBinOp=function(u,f,$){var m;if(!(m=r(u,f,$)))throw u=Sk.abstr.typeName(u),f=Sk.abstr.typeName(f),new Sk.builtin.TypeError("unsupported operand type(s) for "+t[$]+": '"+u+"' and '"+f+"'");return m},Sk.exportSymbol("Sk.abstr.numberBinOp",Sk.abstr.numberBinOp),Sk.abstr.numberInplaceBinOp=function(u,f,$){var m;if(!(m=l(u,f,$)))throw u=Sk.abstr.typeName(u),f=Sk.abstr.typeName(f),new Sk.builtin.TypeError("unsupported operand type(s) for "+t[$]+"=: '"+u+"' and '"+f+"'");return m},Sk.exportSymbol("Sk.abstr.numberInplaceBinOp",Sk.abstr.numberInplaceBinOp),Sk.abstr.numberUnaryOp=function(u,f){if(f==="Not")return Sk.misceval.isTrue(u)?Sk.builtin.bool.false$:Sk.builtin.bool.true$;e:{switch(f){case"USub":var $=u.nb$negative;break e;case"UAdd":$=u.nb$positive;break e;case"Invert":$=u.nb$invert;break e}$=void 0}if($=$!==void 0?$.call(u):void 0,!$)throw u=Sk.abstr.typeName(u),new Sk.builtin.TypeError("bad operand type for unary "+s[f]+": '"+u+"'");return $},Sk.exportSymbol("Sk.abstr.numberUnaryOp",Sk.abstr.numberUnaryOp),Sk.abstr.fixSeqIndex_=function(u,f){return f=Sk.builtin.asnum$(f),0>f&&u.sq$length&&(f+=u.sq$length()),f},Sk.abstr.sequenceContains=function(u,f,$){return u.sq$contains?u.sq$contains(f,$):(u=Sk.misceval.iterFor(Sk.abstr.iter(u),function(m){return m===f||Sk.misceval.richCompareBool(m,f,"Eq")?new Sk.misceval.Break(!0):!1},!1),$?u:Sk.misceval.retryOptionalSuspensionOrThrow(u))},Sk.abstr.sequenceConcat=function(u,f){if(u.sq$concat)return u.sq$concat(f);if(Sk.builtin.checkSequence(u)&&Sk.builtin.checkSequence(f)&&(f=r(u,f,"Add"),f!==void 0))return f;throw new Sk.builtin.TypeError("'"+Sk.abstr.typeName(u)+"' object can't be concatenated")},Sk.abstr.sequenceInPlaceConcat=function(u,f){if(u.sq$inplace_concat)return u.sq$inplace_concat(f);if(u.sq$concat)return u.sq$concat(f);if(Sk.builtin.checkSequence(u)&&Sk.builtin.checkSequence(f)&&(f=l(u,f,"Add"),f!==void 0))return f;throw new Sk.builtin.TypeError("'"+Sk.abstr.typeName(u)+"' object can't be concatenated")},Sk.abstr.sequenceGetIndexOf=function(u,f){if(u.index)return Sk.misceval.callsimArray(u.index,[u,f]);let $=0;for(let m=Sk.abstr.iter(u),_=m.tp$iternext();_!==void 0;_=m.tp$iternext()){if(Sk.misceval.richCompareBool(f,_,"Eq"))return new Sk.builtin.int_($);$+=1}throw new Sk.builtin.ValueError("sequence.index(x): x not in sequence")},Sk.abstr.sequenceGetCountOf=function(u,f){if(u.count)return Sk.misceval.callsimArray(u.count,[u,f]);let $=0;for(let m=Sk.abstr.iter(u),_=m.tp$iternext();_!==void 0;_=m.tp$iternext())Sk.misceval.richCompareBool(f,_,"Eq")&&($+=1);return new Sk.builtin.int_($)},Sk.abstr.sequenceGetItem=function(u,f,$){return typeof f=="number"&&(f=new Sk.builtin.int_(f)),Sk.abstr.objectGetItem(u,f,$)},Sk.abstr.sequenceSetItem=function(u,f,$,m){return typeof f=="number"&&(f=new Sk.builtin.int_(f)),Sk.abstr.objectSetItem(u,f,$,m)},Sk.abstr.sequenceDelItem=function(u,f,$){return Sk.abstr.objectDelItem(u,f,$)},Sk.abstr.sequenceGetSlice=function(u,f,$){return Sk.abstr.objectGetItem(u,new Sk.builtin.slice(f,$))},Sk.abstr.sequenceDelSlice=function(u,f,$){return Sk.abstr.objectDelItem(u,new Sk.builtin.slice(f,$))},Sk.abstr.sequenceSetSlice=function(u,f,$,m){return Sk.abstr.objectSetItem(u,new Sk.builtin.slice(f,$))},Sk.abstr.sequenceUnpack=function(u,f,$,m){if(!Sk.builtin.checkIterable(u))throw new Sk.builtin.TypeError("cannot unpack non-iterable "+Sk.abstr.typeName(u)+" object");let _=Sk.abstr.iter(u),v=[],A=0,N;return 0{if(v.push(M),++A===f)return new Sk.misceval.Break})),Sk.misceval.chain(N,()=>{if(v.length{if(R!==void 0)throw new Sk.builtin.ValueError("too many values to unpack (expected "+f+")");return v});let M=[];return Sk.misceval.chain(Sk.misceval.iterFor(_,R=>{M.push(R)}),()=>{let R=M.length+f-$;if(0>R)throw new Sk.builtin.ValueError("not enough values to unpack (expected at least "+$+", got "+($+R)+")");return v.push(new Sk.builtin.list(M.slice(0,R))),v.push(...M.slice(R)),v})})},Sk.abstr.mappingUnpackIntoKeywordArray=function(u,f,$){if(f instanceof Sk.builtin.dict)f.$items().forEach(_=>{var[v,A]=_;if(!Sk.builtin.checkString(v))throw new Sk.builtin.TypeError(($.$qualname?$.$qualname+"() ":"")+"keywords must be strings");u.push(v.v),u.push(A)});else{var m=Sk.abstr.lookupSpecial(f,Sk.builtin.str.$keys);if(m===void 0)throw new Sk.builtin.TypeError("Object is not a mapping");return Sk.misceval.chain(Sk.misceval.callsimOrSuspendArray(m),_=>Sk.misceval.iterFor(Sk.abstr.iter(_),v=>{if(!Sk.builtin.checkString(v))throw new Sk.builtin.TypeError(($.$qualname?$.$qualname+"() ":"")+"keywords must be strings");return Sk.misceval.chain(f.mp$subscript(v,!0),A=>{u.push(v.v),u.push(A)})}))}},Sk.abstr.keywordArrayFromPyDict=function(u){let f=[];return u.$items().forEach($=>{var[m,_]=$;if(!Sk.builtin.checkString(m))throw new Sk.builtin.TypeError("keywords must be strings");f.push(m.toString()),f.push(_)}),f},Sk.abstr.keywordArrayToPyDict=function(u){let f=new Sk.builtin.dict;for(let $=0;$f.length)throw new Sk.builtin.TypeError(u+"() expected at most "+f.length+" arguments ("+v+" given)");if(m.length||_!==void 0){if(v===f.length&&!m.length)return $;if(v===0&&f.length===(_&&_.length))return _}else return $;for($=$.slice(0),v=0;v$[N]===void 0),f.length)throw new Sk.builtin.TypeError(u+"() missing "+f.length+" required positional arguments: "+f.join(", "))}return $},Sk.exportSymbol("Sk.abstr.copyKeywordsToNamedArgs",Sk.abstr.copyKeywordsToNamedArgs),Sk.abstr.checkNoKwargs=function(u,f){if(f&&f.length)throw new Sk.builtin.TypeError(u+"() takes no keyword arguments")},Sk.exportSymbol("Sk.abstr.checkNoKwargs",Sk.abstr.checkNoKwargs),Sk.abstr.checkNoArgs=function(u,f,$){if(f=f.length+($?$.length:0))throw new Sk.builtin.TypeError(u+"() takes no arguments ("+f+" given)")},Sk.exportSymbol("Sk.abstr.checkNoArgs",Sk.abstr.checkNoArgs),Sk.abstr.checkOneArg=function(u,f,$){if(Sk.abstr.checkNoKwargs(u,$),f.length!==1)throw new Sk.builtin.TypeError(u+"() takes exactly one argument ("+f.length+" given)")},Sk.exportSymbol("Sk.abstr.checkOneArg",Sk.abstr.checkOneArg),Sk.abstr.checkArgsLen=function(u,f,$,m){if(f=f.length,m===void 0&&(m=1/0),f<$||f>m)throw new Sk.builtin.TypeError(($===m?u+"() takes exactly "+$+" arguments":f<$?u+"() takes at least "+$+" arguments":u+"() takes at most "+m+" arguments")+(" ("+f+" given)"))},Sk.exportSymbol("Sk.abstr.checkArgsLen",Sk.abstr.checkArgsLen),Sk.abstr.objectFormat=function(u,f){if(f===void 0)f=Sk.builtin.str.$emptystr;else if(!Sk.builtin.checkString(f))throw new Sk.builtin.TypeError("Format specifier must be a string, not "+Sk.abstr.typeName(f));if(u=Sk.abstr.lookupSpecial(u,Sk.builtin.str.$format),f=Sk.misceval.callsimArray(u,[f]),!Sk.builtin.checkString(f))throw new Sk.builtin.TypeError("__format__ must return a str, not "+Sk.abstr.typeName(f));return f},Sk.abstr.objectHash=function(u){let f=u.tp$hash;if(f!==void 0){if(Sk.builtin.checkNone(f))throw new Sk.builtin.TypeError("unhashable type: '"+Sk.abstr.typeName(u)+"'");return u.tp$hash()}throw new Sk.builtin.TypeError("unsupported Javascript type")},Sk.abstr.objectAdd=function(u,f){if(u.nb$add)return u.nb$add(f);throw u=Sk.abstr.typeName(u),f=Sk.abstr.typeName(f),new Sk.builtin.TypeError("unsupported operand type(s) for +: '"+u+"' and '"+f+"'")},Sk.abstr.objectNegative=function(u){if(u.nb$negative)return u.nb$negative();throw new Sk.builtin.TypeError("bad operand type for unary -: '"+Sk.abstr.typeName(u)+"'")},Sk.abstr.objectPositive=function(u){if(u.nb$positive)return u.nb$positive();throw new Sk.builtin.TypeError("bad operand type for unary +: '"+Sk.abstr.typeName(u)+"'")},Sk.abstr.objectDelItem=function(u,f,$){if(u.mp$ass_subscript)return u.mp$ass_subscript(f,void 0,$);throw new Sk.builtin.TypeError("'"+Sk.abstr.typeName(u)+"' object does not support item deletion")},Sk.exportSymbol("Sk.abstr.objectDelItem",Sk.abstr.objectDelItem),Sk.abstr.objectGetItem=function(u,f,$){if(u.mp$subscript)return u.mp$subscript(f,$);if(Sk.builtin.checkClass(u)){if(u===Sk.builtin.type)return new Sk.builtin.GenericAlias(u,f);let m=Sk.abstr.typeLookup(u,Sk.builtin.str.$class_getitem);if(m!==void 0)return u=Sk.misceval.callsimOrSuspendArray(m,[f]),$?u:Sk.misceval.retryOptionalSuspensionOrThrow(u)}throw new Sk.builtin.TypeError("'"+Sk.abstr.typeName(u)+"' does not support indexing")},Sk.exportSymbol("Sk.abstr.objectGetItem",Sk.abstr.objectGetItem),Sk.abstr.objectSetItem=function(u,f,$,m){if(u.mp$ass_subscript)return u.mp$ass_subscript(f,$,m);throw new Sk.builtin.TypeError("'"+Sk.abstr.typeName(u)+"' does not support item assignment")},Sk.exportSymbol("Sk.abstr.objectSetItem",Sk.abstr.objectSetItem),Sk.abstr.gattr=function(u,f,$){if($=u.tp$getattr(f,$),$===void 0)throw new Sk.builtin.AttributeError(u.sk$attrError()+" has no attribute '"+f.$jsstr()+"'");return $.$isSuspension?Sk.misceval.chain($,function(m){if(m===void 0)throw new Sk.builtin.AttributeError(u.sk$attrError()+" has no attribute '"+f.$jsstr()+"'");return m}):$},Sk.exportSymbol("Sk.abstr.gattr",Sk.abstr.gattr),Sk.abstr.sattr=function(u,f,$,m){return u.tp$setattr(f,$,m)},Sk.exportSymbol("Sk.abstr.sattr",Sk.abstr.sattr),Sk.abstr.iternext=function(u,f){return u.tp$iternext(f)},Sk.exportSymbol("Sk.abstr.iternext",Sk.abstr.iternext),Sk.abstr.iter=function(u){if(u.tp$iter){if(u=u.tp$iter(),u.tp$iternext)return u;throw new Sk.builtin.TypeError("iter() returned non-iterator of type '"+Sk.abstr.typeName(u)+"'")}if(u.mp$subscript)return new Sk.builtin.seq_iter_(u);throw new Sk.builtin.TypeError("'"+Sk.abstr.typeName(u)+"' object is not iterable")},Sk.exportSymbol("Sk.abstr.iter",Sk.abstr.iter),Sk.abstr.lookupSpecial=function(u,f){var $=u.ob$type;if($===void 0)Sk.asserts.fail("javascript object sent to lookupSpecial");else if(f=$.$typeLookup(f),f!==void 0)return f.tp$descr_get!==void 0&&(f=f.tp$descr_get(u,$)),f},Sk.exportSymbol("Sk.abstr.lookupSpecial",Sk.abstr.lookupSpecial),Sk.abstr.lookupAttr=function(u,f){try{return u.tp$getattr(f)}catch($){if(!($ instanceof Sk.builtin.AttributeError))throw $}},Sk.abstr.typeLookup=function(u,f){return f=u.$typeLookup(f),f!==void 0&&f.tp$descr_get?f.tp$descr_get(null,u):f},Sk.abstr.markUnhashable=function(u){u=u.prototype,u.__hash__=Sk.builtin.none.none$,u.tp$hash=Sk.builtin.none.none$},Sk.abstr.setUpInheritance=function(u,f,$,m){m=m||Sk.builtin.type,$=$===void 0?Sk.builtin.object:$;let _=$!==null?$.prototype:null;Object.setPrototypeOf(f,m.prototype),Object.setPrototypeOf(f.prototype,_),Object.defineProperties(f.prototype,{sk$object:{value:f,writable:!0},ob$type:{value:f,writable:!0},tp$name:{value:u,writable:!0},tp$base:{value:$,writable:!0}})},Sk.abstr.setUpBuiltinMro=function(u){let f=u.prototype.tp$base,$=f===null?[]:[f];(f===Sk.builtin.object||f===null)&&(Object.defineProperty(u,"sk$baseClass",{value:!0,writable:!0}),Object.defineProperty(u.prototype,"sk$builtinBase",{value:u,writable:!0})),Object.defineProperty(u,"sk$solidBase",{value:!0,writable:!0});let m=[u];for(;f!==null;)m.push(f),f=f.prototype.tp$base;Object.defineProperties(u.prototype,{sk$prototypical:{value:!0,writable:!0},tp$bases:{value:$,writable:!0},tp$mro:{value:m,writable:!0}}),Object.defineProperty(u,"$typeLookup",{value:function(_){return this.prototype[_.$mangled]},writable:!0})};let c=u=>Sk.builtin.str&&Sk.builtin.str.$fixReserved?(c=Sk.builtin.str.$fixReserved,Sk.builtin.str.$fixReserved(u)):u;Sk.abstr.setUpGetSets=function(u,f){if(Sk.builtin.getset_descriptor!==void 0){var $=u.prototype;f=f||$.tp$getsets||{},Object.entries(f).forEach(m=>{var[_,v]=m;v.$name=_,$[c(_)]=new Sk.builtin.getset_descriptor(u,v)}),Object.defineProperty($,"tp$getsets",{value:null,writable:!0})}},Sk.abstr.setUpMethods=function(u,f){if(Sk.builtin.method_descriptor!==void 0){var $=u.prototype;f=f||$.tp$methods||{},Object.entries(f).forEach(m=>{var[_,v]=m;v.$name=_,$[c(_)]=new Sk.builtin.method_descriptor(u,v)}),Object.defineProperty($,"tp$methods",{value:null,writable:!0})}},Sk.abstr.setUpClassMethods=function(u,f){if(Sk.builtin.classmethod_descriptor!==void 0){var $=u.prototype;f=f||$.tp$classmethods||{},Object.entries(f).forEach(m=>{var[_,v]=m;v.$name=_,$[c(_)]=new Sk.builtin.classmethod_descriptor(u,v)}),Object.defineProperty($,"tp$classmethods",{value:null,writable:!0})}};let o={Eq:"ob$eq",NotEq:"ob$ne",Gt:"ob$gt",GtE:"ob$ge",Lt:"ob$lt",LtE:"ob$le"},d=Object.entries(o);Sk.abstr.setUpSlots=function(u,f){function $(A,N){_[A]=new Sk.builtin.wrapper_descriptor(u,Sk.slots[A],N)}function m(A,N){typeof A=="string"?$(A,N):A.forEach(M=>{$(M,N)})}if(Sk.builtin.wrapper_descriptor!==void 0){var _=u.prototype;f=f||_.tp$slots||{},f.tp$new===Sk.generic.new&&(f.tp$new=Sk.generic.new(u)),f.tp$richcompare?h(f):f.ob$eq&&(f.tp$richcompare=function(A,N){return this[o[N]].call(this,A)}),f.tp$as_number&&a(f),f.tp$as_sequence_or_mapping&&S(f),Object.entries(f).forEach(A=>{var[N,M]=A;Object.defineProperty(_,N,{value:M,writable:!0})}),f.tp$new&&(_.__new__=new Sk.builtin.sk_method(Sk.generic.newMethodDef,u),Object.defineProperty(_,"sk$staticNew",{value:u,writable:!0})),Sk.subSlots.main_slots.forEach(A=>{var[N,M]=A;A=f[N],A!==void 0&&m(M,A)});var v=f.tp$hash;v!==void 0&&(typeof v=="function"?$("__hash__",v):v===Sk.builtin.none.none$?_.__hash__=v:Sk.asserts.fail("invalid tp$hash")),f.tp$as_number&&Sk.subSlots.number_slots.forEach(A=>{var[N,M]=A;A=f[N],A!==void 0&&m(M,A)}),f.tp$as_sequence_or_mapping&&Sk.subSlots.sequence_and_mapping_slots.forEach(A=>{var[N,M]=A;A=f[N],A!==void 0&&m(M,A)}),Object.defineProperty(_,"tp$slots",{value:null,writable:!0})}},Sk.abstr.buildNativeClass=function(u,f){f=f||{},Sk.asserts.assert(f.hasOwnProperty("constructor"),"A constructor is required to build a native class");let $=f.constructor;Sk.abstr.setUpInheritance(u,$,f.base,f.meta),Sk.abstr.setUpBuiltinMro($);let m=$.prototype;return Object.defineProperties(m,{tp$slots:{value:f.slots,writable:!0},tp$getsets:{value:f.getsets,writable:!0},tp$methods:{value:f.methods,writable:!0},tp$classmethods:{value:f.classmethods,writable:!0}}),Sk.abstr.setUpSlots($,f.slots||{}),Sk.abstr.setUpMethods($,f.methods),Sk.abstr.setUpGetSets($,f.getsets),Sk.abstr.setUpClassMethods($,f.classmethods),Object.entries(f.proto||{}).forEach(_=>{var[v,A]=_;Object.defineProperty(m,v,{value:A,writable:!0,enumerable:!(v.includes("$")||v in Object.prototype)})}),Object.entries(f.flags||{}).forEach(_=>{var[v,A]=_;Object.defineProperty($,v,{value:A,writable:!0})}),m.hasOwnProperty("tp$iter")&&(m[Symbol.iterator]=function(){return this.tp$iter()[Symbol.iterator]()}),Sk.builtin.str!==void 0&&m.hasOwnProperty("tp$doc")&&!m.hasOwnProperty("__doc__")&&(u=m.tp$doc||null,m.__doc__=typeof u=="string"?new Sk.builtin.str(u):Sk.builtin.none.none$),$},Sk.abstr.buildIteratorClass=function(u,f){return Sk.asserts.assert(f.hasOwnProperty("constructor"),"must provide a constructor"),f.slots=f.slots||{},f.slots.tp$iter=Sk.generic.selfIter,f.slots.tp$iternext=f.slots.tp$iternext||f.iternext,f.slots.tp$getattr=f.slots.tp$getattr||Sk.generic.getAttr,u=Sk.abstr.buildNativeClass(u,f),Sk.abstr.built$iterators.push(u),u.prototype[Symbol.iterator]=function(){return{next:()=>{let $=this.tp$iternext();return{value:$,done:$===void 0}}}},u},Sk.abstr.built$iterators=[],Sk.abstr.setUpModuleMethods=function(u,f,$){return Object.entries($).forEach(m=>{var[_,v]=m;v.$name=v.$name||_,f[_]=new Sk.builtin.sk_method(v,null,u)}),f},Sk.abstr.superConstructor=function(u,f,$){var m=Array.prototype.slice.call(arguments,2);u.prototype.tp$base.apply(f,m)}},function(p,b){function e(r){let l=r.prototype,h=l.tp$base;if(h==null)return!1;let a=h.prototype;return!(h.sk$solidSlotBase||r.sk$solidSlotBase||a.sk$hasDict!==l.sk$hasDict||h.sk$solidBase&&h!==Sk.builtin.module)}function i(r,l){r=r.prototype,l=l.prototype;let h=r.ht$slots,a=l.ht$slots;return r.sk$hasDict!==l.sk$hasDict?!1:h===a?!0:h&&a?h.length===a.length&&h.every((S,t)=>S===a[t]):(h&&(h.length||null))===(a&&(a.length||null))}let n=new WeakMap;Sk.builtin.object=Sk.abstr.buildNativeClass("object",{constructor:function(){Sk.asserts.assert(this instanceof Sk.builtin.object,"bad call to object, use 'new'")},base:null,slots:{tp$new(r,l){if(r.length||l&&l.length){if(this.tp$new!==Sk.builtin.object.prototype.tp$new)throw new Sk.builtin.TypeError("object.__new__() takes exactly one argument (the type to instantiate)");if(this.tp$init===Sk.builtin.object.prototype.tp$init)throw new Sk.builtin.TypeError(Sk.abstr.typeName(this)+"() takes no arguments")}return new this.constructor},tp$init(r,l){if(r.length||l&&l.length){if(this.tp$init!==Sk.builtin.object.prototype.tp$init)throw new Sk.builtin.TypeError("object.__init__() takes exactly one argument (the instance to initialize)");if(this.tp$new===Sk.builtin.object.prototype.tp$new)throw new Sk.builtin.TypeError(Sk.abstr.typeName(this)+".__init__() takes exactly one argument (the instance to initialize)")}},tp$getattr:Sk.generic.getAttr,tp$setattr:Sk.generic.setAttr,$r(){let r=Sk.abstr.lookupSpecial(this,Sk.builtin.str.$module),l="";return r&&Sk.builtin.checkString(r)&&(l=r.v+"."),new Sk.builtin.str("<"+l+Sk.abstr.typeName(this)+" object>")},tp$str(){return this.$r()},tp$hash(){let r=n.get(this);return r!==void 0||(r=Math.floor(Math.random()*Number.MAX_SAFE_INTEGER-Number.MAX_SAFE_INTEGER/2),n.set(this,r)),r},tp$richcompare(r,l){switch(l){case"Eq":r=this===r||Sk.builtin.NotImplemented.NotImplemented$;break;case"NotEq":r=this.ob$eq(r,"Eq"),r!==Sk.builtin.NotImplemented.NotImplemented$&&(r=!Sk.misceval.isTrue(r));break;default:r=Sk.builtin.NotImplemented.NotImplemented$}return r},tp$doc:"The most base type"},getsets:{__class__:{$get(){return this.ob$type},$set(r){if(r===void 0)throw new Sk.builtin.TypeError("can't delete __class__ attribute");if(!Sk.builtin.checkClass(r))throw new Sk.builtin.TypeError("__class__ must be set to a class, not '"+Sk.abstr.typeName(r)+"' object");let l=this.ob$type;if(!(l.$isSubType(Sk.builtin.module)&&r.$isSubType(Sk.builtin.module)||l.prototype.ht$type!==void 0&&r.prototype.ht$type!==void 0))throw new Sk.builtin.TypeError(" __class__ assignment only supported for heap types or ModuleType subclasses");{let h=l,a=r;for(;e(h);)h=h.prototype.tp$base;for(;e(a);)a=a.prototype.tp$base;if(h!==a&&(h.prototype.tp$base!==a.prototype.tp$base||!i(h,a)))throw new Sk.builtin.TypeError("__class__ assignment: '"+r.prototype.tp$name+"' object layout differs from '"+l.prototype.tp$name+"'")}Object.setPrototypeOf(this,r.prototype)},$doc:"the object's class"}},methods:{__dir__:{$meth:function(){let r=Sk.abstr.lookupAttr(this,Sk.builtin.str.$dict);r=r===void 0?new Sk.builtin.dict([]):r instanceof Sk.builtin.dict?r.dict$copy():new Sk.builtin.dict([]);let l=Sk.abstr.lookupAttr(this,Sk.builtin.str.$class);return l!==void 0&&l.$mergeClassDict(r),new Sk.builtin.list(r.sk$asarray())},$flags:{NoArgs:!0},$doc:"Default dir() implementation."},__format__:{$meth(r){if(!Sk.builtin.checkString(r))throw new Sk.builtin.TypeError("__format__() argument must be str, not "+Sk.abstr.typeName(r));if(r!==Sk.builtin.str.$empty)throw new Sk.builtin.TypeError(`unsupported format string passed to ${Sk.abstr.typeName(this)}.__format__`);return this.tp$str()},$flags:{OneArg:!0},$doc:"Default object formatter."}},classmethods:{__init_subclass__:{$meth(r){return Sk.builtin.none.none$},$flags:{FastCall:!0,NoKwargs:!0}}},proto:{valueOf:Object.prototype.valueOf,toString(){return this.tp$str().v},hasOwnProperty:Object.prototype.hasOwnProperty,ht$type:void 0,sk$attrError(){return"'"+this.tp$name+"' object"},$mergeClassDict(r){var l=Sk.abstr.lookupAttr(this,Sk.builtin.str.$dict);if(l!==void 0&&r.dict$merge(l),l=Sk.abstr.lookupAttr(this,Sk.builtin.str.$bases),l!==void 0){var h=Sk.builtin.len(l).valueOf();for(let a=0;aN===void 0?Sk.builtin.none.none$:N)}function r(_,v,A){return Sk.abstr.checkNoKwargs(this.$name,A),Sk.abstr.checkArgsLen(this.$name,v,1,2),_=this.call(_,...v),_===void 0?Sk.builtin.none.none$:_}function l(_,v,A){return Sk.abstr.checkNoKwargs(this.$name,A),Sk.abstr.checkArgsLen(this.$name,v,2,2),Sk.misceval.chain(this.call(_,v[0],v[1],!0),()=>Sk.builtin.none.none$)}function h(_,v,A){return Sk.abstr.checkOneArg(this.$name,v,A),_=this.call(_,v[0],void 0,!0),Sk.misceval.chain(_,N=>N===void 0?Sk.builtin.none.none$:N)}function a(_,v,A){return _=i.call(this,_,v,A),_===Sk.builtin.NotImplemented.NotImplemented$?_:new Sk.builtin.bool(_)}function S(_,v,A){return function(N,M,R){return N=_.call(this,N,M,R),A?Sk.misceval.chain(N,v):v(Sk.misceval.retryOptionalSuspensionOrThrow(N))}}function t(_){return function(){let v=_.tp$descr_get?_.tp$descr_get(this,this.ob$type):_;return Sk.misceval.callsimArray(v,[])}}function s(_,v,A,N){return function(M){return function(){var R=M.tp$descr_get?M.tp$descr_get(this,this.ob$type):M;if(R=Sk.misceval.callsimArray(R,[]),!v(R))throw new Sk.builtin.TypeError(_+" should return "+A+" (returned "+Sk.abstr.typeName(R)+")");return N!==void 0?N(R):R}}}function c(_){return function(v){let A=_.tp$descr_get?_.tp$descr_get(this,this.ob$type):_;return Sk.misceval.callsimArray(A,[v])}}function o(_,v){let A=this.ob$type.$typeLookup(Sk.builtin.str.$getattribute);if(A instanceof Sk.builtin.wrapper_descriptor)return A.d$wrapped.call(this,_,v);A.tp$descr_get&&(A=A.tp$descr_get(this,this.ob$type));let N=Sk.misceval.tryCatch(()=>Sk.misceval.callsimOrSuspendArray(A,[_]),M=>{if(!(M instanceof Sk.builtin.AttributeError))throw M});return v?N:Sk.misceval.retryOptionalSuspensionOrThrow(N)}function d(_,v,A){return function(N){return function(M,R,H){let ee;R===void 0?(ee=v,A=null):ee=_;let J=this.ob$type.$typeLookup(new Sk.builtin.str(ee));if(J instanceof Sk.builtin.wrapper_descriptor)return J.d$wrapped.call(this,M,R);if(J.tp$descr_get&&(J=J.tp$descr_get(this,this.ob$type,H)),J!==void 0)M=Sk.misceval.callsimOrSuspendArray(J,R===void 0?[M]:[M,R]);else throw A?new Sk.builtin.TypeError("'"+Sk.abstr.typeName(this)+"' object "+A):new Sk.builtin.AttributeError(ee);return H?M:Sk.misceval.retryOptionalSuspensionOrThrow(M)}}}function u(_,v){let A=_.ob$type;for(;A&&A.sk$klass!==void 0;)A=A.prototype.tp$base;if(A&&A.prototype.tp$setattr!==v)throw new Sk.builtin.TypeError("can't apply this "+v.$name+" to "+Sk.abstr.typeName(_)+" object")}Sk.slots=Object.create(null),p=Sk.slots,Sk.slots.__init__={$name:"__init__",$slot_name:"tp$init",$slot_func:function(_){return function(v,A){let N=_.tp$descr_get?_.tp$descr_get(this,this.ob$type):_;return v=Sk.misceval.callsimOrSuspendArray(N,v,A),Sk.misceval.chain(v,M=>{if(!Sk.builtin.checkNone(M)&&M!==void 0)throw new Sk.builtin.TypeError("__init__() should return None, not "+Sk.abstr.typeName(M))})}},$wrapper:function(_,v,A){return this.call(_,v,A),Sk.builtin.none.none$},$textsig:"($self, /, *args, **kwargs)",$flags:{FastCall:!0},$doc:"Initialize self. See help(type(self)) for accurate signature."},p.__new__={$name:"__new__",$slot_name:"tp$new",$slot_func:function(_){let v=function(A,N){let M=_;return _.tp$descr_get&&(M=_.tp$descr_get(null,this.constructor)),Sk.misceval.callsimOrSuspendArray(M,[this.constructor,...A],N)};return v.sk$static_new=!1,v},$wrapper:null,$textsig:"($self, /, *args, **kwargs)",$flags:{FastCall:!0},$doc:"Create and return a new object."},p.__call__={$name:"__call__",$slot_name:"tp$call",$slot_func:function(_){return function(v,A){let N=_.tp$descr_get?_.tp$descr_get(this,this.ob$type):_;return Sk.misceval.callsimOrSuspendArray(N,v,A)}},$wrapper:function(_,v,A){return _=this.call(_,v,A),_===void 0?Sk.builtin.none.none$:_},$textsig:"($self, /, *args, **kwargs)",$flags:{FastCall:!0},$doc:"Call self as a function."},p.__repr__={$name:"__repr__",$slot_name:"$r",$slot_func:s("__repr__",Sk.builtin.checkString,"str"),$wrapper:e,$textsig:"($self, /)",$flags:{NoArgs:!0},$doc:"Return repr(self)."},p.__str__={$name:"__str__",$slot_name:"tp$str",$slot_func:s("__str__",Sk.builtin.checkString,"str"),$wrapper:e,$textsig:"($self, /)",$flags:{NoArgs:!0},$doc:"Return str(self)."};var f=s("__hash__",Sk.builtin.checkInt,"int",_=>typeof _.v=="number"?_.v:_.tp$hash());p.__hash__={$name:"__hash__",$slot_name:"tp$hash",$slot_func:function(_){return _===Sk.builtin.none.none$?Sk.builtin.none.none$:f(_)},$wrapper:S(e,_=>new Sk.builtin.int_(_)),$textsig:"($self, /)",$flags:{NoArgs:!0},$doc:"Return hash(self)."},p.__getattribute__={$name:"__getattribute__",$slot_name:"tp$getattr",$slot_func:function(_){return function(v,A){let N=this.ob$type.$typeLookup(Sk.builtin.str.$getattr);if(N===void 0)return o.call(this,v,A);let M=Sk.misceval.chain(o.call(this,v,A),R=>Sk.misceval.tryCatch(()=>R!==void 0?R:(N.tp$descr_get&&(N=N.tp$descr_get(this,this.ob$type)),Sk.misceval.callsimOrSuspendArray(N,[v])),function(H){if(!(H instanceof Sk.builtin.AttributeError))throw H}));return A?M:Sk.misceval.retryOptionalSuspensionOrThrow(M)}},$wrapper:function(_,v,A){Sk.abstr.checkOneArg(this.$name,v,A);let N=v[0];if(!Sk.builtin.checkString(N))throw new Sk.builtin.TypeError("attribute name must be string, not '"+Sk.abstr.typeName(N)+"'");return v=this.call(_,N,!0),Sk.misceval.chain(v,M=>{if(M===void 0)throw new Sk.builtin.AttributeError(Sk.abstr.typeName(_)+" has no attribute "+N.$jsstr());return M})},$textsig:"($self, name, /)",$flags:{OneArg:!0},$doc:"Return getattr(self, name)."},p.__getattr__={$name:"__getattr__",$slot_name:"tp$getattr",$slot_func:p.__getattribute__.$slot_func,$wrapper:null,$textsig:"($self, name, /)",$flags:{OneArg:!0},$doc:"Return getattr(self, name)."},p.__setattr__={$name:"__setattr__",$slot_name:"tp$setattr",$slot_func:d("__setattr__","__delattr__"),$wrapper:function(_,v,A){return Sk.abstr.checkNoKwargs(this.$name,A),Sk.abstr.checkArgsLen(this.$name,v,2,2),u(_,this),Sk.misceval.chain(this.call(_,v[0],v[1],!0),()=>Sk.builtin.none.none$)},$textsig:"($self, name, value, /)",$flags:{MinArgs:2,MaxArgs:2},$doc:"Implement setattr(self, name, value)."},p.__delattr__={$name:"__delattr__",$slot_name:"tp$setattr",$slot_func:p.__setattr__.$slot_func,$wrapper:function(_,v,A){return Sk.abstr.checkOneArg(this.$name,v,A),u(_,this),this.call(_,v[0]),Sk.builtin.none.none$},$textsig:"($self, name, /)",$flags:{OneArg:!0},$doc:"Implement delattr(self, name)."},p.__get__={$name:"__get__",$slot_name:"tp$descr_get",$slot_func:function(_){return function(v,A,N){v===null&&(v=Sk.builtin.none.none$),A==null&&(A=Sk.builtin.none.none$);let M=_.tp$descr_get?_.tp$descr_get(this,this.ob$type):_;return v=Sk.misceval.callsimOrSuspendArray(M,[v,A]),N?v:Sk.misceval.retryOptionalSuspensionOrThrow(v)}},$wrapper:function(_,v,A){if(Sk.abstr.checkNoKwargs(this.$name,A),Sk.abstr.checkArgsLen(this.$name,v,1,2),A=v[0],v=v[1],A===Sk.builtin.none.none$&&(A=null),v===Sk.builtin.none.none$&&(v=null),v===null&&A===null)throw new Sk.builtin.TypeError("__get__(None, None) is invalid");return this.call(_,A,v,!0)},$textsig:"($self, instance, owner, /)",$flags:{MinArgs:2,MaxArgs:2},$doc:"Return an attribute of instance, which is of type owner."},p.__set__={$name:"__set__",$slot_name:"tp$descr_set",$slot_func:d("__set__","__delete__"),$wrapper:l,$textsig:"($self, instance, value, /)",$flags:{MinArgs:2,MaxArgs:2},$doc:"Set an attribute of instance to value."},p.__delete__={$name:"__delete__",$slot_name:"tp$descr_set",$slot_func:p.__set__.$slot_func,$wrapper:h,$textsig:"($self, instance, /)",$flags:{OneArg:!0},$doc:"Delete an attribute of instance."},p.__eq__={$name:"__eq__",$slot_name:"ob$eq",$slot_func:c,$wrapper:a,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return self==value."},p.__ge__={$name:"__ge__",$slot_name:"ob$ge",$slot_func:c,$wrapper:a,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return self>=value."},p.__gt__={$name:"__gt__",$slot_name:"ob$gt",$slot_func:c,$wrapper:a,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return self>value."},p.__le__={$name:"__le__",$slot_name:"ob$le",$slot_func:c,$wrapper:a,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return self<=value."},p.__lt__={$name:"__lt__",$slot_name:"ob$lt",$slot_func:c,$wrapper:a,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return selfSk.misceval.callsimOrSuspendArray(A,[]),M=>{if(M instanceof Sk.builtin.StopIteration)this.gi$ret=M.$value;else throw M});return v?N:Sk.misceval.retryOptionalSuspensionOrThrow(N)}},$wrapper:function(_,v,A){return Sk.abstr.checkNoArgs(this.$name,v,A),Sk.misceval.chain(_.tp$iternext(!0),N=>{if(N===void 0)throw new Sk.builtin.StopIteration;return N})},$textsig:"($self, /)",$flags:{NoArgs:!0},$doc:"Implement next(self)."},p.__len__={$name:"__len__",$slot_name:"sq$length",$slot_func:function(_){return function(v){let A=_.tp$descr_get?_.tp$descr_get(this,this.ob$type):_;return v?(v=Sk.misceval.callsimOrSuspendArray(A,[]),Sk.misceval.chain(v,N=>Sk.misceval.asIndexOrThrow(N))):(v=Sk.misceval.callsimArray(A,[]),Sk.misceval.asIndexOrThrow(v))}},$wrapper:S(function(_,v,A){return Sk.abstr.checkNoArgs(this.$name,v,A),_=this.call(_,!0),Sk.misceval.chain(_,N=>N===void 0?Sk.builtin.none.none$:N)},_=>new Sk.builtin.int_(_),!0),$flags:{NoArgs:!0},$textsig:"($self, /)",$doc:"Return len(self)."},p.__contains__={$name:"__contains__",$slot_name:"sq$contains",$slot_func:function(_){return function(v,A){let N=_.tp$descr_get?_.tp$descr_get(this,this.ob$type):_;return v=Sk.misceval.callsimOrSuspendArray(N,[v]),v=Sk.misceval.chain(v,M=>Sk.misceval.isTrue(M)),v.$isSuspension?A?v:Sk.misceval.retryOptionalSuspensionOrThrow(v):v}},$wrapper:S(n,_=>new Sk.builtin.bool(_),!0),$textsig:"($self, key, /)",$flags:{OneArg:!0},$doc:"Return key in self."},p.__getitem__={$name:"__getitem__",$slot_name:"mp$subscript",$slot_func:function(_){return function(v,A){let N=_.tp$descr_get?_.tp$descr_get(this,this.ob$type):_;return v=Sk.misceval.callsimOrSuspendArray(N,[v]),A?v:Sk.misceval.retryOptionalSuspensionOrThrow(v)}},$wrapper:n,$textsig:"($self, key, /)",$flags:{OneArg:!0},$doc:"Return self[key]."},p.__setitem__={$name:"__setitem__",$slot_name:"mp$ass_subscript",$slot_func:d("__setitem__","__delitem__","does not support item assignment"),$wrapper:l,$textsig:"($self, key, value, /)",$flags:{MinArgs:2,MaxArgs:2},$doc:"Set self[key] to value."},p.__delitem__={$name:"__delitem__",$slot_name:"mp$ass_subscript",$slot_func:p.__setitem__.$slot_func,$wrapper:h,$textsig:"($self, key, /)",$flags:{OneArg:!0},$doc:"Delete self[key]."},p.__add__={$name:"__add__",$slot_name:"nb$add",$slot_func:c,$wrapper:i,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return self+value."},p.__radd__={$name:"__radd__",$slot_name:"nb$reflected_add",$slot_func:c,$wrapper:i,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return value+self."},p.__iadd__={$name:"__iadd__",$slot_name:"nb$inplace_add",$slot_func:c,$wrapper:i,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Implement self+=value."},p.__sub__={$name:"__sub__",$slot_name:"nb$subtract",$slot_func:c,$wrapper:i,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return self-value."},p.__rsub__={$name:"__rsub__",$slot_name:"nb$reflected_subtract",$slot_func:c,$wrapper:i,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return value-self."},p.__imul__={$name:"__imul__",$slot_name:"nb$inplace_multiply",$slot_func:c,$wrapper:i,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Implement self*=value."},p.__mul__={$name:"__mul__",$slot_name:"nb$multiply",$slot_func:c,$wrapper:i,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return self*value."},p.__rmul__={$name:"__rmul__",$slot_name:"nb$reflected_multiply",$slot_func:c,$wrapper:i,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return value*self."},p.__isub__={$name:"__isub__",$slot_name:"nb$inplace_subtract",$slot_func:c,$wrapper:i,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Implement self-=value."},p.__mod__={$name:"__mod__",$slot_name:"nb$remainder",$slot_func:c,$wrapper:i,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return self%value."},p.__rmod__={$name:"__rmod__",$slot_name:"nb$reflected_remainder",$slot_func:c,$wrapper:i,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return value%self."},p.__imod__={$name:"__imod__",$slot_name:"nb$inplace_remainder",$slot_func:c,$wrapper:i,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Implement value%=self."},p.__divmod__={$name:"__divmod__",$slot_name:"nb$divmod",$slot_func:c,$wrapper:i,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return divmod(self, value)."},p.__rdivmod__={$name:"__rdivmod__",$slot_name:"nb$reflected_divmod",$slot_func:c,$wrapper:i,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return divmod(value, self)"},p.__pos__={$name:"__pos__",$slot_name:"nb$positive",$slot_func:t,$wrapper:e,$textsig:"($self, /)",$flags:{NoArgs:!0},$doc:"+self"},p.__neg__={$name:"__neg__",$slot_name:"nb$negative",$slot_func:t,$wrapper:e,$textsig:"($self, /)",$flags:{NoArgs:!0},$doc:"-self"},p.__abs__={$name:"__abs__",$slot_name:"nb$abs",$slot_func:t,$wrapper:e,$textsig:"($self, /)",$flags:{NoArgs:!0},$doc:"abs(self)"},p.__bool__={$name:"__bool__",$slot_name:"nb$bool",$slot_func:s("__bool__",Sk.builtin.checkBool,"bool",_=>_.v!==0),$wrapper:S(e,_=>new Sk.builtin.bool(_)),$textsig:"($self, /)",$flags:{NoArgs:!0},$doc:"self != 0"},p.__invert__={$name:"__invert__",$slot_name:"nb$invert",$slot_func:t,$wrapper:e,$textsig:"($self, /)",$flags:{NoArgs:!0},$doc:"~self"},p.__lshift__={$name:"__lshift__",$slot_name:"nb$lshift",$slot_func:c,$wrapper:i,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return self<>value."},p.__rrshift__={$name:"__rrshift__",$slot_name:"nb$reflected_rshift",$slot_func:c,$wrapper:i,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return value>>self."},p.__ilshift__={$name:"__ilshift__",$slot_name:"nb$inplace_lshift",$slot_func:c,$wrapper:i,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Implement self<<=value."},p.__irshift__={$name:"__irshift__",$slot_name:"nb$inplace_rshift",$slot_func:c,$wrapper:i,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Implement self=>>value."},p.__and__={$name:"__and__",$slot_name:"nb$and",$slot_func:c,$wrapper:i,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return self&value."},p.__rand__={$name:"__rand__",$slot_name:"nb$refelcted_and",$slot_func:c,$wrapper:i,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return value&self."},p.__iand__={$name:"__iand__",$slot_name:"nb$and",$slot_func:c,$wrapper:i,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Implement self&=value."},p.__xor__={$name:"__xor__",$slot_name:"nb$xor",$slot_func:c,$wrapper:i,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return self^value."},p.__rxor__={$name:"__rxor__",$slot_name:"nb$reflected_xor",$slot_func:c,$wrapper:i,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return value^self."},p.__ixor__={$name:"__ixor__",$slot_name:"nb$inplace_xor",$slot_func:c,$wrapper:i,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Implement self^=value."},p.__or__={$name:"__or__",$slot_name:"nb$or",$slot_func:c,$wrapper:i,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return self|value."},p.__ror__={$name:"__ror__",$slot_name:"nb$reflected_or",$slot_func:c,$wrapper:i,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return value|self."},p.__ior__={$name:"__ior__",$slot_name:"nb$inplace_or",$slot_func:c,$wrapper:i,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Implement self|=value."},p.__int__={$name:"__int__",$slot_name:"nb$int",$slot_func:s("__int__",Sk.builtin.checkInt,"int"),$wrapper:e,$textsig:"($self, /)",$flags:{NoArgs:!0},$doc:"int(self)"},p.__float__={$name:"__float__",$slot_name:"nb$float",$slot_func:s("__float__",Sk.builtin.checkFloat,"float"),$wrapper:e,$textsig:"($self, /)",$flags:{NoArgs:!0},$doc:"float(self)"},p.__floordiv__={$name:"__floordiv__",$slot_name:"nb$floor_divide",$slot_func:c,$wrapper:i,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return self//value."},p.__rfloordiv__={$name:"__rfloordiv__",$slot_name:"nb$reflected_floor_divide",$slot_func:c,$wrapper:i,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return value//self."},p.__ifloordiv__={$name:"__ifloordiv__",$slot_name:"nb$inplace_floor_divide",$slot_func:c,$wrapper:i,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Implement self//=value."},p.__truediv__={$name:"__truediv__",$slot_name:"nb$divide",$slot_func:c,$wrapper:i,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return self/value."},p.__rtruediv__={$name:"__rtruediv__",$slot_name:"nb$reflected_divide",$slot_func:c,$wrapper:i,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return value/self."},p.__itruediv__={$name:"__itruediv__",$slot_name:"nb$inplace_divide",$slot_func:c,$wrapper:i,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Implement self/=value."},p.__index__={$name:"__index__",$slot_name:"nb$index",$slot_func:s("__index__",Sk.builtin.checkInt,"int",_=>_.v),$wrapper:S(e,_=>new Sk.builtin.int_(_)),$textsig:"($self, /)",$flags:{NoArgs:!0},$doc:"Return self converted to an integer, if self is suitable for use as an index into a list."},p.__pow__={$name:"__pow__",$slot_name:"nb$power",$slot_func:function(_){return function(v,A){let N=_.tp$descr_get?_.tp$descr_get(this,this.ob$type):_;return A==null?Sk.misceval.callsimArray(N,[v]):Sk.misceval.callsimArray(N,[v,A])}},$wrapper:r,$textsig:"($self, value, mod=None, /)",$flags:{MinArgs:1,MaxArgs:2},$doc:"Return pow(self, value, mod)."},p.__rpow__={$name:"__rpow__",$slot_name:"nb$reflected_power",$slot_func:p.__pow__.$slot_func,$wrapper:r,$textsig:"($self, value, mod=None, /)",$flags:{MinArgs:1,MaxArgs:2},$doc:"Return pow(value, self, mod)."},p.__ipow__={$name:"__ipow__",$slot_name:"nb$inplace_power",$slot_func:p.__pow__.$slot_func,$wrapper:r,$textsig:"($self, value, mod=None, /)",$flags:{MinArgs:1,MaxArgs:2},$doc:"Implement **="},p.__matmul__={$name:"__matmul__",$slot_name:"nb$matrix_multiply",$slot_func:c,$wrapper:i,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return self@value."},p.__rmatmul__={$name:"__rmatmul__",$slot_name:"nb$reflected_matrix_multiply",$slot_func:c,$wrapper:i,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Return value@self."},p.__imatmul__={$name:"__imatmul__",$slot_name:"nb$inplace_matrix_multiply",$slot_func:c,$wrapper:i,$textsig:"($self, value, /)",$flags:{OneArg:!0},$doc:"Implement self@=value."},p.__long__={$name:"__long__",$slot_name:"nb$long",$slot_func:s("__long__",Sk.builtin.checkInt,"int"),$wrapper:e,$textsig:"($self, /)",$flags:{NoArgs:!0},$doc:"int(self)"};var $,m={next:{$name:"next",$slot_name:"tp$iternext",$slot_func:p.__next__.$slot_func,$wrapper:p.__next__.$wrapper,$textsig:p.__next__.$textsig,$flags:p.__next__.$flags},__nonzero__:{$name:"__nonzero__",$slot_name:"nb$bool",$slot_func:s("__nonzero__",Sk.builtin.checkInt,"int",_=>_.v!==0),$wrapper:S(e,_=>new Sk.builtin.bool(_)),$textsig:"($self, /)",$flags:{NoArgs:!0},$doc:"x.__nonzero__() <==> x != 0"},__div__:{$name:"__div__",$slot_name:"nb$divide",$slot_func:c,$wrapper:i,$textsig:"($self, other/)",$flags:{OneArg:!0},$doc:"x.__div__(y) <==> x/y"},__rdiv__:{$name:"__rdiv__",$slot_name:"nb$reflected_divide",$slot_func:c,$wrapper:i,$textsig:"($self, other/)",$flags:{OneArg:!0},$doc:"x.__rdiv__(y) <==> x/y"},__idiv__:{$name:"__idiv__",$slot_name:"nb$inplace_divide",$slot_func:c,$wrapper:i,$textsig:"($self, other/)",$flags:{OneArg:!0},$doc:"implement self /= other"}};Sk.subSlots={main_slots:Object.entries({tp$init:"__init__",tp$call:"__call__",$r:"__repr__",tp$str:"__str__",tp$getattr:"__getattribute__",tp$setattr:["__setattr__","__delattr__"],ob$eq:"__eq__",ob$ne:"__ne__",ob$lt:"__lt__",ob$le:"__le__",ob$gt:"__gt__",ob$ge:"__ge__",tp$descr_get:"__get__",tp$descr_set:["__set__","__delete__"],tp$iter:"__iter__",tp$iternext:"__next__"}),number_slots:Object.entries({nb$abs:"__abs__",nb$negative:"__neg__",nb$positive:"__pos__",nb$int:"__int__",nb$long:"__long__",nb$float:"__float__",nb$index:"__index__",nb$add:"__add__",nb$reflected_add:"__radd__",nb$inplace_add:"__iadd__",nb$subtract:"__sub__",nb$reflected_subtract:"__rsub__",nb$inplace_subtract:"__isub__",nb$multiply:"__mul__",nb$reflected_multiply:"__rmul__",nb$inplace_multiply:"__imul__",nb$floor_divide:"__floordiv__",nb$reflected_floor_divide:"__rfloordiv__",nb$inplace_floor_divide:"__ifloordiv__",nb$invert:"__invert__",nb$remainder:"__mod__",nb$reflected_remainder:"__rmod__",nb$inplace_remainder:"__imod__",nb$divmod:"__divmod__",nb$reflected_divmod:"__rdivmod__",nb$power:"__pow__",nb$reflected_power:"__rpow__",nb$inplace_power:"__ipow__",nb$divide:"__truediv__",nb$reflected_divide:"__rtruediv__",nb$inplace_divide:"__itruediv__",nb$bool:"__bool__",nb$and:"__and__",nb$reflected_and:"__rand__",nb$inplace_and:"__iand__",nb$or:"__or__",nb$reflected_or:"__ror__",nb$inplace_or:"__ior__",nb$xor:"__xor__",nb$reflected_xor:"__rxor__",nb$inplace_xor:"__ixor__",nb$lshift:"__lshift__",nb$reflected_lshift:"__rlshift__",nb$rshift:"__rshift__",nb$reflected_rshift:"__rrshift__",nb$inplace_lshift:"__ilshift__",nb$inplace_rshift:"__irshift__",nb$matrix_multiply:"__matmul__",nb$reflected_matrix_multiply:"__rmatmul__",nb$inplace_matrix_multiply:"__imatmul__"}),sequence_and_mapping_slots:Object.entries({sq$length:"__len__",sq$contains:"__contains__",mp$subscript:"__getitem__",mp$ass_subscript:["__setitem__","__delitem__"],nb$add:"__add__",nb$multiply:"__mul__",nb$reflected_multiply:"__rmul__",nb$inplace_add:"__iadd__",nb$inplace_multiply:"__imul__"})},Sk.reflectedNumberSlots={nb$add:{reflected:"nb$reflected_add"},nb$subtract:{reflected:"nb$reflected_subtract",slot:function(_){return _ instanceof this.constructor?_.nb$subtract(this):Sk.builtin.NotImplemented.NotImplemented$}},nb$multiply:{reflected:"nb$reflected_multiply"},nb$divide:{reflected:"nb$reflected_divide",slot:function(_){return _ instanceof this.constructor?_.nb$divide(this):Sk.builtin.NotImplemented.NotImplemented$}},nb$floor_divide:{reflected:"nb$reflected_floor_divide",slot:function(_){return _ instanceof this.constructor?_.nb$floor_divide(this):Sk.builtin.NotImplemented.NotImplemented$}},nb$remainder:{reflected:"nb$reflected_remainder",slot:function(_){return _ instanceof this.constructor?_.nb$remainder(this):Sk.builtin.NotImplemented.NotImplemented$}},nb$divmod:{reflected:"nb$reflected_divmod",slot:function(_){return _ instanceof this.constructor?_.nb$divmod(this):Sk.builtin.NotImplemented.NotImplemented$}},nb$power:{reflected:"nb$reflected_power",slot:function(_,v){return _ instanceof this.constructor?_.nb$power(this,v):Sk.builtin.NotImplemented.NotImplemented$}},nb$and:{reflected:"nb$reflected_and"},nb$or:{reflected:"nb$reflected_or"},nb$xor:{reflected:"nb$reflected_xor"},nb$lshift:{reflected:"nb$reflected_lshift",slot:function(_){return _ instanceof this.constructor?_.nb$lshift(this):Sk.builtin.NotImplemented.NotImplemented$}},nb$rshift:{reflected:"nb$reflected_rshift",slot:function(_){return _ instanceof this.constructor?_.nb$rshift(this):Sk.builtin.NotImplemented.NotImplemented$}},nb$matrix_multiply:{reflected:"nb$reflexted_matrix_multiply",slot:function(_){return _ instanceof this.constructor?_.nb$matrix_multiply(this):Sk.builtin.NotImplemented.NotImplemented$}}},Sk.sequenceAndMappingSlots={sq$concat:["nb$add"],sq$repeat:["nb$multiply","nb$reflected_multiply"],mp$length:["sq$length"],sq$inplace_repeat:["nb$inplace_multiply"],sq$inplace_concat:["nb$inplace_add"]},Sk.dunderToSkulpt={__repr__:"$r",__str__:"tp$str",__init__:"tp$init",__new__:"tp$new",__hash__:"tp$hash",__call__:"tp$call",__iter__:"tp$iter",__next__:"tp$iternext",__eq__:"ob$eq",__ne__:"ob$ne",__lt__:"ob$lt",__le__:"ob$le",__gt__:"ob$gt",__ge__:"ob$ge",__abs__:"nb$abs",__neg__:"nb$negative",__pos__:"nb$positive",__int__:"nb$int",__float__:"nb$float",__index__:"nb$index",__add__:"nb$add",__radd__:"nb$reflected_add",__iadd__:"nb$inplace_add",__sub__:"nb$subtract",__rsub__:"nb$reflected_subtract",__isub__:"nb$inplace_subtract",__mul__:"nb$multiply",__rmul__:"nb$reflected_multiply",__imul__:"nb$inplace_multiply",__truediv__:"nb$divide",__rtruediv__:"nb$reflected_divide",__itruediv__:"nb$inplace_divide",__floordiv__:"nb$floor_divide",__rfloordiv__:"nb$reflected_floor_divide",__ifloordiv__:"nb$inplace_floor_divide",__invert__:"nb$invert",__mod__:"nb$remainder",__rmod__:"nb$reflected_remainder",__imod__:"nb$inplace_remainder",__divmod__:"nb$divmod",__rdivmod__:"nb$reflected_divmod",__pow__:"nb$power",__rpow__:"nb$reflected_power",__ipow__:"nb$inplace_power",__bool__:"nb$bool",__long__:"nb$long",__lshift__:"nb$lshift",__rlshift__:"nb$reflected_lshift",__ilshift__:"nb$inplace_lshift",__rshift__:"nb$rshift",__rrshift__:"nb$reflected_rshift",__irshift__:"nb$inplace_rshift",__and__:"nb$and",__rand__:"nb$reflected_and",__iand__:"nb$inplace_and",__or__:"nb$or",__ror__:"nb$reflected_or",__ior__:"nb$inplace_or",__xor__:"nb$xor",__rxor__:"nb$reflected_xor",__ixor__:"nb$inplace_xor",__matmul__:"nb$matrix_multiply",__rmatmul__:"nb$reflected_matrix_multiply",__imatmul__:"nb$inplace_matrix_multiply",__get__:"tp$descr_get",__set__:"tp$descr_set",__delete__:"tp$descr_set",__getattribute__:"tp$getattr",__getattr__:"tp$getattr",__setattr__:"tp$setattr",__delattr__:"tp$setattr",__len__:"sq$length",__contains__:"sq$contains",__getitem__:"mp$subscript",__setitem__:"mp$ass_subscript",__delitem__:"mp$ass_subscript"},Sk.exportSymbol("Sk.setupDunderMethods",Sk.setupDunderMethods),Sk.setupDunderMethods=function(_){function v(x,C,F){for(let P=0;Px[0]==="tp$iternext"),J=R.findIndex(x=>x[0]==="nb$bool"),g=Sk.dunderToSkulpt;if(_){g.__bool__="nb$bool",g.__next__="tp$iternext",delete g.__nonzero__,delete g.__div__,delete g.__rdiv__,delete g.__idiv__,delete g.next;for(let x in $)A[x]=$[x];for(let x in m)delete A[x];for(_=0;_")}let l={__doc__:{$get(){return this.d$def.$doc?new Sk.builtin.str(this.d$def.$doc):Sk.builtin.none.none$}},__objclass__:{$get(){return this.d$type}},__name__:{$get(){return new Sk.builtin.str(this.d$name)}}};p={__text_signature__:{$get(){return this.d$def.$textsig?new Sk.builtin.str(this.d$def.$textsig):Sk.builtin.none.none$}}},Sk.builtin.getset_descriptor=e("getset_descriptor",void 0,{constructor:function(h,a){this.d$def=a,this.$get=a.$get,this.$set=a.$set,this.d$type=h,this.d$name=a.$name},slots:{tp$descr_get(h,a,S){if(a=this.d$check(h))return a;if(this.$get!==void 0)return h=this.$get.call(h),S?h:Sk.misceval.retryOptionalSuspensionOrThrow(h);throw new Sk.builtin.AttributeError("getset_descriptor '"+this.d$name+"' of '"+this.d$type.prototype.tp$name+"' objects is not readable")},tp$descr_set(h,a,S){if(this.d$set_check(h),this.$set!==void 0)return h=this.$set.call(h,a),S?h:Sk.misceval.retryOptionalSuspensionOrThrow(h);throw new Sk.builtin.AttributeError("attribute '"+this.d$name+"' of '"+this.d$type.prototype.tp$name+"' objects is readonly")}}}),Sk.builtin.method_descriptor=e("method_descriptor","method",{constructor:function(h,a){this.d$def=a,this.$meth=a.$meth,this.d$type=h,this.d$name=a.$name||"",this.$flags=h=a.$flags||{},h.FastCall&&h.NoKwargs?this.tp$call=this.$methodFastCallNoKwargs:h.FastCall?this.tp$call=this.$methodFastCall:h.NoArgs?this.tp$call=this.$methodCallNoArgs:h.OneArg?this.tp$call=this.$methodCallOneArg:h.NamedArgs?this.tp$call=this.$methodCallNamedArgs:h.MinArgs!==void 0?this.tp$call=this.$methodCallMinArgs:(this.func_code=a.$meth,this.tp$call=this.$defaultCall,this.$memoiseFlags=Sk.builtin.func.prototype.$memoiseFlags,this.$resolveArgs=Sk.builtin.func.prototype.$resolveArgs)},slots:{tp$call(h,a){return this.tp$call(h,a)},tp$descr_get(h,a){let S;return(S=this.d$check(h))?S:new Sk.builtin.sk_method(this.d$def,h)}},getsets:p,proto:{$methodFastCall(h,a){let S=h.shift();return this.m$checkself(S),this.$meth.call(S,h,a)},$methodFastCallNoKwargs(h,a){let S=h.shift();return this.m$checkself(S),Sk.abstr.checkNoKwargs(this.d$name,a),this.$meth.call(S,h)},$methodCallNoArgs(h,a){let S=h.shift();return this.m$checkself(S),Sk.abstr.checkNoArgs(this.d$name,h,a),this.$meth.call(S)},$methodCallOneArg(h,a){let S=h.shift();return this.m$checkself(S),Sk.abstr.checkOneArg(this.d$name,h,a),this.$meth.call(S,h[0])},$methodCallNamedArgs(h,a){let S=h.shift();return this.m$checkself(S),h=Sk.abstr.copyKeywordsToNamedArgs(this.d$name,this.$flags.NamedArgs,h,a,this.$flags.Defaults),this.$meth.call(S,...h)},$methodCallMinArgs(h,a){let S=h.shift();return this.m$checkself(S),Sk.abstr.checkNoKwargs(this.d$name,a),Sk.abstr.checkArgsLen(this.d$name,h,this.$flags.MinArgs,this.$flags.MaxArgs),this.$meth.call(S,...h)},$defaultCall(h,a){return this.m$checkself(h[0]),Sk.builtin.func.prototype.tp$call.call(this,h,a)},m$checkself(h){if(h===void 0)throw new Sk.builtin.TypeError("descriptor '"+this.d$name+"' of '"+this.d$type.prototype.tp$name+"' object needs an argument");this.d$check(h)}}}),Sk.builtin.wrapper_descriptor=e("wrapper_descriptor","slot wrapper",{constructor:function(h,a,S){this.d$def=a,this.d$type=h,this.d$name=S.$name=a.$name,this.d$wrapped=S},slots:{tp$descr_get(h,a){let S;return(S=this.d$check(h))?S:new Sk.builtin.method_wrapper(this,h)},tp$call(h,a){if(1>h.length)throw new Sk.builtin.TypeError("descriptor '"+this.d$name+"' of '"+this.d$type.prototype.tp$name+"' object needs an argument");let S=h.shift();if(!S.ob$type.$isSubType(this.d$type))throw new Sk.builtin.TypeError("descriptor '"+this.d$name+"' requires a '"+this.d$type.prototype.tp$name+"' object but received a '"+Sk.abstr.typeName(S)+"'");return this.raw$call(S,h,a)}},proto:{raw$call(h,a,S){return this.d$wrapped.$name=this.d$name,this.d$def.$wrapper.call(this.d$wrapped,h,a,S)}}}),Sk.builtin.method_wrapper=e("method_wrapper",void 0,{constructor:function(h,a){this.m$descr=h,this.m$self=a,this.d$def=h.d$def,this.d$name=h.d$name,this.d$type=h.d$type},slots:{tp$call(h,a){return this.m$descr.raw$call(this.m$self,h,a)},tp$richcompare(h,a){return a!=="Eq"&&a!=="NotEq"||!(h instanceof Sk.builtin.method_wrapper)?Sk.builtin.NotImplemented.NotImplemented$:(h=this.m$self===h.m$self&&this.m$descr===h.m$descr,a==="Eq"?h:!h)},$r(){return new Sk.builtin.str("")}},getsets:{__self__:{$get(){return this.m$self}}}}),Sk.builtin.classmethod_descriptor=e("classmethod_descriptor","method",{constructor:function(h,a){this.d$def=a,this.$meth=a.$meth,this.d$type=h,this.d$name=a.$name||""},slots:{tp$call(h,a){if(1>h.length)throw new Sk.builtin.TypeError("descriptor '"+this.d$name+"' of '"+this.d$type.prototype.tp$name+"' object needs an argument");let S=h.shift();return this.tp$descr_get(null,S).tp$call(h,a)},tp$descr_get(h,a,S){if(a===void 0)if(h!==null)a=a||h.ob$type;else throw new Sk.builtin.TypeError("descriptor '"+this.d$name+"' for type '"+this.d$type.prototype.tp$name+"' needs an object or a type");if(!a.ob$type.$isSubType(Sk.builtin.type))throw new Sk.builtin.TypeError("descriptor '"+this.d$name+"' for type '"+this.d$type.prototype.tp$name+"' needs a type not a '"+Sk.abstr.typeName(a)+"' as arg 2");if(!a.$isSubType(this.d$type))throw new Sk.builtin.TypeError("descriptor '"+this.d$name+"' requires a '"+this.d$type.prototype.tp$name+"' object but received a '"+Sk.abstr.typeName(a)+"' object");return new Sk.builtin.sk_method(this.d$def,a)}},getsets:p}),[Sk.builtin.method_descriptor,Sk.builtin.getset_descriptor,Sk.builtin.wrapper_descriptor,Sk.builtin.method_wrapper,Sk.builtin.classmethod_descriptor].forEach(h=>{Sk.abstr.setUpSlots(h),Sk.abstr.setUpMethods(h),Sk.abstr.setUpGetSets(h)})},function(p,b){Sk.builtin.sk_method=Sk.abstr.buildNativeClass("builtin_function_or_method",{constructor:function(e,i,n){this.$meth=e.$meth.bind(i),this.$doc=e.$doc,this.$self=i||null,this.$module=n?new Sk.builtin.str(n):null,this.$name=e.$name||e.$meth.name||"",this.m$def=e,this.$textsig=e.$textsig,this.$flags=e=e.$flags||{},e.FastCall&&e.NoKwargs?this.tp$call=this.$fastCallNoKwargs:e.FastCall?this.tp$call=this.$meth:e.NoArgs?this.tp$call=this.$callNoArgs:e.OneArg?this.tp$call=this.$callOneArg:e.NamedArgs?this.tp$call=this.$callNamedArgs:e.MinArgs!==void 0?this.tp$call=this.$callMinArgs:(this.func_code=this.$meth,this.tp$call=this.$defaultCallMethod)},proto:{$fastCallNoKwargs(e,i){return Sk.abstr.checkNoKwargs(this.$name,i),this.$meth(e)},$callNoArgs(e,i){return Sk.abstr.checkNoArgs(this.$name,e,i),this.$meth()},$callOneArg(e,i){return Sk.abstr.checkOneArg(this.$name,e,i),this.$meth(e[0])},$callNamedArgs(e,i){return e=Sk.abstr.copyKeywordsToNamedArgs(this.$name,this.$flags.NamedArgs,e,i,this.$flags.Defaults),this.$meth(...e)},$callMinArgs(e,i){return Sk.abstr.checkNoKwargs(this.$name,i),Sk.abstr.checkArgsLen(this.$name,e,this.$flags.MinArgs,this.$flags.MaxArgs),this.$meth(...e)},$defaultCallMethod(e,i){return this.$self!==null?Sk.builtin.func.prototype.tp$call.call(this,[this.$self,...e],i):Sk.builtin.func.prototype.tp$call.call(this,e,i)},$memoiseFlags(){return Sk.builtin.func.prototype.$memoiseFlags.call(this)},$resolveArgs(){return Sk.builtin.func.prototype.$resolveArgs.call(this)}},flags:{sk$unacceptableBase:!0},slots:{tp$getattr:Sk.generic.getAttr,$r(){return this.$self===null?new Sk.builtin.str(""):new Sk.builtin.str("")},tp$call(e,i){return this.tp$call(e,i)},tp$richcompare(e,i){return i!=="Eq"&&i!=="NotEq"||!(e instanceof Sk.builtin.sk_method)?Sk.builtin.NotImplemented.NotImplemented$:(e=this.$self===e.$self&&this.m$def.$meth===e.m$def.$meth,i==="Eq"?e:!e)}},getsets:{__module__:{$get(){return this.$module||Sk.builtin.none.none$},$set(e){this.$module=e=e||Sk.builtin.none.none$}},__doc__:{$get(){return this.$doc?new Sk.builtin.str(this.$doc):Sk.builtin.none.none$}},__name__:{$get(){return new Sk.builtin.str(this.$name)}},__text_signature__:{$get(){return new Sk.builtin.str(this.$textsig)}},__self__:{$get(){return this.$self||Sk.sysModules.mp$lookup(this.$module)||Sk.builtin.none.none$}}}})},function(p,b){Sk.builtin.none=Sk.abstr.buildNativeClass("NoneType",{constructor:function(){return Sk.builtin.none.none$},slots:{tp$new(e,i){return Sk.abstr.checkNoArgs("NoneType",e,i),Sk.builtin.none.none$},$r(){return new Sk.builtin.str("None")},tp$as_number:!0,nb$bool(){return!1}},proto:{valueOf(){return null}},flags:{sk$unacceptableBase:!0}}),Sk.builtin.none.none$=Object.create(Sk.builtin.none.prototype,{v:{value:null,enumerable:!0}}),Sk.builtin.NotImplemented=Sk.abstr.buildNativeClass("NotImplementedType",{constructor:function(){return Sk.builtin.NotImplemented.NotImplemented$},slots:{$r(){return new Sk.builtin.str("NotImplemented")},tp$new(e,i){return Sk.abstr.checkNoArgs("NotImplementedType",e,i),Sk.builtin.NotImplemented.NotImplemented$}},flags:{sk$unacceptableBase:!0}}),Sk.builtin.NotImplemented.NotImplemented$=Object.create(Sk.builtin.NotImplemented.prototype,{v:{value:null,enumerable:!0}}),p=Sk.abstr.buildNativeClass("ellipsis",{constructor:function(){return Sk.builtin.Ellipsis},slots:{tp$new(e,i){return Sk.abstr.checkNoArgs("ellipsis",e,i),Sk.builtin.Ellipsis},$r(){return new Sk.builtin.str("Ellipsis")}},flags:{sk$unacceptableBase:!0}}),Sk.builtin.Ellipsis=Object.create(p.prototype,{v:{value:"..."}})},function(p,b){let e=/^(?:(.)?([<>=\^]))?([\+\-\s])?(#)?(0)?(\d+)?(,|_)?(?:\.(\d+))?([bcdeEfFgGnosxX%])?$/;Sk.formatting={};let i=function(s,c,o,d){if(Sk.asserts.assert(typeof c=="string"),s[6]){var u=parseInt(s[6],10);d=s[2]||(s[5]?"=":d?">":"<");let f=u-(c.length+(o?o.length:0));if(0>=f)return o+c;switch(u=(s[1]||(s[5]?"0":" ")).repeat(f),d){case"=":if(s[9]==="s")throw new Sk.builtin.ValueError("'=' alignment not allowed in string format specifier");return o+u+c;case">":return u+o+c;case"<":return o+c+u;case"^":return s=Math.floor(f/2),u.substring(0,s)+o+c+u.substring(s)}}return o+c},n=function(s,c){return c?"-":s[3]==="+"?"+":s[3]===" "?" ":""},r=/\B(?=(\d{3})+(?!\d))/g,l=/\B(?=([A-Za-z0-9]{4})+(?![A-Za-z0-9]))/g,h=function(s,c,o){if(Sk.asserts.assert(c instanceof Sk.builtin.int_||c instanceof Sk.builtin.lng),s[8])throw new Sk.builtin.ValueError("Precision not allowed in integer format");var d=c.str$(o,!1);c=c.nb$isnegative(),c=n(s,c),s[4]&&(o===16?c+="0x":o===8?c+="0o":o===2&&(c+="0b"));let u=s[9];if(u==="X"&&(d=d.toUpperCase()),s[9]==="n")d=(+d).toLocaleString();else if(s[7]){d=d.split(".");let f=s[7];if(f===","&&o!==10)throw new Sk.builtin.ValueError(`Cannot specify ',' with '${u}'`);d[0]=d[0].replace(o===10?r:l,f),d=d.join(".")}return i(s,d,c,!0)},a=function(s,c,o){if(!c)return s.str$(10,!0);if(c=c.match(e),!c)throw new Sk.builtin.ValueError("Invalid format specifier");var d=c[9];if(d||(d=o?"g":"d"),(o?"fFeEgG%":"bcdoxXnfFeEgG%").indexOf(d)==-1)throw new Sk.builtin.ValueError("Unknown format code '"+c[9]+"' for object of type '"+Sk.abstr.typeName(s)+"'");switch(d){case"d":case"n":return h(c,s,10);case"x":case"X":return h(c,s,16);case"o":return h(c,s,8);case"b":return h(c,s,2);case"c":if(c[3])throw new Sk.builtin.ValueError("Sign not allowed with integer format specifier 'c'");if(c[4])throw new Sk.builtin.ValueError("Alternate form not allowed with integer format specifier 'c'");if(c[7])throw new Sk.builtin.ValueError("Cannot specify ',' with 'c'");if(c[8])throw new Sk.builtin.ValueError("Cannot specify ',' with 'c'");return i(c,String.fromCodePoint(Sk.builtin.asnum$(s)),"",!0);case"f":case"F":case"e":case"E":case"g":case"G":{if(c[4])throw new Sk.builtin.ValueError("Alternate form (#) not allowed in float format specifier");if(o=Sk.builtin.asnum$(s),typeof o=="string"&&(o=Number(o)),o===1/0)return i(c,"inf","",!0);if(o===-1/0)return i(c,"inf","-",!0);if(isNaN(o))return i(c,"nan","",!0);s=!1,0>o&&(o=-o,s=!0);var u=["toExponential","toFixed","toPrecision"]["efg".indexOf(d.toLowerCase())];let f=c[8]?parseInt(c[8],10):6;if(o=o[u](f),"EFG".indexOf(d)!==-1&&(o=o.toUpperCase()),d.toLowerCase()==="g"||!c[9]){if(u=o.match(/\.(\d*[1-9])?(0+)$/)){let[,$,m]=u;o=o.slice(0,$?-m.length:-(m.length+1))}o.indexOf(".")!=-1||c[9]||(o+=".0")}return d.toLowerCase()==="e"&&(o=o.replace(/^([-+]?[0-9]*\.?[0-9]+[eE][-+]?)([0-9])?$/,"$10$2")),c[7]&&(d=o.toString().split("."),d[0]=d[0].replace(/\B(?=(\d{3})+(?!\d))/g,","),o=d.join(".")),i(c,o,n(c,s),!0)}case"%":if(c[4])throw new Sk.builtin.ValueError("Alternate form (#) not allowed with format specifier '%'");return s=Sk.builtin.asnum$(s),typeof s=="string"&&(s=Number(s)),s===1/0?i(c,"inf%","",!0):s===-1/0?i(c,"inf%","-",!0):isNaN(s)?i(c,"nan%","",!0):(d=!1,0>s&&(s=-s,d=!0),o=c[8]?parseInt(c[8],10):6,s=(100*s).toFixed(o)+"%",i(c,s,n(c,d),!0));default:throw new Sk.builtin.ValueError("Unknown format code '"+c[9]+"'")}};Sk.formatting.mkNumber__format__=s=>function(c){if(!Sk.builtin.checkString(c))throw new Sk.builtin.TypeError("format() argument 2 must be str, not "+Sk.abstr.typeName(c));return new Sk.builtin.str(a(this,c.$jsstr(),s))};let S=/^\d+$/,t=/{(((?:\d+)|(?:\w+))?((?:\.(\w+))|(?:\[((?:\d+)|(?:\w+))\])?))?(?:!(.))?(?::([^}]*))?}/g;Sk.formatting.format=function(s,c){c=c||[];let o={};for(let m=0;m{if(d===void 0)d=m;else if(d!==m)throw new Sk.builtin.ValueError(`cannot switch from ${d} to ${m}`)},f=m=>{let _;if(typeof m=="number")u("manual field specification"),_=s[m];else if(S.test(m))u("automatic field numbering"),_=s[m];else if(_=o[m],_===void 0)throw new Sk.builtin.KeyError(m);if(_===void 0)throw new Sk.builtin.IndexError(`Replacement index ${m} out of range for positional args tuple`);return _},$=0;return c=this.v.replace(t,function(m,_,v,A,N,M,R,H,ee,J){let g;if(M!==void 0&&M!==""?(N=f(v),g=N.constructor===Array?N[M]:S.test(M)?Sk.abstr.objectGetItem(N,new Sk.builtin.int_(parseInt(M,10)),!1):Sk.abstr.objectGetItem(N,new Sk.builtin.str(M),!1),$++):N!==void 0&&N!==""?(M=f(v||$++),g=Sk.abstr.gattr(M,new Sk.builtin.str(N))):v!==void 0&&v!==""?g=f(v):_===void 0||_===""?(g=f($),$++):S.test(_)&&(g=f(_),$++),R==="s")g=new Sk.builtin.str(g);else if(R==="r")g=Sk.builtin.repr(g);else if(R==="a")g=Sk.builtin.ascii(g);else if(R!==""&&R!==void 0)throw new Sk.builtin.ValueError("Unknown conversion specifier "+R);return Sk.abstr.objectFormat(g,new Sk.builtin.str(H)).$jsstr()}),new Sk.builtin.str(c)},Sk.formatting.formatString=function(s){if(!Sk.builtin.checkString(s))throw new Sk.builtin.TypeError("format() argument 2 must be str, not "+Sk.abstr.typeName(s));if(s=s.$jsstr().match(e),s[9]&&s[9]!=="s")throw new Sk.builtin.ValueError("Unknown format code '"+s[9]+"' for object of type 'str'");if(s[3])throw new Sk.builtin.ValueError("Sign not allowed in string format specifier");if(s[4])throw new Sk.builtin.ValueError("Alternate form (#) not allowed with string format specifier");if(s[7])throw new Sk.builtin.ValueError("Cannot specify ',' with 's'");let c=this.v;return s[8]&&(c=c.substring(0,s[8])),new Sk.builtin.str(i(s,c,"",!1))}},function(p,b){function e(m){let _,v=[];for(let A=0;Av?1/0:v;(ee=N.exec(m))!=null&&HA)return new Sk.builtin.tuple([new Sk.builtin.str(""),new Sk.builtin.str(""),new Sk.builtin.str(v)])}else if(A=v.indexOf(_),0>A)return new Sk.builtin.tuple([new Sk.builtin.str(v),new Sk.builtin.str(""),new Sk.builtin.str("")]);return new Sk.builtin.tuple([new Sk.builtin.str(v.substring(0,A)),new Sk.builtin.str(_),new Sk.builtin.str(v.substring(A+_.length))])}}function l(m,_){return function(v,A){if(v=Sk.misceval.asIndexSized(v,Sk.builtin.OverflowError),A===void 0)A=" ";else if(A instanceof Sk.builtin.str&&A.sq$length()===1)A=A.v;else throw new Sk.builtin.TypeError("the fill character must be a str of length 1");var N=this.sq$length();return N>=v?new Sk.builtin.str(this.v):_?(N=v-N,v=Math.floor(N/2)+(N&v&1),A=A.repeat(v)+this.v+A.repeat(N-v),new Sk.builtin.str(A)):(A=A.repeat(v-N),new Sk.builtin.str(m?A+this.v:this.v+A))}}function h(m,_,v){if({start:_,end:v}=Sk.builtin.slice.startEnd$wrt(m,_,v),m.$hasAstralCodePoints()){let A=m.codepoints[_];_=A===void 0?_+m.v.length-m.codepoints.length:A,v=m.codepoints[v],v=v===void 0?m.v.length:v}return{start:_,end:v}}function a(m){return function(_,v,A){if(_=this.get$tgt(_),{start:v,end:A}=h(this,v,A),A=v&&_<=A?_:-1,this.codepoints){A=this.sq$length(),v=-1;for(let N=0;NN)return Sk.builtin.bool.false$;if(A=this.v.slice(A,N),v instanceof Sk.builtin.tuple){for(let M=Sk.abstr.iter(v),R=M.tp$iternext();R!==void 0;R=M.tp$iternext()){if(!(R instanceof Sk.builtin.str))throw new Sk.builtin.TypeError("tuple for "+m+" must only contain str, not "+Sk.abstr.typeName(R));if(_(A,R.v))return Sk.builtin.bool.true$}return Sk.builtin.bool.false$}return new Sk.builtin.bool(_(A,v.v))}}function t(m){return $[m]===void 0?m:m+"_$rw$"}var s=/^[0-9!#_]/,c=Object.create(null);Sk.builtin.str=Sk.abstr.buildNativeClass("str",{constructor:function(m){if(Sk.asserts.assert(this instanceof Sk.builtin.str,"bad call to str - use 'new'"),typeof m!="string")if(m===void 0)m="";else if(m===null)m="None";else{if(m.tp$str!==void 0)return m.tp$str();if(typeof m=="number")m=Number.isFinite(m)?String(m):String(m).replace("Infinity","inf").replace("NaN","nan");else throw new Sk.builtin.TypeError("could not convert object of type '"+Sk.abstr.typeName(m)+"' to str")}let _=c[m];if(_!==void 0)return _;c[m]=this,this.$mangled=t(m),this.$savedKeyHash=m.replace(s,"!$&"),this.v=m},slots:{tp$getattr:Sk.generic.getAttr,tp$as_sequence_or_mapping:!0,tp$doc:`str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str Create a new string object from the given object. If encoding or @@ -11,7 +11,7 @@ Otherwise, returns the result of object.__str__() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.`,tp$new(m,_){if(_=_||[],this!==Sk.builtin.str.prototype)return this.$subtype_new(m,_);if(1>=m.length&&!_.length)return new Sk.builtin.str(m[0]);if(Sk.__future__.python3){let[v,A,N]=Sk.abstr.copyKeywordsToNamedArgs("str",["object","encoding","errors"],m,_);if(v===void 0||A===void 0&&N===void 0)return new Sk.builtin.str(v);if(Sk.builtin.bytes.check$encodeArgs("str",A,N),!Sk.builtin.checkBytes(v))throw new Sk.builtin.TypeError("decoding to str: need a bytes-like object, "+Sk.abstr.typeName(v)+" found");return Sk.builtin.bytes.$decode.call(v,A,N)}throw new Sk.builtin.TypeError("str takes at most one argument ("+(m.length+_.length)+" given)")},$r(){let m="'";this.v.indexOf("'")!==-1&&this.v.indexOf('"')===-1&&(m='"');let _=this.v.length,v=m;for(let M=0;M<_;M++){var A=this.v.charAt(M),N=this.v.charCodeAt(M);A===m||A==="\\"?v+="\\"+A:A===" "?v+="\\t":A===` -`?v+="\\n":A==="\r"?v+="\\r":(255N||57344<=N)&&!Sk.__future__.python3?v+="\\u"+("000"+N.toString(16)).slice(-4):55296<=N&&!Sk.__future__.python3?(A=this.v.codePointAt(M),M++,A=A.toString(16),N="0000000"+A.toString(16),v=4A||127<=N&&!Sk.__future__.python3?(A=A.charCodeAt(0).toString(16),2>A.length&&(A="0"+A),v+="\\x"+A):v+=A}return new Sk.builtin.str(v+m)},tp$str(){return this.constructor===Sk.builtin.str?this:new Sk.builtin.str(this.v)},tp$iter(){return new f(this)},tp$richcompare(m,_){if(!(m instanceof Sk.builtin.str))return Sk.builtin.NotImplemented.NotImplemented$;switch(_){case"Lt":return this.vm.v;case"GtE":return this.v>=m.v}},mp$subscript(m){let _;if(Sk.misceval.isIndex(m)){if(m=Sk.misceval.asIndexSized(m,Sk.builtin.OverflowError),_=this.sq$length(),0>m&&(m+=_),0>m||m>=_)throw new Sk.builtin.IndexError("string index out of range");return this.codepoints?new Sk.builtin.str(this.v.substring(this.codepoints[m],this.codepoints[m+1])):new Sk.builtin.str(this.v.charAt(m))}if(m instanceof Sk.builtin.slice){let v="";return _=this.sq$length(),this.codepoints?m.sssiter$(_,A=>{v+=this.v.substring(this.codepoints[A],this.codepoints[A+1])}):m.sssiter$(_,A=>{v+=this.v.charAt(A)}),new Sk.builtin.str(v)}throw new Sk.builtin.TypeError("string indices must be integers, not "+Sk.abstr.typeName(m))},sq$length(){return this.$hasAstralCodePoints()?this.codepoints.length:this.v.length},sq$concat(m){if(!(m instanceof Sk.builtin.str))throw new Sk.builtin.TypeError("cannot concatenate 'str' and '"+Sk.abstr.typeName(m)+"' objects");return new Sk.builtin.str(this.v+m.v)},sq$repeat(m){if(!Sk.misceval.isIndex(m))throw new Sk.builtin.TypeError("can't multiply sequence by non-int of type '"+Sk.abstr.typeName(m)+"'");if(m=Sk.misceval.asIndexSized(m,Sk.builtin.OverflowError),m*this.v.length>Number.MAX_SAFE_INTEGER)throw new Sk.builtin.OverflowError;let _="";for(let v=0;v' requires string as left operand not "+Sk.abstr.typeName(m));return this.v.indexOf(m.v)!==-1},tp$as_number:!0,nb$remainder:function(m){var _;let v=this.sk$builtinBase;m.constructor===Sk.builtin.tuple||m instanceof Sk.builtin.dict||m instanceof Sk.builtin.mappingproxy||(m=new Sk.builtin.tuple([m]));var A=0,N=this.$jsstr().replace(/%(\([a-zA-Z0-9]+\))?([#0 +\-]+)?(\*|[0-9]+)?(\.(\*|[0-9]+))?[hlL]?([diouxXeEfFgGcrsb%])/g,function(M,R,H,ee,Y,k,x){var C,F,P,L,U;ee=Sk.builtin.asnum$(ee),Y=Sk.builtin.asnum$(Y),R!==void 0&&R!==""||x=="%"||(C=A++),Y===""&&(Y=void 0);var K=F=P=L=U=!1;if(H&&(H.indexOf("-")!==-1?L=!0:H.indexOf("0")!==-1&&(U=!0),H.indexOf("+")!==-1?F=!0:H.indexOf(" ")!==-1&&(P=!0),K=H.indexOf("#")!==-1),Y&&(Y=parseInt(Y.substr(1),10)),H=function(Z,oe){var ie;oe=Sk.builtin.asnum$(oe);var ce=!1;if(typeof Z=="number"){0>Z&&(Z=-Z,ce=!0);var J=Z.toString(oe)}else Z instanceof Sk.builtin.float_?(J=Z.str$(oe,!1),2_){for(this.codepoints=[],m=0;m_&&m++;return!0}}return this.codepoints=null,!1},sk$asarray(){let m=[];if(this.$hasAstralCodePoints()){var _=this.codepoints;for(let v=0;v<_.length;v++)m.push(new Sk.builtin.str(this.v.substring(_[v],_[v+1])))}else for(_=0;_N||57344<=N)&&!Sk.__future__.python3?v+="\\u"+("000"+N.toString(16)).slice(-4):55296<=N&&!Sk.__future__.python3?(A=this.v.codePointAt(M),M++,A=A.toString(16),N="0000000"+A.toString(16),v=4A||127<=N&&!Sk.__future__.python3?(A=A.charCodeAt(0).toString(16),2>A.length&&(A="0"+A),v+="\\x"+A):v+=A}return new Sk.builtin.str(v+m)},tp$str(){return this.constructor===Sk.builtin.str?this:new Sk.builtin.str(this.v)},tp$iter(){return new f(this)},tp$richcompare(m,_){if(!(m instanceof Sk.builtin.str))return Sk.builtin.NotImplemented.NotImplemented$;switch(_){case"Lt":return this.vm.v;case"GtE":return this.v>=m.v}},mp$subscript(m){let _;if(Sk.misceval.isIndex(m)){if(m=Sk.misceval.asIndexSized(m,Sk.builtin.OverflowError),_=this.sq$length(),0>m&&(m+=_),0>m||m>=_)throw new Sk.builtin.IndexError("string index out of range");return this.codepoints?new Sk.builtin.str(this.v.substring(this.codepoints[m],this.codepoints[m+1])):new Sk.builtin.str(this.v.charAt(m))}if(m instanceof Sk.builtin.slice){let v="";return _=this.sq$length(),this.codepoints?m.sssiter$(_,A=>{v+=this.v.substring(this.codepoints[A],this.codepoints[A+1])}):m.sssiter$(_,A=>{v+=this.v.charAt(A)}),new Sk.builtin.str(v)}throw new Sk.builtin.TypeError("string indices must be integers, not "+Sk.abstr.typeName(m))},sq$length(){return this.$hasAstralCodePoints()?this.codepoints.length:this.v.length},sq$concat(m){if(!(m instanceof Sk.builtin.str))throw new Sk.builtin.TypeError("cannot concatenate 'str' and '"+Sk.abstr.typeName(m)+"' objects");return new Sk.builtin.str(this.v+m.v)},sq$repeat(m){if(!Sk.misceval.isIndex(m))throw new Sk.builtin.TypeError("can't multiply sequence by non-int of type '"+Sk.abstr.typeName(m)+"'");if(m=Sk.misceval.asIndexSized(m,Sk.builtin.OverflowError),m*this.v.length>Number.MAX_SAFE_INTEGER)throw new Sk.builtin.OverflowError;let _="";for(let v=0;v' requires string as left operand not "+Sk.abstr.typeName(m));return this.v.indexOf(m.v)!==-1},tp$as_number:!0,nb$remainder:function(m){var _;let v=this.sk$builtinBase;m.constructor===Sk.builtin.tuple||m instanceof Sk.builtin.dict||m instanceof Sk.builtin.mappingproxy||(m=new Sk.builtin.tuple([m]));var A=0,N=this.$jsstr().replace(/%(\([a-zA-Z0-9]+\))?([#0 +\-]+)?(\*|[0-9]+)?(\.(\*|[0-9]+))?[hlL]?([diouxXeEfFgGcrsb%])/g,function(M,R,H,ee,J,g,x){var C,F,P,D,U;ee=Sk.builtin.asnum$(ee),J=Sk.builtin.asnum$(J),R!==void 0&&R!==""||x=="%"||(C=A++),J===""&&(J=void 0);var K=F=P=D=U=!1;if(H&&(H.indexOf("-")!==-1?D=!0:H.indexOf("0")!==-1&&(U=!0),H.indexOf("+")!==-1?F=!0:H.indexOf(" ")!==-1&&(P=!0),K=H.indexOf("#")!==-1),J&&(J=parseInt(J.substr(1),10)),H=function(Q,oe){var ie;oe=Sk.builtin.asnum$(oe);var ce=!1;if(typeof Q=="number"){0>Q&&(Q=-Q,ce=!0);var Y=Q.toString(oe)}else Q instanceof Sk.builtin.float_?(Y=Q.str$(oe,!1),2_){for(this.codepoints=[],m=0;m_&&m++;return!0}}return this.codepoints=null,!1},sk$asarray(){let m=[];if(this.$hasAstralCodePoints()){var _=this.codepoints;for(let v=0;v<_.length;v++)m.push(new Sk.builtin.str(this.v.substring(_[v],_[v+1])))}else for(_=0;_ str Return a formatted version of S, using substitutions from args and kwargs. -The substitutions are identified by braces ('{' and '}').`},__format__:{$meth:Sk.formatting.formatString,$flags:{OneArg:!0},$textsig:"($self, format_spec, /)",$doc:"Return a formatted version of the string as described by format_spec."},__getnewargs__:{$meth(){return new Sk.builtin.tuple(new Sk.builtin.str(this.v))},$flags:{NoArgs:!0},$textsig:null,$doc:null}}}),Sk.exportSymbol("Sk.builtin.str",Sk.builtin.str);var o=/^[A-Za-z0-9]+$/,d=/([.*+?=|\\\/()\[\]\{\}^$])/g,u=/^[\s\xa0]+/;Sk.builtin.str.$py2decode=new Sk.builtin.method_descriptor(Sk.builtin.str,{$name:"decode",$meth(m,_){let v=new Sk.builtin.bytes(this.v);return Sk.builtin.bytes.$decode.call(v,m,_)},$flags:{NamedArgs:["encoding","errors"]}});var f=Sk.abstr.buildIteratorClass("str_iterator",{constructor:function(m){this.$index=0,m.$hasAstralCodePoints()?(this.$seq=m.codepoints,this.tp$iternext=()=>{let _=this.$seq[this.$index];if(_!==void 0)return new Sk.builtin.str(m.v.substring(_,this.$seq[++this.$index]))}):(this.$seq=m.v,this.tp$iternext=()=>{let _=this.$seq[this.$index++];if(_!==void 0)return new Sk.builtin.str(_)})},iternext(){return this.tp$iternext()},methods:{__length_hint__:Sk.generic.iterLengthHintWithArrayMethodDef},flags:{sk$unacceptableBase:!0}}),$={abstract:!0,as:!0,boolean:!0,break:!0,byte:!0,case:!0,catch:!0,char:!0,class:!0,continue:!0,const:!0,debugger:!0,default:!0,delete:!0,do:!0,double:!0,else:!0,enum:!0,export:!0,extends:!0,false:!0,final:!0,finally:!0,float:!0,for:!0,function:!0,goto:!0,if:!0,implements:!0,import:!0,in:!0,instanceof:!0,int:!0,interface:!0,is:!0,long:!0,namespace:!0,native:!0,new:!0,null:!0,package:!0,private:!0,protected:!0,public:!0,return:!0,short:!0,static:!0,super:!0,switch:!0,synchronized:!0,this:!0,throw:!0,throws:!0,transient:!0,true:!0,try:!0,typeof:!0,use:!0,var:!0,void:!0,volatile:!0,while:!0,with:!0,constructor:!0,__defineGetter__:!0,__defineSetter__:!0,apply:!0,arguments:!0,call:!0,caller:!0,eval:!0,hasOwnProperty:!0,isPrototypeOf:!0,__lookupGetter__:!0,__lookupSetter__:!0,__noSuchMethod__:!0,propertyIsEnumerable:!0,prototype:!0,toSource:!0,toLocaleString:!0,toString:!0,unwatch:!0,valueOf:!0,watch:!0,length:!0,name:!0};Sk.builtin.str.reservedWords_=$,Sk.builtin.str.$fixReserved=t},function(p,g){Sk.builtin.func=Sk.abstr.buildNativeClass("function",{constructor:function(e,i,n,r){if(Sk.asserts.assert(this instanceof Sk.builtin.func,"builtin func should be called as a class with `new`"),this.func_code=e,this.func_globals=i||null,this.$name=e.co_name&&e.co_name.v||e.name||"",this.$d=Sk.builtin.dict?new Sk.builtin.dict:void 0,this.$doc=e.co_docstring||Sk.builtin.none.none$,this.$module=Sk.globals&&Sk.globals.__name__||Sk.builtin.none.none$,this.$qualname=e.co_qualname&&e.co_qualname.v||this.$name,r!==void 0)for(let l in r)n[l]=r[l];this.func_closure=n,this.func_annotations=null,this.$memoiseFlags(),this.memoised=e.co_fastcall||null,this.tp$call=e.co_fastcall?e.bind(this):Sk.builtin.func.prototype.$funcCall.bind(this)},slots:{tp$getattr:Sk.generic.getAttr,tp$descr_get(e,i){return e===null?this:new Sk.builtin.method(this,e)},$r(){return new Sk.builtin.str("")},tp$call(e,i){return this.tp$call(e,i)}},getsets:{__name__:{$get(){return new Sk.builtin.str(this.$name)},$set(e){if(!Sk.builtin.checkString(e))throw new Sk.builtin.TypeError("__name__ must be set to a string object");this.$name=e.$jsstr()}},__qualname__:{$get(){return new Sk.builtin.str(this.$qualname)},$set(e){if(!Sk.builtin.checkString(e))throw new Sk.builtin.TypeError("__qualname__ must be set to a string object");this.$qualname=e.$jsstr()}},__dict__:Sk.generic.getSetDict,__annotations__:{$get(){return this.func_annotations===null?this.func_annotations=new Sk.builtin.dict([]):Array.isArray(this.func_annotations)&&(this.func_annotations=Sk.abstr.keywordArrayToPyDict(this.func_annotations)),this.func_annotations},$set(e){if(e===void 0||Sk.builtin.checkNone(e))this.func_annotations=new Sk.builtin.dict([]);else if(e instanceof Sk.builtin.dict)this.func_annotations=e;else throw new Sk.builtin.TypeError("__annotations__ must be set to a dict object")}},__defaults__:{$get(){return this.$defaults==null?Sk.builtin.none.none$:new Sk.builtin.tuple(this.$defaults)},$set(e){if(e===void 0||Sk.builtin.checkNone(e))this.$defaults=null;else if(e instanceof Sk.builtin.tuple)this.$defaults=e.valueOf();else throw new Sk.builtin.TypeError("__defaults__ must be set to a tuple object")}},__doc__:{$get(){return this.$doc},$set(e){this.$doc=e||Sk.builtin.none.none$}},__module__:{$get(){return this.$module},$set(e){this.$module=e||Sk.builtin.none.none$}}},proto:{$memoiseFlags(){this.co_varnames=this.func_code.co_varnames,this.co_argcount=this.func_code.co_argcount,this.co_argcount===void 0&&this.co_varnames&&(this.co_argcount=this.co_varnames.length),this.co_kwonlyargcount=this.func_code.co_kwonlyargcount||0,this.co_varargs=this.func_code.co_varargs,this.co_kwargs=this.func_code.co_kwargs,this.$defaults=this.func_code.$defaults,this.$kwdefs=this.func_code.$kwdefs||[]},$resolveArgs:function(e,i){var n=this.co_argcount;n===void 0&&(n=this.co_varnames?this.co_varnames.length:e.length);var r=this.co_varnames||[],l=this.co_kwonlyargcount||0;let h=n+l;if(!(l!==0||this.co_kwargs||i&&i.length!==0||this.co_varargs)){if(e.length==n)return e;if(e.length===0&&this.$defaults&&this.$defaults.length===n){for(r=0;r!=this.$defaults.length;r++)e[r]=this.$defaults[r];return e}}let a;this.co_kwargs&&(a=[]);var S=e.length;let t=e.length<=n?e:e.slice(0,n);if(this.co_varargs)e=e.length>t.length?e.slice(t.length):[],t[h]=new Sk.builtin.tuple(e);else if(S>n)throw new Sk.builtin.TypeError(`${this.$name}"() takes ${n} positional ${n==1?"argument":"arguments"} but ${S} ${S==1?"was":"were"} given`);if(i){if(this.func_code.no_kw)throw new Sk.builtin.TypeError(this.$name+"() takes no keyword arguments");for(e=0;e"'"+o+"'").join(", ")));for(;er.indexOf(".")&&0>r.indexOf("e")&&0>r.indexOf("E"))return r;var l=0;if(0<=r.indexOf("e")){var h=r.substr(0,r.indexOf("e"));l=r.substr(r.indexOf("e")+1)}else 0<=r.indexOf("E")?(h=r.substr(0,r.indexOf("e")),l=r.substr(r.indexOf("E")+1)):h=r;if(l=parseInt(l,10),r=h.indexOf("."),0>r){if(0<=l){for(;0-l?h.substr(0,h.length+l):0}for(h=r===0?h.substr(1):rh.length;)h+="0";return h=0>=r?0:h.substr(0,r)},Sk.exportSymbol("Sk.builtin.asnum$nofloat",Sk.builtin.asnum$nofloat),Sk.builtin.round=function(r,l){if(r===void 0)throw new Sk.builtin.TypeError("a float is required");if(!Sk.__future__.dunder_round){if(!Sk.builtin.checkNumber(r))throw new Sk.builtin.TypeError("a float is required");if(r.round$)return r.round$(l);throw new Sk.builtin.AttributeError(Sk.abstr.typeName(r)+" instance has no attribute '__float__'")}if(l!==void 0&&!Sk.builtin.checkNone(l)&&!Sk.misceval.isIndex(l))throw new Sk.builtin.TypeError("'"+Sk.abstr.typeName(l)+"' object cannot be interpreted as an index");if(r=Sk.abstr.lookupSpecial(r,Sk.builtin.str.$round),r!==void 0)return l!==void 0?Sk.misceval.callsimArray(r,[l]):Sk.misceval.callsimArray(r,[]);throw new Sk.builtin.TypeError("a float is required")},Sk.builtin.len=function(r){if(r.sq$length)r=r.sq$length(!0);else throw new Sk.builtin.TypeError("object of type '"+Sk.abstr.typeName(r)+"' has no len()");return Sk.misceval.chain(r,l=>new Sk.builtin.int_(l))},Sk.builtin.min=function(r,l){let h,a=r.length;if(!a)throw new Sk.builtin.TypeError("min expected 1 argument, got 0");let[S,t]=Sk.abstr.copyKeywordsToNamedArgs("min",["default","key"],[],l,[null,Sk.builtin.none.none$]);if(1{if(s=c,s!==void 0)return Sk.builtin.checkNone(t)?Sk.misceval.iterFor(h,o=>{Sk.misceval.richCompareBool(o,s,"Lt")&&(s=o)}):Sk.misceval.chain(Sk.misceval.callsimOrSuspendArray(t,[s]),o=>Sk.misceval.iterFor(h,d=>Sk.misceval.chain(Sk.misceval.callsimOrSuspendArray(t,[d]),u=>{Sk.misceval.richCompareBool(u,o,"Lt")&&(s=d,o=u)})))},()=>{if(s===void 0){if(S===null)throw new Sk.builtin.ValueError("min() arg is an empty sequence");s=S}return s})},Sk.builtin.max=function(r,l){let h,a=r.length;if(!a)throw new Sk.builtin.TypeError("max expected 1 argument, got 0");let[S,t]=Sk.abstr.copyKeywordsToNamedArgs("max",["default","key"],[],l,[null,Sk.builtin.none.none$]);if(1{if(s=c,s!==void 0)return Sk.builtin.checkNone(t)?Sk.misceval.iterFor(h,o=>{Sk.misceval.richCompareBool(o,s,"Gt")&&(s=o)}):Sk.misceval.chain(Sk.misceval.callsimOrSuspendArray(t,[s]),o=>Sk.misceval.iterFor(h,d=>Sk.misceval.chain(Sk.misceval.callsimOrSuspendArray(t,[d]),u=>{Sk.misceval.richCompareBool(u,o,"Gt")&&(s=d,o=u)})))},()=>{if(s===void 0){if(S===null)throw new Sk.builtin.ValueError("max() arg is an empty sequence");s=S}return s})},Sk.builtin.min.co_fastcall=Sk.builtin.max.co_fastcall=1,Sk.builtin.any=function(r){return Sk.misceval.chain(Sk.misceval.iterFor(Sk.abstr.iter(r),function(l){if(Sk.misceval.isTrue(l))return new Sk.misceval.Break(Sk.builtin.bool.true$)}),l=>l||Sk.builtin.bool.false$)},Sk.builtin.all=function(r){return Sk.misceval.chain(Sk.misceval.iterFor(Sk.abstr.iter(r),function(l){if(!Sk.misceval.isTrue(l))return new Sk.misceval.Break(Sk.builtin.bool.false$)}),l=>l||Sk.builtin.bool.true$)},Sk.builtin.sum=function(r,l){function h(){return Sk.misceval.iterFor(t,c=>{if(c.constructor===Sk.builtin.int_)s=s.nb$add(c);else return c.constructor===Sk.builtin.float_?(s=s.nb$float().nb$add(c),new Sk.misceval.Break("float")):(s=Sk.abstr.numberBinOp(s,c,"Add"),new Sk.misceval.Break("slow"))})}function a(){return Sk.misceval.iterFor(t,c=>{if(c.constructor===Sk.builtin.float_||c.constructor===Sk.builtin.int_)s=s.nb$add(c);else return s=Sk.abstr.numberBinOp(s,c,"Add"),new Sk.misceval.Break("slow")})}function S(){return Sk.misceval.iterFor(t,c=>{s=Sk.abstr.numberBinOp(s,c,"Add")})}let t=Sk.abstr.iter(r);if(l===void 0)var s=new Sk.builtin.int_(0);else{if(Sk.builtin.checkString(l))throw new Sk.builtin.TypeError("sum() can't sum strings [use ''.join(seq) instead]");s=l}return r=l===void 0||l.constructor===Sk.builtin.int_?h():l.constructor===Sk.builtin.float_?"float":"slow",Sk.misceval.chain(r,c=>c==="float"?a():c,c=>{if(c==="slow")return S()},()=>s)},Sk.builtin.zip=function(){var r,l;if(arguments.length===0)return new Sk.builtin.list([]);var h=[];for(l=0;lr||1114112<=r)throw new Sk.builtin.ValueError("chr() arg not in range(0x110000)")}else if(0>r||256<=r)throw new Sk.builtin.ValueError("chr() arg not in range(256)");return new Sk.builtin.str(String.fromCodePoint(r))},Sk.builtin.unichr=function(r){if(Sk.builtin.pyCheckArgsLen("unichr",arguments.length,1,1),!Sk.builtin.checkInt(r))throw new Sk.builtin.TypeError("an integer is required");r=Sk.builtin.asnum$(r);try{return new Sk.builtin.str(String.fromCodePoint(r))}catch(l){throw l instanceof RangeError?new Sk.builtin.ValueError(l.message):l}},Sk.builtin.int2str_=function(r,l,h){let a=Sk.misceval.asIndexOrThrow(r),S=a.toString(l);return S=0>a?"-"+h+S.slice(1):h+S,l!==2&&!Sk.__future__.python3&&(r instanceof Sk.builtin.lng||JSBI.__isBigInt(a))&&(S+="L"),new Sk.builtin.str(S)},Sk.builtin.hex=function(r){if(!Sk.misceval.isIndex(r))throw new Sk.builtin.TypeError("hex() argument can't be converted to hex");return Sk.builtin.int2str_(r,16,"0x")},Sk.builtin.oct=function(r){if(!Sk.misceval.isIndex(r))throw new Sk.builtin.TypeError("oct() argument can't be converted to hex");return Sk.__future__.octal_number_literal?Sk.builtin.int2str_(r,8,"0o"):Sk.builtin.int2str_(r,8,"0")},Sk.builtin.bin=function(r){if(!Sk.misceval.isIndex(r))throw new Sk.builtin.TypeError("'"+Sk.abstr.typeName(r)+"' object can't be interpreted as an index");return Sk.builtin.int2str_(r,2,"0b")},Sk.builtin.dir=function(r){if(r!==void 0)return r=Sk.abstr.lookupSpecial(r,Sk.builtin.str.$dir),Sk.misceval.chain(Sk.misceval.callsimOrSuspendArray(r,[]),l=>Sk.builtin.sorted(l));throw new Sk.builtin.NotImplementedError("skulpt does not yet support dir with no args")},Sk.builtin.repr=function(r){return r.$r()},Sk.builtin.ascii=function(r){return Sk.misceval.chain(r.$r(),l=>{let h,a;for(a=0;a=t?(S=t.toString(16),2>S.length&&(S="0"+S),h+="\\x"+S):127t||57344<=t?h+="\\u"+("000"+t.toString(16)).slice(-4):55296<=t?(S=l.v.codePointAt(a),a++,S=S.toString(16),t="0000000"+S.toString(16),h=4r.tp$getattr(l,!0),S=>{if(!(S instanceof Sk.builtin.AttributeError))throw S});return Sk.misceval.chain(a,S=>{if(S===void 0){if(h!==void 0)return h;throw new Sk.builtin.AttributeError(r.sk$attrError()+" has no attribute "+Sk.misceval.objectRepr(l))}return S})},Sk.builtin.setattr=function(r,l,h){if(!Sk.builtin.checkString(l))throw new Sk.builtin.TypeError("attribute name must be string");return Sk.misceval.chain(r.tp$setattr(l,h,!0),()=>Sk.builtin.none.none$)},Sk.builtin.raw_input=function(r){var l=r||"";return Sk.misceval.chain(Sk.importModule("sys",!1,!0),function(h){return Sk.inputfunTakesPrompt?Sk.builtin.file.$readline(h.$d.stdin,null,l):Sk.misceval.chain(void 0,function(){return Sk.misceval.callsimOrSuspendArray(h.$d.stdout.write,[h.$d.stdout,new Sk.builtin.str(l)])},function(){return Sk.misceval.callsimOrSuspendArray(h.$d.stdin.readline,[h.$d.stdin])})})},Sk.builtin.input=Sk.builtin.raw_input,Sk.builtin.jseval=function(r){return r=Sk.global.eval(Sk.ffi.remapToJs(r)),Sk.ffi.remapToPy(r)},Sk.builtin.jsmillis=function(){return console.warn("jsmillis is deprecated"),new Date().valueOf()};let e=Sk.abstr.buildNativeClass("code",{constructor:function(r,l){this.compiled=l,this.code=l.code,this.filename=r},slots:{tp$new(r,l){throw new Sk.builtin.NotImplementedError("cannot construct a code object in skulpt")},$r(){return new Sk.builtin.str(", file "+this.filename+">")}}});Sk.builtin.compile=function(r,l,h,a,S,t){return Sk.builtin.pyCheckType("source","str",Sk.builtin.checkString(r)),Sk.builtin.pyCheckType("filename","str",Sk.builtin.checkString(l)),Sk.builtin.pyCheckType("mode","str",Sk.builtin.checkString(h)),r=r.$jsstr(),l=l.$jsstr(),h=h.$jsstr(),Sk.misceval.chain(Sk.compile(r,l,h,!0),s=>new e(l,s))},Sk.builtin.exec=function(r,l,h){let a=l&&l.__file__;if(a=a!==void 0&&Sk.builtin.checkString(a)?a.toString():"",Sk.builtin.checkString(r))r=Sk.compile(r.$jsstr(),a,"exec",!0);else if(typeof r=="string")r=Sk.compile(r,a,"exec",!0);else if(!(r instanceof e))throw new Sk.builtin.TypeError("exec() arg 1 must be a string, bytes or code object");Sk.asserts.assert(l===void 0||l.constructor===Object,"internal calls to exec should be called with a javascript object for globals"),Sk.asserts.assert(h===void 0||h.constructor===Object,"internal calls to exec should be called with a javascript object for locals");let S=Sk.globals;return l=l||S,Sk.misceval.chain(r,t=>Sk.global.eval(t.code)(l,h),t=>(Sk.globals=S,t))},Sk.builtin.eval=function(r,l,h){if(Sk.builtin.checkString(r))r=r.$jsstr();else if(Sk.builtin.checkBytes(r))throw new Sk.builtin.NotImplementedError("bytes for eval is not yet implemented in skulpt");if(typeof r=="string"){r=r.trim();var a=Sk.parse("?",r);if(a=Sk.astFromParse(a.cst,"?",a.flags),1{let t=S.__final_res__||Sk.builtin.none.none$;return delete S.__final_res__,t})},Sk.builtin.map=function(r,l){var h=[],a,S;if(Sk.builtin.pyCheckArgsLen("map",arguments.length,2),2(S=new Sk.builtin.list(S),S.list$sort(l,h,a),S))},Sk.builtin.filter=function(r,l){var h;if(Sk.builtin.pyCheckArgsLen("filter",arguments.length,2,2),!Sk.builtin.checkIterable(l))throw new Sk.builtin.TypeError("'"+Sk.abstr.typeName(l)+"' object is not iterable");var a=function(){return[]},S=function(o,d){return o.push(d),o},t=function(o){return new Sk.builtin.list(o)};l.ob$type===Sk.builtin.str?(a=function(){return new Sk.builtin.str("")},S=function(o,d){return o.sq$concat(d)},t=function(o){return o}):l.ob$type===Sk.builtin.tuple&&(t=function(o){return new Sk.builtin.tuple(o)});var s=a(),c=Sk.abstr.iter(l);for(h=c.tp$iternext();h!==void 0;h=c.tp$iternext())a=r===Sk.builtin.none.none$?new Sk.builtin.bool(h):Sk.misceval.callsimArray(r,[h]),Sk.misceval.isTrue(a)&&(s=S(s,h));return t(s)},Sk.builtin.hasattr=function(r,l){if(!Sk.builtin.checkString(l))throw new Sk.builtin.TypeError("hasattr(): attribute name must be string");let h=Sk.misceval.tryCatch(()=>r.tp$getattr(l,!0),a=>{if(!(a instanceof Sk.builtin.AttributeError))throw a});return Sk.misceval.chain(h,a=>a===void 0?Sk.builtin.bool.false$:Sk.builtin.bool.true$)},Sk.builtin.pow=function(r,l,h){if(h===void 0||Sk.builtin.checkNone(h))return Sk.abstr.numberBinOp(r,l,"Pow");if(!(Sk.builtin.checkInt(r)&&Sk.builtin.checkInt(l)&&Sk.builtin.checkInt(h))){if(Sk.builtin.checkFloat(r)||Sk.builtin.checkComplex(r))return r.nb$power(l,h);throw new Sk.builtin.TypeError("unsupported operand type(s) for ** or pow(): '"+Sk.abstr.typeName(r)+"', '"+Sk.abstr.typeName(l)+"', '"+Sk.abstr.typeName(h)+"'")}return r.nb$power(l,h)},Sk.builtin.quit=function(r){throw r=new Sk.builtin.str(r).v,new Sk.builtin.SystemExit(r)},Sk.builtin.issubclass=function(r,l){if(!Sk.builtin.checkClass(r))throw new Sk.builtin.TypeError("issubclass() arg 1 must be a class");var h=Sk.builtin.checkClass(l);if(!(h||l instanceof Sk.builtin.tuple))throw new Sk.builtin.TypeError("issubclass() arg 2 must be a class or tuple of classes");if(h)return r.$isSubType(l)?Sk.builtin.bool.true$:Sk.builtin.bool.false$;for(h=0;h{if(h===void 0){if(l)return l;throw h=r.gi$ret,h!==void 0&&h!==Sk.builtin.none.none$?new Sk.builtin.StopIteration(h):new Sk.builtin.StopIteration}return h})},Sk.builtin.reload=function(){throw new Sk.builtin.NotImplementedError("reload is not yet implemented")},Sk.builtin.vars=function(){throw new Sk.builtin.NotImplementedError("vars is not yet implemented")},Sk.builtin.apply_=function(){throw new Sk.builtin.NotImplementedError("apply is not yet implemented")},Sk.builtin.buffer=function(){throw new Sk.builtin.NotImplementedError("buffer is not yet implemented")},Sk.builtin.coerce=function(){throw new Sk.builtin.NotImplementedError("coerce is not yet implemented")},Sk.builtin.intern=function(){throw new Sk.builtin.NotImplementedError("intern is not yet implemented")}},function(p,g){function e(G,he){return he=new this.constructor,this.ht$type&&h.call(he),he.args=new Sk.builtin.tuple(G.slice(0)),he}function i(G,he){Sk.abstr.checkNoKwargs(Sk.abstr.typeName(this),he),this.args=new Sk.builtin.tuple(G.slice(0))}function n(){return 1>=this.args.v.length?new Sk.builtin.str(this.args.v[0]):this.args.$r()}function r(G,he,B,q,X,E){X||(X=[]);let y=q?{}:{sk$solidBase:!1};return B={tp$init:q||i,tp$doc:B},E&&(B.tp$str=E),Sk.abstr.buildNativeClass(he,{base:G,constructor:function(...T){G.apply(this,T),X.forEach((I,D)=>{this["$"+I]=Sk.ffi.remapToPy(T[D])})},slots:B,getsets:Object.fromEntries(X.map(T=>[T,{$get(){return this["$"+T]||Sk.builtin.none.none$},$set(I){this["$"+T]=I||Sk.builtin.none.none$}}])),flags:y})}function l(G,he,B){let q=G.prototype.tp$init;return B={tp$doc:B,tp$init:q},q===i&&(B.tp$new=e),Sk.abstr.buildNativeClass(he,{base:G,constructor:function(...X){G.apply(this,X)},slots:B,flags:{sk$solidBase:!1}})}let h=Sk.abstr.buildNativeClass("BaseException",{constructor:function G(he,...B){Sk.asserts.assert(this instanceof G,"bad call to exception constructor, use 'new'"),typeof he=="string"&&(he=new Sk.builtin.str(he)),this.args=new Sk.builtin.tuple(he?[he]:[]),this.traceback=2<=B.length?[{filename:B[0]||"",lineno:B[1]}]:[],this.context=this.cause=null,this.$d=new Sk.builtin.dict},slots:{tp$getattr:Sk.generic.getAttr,tp$doc:"Common base class for all exceptions",tp$new:e,tp$init:i,$r(){let G=this.tp$name;return G+="("+this.args.v.map(he=>Sk.misceval.objectRepr(he)).join(", ")+")",new Sk.builtin.str(G)},tp$str:n},getsets:{args:{$get(){return this.args},$set(G){if(G===void 0)throw new Sk.builtin.TypeError("args may not be deleted");this.args=new Sk.builtin.tuple(G)}},__cause__:{$get(){return this.$cause||Sk.builtin.none.none$},$set(G){if(!(Sk.builtin.checkNone(G)||G instanceof Sk.builtin.BaseException))throw new ie("exception cause must be None or derive from BaseException");this.$cause=G}},__dict__:Sk.generic.getSetDict},proto:{toString(){let G=this.tp$name;return G+=": "+this.tp$str().v,G=this.traceback.length!==0?G+(" on line "+this.traceback[0].lineno):G+" at "}}});p=l(h,"SystemExit","Request to exit from the interpreter."),g=l(h,"KeyboardInterrupt","Program interrupted by user.");let a=l(h,"GeneratorExit","Request that a generator exit."),S=l(h,"Exception","Common base class for all non-exit exceptions."),t=r(S,"StopIteration","Signal the end from iterator.__next__().",function(G,he){i.call(this,G,he),this.$value=G[0]||Sk.builtin.none.none$},["value"]),s=l(S,"StopAsyncIteration","Signal the end from iterator.__anext__()."),c=l(S,"ArithmeticError","Base class for arithmetic errors."),o=l(c,"FloatingPointError","Floating point operation failed."),d=l(c,"OverflowError","Result too large to be represented."),u=l(c,"ZeroDivisionError","Second argument to a division or modulo operation was zero."),f=l(S,"AssertionError","Assertion failed."),$=l(S,"AttributeError","Attribute not found."),m=l(S,"BufferError","Buffer error."),_=l(S,"EOFError","Read beyond end of file."),v=r(S,"ImportError","Import can't find module, or can't find name in module.",function(G,he){i.call(this,G);let[B,q]=Sk.abstr.copyKeywordsToNamedArgs("ImportError",["name","path"],[],he);this.$name=B,this.$path=q,G.length===1&&(this.$msg=G[0])},["msg","name","path"],function(){return Sk.builtin.checkString(this.$msg)?this.$msg:n.call(this)}),A=l(v,"ModuleNotFoundError","Module not found."),N=l(S,"LookupError","Base class for lookup errors."),M=l(N,"IndexError","Sequence index out of range."),R=r(N,"KeyError","Mapping key not found.",null,null,function(){return this.args.v.length===1?this.args.v[0].$r():n.call(this)}),H=l(S,"MemoryError","Out of memory."),ee=l(S,"NameError","Name not found globally."),Y=l(ee,"UnboundLocalError","Local name referenced but not bound to a value."),k=r(S,"OSError","Base class for I/O related errors.",function(G,he){i.call(this,G,he)}),x=l(k,"FileNotFoundError","File not found."),C=l(k,"TimeoutError","Timeout expired."),F=l(S,"ReferenceError","Weak ref proxy used after referent went away."),P=l(S,"RuntimeError","Unspecified run-time error."),L=l(P,"NotImplementedError","Method or function hasn't been implemented yet."),U=l(P,"RecursionError","Recursion limit exceeded."),K=r(S,"SyntaxError","Invalid syntax.",function(G,he){i.call(this,G,he),1<=G.length&&(this.$msg=G[0]),G.length===2&&(G=new Sk.builtin.tuple(G[1]).v,this.$filename=G[0],this.$lineno=G[1],this.$offset=G[2],this.$text=G[3])},["msg","filename","lineno","offset","text"],function(){return n.call(this)}),te=l(K,"IndentationError","Improper indentation."),Z=l(te,"TabError","Improper mixture of spaces and tabs."),oe=l(S,"SystemError","Internal error in the Skulpt interpreter."),ie=l(S,"TypeError","Inappropriate argument type."),ce=l(S,"ValueError","Inappropriate argument value (of correct type)."),J=l(ce,"UnicodeError","Unicode related error."),pe=l(J,"UnicodeDecodeError","Unicode decoding error."),z=l(J,"UnicodeEncodeError","Unicode encoding error.");Object.assign(Sk.builtin,{BaseException:h,SystemExit:p,KeyboardInterrupt:g,GeneratorExit:a,Exception:S,StopIteration:t,StopAsyncIteration:s,ArithmeticError:c,FloatingPointError:o,OverflowError:d,ZeroDivisionError:u,AssertionError:f,AttributeError:$,BufferError:m,EOFError:_,ImportError:v,ModuleNotFoundError:A,LookupError:N,IndexError:M,KeyError:R,MemoryError:H,NameError:ee,UnboundLocalError:Y,OSError:k,IOError:k,FileNotFoundError:x,TimeoutError:C,ReferenceError:F,RuntimeError:P,NotImplementedError:L,RecursionError:U,SyntaxError:K,IndentationError:te,TabError:Z,SystemError:oe,TypeError:ie,ValueError:ce,UnicodeError:J,UnicodeDecodeError:pe,UnicodeEncodeError:z}),Sk.builtin.SuspensionError=l(S,"SuspensionError","Unsupported Suspension in code."),Sk.builtin.ExternalError=Sk.abstr.buildNativeClass("ExternalError",{constructor:function(...G){if(this.nativeError=G[0],!Sk.builtin.checkString(this.nativeError)&&(G[0]=this.nativeError.toString(),G[0].startsWith("RangeError: Maximum call")))return G[0]="Maximum call stack size exceeded",new U(...G);S.apply(this,G)},base:S}),Sk.builtin.getExcInfo=function(G){return new Sk.builtin.tuple([G.ob$type||Sk.builtin.none.none$,G,Sk.builtin.none.none$])}},function(p,g){Sk.builtin.method=Sk.abstr.buildNativeClass("method",{constructor:function(e,i){Sk.asserts.assert(this instanceof Sk.builtin.method,"bad call to method constructor, use 'new'"),this.im_func=e,this.im_self=i,this.im_call=e.tp$call},slots:{$r(){let e=this.im_func.tp$getattr(Sk.builtin.str.$qualname)||this.im_func.tp$getattr(Sk.builtin.str.$name);return e=e&&e.v||"?",new Sk.builtin.str("")},tp$hash(){let e=Sk.abstr.objectHash(this.im_self),i=Sk.abstr.objectHash(this.im_func);return e+i},tp$call(e,i){var n=this.im_call;if(n===void 0)throw new Sk.builtin.TypeError("'"+Sk.abstr.typeName(this.im_func)+"' object is not callable");return e=[this.im_self,...e],n.call(this.im_func,e,i)},tp$new(e,i){if(Sk.abstr.checkNoKwargs("method",i),Sk.abstr.checkArgsLen("method",e,2,2),i=e[0],e=e[1],!Sk.builtin.checkCallable(i))throw new Sk.builtin.TypeError("first argument must be callable");if(Sk.builtin.checkNone(e))throw new Sk.builtin.TypeError("self must not be None");return new Sk.builtin.method(i,e)},tp$richcompare(e,i){if(i!="Eq"&&i!="NotEq"||!(e instanceof Sk.builtin.method))return Sk.builtin.NotImplemented.NotImplemented$;let n;try{n=Sk.misceval.richCompareBool(this.im_self,e.im_self,"Eq",!1)&&this.im_func===e.im_func}catch{n=!1}return i=="Eq"?n:!n},tp$descr_get(e,i){return this},tp$getattr(e,i){let n=Sk.abstr.lookupSpecial(this,e);return n!==void 0?n:this.im_func.tp$getattr(e,i)}},getsets:{__func__:{$get(){return this.im_func}},__self__:{$get(){return this.im_self}},__doc__:{$get(){return this.im_func.tp$getattr(Sk.builtin.str.$doc)}}},flags:{sk$unacceptableBase:!0}})},function(p,g){function e(h){if(h!=null){if(h.sk$int===!0)return h.v;if(h.nb$index!==void 0)return h.nb$index();if(typeof h=="number"&&Number.isInteger(h))return h}}function i(h,a){let S=e(h);if(S!==void 0)return S;throw a=(a||"'{tp$name}' object cannot be interpreted as an integer").replace("{tp$name}",Sk.abstr.typeName(h)),new Sk.builtin.TypeError(a)}function n(){let h=(Sk.global.navigator||{}).userAgent||"";return-1{if(t=t.ob$type,!S.$isSubType(t))if(t.$isSubType(S))S=t;else throw new Sk.builtin.TypeError("metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases")}),S}function l(h,a,S,t,s){let c=h.tp$getattr(Sk.builtin.str.$prepare),o,d=null;if(c===void 0)return[d,o];if(d=Sk.misceval.callsimArray(c,[a,S],t),!Sk.builtin.checkMapping(d))throw new Sk.builtin.TypeError(s?h.prototype.tp$name:".__prepare__() must return a mapping not '"+Sk.abstr.typeName(d)+"'");return o={get(u,f){try{return Sk.abstr.objectGetItem(u,new Sk.builtin.str(Sk.unfixReserved(f)))}catch($){if(!($ instanceof Sk.builtin.KeyError))throw $}},set(u,f,$){return Sk.abstr.objectSetItem(u,new Sk.builtin.str(Sk.unfixReserved(f)),$),!0}},[d,o]}Sk.misceval={},Sk.misceval.Suspension=function(h,a,S){this.$isSuspension=!0,h!==void 0&&a!==void 0&&(this.resume=function(){return h(a.resume())}),this.child=a,this.optional=a!==void 0&&a.optional,this.data=S===void 0&&a!==void 0?a.data:S},Sk.exportSymbol("Sk.misceval.Suspension",Sk.misceval.Suspension),Sk.misceval.retryOptionalSuspensionOrThrow=function(h,a){for(;h instanceof Sk.misceval.Suspension;){if(!h.optional){a=new Sk.builtin.SuspensionError(a||"Cannot call a function that blocks or suspends here");let S=[];for(;h!=null;)h.$lineno&&S.push({filename:h.$filename,lineno:h.$lineno,colno:h.$colno}),h=h.child;throw S.reverse(),a.traceback.push(...S),a}h=h.resume()}return h},Sk.exportSymbol("Sk.misceval.retryOptionalSuspensionOrThrow",Sk.misceval.retryOptionalSuspensionOrThrow),Sk.misceval.isIndex=function(h){return h!=null&&(h.nb$index!==void 0||typeof h=="number"&&Number.isInteger(h))},Sk.exportSymbol("Sk.misceval.isIndex",Sk.misceval.isIndex),Sk.misceval.asIndex=e,Sk.misceval.asIndexSized=function(h,a,S){if(S=i(h,S),typeof S=="number")return S;if(a==null)return JSBI.lessThan(S,JSBI.__ZERO)?-Number.MAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER;throw new a("cannot fit '"+Sk.abstr.typeName(h)+"' into an index-sized integer")},Sk.misceval.asIndexOrThrow=i,Sk.misceval.applySlice=function(h,a,S,t){return Sk.abstr.objectGetItem(h,new Sk.builtin.slice(a,S,null),t)},Sk.exportSymbol("Sk.misceval.applySlice",Sk.misceval.applySlice),Sk.misceval.assignSlice=function(h,a,S,t,s){return a=new Sk.builtin.slice(a,S),t===null?Sk.abstr.objectDelItem(h,a):Sk.abstr.objectSetItem(h,a,t,s)},Sk.exportSymbol("Sk.misceval.assignSlice",Sk.misceval.assignSlice),Sk.misceval.arrayFromArguments=function(h){var a;if(h.length!=1)return h;var S=h[0];if(S instanceof Sk.builtin.set?S=S.tp$iter().$obj:S instanceof Sk.builtin.dict&&(S=Sk.builtin.dict.prototype.keys.func_code(S)),S instanceof Sk.builtin.list||S instanceof Sk.builtin.tuple)return S.v;if(Sk.builtin.checkIterable(S)){for(h=[],S=Sk.abstr.iter(S),a=S.tp$iternext();a!==void 0;a=S.tp$iternext())h.push(a);return h}throw new Sk.builtin.TypeError("'"+Sk.abstr.typeName(S)+"' object is not iterable")},Sk.exportSymbol("Sk.misceval.arrayFromArguments",Sk.misceval.arrayFromArguments),Sk.misceval.iterator=Sk.abstr.buildIteratorClass("iterator",{constructor:function(h,a){this.tp$iternext=a?h:function(S){let t=h();return S||t===void 0||!t.$isSuspension?t:Sk.misceval.retryOptionalSuspensionOrThrow(t)}},iternext:function(h){return this.tp$iternext(h)},flags:{sk$unacceptableBase:!0}}),Sk.misceval.swappedOp_={Eq:"Eq",NotEq:"NotEq",Lt:"Gt",LtE:"GtE",Gt:"Lt",GtE:"LtE"},Sk.misceval.opSymbols={Eq:"==",NotEq:"!=",Lt:"<",LtE:"<=",Gt:">",GtE:">=",Is:"is",IsNot:"is not",In_:"in",NotIn:"not in"},Sk.misceval.richCompareBool=function(h,a,S,t){Sk.asserts.assert(h.sk$object&&a.sk$object,"JS object passed to richCompareBool");var s=h.ob$type,c=a.ob$type,o=c!==s&&c.sk$baseClass===void 0&&c.$isSubType(s);if(!Sk.__future__.python3&&s!==c&&(S==="GtE"||S==="Gt"||S==="LtE"||S==="Lt")){var d=[Sk.builtin.float_,Sk.builtin.int_,Sk.builtin.lng,Sk.builtin.bool];let f=[Sk.builtin.dict,Sk.builtin.enumerate,Sk.builtin.filter_,Sk.builtin.list,Sk.builtin.map_,Sk.builtin.str,Sk.builtin.tuple,Sk.builtin.zip_];var u=d.indexOf(s);if(s=f.indexOf(s),d=d.indexOf(c),c=f.indexOf(c),h===Sk.builtin.none.none$)switch(S){case"Lt":return!0;case"LtE":return!0;case"Gt":return!1;case"GtE":return!1}if(a===Sk.builtin.none.none$)switch(S){case"Lt":return!1;case"LtE":return!1;case"Gt":return!0;case"GtE":return!0}if(u!==-1&&c!==-1)switch(S){case"Lt":return!0;case"LtE":return!0;case"Gt":return!1;case"GtE":return!1}if(s!==-1&&d!==-1)switch(S){case"Lt":return!1;case"LtE":return!1;case"Gt":return!0;case"GtE":return!0}if(s!==-1&&c!==-1)switch(S){case"Lt":return sc;case"GtE":return s>=c}}if(S==="Is")return h===a;if(S==="IsNot")return h!==a;if(S==="In")return Sk.misceval.chain(Sk.abstr.sequenceContains(a,h,t),Sk.misceval.isTrue);if(S==="NotIn")return Sk.misceval.chain(Sk.abstr.sequenceContains(a,h,t),function(f){return!Sk.misceval.isTrue(f)});if(c={Eq:"ob$eq",NotEq:"ob$ne",Gt:"ob$gt",GtE:"ob$ge",Lt:"ob$lt",LtE:"ob$le"},u=c[S],o&&(t=c[Sk.misceval.swappedOp_[S]],(t=a[t](h))!==Sk.builtin.NotImplemented.NotImplemented$)||(t=h[u](a))!==Sk.builtin.NotImplemented.NotImplemented$||!o&&(t=c[Sk.misceval.swappedOp_[S]],(t=a[t](h))!==Sk.builtin.NotImplemented.NotImplemented$))return Sk.misceval.isTrue(t);if(!Sk.__future__.python3){if(o=Sk.abstr.lookupSpecial(h,Sk.builtin.str.$cmp))try{if(t=Sk.misceval.callsimArray(o,[a]),Sk.builtin.checkNumber(t)){if(t=Sk.builtin.asnum$(t),S==="Eq")return t===0;if(S==="NotEq")return t!==0;if(S==="Lt")return 0>t;if(S==="Gt")return 0=t;if(S==="GtE")return 0<=t}if(t!==Sk.builtin.NotImplemented.NotImplemented$)throw new Sk.builtin.TypeError("comparison did not return an int")}catch{throw new Sk.builtin.TypeError("comparison did not return an int")}if(o=Sk.abstr.lookupSpecial(a,Sk.builtin.str.$cmp))try{if(t=Sk.misceval.callsimArray(o,[h]),Sk.builtin.checkNumber(t)){if(t=Sk.builtin.asnum$(t),S==="Eq")return t===0;if(S==="NotEq")return t!==0;if(S==="Lt")return 0t;if(S==="LtE")return 0<=t;if(S==="GtE")return 0>=t}if(t!==Sk.builtin.NotImplemented.NotImplemented$)throw new Sk.builtin.TypeError("comparison did not return an int")}catch{throw new Sk.builtin.TypeError("comparison did not return an int")}if(h===Sk.builtin.none.none$&&a===Sk.builtin.none.none$){if(S==="Eq")return h.v===a.v;if(S==="NotEq")return h.v!==a.v;if(S==="Gt")return h.v>a.v;if(S==="GtE")return h.v>=a.v;if(S==="Lt")return h.v";throw a}},Sk.exportSymbol("Sk.misceval.objectRepr",Sk.misceval.objectRepr),Sk.misceval.opAllowsEquality=function(h){switch(h){case"LtE":case"Eq":case"GtE":return!0}return!1},Sk.exportSymbol("Sk.misceval.opAllowsEquality",Sk.misceval.opAllowsEquality),Sk.misceval.isTrue=function(h){return h===!0||h===Sk.builtin.bool.true$?!0:h===!1||h===Sk.builtin.bool.false$||h===null||h===void 0?!1:h.nb$bool?h.nb$bool():h.sq$length?h.sq$length()!==0:!!h},Sk.exportSymbol("Sk.misceval.isTrue",Sk.misceval.isTrue),Sk.misceval.softspace_=!1,Sk.misceval.print_=function(h){Sk.misceval.softspace_&&(h!==` +The substitutions are identified by braces ('{' and '}').`},__format__:{$meth:Sk.formatting.formatString,$flags:{OneArg:!0},$textsig:"($self, format_spec, /)",$doc:"Return a formatted version of the string as described by format_spec."},__getnewargs__:{$meth(){return new Sk.builtin.tuple(new Sk.builtin.str(this.v))},$flags:{NoArgs:!0},$textsig:null,$doc:null}}}),Sk.exportSymbol("Sk.builtin.str",Sk.builtin.str);var o=/^[A-Za-z0-9]+$/,d=/([.*+?=|\\\/()\[\]\{\}^$])/g,u=/^[\s\xa0]+/;Sk.builtin.str.$py2decode=new Sk.builtin.method_descriptor(Sk.builtin.str,{$name:"decode",$meth(m,_){let v=new Sk.builtin.bytes(this.v);return Sk.builtin.bytes.$decode.call(v,m,_)},$flags:{NamedArgs:["encoding","errors"]}});var f=Sk.abstr.buildIteratorClass("str_iterator",{constructor:function(m){this.$index=0,m.$hasAstralCodePoints()?(this.$seq=m.codepoints,this.tp$iternext=()=>{let _=this.$seq[this.$index];if(_!==void 0)return new Sk.builtin.str(m.v.substring(_,this.$seq[++this.$index]))}):(this.$seq=m.v,this.tp$iternext=()=>{let _=this.$seq[this.$index++];if(_!==void 0)return new Sk.builtin.str(_)})},iternext(){return this.tp$iternext()},methods:{__length_hint__:Sk.generic.iterLengthHintWithArrayMethodDef},flags:{sk$unacceptableBase:!0}}),$={abstract:!0,as:!0,boolean:!0,break:!0,byte:!0,case:!0,catch:!0,char:!0,class:!0,continue:!0,const:!0,debugger:!0,default:!0,delete:!0,do:!0,double:!0,else:!0,enum:!0,export:!0,extends:!0,false:!0,final:!0,finally:!0,float:!0,for:!0,function:!0,goto:!0,if:!0,implements:!0,import:!0,in:!0,instanceof:!0,int:!0,interface:!0,is:!0,long:!0,namespace:!0,native:!0,new:!0,null:!0,package:!0,private:!0,protected:!0,public:!0,return:!0,short:!0,static:!0,super:!0,switch:!0,synchronized:!0,this:!0,throw:!0,throws:!0,transient:!0,true:!0,try:!0,typeof:!0,use:!0,var:!0,void:!0,volatile:!0,while:!0,with:!0,constructor:!0,__defineGetter__:!0,__defineSetter__:!0,apply:!0,arguments:!0,call:!0,caller:!0,eval:!0,hasOwnProperty:!0,isPrototypeOf:!0,__lookupGetter__:!0,__lookupSetter__:!0,__noSuchMethod__:!0,propertyIsEnumerable:!0,prototype:!0,toSource:!0,toLocaleString:!0,toString:!0,unwatch:!0,valueOf:!0,watch:!0,length:!0,name:!0};Sk.builtin.str.reservedWords_=$,Sk.builtin.str.$fixReserved=t},function(p,b){Sk.builtin.func=Sk.abstr.buildNativeClass("function",{constructor:function(e,i,n,r){if(Sk.asserts.assert(this instanceof Sk.builtin.func,"builtin func should be called as a class with `new`"),this.func_code=e,this.func_globals=i||null,this.$name=e.co_name&&e.co_name.v||e.name||"",this.$d=Sk.builtin.dict?new Sk.builtin.dict:void 0,this.$doc=e.co_docstring||Sk.builtin.none.none$,this.$module=Sk.globals&&Sk.globals.__name__||Sk.builtin.none.none$,this.$qualname=e.co_qualname&&e.co_qualname.v||this.$name,r!==void 0)for(let l in r)n[l]=r[l];this.func_closure=n,this.func_annotations=null,this.$memoiseFlags(),this.memoised=e.co_fastcall||null,this.tp$call=e.co_fastcall?e.bind(this):Sk.builtin.func.prototype.$funcCall.bind(this)},slots:{tp$getattr:Sk.generic.getAttr,tp$descr_get(e,i){return e===null?this:new Sk.builtin.method(this,e)},$r(){return new Sk.builtin.str("")},tp$call(e,i){return this.tp$call(e,i)}},getsets:{__name__:{$get(){return new Sk.builtin.str(this.$name)},$set(e){if(!Sk.builtin.checkString(e))throw new Sk.builtin.TypeError("__name__ must be set to a string object");this.$name=e.$jsstr()}},__qualname__:{$get(){return new Sk.builtin.str(this.$qualname)},$set(e){if(!Sk.builtin.checkString(e))throw new Sk.builtin.TypeError("__qualname__ must be set to a string object");this.$qualname=e.$jsstr()}},__dict__:Sk.generic.getSetDict,__annotations__:{$get(){return this.func_annotations===null?this.func_annotations=new Sk.builtin.dict([]):Array.isArray(this.func_annotations)&&(this.func_annotations=Sk.abstr.keywordArrayToPyDict(this.func_annotations)),this.func_annotations},$set(e){if(e===void 0||Sk.builtin.checkNone(e))this.func_annotations=new Sk.builtin.dict([]);else if(e instanceof Sk.builtin.dict)this.func_annotations=e;else throw new Sk.builtin.TypeError("__annotations__ must be set to a dict object")}},__defaults__:{$get(){return this.$defaults==null?Sk.builtin.none.none$:new Sk.builtin.tuple(this.$defaults)},$set(e){if(e===void 0||Sk.builtin.checkNone(e))this.$defaults=null;else if(e instanceof Sk.builtin.tuple)this.$defaults=e.valueOf();else throw new Sk.builtin.TypeError("__defaults__ must be set to a tuple object")}},__doc__:{$get(){return this.$doc},$set(e){this.$doc=e||Sk.builtin.none.none$}},__module__:{$get(){return this.$module},$set(e){this.$module=e||Sk.builtin.none.none$}}},proto:{$memoiseFlags(){this.co_varnames=this.func_code.co_varnames,this.co_argcount=this.func_code.co_argcount,this.co_argcount===void 0&&this.co_varnames&&(this.co_argcount=this.co_varnames.length),this.co_kwonlyargcount=this.func_code.co_kwonlyargcount||0,this.co_varargs=this.func_code.co_varargs,this.co_kwargs=this.func_code.co_kwargs,this.$defaults=this.func_code.$defaults,this.$kwdefs=this.func_code.$kwdefs||[]},$resolveArgs:function(e,i){var n=this.co_argcount;n===void 0&&(n=this.co_varnames?this.co_varnames.length:e.length);var r=this.co_varnames||[],l=this.co_kwonlyargcount||0;let h=n+l;if(!(l!==0||this.co_kwargs||i&&i.length!==0||this.co_varargs)){if(e.length==n)return e;if(e.length===0&&this.$defaults&&this.$defaults.length===n){for(r=0;r!=this.$defaults.length;r++)e[r]=this.$defaults[r];return e}}let a;this.co_kwargs&&(a=[]);var S=e.length;let t=e.length<=n?e:e.slice(0,n);if(this.co_varargs)e=e.length>t.length?e.slice(t.length):[],t[h]=new Sk.builtin.tuple(e);else if(S>n)throw new Sk.builtin.TypeError(`${this.$name}"() takes ${n} positional ${n==1?"argument":"arguments"} but ${S} ${S==1?"was":"were"} given`);if(i){if(this.func_code.no_kw)throw new Sk.builtin.TypeError(this.$name+"() takes no keyword arguments");for(e=0;e"'"+o+"'").join(", ")));for(;er.indexOf(".")&&0>r.indexOf("e")&&0>r.indexOf("E"))return r;var l=0;if(0<=r.indexOf("e")){var h=r.substr(0,r.indexOf("e"));l=r.substr(r.indexOf("e")+1)}else 0<=r.indexOf("E")?(h=r.substr(0,r.indexOf("e")),l=r.substr(r.indexOf("E")+1)):h=r;if(l=parseInt(l,10),r=h.indexOf("."),0>r){if(0<=l){for(;0-l?h.substr(0,h.length+l):0}for(h=r===0?h.substr(1):rh.length;)h+="0";return h=0>=r?0:h.substr(0,r)},Sk.exportSymbol("Sk.builtin.asnum$nofloat",Sk.builtin.asnum$nofloat),Sk.builtin.round=function(r,l){if(r===void 0)throw new Sk.builtin.TypeError("a float is required");if(!Sk.__future__.dunder_round){if(!Sk.builtin.checkNumber(r))throw new Sk.builtin.TypeError("a float is required");if(r.round$)return r.round$(l);throw new Sk.builtin.AttributeError(Sk.abstr.typeName(r)+" instance has no attribute '__float__'")}if(l!==void 0&&!Sk.builtin.checkNone(l)&&!Sk.misceval.isIndex(l))throw new Sk.builtin.TypeError("'"+Sk.abstr.typeName(l)+"' object cannot be interpreted as an index");if(r=Sk.abstr.lookupSpecial(r,Sk.builtin.str.$round),r!==void 0)return l!==void 0?Sk.misceval.callsimArray(r,[l]):Sk.misceval.callsimArray(r,[]);throw new Sk.builtin.TypeError("a float is required")},Sk.builtin.len=function(r){if(r.sq$length)r=r.sq$length(!0);else throw new Sk.builtin.TypeError("object of type '"+Sk.abstr.typeName(r)+"' has no len()");return Sk.misceval.chain(r,l=>new Sk.builtin.int_(l))},Sk.builtin.min=function(r,l){let h,a=r.length;if(!a)throw new Sk.builtin.TypeError("min expected 1 argument, got 0");let[S,t]=Sk.abstr.copyKeywordsToNamedArgs("min",["default","key"],[],l,[null,Sk.builtin.none.none$]);if(1{if(s=c,s!==void 0)return Sk.builtin.checkNone(t)?Sk.misceval.iterFor(h,o=>{Sk.misceval.richCompareBool(o,s,"Lt")&&(s=o)}):Sk.misceval.chain(Sk.misceval.callsimOrSuspendArray(t,[s]),o=>Sk.misceval.iterFor(h,d=>Sk.misceval.chain(Sk.misceval.callsimOrSuspendArray(t,[d]),u=>{Sk.misceval.richCompareBool(u,o,"Lt")&&(s=d,o=u)})))},()=>{if(s===void 0){if(S===null)throw new Sk.builtin.ValueError("min() arg is an empty sequence");s=S}return s})},Sk.builtin.max=function(r,l){let h,a=r.length;if(!a)throw new Sk.builtin.TypeError("max expected 1 argument, got 0");let[S,t]=Sk.abstr.copyKeywordsToNamedArgs("max",["default","key"],[],l,[null,Sk.builtin.none.none$]);if(1{if(s=c,s!==void 0)return Sk.builtin.checkNone(t)?Sk.misceval.iterFor(h,o=>{Sk.misceval.richCompareBool(o,s,"Gt")&&(s=o)}):Sk.misceval.chain(Sk.misceval.callsimOrSuspendArray(t,[s]),o=>Sk.misceval.iterFor(h,d=>Sk.misceval.chain(Sk.misceval.callsimOrSuspendArray(t,[d]),u=>{Sk.misceval.richCompareBool(u,o,"Gt")&&(s=d,o=u)})))},()=>{if(s===void 0){if(S===null)throw new Sk.builtin.ValueError("max() arg is an empty sequence");s=S}return s})},Sk.builtin.min.co_fastcall=Sk.builtin.max.co_fastcall=1,Sk.builtin.any=function(r){return Sk.misceval.chain(Sk.misceval.iterFor(Sk.abstr.iter(r),function(l){if(Sk.misceval.isTrue(l))return new Sk.misceval.Break(Sk.builtin.bool.true$)}),l=>l||Sk.builtin.bool.false$)},Sk.builtin.all=function(r){return Sk.misceval.chain(Sk.misceval.iterFor(Sk.abstr.iter(r),function(l){if(!Sk.misceval.isTrue(l))return new Sk.misceval.Break(Sk.builtin.bool.false$)}),l=>l||Sk.builtin.bool.true$)},Sk.builtin.sum=function(r,l){function h(){return Sk.misceval.iterFor(t,c=>{if(c.constructor===Sk.builtin.int_)s=s.nb$add(c);else return c.constructor===Sk.builtin.float_?(s=s.nb$float().nb$add(c),new Sk.misceval.Break("float")):(s=Sk.abstr.numberBinOp(s,c,"Add"),new Sk.misceval.Break("slow"))})}function a(){return Sk.misceval.iterFor(t,c=>{if(c.constructor===Sk.builtin.float_||c.constructor===Sk.builtin.int_)s=s.nb$add(c);else return s=Sk.abstr.numberBinOp(s,c,"Add"),new Sk.misceval.Break("slow")})}function S(){return Sk.misceval.iterFor(t,c=>{s=Sk.abstr.numberBinOp(s,c,"Add")})}let t=Sk.abstr.iter(r);if(l===void 0)var s=new Sk.builtin.int_(0);else{if(Sk.builtin.checkString(l))throw new Sk.builtin.TypeError("sum() can't sum strings [use ''.join(seq) instead]");s=l}return r=l===void 0||l.constructor===Sk.builtin.int_?h():l.constructor===Sk.builtin.float_?"float":"slow",Sk.misceval.chain(r,c=>c==="float"?a():c,c=>{if(c==="slow")return S()},()=>s)},Sk.builtin.zip=function(){var r,l;if(arguments.length===0)return new Sk.builtin.list([]);var h=[];for(l=0;lr||1114112<=r)throw new Sk.builtin.ValueError("chr() arg not in range(0x110000)")}else if(0>r||256<=r)throw new Sk.builtin.ValueError("chr() arg not in range(256)");return new Sk.builtin.str(String.fromCodePoint(r))},Sk.builtin.unichr=function(r){if(Sk.builtin.pyCheckArgsLen("unichr",arguments.length,1,1),!Sk.builtin.checkInt(r))throw new Sk.builtin.TypeError("an integer is required");r=Sk.builtin.asnum$(r);try{return new Sk.builtin.str(String.fromCodePoint(r))}catch(l){throw l instanceof RangeError?new Sk.builtin.ValueError(l.message):l}},Sk.builtin.int2str_=function(r,l,h){let a=Sk.misceval.asIndexOrThrow(r),S=a.toString(l);return S=0>a?"-"+h+S.slice(1):h+S,l!==2&&!Sk.__future__.python3&&(r instanceof Sk.builtin.lng||JSBI.__isBigInt(a))&&(S+="L"),new Sk.builtin.str(S)},Sk.builtin.hex=function(r){if(!Sk.misceval.isIndex(r))throw new Sk.builtin.TypeError("hex() argument can't be converted to hex");return Sk.builtin.int2str_(r,16,"0x")},Sk.builtin.oct=function(r){if(!Sk.misceval.isIndex(r))throw new Sk.builtin.TypeError("oct() argument can't be converted to hex");return Sk.__future__.octal_number_literal?Sk.builtin.int2str_(r,8,"0o"):Sk.builtin.int2str_(r,8,"0")},Sk.builtin.bin=function(r){if(!Sk.misceval.isIndex(r))throw new Sk.builtin.TypeError("'"+Sk.abstr.typeName(r)+"' object can't be interpreted as an index");return Sk.builtin.int2str_(r,2,"0b")},Sk.builtin.dir=function(r){if(r!==void 0)return r=Sk.abstr.lookupSpecial(r,Sk.builtin.str.$dir),Sk.misceval.chain(Sk.misceval.callsimOrSuspendArray(r,[]),l=>Sk.builtin.sorted(l));throw new Sk.builtin.NotImplementedError("skulpt does not yet support dir with no args")},Sk.builtin.repr=function(r){return r.$r()},Sk.builtin.ascii=function(r){return Sk.misceval.chain(r.$r(),l=>{let h,a;for(a=0;a=t?(S=t.toString(16),2>S.length&&(S="0"+S),h+="\\x"+S):127t||57344<=t?h+="\\u"+("000"+t.toString(16)).slice(-4):55296<=t?(S=l.v.codePointAt(a),a++,S=S.toString(16),t="0000000"+S.toString(16),h=4r.tp$getattr(l,!0),S=>{if(!(S instanceof Sk.builtin.AttributeError))throw S});return Sk.misceval.chain(a,S=>{if(S===void 0){if(h!==void 0)return h;throw new Sk.builtin.AttributeError(r.sk$attrError()+" has no attribute "+Sk.misceval.objectRepr(l))}return S})},Sk.builtin.setattr=function(r,l,h){if(!Sk.builtin.checkString(l))throw new Sk.builtin.TypeError("attribute name must be string");return Sk.misceval.chain(r.tp$setattr(l,h,!0),()=>Sk.builtin.none.none$)},Sk.builtin.raw_input=function(r){var l=r||"";return Sk.misceval.chain(Sk.importModule("sys",!1,!0),function(h){return Sk.inputfunTakesPrompt?Sk.builtin.file.$readline(h.$d.stdin,null,l):Sk.misceval.chain(void 0,function(){return Sk.misceval.callsimOrSuspendArray(h.$d.stdout.write,[h.$d.stdout,new Sk.builtin.str(l)])},function(){return Sk.misceval.callsimOrSuspendArray(h.$d.stdin.readline,[h.$d.stdin])})})},Sk.builtin.input=Sk.builtin.raw_input,Sk.builtin.jseval=function(r){return r=Sk.global.eval(Sk.ffi.remapToJs(r)),Sk.ffi.remapToPy(r)},Sk.builtin.jsmillis=function(){return console.warn("jsmillis is deprecated"),new Date().valueOf()};let e=Sk.abstr.buildNativeClass("code",{constructor:function(r,l){this.compiled=l,this.code=l.code,this.filename=r},slots:{tp$new(r,l){throw new Sk.builtin.NotImplementedError("cannot construct a code object in skulpt")},$r(){return new Sk.builtin.str(", file "+this.filename+">")}}});Sk.builtin.compile=function(r,l,h,a,S,t){return Sk.builtin.pyCheckType("source","str",Sk.builtin.checkString(r)),Sk.builtin.pyCheckType("filename","str",Sk.builtin.checkString(l)),Sk.builtin.pyCheckType("mode","str",Sk.builtin.checkString(h)),r=r.$jsstr(),l=l.$jsstr(),h=h.$jsstr(),Sk.misceval.chain(Sk.compile(r,l,h,!0),s=>new e(l,s))},Sk.builtin.exec=function(r,l,h){let a=l&&l.__file__;if(a=a!==void 0&&Sk.builtin.checkString(a)?a.toString():"",Sk.builtin.checkString(r))r=Sk.compile(r.$jsstr(),a,"exec",!0);else if(typeof r=="string")r=Sk.compile(r,a,"exec",!0);else if(!(r instanceof e))throw new Sk.builtin.TypeError("exec() arg 1 must be a string, bytes or code object");Sk.asserts.assert(l===void 0||l.constructor===Object,"internal calls to exec should be called with a javascript object for globals"),Sk.asserts.assert(h===void 0||h.constructor===Object,"internal calls to exec should be called with a javascript object for locals");let S=Sk.globals;return l=l||S,Sk.misceval.chain(r,t=>Sk.global.eval(t.code)(l,h),t=>(Sk.globals=S,t))},Sk.builtin.eval=function(r,l,h){if(Sk.builtin.checkString(r))r=r.$jsstr();else if(Sk.builtin.checkBytes(r))throw new Sk.builtin.NotImplementedError("bytes for eval is not yet implemented in skulpt");if(typeof r=="string"){r=r.trim();var a=Sk.parse("?",r);if(a=Sk.astFromParse(a.cst,"?",a.flags),1{let t=S.__final_res__||Sk.builtin.none.none$;return delete S.__final_res__,t})},Sk.builtin.map=function(r,l){var h=[],a,S;if(Sk.builtin.pyCheckArgsLen("map",arguments.length,2),2(S=new Sk.builtin.list(S),S.list$sort(l,h,a),S))},Sk.builtin.filter=function(r,l){var h;if(Sk.builtin.pyCheckArgsLen("filter",arguments.length,2,2),!Sk.builtin.checkIterable(l))throw new Sk.builtin.TypeError("'"+Sk.abstr.typeName(l)+"' object is not iterable");var a=function(){return[]},S=function(o,d){return o.push(d),o},t=function(o){return new Sk.builtin.list(o)};l.ob$type===Sk.builtin.str?(a=function(){return new Sk.builtin.str("")},S=function(o,d){return o.sq$concat(d)},t=function(o){return o}):l.ob$type===Sk.builtin.tuple&&(t=function(o){return new Sk.builtin.tuple(o)});var s=a(),c=Sk.abstr.iter(l);for(h=c.tp$iternext();h!==void 0;h=c.tp$iternext())a=r===Sk.builtin.none.none$?new Sk.builtin.bool(h):Sk.misceval.callsimArray(r,[h]),Sk.misceval.isTrue(a)&&(s=S(s,h));return t(s)},Sk.builtin.hasattr=function(r,l){if(!Sk.builtin.checkString(l))throw new Sk.builtin.TypeError("hasattr(): attribute name must be string");let h=Sk.misceval.tryCatch(()=>r.tp$getattr(l,!0),a=>{if(!(a instanceof Sk.builtin.AttributeError))throw a});return Sk.misceval.chain(h,a=>a===void 0?Sk.builtin.bool.false$:Sk.builtin.bool.true$)},Sk.builtin.pow=function(r,l,h){if(h===void 0||Sk.builtin.checkNone(h))return Sk.abstr.numberBinOp(r,l,"Pow");if(!(Sk.builtin.checkInt(r)&&Sk.builtin.checkInt(l)&&Sk.builtin.checkInt(h))){if(Sk.builtin.checkFloat(r)||Sk.builtin.checkComplex(r))return r.nb$power(l,h);throw new Sk.builtin.TypeError("unsupported operand type(s) for ** or pow(): '"+Sk.abstr.typeName(r)+"', '"+Sk.abstr.typeName(l)+"', '"+Sk.abstr.typeName(h)+"'")}return r.nb$power(l,h)},Sk.builtin.quit=function(r){throw r=new Sk.builtin.str(r).v,new Sk.builtin.SystemExit(r)},Sk.builtin.issubclass=function(r,l){if(!Sk.builtin.checkClass(r))throw new Sk.builtin.TypeError("issubclass() arg 1 must be a class");var h=Sk.builtin.checkClass(l);if(!(h||l instanceof Sk.builtin.tuple))throw new Sk.builtin.TypeError("issubclass() arg 2 must be a class or tuple of classes");if(h)return r.$isSubType(l)?Sk.builtin.bool.true$:Sk.builtin.bool.false$;for(h=0;h{if(h===void 0){if(l)return l;throw h=r.gi$ret,h!==void 0&&h!==Sk.builtin.none.none$?new Sk.builtin.StopIteration(h):new Sk.builtin.StopIteration}return h})},Sk.builtin.reload=function(){throw new Sk.builtin.NotImplementedError("reload is not yet implemented")},Sk.builtin.vars=function(){throw new Sk.builtin.NotImplementedError("vars is not yet implemented")},Sk.builtin.apply_=function(){throw new Sk.builtin.NotImplementedError("apply is not yet implemented")},Sk.builtin.buffer=function(){throw new Sk.builtin.NotImplementedError("buffer is not yet implemented")},Sk.builtin.coerce=function(){throw new Sk.builtin.NotImplementedError("coerce is not yet implemented")},Sk.builtin.intern=function(){throw new Sk.builtin.NotImplementedError("intern is not yet implemented")}},function(p,b){function e(G,he){return he=new this.constructor,this.ht$type&&h.call(he),he.args=new Sk.builtin.tuple(G.slice(0)),he}function i(G,he){Sk.abstr.checkNoKwargs(Sk.abstr.typeName(this),he),this.args=new Sk.builtin.tuple(G.slice(0))}function n(){return 1>=this.args.v.length?new Sk.builtin.str(this.args.v[0]):this.args.$r()}function r(G,he,B,q,Z,E){Z||(Z=[]);let y=q?{}:{sk$solidBase:!1};return B={tp$init:q||i,tp$doc:B},E&&(B.tp$str=E),Sk.abstr.buildNativeClass(he,{base:G,constructor:function(...T){G.apply(this,T),Z.forEach((I,j)=>{this["$"+I]=Sk.ffi.remapToPy(T[j])})},slots:B,getsets:Object.fromEntries(Z.map(T=>[T,{$get(){return this["$"+T]||Sk.builtin.none.none$},$set(I){this["$"+T]=I||Sk.builtin.none.none$}}])),flags:y})}function l(G,he,B){let q=G.prototype.tp$init;return B={tp$doc:B,tp$init:q},q===i&&(B.tp$new=e),Sk.abstr.buildNativeClass(he,{base:G,constructor:function(...Z){G.apply(this,Z)},slots:B,flags:{sk$solidBase:!1}})}let h=Sk.abstr.buildNativeClass("BaseException",{constructor:function G(he,...B){Sk.asserts.assert(this instanceof G,"bad call to exception constructor, use 'new'"),typeof he=="string"&&(he=new Sk.builtin.str(he)),this.args=new Sk.builtin.tuple(he?[he]:[]),this.traceback=2<=B.length?[{filename:B[0]||"",lineno:B[1]}]:[],this.context=this.cause=null,this.$d=new Sk.builtin.dict},slots:{tp$getattr:Sk.generic.getAttr,tp$doc:"Common base class for all exceptions",tp$new:e,tp$init:i,$r(){let G=this.tp$name;return G+="("+this.args.v.map(he=>Sk.misceval.objectRepr(he)).join(", ")+")",new Sk.builtin.str(G)},tp$str:n},getsets:{args:{$get(){return this.args},$set(G){if(G===void 0)throw new Sk.builtin.TypeError("args may not be deleted");this.args=new Sk.builtin.tuple(G)}},__cause__:{$get(){return this.$cause||Sk.builtin.none.none$},$set(G){if(!(Sk.builtin.checkNone(G)||G instanceof Sk.builtin.BaseException))throw new ie("exception cause must be None or derive from BaseException");this.$cause=G}},__dict__:Sk.generic.getSetDict},proto:{toString(){let G=this.tp$name;return G+=": "+this.tp$str().v,G=this.traceback.length!==0?G+(" on line "+this.traceback[0].lineno):G+" at "}}});p=l(h,"SystemExit","Request to exit from the interpreter."),b=l(h,"KeyboardInterrupt","Program interrupted by user.");let a=l(h,"GeneratorExit","Request that a generator exit."),S=l(h,"Exception","Common base class for all non-exit exceptions."),t=r(S,"StopIteration","Signal the end from iterator.__next__().",function(G,he){i.call(this,G,he),this.$value=G[0]||Sk.builtin.none.none$},["value"]),s=l(S,"StopAsyncIteration","Signal the end from iterator.__anext__()."),c=l(S,"ArithmeticError","Base class for arithmetic errors."),o=l(c,"FloatingPointError","Floating point operation failed."),d=l(c,"OverflowError","Result too large to be represented."),u=l(c,"ZeroDivisionError","Second argument to a division or modulo operation was zero."),f=l(S,"AssertionError","Assertion failed."),$=l(S,"AttributeError","Attribute not found."),m=l(S,"BufferError","Buffer error."),_=l(S,"EOFError","Read beyond end of file."),v=r(S,"ImportError","Import can't find module, or can't find name in module.",function(G,he){i.call(this,G);let[B,q]=Sk.abstr.copyKeywordsToNamedArgs("ImportError",["name","path"],[],he);this.$name=B,this.$path=q,G.length===1&&(this.$msg=G[0])},["msg","name","path"],function(){return Sk.builtin.checkString(this.$msg)?this.$msg:n.call(this)}),A=l(v,"ModuleNotFoundError","Module not found."),N=l(S,"LookupError","Base class for lookup errors."),M=l(N,"IndexError","Sequence index out of range."),R=r(N,"KeyError","Mapping key not found.",null,null,function(){return this.args.v.length===1?this.args.v[0].$r():n.call(this)}),H=l(S,"MemoryError","Out of memory."),ee=l(S,"NameError","Name not found globally."),J=l(ee,"UnboundLocalError","Local name referenced but not bound to a value."),g=r(S,"OSError","Base class for I/O related errors.",function(G,he){i.call(this,G,he)}),x=l(g,"FileNotFoundError","File not found."),C=l(g,"TimeoutError","Timeout expired."),F=l(S,"ReferenceError","Weak ref proxy used after referent went away."),P=l(S,"RuntimeError","Unspecified run-time error."),D=l(P,"NotImplementedError","Method or function hasn't been implemented yet."),U=l(P,"RecursionError","Recursion limit exceeded."),K=r(S,"SyntaxError","Invalid syntax.",function(G,he){i.call(this,G,he),1<=G.length&&(this.$msg=G[0]),G.length===2&&(G=new Sk.builtin.tuple(G[1]).v,this.$filename=G[0],this.$lineno=G[1],this.$offset=G[2],this.$text=G[3])},["msg","filename","lineno","offset","text"],function(){return n.call(this)}),te=l(K,"IndentationError","Improper indentation."),Q=l(te,"TabError","Improper mixture of spaces and tabs."),oe=l(S,"SystemError","Internal error in the Skulpt interpreter."),ie=l(S,"TypeError","Inappropriate argument type."),ce=l(S,"ValueError","Inappropriate argument value (of correct type)."),Y=l(ce,"UnicodeError","Unicode related error."),pe=l(Y,"UnicodeDecodeError","Unicode decoding error."),z=l(Y,"UnicodeEncodeError","Unicode encoding error.");Object.assign(Sk.builtin,{BaseException:h,SystemExit:p,KeyboardInterrupt:b,GeneratorExit:a,Exception:S,StopIteration:t,StopAsyncIteration:s,ArithmeticError:c,FloatingPointError:o,OverflowError:d,ZeroDivisionError:u,AssertionError:f,AttributeError:$,BufferError:m,EOFError:_,ImportError:v,ModuleNotFoundError:A,LookupError:N,IndexError:M,KeyError:R,MemoryError:H,NameError:ee,UnboundLocalError:J,OSError:g,IOError:g,FileNotFoundError:x,TimeoutError:C,ReferenceError:F,RuntimeError:P,NotImplementedError:D,RecursionError:U,SyntaxError:K,IndentationError:te,TabError:Q,SystemError:oe,TypeError:ie,ValueError:ce,UnicodeError:Y,UnicodeDecodeError:pe,UnicodeEncodeError:z}),Sk.builtin.SuspensionError=l(S,"SuspensionError","Unsupported Suspension in code."),Sk.builtin.ExternalError=Sk.abstr.buildNativeClass("ExternalError",{constructor:function(...G){if(this.nativeError=G[0],!Sk.builtin.checkString(this.nativeError)&&(G[0]=this.nativeError.toString(),G[0].startsWith("RangeError: Maximum call")))return G[0]="Maximum call stack size exceeded",new U(...G);S.apply(this,G)},base:S}),Sk.builtin.getExcInfo=function(G){return new Sk.builtin.tuple([G.ob$type||Sk.builtin.none.none$,G,Sk.builtin.none.none$])}},function(p,b){Sk.builtin.method=Sk.abstr.buildNativeClass("method",{constructor:function(e,i){Sk.asserts.assert(this instanceof Sk.builtin.method,"bad call to method constructor, use 'new'"),this.im_func=e,this.im_self=i,this.im_call=e.tp$call},slots:{$r(){let e=this.im_func.tp$getattr(Sk.builtin.str.$qualname)||this.im_func.tp$getattr(Sk.builtin.str.$name);return e=e&&e.v||"?",new Sk.builtin.str("")},tp$hash(){let e=Sk.abstr.objectHash(this.im_self),i=Sk.abstr.objectHash(this.im_func);return e+i},tp$call(e,i){var n=this.im_call;if(n===void 0)throw new Sk.builtin.TypeError("'"+Sk.abstr.typeName(this.im_func)+"' object is not callable");return e=[this.im_self,...e],n.call(this.im_func,e,i)},tp$new(e,i){if(Sk.abstr.checkNoKwargs("method",i),Sk.abstr.checkArgsLen("method",e,2,2),i=e[0],e=e[1],!Sk.builtin.checkCallable(i))throw new Sk.builtin.TypeError("first argument must be callable");if(Sk.builtin.checkNone(e))throw new Sk.builtin.TypeError("self must not be None");return new Sk.builtin.method(i,e)},tp$richcompare(e,i){if(i!="Eq"&&i!="NotEq"||!(e instanceof Sk.builtin.method))return Sk.builtin.NotImplemented.NotImplemented$;let n;try{n=Sk.misceval.richCompareBool(this.im_self,e.im_self,"Eq",!1)&&this.im_func===e.im_func}catch{n=!1}return i=="Eq"?n:!n},tp$descr_get(e,i){return this},tp$getattr(e,i){let n=Sk.abstr.lookupSpecial(this,e);return n!==void 0?n:this.im_func.tp$getattr(e,i)}},getsets:{__func__:{$get(){return this.im_func}},__self__:{$get(){return this.im_self}},__doc__:{$get(){return this.im_func.tp$getattr(Sk.builtin.str.$doc)}}},flags:{sk$unacceptableBase:!0}})},function(p,b){function e(h){if(h!=null){if(h.sk$int===!0)return h.v;if(h.nb$index!==void 0)return h.nb$index();if(typeof h=="number"&&Number.isInteger(h))return h}}function i(h,a){let S=e(h);if(S!==void 0)return S;throw a=(a||"'{tp$name}' object cannot be interpreted as an integer").replace("{tp$name}",Sk.abstr.typeName(h)),new Sk.builtin.TypeError(a)}function n(){let h=(Sk.global.navigator||{}).userAgent||"";return-1{if(t=t.ob$type,!S.$isSubType(t))if(t.$isSubType(S))S=t;else throw new Sk.builtin.TypeError("metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases")}),S}function l(h,a,S,t,s){let c=h.tp$getattr(Sk.builtin.str.$prepare),o,d=null;if(c===void 0)return[d,o];if(d=Sk.misceval.callsimArray(c,[a,S],t),!Sk.builtin.checkMapping(d))throw new Sk.builtin.TypeError(s?h.prototype.tp$name:".__prepare__() must return a mapping not '"+Sk.abstr.typeName(d)+"'");return o={get(u,f){try{return Sk.abstr.objectGetItem(u,new Sk.builtin.str(Sk.unfixReserved(f)))}catch($){if(!($ instanceof Sk.builtin.KeyError))throw $}},set(u,f,$){return Sk.abstr.objectSetItem(u,new Sk.builtin.str(Sk.unfixReserved(f)),$),!0}},[d,o]}Sk.misceval={},Sk.misceval.Suspension=function(h,a,S){this.$isSuspension=!0,h!==void 0&&a!==void 0&&(this.resume=function(){return h(a.resume())}),this.child=a,this.optional=a!==void 0&&a.optional,this.data=S===void 0&&a!==void 0?a.data:S},Sk.exportSymbol("Sk.misceval.Suspension",Sk.misceval.Suspension),Sk.misceval.retryOptionalSuspensionOrThrow=function(h,a){for(;h instanceof Sk.misceval.Suspension;){if(!h.optional){a=new Sk.builtin.SuspensionError(a||"Cannot call a function that blocks or suspends here");let S=[];for(;h!=null;)h.$lineno&&S.push({filename:h.$filename,lineno:h.$lineno,colno:h.$colno}),h=h.child;throw S.reverse(),a.traceback.push(...S),a}h=h.resume()}return h},Sk.exportSymbol("Sk.misceval.retryOptionalSuspensionOrThrow",Sk.misceval.retryOptionalSuspensionOrThrow),Sk.misceval.isIndex=function(h){return h!=null&&(h.nb$index!==void 0||typeof h=="number"&&Number.isInteger(h))},Sk.exportSymbol("Sk.misceval.isIndex",Sk.misceval.isIndex),Sk.misceval.asIndex=e,Sk.misceval.asIndexSized=function(h,a,S){if(S=i(h,S),typeof S=="number")return S;if(a==null)return JSBI.lessThan(S,JSBI.__ZERO)?-Number.MAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER;throw new a("cannot fit '"+Sk.abstr.typeName(h)+"' into an index-sized integer")},Sk.misceval.asIndexOrThrow=i,Sk.misceval.applySlice=function(h,a,S,t){return Sk.abstr.objectGetItem(h,new Sk.builtin.slice(a,S,null),t)},Sk.exportSymbol("Sk.misceval.applySlice",Sk.misceval.applySlice),Sk.misceval.assignSlice=function(h,a,S,t,s){return a=new Sk.builtin.slice(a,S),t===null?Sk.abstr.objectDelItem(h,a):Sk.abstr.objectSetItem(h,a,t,s)},Sk.exportSymbol("Sk.misceval.assignSlice",Sk.misceval.assignSlice),Sk.misceval.arrayFromArguments=function(h){var a;if(h.length!=1)return h;var S=h[0];if(S instanceof Sk.builtin.set?S=S.tp$iter().$obj:S instanceof Sk.builtin.dict&&(S=Sk.builtin.dict.prototype.keys.func_code(S)),S instanceof Sk.builtin.list||S instanceof Sk.builtin.tuple)return S.v;if(Sk.builtin.checkIterable(S)){for(h=[],S=Sk.abstr.iter(S),a=S.tp$iternext();a!==void 0;a=S.tp$iternext())h.push(a);return h}throw new Sk.builtin.TypeError("'"+Sk.abstr.typeName(S)+"' object is not iterable")},Sk.exportSymbol("Sk.misceval.arrayFromArguments",Sk.misceval.arrayFromArguments),Sk.misceval.iterator=Sk.abstr.buildIteratorClass("iterator",{constructor:function(h,a){this.tp$iternext=a?h:function(S){let t=h();return S||t===void 0||!t.$isSuspension?t:Sk.misceval.retryOptionalSuspensionOrThrow(t)}},iternext:function(h){return this.tp$iternext(h)},flags:{sk$unacceptableBase:!0}}),Sk.misceval.swappedOp_={Eq:"Eq",NotEq:"NotEq",Lt:"Gt",LtE:"GtE",Gt:"Lt",GtE:"LtE"},Sk.misceval.opSymbols={Eq:"==",NotEq:"!=",Lt:"<",LtE:"<=",Gt:">",GtE:">=",Is:"is",IsNot:"is not",In_:"in",NotIn:"not in"},Sk.misceval.richCompareBool=function(h,a,S,t){Sk.asserts.assert(h.sk$object&&a.sk$object,"JS object passed to richCompareBool");var s=h.ob$type,c=a.ob$type,o=c!==s&&c.sk$baseClass===void 0&&c.$isSubType(s);if(!Sk.__future__.python3&&s!==c&&(S==="GtE"||S==="Gt"||S==="LtE"||S==="Lt")){var d=[Sk.builtin.float_,Sk.builtin.int_,Sk.builtin.lng,Sk.builtin.bool];let f=[Sk.builtin.dict,Sk.builtin.enumerate,Sk.builtin.filter_,Sk.builtin.list,Sk.builtin.map_,Sk.builtin.str,Sk.builtin.tuple,Sk.builtin.zip_];var u=d.indexOf(s);if(s=f.indexOf(s),d=d.indexOf(c),c=f.indexOf(c),h===Sk.builtin.none.none$)switch(S){case"Lt":return!0;case"LtE":return!0;case"Gt":return!1;case"GtE":return!1}if(a===Sk.builtin.none.none$)switch(S){case"Lt":return!1;case"LtE":return!1;case"Gt":return!0;case"GtE":return!0}if(u!==-1&&c!==-1)switch(S){case"Lt":return!0;case"LtE":return!0;case"Gt":return!1;case"GtE":return!1}if(s!==-1&&d!==-1)switch(S){case"Lt":return!1;case"LtE":return!1;case"Gt":return!0;case"GtE":return!0}if(s!==-1&&c!==-1)switch(S){case"Lt":return sc;case"GtE":return s>=c}}if(S==="Is")return h===a;if(S==="IsNot")return h!==a;if(S==="In")return Sk.misceval.chain(Sk.abstr.sequenceContains(a,h,t),Sk.misceval.isTrue);if(S==="NotIn")return Sk.misceval.chain(Sk.abstr.sequenceContains(a,h,t),function(f){return!Sk.misceval.isTrue(f)});if(c={Eq:"ob$eq",NotEq:"ob$ne",Gt:"ob$gt",GtE:"ob$ge",Lt:"ob$lt",LtE:"ob$le"},u=c[S],o&&(t=c[Sk.misceval.swappedOp_[S]],(t=a[t](h))!==Sk.builtin.NotImplemented.NotImplemented$)||(t=h[u](a))!==Sk.builtin.NotImplemented.NotImplemented$||!o&&(t=c[Sk.misceval.swappedOp_[S]],(t=a[t](h))!==Sk.builtin.NotImplemented.NotImplemented$))return Sk.misceval.isTrue(t);if(!Sk.__future__.python3){if(o=Sk.abstr.lookupSpecial(h,Sk.builtin.str.$cmp))try{if(t=Sk.misceval.callsimArray(o,[a]),Sk.builtin.checkNumber(t)){if(t=Sk.builtin.asnum$(t),S==="Eq")return t===0;if(S==="NotEq")return t!==0;if(S==="Lt")return 0>t;if(S==="Gt")return 0=t;if(S==="GtE")return 0<=t}if(t!==Sk.builtin.NotImplemented.NotImplemented$)throw new Sk.builtin.TypeError("comparison did not return an int")}catch{throw new Sk.builtin.TypeError("comparison did not return an int")}if(o=Sk.abstr.lookupSpecial(a,Sk.builtin.str.$cmp))try{if(t=Sk.misceval.callsimArray(o,[h]),Sk.builtin.checkNumber(t)){if(t=Sk.builtin.asnum$(t),S==="Eq")return t===0;if(S==="NotEq")return t!==0;if(S==="Lt")return 0t;if(S==="LtE")return 0<=t;if(S==="GtE")return 0>=t}if(t!==Sk.builtin.NotImplemented.NotImplemented$)throw new Sk.builtin.TypeError("comparison did not return an int")}catch{throw new Sk.builtin.TypeError("comparison did not return an int")}if(h===Sk.builtin.none.none$&&a===Sk.builtin.none.none$){if(S==="Eq")return h.v===a.v;if(S==="NotEq")return h.v!==a.v;if(S==="Gt")return h.v>a.v;if(S==="GtE")return h.v>=a.v;if(S==="Lt")return h.v";throw a}},Sk.exportSymbol("Sk.misceval.objectRepr",Sk.misceval.objectRepr),Sk.misceval.opAllowsEquality=function(h){switch(h){case"LtE":case"Eq":case"GtE":return!0}return!1},Sk.exportSymbol("Sk.misceval.opAllowsEquality",Sk.misceval.opAllowsEquality),Sk.misceval.isTrue=function(h){return h===!0||h===Sk.builtin.bool.true$?!0:h===!1||h===Sk.builtin.bool.false$||h===null||h===void 0?!1:h.nb$bool?h.nb$bool():h.sq$length?h.sq$length()!==0:!!h},Sk.exportSymbol("Sk.misceval.isTrue",Sk.misceval.isTrue),Sk.misceval.softspace_=!1,Sk.misceval.print_=function(h){Sk.misceval.softspace_&&(h!==` `&&Sk.output(" "),Sk.misceval.softspace_=!1);var a=new Sk.builtin.str(h);return Sk.misceval.chain(Sk.importModule("sys",!1,!0),function(S){return Sk.misceval.apply(S.$d.stdout.write,void 0,void 0,void 0,[S.$d.stdout,a])},function(){var S;(S=a.v.length===0)||(S=a.v[a.v.length-1],S=!(S===` -`||S===" "||S==="\r")),(S||a.v[a.v.length-1]===" ")&&(Sk.misceval.softspace_=!0)})},Sk.exportSymbol("Sk.misceval.print_",Sk.misceval.print_),Sk.misceval.loadname=function(h,a){if(a=a[h],a!==void 0||(a=Sk.builtins[h],a!==void 0))return a;throw new Sk.builtin.NameError("name '"+Sk.unfixReserved(h)+"' is not defined")},Sk.exportSymbol("Sk.misceval.loadname",Sk.misceval.loadname),Sk.misceval.call=function(h,a,S,t,s){return s=Array.prototype.slice.call(arguments,4),Sk.misceval.apply(h,a,S,t,s)},Sk.exportSymbol("Sk.misceval.call",Sk.misceval.call),Sk.misceval.callAsync=function(h,a,S,t,s,c){return c=Array.prototype.slice.call(arguments,5),Sk.misceval.applyAsync(h,a,S,t,s,c)},Sk.exportSymbol("Sk.misceval.callAsync",Sk.misceval.callAsync),Sk.misceval.callOrSuspend=function(h,a,S,t,s){return s=Array.prototype.slice.call(arguments,4),Sk.misceval.applyOrSuspend(h,a,S,t,s)},Sk.exportSymbol("Sk.misceval.callOrSuspend",Sk.misceval.callOrSuspend),Sk.misceval.callsim=function(h,a){return a=Array.prototype.slice.call(arguments,1),Sk.misceval.apply(h,void 0,void 0,void 0,a)},Sk.exportSymbol("Sk.misceval.callsim",Sk.misceval.callsim),Sk.misceval.callsimArray=function(h,a,S){return a=a||[],Sk.misceval.retryOptionalSuspensionOrThrow(Sk.misceval.callsimOrSuspendArray(h,a,S))},Sk.exportSymbol("Sk.misceval.callsimArray",Sk.misceval.callsimArray),Sk.misceval.callsimAsync=function(h,a,S){return S=Array.prototype.slice.call(arguments,2),Sk.misceval.applyAsync(h,a,void 0,void 0,void 0,S)},Sk.exportSymbol("Sk.misceval.callsimAsync",Sk.misceval.callsimAsync),Sk.misceval.callsimOrSuspend=function(h,a){return a=Array.prototype.slice.call(arguments,1),Sk.misceval.applyOrSuspend(h,void 0,void 0,void 0,a)},Sk.exportSymbol("Sk.misceval.callsimOrSuspend",Sk.misceval.callsimOrSuspend),Sk.misceval.callsimOrSuspendArray=function(h,a,S){return a=a||[],h!==void 0&&h.tp$call?h.tp$call(a,S):Sk.misceval.applyOrSuspend(h,void 0,void 0,S,a)},Sk.exportSymbol("Sk.misceval.callsimOrSuspendArray",Sk.misceval.callsimOrSuspendArray),Sk.misceval.apply=function(h,a,S,t,s){return h=Sk.misceval.applyOrSuspend(h,a,S,t,s),h instanceof Sk.misceval.Suspension?Sk.misceval.retryOptionalSuspensionOrThrow(h):h},Sk.exportSymbol("Sk.misceval.apply",Sk.misceval.apply),Sk.misceval.asyncToPromise=function(h,a){return new Promise(function(S,t){try{(function s(c){try{for(var o=function(){try{s(c.resume())}catch(m){t(m)}},d=function(m){try{c.data.result=m,o()}catch(_){t(_)}},u=function(m){try{c.data.error=m,o()}catch(_){t(_)}};c instanceof Sk.misceval.Suspension;){var f=a&&(a[c.data.type]||a["*"]);if(f){var $=f(c);if($){$.then(s,t);return}}if(c.data.type=="Sk.promise"){c.data.promise.then(d,u);return}if(c.data.type=="Sk.yield"){Sk.global.setImmediate(o);return}if(c.data.type=="Sk.delay"){Sk.global.setImmediate(o);return}if(c.optional)c=c.resume();else throw new Sk.builtin.SuspensionError("Unhandled non-optional suspension of type '"+c.data.type+"'")}S(c)}catch(m){t(m)}})(h())}catch(s){t(s)}})},Sk.exportSymbol("Sk.misceval.asyncToPromise",Sk.misceval.asyncToPromise),Sk.misceval.applyAsync=function(h,a,S,t,s,c){return Sk.misceval.asyncToPromise(function(){return Sk.misceval.applyOrSuspend(a,S,t,s,c)},h)},Sk.exportSymbol("Sk.misceval.applyAsync",Sk.misceval.applyAsync),Sk.misceval.chain=function(h,a){for(var S=1,t=h,s,c;;){if(S==arguments.length)return t;if(t&&t.$isSuspension)break;t=arguments[S](t),S++}for(c=Array(arguments.length-S),s=0;sh[t++]},a,S)},Sk.misceval.arrayFromIterable=function(h,a){if(h===void 0)return[];if(h.ht$type===void 0&&h.sk$asarray!==void 0)return h.sk$asarray();let S=[];return h=Sk.misceval.chain(Sk.misceval.iterFor(Sk.abstr.iter(h),t=>{S.push(t)}),()=>S),a?h:Sk.misceval.retryOptionalSuspensionOrThrow(h)},Sk.misceval.Break=function(h){if(!(this instanceof Sk.misceval.Break))return new Sk.misceval.Break(h);this.brValue=h},Sk.exportSymbol("Sk.misceval.Break",Sk.misceval.Break),Sk.misceval.applyOrSuspend=function(h,a,S,t,s){var c;if(h==null||h===Sk.builtin.none.none$)throw new Sk.builtin.TypeError("'"+Sk.abstr.typeName(h)+"' object is not callable");typeof h=="function"&&h.tp$call===void 0&&(h=new Sk.builtin.func(h));var o=h.tp$call;if(o!==void 0){if(S)for(S=S.tp$iter(),c=S.tp$iternext();c!==void 0;c=S.tp$iternext())s.push(c);if(a)for(S=Sk.abstr.iter(a),c=S.tp$iternext();c!==void 0;c=S.tp$iternext()){if(!Sk.builtin.checkString(c))throw new Sk.builtin.TypeError("Function keywords must be strings");t.push(c.v),t.push(Sk.abstr.objectGetItem(a,c,!1))}return o.call(h,s,t,a)}if(o=h.__call__,o!==void 0)return s.unshift(h),Sk.misceval.apply(o,a,S,t,s);throw new Sk.builtin.TypeError("'"+Sk.abstr.typeName(h)+"' object is not callable")},Sk.exportSymbol("Sk.misceval.applyOrSuspend",Sk.misceval.applyOrSuspend),Sk.misceval.promiseToSuspension=function(h){var a=new Sk.misceval.Suspension;return a.resume=function(){if(a.data.error)throw a.data.error;return a.data.result},a.data={type:"Sk.promise",promise:h},a},Sk.exportSymbol("Sk.misceval.promiseToSuspension",Sk.misceval.promiseToSuspension),Sk.misceval.buildClass=function(h,a,S,t,s,c){S=new Sk.builtin.str(S);let o=new Sk.builtin.tuple(t);c=c||[],t=t||[];let d;var u=!0;let f=c.indexOf("metaclass");-1{Sk.abstr.objectSetItem($,new Sk.builtin.str(v),m[v])}),Sk.misceval.callsimOrSuspendArray(d,[S,o,$],c)},Sk.exportSymbol("Sk.misceval.buildClass",Sk.misceval.buildClass)},function(p,g){Sk.builtin.callable_iter_=Sk.abstr.buildIteratorClass("callable_iterator",{constructor:function(e,i){if(!Sk.builtin.checkCallable(e))throw new Sk.builtin.TypeError("iter(v, w): v must be callable");this.$callable=e,this.$sentinel=i,this.$flag=!1},iternext(e){if(this.$flag!==!0){if(e)return e=Sk.misceval.callsimOrSuspendArray(this.$callable,[]),Sk.misceval.chain(e,i=>{if(Sk.misceval.richCompareBool(i,this.$sentinel,"Eq",!0))this.$flag=!0;else return i});if(e=Sk.misceval.callsimArray(this.$callable,[]),Sk.misceval.richCompareBool(e,this.$sentinel,"Eq",!1))this.$flag=!0;else return e}},flags:{sk$unacceptableBase:!0}}),Sk.builtin.seq_iter_=Sk.abstr.buildIteratorClass("iterator",{constructor:function(e){this.$index=0,this.$seq=e},iternext(e){let i;return i=Sk.misceval.tryCatch(()=>this.$seq.mp$subscript(new Sk.builtin.int_(this.$index++),e),n=>{if(n instanceof Sk.builtin.IndexError||n instanceof Sk.builtin.StopIteration)this.gi$ret=n.$value||Sk.builtin.none.none$;else throw n}),e?i:Sk.misceval.retryOptionalSuspensionOrThrow(i)},methods:{__length_hint__:{$flags:{NoArgs:!0},$meth(){if(this.$seq.sq$length)return this.$seq.sq$length()-this.$index;throw new Sk.builtin.NotImplementedError("len is not implemented for "+Sk.abstr.typeName(this.$seq))}}},flags:{sk$unacceptableBase:!0}}),Sk.exportSymbol("Sk.builtin.callable_iter_",Sk.builtin.callable_iter_)},function(p,g){Sk.builtin.list=Sk.abstr.buildNativeClass("list",{constructor:function(n){n===void 0?n=[]:Array.isArray(n)||(n=Sk.misceval.arrayFromIterable(n)),Sk.asserts.assert(this instanceof Sk.builtin.list,"bad call to list, use 'new' with an Array of python objects"),this.v=n,this.in$repr=!1},slots:{tp$getattr:Sk.generic.getAttr,tp$as_sequence_or_mapping:!0,tp$hash:Sk.builtin.none.none$,tp$doc:`Built-in mutable sequence. +`||S===" "||S==="\r")),(S||a.v[a.v.length-1]===" ")&&(Sk.misceval.softspace_=!0)})},Sk.exportSymbol("Sk.misceval.print_",Sk.misceval.print_),Sk.misceval.loadname=function(h,a){if(a=a[h],a!==void 0||(a=Sk.builtins[h],a!==void 0))return a;throw new Sk.builtin.NameError("name '"+Sk.unfixReserved(h)+"' is not defined")},Sk.exportSymbol("Sk.misceval.loadname",Sk.misceval.loadname),Sk.misceval.call=function(h,a,S,t,s){return s=Array.prototype.slice.call(arguments,4),Sk.misceval.apply(h,a,S,t,s)},Sk.exportSymbol("Sk.misceval.call",Sk.misceval.call),Sk.misceval.callAsync=function(h,a,S,t,s,c){return c=Array.prototype.slice.call(arguments,5),Sk.misceval.applyAsync(h,a,S,t,s,c)},Sk.exportSymbol("Sk.misceval.callAsync",Sk.misceval.callAsync),Sk.misceval.callOrSuspend=function(h,a,S,t,s){return s=Array.prototype.slice.call(arguments,4),Sk.misceval.applyOrSuspend(h,a,S,t,s)},Sk.exportSymbol("Sk.misceval.callOrSuspend",Sk.misceval.callOrSuspend),Sk.misceval.callsim=function(h,a){return a=Array.prototype.slice.call(arguments,1),Sk.misceval.apply(h,void 0,void 0,void 0,a)},Sk.exportSymbol("Sk.misceval.callsim",Sk.misceval.callsim),Sk.misceval.callsimArray=function(h,a,S){return a=a||[],Sk.misceval.retryOptionalSuspensionOrThrow(Sk.misceval.callsimOrSuspendArray(h,a,S))},Sk.exportSymbol("Sk.misceval.callsimArray",Sk.misceval.callsimArray),Sk.misceval.callsimAsync=function(h,a,S){return S=Array.prototype.slice.call(arguments,2),Sk.misceval.applyAsync(h,a,void 0,void 0,void 0,S)},Sk.exportSymbol("Sk.misceval.callsimAsync",Sk.misceval.callsimAsync),Sk.misceval.callsimOrSuspend=function(h,a){return a=Array.prototype.slice.call(arguments,1),Sk.misceval.applyOrSuspend(h,void 0,void 0,void 0,a)},Sk.exportSymbol("Sk.misceval.callsimOrSuspend",Sk.misceval.callsimOrSuspend),Sk.misceval.callsimOrSuspendArray=function(h,a,S){return a=a||[],h!==void 0&&h.tp$call?h.tp$call(a,S):Sk.misceval.applyOrSuspend(h,void 0,void 0,S,a)},Sk.exportSymbol("Sk.misceval.callsimOrSuspendArray",Sk.misceval.callsimOrSuspendArray),Sk.misceval.apply=function(h,a,S,t,s){return h=Sk.misceval.applyOrSuspend(h,a,S,t,s),h instanceof Sk.misceval.Suspension?Sk.misceval.retryOptionalSuspensionOrThrow(h):h},Sk.exportSymbol("Sk.misceval.apply",Sk.misceval.apply),Sk.misceval.asyncToPromise=function(h,a){return new Promise(function(S,t){try{(function s(c){try{for(var o=function(){try{s(c.resume())}catch(m){t(m)}},d=function(m){try{c.data.result=m,o()}catch(_){t(_)}},u=function(m){try{c.data.error=m,o()}catch(_){t(_)}};c instanceof Sk.misceval.Suspension;){var f=a&&(a[c.data.type]||a["*"]);if(f){var $=f(c);if($){$.then(s,t);return}}if(c.data.type=="Sk.promise"){c.data.promise.then(d,u);return}if(c.data.type=="Sk.yield"){Sk.global.setImmediate(o);return}if(c.data.type=="Sk.delay"){Sk.global.setImmediate(o);return}if(c.optional)c=c.resume();else throw new Sk.builtin.SuspensionError("Unhandled non-optional suspension of type '"+c.data.type+"'")}S(c)}catch(m){t(m)}})(h())}catch(s){t(s)}})},Sk.exportSymbol("Sk.misceval.asyncToPromise",Sk.misceval.asyncToPromise),Sk.misceval.applyAsync=function(h,a,S,t,s,c){return Sk.misceval.asyncToPromise(function(){return Sk.misceval.applyOrSuspend(a,S,t,s,c)},h)},Sk.exportSymbol("Sk.misceval.applyAsync",Sk.misceval.applyAsync),Sk.misceval.chain=function(h,a){for(var S=1,t=h,s,c;;){if(S==arguments.length)return t;if(t&&t.$isSuspension)break;t=arguments[S](t),S++}for(c=Array(arguments.length-S),s=0;sh[t++]},a,S)},Sk.misceval.arrayFromIterable=function(h,a){if(h===void 0)return[];if(h.ht$type===void 0&&h.sk$asarray!==void 0)return h.sk$asarray();let S=[];return h=Sk.misceval.chain(Sk.misceval.iterFor(Sk.abstr.iter(h),t=>{S.push(t)}),()=>S),a?h:Sk.misceval.retryOptionalSuspensionOrThrow(h)},Sk.misceval.Break=function(h){if(!(this instanceof Sk.misceval.Break))return new Sk.misceval.Break(h);this.brValue=h},Sk.exportSymbol("Sk.misceval.Break",Sk.misceval.Break),Sk.misceval.applyOrSuspend=function(h,a,S,t,s){var c;if(h==null||h===Sk.builtin.none.none$)throw new Sk.builtin.TypeError("'"+Sk.abstr.typeName(h)+"' object is not callable");typeof h=="function"&&h.tp$call===void 0&&(h=new Sk.builtin.func(h));var o=h.tp$call;if(o!==void 0){if(S)for(S=S.tp$iter(),c=S.tp$iternext();c!==void 0;c=S.tp$iternext())s.push(c);if(a)for(S=Sk.abstr.iter(a),c=S.tp$iternext();c!==void 0;c=S.tp$iternext()){if(!Sk.builtin.checkString(c))throw new Sk.builtin.TypeError("Function keywords must be strings");t.push(c.v),t.push(Sk.abstr.objectGetItem(a,c,!1))}return o.call(h,s,t,a)}if(o=h.__call__,o!==void 0)return s.unshift(h),Sk.misceval.apply(o,a,S,t,s);throw new Sk.builtin.TypeError("'"+Sk.abstr.typeName(h)+"' object is not callable")},Sk.exportSymbol("Sk.misceval.applyOrSuspend",Sk.misceval.applyOrSuspend),Sk.misceval.promiseToSuspension=function(h){var a=new Sk.misceval.Suspension;return a.resume=function(){if(a.data.error)throw a.data.error;return a.data.result},a.data={type:"Sk.promise",promise:h},a},Sk.exportSymbol("Sk.misceval.promiseToSuspension",Sk.misceval.promiseToSuspension),Sk.misceval.buildClass=function(h,a,S,t,s,c){S=new Sk.builtin.str(S);let o=new Sk.builtin.tuple(t);c=c||[],t=t||[];let d;var u=!0;let f=c.indexOf("metaclass");-1{Sk.abstr.objectSetItem($,new Sk.builtin.str(v),m[v])}),Sk.misceval.callsimOrSuspendArray(d,[S,o,$],c)},Sk.exportSymbol("Sk.misceval.buildClass",Sk.misceval.buildClass)},function(p,b){Sk.builtin.callable_iter_=Sk.abstr.buildIteratorClass("callable_iterator",{constructor:function(e,i){if(!Sk.builtin.checkCallable(e))throw new Sk.builtin.TypeError("iter(v, w): v must be callable");this.$callable=e,this.$sentinel=i,this.$flag=!1},iternext(e){if(this.$flag!==!0){if(e)return e=Sk.misceval.callsimOrSuspendArray(this.$callable,[]),Sk.misceval.chain(e,i=>{if(Sk.misceval.richCompareBool(i,this.$sentinel,"Eq",!0))this.$flag=!0;else return i});if(e=Sk.misceval.callsimArray(this.$callable,[]),Sk.misceval.richCompareBool(e,this.$sentinel,"Eq",!1))this.$flag=!0;else return e}},flags:{sk$unacceptableBase:!0}}),Sk.builtin.seq_iter_=Sk.abstr.buildIteratorClass("iterator",{constructor:function(e){this.$index=0,this.$seq=e},iternext(e){let i;return i=Sk.misceval.tryCatch(()=>this.$seq.mp$subscript(new Sk.builtin.int_(this.$index++),e),n=>{if(n instanceof Sk.builtin.IndexError||n instanceof Sk.builtin.StopIteration)this.gi$ret=n.$value||Sk.builtin.none.none$;else throw n}),e?i:Sk.misceval.retryOptionalSuspensionOrThrow(i)},methods:{__length_hint__:{$flags:{NoArgs:!0},$meth(){if(this.$seq.sq$length)return this.$seq.sq$length()-this.$index;throw new Sk.builtin.NotImplementedError("len is not implemented for "+Sk.abstr.typeName(this.$seq))}}},flags:{sk$unacceptableBase:!0}}),Sk.exportSymbol("Sk.builtin.callable_iter_",Sk.builtin.callable_iter_)},function(p,b){Sk.builtin.list=Sk.abstr.buildNativeClass("list",{constructor:function(n){n===void 0?n=[]:Array.isArray(n)||(n=Sk.misceval.arrayFromIterable(n)),Sk.asserts.assert(this instanceof Sk.builtin.list,"bad call to list, use 'new' with an Array of python objects"),this.v=n,this.in$repr=!1},slots:{tp$getattr:Sk.generic.getAttr,tp$as_sequence_or_mapping:!0,tp$hash:Sk.builtin.none.none$,tp$doc:`Built-in mutable sequence. If no argument is given, the constructor creates a new empty list. The argument must be an iterable if specified.`,tp$new:Sk.generic.new,tp$init(n,r){return Sk.abstr.checkNoKwargs("list",r),Sk.abstr.checkArgsLen("list",n,0,1),Sk.misceval.chain(Sk.misceval.arrayFromIterable(n[0],!0),l=>{this.v=l})},$r(){if(this.in$repr)return new Sk.builtin.str("[...]");this.in$repr=!0;let n=this.v.map(r=>Sk.misceval.objectRepr(r));return this.in$repr=!1,new Sk.builtin.str("["+n.join(", ")+"]")},tp$richcompare:Sk.generic.seqCompare,tp$iter(){return new e(this)},sq$length(){return this.v.length},sq$concat(n){if(!(n instanceof Sk.builtin.list))throw new Sk.builtin.TypeError("can only concatenate list to list");return new Sk.builtin.list(this.v.concat(n.v))},sq$contains(n){for(let r=this.tp$iter(),l=r.tp$iternext();l!==void 0;l=r.tp$iternext())if(l===n||Sk.misceval.richCompareBool(l,n,"Eq"))return!0;return!1},sq$repeat(n){if(!Sk.misceval.isIndex(n))throw new Sk.builtin.TypeError("can't multiply sequence by non-int of type '"+Sk.abstr.typeName(n)+"'");if(n=Sk.misceval.asIndexSized(n,Sk.builtin.OverflowError),n*this.v.length>Number.MAX_SAFE_INTEGER)throw new Sk.builtin.OverflowError;let r=[];for(let l=0;l{r.push(this.v[l])}),new Sk.builtin.list(r)}throw new Sk.builtin.TypeError("list indices must be integers or slices, not "+Sk.abstr.typeName(n))},mp$ass_subscript(n,r){r===void 0?this.del$subscript(n):this.ass$subscript(n,r)},sq$inplace_concat(n){return n===this?(this.v.push(...this.v),this):Sk.misceval.chain(Sk.misceval.iterFor(Sk.abstr.iter(n),r=>{this.v.push(r)}),()=>this)},sq$inplace_repeat(n){if(!Sk.misceval.isIndex(n))throw new Sk.builtin.TypeError("can't multiply sequence by non-int of type '"+Sk.abstr.typeName(n)+"'");n=Sk.misceval.asIndexSized(n,Sk.builtin.OverflowError);let r=this.v.length;if(0>=n)this.v.length=0;else if(n*r>Number.MAX_SAFE_INTEGER)throw new Sk.builtin.OverflowError;for(let l=1;l{this.v.push(r)}),()=>Sk.builtin.none.none$)},$flags:{OneArg:!0},$textsig:"($self, iterable, /)",$doc:"Extend list by appending elements from the iterable."},pop:{$meth(n){n=n===void 0?this.v.length-1:Sk.misceval.asIndexSized(n,Sk.builtin.OverflowError),n=this.list$inRange(n,"pop index out of range");let r=this.v[n];return this.v.splice(n,1),r},$flags:{MinArgs:0,MaxArgs:1},$textsig:"($self, index=-1, /)",$doc:`Remove and return item at index (default last). @@ -173,7 +173,7 @@ Raises IndexError if list is empty or index is out of range.`},remove:{$meth(n){ Raises ValueError if the value is not present.`},sort:{$meth(n,r){if(n.length)throw new Sk.builtin.TypeError("sort() takes no positional arguments");let[l,h]=Sk.abstr.copyKeywordsToNamedArgs("sort",["key","reverse"],n,r,[Sk.builtin.none.none$,Sk.builtin.bool.false$]);return this.list$sort(void 0,l,h)},$flags:{FastCall:!0},$textsig:"($self, /, *, key=None, reverse=False)",$doc:"Stable sort *IN PLACE*."},index:{$meth(n,r,l){if(r!==void 0&&!Sk.misceval.isIndex(r)||l!==void 0&&!Sk.misceval.isIndex(l))throw new Sk.builtin.TypeError("slice indices must be integers or have an __index__ method");if(r=this.list$indexOf(n,r,l),r===-1)throw new Sk.builtin.ValueError(Sk.misceval.objectRepr(n)+" is not in list");return new Sk.builtin.int_(r)},$flags:{MinArgs:1,MaxArgs:3},$textsig:"($self, value, start=0, stop=sys.maxsize, /)",$doc:`Return first index of value. -Raises ValueError if the value is not present.`},count:{$meth(n){let r=0,l=this.v.length;for(let h=0;hn&&(n+=this.v.length),0<=n&&n{l.push(h)}),!Sk.builtin.checkIterable(r))throw new Sk.builtin.TypeError("must assign iterable to extended slice");if(n=Sk.misceval.arrayFromIterable(r),l.length!==n.length)throw new Sk.builtin.ValueError("attempt to assign sequence of size "+n.length+" to extended slice of size "+l.length);for(r=0;r{this.v.splice(h-l,1),l+=r})},valueOf(){return this.v}}}),Sk.exportSymbol("Sk.builtin.list",Sk.builtin.list),Sk.builtin.list.py2$methods={sort:{$name:"sort",$meth(n,r){let[l,h,a]=Sk.abstr.copyKeywordsToNamedArgs("sort",["cmp","key","reverse"],n,r,[Sk.builtin.none.none$,Sk.builtin.none.none$,Sk.builtin.bool.false$]);return this.list$sort(l,h,a)},$flags:{FastCall:!0},$textsig:"($self, cmp=None, key=None, reverse=False)",$doc:"Stable sort *IN PLACE*."}};var e=Sk.abstr.buildIteratorClass("list_iterator",{constructor:function(n){this.$index=0,this.$seq=n.v},iternext:Sk.generic.iterNextWithArray,methods:{__length_hint__:Sk.generic.iterLengthHintWithArrayMethodDef},flags:{sk$unacceptableBase:!0}}),i=Sk.abstr.buildIteratorClass("list_reverseiterator",{constructor:function(n){this.$index=n.v.length-1,this.$seq=n.v},iternext(){let n=this.$seq[this.$index--];if(n===void 0)this.tp$iternext=()=>{};else return n},methods:{__length_hint__:Sk.generic.iterReverseLengthHintMethodDef},flags:{sk$unacceptableBase:!0}})},function(p,g,e){function i(k){var x=k.replace(M,"").replace(R,"_").toLowerCase();return x=N[x],x===void 0?k:x}function n(k,x,C){if(x===void 0)x="utf-8";else if(Sk.builtin.checkString(x))x=x.$jsstr();else throw new Sk.builtin.TypeError(k+"() argument "+("bytesstr".includes(k)?2:1)+" must be str not "+Sk.abstr.typeName(x));if(C===void 0)C="strict";else if(Sk.builtin.checkString(C))C=C.$jsstr();else throw new Sk.builtin.TypeError(k+"() argument "+("bytesstr".includes(k)?3:2)+" must be str not "+Sk.abstr.typeName(C));return{encoding:x,errors:C}}function r(k){if(k!=="strict"&&k!=="ignore"&&k!=="replace")throw new Sk.builtin.LookupError("Unsupported or invalid error type '"+k+"'")}function l(k,x,C){if(k=k.$jsstr(),x=i(x),r(C),x==="ascii"){x=[];for(F in k){let P=k.charCodeAt(F);if(127=k?"\\x":"\\u";return k=k.toString(16),k.length===3&&(k=k.slice(1,3)),k=k.length===1?x+"0"+k:x+k}function a(k,x,C,F){if(k=k.decode(x),C==="replace")return k;if(C==="strict"){if(C=k.indexOf("\uFFFD"),C===-1)return k;throw new Sk.builtin.UnicodeDecodeError(`'${F}' codec can't decode byte 0x ${x[C].toString(16)} in position ${C}: invalid start byte`)}return k.replace(/\ufffd/g,"")}function S(k,x){if({encoding:k,errors:x}=n("decode",k,x),k=i(k),r(x),k==="ascii"){k=this.v;var C="";for(let F=0;F=C&&xC)return new Sk.builtin.tuple([new Sk.builtin.bytes,new Sk.builtin.bytes,this])}else if(C=this.find$subleft(x,0,this.v.length),0>C)return new Sk.builtin.tuple([this,new Sk.builtin.bytes,new Sk.builtin.bytes]);return new Sk.builtin.tuple([new Sk.builtin.bytes(this.v.subarray(0,C)),new Sk.builtin.bytes(x),new Sk.builtin.bytes(this.v.subarray(C+x.length))])}}function o(k,x){return function(C){var F=C===void 0||C===Sk.builtin.none.none$?new Uint8Array([9,10,11,12,13,32,133]):this.get$raw(C);C=0;var P=this.v.length;if(k)for(;CC&&F.includes(this.v[P-1]);)P--;for(F=new Uint8Array(P-C),P=0;P=k||k===32}function f(k){return 97<=k&&122>=k}function $(k){return 65<=k&&90>=k}function m(k){return 48<=k&&57>=k}function _(k,x){return function(){return this.v.length===0?x?Sk.builtin.bool.true$:Sk.builtin.bool.false$:this.v.every(C=>k(C))?Sk.builtin.bool.true$:Sk.builtin.bool.false$}}function v(k,x){return function(){let C=!1;for(let F=0;F0<=x&&255>=x),"bad internal call to bytes with array"),this.v=new Uint8Array(k);else if(typeof k=="string"){let x,C=new Uint8Array(k.length),F=k.length;for(let P=0;P bytes +Raises ValueError if the value is not present.`},count:{$meth(n){let r=0,l=this.v.length;for(let h=0;hn&&(n+=this.v.length),0<=n&&n{l.push(h)}),!Sk.builtin.checkIterable(r))throw new Sk.builtin.TypeError("must assign iterable to extended slice");if(n=Sk.misceval.arrayFromIterable(r),l.length!==n.length)throw new Sk.builtin.ValueError("attempt to assign sequence of size "+n.length+" to extended slice of size "+l.length);for(r=0;r{this.v.splice(h-l,1),l+=r})},valueOf(){return this.v}}}),Sk.exportSymbol("Sk.builtin.list",Sk.builtin.list),Sk.builtin.list.py2$methods={sort:{$name:"sort",$meth(n,r){let[l,h,a]=Sk.abstr.copyKeywordsToNamedArgs("sort",["cmp","key","reverse"],n,r,[Sk.builtin.none.none$,Sk.builtin.none.none$,Sk.builtin.bool.false$]);return this.list$sort(l,h,a)},$flags:{FastCall:!0},$textsig:"($self, cmp=None, key=None, reverse=False)",$doc:"Stable sort *IN PLACE*."}};var e=Sk.abstr.buildIteratorClass("list_iterator",{constructor:function(n){this.$index=0,this.$seq=n.v},iternext:Sk.generic.iterNextWithArray,methods:{__length_hint__:Sk.generic.iterLengthHintWithArrayMethodDef},flags:{sk$unacceptableBase:!0}}),i=Sk.abstr.buildIteratorClass("list_reverseiterator",{constructor:function(n){this.$index=n.v.length-1,this.$seq=n.v},iternext(){let n=this.$seq[this.$index--];if(n===void 0)this.tp$iternext=()=>{};else return n},methods:{__length_hint__:Sk.generic.iterReverseLengthHintMethodDef},flags:{sk$unacceptableBase:!0}})},function(p,b,e){function i(g){var x=g.replace(M,"").replace(R,"_").toLowerCase();return x=N[x],x===void 0?g:x}function n(g,x,C){if(x===void 0)x="utf-8";else if(Sk.builtin.checkString(x))x=x.$jsstr();else throw new Sk.builtin.TypeError(g+"() argument "+("bytesstr".includes(g)?2:1)+" must be str not "+Sk.abstr.typeName(x));if(C===void 0)C="strict";else if(Sk.builtin.checkString(C))C=C.$jsstr();else throw new Sk.builtin.TypeError(g+"() argument "+("bytesstr".includes(g)?3:2)+" must be str not "+Sk.abstr.typeName(C));return{encoding:x,errors:C}}function r(g){if(g!=="strict"&&g!=="ignore"&&g!=="replace")throw new Sk.builtin.LookupError("Unsupported or invalid error type '"+g+"'")}function l(g,x,C){if(g=g.$jsstr(),x=i(x),r(C),x==="ascii"){x=[];for(F in g){let P=g.charCodeAt(F);if(127=g?"\\x":"\\u";return g=g.toString(16),g.length===3&&(g=g.slice(1,3)),g=g.length===1?x+"0"+g:x+g}function a(g,x,C,F){if(g=g.decode(x),C==="replace")return g;if(C==="strict"){if(C=g.indexOf("\uFFFD"),C===-1)return g;throw new Sk.builtin.UnicodeDecodeError(`'${F}' codec can't decode byte 0x ${x[C].toString(16)} in position ${C}: invalid start byte`)}return g.replace(/\ufffd/g,"")}function S(g,x){if({encoding:g,errors:x}=n("decode",g,x),g=i(g),r(x),g==="ascii"){g=this.v;var C="";for(let F=0;F=C&&xC)return new Sk.builtin.tuple([new Sk.builtin.bytes,new Sk.builtin.bytes,this])}else if(C=this.find$subleft(x,0,this.v.length),0>C)return new Sk.builtin.tuple([this,new Sk.builtin.bytes,new Sk.builtin.bytes]);return new Sk.builtin.tuple([new Sk.builtin.bytes(this.v.subarray(0,C)),new Sk.builtin.bytes(x),new Sk.builtin.bytes(this.v.subarray(C+x.length))])}}function o(g,x){return function(C){var F=C===void 0||C===Sk.builtin.none.none$?new Uint8Array([9,10,11,12,13,32,133]):this.get$raw(C);C=0;var P=this.v.length;if(g)for(;CC&&F.includes(this.v[P-1]);)P--;for(F=new Uint8Array(P-C),P=0;P=g||g===32}function f(g){return 97<=g&&122>=g}function $(g){return 65<=g&&90>=g}function m(g){return 48<=g&&57>=g}function _(g,x){return function(){return this.v.length===0?x?Sk.builtin.bool.true$:Sk.builtin.bool.false$:this.v.every(C=>g(C))?Sk.builtin.bool.true$:Sk.builtin.bool.false$}}function v(g,x){return function(){let C=!1;for(let F=0;F0<=x&&255>=x),"bad internal call to bytes with array"),this.v=new Uint8Array(g);else if(typeof g=="string"){let x,C=new Uint8Array(g.length),F=g.length;for(let P=0;P bytes bytes(string, encoding[, errors]) -> bytes bytes(bytes_or_buffer) -> immutable copy of bytes_or_buffer bytes(int) -> bytes object of size given by the parameter initialized with null bytes @@ -183,13 +183,13 @@ Construct an immutable array of bytes from: - an iterable yielding integers in range(256) - a text string encoded using the specified encoding - any object implementing the buffer API. - - an integer`,tp$new(k,x){if(this!==Sk.builtin.bytes.prototype)return this.$subtype_new(k,x);x=x||[];let C;if(1>=k.length&&+x.length==0)k=k[0];else{if([k,x,C]=Sk.abstr.copyKeywordsToNamedArgs("bytes",[null,"encoding","errors"],k,x),{encoding:x,errors:C}=n("bytes",x,C),!Sk.builtin.checkString(k))throw new Sk.builtin.TypeError("encoding or errors without a string argument");return l(k,x,C)}if(k===void 0)return new Sk.builtin.bytes;if((x=Sk.abstr.lookupSpecial(k,Sk.builtin.str.$bytes))!==void 0)return k=Sk.misceval.callsimOrSuspendArray(x,[]),Sk.misceval.chain(k,F=>{if(!Sk.builtin.checkBytes(F))throw new Sk.builtin.TypeError("__bytes__ returned non-bytes (type "+Sk.abstr.typeName(F)+")");return F});if(Sk.misceval.isIndex(k)){if(k=Sk.misceval.asIndexSized(k,Sk.builtin.OverflowError),0>k)throw new Sk.builtin.ValueError("negative count");return new Sk.builtin.bytes(k)}if(Sk.builtin.checkBytes(k))return new Sk.builtin.bytes(k.v);if(Sk.builtin.checkString(k))throw new Sk.builtin.TypeError("string argument without an encoding");if(Sk.builtin.checkIterable(k)){let F=[];return k=Sk.misceval.iterFor(Sk.abstr.iter(k),P=>{if(P=Sk.misceval.asIndexSized(P),0>P||255new Sk.builtin.bytes(F))}throw new Sk.builtin.TypeError("cannot convert '"+Sk.abstr.typeName(k)+"' object into bytes")},$r(){let k,x="'",C=this.v.indexOf(34)!==-1,F="";for(let P=0;Pk||10k||13k||126k.length||C[F]>k[F];case"GtE":return F===P&&C.length>=k.length||C[F]>=k[F]}},tp$hash(){return new Sk.builtin.str(this.$jsstr()).tp$hash()},tp$as_sequence_or_mapping:!0,mp$subscript(k){if(Sk.misceval.isIndex(k)){let x=Sk.misceval.asIndexSized(k,Sk.builtin.IndexError);if(x!==void 0){if(0>x&&(x=this.v.length+x),0>x||x>=this.v.length)throw new Sk.builtin.IndexError("index out of range");return new Sk.builtin.int_(this.v[x])}}else if(k instanceof Sk.builtin.slice){let x=[];return k.sssiter$(this.v.length,C=>{x.push(this.v[C])}),new Sk.builtin.bytes(new Uint8Array(x))}throw new Sk.builtin.TypeError("byte indices must be integers or slices, not "+Sk.abstr.typeName(k))},sq$length(){return this.v.length},sq$concat(k){if(!(k instanceof Sk.builtin.bytes))throw new Sk.builtin.TypeError("can't concat "+Sk.abstr.typeName(k)+" to bytes");let x=new Uint8Array(this.v.length+k.v.length),C;for(C=0;CNumber.MAX_SAFE_INTEGER)throw new Sk.builtin.OverflowError;if(0>=k)return new Sk.builtin.bytes;k=new Uint8Array(x);let C=0;for(;Ck||255x?1/0:x,k=Sk.builtin.checkNone(k)?null:this.get$raw(k),k!==null&&!k.length)throw new Sk.builtin.ValueError("empty separator");return{sep:k,maxsplit:x}},find$left:s(!1),find$right:s(!0),find$subleft:function(k,x,C){C=C-k.length+1;let F=x;for(;FP===this.v[F+L]))return F;F++}return-1},find$subright(k,x,C){let F=C-k.length;for(;F>=x;){if(k.every((P,L)=>P===this.v[F+L]))return F;F--}return-1},$subtype_new(k,x){let C=new this.constructor;return k=Sk.builtin.bytes.prototype.tp$new(k,x),C.v=k.v,C},sk$asarray(){let k=[];return this.v.forEach(x=>{k.push(new Sk.builtin.int_(x))}),k},valueOf(){return this.v}},flags:{str$encode:l,$decode:S,check$encodeArgs:n},methods:{__getnewargs__:{$meth(){return new Sk.builtin.tuple(new Sk.builtin.bytes(this.v))},$flags:{NoArgs:!0},$textsig:null,$doc:null},capitalize:{$meth(){let k=this.v.length;if(k===0)return new Sk.builtin.bytes(this.v);let x=new Uint8Array(k),C=this.v[0];x[0]=f(C)?C-32:C;for(let F=1;F copy of B + - an integer`,tp$new(g,x){if(this!==Sk.builtin.bytes.prototype)return this.$subtype_new(g,x);x=x||[];let C;if(1>=g.length&&+x.length==0)g=g[0];else{if([g,x,C]=Sk.abstr.copyKeywordsToNamedArgs("bytes",[null,"encoding","errors"],g,x),{encoding:x,errors:C}=n("bytes",x,C),!Sk.builtin.checkString(g))throw new Sk.builtin.TypeError("encoding or errors without a string argument");return l(g,x,C)}if(g===void 0)return new Sk.builtin.bytes;if((x=Sk.abstr.lookupSpecial(g,Sk.builtin.str.$bytes))!==void 0)return g=Sk.misceval.callsimOrSuspendArray(x,[]),Sk.misceval.chain(g,F=>{if(!Sk.builtin.checkBytes(F))throw new Sk.builtin.TypeError("__bytes__ returned non-bytes (type "+Sk.abstr.typeName(F)+")");return F});if(Sk.misceval.isIndex(g)){if(g=Sk.misceval.asIndexSized(g,Sk.builtin.OverflowError),0>g)throw new Sk.builtin.ValueError("negative count");return new Sk.builtin.bytes(g)}if(Sk.builtin.checkBytes(g))return new Sk.builtin.bytes(g.v);if(Sk.builtin.checkString(g))throw new Sk.builtin.TypeError("string argument without an encoding");if(Sk.builtin.checkIterable(g)){let F=[];return g=Sk.misceval.iterFor(Sk.abstr.iter(g),P=>{if(P=Sk.misceval.asIndexSized(P),0>P||255new Sk.builtin.bytes(F))}throw new Sk.builtin.TypeError("cannot convert '"+Sk.abstr.typeName(g)+"' object into bytes")},$r(){let g,x="'",C=this.v.indexOf(34)!==-1,F="";for(let P=0;Pg||10g||13g||126g.length||C[F]>g[F];case"GtE":return F===P&&C.length>=g.length||C[F]>=g[F]}},tp$hash(){return new Sk.builtin.str(this.$jsstr()).tp$hash()},tp$as_sequence_or_mapping:!0,mp$subscript(g){if(Sk.misceval.isIndex(g)){let x=Sk.misceval.asIndexSized(g,Sk.builtin.IndexError);if(x!==void 0){if(0>x&&(x=this.v.length+x),0>x||x>=this.v.length)throw new Sk.builtin.IndexError("index out of range");return new Sk.builtin.int_(this.v[x])}}else if(g instanceof Sk.builtin.slice){let x=[];return g.sssiter$(this.v.length,C=>{x.push(this.v[C])}),new Sk.builtin.bytes(new Uint8Array(x))}throw new Sk.builtin.TypeError("byte indices must be integers or slices, not "+Sk.abstr.typeName(g))},sq$length(){return this.v.length},sq$concat(g){if(!(g instanceof Sk.builtin.bytes))throw new Sk.builtin.TypeError("can't concat "+Sk.abstr.typeName(g)+" to bytes");let x=new Uint8Array(this.v.length+g.v.length),C;for(C=0;CNumber.MAX_SAFE_INTEGER)throw new Sk.builtin.OverflowError;if(0>=g)return new Sk.builtin.bytes;g=new Uint8Array(x);let C=0;for(;Cg||255x?1/0:x,g=Sk.builtin.checkNone(g)?null:this.get$raw(g),g!==null&&!g.length)throw new Sk.builtin.ValueError("empty separator");return{sep:g,maxsplit:x}},find$left:s(!1),find$right:s(!0),find$subleft:function(g,x,C){C=C-g.length+1;let F=x;for(;FP===this.v[F+D]))return F;F++}return-1},find$subright(g,x,C){let F=C-g.length;for(;F>=x;){if(g.every((P,D)=>P===this.v[F+D]))return F;F--}return-1},$subtype_new(g,x){let C=new this.constructor;return g=Sk.builtin.bytes.prototype.tp$new(g,x),C.v=g.v,C},sk$asarray(){let g=[];return this.v.forEach(x=>{g.push(new Sk.builtin.int_(x))}),g},valueOf(){return this.v}},flags:{str$encode:l,$decode:S,check$encodeArgs:n},methods:{__getnewargs__:{$meth(){return new Sk.builtin.tuple(new Sk.builtin.bytes(this.v))},$flags:{NoArgs:!0},$textsig:null,$doc:null},capitalize:{$meth(){let g=this.v.length;if(g===0)return new Sk.builtin.bytes(this.v);let x=new Uint8Array(g),C=this.v[0];x[0]=f(C)?C-32:C;for(let F=1;F copy of B Return a copy of B with only its first character capitalized (ASCII) and the rest lower-cased.`},center:{$meth:d("center",!1,!0),$flags:{MinArgs:1,MaxArgs:2},$textsig:null,$doc:`B.center(width[, fillchar]) -> copy of B Return B centered in a string of length width. Padding is -done using the specified fill character (default is a space).`},count:{$meth(k,x,C){k=this.get$tgt(k),{start:x,end:C}=Sk.builtin.slice.startEnd$wrt(this,x,C);let F=0;if(typeof k=="number")for(;xL===this.v[P+U])&&(F++,P+=k.length-1)}return new Sk.builtin.int_(F)},$flags:{MinArgs:1,MaxArgs:3},$textsig:null,$doc:`B.count(sub[, start[, end]]) -> int +done using the specified fill character (default is a space).`},count:{$meth(g,x,C){g=this.get$tgt(g),{start:x,end:C}=Sk.builtin.slice.startEnd$wrt(this,x,C);let F=0;if(typeof g=="number")for(;xD===this.v[P+U])&&(F++,P+=g.length-1)}return new Sk.builtin.int_(F)},$flags:{MinArgs:1,MaxArgs:3},$textsig:null,$doc:`B.count(sub[, start[, end]]) -> int Return the number of non-overlapping occurrences of subsection sub in bytes B[start:end]. Optional arguments start and end are interpreted @@ -202,36 +202,36 @@ as in slice notation.`},decode:{$meth:S,$flags:{NamedArgs:["encoding","errors"]} The default is 'strict' meaning that decoding errors raise a UnicodeDecodeError. Other possible values are 'ignore' and 'replace' as well as any other name registered with codecs.register_error that - can handle UnicodeDecodeErrors.`},endswith:{$meth:t("endswith",(k,x)=>{let C=k.length-x.length;return 0<=C&&x.every((F,P)=>F===k[C+P])}),$flags:{MinArgs:1,MaxArgs:3},$textsig:null,$doc:`B.endswith(suffix[, start[, end]]) -> bool + can handle UnicodeDecodeErrors.`},endswith:{$meth:t("endswith",(g,x)=>{let C=g.length-x.length;return 0<=C&&x.every((F,P)=>F===g[C+P])}),$flags:{MinArgs:1,MaxArgs:3},$textsig:null,$doc:`B.endswith(suffix[, start[, end]]) -> bool Return True if B ends with the specified suffix, False otherwise. With optional start, test B beginning at that position. With optional end, stop comparing B at that position. -suffix can also be a tuple of bytes to try.`},expandtabs:{$meth(k){k=Sk.misceval.asIndexSized(k,Sk.builtin.OverflowError,"an integer is required (got type {tp$nam})");let x=[],C=0;for(let P=0;P copy of B +suffix can also be a tuple of bytes to try.`},expandtabs:{$meth(g){g=Sk.misceval.asIndexSized(g,Sk.builtin.OverflowError,"an integer is required (got type {tp$nam})");let x=[],C=0;for(let P=0;P copy of B Return a copy of B where all tab characters are expanded using spaces. -If tabsize is not given, a tab size of 8 characters is assumed.`},find:{$meth:function(k,x,C){return new Sk.builtin.int_(this.find$left(k,x,C))},$flags:{MinArgs:1,MaxArgs:3},$textsig:null,$doc:`B.find(sub[, start[, end]]) -> int +If tabsize is not given, a tab size of 8 characters is assumed.`},find:{$meth:function(g,x,C){return new Sk.builtin.int_(this.find$left(g,x,C))},$flags:{MinArgs:1,MaxArgs:3},$textsig:null,$doc:`B.find(sub[, start[, end]]) -> int Return the lowest index in B where subsection sub is found, such that sub is contained within B[start,end]. Optional arguments start and end are interpreted as in slice notation. -Return -1 on failure.`},hex:{$meth(){let k="";for(let x=0;x string +Return -1 on failure.`},hex:{$meth(){let g="";for(let x=0;x string Create a string of hexadecimal numbers from a bytes object. -Example: b'\\xb9\\x01\\xef'.hex() -> 'b901ef'.`},index:{$meth:function(k,x,C){if(k=this.find$left(k,x,C),k===-1)throw new Sk.builtin.ValueError("subsection not found");return new Sk.builtin.int_(k)},$flags:{MinArgs:1,MaxArgs:3},$textsig:null,$doc:`B.index(sub[, start[, end]]) -> int +Example: b'\\xb9\\x01\\xef'.hex() -> 'b901ef'.`},index:{$meth:function(g,x,C){if(g=this.find$left(g,x,C),g===-1)throw new Sk.builtin.ValueError("subsection not found");return new Sk.builtin.int_(g)},$flags:{MinArgs:1,MaxArgs:3},$textsig:null,$doc:`B.index(sub[, start[, end]]) -> int Return the lowest index in B where subsection sub is found, such that sub is contained within B[start,end]. Optional arguments start and end are interpreted as in slice notation. -Raises ValueError when the subsection is not found.`},isalnum:{$meth:_(k=>m(k)||f(k)||$(k)),$flags:{NoArgs:!0},$textsig:null,$doc:`B.isalnum() -> bool +Raises ValueError when the subsection is not found.`},isalnum:{$meth:_(g=>m(g)||f(g)||$(g)),$flags:{NoArgs:!0},$textsig:null,$doc:`B.isalnum() -> bool Return True if all characters in B are alphanumeric -and there is at least one character in B, False otherwise.`},isalpha:{$meth:_(k=>65<=k&&90>=k||97<=k&&122>=k),$flags:{NoArgs:!0},$textsig:null,$doc:`B.isalpha() -> bool +and there is at least one character in B, False otherwise.`},isalpha:{$meth:_(g=>65<=g&&90>=g||97<=g&&122>=g),$flags:{NoArgs:!0},$textsig:null,$doc:`B.isalpha() -> bool Return True if all characters in B are alphabetic -and there is at least one character in B, False otherwise.`},isascii:{$meth:_(k=>0<=k&&127>=k,!0),$flags:{NoArgs:!0},$textsig:null,$doc:`B.isascii() -> bool +and there is at least one character in B, False otherwise.`},isascii:{$meth:_(g=>0<=g&&127>=g,!0),$flags:{NoArgs:!0},$textsig:null,$doc:`B.isascii() -> bool Return True if B is empty or all characters in B are ASCII, False otherwise.`},isdigit:{$meth:_(m),$flags:{NoArgs:!0},$textsig:null,$doc:`B.isdigit() -> bool @@ -243,7 +243,7 @@ Return True if all cased characters in B are lowercase and there is at least one cased character in B, False otherwise.`},isspace:{$meth:_(u),$flags:{NoArgs:!0},$textsig:null,$doc:`B.isspace() -> bool Return True if all characters in B are whitespace -and there is at least one character in B, False otherwise.`},istitle:{$meth:function(){let k=!1,x=!1;for(let C=0;C bool +and there is at least one character in B, False otherwise.`},istitle:{$meth:function(){let g=!1,x=!1;for(let C=0;C bool Return True if B is a titlecased string and there is at least one character in B, i.e. uppercase characters may only follow uncased @@ -251,7 +251,7 @@ characters and lowercase characters only cased ones. Return False otherwise.`},isupper:{$meth:v($,f),$flags:{NoArgs:!0},$textsig:null,$doc:`B.isupper() -> bool Return True if all cased characters in B are uppercase and there is -at least one cased character in B, False otherwise.`},join:{$meth(k){let x=[],C=0;return Sk.misceval.chain(Sk.misceval.iterFor(Sk.abstr.iter(k),F=>{if(!(F instanceof Sk.builtin.bytes))throw new Sk.builtin.TypeError("sequence item "+C+": expected a bytes-like object, "+Sk.abstr.typeName(F)+" found");C++,x.length&&x.push(...this.v),x.push(...F.v)}),()=>new Sk.builtin.bytes(new Uint8Array(x)))},$flags:{OneArg:!0},$textsig:"($self, iterable_of_bytes, /)",$doc:`Concatenate any number of bytes objects. +at least one cased character in B, False otherwise.`},join:{$meth(g){let x=[],C=0;return Sk.misceval.chain(Sk.misceval.iterFor(Sk.abstr.iter(g),F=>{if(!(F instanceof Sk.builtin.bytes))throw new Sk.builtin.TypeError("sequence item "+C+": expected a bytes-like object, "+Sk.abstr.typeName(F)+" found");C++,x.length&&x.push(...this.v),x.push(...F.v)}),()=>new Sk.builtin.bytes(new Uint8Array(x)))},$flags:{OneArg:!0},$textsig:"($self, iterable_of_bytes, /)",$doc:`Concatenate any number of bytes objects. The bytes whose method is called is inserted in between each pair. @@ -260,7 +260,7 @@ The result is returned as a new bytes object. Example: b'.'.join([b'ab', b'pq', b'rs']) -> b'ab.pq.rs'.`},ljust:{$meth:d("ljust",!1,!1),$flags:{MinArgs:1,MaxArgs:2},$textsig:null,$doc:`B.ljust(width[, fillchar]) -> copy of B Return B left justified in a string of length width. Padding is -done using the specified fill character (default is a space).`},lower:{$meth:A(k=>$(k)?k+32:k),$flags:{NoArgs:!0},$textsig:null,$doc:`B.lower() -> copy of B +done using the specified fill character (default is a space).`},lower:{$meth:A(g=>$(g)?g+32:g),$flags:{NoArgs:!0},$textsig:null,$doc:`B.lower() -> copy of B Return a copy of B with all ASCII characters converted to lowercase.`},lstrip:{$meth:o(!0,!1),$flags:{MinArgs:0,MaxArgs:1},$textsig:"($self, bytes=None, /)",$doc:`Strip leading bytes contained in the argument. @@ -271,20 +271,20 @@ returns a 3-tuple containing the part before the separator, the separator itself, and the part after it. If the separator is not found, returns a 3-tuple containing the original bytes -object and two empty bytes objects.`},replace:{$meth(k,x,C){k=this.get$raw(k),x=this.get$raw(x),C=C===void 0?-1:Sk.misceval.asIndexSized(C,Sk.builtin.OverflowError),C=0>C?1/0:C;let F=[],P=0;for(var L=0;LC?1/0:C;let F=[],P=0;for(var D=0;D int +replaced.`},rfind:{$meth(g,x,C){return new Sk.builtin.int_(this.find$right(g,x,C))},$flags:{MinArgs:1,MaxArgs:3},$textsig:null,$doc:`B.rfind(sub[, start[, end]]) -> int Return the highest index in B where subsection sub is found, such that sub is contained within B[start,end]. Optional arguments start and end are interpreted as in slice notation. -Return -1 on failure.`},rindex:{$meth:function(k,x,C){if(k=this.find$right(k,x,C),k===-1)throw new Sk.builtin.ValueError("subsection not found");return new Sk.builtin.int_(k)},$flags:{MinArgs:1,MaxArgs:3},$textsig:null,$doc:`B.rindex(sub[, start[, end]]) -> int +Return -1 on failure.`},rindex:{$meth:function(g,x,C){if(g=this.find$right(g,x,C),g===-1)throw new Sk.builtin.ValueError("subsection not found");return new Sk.builtin.int_(g)},$flags:{MinArgs:1,MaxArgs:3},$textsig:null,$doc:`B.rindex(sub[, start[, end]]) -> int Return the highest index in B where subsection sub is found, such that sub is contained within B[start,end]. Optional @@ -300,7 +300,7 @@ the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it. If the separator is not found, returns a 3-tuple containing two empty bytes -objects and the original bytes object.`},rsplit:{$meth:function(k,x){({sep:k,maxsplit:x}=this.get$splitArgs(k,x));let C=[],F=0,P=this.v.length;if(k!==null){for(;0<=P&&FP)break;for(k=P+1,P--;0<=P&&!u(this.v[P]);)P--;C.push(new Sk.builtin.bytes(this.v.subarray(P+1,k))),F++}if(0<=P){for(;u(this.v[P]);)P--;0<=P&&C.push(new Sk.builtin.bytes(this.v.subarray(0,P+1)))}}return new Sk.builtin.list(C.reverse())},$flags:{NamedArgs:["sep","maxsplit"],Defaults:[Sk.builtin.none.none$,-1]},$textsig:"($self, /, sep=None, maxsplit=-1)",$doc:`Return a list of the sections in the bytes, using sep as the delimiter. +objects and the original bytes object.`},rsplit:{$meth:function(g,x){({sep:g,maxsplit:x}=this.get$splitArgs(g,x));let C=[],F=0,P=this.v.length;if(g!==null){for(;0<=P&&FP)break;for(g=P+1,P--;0<=P&&!u(this.v[P]);)P--;C.push(new Sk.builtin.bytes(this.v.subarray(P+1,g))),F++}if(0<=P){for(;u(this.v[P]);)P--;0<=P&&C.push(new Sk.builtin.bytes(this.v.subarray(0,P+1)))}}return new Sk.builtin.list(C.reverse())},$flags:{NamedArgs:["sep","maxsplit"],Defaults:[Sk.builtin.none.none$,-1]},$textsig:"($self, /, sep=None, maxsplit=-1)",$doc:`Return a list of the sections in the bytes, using sep as the delimiter. sep The delimiter according which to split the bytes. @@ -312,7 +312,7 @@ objects and the original bytes object.`},rsplit:{$meth:function(k,x){({sep:k,max Splitting is done starting at the end of the bytes and working to the front.`},rstrip:{$meth:o(!1,!0),$flags:{MinArgs:0,MaxArgs:1},$textsig:"($self, bytes=None, /)",$doc:`Strip trailing bytes contained in the argument. -If the argument is omitted or None, strip trailing ASCII whitespace.`},split:{$meth:function(k,x){({sep:k,maxsplit:x}=this.get$splitArgs(k,x));let C=[],F=this.v.length,P=0,L=0;if(k!==null){for(;Lx.length<=k.length&&x.every((C,F)=>C===k[F])),$flags:{MinArgs:1,MaxArgs:3},$textsig:null,$doc:`B.startswith(prefix[, start[, end]]) -> bool +true.`},startswith:{$meth:t("startswith",(g,x)=>x.length<=g.length&&x.every((C,F)=>C===g[F])),$flags:{MinArgs:1,MaxArgs:3},$textsig:null,$doc:`B.startswith(prefix[, start[, end]]) -> bool Return True if B starts with the specified prefix, False otherwise. With optional start, test B beginning at that position. With optional end, stop comparing B at that position. prefix can also be a tuple of bytes to try.`},strip:{$meth:o(!0,!0),$flags:{MinArgs:0,MaxArgs:1},$textsig:"($self, bytes=None, /)",$doc:`Strip leading and trailing bytes contained in the argument. -If the argument is omitted or None, strip leading and trailing ASCII whitespace.`},swapcase:{$meth:A(k=>$(k)?k+32:f(k)?k-32:k),$flags:{NoArgs:!0},$textsig:null,$doc:`B.swapcase() -> copy of B +If the argument is omitted or None, strip leading and trailing ASCII whitespace.`},swapcase:{$meth:A(g=>$(g)?g+32:f(g)?g-32:g),$flags:{NoArgs:!0},$textsig:null,$doc:`B.swapcase() -> copy of B Return a copy of B with uppercase ASCII characters converted -to lowercase ASCII and vice versa.`},title:{$meth(){let k=this.v.length,x=new Uint8Array(k),C=!1;for(let F=0;F copy of B +to lowercase ASCII and vice versa.`},title:{$meth(){let g=this.v.length,x=new Uint8Array(g),C=!1;for(let F=0;F copy of B Return a titlecased version of B, i.e. ASCII words start with uppercase -characters, all remaining cased characters have lowercase.`},upper:{$meth:A(k=>f(k)?k-32:k),$flags:{NoArgs:!0},$textsig:null,$doc:`B.upper() -> copy of B +characters, all remaining cased characters have lowercase.`},upper:{$meth:A(g=>f(g)?g-32:g),$flags:{NoArgs:!0},$textsig:null,$doc:`B.upper() -> copy of B -Return a copy of B with all ASCII characters converted to uppercase.`},zfill:{$meth(k){k=Sk.misceval.asIndexSized(k,Sk.builtin.IndexError);let x=k-this.v.length;if(0>=x)return new Sk.builtin.bytes(this.v);let C=new Uint8Array(k),F=0,P;for((this.v[0]===43||this.v[0]===45)&&(C[0]=this.v[0],F++),C.fill(48,F,F+x),P=F,F+=x;F copy of B +Return a copy of B with all ASCII characters converted to uppercase.`},zfill:{$meth(g){g=Sk.misceval.asIndexSized(g,Sk.builtin.IndexError);let x=g-this.v.length;if(0>=x)return new Sk.builtin.bytes(this.v);let C=new Uint8Array(g),F=0,P;for((this.v[0]===43||this.v[0]===45)&&(C[0]=this.v[0],F++),C.fill(48,F,F+x),P=F,F+=x;F copy of B Pad a numeric string B with zeros on the left, to fill a field -of the specified width. B is never truncated.`}},classmethods:{fromhex:{$meth:function(k){function x(K){for(let te=L;te b'\\\\xb9\\\\x01\\\\xef'.`}}});var Y=Sk.abstr.buildIteratorClass("bytes_iterator",{constructor:function(k){this.$index=0,this.$seq=k.v},iternext(){let k=this.$seq[this.$index++];if(k!==void 0)return new Sk.builtin.int_(k)},methods:{__length_hint__:Sk.generic.iterLengthHintWithArrayMethodDef},flags:{sk$unacceptableBase:!0}});Sk.exportSymbol("Sk.builtin.bytes",Sk.builtin.bytes)},function(p,g,e){(function(i){(function(n){function r(){}function l(){}var h=String.fromCharCode,a={}.toString,S=a.call(n.SharedArrayBuffer),t=a(),s=n.Uint8Array,c=s||Array,o=s?ArrayBuffer:c,d=o.isView||function(m){return m&&"length"in m},u=a.call(o.prototype);o=l.prototype;var f=n.TextEncoder,$=new(s?Uint16Array:c)(32);r.prototype.decode=function(m){if(!d(m)){var _=a.call(m);if(_!==u&&_!==S&&_!==t)throw TypeError("Failed to execute 'decode' on 'TextDecoder': The provided value is not of type '(ArrayBuffer or ArrayBufferView)'");m=s?new c(m):m||[]}for(var v=_="",A=0,N=m.length|0,M=N-32|0,R,H,ee=0,Y=0,k,x=0,C=-1;A>4){case 15:if(k=m[A=A+1|0]&255,k>>6!==2||247>6===2?Y+4|0:24,H=H+256&768;case 13:case 12:k=m[A=A+1|0]&255,ee<<=6,ee|=(H&31)<<6|k&63,Y=Y+7|0,A>6===2&&ee>>Y&&1114112>ee?(H=ee,ee=ee-65536|0,0<=ee&&(C=(ee>>10)+55296|0,H=(ee&1023)+56320|0,31>x?($[x]=C,x=x+1|0,C=-1):(k=C,C=H,H=k))):(H>>=8,A=A-H-1|0,H=65533),ee=Y=0,R=A<=M?32:N-A|0;default:$[x]=H;continue;case 11:case 10:case 9:case 8:}$[x]=65533}if(v+=h($[0],$[1],$[2],$[3],$[4],$[5],$[6],$[7],$[8],$[9],$[10],$[11],$[12],$[13],$[14],$[15],$[16],$[17],$[18],$[19],$[20],$[21],$[22],$[23],$[24],$[25],$[26],$[27],$[28],$[29],$[30],$[31]),32>x&&(v=v.slice(0,x-32|0)),A>>31,C=-1,v.length<_.length)continue}else C!==-1&&(v+=h(C));_+=v,v=""}return _},o.encode=function(m){m=m===void 0?"":""+m;var _=m.length|0,v=new c((_<<1)+8|0),A,N=0,M=!s;for(A=0;A<_;A=A+1|0,N=N+1|0){var R=m.charCodeAt(A)|0;if(127>=R)v[N]=R;else{if(2047>=R)v[N]=192|R>>6;else{e:{if(55296<=R)if(56319>=R){var H=m.charCodeAt(A=A+1|0)|0;if(56320<=H&&57343>=H){if(R=(R<<10)+H-56613888|0,65535>18,v[N=N+1|0]=128|R>>12&63,v[N=N+1|0]=128|R>>6&63,v[N=N+1|0]=128|R&63;continue}break e}R=65533}else 57343>=R&&(R=65533);!M&&A<<1>12,v[N=N+1|0]=128|R>>6&63}v[N=N+1|0]=128|R&63}}return s?v.subarray(0,N):v.slice(0,N)},f||(n.TextDecoder=r,n.TextEncoder=l)})(typeof i>"u"?typeof self>"u"?this:self:i)}).call(this,e(0))},function(p,g){Sk.builtin.tuple=Sk.abstr.buildNativeClass("tuple",{constructor:function(i){i===void 0?i=[]:Array.isArray(i)||(i=Sk.misceval.arrayFromIterable(i)),Sk.asserts.assert(this instanceof Sk.builtin.tuple,"bad call to tuple, use 'new' with an Array of python objects"),this.v=i,this.in$repr=!1},slots:{tp$getattr:Sk.generic.getAttr,tp$as_sequence_or_mapping:!0,tp$doc:`Built-in immutable sequence. +Example: bytes.fromhex('B9 01EF') -> b'\\\\xb9\\\\x01\\\\xef'.`}}});var J=Sk.abstr.buildIteratorClass("bytes_iterator",{constructor:function(g){this.$index=0,this.$seq=g.v},iternext(){let g=this.$seq[this.$index++];if(g!==void 0)return new Sk.builtin.int_(g)},methods:{__length_hint__:Sk.generic.iterLengthHintWithArrayMethodDef},flags:{sk$unacceptableBase:!0}});Sk.exportSymbol("Sk.builtin.bytes",Sk.builtin.bytes)},function(p,b,e){(function(i){(function(n){function r(){}function l(){}var h=String.fromCharCode,a={}.toString,S=a.call(n.SharedArrayBuffer),t=a(),s=n.Uint8Array,c=s||Array,o=s?ArrayBuffer:c,d=o.isView||function(m){return m&&"length"in m},u=a.call(o.prototype);o=l.prototype;var f=n.TextEncoder,$=new(s?Uint16Array:c)(32);r.prototype.decode=function(m){if(!d(m)){var _=a.call(m);if(_!==u&&_!==S&&_!==t)throw TypeError("Failed to execute 'decode' on 'TextDecoder': The provided value is not of type '(ArrayBuffer or ArrayBufferView)'");m=s?new c(m):m||[]}for(var v=_="",A=0,N=m.length|0,M=N-32|0,R,H,ee=0,J=0,g,x=0,C=-1;A>4){case 15:if(g=m[A=A+1|0]&255,g>>6!==2||247>6===2?J+4|0:24,H=H+256&768;case 13:case 12:g=m[A=A+1|0]&255,ee<<=6,ee|=(H&31)<<6|g&63,J=J+7|0,A>6===2&&ee>>J&&1114112>ee?(H=ee,ee=ee-65536|0,0<=ee&&(C=(ee>>10)+55296|0,H=(ee&1023)+56320|0,31>x?($[x]=C,x=x+1|0,C=-1):(g=C,C=H,H=g))):(H>>=8,A=A-H-1|0,H=65533),ee=J=0,R=A<=M?32:N-A|0;default:$[x]=H;continue;case 11:case 10:case 9:case 8:}$[x]=65533}if(v+=h($[0],$[1],$[2],$[3],$[4],$[5],$[6],$[7],$[8],$[9],$[10],$[11],$[12],$[13],$[14],$[15],$[16],$[17],$[18],$[19],$[20],$[21],$[22],$[23],$[24],$[25],$[26],$[27],$[28],$[29],$[30],$[31]),32>x&&(v=v.slice(0,x-32|0)),A>>31,C=-1,v.length<_.length)continue}else C!==-1&&(v+=h(C));_+=v,v=""}return _},o.encode=function(m){m=m===void 0?"":""+m;var _=m.length|0,v=new c((_<<1)+8|0),A,N=0,M=!s;for(A=0;A<_;A=A+1|0,N=N+1|0){var R=m.charCodeAt(A)|0;if(127>=R)v[N]=R;else{if(2047>=R)v[N]=192|R>>6;else{e:{if(55296<=R)if(56319>=R){var H=m.charCodeAt(A=A+1|0)|0;if(56320<=H&&57343>=H){if(R=(R<<10)+H-56613888|0,65535>18,v[N=N+1|0]=128|R>>12&63,v[N=N+1|0]=128|R>>6&63,v[N=N+1|0]=128|R&63;continue}break e}R=65533}else 57343>=R&&(R=65533);!M&&A<<1>12,v[N=N+1|0]=128|R>>6&63}v[N=N+1|0]=128|R&63}}return s?v.subarray(0,N):v.slice(0,N)},f||(n.TextDecoder=r,n.TextEncoder=l)})(typeof i>"u"?typeof self>"u"?this:self:i)}).call(this,e(0))},function(p,b){Sk.builtin.tuple=Sk.abstr.buildNativeClass("tuple",{constructor:function(i){i===void 0?i=[]:Array.isArray(i)||(i=Sk.misceval.arrayFromIterable(i)),Sk.asserts.assert(this instanceof Sk.builtin.tuple,"bad call to tuple, use 'new' with an Array of python objects"),this.v=i,this.in$repr=!1},slots:{tp$getattr:Sk.generic.getAttr,tp$as_sequence_or_mapping:!0,tp$doc:`Built-in immutable sequence. If no argument is given, the constructor returns an empty tuple. If iterable is specified the tuple is initialized from iterable's items. If the argument is a tuple, the return value is the same object.`,$r(){if(this.in$repr)return new Sk.builtin.str("(...)");this.in$repr=!0;let i=this.v.map(n=>Sk.misceval.objectRepr(n));return this.in$repr=!1,i=i.join(", "),this.v.length===1&&(i+=","),new Sk.builtin.str("("+i+")")},tp$new(i,n){return this!==Sk.builtin.tuple.prototype?this.$subtype_new(i,n):(Sk.abstr.checkNoKwargs("tuple",n),Sk.abstr.checkArgsLen("tuple",i,0,1),i=i[0],i===void 0?new Sk.builtin.tuple([]):i.constructor===Sk.builtin.tuple?i:Sk.misceval.chain(Sk.misceval.arrayFromIterable(i,!0),r=>new Sk.builtin.tuple(r)))},tp$hash(){let i,n=3430008,r=1000003,l=this.v.length;for(let h=0;hi&&(i=this.v.length+i),0>i||i>=this.v.length)throw new Sk.builtin.IndexError("tuple index out of range");return this.v[i]}if(i instanceof Sk.builtin.slice){let n=[];return i.sssiter$(this.v.length,r=>{n.push(this.v[r])}),new Sk.builtin.tuple(n)}throw new Sk.builtin.TypeError("tuple indices must be integers or slices, not "+Sk.abstr.typeName(i))},sq$length(){return this.v.length},sq$repeat(i){if(i=Sk.misceval.asIndexSized(i,Sk.builtin.OverflowError),i===1&&this.constructor===Sk.builtin.tuple)return this;let n=[];for(let r=0;r(this.$seq=A.$items(),this.$version=A.$version,v&&(this.$seq=this.$seq.reverse()),this.tp$iternext=this.constructor.prototype.tp$iternext,this.tp$iternext())},iternext:_,methods:{__length_hint__:Sk.generic.iterLengthHintWithArrayMethodDef},flags:{sk$unacceptableBase:!0},proto:{next$item:h}})}function h(){if(this.$version!==this.$orig.$version)throw this.$seq.length!==this.$orig.get$size()?new Sk.builtin.RuntimeError("dict changed size during iteration"):new Sk.builtin.RuntimeError("dictionary keys changed during iteration");return this.$seq[this.$index++]}Sk.builtin.dict=Sk.abstr.buildNativeClass("dict",{constructor:function(m){m===void 0&&(m=[]),Sk.asserts.assert(Array.isArray(m)&&m.length%2===0&&this instanceof Sk.builtin.dict,"bad call to dict constructor"),this.size=0,this.entries=Object.create(null),this.buckets={};for(let _=0;_ new empty dictionary +Raises ValueError if the value is not present.`},count:{$meth(i){let n=this.v.length,r=this.v,l=0;for(let h=0;h(this.$seq=A.$items(),this.$version=A.$version,v&&(this.$seq=this.$seq.reverse()),this.tp$iternext=this.constructor.prototype.tp$iternext,this.tp$iternext())},iternext:_,methods:{__length_hint__:Sk.generic.iterLengthHintWithArrayMethodDef},flags:{sk$unacceptableBase:!0},proto:{next$item:h}})}function h(){if(this.$version!==this.$orig.$version)throw this.$seq.length!==this.$orig.get$size()?new Sk.builtin.RuntimeError("dict changed size during iteration"):new Sk.builtin.RuntimeError("dictionary keys changed during iteration");return this.$seq[this.$index++]}Sk.builtin.dict=Sk.abstr.buildNativeClass("dict",{constructor:function(m){m===void 0&&(m=[]),Sk.asserts.assert(Array.isArray(m)&&m.length%2===0&&this instanceof Sk.builtin.dict,"bad call to dict constructor"),this.size=0,this.entries=Object.create(null),this.buckets={};for(let _=0;_ new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object's (key, value) pairs dict(iterable) -> new dictionary initialized as if via: @@ -366,7 +366,7 @@ If key is not found, d is returned if given, otherwise KeyError is raised`},popi 2-tuple; but raise KeyError if D is empty.`},keys:{$meth(){return new S(this)},$flags:{NoArgs:!0},$textsig:null,$doc:"D.keys() -> a set-like object providing a view on D's keys"},items:{$meth(){return new s(this)},$flags:{NoArgs:!0},$textsig:null,$doc:"D.items() -> a set-like object providing a view on D's items"},values:{$meth(){return new t(this)},$flags:{NoArgs:!0},$textsig:null,$doc:"D.values() -> an object providing a view on D's values"},update:{$meth(m,_){return Sk.misceval.chain(this.update$common(m,_,"update"),()=>Sk.builtin.none.none$)},$flags:{FastCall:!0},$textsig:null,$doc:`D.update([E, ]**F) -> None. Update D from dict/iterable E and F. If E is present and has a .keys() method, then does: for k in E: D[k] = E[k] If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v -In either case, this is followed by: for k in F: D[k] = F[k]`},clear:{$meth(){return this.dict$clear(),Sk.builtin.none.none$},$flags:{NoArgs:!0},$textsig:null,$doc:"D.clear() -> None. Remove all items from D."},copy:{$meth(){return this.dict$copy()},$flags:{NoArgs:!0},$textsig:null,$doc:"D.copy() -> a shallow copy of D"}},classmethods:Object.assign({fromkeys:{$meth:function(m,_){_=_||Sk.builtin.none.none$;let v=this===Sk.builtin.dict?new this:this.tp$call([],[]);return Sk.misceval.chain(v,A=>(v=A,Sk.misceval.iterFor(Sk.abstr.iter(m),N=>v.mp$ass_subscript(N,_,!0))),()=>v)},$flags:{MinArgs:1,MaxArgs:2},$textsig:"($type, iterable, value=None, /)",$doc:"Create a new dictionary with keys from iterable and values set to value."}},Sk.generic.classGetItem),proto:{quick$lookup:function(m){if(m=this.entries[m.$savedKeyHash],m!==void 0)return m[1]},mp$lookup:function(m){let _=e(m);if(m=typeof _=="string"?this.entries[_]:this.get$bucket_item(m,_),m!==void 0)return m[1]},get$size(){return this.size},sk$asarray(){return this.$items().map(m=>m[0])},update$common:function(m,_,v){Sk.abstr.checkArgsLen(v,m,0,1),m=m[0];let A;return m!==void 0&&(A=this.update$onearg(m)),Sk.misceval.chain(A,()=>{if(_)for(let N=0;N<_.length;N+=2)this.dict$setItem(new Sk.builtin.str(_[N]),_[N+1])})},update$onearg(m){return m instanceof Sk.builtin.dict||Sk.abstr.lookupSpecial(m,Sk.builtin.str.$keys)!==void 0?this.dict$merge(m):this.dict$merge_seq(m)},dict$copy(){let m=new Sk.builtin.dict([]);m.size=this.size;var _=Object.entries(this.entries);for(var v in _){var A=_[v][1];m.entries[_[v][0]]=[A[0],A[1]]}for(let N in this.buckets)for(v=this.buckets[N],m.buckets[N]=_=[],A=0;AM===void 0)&&delete this.buckets[_],A}},set$bucket_item:function(m,_,v){let A=this.buckets[v];m=[m,_],A===void 0?(this.buckets[v]=[m],v="#"+v+"_0"):(_=A.indexOf(void 0),_!==-1?(v="#"+v+"_"+_,A[_]=m):(v="#"+v+"_"+A.length,A.push(m))),this.entries[v]=m},pop$item:function(m){let _=e(m);if(typeof _=="string"?(m=this.entries[_],delete this.entries[_]):m=this.pop$bucket_item(m,_),m!==void 0)return this.size--,this.$version++,m},dict$merge:function(m){if(m.tp$iter===Sk.builtin.dict.prototype.tp$iter){var _=m.tp$iter();for(let v=_.tp$iternext();v!==void 0;v=_.tp$iternext()){let A=m.mp$subscript(v);this.dict$setItem(v,A)}}else{if(_=Sk.abstr.lookupSpecial(m,Sk.builtin.str.$keys),_===void 0)throw new Sk.builtin.TypeError("'"+Sk.abstr.typeName(m)+"' object is not a mapping");return Sk.misceval.chain(Sk.misceval.callsimOrSuspendArray(_),v=>Sk.misceval.iterFor(Sk.abstr.iter(v),A=>Sk.misceval.chain(Sk.abstr.objectGetItem(m,A,!0),N=>{this.dict$setItem(A,N)})))}},dict$merge_seq:function(m){let _=0;return Sk.misceval.iterFor(Sk.abstr.iter(m),v=>{if(!Sk.builtin.checkIterable(v))throw new Sk.builtin.TypeError("cannot convert dictionary update sequence element #"+_+" to a sequence");if(v=Sk.misceval.arrayFromIterable(v),v.length!==2)throw new Sk.builtin.ValueError("dictionary update sequence element #"+_+" has length "+v.length+"; 2 is required");this.dict$setItem(v[0],v[1]),_++})}}});let a={tp$getattr:Sk.generic.getAttr,tp$as_number:!0,tp$as_sequence_or_mapping:!0,tp$hash:Sk.builtin.none.none$,$r(){if(this.in$repr)return new Sk.builtin.str("...");this.in$repr=!0;let m=Sk.misceval.arrayFromIterable(this);return m=m.map(_=>Sk.misceval.objectRepr(_)),this.in$repr=!1,new Sk.builtin.str(Sk.abstr.typeName(this)+"(["+m.join(", ")+"])")},tp$richcompare(m,_){if(!(Sk.builtin.checkAnySet(m)||m instanceof S||m instanceof s))return Sk.builtin.NotImplemented.NotImplemented$;let v=this.sq$length(),A=m.sq$length();switch(_){case"NotEq":case"Eq":let N;return this===m?N=!0:v===A&&(N=n(this,m)),_==="NotEq"?!N:N;case"Lt":return vA&&n(m,this);case"GtE":return v>=A&&n(m,this)}},nb$subtract(m){let _=i(this);return _.difference.$meth.call(_,m)},nb$and(m){let _=i(this);return _.intersection.$meth.call(_,m)},nb$or(m){let _=i(this);return _.union.$meth.call(_,m)},nb$xor(m){let _=i(this);return _.symmetric_difference.$meth.call(_,m)},sq$length(){return this.dict.get$size()}};var S=r("dict_keys",{sq$contains(m){return this.dict.mp$lookup(m)!==void 0},tp$iter(){return new c(this.dict)}},function(){return new u(this.dict)}),t=r("dict_values",{tp$iter(){return new d(this.dict)}},function(){return new $(this.dict)}),s=r("dict_items",{sq$contains(m){if(!(m instanceof Sk.builtin.tuple&&m.sq$length()===2))return!1;var _=m.mp$subscript(new Sk.builtin.int_(0));return m=m.mp$subscript(new Sk.builtin.int_(1)),_=this.dict.mp$lookup(_),_===void 0?!1:_===m||Sk.misceval.richCompareBool(_,m,"Eq")},tp$iter(){return new o(this.dict)}},function(){return new f(this.dict)}),c=l("dict_keyiterator",function(){let m=this.next$item();return m&&m[0]}),o=l("dict_itemiterator",function(){let m=this.next$item();return m&&new Sk.builtin.tuple([m[0],m[1]])}),d=l("dict_valueiterator",function(){let m=this.next$item();return m&&m[1]}),u=l("dict_reversekeyiterator",c.prototype.tp$iternext,!0),f=l("dict_reverseitemiterator",o.prototype.tp$iternext,!0),$=l("dict_reversevalueiterator",d.prototype.tp$iternext,!0);Sk.builtin.dict.py2$methods={has_key:{$name:"has_key",$flags:{OneArg:!0},$meth(m){return new Sk.builtin.bool(this.sq$contains(m))},$doc:"D.has_key(k) -> True if D has a key k, else False"},keys:{$name:"keys",$meth(){return new Sk.builtin.list(this.sk$asarray())},$flags:{NoArgs:!0},$textsig:null,$doc:"D.keys() -> a set-like object providing a view on D's keys"},items:{$name:"items",$meth(){return new Sk.builtin.list(this.$items().map(m=>{var[_,v]=m;return new Sk.builtin.tuple([_,v])}))},$flags:{NoArgs:!0},$textsig:null,$doc:"D.items() -> a set-like object providing a view on D's items"},values:{$name:"values",$meth(){return new Sk.builtin.list(this.$items().map(m=>([,m]=m,m)))},$flags:{NoArgs:!0},$textsig:null,$doc:"D.values() -> an object providing a view on D's values"}}},function(p,g){function e(i,n){Object.defineProperties(i,{entries:{get:()=>{let r=Object.create(null);return Object.entries(n).forEach(l=>{var[h,a]=l;h=Sk.unfixReserved(h),h.includes("$")||(h=new Sk.builtin.str(h),r[h.$savedKeyHash]=[h,a])}),r},configurable:!0},size:{get:()=>Object.keys(n).map(r=>Sk.unfixReserved(r)).filter(r=>!r.includes("$")).length,configurable:!0}})}Sk.builtin.mappingproxy=Sk.abstr.buildNativeClass("mappingproxy",{constructor:function(i){if(Sk.asserts.assert(this instanceof Sk.builtin.mappingproxy,"bad call to mapping proxy, use 'new'"),i!==void 0){let n=i.constructor;n===Object||n===null||i.hasOwnProperty("sk$object")?(this.mapping=new Sk.builtin.dict([]),e(this.mapping,i)):Sk.builtin.checkMapping(i)?this.mapping=i:Sk.asserts.fail("unhandled case for mappingproxy")}},slots:{tp$getattr:Sk.generic.getAttr,tp$as_sequence_or_mapping:!0,tp$hash:Sk.builtin.none.none$,tp$new(i,n){if(Sk.abstr.checkNoKwargs("mappingproxy",n),Sk.abstr.checkOneArg("mappingproxy",i,n),i=i[0],!Sk.builtin.checkMapping(i))throw new Sk.builtin.TypeError("mappingproxy() argument must be a mapping, not "+Sk.abstr.typeName(i));return n=new Sk.builtin.mappingproxy,n.mapping=i,n},tp$richcompare(i,n){return Sk.misceval.richCompareBool(this.mapping,i,n)},tp$str(){return this.mapping.tp$str()},$r(){return new Sk.builtin.str("mappingproxy("+Sk.misceval.objectRepr(this.mapping)+")")},mp$subscript(i,n){return this.mapping.mp$subscript(i,n)},sq$contains(i){return this.mapping.sq$contains(i)},sq$length(){return this.mapping.sq$length()},tp$iter(){return this.mapping.tp$iter()},tp$as_number:!0,nb$or(i){return i instanceof Sk.builtin.mappingproxy&&(i=i.mapping),Sk.abstr.numberBinOp(this.mapping,i,"BitOr")},nb$reflected_or(i){return i instanceof Sk.builtin.mappingproxy&&(i=i.mapping),Sk.abstr.numberBinOp(i,this.mapping,"BitOr")},nb$inplace_or(i){throw new Sk.builtin.TypeError("'|=' is not supported by "+Sk.abstr.typeName(this)+"; use '|' instead")}},methods:{get:{$meth(i,n){return Sk.misceval.callsimArray(this.mapping.tp$getattr(this.str$get),i,n)},$flags:{FastCall:!0},$textsig:null,$doc:"D.get(k[,d]) -> D[k] if k in D, else d. d defaults to None."},keys:{$meth(){return Sk.misceval.callsimArray(this.mapping.tp$getattr(this.str$keys),[])},$flags:{NoArgs:!0},$textsig:null,$doc:"D.keys() -> a set-like object providing a view on D's keys"},items:{$meth(){return Sk.misceval.callsimArray(this.mapping.tp$getattr(this.str$items),[])},$flags:{NoArgs:!0},$textsig:null,$doc:"D.items() -> a set-like object providing a view on D's items"},values:{$meth(){return Sk.misceval.callsimArray(this.mapping.tp$getattr(this.str$values),[])},$flags:{NoArgs:!0},$textsig:null,$doc:"D.values() -> a set-like object providing a view on D's values"},copy:{$meth(){return Sk.misceval.callsimArray(this.mapping.tp$getattr(this.str$copy),[])},$flags:{NoArgs:!0},$textsig:null,$doc:"D.copy() -> a shallow copy of D"}},classmethods:Sk.generic.classGetItem,proto:{str$get:new Sk.builtin.str("get"),str$copy:new Sk.builtin.str("copy"),str$keys:new Sk.builtin.str("keys"),str$items:new Sk.builtin.str("items"),str$values:new Sk.builtin.str("values"),mp$lookup(i){return this.mapping.mp$lookup(i)}},flags:{sk$unacceptableBase:!0}})},function(p,g){Sk.builtin.property=Sk.abstr.buildNativeClass("property",{constructor:function(e,i,n,r){this.prop$get=e||Sk.builtin.none.none$,this.prop$set=i||Sk.builtin.none.none$,this.prop$del=n||Sk.builtin.none.none$,this.getter$doc=e&&!r,this.prop$doc=r||e&&e.$doc||Sk.builtin.none.none$},slots:{tp$getattr:Sk.generic.getAttr,tp$new:Sk.generic.new,tp$init(e,i){e=Sk.abstr.copyKeywordsToNamedArgs("property",["fget","fset","fdel","doc"],e,i,Array(4).fill(Sk.builtin.none.none$)),this.prop$get=e[0],this.prop$set=e[1],this.prop$del=e[2],Sk.builtin.checkNone(e[3])?(this.getter$doc=!0,Sk.builtin.checkNone(e[0])||(this.prop$doc=e[0].$doc||e[3])):this.prop$doc=e[3],this.ob$type!==Sk.builtin.property&&this.tp$setattr(Sk.builtin.str.$doc,this.prop$doc)},tp$doc:`Property attribute. +In either case, this is followed by: for k in F: D[k] = F[k]`},clear:{$meth(){return this.dict$clear(),Sk.builtin.none.none$},$flags:{NoArgs:!0},$textsig:null,$doc:"D.clear() -> None. Remove all items from D."},copy:{$meth(){return this.dict$copy()},$flags:{NoArgs:!0},$textsig:null,$doc:"D.copy() -> a shallow copy of D"}},classmethods:Object.assign({fromkeys:{$meth:function(m,_){_=_||Sk.builtin.none.none$;let v=this===Sk.builtin.dict?new this:this.tp$call([],[]);return Sk.misceval.chain(v,A=>(v=A,Sk.misceval.iterFor(Sk.abstr.iter(m),N=>v.mp$ass_subscript(N,_,!0))),()=>v)},$flags:{MinArgs:1,MaxArgs:2},$textsig:"($type, iterable, value=None, /)",$doc:"Create a new dictionary with keys from iterable and values set to value."}},Sk.generic.classGetItem),proto:{quick$lookup:function(m){if(m=this.entries[m.$savedKeyHash],m!==void 0)return m[1]},mp$lookup:function(m){let _=e(m);if(m=typeof _=="string"?this.entries[_]:this.get$bucket_item(m,_),m!==void 0)return m[1]},get$size(){return this.size},sk$asarray(){return this.$items().map(m=>m[0])},update$common:function(m,_,v){Sk.abstr.checkArgsLen(v,m,0,1),m=m[0];let A;return m!==void 0&&(A=this.update$onearg(m)),Sk.misceval.chain(A,()=>{if(_)for(let N=0;N<_.length;N+=2)this.dict$setItem(new Sk.builtin.str(_[N]),_[N+1])})},update$onearg(m){return m instanceof Sk.builtin.dict||Sk.abstr.lookupSpecial(m,Sk.builtin.str.$keys)!==void 0?this.dict$merge(m):this.dict$merge_seq(m)},dict$copy(){let m=new Sk.builtin.dict([]);m.size=this.size;var _=Object.entries(this.entries);for(var v in _){var A=_[v][1];m.entries[_[v][0]]=[A[0],A[1]]}for(let N in this.buckets)for(v=this.buckets[N],m.buckets[N]=_=[],A=0;AM===void 0)&&delete this.buckets[_],A}},set$bucket_item:function(m,_,v){let A=this.buckets[v];m=[m,_],A===void 0?(this.buckets[v]=[m],v="#"+v+"_0"):(_=A.indexOf(void 0),_!==-1?(v="#"+v+"_"+_,A[_]=m):(v="#"+v+"_"+A.length,A.push(m))),this.entries[v]=m},pop$item:function(m){let _=e(m);if(typeof _=="string"?(m=this.entries[_],delete this.entries[_]):m=this.pop$bucket_item(m,_),m!==void 0)return this.size--,this.$version++,m},dict$merge:function(m){if(m.tp$iter===Sk.builtin.dict.prototype.tp$iter){var _=m.tp$iter();for(let v=_.tp$iternext();v!==void 0;v=_.tp$iternext()){let A=m.mp$subscript(v);this.dict$setItem(v,A)}}else{if(_=Sk.abstr.lookupSpecial(m,Sk.builtin.str.$keys),_===void 0)throw new Sk.builtin.TypeError("'"+Sk.abstr.typeName(m)+"' object is not a mapping");return Sk.misceval.chain(Sk.misceval.callsimOrSuspendArray(_),v=>Sk.misceval.iterFor(Sk.abstr.iter(v),A=>Sk.misceval.chain(Sk.abstr.objectGetItem(m,A,!0),N=>{this.dict$setItem(A,N)})))}},dict$merge_seq:function(m){let _=0;return Sk.misceval.iterFor(Sk.abstr.iter(m),v=>{if(!Sk.builtin.checkIterable(v))throw new Sk.builtin.TypeError("cannot convert dictionary update sequence element #"+_+" to a sequence");if(v=Sk.misceval.arrayFromIterable(v),v.length!==2)throw new Sk.builtin.ValueError("dictionary update sequence element #"+_+" has length "+v.length+"; 2 is required");this.dict$setItem(v[0],v[1]),_++})}}});let a={tp$getattr:Sk.generic.getAttr,tp$as_number:!0,tp$as_sequence_or_mapping:!0,tp$hash:Sk.builtin.none.none$,$r(){if(this.in$repr)return new Sk.builtin.str("...");this.in$repr=!0;let m=Sk.misceval.arrayFromIterable(this);return m=m.map(_=>Sk.misceval.objectRepr(_)),this.in$repr=!1,new Sk.builtin.str(Sk.abstr.typeName(this)+"(["+m.join(", ")+"])")},tp$richcompare(m,_){if(!(Sk.builtin.checkAnySet(m)||m instanceof S||m instanceof s))return Sk.builtin.NotImplemented.NotImplemented$;let v=this.sq$length(),A=m.sq$length();switch(_){case"NotEq":case"Eq":let N;return this===m?N=!0:v===A&&(N=n(this,m)),_==="NotEq"?!N:N;case"Lt":return vA&&n(m,this);case"GtE":return v>=A&&n(m,this)}},nb$subtract(m){let _=i(this);return _.difference.$meth.call(_,m)},nb$and(m){let _=i(this);return _.intersection.$meth.call(_,m)},nb$or(m){let _=i(this);return _.union.$meth.call(_,m)},nb$xor(m){let _=i(this);return _.symmetric_difference.$meth.call(_,m)},sq$length(){return this.dict.get$size()}};var S=r("dict_keys",{sq$contains(m){return this.dict.mp$lookup(m)!==void 0},tp$iter(){return new c(this.dict)}},function(){return new u(this.dict)}),t=r("dict_values",{tp$iter(){return new d(this.dict)}},function(){return new $(this.dict)}),s=r("dict_items",{sq$contains(m){if(!(m instanceof Sk.builtin.tuple&&m.sq$length()===2))return!1;var _=m.mp$subscript(new Sk.builtin.int_(0));return m=m.mp$subscript(new Sk.builtin.int_(1)),_=this.dict.mp$lookup(_),_===void 0?!1:_===m||Sk.misceval.richCompareBool(_,m,"Eq")},tp$iter(){return new o(this.dict)}},function(){return new f(this.dict)}),c=l("dict_keyiterator",function(){let m=this.next$item();return m&&m[0]}),o=l("dict_itemiterator",function(){let m=this.next$item();return m&&new Sk.builtin.tuple([m[0],m[1]])}),d=l("dict_valueiterator",function(){let m=this.next$item();return m&&m[1]}),u=l("dict_reversekeyiterator",c.prototype.tp$iternext,!0),f=l("dict_reverseitemiterator",o.prototype.tp$iternext,!0),$=l("dict_reversevalueiterator",d.prototype.tp$iternext,!0);Sk.builtin.dict.py2$methods={has_key:{$name:"has_key",$flags:{OneArg:!0},$meth(m){return new Sk.builtin.bool(this.sq$contains(m))},$doc:"D.has_key(k) -> True if D has a key k, else False"},keys:{$name:"keys",$meth(){return new Sk.builtin.list(this.sk$asarray())},$flags:{NoArgs:!0},$textsig:null,$doc:"D.keys() -> a set-like object providing a view on D's keys"},items:{$name:"items",$meth(){return new Sk.builtin.list(this.$items().map(m=>{var[_,v]=m;return new Sk.builtin.tuple([_,v])}))},$flags:{NoArgs:!0},$textsig:null,$doc:"D.items() -> a set-like object providing a view on D's items"},values:{$name:"values",$meth(){return new Sk.builtin.list(this.$items().map(m=>([,m]=m,m)))},$flags:{NoArgs:!0},$textsig:null,$doc:"D.values() -> an object providing a view on D's values"}}},function(p,b){function e(i,n){Object.defineProperties(i,{entries:{get:()=>{let r=Object.create(null);return Object.entries(n).forEach(l=>{var[h,a]=l;h=Sk.unfixReserved(h),h.includes("$")||(h=new Sk.builtin.str(h),r[h.$savedKeyHash]=[h,a])}),r},configurable:!0},size:{get:()=>Object.keys(n).map(r=>Sk.unfixReserved(r)).filter(r=>!r.includes("$")).length,configurable:!0}})}Sk.builtin.mappingproxy=Sk.abstr.buildNativeClass("mappingproxy",{constructor:function(i){if(Sk.asserts.assert(this instanceof Sk.builtin.mappingproxy,"bad call to mapping proxy, use 'new'"),i!==void 0){let n=i.constructor;n===Object||n===null||i.hasOwnProperty("sk$object")?(this.mapping=new Sk.builtin.dict([]),e(this.mapping,i)):Sk.builtin.checkMapping(i)?this.mapping=i:Sk.asserts.fail("unhandled case for mappingproxy")}},slots:{tp$getattr:Sk.generic.getAttr,tp$as_sequence_or_mapping:!0,tp$hash:Sk.builtin.none.none$,tp$new(i,n){if(Sk.abstr.checkNoKwargs("mappingproxy",n),Sk.abstr.checkOneArg("mappingproxy",i,n),i=i[0],!Sk.builtin.checkMapping(i))throw new Sk.builtin.TypeError("mappingproxy() argument must be a mapping, not "+Sk.abstr.typeName(i));return n=new Sk.builtin.mappingproxy,n.mapping=i,n},tp$richcompare(i,n){return Sk.misceval.richCompareBool(this.mapping,i,n)},tp$str(){return this.mapping.tp$str()},$r(){return new Sk.builtin.str("mappingproxy("+Sk.misceval.objectRepr(this.mapping)+")")},mp$subscript(i,n){return this.mapping.mp$subscript(i,n)},sq$contains(i){return this.mapping.sq$contains(i)},sq$length(){return this.mapping.sq$length()},tp$iter(){return this.mapping.tp$iter()},tp$as_number:!0,nb$or(i){return i instanceof Sk.builtin.mappingproxy&&(i=i.mapping),Sk.abstr.numberBinOp(this.mapping,i,"BitOr")},nb$reflected_or(i){return i instanceof Sk.builtin.mappingproxy&&(i=i.mapping),Sk.abstr.numberBinOp(i,this.mapping,"BitOr")},nb$inplace_or(i){throw new Sk.builtin.TypeError("'|=' is not supported by "+Sk.abstr.typeName(this)+"; use '|' instead")}},methods:{get:{$meth(i,n){return Sk.misceval.callsimArray(this.mapping.tp$getattr(this.str$get),i,n)},$flags:{FastCall:!0},$textsig:null,$doc:"D.get(k[,d]) -> D[k] if k in D, else d. d defaults to None."},keys:{$meth(){return Sk.misceval.callsimArray(this.mapping.tp$getattr(this.str$keys),[])},$flags:{NoArgs:!0},$textsig:null,$doc:"D.keys() -> a set-like object providing a view on D's keys"},items:{$meth(){return Sk.misceval.callsimArray(this.mapping.tp$getattr(this.str$items),[])},$flags:{NoArgs:!0},$textsig:null,$doc:"D.items() -> a set-like object providing a view on D's items"},values:{$meth(){return Sk.misceval.callsimArray(this.mapping.tp$getattr(this.str$values),[])},$flags:{NoArgs:!0},$textsig:null,$doc:"D.values() -> a set-like object providing a view on D's values"},copy:{$meth(){return Sk.misceval.callsimArray(this.mapping.tp$getattr(this.str$copy),[])},$flags:{NoArgs:!0},$textsig:null,$doc:"D.copy() -> a shallow copy of D"}},classmethods:Sk.generic.classGetItem,proto:{str$get:new Sk.builtin.str("get"),str$copy:new Sk.builtin.str("copy"),str$keys:new Sk.builtin.str("keys"),str$items:new Sk.builtin.str("items"),str$values:new Sk.builtin.str("values"),mp$lookup(i){return this.mapping.mp$lookup(i)}},flags:{sk$unacceptableBase:!0}})},function(p,b){Sk.builtin.property=Sk.abstr.buildNativeClass("property",{constructor:function(e,i,n,r){this.prop$get=e||Sk.builtin.none.none$,this.prop$set=i||Sk.builtin.none.none$,this.prop$del=n||Sk.builtin.none.none$,this.getter$doc=e&&!r,this.prop$doc=r||e&&e.$doc||Sk.builtin.none.none$},slots:{tp$getattr:Sk.generic.getAttr,tp$new:Sk.generic.new,tp$init(e,i){e=Sk.abstr.copyKeywordsToNamedArgs("property",["fget","fset","fdel","doc"],e,i,Array(4).fill(Sk.builtin.none.none$)),this.prop$get=e[0],this.prop$set=e[1],this.prop$del=e[2],Sk.builtin.checkNone(e[3])?(this.getter$doc=!0,Sk.builtin.checkNone(e[0])||(this.prop$doc=e[0].$doc||e[3])):this.prop$doc=e[3],this.ob$type!==Sk.builtin.property&&this.tp$setattr(Sk.builtin.str.$doc,this.prop$doc)},tp$doc:`Property attribute. fget function to be used for getting an attribute value @@ -432,7 +432,7 @@ It can be called either on the class (e.g. C.f()) or on an instance (e.g. C().f()). The instance is ignored except for its class. Static methods in Python are similar to those found in Java or C++. -For a more advanced concept, see the classmethod builtin.`,tp$descr_get(e,i){if(this.sm$callable===void 0)throw new Sk.builtin.RuntimeError("uninitialized staticmethod object");return this.sm$callable}},getsets:{__func__:{$get(){return this.sm$callable}},__dict__:Sk.generic.getSetDict}})},function(p,g){function e(k,x){return function(C){if(!(C instanceof Sk.builtin.int_))return Sk.builtin.NotImplemented.NotImplemented$;let F=this.v;if(C=C.v,typeof F=="number"&&typeof C=="number"){let P=k(F,C);if(s(P))return new Sk.builtin.int_(P)}return F=o(F),C=o(C),new Sk.builtin.int_(x(F,C))}}function i(k,x){return function(C){if(!(C instanceof Sk.builtin.int_))return Sk.builtin.NotImplemented.NotImplemented$;let F=this.v;return C=C.v,typeof F=="number"&&typeof C=="number"?k(F,C):(F=o(F),C=o(C),x(F,C))}}function n(k,x){return function(){let C=this.v;if(typeof C=="number"){let F=k(C);if(F!==void 0)return new Sk.builtin.int_(F);C=o(C)}return new Sk.builtin.int_(x(C))}}function r(){return new Sk.builtin.int_(this.v)}function l(k,x){return function(C){if(!(C instanceof Sk.builtin.int_))return Sk.builtin.NotImplemented.NotImplemented$;let F=this.v;if(C=C.v,C===0)throw new Sk.builtin.ZeroDivisionError("integer division or modulo by zero");return typeof F=="number"&&typeof C=="number"?new Sk.builtin.int_(k(F,C)):(F=o(F),C=o(C),new Sk.builtin.int_(JSBI.numberIfSafe(x(F,C))))}}function h(k,x){return function(C){if(!(C instanceof Sk.builtin.int_))return Sk.builtin.NotImplemented.NotImplemented$;if(C.nb$isnegative())throw new Sk.builtin.ValueError("negative shift count");let F=this.v;if(F===0)return new Sk.builtin.int_(0);if(C=C.v,typeof F=="number"&&typeof C=="number"&&53>C){let P=k(F,C);if(P!==void 0)return new Sk.builtin.int_(P)}return F=o(F),C=o(C),new Sk.builtin.int_(x(F,C))}}function a(k,x){return function(C){if(!(C instanceof Sk.builtin.int_))return Sk.builtin.NotImplemented.NotImplemented$;let F=this.v;return C=C.v,typeof F=="number"&&typeof C=="number"&&Math.abs(F)=-Number.MAX_SAFE_INTEGER}function c(k){return k<=Number.MAX_SAFE_INTEGER&&k>=-Number.MAX_SAFE_INTEGER?+k:JSBI.BigInt(k)}function o(k){return typeof k=="number"?JSBI.BigInt(k):k}function d(k,x){if(x=x!==Sk.builtin.none.none$?Sk.misceval.asIndexOrThrow(x):null,k instanceof Sk.builtin.str)return x===null&&(x=10),new Sk.builtin.int_(Sk.str2number(k.v,x));if(x!==null)throw new Sk.builtin.TypeError("int() can't convert non-string with explicit base");if(k.nb$int!==void 0)return k.nb$int();if(k.nb$index!==void 0)return new Sk.builtin.int_(k.nb$index());if(x=Sk.abstr.lookupSpecial(k,Sk.builtin.str.$trunc)){if(x=Sk.misceval.callsimArray(x,[]),!Sk.builtin.checkInt(x))throw new Sk.builtin.TypeError(Sk.builtin.str.$trunc.$jsstr()+" returned non-Integral (type "+Sk.abstr.typeName(k)+")");return new Sk.builtin.int_(x.v)}throw new Sk.builtin.TypeError("int() argument must be a string, a bytes-like object or a number, not '"+Sk.abstr.typeName(k)+"'")}function u(k){if(!Sk.builtin.checkString(k))throw new Sk.builtin.TypeError("'byteorder' must be str, not "+Sk.abstr.typeName(k));if(k=k.toString(),k==="little")return 1;if(k==="big")return 0;throw new Sk.builtin.ValueError("byteorder must be either 'little' or 'big'")}Sk.builtin.int_=Sk.abstr.buildNativeClass("int",{constructor:function(k){Sk.asserts.assert(this instanceof Sk.builtin.int_,"bad call to int use 'new'");let x;if(typeof k=="number"){if(-6k)return H[k];x=k}else if(JSBI.__isBigInt(k))x=k;else{if(k===void 0)return ee;if(typeof k=="string")x=c(k);else{if(k.nb$int)return k.nb$int();Sk.asserts.fail("bad argument to int constructor")}}this.v=x},slots:{tp$as_number:!0,tp$doc:`int(x=0) -> integer +For a more advanced concept, see the classmethod builtin.`,tp$descr_get(e,i){if(this.sm$callable===void 0)throw new Sk.builtin.RuntimeError("uninitialized staticmethod object");return this.sm$callable}},getsets:{__func__:{$get(){return this.sm$callable}},__dict__:Sk.generic.getSetDict}})},function(p,b){function e(g,x){return function(C){if(!(C instanceof Sk.builtin.int_))return Sk.builtin.NotImplemented.NotImplemented$;let F=this.v;if(C=C.v,typeof F=="number"&&typeof C=="number"){let P=g(F,C);if(s(P))return new Sk.builtin.int_(P)}return F=o(F),C=o(C),new Sk.builtin.int_(x(F,C))}}function i(g,x){return function(C){if(!(C instanceof Sk.builtin.int_))return Sk.builtin.NotImplemented.NotImplemented$;let F=this.v;return C=C.v,typeof F=="number"&&typeof C=="number"?g(F,C):(F=o(F),C=o(C),x(F,C))}}function n(g,x){return function(){let C=this.v;if(typeof C=="number"){let F=g(C);if(F!==void 0)return new Sk.builtin.int_(F);C=o(C)}return new Sk.builtin.int_(x(C))}}function r(){return new Sk.builtin.int_(this.v)}function l(g,x){return function(C){if(!(C instanceof Sk.builtin.int_))return Sk.builtin.NotImplemented.NotImplemented$;let F=this.v;if(C=C.v,C===0)throw new Sk.builtin.ZeroDivisionError("integer division or modulo by zero");return typeof F=="number"&&typeof C=="number"?new Sk.builtin.int_(g(F,C)):(F=o(F),C=o(C),new Sk.builtin.int_(JSBI.numberIfSafe(x(F,C))))}}function h(g,x){return function(C){if(!(C instanceof Sk.builtin.int_))return Sk.builtin.NotImplemented.NotImplemented$;if(C.nb$isnegative())throw new Sk.builtin.ValueError("negative shift count");let F=this.v;if(F===0)return new Sk.builtin.int_(0);if(C=C.v,typeof F=="number"&&typeof C=="number"&&53>C){let P=g(F,C);if(P!==void 0)return new Sk.builtin.int_(P)}return F=o(F),C=o(C),new Sk.builtin.int_(x(F,C))}}function a(g,x){return function(C){if(!(C instanceof Sk.builtin.int_))return Sk.builtin.NotImplemented.NotImplemented$;let F=this.v;return C=C.v,typeof F=="number"&&typeof C=="number"&&Math.abs(F)=-Number.MAX_SAFE_INTEGER}function c(g){return g<=Number.MAX_SAFE_INTEGER&&g>=-Number.MAX_SAFE_INTEGER?+g:JSBI.BigInt(g)}function o(g){return typeof g=="number"?JSBI.BigInt(g):g}function d(g,x){if(x=x!==Sk.builtin.none.none$?Sk.misceval.asIndexOrThrow(x):null,g instanceof Sk.builtin.str)return x===null&&(x=10),new Sk.builtin.int_(Sk.str2number(g.v,x));if(x!==null)throw new Sk.builtin.TypeError("int() can't convert non-string with explicit base");if(g.nb$int!==void 0)return g.nb$int();if(g.nb$index!==void 0)return new Sk.builtin.int_(g.nb$index());if(x=Sk.abstr.lookupSpecial(g,Sk.builtin.str.$trunc)){if(x=Sk.misceval.callsimArray(x,[]),!Sk.builtin.checkInt(x))throw new Sk.builtin.TypeError(Sk.builtin.str.$trunc.$jsstr()+" returned non-Integral (type "+Sk.abstr.typeName(g)+")");return new Sk.builtin.int_(x.v)}throw new Sk.builtin.TypeError("int() argument must be a string, a bytes-like object or a number, not '"+Sk.abstr.typeName(g)+"'")}function u(g){if(!Sk.builtin.checkString(g))throw new Sk.builtin.TypeError("'byteorder' must be str, not "+Sk.abstr.typeName(g));if(g=g.toString(),g==="little")return 1;if(g==="big")return 0;throw new Sk.builtin.ValueError("byteorder must be either 'little' or 'big'")}Sk.builtin.int_=Sk.abstr.buildNativeClass("int",{constructor:function(g){Sk.asserts.assert(this instanceof Sk.builtin.int_,"bad call to int use 'new'");let x;if(typeof g=="number"){if(-6g)return H[g];x=g}else if(JSBI.__isBigInt(g))x=g;else{if(g===void 0)return ee;if(typeof g=="string")x=c(g);else{if(g.nb$int)return g.nb$int();Sk.asserts.fail("bad argument to int constructor")}}this.v=x},slots:{tp$as_number:!0,tp$doc:`int(x=0) -> integer int(x, base=10) -> integer Convert a number or string to an integer, or return 0 if no arguments @@ -445,12 +445,12 @@ given base. The literal can be preceded by '+' or '-' and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal. >>> int('0b100', base=0) -4`,$r(){return new Sk.builtin.str(this.v.toString())},tp$hash(){var k=this.v;if(typeof k=="number"){if(k===-1)return-2;if(536870911>k&&-536870911k==x,JSBI.equal),ob$ne:i((k,x)=>k!=x,JSBI.notEqual),ob$gt:i((k,x)=>k>x,JSBI.greaterThan),ob$ge:i((k,x)=>k>=x,JSBI.greaterThanOrEqual),ob$lt:i((k,x)=>kk<=x,JSBI.lessThanOrEqual),nb$int:r,nb$index(){return this.v},nb$float(){var k=this.v;if(typeof k=="number")return new Sk.builtin.float_(k);if(k=parseFloat(JSBI.toNumber(k)),k===1/0||k===-1/0)throw new Sk.builtin.OverflowError("int too large to convert to float");return new Sk.builtin.float_(k)},nb$isnegative(){let k=this.v;return typeof k=="number"?0>k:JSBI.lessThan(k,JSBI.__ZERO)},nb$ispositive(){let k=this.v;return typeof k=="number"?0<=k:JSBI.greaterThanOrEqual(k,JSBI.__ZERO)},nb$bool(){return this.v!==0},nb$positive:r,nb$negative:n(k=>-k,JSBI.unaryMinus),nb$add:e((k,x)=>k+x,(k,x)=>JSBI.numberIfSafe(JSBI.add(k,x))),nb$subtract:e((k,x)=>k-x,(k,x)=>JSBI.numberIfSafe(JSBI.subtract(k,x))),nb$multiply:e((k,x)=>k*x,(k,x)=>k===JSBI.__ZERO||x===JSBI.__ZERO?0:JSBI.multiply(k,x)),nb$divide:function(k){if(!Sk.__future__.python3)return this.nb$floor_divide(k);if(!(k instanceof Sk.builtin.int_))return Sk.builtin.NotImplemented.NotImplemented$;var x=this.v,C=k.v;if(C===0)throw new Sk.builtin.ZeroDivisionError("division by zero");if(typeof x=="number"&&typeof C=="number")return new Sk.builtin.float_(x/C);if(x=o(x),C=o(C),k=JSBI.lessThan(JSBI.bitwiseXor(x,C),JSBI.__ZERO),JSBI.equal(x,JSBI.__ZERO))return new Sk.builtin.float_(k?-0:0);if(x=S(x),C=S(C),JSBI.greaterThanOrEqual(x,JSBI.multiply(A,C)))throw new Sk.builtin.OverflowError("int/int too large to represent as a float");var F=x.toString(2).length-C.toString(2).length,P=JSBI.BigInt(0>F?-F:F);if((0<=F&&JSBI.greaterThanOrEqual(x,JSBI.multiply(JSBI.exponentiate(_,P),C))||0>F&&JSBI.greaterThanOrEqual(JSBI.multiply(x,JSBI.exponentiate(_,P)),C))&&(F+=1),F=Math.max(F,m)-$,x=JSBI.leftShift(x,JSBI.BigInt(Math.max(-F,0))),C=JSBI.leftShift(C,JSBI.BigInt(Math.max(F,0))),P=JSBI.divide(x,C),x=JSBI.remainder(x,C),x=JSBI.multiply(_,x),(JSBI.greaterThan(x,C)||JSBI.equal(x,C)&&JSBI.equal(JSBI.remainder(P,_),v))&&(P=JSBI.add(P,v)),P=JSBI.toNumber(P),P===1/0||P===-1/0)throw new Sk.builtin.OverflowError("int/int too large to represent as a float");return C=P*Math.pow(2,F),new Sk.builtin.float_(k?-C:C)},nb$floor_divide:l((k,x)=>Math.floor(k/x),t),nb$remainder:l((k,x)=>k-Math.floor(k/x)*x,(k,x)=>JSBI.subtract(k,JSBI.multiply(x,t(k,x)))),nb$divmod(k){let x=this.nb$floor_divide(k);return k=this.nb$remainder(k),x===Sk.builtin.NotImplemented.NotImplemented$||k===Sk.builtin.NotImplemented.NotImplemented$?Sk.builtin.NotImplemented.NotImplemented$:new Sk.builtin.tuple([x,k])},nb$and:a((k,x)=>k&x,JSBI.bitwiseAnd),nb$or:a((k,x)=>k|x,JSBI.bitwiseOr),nb$xor:a((k,x)=>k^x,JSBI.bitwiseXor),nb$abs:n(Math.abs,S),nb$lshift:h((k,x)=>{if(k=2*k*M[x],s(k))return k},JSBI.leftShift),nb$rshift:h((k,x)=>{Math.floor(k/M[x+1])},(k,x)=>JSBI.numberIfSafe(JSBI.signedRightShift(k,x))),nb$invert:n(k=>Math.abs(k)JSBI.numberIfSafe(JSBI.bitwiseNot(k))),nb$power(k,x){let C;if(x!==void 0&&Sk.builtin.checkNone(x)&&(x=void 0),!(k instanceof Sk.builtin.int_&&(x===void 0||x instanceof Sk.builtin.int_)))return Sk.builtin.NotImplemented.NotImplemented$;let F=k.nb$isnegative();if(F&&x===void 0)return this.nb$float().nb$power(k.nb$float());let P=this.v;if(k=k.v,typeof P=="number"&&typeof k=="number"){let L=Math.pow(P,k);if(s(L)&&(C=new Sk.builtin.int_(L),x===void 0))return C}if(x!==void 0){if(F)throw new Sk.builtin.ValueError("pow() 2nd argument cannot be negative when 3rd argument specified");if(x.v===0)throw new Sk.builtin.ValueError("pow() 3rd argument cannot be 0");return C!==void 0?C.nb$remainder(x):new Sk.builtin.int_(JSBI.numberIfSafe(JSBI.powermod(o(P),o(k),o(x.v))))}return new Sk.builtin.int_(JSBI.exponentiate(o(P),o(k)))},nb$long(){return new Sk.builtin.lng(this.v)}},getsets:{real:{$get:r,$doc:"the real part of a complex number"},imag:{$get(){return ee},$doc:"the imaginary part of a complex number"},numerator:{$get:r},denominator:{$get(){return Y}}},classmethods:{from_bytes:{$meth(k,x){Sk.abstr.checkArgsLen("from_bytes",k,0,2);let[C,F,P]=Sk.abstr.copyKeywordsToNamedArgs("from_bytes",["bytes","byteorder","signed"],k,x,[Sk.builtin.bool.false$]);if(k=u(F),C instanceof Sk.builtin.bytes||(C=Sk.misceval.callsimArray(Sk.builtin.bytes,[C])),Sk.misceval.isTrue(P))throw new Sk.builtin.NotImplementedError("from_bytes with signed=True is not yet implemented in Skulpt");let L=[];return C.valueOf().forEach(U=>{L.push(U.toString(16).padStart(2,"0"))}),k&&L.reverse(),k=new Sk.builtin.int_(JSBI.numberIfSafe(JSBI.BigInt("0x"+(L.join("")||"0")))),this===Sk.builtin.int_?k:Sk.misceval.callsimArray(this,[k])},$flags:{FastCall:!0}}},methods:{conjugate:{$meth:r,$flags:{NoArgs:!0},$textsig:null,$doc:"Returns self, the complex conjugate of any int."},bit_length:{$meth(){let k=this.v;return k===0?new Sk.builtin.int_(0):(k=typeof k=="number"?Math.abs(k):S(k),new Sk.builtin.int_(k.toString(2).length))},$flags:{NoArgs:!0},$textsig:"($self, /)",$doc:`Number of bits necessary to represent self in binary. +4`,$r(){return new Sk.builtin.str(this.v.toString())},tp$hash(){var g=this.v;if(typeof g=="number"){if(g===-1)return-2;if(536870911>g&&-536870911g==x,JSBI.equal),ob$ne:i((g,x)=>g!=x,JSBI.notEqual),ob$gt:i((g,x)=>g>x,JSBI.greaterThan),ob$ge:i((g,x)=>g>=x,JSBI.greaterThanOrEqual),ob$lt:i((g,x)=>gg<=x,JSBI.lessThanOrEqual),nb$int:r,nb$index(){return this.v},nb$float(){var g=this.v;if(typeof g=="number")return new Sk.builtin.float_(g);if(g=parseFloat(JSBI.toNumber(g)),g===1/0||g===-1/0)throw new Sk.builtin.OverflowError("int too large to convert to float");return new Sk.builtin.float_(g)},nb$isnegative(){let g=this.v;return typeof g=="number"?0>g:JSBI.lessThan(g,JSBI.__ZERO)},nb$ispositive(){let g=this.v;return typeof g=="number"?0<=g:JSBI.greaterThanOrEqual(g,JSBI.__ZERO)},nb$bool(){return this.v!==0},nb$positive:r,nb$negative:n(g=>-g,JSBI.unaryMinus),nb$add:e((g,x)=>g+x,(g,x)=>JSBI.numberIfSafe(JSBI.add(g,x))),nb$subtract:e((g,x)=>g-x,(g,x)=>JSBI.numberIfSafe(JSBI.subtract(g,x))),nb$multiply:e((g,x)=>g*x,(g,x)=>g===JSBI.__ZERO||x===JSBI.__ZERO?0:JSBI.multiply(g,x)),nb$divide:function(g){if(!Sk.__future__.python3)return this.nb$floor_divide(g);if(!(g instanceof Sk.builtin.int_))return Sk.builtin.NotImplemented.NotImplemented$;var x=this.v,C=g.v;if(C===0)throw new Sk.builtin.ZeroDivisionError("division by zero");if(typeof x=="number"&&typeof C=="number")return new Sk.builtin.float_(x/C);if(x=o(x),C=o(C),g=JSBI.lessThan(JSBI.bitwiseXor(x,C),JSBI.__ZERO),JSBI.equal(x,JSBI.__ZERO))return new Sk.builtin.float_(g?-0:0);if(x=S(x),C=S(C),JSBI.greaterThanOrEqual(x,JSBI.multiply(A,C)))throw new Sk.builtin.OverflowError("int/int too large to represent as a float");var F=x.toString(2).length-C.toString(2).length,P=JSBI.BigInt(0>F?-F:F);if((0<=F&&JSBI.greaterThanOrEqual(x,JSBI.multiply(JSBI.exponentiate(_,P),C))||0>F&&JSBI.greaterThanOrEqual(JSBI.multiply(x,JSBI.exponentiate(_,P)),C))&&(F+=1),F=Math.max(F,m)-$,x=JSBI.leftShift(x,JSBI.BigInt(Math.max(-F,0))),C=JSBI.leftShift(C,JSBI.BigInt(Math.max(F,0))),P=JSBI.divide(x,C),x=JSBI.remainder(x,C),x=JSBI.multiply(_,x),(JSBI.greaterThan(x,C)||JSBI.equal(x,C)&&JSBI.equal(JSBI.remainder(P,_),v))&&(P=JSBI.add(P,v)),P=JSBI.toNumber(P),P===1/0||P===-1/0)throw new Sk.builtin.OverflowError("int/int too large to represent as a float");return C=P*Math.pow(2,F),new Sk.builtin.float_(g?-C:C)},nb$floor_divide:l((g,x)=>Math.floor(g/x),t),nb$remainder:l((g,x)=>g-Math.floor(g/x)*x,(g,x)=>JSBI.subtract(g,JSBI.multiply(x,t(g,x)))),nb$divmod(g){let x=this.nb$floor_divide(g);return g=this.nb$remainder(g),x===Sk.builtin.NotImplemented.NotImplemented$||g===Sk.builtin.NotImplemented.NotImplemented$?Sk.builtin.NotImplemented.NotImplemented$:new Sk.builtin.tuple([x,g])},nb$and:a((g,x)=>g&x,JSBI.bitwiseAnd),nb$or:a((g,x)=>g|x,JSBI.bitwiseOr),nb$xor:a((g,x)=>g^x,JSBI.bitwiseXor),nb$abs:n(Math.abs,S),nb$lshift:h((g,x)=>{if(g=2*g*M[x],s(g))return g},JSBI.leftShift),nb$rshift:h((g,x)=>{Math.floor(g/M[x+1])},(g,x)=>JSBI.numberIfSafe(JSBI.signedRightShift(g,x))),nb$invert:n(g=>Math.abs(g)JSBI.numberIfSafe(JSBI.bitwiseNot(g))),nb$power(g,x){let C;if(x!==void 0&&Sk.builtin.checkNone(x)&&(x=void 0),!(g instanceof Sk.builtin.int_&&(x===void 0||x instanceof Sk.builtin.int_)))return Sk.builtin.NotImplemented.NotImplemented$;let F=g.nb$isnegative();if(F&&x===void 0)return this.nb$float().nb$power(g.nb$float());let P=this.v;if(g=g.v,typeof P=="number"&&typeof g=="number"){let D=Math.pow(P,g);if(s(D)&&(C=new Sk.builtin.int_(D),x===void 0))return C}if(x!==void 0){if(F)throw new Sk.builtin.ValueError("pow() 2nd argument cannot be negative when 3rd argument specified");if(x.v===0)throw new Sk.builtin.ValueError("pow() 3rd argument cannot be 0");return C!==void 0?C.nb$remainder(x):new Sk.builtin.int_(JSBI.numberIfSafe(JSBI.powermod(o(P),o(g),o(x.v))))}return new Sk.builtin.int_(JSBI.exponentiate(o(P),o(g)))},nb$long(){return new Sk.builtin.lng(this.v)}},getsets:{real:{$get:r,$doc:"the real part of a complex number"},imag:{$get(){return ee},$doc:"the imaginary part of a complex number"},numerator:{$get:r},denominator:{$get(){return J}}},classmethods:{from_bytes:{$meth(g,x){Sk.abstr.checkArgsLen("from_bytes",g,0,2);let[C,F,P]=Sk.abstr.copyKeywordsToNamedArgs("from_bytes",["bytes","byteorder","signed"],g,x,[Sk.builtin.bool.false$]);if(g=u(F),C instanceof Sk.builtin.bytes||(C=Sk.misceval.callsimArray(Sk.builtin.bytes,[C])),Sk.misceval.isTrue(P))throw new Sk.builtin.NotImplementedError("from_bytes with signed=True is not yet implemented in Skulpt");let D=[];return C.valueOf().forEach(U=>{D.push(U.toString(16).padStart(2,"0"))}),g&&D.reverse(),g=new Sk.builtin.int_(JSBI.numberIfSafe(JSBI.BigInt("0x"+(D.join("")||"0")))),this===Sk.builtin.int_?g:Sk.misceval.callsimArray(this,[g])},$flags:{FastCall:!0}}},methods:{conjugate:{$meth:r,$flags:{NoArgs:!0},$textsig:null,$doc:"Returns self, the complex conjugate of any int."},bit_length:{$meth(){let g=this.v;return g===0?new Sk.builtin.int_(0):(g=typeof g=="number"?Math.abs(g):S(g),new Sk.builtin.int_(g.toString(2).length))},$flags:{NoArgs:!0},$textsig:"($self, /)",$doc:`Number of bits necessary to represent self in binary. >>> bin(37) '0b100101' >>> (37).bit_length() -6`},to_bytes:{$meth(k,x){Sk.abstr.checkArgsLen("to_bytes",k,0,2);let[C,F,P]=Sk.abstr.copyKeywordsToNamedArgs("to_bytes",["length","byteorder","signed"],k,x,[Sk.builtin.bool.false$]);if(k=u(F),C=Sk.misceval.asIndexSized(C,Sk.builtin.OverflowError),0>C)throw new Sk.builtin.ValueError("length argument must be non-negative");if(Sk.misceval.isTrue(P))throw new Sk.builtin.NotImplementedError("to_bytes with signed=True is not yet implemented in Skulpt");if(this.nb$isnegative())throw new Sk.builtin.OverflowError("can't convert negative int to unsigned");x=JSBI.BigInt(this.v).toString(16),x.length%2&&(x="0"+x);var L=x.length/2;if(L>C){if(C===0&&x==="00")return new Sk.builtin.bytes;throw new Sk.builtin.OverflowError("int too big to convert")}let U=Array(C).fill(0);L=C-L;let K=0;for(;LC)throw new Sk.builtin.ValueError("length argument must be non-negative");if(Sk.misceval.isTrue(P))throw new Sk.builtin.NotImplementedError("to_bytes with signed=True is not yet implemented in Skulpt");if(this.nb$isnegative())throw new Sk.builtin.OverflowError("can't convert negative int to unsigned");x=JSBI.BigInt(this.v).toString(16),x.length%2&&(x="0"+x);var D=x.length/2;if(D>C){if(C===0&&x==="00")return new Sk.builtin.bytes;throw new Sk.builtin.OverflowError("int too big to convert")}let U=Array(C).fill(0);D=C-D;let K=0;for(;DMath.abs(x)?new Sk.builtin.int_(0):Sk.__future__.bankers_rounding?(x/=k,C=Math.round(x),new Sk.builtin.int_(((0x||36= 2 and <= 36");if(typeof x=="string"&&(x=Number(x)),k.substring(0,2).toLowerCase()==="0x"){if(x===16||x===0)k=k.substring(2),x=16;else if(34>x)throw new Sk.builtin.ValueError("invalid literal for int() with base "+x+": '"+C+"'")}else if(k.substring(0,2).toLowerCase()==="0b"){if(x===2||x===0)k=k.substring(2),x=2;else if(12>x)throw new Sk.builtin.ValueError("invalid literal for int() with base "+x+": '"+C+"'")}else if(k.substring(0,2).toLowerCase()==="0o"){if(x===8||x===0)k=k.substring(2),x=8;else if(25>x)throw new Sk.builtin.ValueError("invalid literal for int() with base "+x+": '"+C+"'")}else if(k.charAt(0)==="0"){if(k==="0")return 0;(x===8||x===0)&&(x=8)}if(x===0&&(x=10),k.indexOf("_")!==-1){if(k.indexOf("__")!==-1)throw new Sk.builtin.ValueError("invalid literal for int() with base "+x+": '"+C+"'");k=x!==10?k.replace(N,""):k.charAt(0)+k.substring(1).replace(N,"")}if(k.length===0)throw new Sk.builtin.ValueError("invalid literal for int() with base "+x+": '"+C+"'");for(P=0;P=L?U=L-48:65<=L&&90>=L?U=L-65+10:97<=L&&122>=L&&(U=L-97+10),U>=x)throw new Sk.builtin.ValueError("invalid literal for int() with base "+x+": '"+C+"'")}if(F&&(k="-"+k),U=parseInt(k,x),s(U))return U;for(C=!1,k[0]==="-"&&(C=!0,k=k.substring(1)),x=JSBI.BigInt(x),F=v,P=JSBI.__ZERO,L=k.length-1;0<=L;L--)U=k.charCodeAt(L),48<=U&&57>=U?U-=48:65<=U&&90>=U?U=U-65+10:97<=U&&122>=U&&(U=U-97+10),U=JSBI.multiply(JSBI.BigInt(U),F),P=JSBI.add(P,U),F=JSBI.multiply(F,x);return C&&(P=JSBI.multiply(P,JSBI.BigInt(-1))),k=P},Sk.builtin.int_.py2$methods={},Sk.longFromStr=function(k,x){return Sk.__future__.python3?new Sk.builtin.int_(c(k)):(k=Sk.str2number(k,x),new Sk.builtin.lng(k))},Sk.exportSymbol("Sk.longFromStr",Sk.longFromStr),Sk.builtin.int_.withinThreshold=s,Sk.builtin.int_.stringToNumberOrBig=c;let M=[.5,1,2,4,8,16,32,64,128,256,512,1024,2048,4096,8192,16384,32768,65536,131072,262144,524288,1048576,2097152,4194304,8388608,16777216,33554432,67108864,134217728,268435456,536870912,1073741824,2147483648,4294967296,8589934592,17179869184,34359738368,68719476736,137438953472,274877906944,549755813888,1099511627776,2199023255552,4398046511104,8796093022208,17592186044416,35184372088832,70368744177664,0x800000000000,281474976710656,562949953421312,0x4000000000000,0x8000000000000,4503599627370496,9007199254740992];Sk.builtin.lng=Sk.abstr.buildNativeClass("long",{base:Sk.builtin.int_,constructor:function(k){k=Sk.builtin.int_.call(this,k),k!==void 0&&(this.v=k.v)},slots:{$r(){return new Sk.builtin.str(this.v.toString()+"L")},tp$as_number:!0,nb$negative(){return new Sk.builtin.lng(R.nb$negative.call(this).v)},nb$positive(){return new Sk.builtin.lng(R.nb$positive.call(this).v)}}});let R=Sk.builtin.int_.prototype,H=[];for(p=-5;257>p;p++)H[p]=Object.create(Sk.builtin.int_.prototype,{v:{value:p}});let ee=H[0],Y=H[1]},function(p,g){let e=Sk.builtin.int_.prototype;Sk.builtin.bool=Sk.abstr.buildNativeClass("bool",{constructor:function(i){return Sk.misceval.isTrue(i)?Sk.builtin.bool.true$:Sk.builtin.bool.false$},base:Sk.builtin.int_,slots:{tp$doc:`bool(x) -> bool + is raised.`},__trunc__:{$meth:r,$flags:{NoArgs:!0},$textsig:null,$doc:"Truncating an Integral returns itself."},__floor__:{$meth:r,$flags:{NoArgs:!0},$textsig:null,$doc:"Flooring an Integral returns itself."},__ceil__:{$meth:r,$flags:{NoArgs:!0},$textsig:null,$doc:"Ceiling of an Integral returns itself."},__round__:{$meth(g){return this.round$(g)},$flags:{MinArgs:0,MaxArgs:1},$textsig:null,$doc:`Rounding an Integral returns itself. +Rounding with an ndigits argument also returns an integer.`},__getnewargs__:{$meth(){return new Sk.builtin.tuple([new Sk.builtin.int_(this.v)])},$flags:{NoArgs:!0},$textsig:"($self, /)",$doc:Sk.builtin.none.none$},__format__:{$meth:Sk.formatting.mkNumber__format__(!1),$flags:{OneArg:!0},$textsig:"($self, format_spec, /)",$doc:Sk.builtin.none.none$}},proto:{str$(g,x){return g=g===void 0||g===10?this.v.toString():this.v.toString(g),x||x===void 0||g[0]==="-"&&(g=g.substring(1)),g},round$(g){g=g===void 0?0:Sk.misceval.asIndexSized(g);var x=this.v;if(0<=g)return new Sk.builtin.int_(x);if(typeof x!="number"){{var C=g;(g=JSBI.lessThan(x,JSBI.__ZERO))&&(x=JSBI.unaryMinus(x)),C=JSBI.exponentiate(JSBI.BigInt(10),JSBI.unaryMinus(JSBI.BigInt(C)));let F=JSBI.divide(x,C);x=JSBI.remainder(x,C),x=JSBI.multiply(x,_),JSBI.greaterThan(x,C)?F=JSBI.add(F,v):JSBI.equal(x,C)&&(Sk.__future__.bankers_rounding?JSBI.equal(JSBI.remainder(F,_),v)&&(F=JSBI.add(F,v)):F=JSBI.add(F,v)),F=JSBI.multiply(F,C),g&&(F=JSBI.unaryMinus(F)),g=new Sk.builtin.int_(F)}return g}return g=Math.pow(10,-g),g/10>Math.abs(x)?new Sk.builtin.int_(0):Sk.__future__.bankers_rounding?(x/=g,C=Math.round(x),new Sk.builtin.int_(((0x||36= 2 and <= 36");if(typeof x=="string"&&(x=Number(x)),g.substring(0,2).toLowerCase()==="0x"){if(x===16||x===0)g=g.substring(2),x=16;else if(34>x)throw new Sk.builtin.ValueError("invalid literal for int() with base "+x+": '"+C+"'")}else if(g.substring(0,2).toLowerCase()==="0b"){if(x===2||x===0)g=g.substring(2),x=2;else if(12>x)throw new Sk.builtin.ValueError("invalid literal for int() with base "+x+": '"+C+"'")}else if(g.substring(0,2).toLowerCase()==="0o"){if(x===8||x===0)g=g.substring(2),x=8;else if(25>x)throw new Sk.builtin.ValueError("invalid literal for int() with base "+x+": '"+C+"'")}else if(g.charAt(0)==="0"){if(g==="0")return 0;(x===8||x===0)&&(x=8)}if(x===0&&(x=10),g.indexOf("_")!==-1){if(g.indexOf("__")!==-1)throw new Sk.builtin.ValueError("invalid literal for int() with base "+x+": '"+C+"'");g=x!==10?g.replace(N,""):g.charAt(0)+g.substring(1).replace(N,"")}if(g.length===0)throw new Sk.builtin.ValueError("invalid literal for int() with base "+x+": '"+C+"'");for(P=0;P=D?U=D-48:65<=D&&90>=D?U=D-65+10:97<=D&&122>=D&&(U=D-97+10),U>=x)throw new Sk.builtin.ValueError("invalid literal for int() with base "+x+": '"+C+"'")}if(F&&(g="-"+g),U=parseInt(g,x),s(U))return U;for(C=!1,g[0]==="-"&&(C=!0,g=g.substring(1)),x=JSBI.BigInt(x),F=v,P=JSBI.__ZERO,D=g.length-1;0<=D;D--)U=g.charCodeAt(D),48<=U&&57>=U?U-=48:65<=U&&90>=U?U=U-65+10:97<=U&&122>=U&&(U=U-97+10),U=JSBI.multiply(JSBI.BigInt(U),F),P=JSBI.add(P,U),F=JSBI.multiply(F,x);return C&&(P=JSBI.multiply(P,JSBI.BigInt(-1))),g=P},Sk.builtin.int_.py2$methods={},Sk.longFromStr=function(g,x){return Sk.__future__.python3?new Sk.builtin.int_(c(g)):(g=Sk.str2number(g,x),new Sk.builtin.lng(g))},Sk.exportSymbol("Sk.longFromStr",Sk.longFromStr),Sk.builtin.int_.withinThreshold=s,Sk.builtin.int_.stringToNumberOrBig=c;let M=[.5,1,2,4,8,16,32,64,128,256,512,1024,2048,4096,8192,16384,32768,65536,131072,262144,524288,1048576,2097152,4194304,8388608,16777216,33554432,67108864,134217728,268435456,536870912,1073741824,2147483648,4294967296,8589934592,17179869184,34359738368,68719476736,137438953472,274877906944,549755813888,1099511627776,2199023255552,4398046511104,8796093022208,17592186044416,35184372088832,70368744177664,0x800000000000,281474976710656,562949953421312,0x4000000000000,0x8000000000000,4503599627370496,9007199254740992];Sk.builtin.lng=Sk.abstr.buildNativeClass("long",{base:Sk.builtin.int_,constructor:function(g){g=Sk.builtin.int_.call(this,g),g!==void 0&&(this.v=g.v)},slots:{$r(){return new Sk.builtin.str(this.v.toString()+"L")},tp$as_number:!0,nb$negative(){return new Sk.builtin.lng(R.nb$negative.call(this).v)},nb$positive(){return new Sk.builtin.lng(R.nb$positive.call(this).v)}}});let R=Sk.builtin.int_.prototype,H=[];for(p=-5;257>p;p++)H[p]=Object.create(Sk.builtin.int_.prototype,{v:{value:p}});let ee=H[0],J=H[1]},function(p,b){let e=Sk.builtin.int_.prototype;Sk.builtin.bool=Sk.abstr.buildNativeClass("bool",{constructor:function(i){return Sk.misceval.isTrue(i)?Sk.builtin.bool.true$:Sk.builtin.bool.false$},base:Sk.builtin.int_,slots:{tp$doc:`bool(x) -> bool Returns True when the argument x is true, False otherwise. The builtins True and False are the only two instances of the class bool. -The class bool is a subclass of the class int, and cannot be subclassed.`,tp$new(i,n){return Sk.abstr.checkNoKwargs("bool",n),Sk.abstr.checkArgsLen("bool",i,0,1),new Sk.builtin.bool(i[0])},$r(){return this.v?this.str$True:this.str$False},tp$as_number:!0,nb$and(i){return i.ob$type===Sk.builtin.bool?new Sk.builtin.bool(this.v&i.v):e.nb$and.call(this,i)},nb$or(i){return i.ob$type===Sk.builtin.bool?new Sk.builtin.bool(this.v|i.v):e.nb$or.call(this,i)},nb$xor(i){return i.ob$type===Sk.builtin.bool?new Sk.builtin.bool(this.v^i.v):e.nb$xor.call(this,i)}},flags:{sk$unacceptableBase:!0},methods:{__format__:{$meth(){return this.$r()},$flags:{OneArg:!0}}},proto:{str$False:new Sk.builtin.str("False"),str$True:new Sk.builtin.str("True"),valueOf(){return!!this.v}}}),Sk.exportSymbol("Sk.builtin.bool",Sk.builtin.bool),Sk.builtin.bool.true$=Object.create(Sk.builtin.bool.prototype,{v:{value:1,enumerable:!0}}),Sk.builtin.bool.false$=Object.create(Sk.builtin.bool.prototype,{v:{value:0,enumerable:!0}})},function(p,g){function e(o){let d=[o,0];if(o===0)return d;var u=Math.abs(o);let f=Math.max(-1023,Math.floor(Math.log2(u))+1);for(u*=Math.pow(2,-f);.5>u;)u*=2,f--;for(;1<=u;)u*=.5,f++;return 0>o&&(u=-u),d[0]=u,d[1]=f,d}function i(){return new Sk.builtin.float_(this.v)}function n(o){return function(d){let u=this.v;if(d=d.v,typeof d!="number")if(JSBI.__isBigInt(d)){if(d=parseFloat(JSBI.toNumber(d)),d==1/0||d==-1/0)throw new Sk.builtin.OverflowError("int too large to convert to float")}else return Sk.builtin.NotImplemented.NotImplemented$;return o(u,d)}}function r(o,d){return function(u){let f=this.v;if(u=u.v,typeof u!="number"){if(!JSBI.__isBigInt(u))return Sk.builtin.NotImplemented.NotImplemented$;if(d!==void 0)return d(f,u)}return o(f,u)}}function l(o){let d=n(o);return function(u,f){if(f!==void 0&&!Sk.builtin.checkNone(f))throw new Sk.builtin.TypeError("pow() 3rd argument not allowed unless all arguments are integers");return d.call(this,u)}}function h(o,d){if(d===0)throw new Sk.builtin.ZeroDivisionError("integer division or modulo by zero");return o===1/0?d===1/0||o===-1/0?new Sk.builtin.float_(NaN):0>d?new Sk.builtin.float_(-1/0):new Sk.builtin.float_(1/0):o===-1/0?d===1/0||o===-1/0?new Sk.builtin.float_(NaN):0>d?new Sk.builtin.float_(1/0):new Sk.builtin.float_(-1/0):new Sk.builtin.float_(o/d)}function a(o,d){if(o===1/0||o===-1/0)return new Sk.builtin.float_(NaN);if(d===0)throw new Sk.builtin.ZeroDivisionError("integer division or modulo by zero");return d===1/0?0>o?new Sk.builtin.float_(-1):new Sk.builtin.float_(0):d===-1/0?0>o||o!==0?new Sk.builtin.float_(0):new Sk.builtin.float_(-1):new Sk.builtin.float_(Math.floor(o/d))}function S(o,d){if(d===0)throw new Sk.builtin.ZeroDivisionError("integer division or modulo by zero");if(o===0)return new Sk.builtin.float_(0);if(d===1/0)return o===1/0||o===-1/0?new Sk.builtin.float_(NaN):0o?0u&&(u+=d):0>d&&u!==0&&(u+=d),u===0&&(0>d?u=-0:1/0/u===-1/0&&(u=0)),new Sk.builtin.float_(u)}function t(o,d){if(0>o&&d%1!==0)return new Sk.builtin.complex(o,0).nb$power(new Sk.builtin.complex(d,0));if(o===0&&0>d)throw new Sk.builtin.ZeroDivisionError("0.0 cannot be raised to a negative power");let u=Math.pow(o,d);if(Math.abs(u)===1/0&&Math.abs(o)!==1/0&&Math.abs(d)!==1/0)throw new Sk.builtin.OverflowError("Numerical result out of range");return new Sk.builtin.float_(u)}Sk.builtin.float_=Sk.abstr.buildNativeClass("float",{constructor:function(o){if(Sk.asserts.assert(this instanceof Sk.builtin.float_,"bad call to float use 'new'"),typeof o=="number")this.v=o;else if(o===void 0)this.v=0;else if(typeof o=="string")this.v=parseFloat(o);else{if(o.nb$float)return o.nb$float();Sk.asserts.fail("bad argument to float constructor")}},slots:{tp$getattr:Sk.generic.getAttr,tp$as_number:!0,tp$doc:"Convert a string or number to a floating point number, if possible.",tp$hash(){var o=this.v;if(!Number.isFinite(o))return Number.isNaN(o)?0:0d&&(o=-1,d=-d);let f=0,$;for(;d;)f=f<<28&536870911|f>>1,d*=268435456,u-=28,$=Math.trunc(d),d-=$,f+=$,536870911<=f&&(f-=536870911);return u=0<=u?u%29:28-(-1-u)%29,f=(f<>29-u)*o,f===-1?-2:f},$r(){return new Sk.builtin.str(this.str$(10,!0))},tp$new(o,d){if(d&&d.length)throw new Sk.builtin.TypeError("float() takes no keyword arguments");if(o&&1o?Math.ceil(o):Math.floor(o),Sk.builtin.int_.withinThreshold(o)?new Sk.builtin.int_(o):new Sk.builtin.int_(JSBI.BigInt(o))},nb$float:i,nb$long(){return new Sk.builtin.lng(this.nb$int().v)},nb$add:n((o,d)=>new Sk.builtin.float_(o+d)),nb$subtract:n((o,d)=>new Sk.builtin.float_(o-d)),nb$reflected_subtract:n((o,d)=>new Sk.builtin.float_(d-o)),nb$multiply:n((o,d)=>new Sk.builtin.float_(o*d)),nb$divide:n(h),nb$reflected_divide:n((o,d)=>h(d,o)),nb$floor_divide:n(a),nb$reflected_floor_divide:n((o,d)=>a(d,o)),nb$remainder:n(S),nb$reflected_remainder:n((o,d)=>S(d,o)),nb$divmod:n((o,d)=>new Sk.builtin.tuple([a(o,d),S(o,d)])),nb$reflected_divmod:n((o,d)=>new Sk.builtin.tuple([a(d,o),S(d,o)])),nb$power:l(t),nb$reflected_power:l((o,d)=>t(d,o)),nb$abs(){return new Sk.builtin.float_(Math.abs(this.v))},nb$negative(){return new Sk.builtin.float_(-this.v)},nb$positive(){return new Sk.builtin.float_(this.v)},nb$bool(){return this.v!==0},nb$isnegative(){return 0>this.v},nb$ispositive(){return 0<=this.v},ob$eq:r((o,d)=>o==d,JSBI.EQ),ob$ne:r((o,d)=>o!=d,JSBI.NE),ob$gt:r((o,d)=>o>d,JSBI.GT),ob$ge:r((o,d)=>o>=d,JSBI.GE),ob$lt:r((o,d)=>oo<=d,JSBI.LE)},getsets:{real:{$get:i,$doc:"the real part of a complex number"},imag:{$get(){return new Sk.builtin.float_(0)},$doc:"the imaginary part of a complex number"}},methods:{conjugate:{$meth:i,$flags:{NoArgs:!0},$textsig:"($self, /)",$doc:"Return self, the complex conjugate of any float."},__trunc__:{$meth(){return this.nb$int()},$flags:{NoArgs:!0},$textsig:"($self, /)",$doc:"Return the Integral closest to x between 0 and x."},__round__:{$meth(o){return this.round$(o)},$flags:{MinArgs:0,MaxArgs:1},$textsig:"($self, ndigits=None, /)",$doc:`Return the Integral closest to x, rounding half toward even. +The class bool is a subclass of the class int, and cannot be subclassed.`,tp$new(i,n){return Sk.abstr.checkNoKwargs("bool",n),Sk.abstr.checkArgsLen("bool",i,0,1),new Sk.builtin.bool(i[0])},$r(){return this.v?this.str$True:this.str$False},tp$as_number:!0,nb$and(i){return i.ob$type===Sk.builtin.bool?new Sk.builtin.bool(this.v&i.v):e.nb$and.call(this,i)},nb$or(i){return i.ob$type===Sk.builtin.bool?new Sk.builtin.bool(this.v|i.v):e.nb$or.call(this,i)},nb$xor(i){return i.ob$type===Sk.builtin.bool?new Sk.builtin.bool(this.v^i.v):e.nb$xor.call(this,i)}},flags:{sk$unacceptableBase:!0},methods:{__format__:{$meth(){return this.$r()},$flags:{OneArg:!0}}},proto:{str$False:new Sk.builtin.str("False"),str$True:new Sk.builtin.str("True"),valueOf(){return!!this.v}}}),Sk.exportSymbol("Sk.builtin.bool",Sk.builtin.bool),Sk.builtin.bool.true$=Object.create(Sk.builtin.bool.prototype,{v:{value:1,enumerable:!0}}),Sk.builtin.bool.false$=Object.create(Sk.builtin.bool.prototype,{v:{value:0,enumerable:!0}})},function(p,b){function e(o){let d=[o,0];if(o===0)return d;var u=Math.abs(o);let f=Math.max(-1023,Math.floor(Math.log2(u))+1);for(u*=Math.pow(2,-f);.5>u;)u*=2,f--;for(;1<=u;)u*=.5,f++;return 0>o&&(u=-u),d[0]=u,d[1]=f,d}function i(){return new Sk.builtin.float_(this.v)}function n(o){return function(d){let u=this.v;if(d=d.v,typeof d!="number")if(JSBI.__isBigInt(d)){if(d=parseFloat(JSBI.toNumber(d)),d==1/0||d==-1/0)throw new Sk.builtin.OverflowError("int too large to convert to float")}else return Sk.builtin.NotImplemented.NotImplemented$;return o(u,d)}}function r(o,d){return function(u){let f=this.v;if(u=u.v,typeof u!="number"){if(!JSBI.__isBigInt(u))return Sk.builtin.NotImplemented.NotImplemented$;if(d!==void 0)return d(f,u)}return o(f,u)}}function l(o){let d=n(o);return function(u,f){if(f!==void 0&&!Sk.builtin.checkNone(f))throw new Sk.builtin.TypeError("pow() 3rd argument not allowed unless all arguments are integers");return d.call(this,u)}}function h(o,d){if(d===0)throw new Sk.builtin.ZeroDivisionError("integer division or modulo by zero");return o===1/0?d===1/0||o===-1/0?new Sk.builtin.float_(NaN):0>d?new Sk.builtin.float_(-1/0):new Sk.builtin.float_(1/0):o===-1/0?d===1/0||o===-1/0?new Sk.builtin.float_(NaN):0>d?new Sk.builtin.float_(1/0):new Sk.builtin.float_(-1/0):new Sk.builtin.float_(o/d)}function a(o,d){if(o===1/0||o===-1/0)return new Sk.builtin.float_(NaN);if(d===0)throw new Sk.builtin.ZeroDivisionError("integer division or modulo by zero");return d===1/0?0>o?new Sk.builtin.float_(-1):new Sk.builtin.float_(0):d===-1/0?0>o||o!==0?new Sk.builtin.float_(0):new Sk.builtin.float_(-1):new Sk.builtin.float_(Math.floor(o/d))}function S(o,d){if(d===0)throw new Sk.builtin.ZeroDivisionError("integer division or modulo by zero");if(o===0)return new Sk.builtin.float_(0);if(d===1/0)return o===1/0||o===-1/0?new Sk.builtin.float_(NaN):0o?0u&&(u+=d):0>d&&u!==0&&(u+=d),u===0&&(0>d?u=-0:1/0/u===-1/0&&(u=0)),new Sk.builtin.float_(u)}function t(o,d){if(0>o&&d%1!==0)return new Sk.builtin.complex(o,0).nb$power(new Sk.builtin.complex(d,0));if(o===0&&0>d)throw new Sk.builtin.ZeroDivisionError("0.0 cannot be raised to a negative power");let u=Math.pow(o,d);if(Math.abs(u)===1/0&&Math.abs(o)!==1/0&&Math.abs(d)!==1/0)throw new Sk.builtin.OverflowError("Numerical result out of range");return new Sk.builtin.float_(u)}Sk.builtin.float_=Sk.abstr.buildNativeClass("float",{constructor:function(o){if(Sk.asserts.assert(this instanceof Sk.builtin.float_,"bad call to float use 'new'"),typeof o=="number")this.v=o;else if(o===void 0)this.v=0;else if(typeof o=="string")this.v=parseFloat(o);else{if(o.nb$float)return o.nb$float();Sk.asserts.fail("bad argument to float constructor")}},slots:{tp$getattr:Sk.generic.getAttr,tp$as_number:!0,tp$doc:"Convert a string or number to a floating point number, if possible.",tp$hash(){var o=this.v;if(!Number.isFinite(o))return Number.isNaN(o)?0:0d&&(o=-1,d=-d);let f=0,$;for(;d;)f=f<<28&536870911|f>>1,d*=268435456,u-=28,$=Math.trunc(d),d-=$,f+=$,536870911<=f&&(f-=536870911);return u=0<=u?u%29:28-(-1-u)%29,f=(f<>29-u)*o,f===-1?-2:f},$r(){return new Sk.builtin.str(this.str$(10,!0))},tp$new(o,d){if(d&&d.length)throw new Sk.builtin.TypeError("float() takes no keyword arguments");if(o&&1o?Math.ceil(o):Math.floor(o),Sk.builtin.int_.withinThreshold(o)?new Sk.builtin.int_(o):new Sk.builtin.int_(JSBI.BigInt(o))},nb$float:i,nb$long(){return new Sk.builtin.lng(this.nb$int().v)},nb$add:n((o,d)=>new Sk.builtin.float_(o+d)),nb$subtract:n((o,d)=>new Sk.builtin.float_(o-d)),nb$reflected_subtract:n((o,d)=>new Sk.builtin.float_(d-o)),nb$multiply:n((o,d)=>new Sk.builtin.float_(o*d)),nb$divide:n(h),nb$reflected_divide:n((o,d)=>h(d,o)),nb$floor_divide:n(a),nb$reflected_floor_divide:n((o,d)=>a(d,o)),nb$remainder:n(S),nb$reflected_remainder:n((o,d)=>S(d,o)),nb$divmod:n((o,d)=>new Sk.builtin.tuple([a(o,d),S(o,d)])),nb$reflected_divmod:n((o,d)=>new Sk.builtin.tuple([a(d,o),S(d,o)])),nb$power:l(t),nb$reflected_power:l((o,d)=>t(d,o)),nb$abs(){return new Sk.builtin.float_(Math.abs(this.v))},nb$negative(){return new Sk.builtin.float_(-this.v)},nb$positive(){return new Sk.builtin.float_(this.v)},nb$bool(){return this.v!==0},nb$isnegative(){return 0>this.v},nb$ispositive(){return 0<=this.v},ob$eq:r((o,d)=>o==d,JSBI.EQ),ob$ne:r((o,d)=>o!=d,JSBI.NE),ob$gt:r((o,d)=>o>d,JSBI.GT),ob$ge:r((o,d)=>o>=d,JSBI.GE),ob$lt:r((o,d)=>oo<=d,JSBI.LE)},getsets:{real:{$get:i,$doc:"the real part of a complex number"},imag:{$get(){return new Sk.builtin.float_(0)},$doc:"the imaginary part of a complex number"}},methods:{conjugate:{$meth:i,$flags:{NoArgs:!0},$textsig:"($self, /)",$doc:"Return self, the complex conjugate of any float."},__trunc__:{$meth(){return this.nb$int()},$flags:{NoArgs:!0},$textsig:"($self, /)",$doc:"Return the Integral closest to x between 0 and x."},__round__:{$meth(o){return this.round$(o)},$flags:{MinArgs:0,MaxArgs:1},$textsig:"($self, ndigits=None, /)",$doc:`Return the Integral closest to x, rounding half toward even. When an argument is passed, work like built-in round(x, ndigits).`},as_integer_ratio:{$meth(){if(!Number.isFinite(this.v))throw Number.isNaN(this.v)?new Sk.builtin.ValueError("cannot convert NaN to integer ratio"):new Sk.builtin.OverflowError("cannot convert Infinity to integer ratio");let[o,d]=e(this.v);for(var u=0;300>u&&o!=Math.floor(o);u++)o*=2,d--;u=new Sk.builtin.int_(Math.abs(d));let f=new Sk.builtin.int_(o),$=new Sk.builtin.int_(1);return 0>> (0.0).as_integer_ratio() (0, 1) >>> (-.25).as_integer_ratio() -(-1, 4)`},is_integer:{$meth(){return new Sk.builtin.bool(Number.isInteger(this.v))},$flags:{NoArgs:!0},$textsig:"($self, /)",$doc:"Return True if the float is an integer."},__getnewargs__:{$meth(){return new Sk.builtin.tuple([this])},$flags:{NoArgs:!0},$textsig:"($self, /)",$doc:Sk.builtin.none.none$},__format__:{$meth:Sk.formatting.mkNumber__format__(!0),$flags:{OneArg:!0},$textsig:"($self, format_spec, /)",$doc:Sk.builtin.none.none$}},proto:{valueOf(){return this.v}}});let s=/_[eE]|[eE]_|\._|_\.|[+-]_|__/,c=/_(?=[^_])/g;Sk.builtin.float_.PyFloat_Check=function(o){return o===void 0?!1:!!(Sk.builtin.checkNumber(o)||Sk.builtin.checkFloat(o)||o.ob$type.$isSubType(Sk.builtin.float_))},Sk.builtin.float_.prototype.toFixed=function(o){return o=Sk.builtin.asnum$(o),this.v.toFixed(o)},Sk.builtin.float_.prototype.round$=function(o){var d=Sk.builtin.asnum$(this),u=o===void 0?0:Sk.misceval.asIndexSized(o);if(Sk.__future__.bankers_rounding){d*=Math.pow(10,u);var f=Math.round(d);return u=((0u.length?d.toExponential():d.toExponential(11)),0>u.indexOf("e")&&0<=u.indexOf(".")){for(;u.charAt(u.length-1)=="0";)u=u.substring(0,u.length-1);u.charAt(u.length-1)=="."&&(u+="0")}u=u.replace(/\.0+e/,"e","i"),u=u.replace(/(e[-+])([1-9])$/,"$10$2"),u=u.replace(/0+(e.*)/,"$1")}else u=d.toString(o);return this.v===0&&1/this.v===-1/0&&(u="-"+u),0>u.indexOf(".")&&0>u.indexOf("E")&&0>u.indexOf("e")&&(u+=".0"),u},Sk.builtin.float_.py2$methods={}},function(p,g){function e(u){let f=u.v;if(typeof f=="number")return f;if(u.nb$float&&(f=u.nb$float()),f===void 0)throw new Sk.builtin.TypeError("a float is required");return f.v}function i(u,f,$){return $===Sk.builtin.complex.prototype?new Sk.builtin.complex(u,f):($=new $.constructor,Sk.builtin.complex.call($,u,f),$)}function n(u,f){return function($){let m=this.real,_=this.imag;var v=$.real;let A=$.v;if(typeof v=="number")$=$.imag;else if(typeof A=="number")v=A,$=0;else if(JSBI.__isBigInt(A)){if(f===void 0){if(v=parseFloat(JSBI.toNumber(A)),v==1/0||v==-1/0)throw new Sk.builtin.OverflowError("int too large to convert to float")}else v=A.toString();$=0}else return Sk.builtin.NotImplemented.NotImplemented$;return u(m,_,v,$)}}function r(u,f,$,m){var _=Math.abs($);let v=Math.abs(m);if(_>=v){if(_===0)throw new Sk.builtin.ZeroDivisionError("complex division by zero");_=m/$,$+=m*_,m=(u+f*_)/$,u=(f-u*_)/$}else v>=_?(_=$/m,$=$*_+m,Sk.asserts.assert(m!==0),m=(u*_+f)/$,u=(f*_-u)/$):u=m=NaN;return new Sk.builtin.complex(m,u)}function l(u,f,$,m){if($===0&&m===0){m=1;var _=0}else if(u===0&&f===0){if(m!==0||0>$)throw new Sk.builtin.ZeroDivisionError("complex division by zero");_=m=0}else{let v=Math.hypot(u,f);_=Math.pow(v,$),u=Math.atan2(f,u),$*=u,m!==0&&(_/=Math.exp(u*m),$+=m*Math.log(v)),m=_*Math.cos($),_*=Math.sin($)}return new Sk.builtin.complex(m,_)}function h(u,f,$){let m=1;var _=new Sk.builtin.complex(1,0);for(u=new Sk.builtin.complex(u,f);0=m;)$&m&&(_=new Sk.builtin.complex(_.real*u.real-_.imag*u.imag,_.real*u.imag+u.real*_.imag)),m<<=1,u=new Sk.builtin.complex(u.real*u.real-u.imag*u.imag,2*u.real*u.imag);return _}function a(u,f,$,m,_){switch(_=!1,f){case"e":case"f":case"g":break;case"E":_=!0,f="e";break;case"F":_=!0,f="f";break;case"r":if($!==0)throw Error("Bad internall call");$=17,f="g";break;default:throw Error("Bad internall call")}if(isNaN(u))u="nan";else if(u===1/0)u="inf";else if(u===-1/0)u="-inf";else{m&a.Py_DTSF_ADD_DOT_0&&(f="g");var v="%"+(m&a.Py_DTSF_ALT?"#":"");$!=null&&(v=v+"."+$),v=new Sk.builtin.str(v+f),u=v.nb$remainder(new Sk.builtin.float_(u)),u=u.v}return m&a.Py_DTSF_SIGN&&u[0]!=="-"&&(u="+"+u),_&&(u=u.toUpperCase()),u}Sk.builtin.complex=Sk.abstr.buildNativeClass("complex",{constructor:function(u,f){Sk.asserts.assert(this instanceof Sk.builtin.complex,"bad call to complex constructor, use 'new'"),this.real=u,this.imag=f},slots:{tp$as_number:!0,tp$doc:`Create a complex number from a real part and an optional imaginary part. +(-1, 4)`},is_integer:{$meth(){return new Sk.builtin.bool(Number.isInteger(this.v))},$flags:{NoArgs:!0},$textsig:"($self, /)",$doc:"Return True if the float is an integer."},__getnewargs__:{$meth(){return new Sk.builtin.tuple([this])},$flags:{NoArgs:!0},$textsig:"($self, /)",$doc:Sk.builtin.none.none$},__format__:{$meth:Sk.formatting.mkNumber__format__(!0),$flags:{OneArg:!0},$textsig:"($self, format_spec, /)",$doc:Sk.builtin.none.none$}},proto:{valueOf(){return this.v}}});let s=/_[eE]|[eE]_|\._|_\.|[+-]_|__/,c=/_(?=[^_])/g;Sk.builtin.float_.PyFloat_Check=function(o){return o===void 0?!1:!!(Sk.builtin.checkNumber(o)||Sk.builtin.checkFloat(o)||o.ob$type.$isSubType(Sk.builtin.float_))},Sk.builtin.float_.prototype.toFixed=function(o){return o=Sk.builtin.asnum$(o),this.v.toFixed(o)},Sk.builtin.float_.prototype.round$=function(o){var d=Sk.builtin.asnum$(this),u=o===void 0?0:Sk.misceval.asIndexSized(o);if(Sk.__future__.bankers_rounding){d*=Math.pow(10,u);var f=Math.round(d);return u=((0u.length?d.toExponential():d.toExponential(11)),0>u.indexOf("e")&&0<=u.indexOf(".")){for(;u.charAt(u.length-1)=="0";)u=u.substring(0,u.length-1);u.charAt(u.length-1)=="."&&(u+="0")}u=u.replace(/\.0+e/,"e","i"),u=u.replace(/(e[-+])([1-9])$/,"$10$2"),u=u.replace(/0+(e.*)/,"$1")}else u=d.toString(o);return this.v===0&&1/this.v===-1/0&&(u="-"+u),0>u.indexOf(".")&&0>u.indexOf("E")&&0>u.indexOf("e")&&(u+=".0"),u},Sk.builtin.float_.py2$methods={}},function(p,b){function e(u){let f=u.v;if(typeof f=="number")return f;if(u.nb$float&&(f=u.nb$float()),f===void 0)throw new Sk.builtin.TypeError("a float is required");return f.v}function i(u,f,$){return $===Sk.builtin.complex.prototype?new Sk.builtin.complex(u,f):($=new $.constructor,Sk.builtin.complex.call($,u,f),$)}function n(u,f){return function($){let m=this.real,_=this.imag;var v=$.real;let A=$.v;if(typeof v=="number")$=$.imag;else if(typeof A=="number")v=A,$=0;else if(JSBI.__isBigInt(A)){if(f===void 0){if(v=parseFloat(JSBI.toNumber(A)),v==1/0||v==-1/0)throw new Sk.builtin.OverflowError("int too large to convert to float")}else v=A.toString();$=0}else return Sk.builtin.NotImplemented.NotImplemented$;return u(m,_,v,$)}}function r(u,f,$,m){var _=Math.abs($);let v=Math.abs(m);if(_>=v){if(_===0)throw new Sk.builtin.ZeroDivisionError("complex division by zero");_=m/$,$+=m*_,m=(u+f*_)/$,u=(f-u*_)/$}else v>=_?(_=$/m,$=$*_+m,Sk.asserts.assert(m!==0),m=(u*_+f)/$,u=(f*_-u)/$):u=m=NaN;return new Sk.builtin.complex(m,u)}function l(u,f,$,m){if($===0&&m===0){m=1;var _=0}else if(u===0&&f===0){if(m!==0||0>$)throw new Sk.builtin.ZeroDivisionError("complex division by zero");_=m=0}else{let v=Math.hypot(u,f);_=Math.pow(v,$),u=Math.atan2(f,u),$*=u,m!==0&&(_/=Math.exp(u*m),$+=m*Math.log(v)),m=_*Math.cos($),_*=Math.sin($)}return new Sk.builtin.complex(m,_)}function h(u,f,$){let m=1;var _=new Sk.builtin.complex(1,0);for(u=new Sk.builtin.complex(u,f);0=m;)$&m&&(_=new Sk.builtin.complex(_.real*u.real-_.imag*u.imag,_.real*u.imag+u.real*_.imag)),m<<=1,u=new Sk.builtin.complex(u.real*u.real-u.imag*u.imag,2*u.real*u.imag);return _}function a(u,f,$,m,_){switch(_=!1,f){case"e":case"f":case"g":break;case"E":_=!0,f="e";break;case"F":_=!0,f="f";break;case"r":if($!==0)throw Error("Bad internall call");$=17,f="g";break;default:throw Error("Bad internall call")}if(isNaN(u))u="nan";else if(u===1/0)u="inf";else if(u===-1/0)u="-inf";else{m&a.Py_DTSF_ADD_DOT_0&&(f="g");var v="%"+(m&a.Py_DTSF_ALT?"#":"");$!=null&&(v=v+"."+$),v=new Sk.builtin.str(v+f),u=v.nb$remainder(new Sk.builtin.float_(u)),u=u.v}return m&a.Py_DTSF_SIGN&&u[0]!=="-"&&(u="+"+u),_&&(u=u.toUpperCase()),u}Sk.builtin.complex=Sk.abstr.buildNativeClass("complex",{constructor:function(u,f){Sk.asserts.assert(this instanceof Sk.builtin.complex,"bad call to complex constructor, use 'new'"),this.real=u,this.imag=f},slots:{tp$as_number:!0,tp$doc:`Create a complex number from a real part and an optional imaginary part. This is equivalent to (real + imag*1j) where imag defaults to 0.`,tp$hash(){var u=new Sk.builtin.float_(this.real).tp$hash();return u=1003*new Sk.builtin.float_(this.imag).tp$hash()+u,Sk.builtin.int_.withinThreshold(u)?u:new Sk.builtin.int_(JSBI.BigInt(u)).tp$hash()},tp$getattr:Sk.generic.getAttr,tp$new(u,f){u=Sk.abstr.copyKeywordsToNamedArgs("complex",["real","imag"],u,f,[null,null]);{var $=u[1],m;let v=f=!1;var _=u[0];if(_!=null&&_.constructor===Sk.builtin.complex&&$==null)f=_;else if(Sk.builtin.checkString(_)){if($!=null)throw new Sk.builtin.TypeError("complex() can't take second arg if first is a string");f=Sk.builtin.complex.complex_subtype_from_string(_,this)}else{if($!=null&&Sk.builtin.checkString($))throw new Sk.builtin.TypeError("complex() second arg can't be a string");if(_==null?u=null:(u=Sk.abstr.lookupSpecial(_,Sk.builtin.str.$complex),u=u!==void 0?Sk.misceval.callsimArray(u,[]):null),u!=null&&u!==Sk.builtin.NotImplemented.NotImplemented$){if(!S(u))throw new Sk.builtin.TypeError("__complex__ should return a complex object");_=u}if(_!=null&&_.nb$float===void 0)throw new Sk.builtin.TypeError("complex() first argument must be a string or a number, not '"+Sk.abstr.typeName(_)+"'");if($!=null&&$.nb$float===void 0)throw new Sk.builtin.TypeError("complex() second argument must be a number, not '"+Sk.abstr.typeName(_)+"'");_==null?_=u=0:S(_)?(u=_.real,_=_.imag,f=!0):(u=e(_),_=0),$==null?$=m=0:S($)?(m=$.real,$=$.imag,v=!0):(m=e($),$=0),v===!0&&(u-=$),f===!0&&(m+=_),f=i(u,m,this)}}return f},tp$richcompare(u,f){if(f!=="Eq"&&f!=="NotEq"){if(Sk.builtin.checkNumber(u)||S(u))throw new Sk.builtin.TypeError("no ordering relation is defined for complex numbers");return Sk.builtin.NotImplemented.NotImplemented$}return n(function($,m,_,v){return $=$==_&&m==v,f==="Eq"?$:!$},!0).call(this,u)},$r(){{var u,f;let _=u="";var $=this.real,m=this.imag;(f=$===0)&&(f=($?0>$?-1:1:0>1/$?-1:1)==1),f?($="",f=a(m,"g",null,0,null)):($=u=a($,"g",null,0,null),f=a(m,"g",null,a.Py_DTSF_SIGN,null),m===0&&1/m===-1/0&&f&&f[0]!=="-"&&(f="-"+f),u="(",_=")"),m=new Sk.builtin.str(""+u+$+f+"j"+_)}return m},nb$int(){throw new Sk.builtin.TypeError("can't convert complex to int")},nb$long(){throw new Sk.builtin.TypeError("can't convert complex to long")},nb$float(){throw new Sk.builtin.TypeError("can't convert complex to float")},nb$positive(){return new Sk.builtin.complex(this.real,this.imag)},nb$negative(){return new Sk.builtin.complex(-this.real,-this.imag)},nb$bool(){return this.real||this.imag},nb$add:n((u,f,$,m)=>new Sk.builtin.complex(u+$,f+m)),nb$subtract:n((u,f,$,m)=>new Sk.builtin.complex(u-$,f-m)),nb$reflected_subtract:n((u,f,$,m)=>new Sk.builtin.complex($-u,m-f)),nb$multiply:n((u,f,$,m)=>new Sk.builtin.complex($*u-m*f,u*m+f*$)),nb$divide:n(r),nb$reflected_divide:n((u,f,$,m)=>r($,m,u,f)),nb$floor_divide(u){throw new Sk.builtin.TypeError("can't take floor of complex number.")},nb$reflected_floor_divide(u){throw new Sk.builtin.TypeError("can't take floor of complex number.")},nb$remainder(u){throw new Sk.builtin.TypeError("can't mod complex numbers.")},nb$reflected_remainder(u){throw new Sk.builtin.TypeError("can't mod complex numbers.")},nb$divmod(u){throw new Sk.builtin.TypeError("can't take floor or mod of complex number.")},nb$power(u,f){if(f!=null&&!Sk.builtin.checkNone(f))throw new Sk.builtin.ValueError("complex modulo");return o.call(this,u)},nb$reflected_power(u,f){if(f!=null&&!Sk.builtin.checkNone(f))throw new Sk.builtin.ValueError("complex modulo");return d.call(this,u)},nb$abs(){var u=this.real;let f=this.imag;if(!Number.isFinite(u)||!Number.isFinite(f))return u===1/0||u===-1/0?new Sk.builtin.float_(Math.abs(u)):f===1/0||f===-1/0?new Sk.builtin.float_(Math.abs(f)):new Sk.builtin.float_(NaN);if(u=Math.hypot(u,f),!Number.isFinite(u))throw new Sk.builtin.OverflowError("absolute value too large");return new Sk.builtin.float_(u)}},getsets:{real:{$get(){return new Sk.builtin.float_(this.real)},$doc:"the real part of a complex number"},imag:{$get(){return new Sk.builtin.float_(this.imag)},$doc:"the imaginary part of a complex number"}},methods:{conjugate:{$meth(){return new Sk.builtin.complex(this.real,-this.imag)},$flags:{NoArgs:!0},$textsig:null,$doc:`complex.conjugate() -> complex Return the complex conjugate of its argument. (3-4j).conjugate() == 3+4j.`},__getnewargs__:{$meth(){return new Sk.builtin.tuple([new Sk.builtin.float_(this.real),new Sk.builtin.float_(this.imag)])},$flags:{NoArgs:!0},$textsig:null,$doc:Sk.builtin.none.none$},__format__:{$meth(u){throw Sk.builtin.checkString(u)?new Sk.builtin.NotImplementedError("__format__ is not implemented for complex type."):new Sk.builtin.TypeError("__format__ requires str")},$flags:{OneArg:!0},$textsig:null,$doc:`complex.__format__() -> str -Convert to a string according to format_spec.`}}}),Sk.exportSymbol("Sk.builtin.complex",Sk.builtin.complex);let S=Sk.builtin.checkComplex,t=/_[eE]|[eE]_|\._|_\.|[+-]_|_j|j_/,s=/_(?=[^_])/g;Sk.builtin.complex.complex_subtype_from_string=function(u,f){f=f||Sk.builtin.complex.prototype;var $=0,m=0,_=!1;if(Sk.builtin.checkString(u))u=Sk.ffi.remapToJs(u);else if(typeof u!="string")throw new TypeError("provided unsupported string-alike argument");if(u.indexOf("\0")!==-1||u.length===0||u==="")throw new Sk.builtin.ValueError("complex() arg is a malformed string");var v=0;for(u=u.replace(/inf|infinity/gi,"Infinity"),u=u.replace(/nan/gi,"NaN");u[v]===" ";)v++;if(u[v]==="(")for(_=!0,v++;u[v]===" ";)v++;if(u.indexOf("_")!==-1){if(t.test(u))throw new Sk.builtin.ValueError("could not convert string to complex: '"+u+"'");u=u.charAt(0)+u.substring(1).replace(s,"")}var A=/^(?:[+-]?(?:(?:(?:\d*\.\d+)|(?:\d+\.?))(?:[eE][+-]?\d+)?|NaN|Infinity))/,N=u.substr(v),M=N.match(A);if(M!==null)if(v+=M[0].length,u[v]==="j"||u[v]==="J")m=parseFloat(M[0]),v++;else if(u[v]==="+"||u[v]==="-"){if($=parseFloat(M[0]),M=u.substr(v).match(A),M!==null?(m=parseFloat(M[0]),v+=M[0].length):(m=u[v]==="+"?1:-1,v++),u[v]!=="j"&&u[v]!=="J")throw new Sk.builtin.ValueError("complex() arg is malformed string");v++}else $=parseFloat(M[0]);else M=M=N.match(/^([+-]?[jJ])/),M!==null&&(m=M[0].length===1||M[0][0]==="+"?1:-1,v+=M[0].length);for(;u[v]===" ";)v++;if(_){if(u[v]!==")")throw new Sk.builtin.ValueError("complex() arg is malformed string");for(v++;u[v]===" ";)v++}if(u.length!==v)throw new Sk.builtin.ValueError("complex() arg is malformed string");return i($,m,f)};let c=(u,f,$,m)=>{let _=$|0;return m===0&&$===_?(100<_||-100>_?u=l(u,f,_,0):0<_?u=h(u,f,_):(u=h(u,f,-_),u=r(1,0,u.real,u.imag)),u):l(u,f,$,m)},o=n(c),d=n((u,f,$,m)=>c($,m,u,f));a.Py_DTSF_SIGN=1,a.Py_DTSF_ADD_DOT_0=2,a.Py_DTSF_ALT=4,a.Py_DTST_FINITE=0,a.Py_DTST_INFINITE=1,a.Py_DTST_NAN=2},function(p,g){Sk.builtin.slice=Sk.abstr.buildNativeClass("slice",{constructor:function(e,i,n){i===void 0&&n===void 0&&(i=e,e=Sk.builtin.none.none$),i===void 0&&(i=Sk.builtin.none.none$),n===void 0&&(n=Sk.builtin.none.none$),this.start=e,this.stop=i,this.step=n},slots:{tp$getattr:Sk.generic.getAttr,tp$doc:`slice(stop) +Convert to a string according to format_spec.`}}}),Sk.exportSymbol("Sk.builtin.complex",Sk.builtin.complex);let S=Sk.builtin.checkComplex,t=/_[eE]|[eE]_|\._|_\.|[+-]_|_j|j_/,s=/_(?=[^_])/g;Sk.builtin.complex.complex_subtype_from_string=function(u,f){f=f||Sk.builtin.complex.prototype;var $=0,m=0,_=!1;if(Sk.builtin.checkString(u))u=Sk.ffi.remapToJs(u);else if(typeof u!="string")throw new TypeError("provided unsupported string-alike argument");if(u.indexOf("\0")!==-1||u.length===0||u==="")throw new Sk.builtin.ValueError("complex() arg is a malformed string");var v=0;for(u=u.replace(/inf|infinity/gi,"Infinity"),u=u.replace(/nan/gi,"NaN");u[v]===" ";)v++;if(u[v]==="(")for(_=!0,v++;u[v]===" ";)v++;if(u.indexOf("_")!==-1){if(t.test(u))throw new Sk.builtin.ValueError("could not convert string to complex: '"+u+"'");u=u.charAt(0)+u.substring(1).replace(s,"")}var A=/^(?:[+-]?(?:(?:(?:\d*\.\d+)|(?:\d+\.?))(?:[eE][+-]?\d+)?|NaN|Infinity))/,N=u.substr(v),M=N.match(A);if(M!==null)if(v+=M[0].length,u[v]==="j"||u[v]==="J")m=parseFloat(M[0]),v++;else if(u[v]==="+"||u[v]==="-"){if($=parseFloat(M[0]),M=u.substr(v).match(A),M!==null?(m=parseFloat(M[0]),v+=M[0].length):(m=u[v]==="+"?1:-1,v++),u[v]!=="j"&&u[v]!=="J")throw new Sk.builtin.ValueError("complex() arg is malformed string");v++}else $=parseFloat(M[0]);else M=M=N.match(/^([+-]?[jJ])/),M!==null&&(m=M[0].length===1||M[0][0]==="+"?1:-1,v+=M[0].length);for(;u[v]===" ";)v++;if(_){if(u[v]!==")")throw new Sk.builtin.ValueError("complex() arg is malformed string");for(v++;u[v]===" ";)v++}if(u.length!==v)throw new Sk.builtin.ValueError("complex() arg is malformed string");return i($,m,f)};let c=(u,f,$,m)=>{let _=$|0;return m===0&&$===_?(100<_||-100>_?u=l(u,f,_,0):0<_?u=h(u,f,_):(u=h(u,f,-_),u=r(1,0,u.real,u.imag)),u):l(u,f,$,m)},o=n(c),d=n((u,f,$,m)=>c($,m,u,f));a.Py_DTSF_SIGN=1,a.Py_DTSF_ADD_DOT_0=2,a.Py_DTSF_ALT=4,a.Py_DTST_FINITE=0,a.Py_DTST_INFINITE=1,a.Py_DTST_NAN=2},function(p,b){Sk.builtin.slice=Sk.abstr.buildNativeClass("slice",{constructor:function(e,i,n){i===void 0&&n===void 0&&(i=e,e=Sk.builtin.none.none$),i===void 0&&(i=Sk.builtin.none.none$),n===void 0&&(n=Sk.builtin.none.none$),this.start=e,this.stop=i,this.step=n},slots:{tp$getattr:Sk.generic.getAttr,tp$doc:`slice(stop) slice(start, stop[, step]) Create a slice object. This is used for extended slicing (e.g. a[0:10:2]).`,tp$hash:Sk.builtin.none.none$,tp$new(e,i){return Sk.abstr.checkNoKwargs("slice",i),Sk.abstr.checkArgsLen("slice",e,1,3),new Sk.builtin.slice(...e)},$r(){let e=Sk.misceval.objectRepr(this.start),i=Sk.misceval.objectRepr(this.stop),n=Sk.misceval.objectRepr(this.step);return new Sk.builtin.str("slice("+e+", "+i+", "+n+")")},tp$richcompare(e,i){if(e.ob$type!==Sk.builtin.slice)return Sk.builtin.NotImplemented.NotImplemented$;let n=new Sk.builtin.tuple([this.start,this.stop,this.step]);return e=new Sk.builtin.tuple([e.start,e.stop,e.step]),n.tp$richcompare(e,i)}},getsets:{start:{$get(){return this.start}},step:{$get(){return this.step}},stop:{$get(){return this.stop}}},methods:{indices:{$meth:function(e){if(e=Sk.misceval.asIndexSized(e,Sk.builtin.OverflowError),0>e)throw new Sk.builtin.TypeError("length should not be negative");let{start:i,stop:n,step:r}=this.slice$indices(e);return new Sk.builtin.tuple([new Sk.builtin.int_(i),new Sk.builtin.int_(n),new Sk.builtin.int_(r)])},$doc:`S.indices(len) -> (start, stop, stride) @@ -497,7 +497,7 @@ Create a slice object. This is used for extended slicing (e.g. a[0:10:2]).`,tp$ Assuming a sequence of length len, calculate the start and stop indices, and the stride length of the extended slice described by S. Out of bounds indices are clipped in a manner consistent with the -handling of normal slices.`,$textsig:null,$flags:{OneArg:!0}}},proto:{slice$as_indices(e){let i;var n=e?r=>Sk.misceval.asIndexSized(r,null,"slice indices must be integers or None or have an __index__ method"):r=>Sk.misceval.asIndexOrThrow(r,"slice indices must be integers or None or have an __index__ method");if(Sk.builtin.checkNone(this.step))i=1;else if(i=n(this.step),i===0)throw new Sk.builtin.ValueError("slice step cannot be zero");return e=Sk.builtin.checkNone(this.start)?null:n(this.start),n=Sk.builtin.checkNone(this.stop)?null:n(this.stop),{start:e,stop:n,step:i}},$wrt(e,i,n,r,l){return l=l?h=>JSBI.__isBigInt(h)?JSBI.add(h,JSBI.BigInt(e)):h+e:h=>h+e,0i&&(i=l(i),0>i&&(i=0)),n===null||n>e?n=e:0>n&&(n=l(n))):(i===null||i>=e?i=e-1:0>i&&(i=l(i)),n===null?n=-1:0>n&&(n=l(n),0>n&&(n=-1))),{start:i,stop:n,step:r}},slice$indices(e,i){let{start:n,stop:r,step:l}=this.slice$as_indices(!0,i);return this.$wrt(e,n,r,l,i)},sssiter$(e,i){let{start:n,stop:r,step:l}=this.slice$indices(e,!0);if(0r;e+=l)i(e)}},flags:{sk$unacceptableBase:!0}}),Sk.builtin.slice.startEnd$wrt=function(e,i,n){return e=e.sq$length(),i===void 0||Sk.builtin.checkNone(i)?i=0:(i=Sk.misceval.asIndexSized(i,null,"slice indices must be integers or have an __index__ method"),0>i&&(i+=e,0>i&&(i=0))),n===void 0||Sk.builtin.checkNone(n)?n=e:(n=Sk.misceval.asIndexSized(n,null,"slice indices must be integers or have an __index__ method"),0>n?(n+=e,0>n&&(n=0)):n>e&&(n=e)),{start:i,end:n}}},function(p,g){function e(r){return function(l){return Sk.builtin.checkAnySet(l)?r.call(this,l):Sk.builtin.NotImplemented.NotImplemented$}}function i(r){return r instanceof Sk.builtin.set&&r.tp$hash===Sk.builtin.none.none$&&(r=new Sk.builtin.frozenset(Sk.misceval.arrayFromIterable(r))),r}p={},Sk.builtin.set=Sk.abstr.buildNativeClass("set",{constructor:function(r){r===void 0?r=[]:Array.isArray(r)||(r=Sk.misceval.arrayFromIterable(r)),Sk.asserts.assert(this instanceof Sk.builtin.set,"Bad call to set - must be called with an Array and 'new'");let l=[];for(let h=0;h new empty set object +handling of normal slices.`,$textsig:null,$flags:{OneArg:!0}}},proto:{slice$as_indices(e){let i;var n=e?r=>Sk.misceval.asIndexSized(r,null,"slice indices must be integers or None or have an __index__ method"):r=>Sk.misceval.asIndexOrThrow(r,"slice indices must be integers or None or have an __index__ method");if(Sk.builtin.checkNone(this.step))i=1;else if(i=n(this.step),i===0)throw new Sk.builtin.ValueError("slice step cannot be zero");return e=Sk.builtin.checkNone(this.start)?null:n(this.start),n=Sk.builtin.checkNone(this.stop)?null:n(this.stop),{start:e,stop:n,step:i}},$wrt(e,i,n,r,l){return l=l?h=>JSBI.__isBigInt(h)?JSBI.add(h,JSBI.BigInt(e)):h+e:h=>h+e,0i&&(i=l(i),0>i&&(i=0)),n===null||n>e?n=e:0>n&&(n=l(n))):(i===null||i>=e?i=e-1:0>i&&(i=l(i)),n===null?n=-1:0>n&&(n=l(n),0>n&&(n=-1))),{start:i,stop:n,step:r}},slice$indices(e,i){let{start:n,stop:r,step:l}=this.slice$as_indices(!0,i);return this.$wrt(e,n,r,l,i)},sssiter$(e,i){let{start:n,stop:r,step:l}=this.slice$indices(e,!0);if(0r;e+=l)i(e)}},flags:{sk$unacceptableBase:!0}}),Sk.builtin.slice.startEnd$wrt=function(e,i,n){return e=e.sq$length(),i===void 0||Sk.builtin.checkNone(i)?i=0:(i=Sk.misceval.asIndexSized(i,null,"slice indices must be integers or have an __index__ method"),0>i&&(i+=e,0>i&&(i=0))),n===void 0||Sk.builtin.checkNone(n)?n=e:(n=Sk.misceval.asIndexSized(n,null,"slice indices must be integers or have an __index__ method"),0>n?(n+=e,0>n&&(n=0)):n>e&&(n=e)),{start:i,end:n}}},function(p,b){function e(r){return function(l){return Sk.builtin.checkAnySet(l)?r.call(this,l):Sk.builtin.NotImplemented.NotImplemented$}}function i(r){return r instanceof Sk.builtin.set&&r.tp$hash===Sk.builtin.none.none$&&(r=new Sk.builtin.frozenset(Sk.misceval.arrayFromIterable(r))),r}p={},Sk.builtin.set=Sk.abstr.buildNativeClass("set",{constructor:function(r){r===void 0?r=[]:Array.isArray(r)||(r=Sk.misceval.arrayFromIterable(r)),Sk.asserts.assert(this instanceof Sk.builtin.set,"Bad call to set - must be called with an Array and 'new'");let l=[];for(let h=0;h new empty set object set(iterable) -> new set object Build an unordered collection of unique elements.`,tp$init(r,l){return Sk.abstr.checkNoKwargs("set",l),Sk.abstr.checkArgsLen("set",r,0,1),this.set$clear(),(r=r[0])&&this.set$update(r)},tp$new:Sk.generic.new,$r(){if(this.in$repr)return new Sk.builtin.str(Sk.abstr.typeName(this)+"(...)");this.in$repr=!0;let r=this.sk$asarray().map(l=>Sk.misceval.objectRepr(l));return this.in$repr=!1,Sk.__future__.python3?r.length===0?new Sk.builtin.str(Sk.abstr.typeName(this)+"()"):this.ob$type!==Sk.builtin.set?new Sk.builtin.str(Sk.abstr.typeName(this)+"({"+r.join(", ")+"})"):new Sk.builtin.str("{"+r.join(", ")+"}"):new Sk.builtin.str(Sk.abstr.typeName(this)+"(["+r.join(", ")+"])")},tp$iter(){return new n(this)},tp$richcompare(r,l){if(!Sk.builtin.checkAnySet(r))return Sk.builtin.NotImplemented.NotImplemented$;switch(l){case"NotEq":case"Eq":return r=this===r?!0:this.get$size()!==r.get$size()?!1:Sk.misceval.isTrue(this.set$issubset(r)),l==="Eq"?r:!r;case"LtE":return this===r||Sk.misceval.isTrue(this.set$issubset(r));case"GtE":return this===r||Sk.misceval.isTrue(r.set$issubset(this));case"Lt":return this.get$size()r.get$size()&&Sk.misceval.isTrue(r.set$issubset(this))}},nb$subtract:e(function(r){return this.difference.$meth.call(this,r)}),nb$and:e(function(r){return this.intersection.$meth.call(this,r)}),nb$or:e(function(r){return this.union.$meth.call(this,r)}),nb$xor:e(function(r){return this.symmetric_difference.$meth.call(this,r)}),nb$inplace_subtract:e(function(r){return r===this&&(r=r.set$copy()),Sk.misceval.chain(this.difference_update.$meth.call(this,r),()=>this)}),nb$inplace_and:e(function(r){return Sk.misceval.chain(this.intersection_update.$meth.call(this,r),()=>this)}),nb$inplace_or:e(function(r){return Sk.misceval.chain(this.update.$meth.call(this,r),()=>this)}),nb$inplace_xor:e(function(r){return r===this&&(r=r.set$copy()),Sk.misceval.chain(this.symmetric_difference_update.$meth.call(this,r),()=>this)}),sq$length(){return this.get$size()},sq$contains(r){return r=i(r),this.v.sq$contains(r)}},methods:{add:{$meth(r){return this.set$add(r),Sk.builtin.none.none$},$flags:{OneArg:!0},$textsig:null,$doc:`Add an element to a set. @@ -515,17 +515,17 @@ If the element is not a member, raise a KeyError.`},symmetric_difference:{$meth( (i.e. all elements that are in exactly one of the sets.)`},symmetric_difference_update:{$meth(r){return Sk.builtin.checkAnySet(r)||(r=this.set$make_basetype(r)),Sk.misceval.chain(r,l=>this.set$symmetric_diff_update(l),()=>Sk.builtin.none.none$)},$flags:{OneArg:!0},$textsig:null,$doc:"Update a set with the symmetric difference of itself and another."},union:{$meth(...r){let l=this.set$copy();return Sk.misceval.chain(Sk.misceval.iterArray(r,h=>l.set$update(h)),()=>l)},$flags:{MinArgs:0},$textsig:null,$doc:`Return the union of sets as a new set. -(i.e. all elements that are in either set.)`},update:{$meth(...r){return Sk.misceval.chain(Sk.misceval.iterArray(r,l=>this.set$update(l)),()=>Sk.builtin.none.none$)},$flags:{MinArgs:0},$textsig:null,$doc:"Update a set with the union of itself and others."}},classmethods:Sk.generic.classGetItem,proto:Object.assign(p,{sk$asarray(){return this.v.sk$asarray()},get$size(){return this.v.sq$length()},set$add(r){this.v.mp$ass_subscript(r,!0)},set$make_basetype(r){return Sk.misceval.chain(Sk.misceval.arrayFromIterable(r,!0),l=>new this.sk$builtinBase(l))},set$discard(r){return this.v.pop$item(r)},set$clear(){this.v.dict$clear()},set$copy(){let r=new this.sk$builtinBase;return r.v=this.v.dict$copy(),r},set$difference_update(r){return Sk.misceval.iterFor(Sk.abstr.iter(r),l=>{this.set$discard(l)})},set$intersection(r){let l=new this.sk$builtinBase;return Sk.misceval.chain(Sk.misceval.iterFor(Sk.abstr.iter(r),h=>{this.sq$contains(h)&&l.set$add(h)}),()=>l)},set$intersection_multi(...r){if(!r.length)return this.set$copy();let l=this;return Sk.misceval.chain(Sk.misceval.iterArray(r,h=>Sk.misceval.chain(l.set$intersection(h),a=>{l=a})),()=>l)},set$issubset(r){let l=this.get$size(),h=r.get$size();if(l>h)return Sk.builtin.bool.false$;for(let a=this.tp$iter(),S=a.tp$iternext();S!==void 0;S=a.tp$iternext())if(!r.sq$contains(S))return Sk.builtin.bool.false$;return Sk.builtin.bool.true$},set$symmetric_diff_update(r){return Sk.misceval.iterFor(Sk.abstr.iter(r),l=>{this.set$discard(l)===void 0&&this.set$add(l)})},set$update(r){return Sk.misceval.iterFor(Sk.abstr.iter(r),l=>{this.set$add(l)})},swap$bodies(r){this.v=r.v}})}),Sk.exportSymbol("Sk.builtin.set",Sk.builtin.set),g=Sk.builtin.set.prototype,Sk.builtin.frozenset=Sk.abstr.buildNativeClass("frozenset",{constructor:function(r){r===void 0?r=[]:Array.isArray(r)||(r=Sk.misceval.arrayFromIterable(r)),Sk.asserts.assert(this instanceof Sk.builtin.frozenset,"bad call to frozen set - must be called with 'new'");let l=[];for(let h=0;h empty frozenset object +(i.e. all elements that are in either set.)`},update:{$meth(...r){return Sk.misceval.chain(Sk.misceval.iterArray(r,l=>this.set$update(l)),()=>Sk.builtin.none.none$)},$flags:{MinArgs:0},$textsig:null,$doc:"Update a set with the union of itself and others."}},classmethods:Sk.generic.classGetItem,proto:Object.assign(p,{sk$asarray(){return this.v.sk$asarray()},get$size(){return this.v.sq$length()},set$add(r){this.v.mp$ass_subscript(r,!0)},set$make_basetype(r){return Sk.misceval.chain(Sk.misceval.arrayFromIterable(r,!0),l=>new this.sk$builtinBase(l))},set$discard(r){return this.v.pop$item(r)},set$clear(){this.v.dict$clear()},set$copy(){let r=new this.sk$builtinBase;return r.v=this.v.dict$copy(),r},set$difference_update(r){return Sk.misceval.iterFor(Sk.abstr.iter(r),l=>{this.set$discard(l)})},set$intersection(r){let l=new this.sk$builtinBase;return Sk.misceval.chain(Sk.misceval.iterFor(Sk.abstr.iter(r),h=>{this.sq$contains(h)&&l.set$add(h)}),()=>l)},set$intersection_multi(...r){if(!r.length)return this.set$copy();let l=this;return Sk.misceval.chain(Sk.misceval.iterArray(r,h=>Sk.misceval.chain(l.set$intersection(h),a=>{l=a})),()=>l)},set$issubset(r){let l=this.get$size(),h=r.get$size();if(l>h)return Sk.builtin.bool.false$;for(let a=this.tp$iter(),S=a.tp$iternext();S!==void 0;S=a.tp$iternext())if(!r.sq$contains(S))return Sk.builtin.bool.false$;return Sk.builtin.bool.true$},set$symmetric_diff_update(r){return Sk.misceval.iterFor(Sk.abstr.iter(r),l=>{this.set$discard(l)===void 0&&this.set$add(l)})},set$update(r){return Sk.misceval.iterFor(Sk.abstr.iter(r),l=>{this.set$add(l)})},swap$bodies(r){this.v=r.v}})}),Sk.exportSymbol("Sk.builtin.set",Sk.builtin.set),b=Sk.builtin.set.prototype,Sk.builtin.frozenset=Sk.abstr.buildNativeClass("frozenset",{constructor:function(r){r===void 0?r=[]:Array.isArray(r)||(r=Sk.misceval.arrayFromIterable(r)),Sk.asserts.assert(this instanceof Sk.builtin.frozenset,"bad call to frozen set - must be called with 'new'");let l=[];for(let h=0;h empty frozenset object frozenset(iterable) -> frozenset object -Build an immutable unordered collection of unique elements.`,tp$hash(){let r=1927868237,l=this.sk$asarray();r*=l.length+1;for(let h=0;hh.length?new Sk.builtin.frozenset(h):Sk.builtin.frozenset.$emptyset))},$r:g.$r,tp$iter:g.tp$iter,tp$richcompare:g.tp$richcompare,nb$subtract:g.nb$subtract,nb$and:g.nb$and,nb$or:g.nb$or,nb$xor:g.nb$xor,sq$length:g.sq$length,sq$contains:g.sq$contains},methods:{copy:Object.assign({},g.copy.d$def,{$meth(){return this.constructor===this.sk$builtinBase?this:new Sk.builtin.frozenset(this.sk$asarray())}}),difference:g.difference.d$def,intersection:g.intersection.d$def,isdisjoint:g.isdisjoint.d$def,issubset:g.issubset.d$def,issuperset:g.issuperset.d$def,symmetric_difference:g.symmetric_difference.d$def,union:g.union.d$def},classmethods:Sk.generic.classGetItem,proto:Object.assign({$subtype_new(r,l){let h=new this.constructor;return Sk.misceval.chain(Sk.builtin.frozenset.prototype.tp$new(r),a=>(h.v=a.v,h))}},p)}),Sk.builtin.frozenset.$emptyset=new Sk.builtin.frozenset([]),Sk.exportSymbol("Sk.builtin.frozenset",Sk.builtin.frozenset);var n=Sk.abstr.buildIteratorClass("set_iterator",{constructor:function(r){this.$index=0,this.$seq=r.sk$asarray(),this.$orig=r},iternext:Sk.generic.iterNextWithArrayCheckSize,methods:{__length_hint__:Sk.generic.iterLengthHintWithArrayMethodDef},flags:{sk$unacceptableBase:!0}})},function(p,g){Sk.builtin.print=function(e,i){let[n,r,l]=Sk.abstr.copyKeywordsToNamedArgs("print",["sep","end","file","flush"],[],i);if(n===void 0||Sk.builtin.checkNone(n))n=" ";else if(Sk.builtin.checkString(n))n=n.$jsstr();else throw new Sk.builtin.TypeError("sep must be None or a string, not "+Sk.abstr.typeName(n));if(r===void 0||Sk.builtin.checkNone(r))r=` -`;else if(Sk.builtin.checkString(r))r=r.$jsstr();else throw new Sk.builtin.TypeError("end must be None or a string, not "+Sk.abstr.typeName(r));let h;if(l!==void 0&&!Sk.builtin.checkNone(l)&&(h=Sk.abstr.lookupSpecial(l,Sk.builtin.str.$write),h===void 0))throw new Sk.builtin.AttributeError("'"+Sk.abstr.typeName(l)+"' object has no attribute 'write'");let a=new Sk.builtin.str(e.map(S=>new Sk.builtin.str(S).toString()).join(n)+r);if(h!==void 0)Sk.misceval.callsimArray(h,[a]);else return Sk.misceval.chain(Sk.importModule("sys",!1,!0),S=>(h=Sk.abstr.lookupSpecial(S.$d.stdout,Sk.builtin.str.$write))&&Sk.misceval.callsimOrSuspendArray(h,[a]))},Sk.builtin.print.co_fastcall=1},function(p,g){Sk.builtin.module=Sk.abstr.buildNativeClass("module",{constructor:function(){this.$d={}},slots:{tp$doc:`Create a module object. +Build an immutable unordered collection of unique elements.`,tp$hash(){let r=1927868237,l=this.sk$asarray();r*=l.length+1;for(let h=0;hh.length?new Sk.builtin.frozenset(h):Sk.builtin.frozenset.$emptyset))},$r:b.$r,tp$iter:b.tp$iter,tp$richcompare:b.tp$richcompare,nb$subtract:b.nb$subtract,nb$and:b.nb$and,nb$or:b.nb$or,nb$xor:b.nb$xor,sq$length:b.sq$length,sq$contains:b.sq$contains},methods:{copy:Object.assign({},b.copy.d$def,{$meth(){return this.constructor===this.sk$builtinBase?this:new Sk.builtin.frozenset(this.sk$asarray())}}),difference:b.difference.d$def,intersection:b.intersection.d$def,isdisjoint:b.isdisjoint.d$def,issubset:b.issubset.d$def,issuperset:b.issuperset.d$def,symmetric_difference:b.symmetric_difference.d$def,union:b.union.d$def},classmethods:Sk.generic.classGetItem,proto:Object.assign({$subtype_new(r,l){let h=new this.constructor;return Sk.misceval.chain(Sk.builtin.frozenset.prototype.tp$new(r),a=>(h.v=a.v,h))}},p)}),Sk.builtin.frozenset.$emptyset=new Sk.builtin.frozenset([]),Sk.exportSymbol("Sk.builtin.frozenset",Sk.builtin.frozenset);var n=Sk.abstr.buildIteratorClass("set_iterator",{constructor:function(r){this.$index=0,this.$seq=r.sk$asarray(),this.$orig=r},iternext:Sk.generic.iterNextWithArrayCheckSize,methods:{__length_hint__:Sk.generic.iterLengthHintWithArrayMethodDef},flags:{sk$unacceptableBase:!0}})},function(p,b){Sk.builtin.print=function(e,i){let[n,r,l]=Sk.abstr.copyKeywordsToNamedArgs("print",["sep","end","file","flush"],[],i);if(n===void 0||Sk.builtin.checkNone(n))n=" ";else if(Sk.builtin.checkString(n))n=n.$jsstr();else throw new Sk.builtin.TypeError("sep must be None or a string, not "+Sk.abstr.typeName(n));if(r===void 0||Sk.builtin.checkNone(r))r=` +`;else if(Sk.builtin.checkString(r))r=r.$jsstr();else throw new Sk.builtin.TypeError("end must be None or a string, not "+Sk.abstr.typeName(r));let h;if(l!==void 0&&!Sk.builtin.checkNone(l)&&(h=Sk.abstr.lookupSpecial(l,Sk.builtin.str.$write),h===void 0))throw new Sk.builtin.AttributeError("'"+Sk.abstr.typeName(l)+"' object has no attribute 'write'");let a=new Sk.builtin.str(e.map(S=>new Sk.builtin.str(S).toString()).join(n)+r);if(h!==void 0)Sk.misceval.callsimArray(h,[a]);else return Sk.misceval.chain(Sk.importModule("sys",!1,!0),S=>(h=Sk.abstr.lookupSpecial(S.$d.stdout,Sk.builtin.str.$write))&&Sk.misceval.callsimOrSuspendArray(h,[a]))},Sk.builtin.print.co_fastcall=1},function(p,b){Sk.builtin.module=Sk.abstr.buildNativeClass("module",{constructor:function(){this.$d={}},slots:{tp$doc:`Create a module object. The name must be a string; the optional doc argument can have any type.`,tp$getattr(e,i){var n=this.$d[e.$mangled];if(n!==void 0)return n;if(n=this.ob$type.$typeLookup(e),n!==void 0){let l=n.tp$descr_get;return l?l.call(n,this,this.ob$type,i):n}let r=this.$d.__getattr__;if(r!==void 0)return n=Sk.misceval.tryCatch(()=>Sk.misceval.callsimOrSuspendArray(r,[e]),l=>{if(!(l instanceof Sk.builtin.AttributeError))throw l}),i?n:Sk.misceval.retryOptionalSuspensionOrThrow(n)},tp$setattr:Sk.generic.setAttr,tp$new:Sk.generic.new,tp$init(e,i){let[n,r]=Sk.abstr.copyKeywordsToNamedArgs("module",["name","doc"],e,i,[Sk.builtin.none.none$]);Sk.builtin.pyCheckType("module","string",n),this.init$dict(n,r)},$r(){let e=this.get$name();if(e!==void 0){var i=this.get$mod_reprf();if(i!==void 0)return Sk.misceval.callsimOrSuspendArray(i,[this])}return e=e===void 0?"'?'":e,i=this.from$file(),i=i===void 0?this.empty_or$loader():i,new Sk.builtin.str("")}},getsets:{__dict__:{$get(){return new Sk.builtin.mappingproxy(this.$d)}}},methods:{__dir__:{$meth(){let e=this.tp$getattr(Sk.builtin.str.$dict);if(!Sk.builtin.checkMapping(e))throw new Sk.builtin.TypeError("__dict__ is not a dictionary");let i=e.mp$lookup(Sk.builtin.str.$dir);return i!==void 0?Sk.misceval.callsimOrSuspendArray(i,[]):new Sk.builtin.list(Sk.misceval.arrayFromIterable(e))},$flags:{NoArgs:!0},$doc:`__dir__() -> list -specialized dir() implementation`}},proto:{sk$hasDict:!0,init$dict(e,i){this.$d.__name__=e,this.$d.__doc__=i,this.$d.__package__=Sk.builtin.none.none$,this.$d.__spec__=Sk.builtin.none.none$,this.$d.__loader__=Sk.builtin.none.none$},sk$attrError(){let e=this.get$name();return e=e===void 0?"module":"module "+e,this.$initializing&&(e="(most likely due to a circular import) partially initialized "+e),e},get$name(){let e=this.tp$getattr(Sk.builtin.str.$name);return e&&Sk.misceval.objectRepr(e)},from$file(){let e=this.tp$getattr(Sk.builtin.str.$file);return e&&" from "+Sk.misceval.objectRepr(e)},empty_or$loader(){if(this.$js&&this.$js.includes("$builtinmodule"))return" (built-in)";let e=this.tp$getattr(Sk.builtin.str.$loader);return e===void 0||Sk.builtin.checkNone(e)?"":" ("+Sk.misceval.objectRepr(e)+")"},get$mod_reprf(){let e=this.tp$getattr(Sk.builtin.str.$loader);return e&&e.tp$getattr(this.str$mod_repr)},str$mod_repr:new Sk.builtin.str("module_repr")}}),Sk.exportSymbol("Sk.builtin.module",Sk.builtin.module)},function(p,g){Sk.builtin.structseq_types={},Sk.builtin.make_structseq=function(e,i,n,r,l){r=r===void 0?{}:r,l=l===void 0?null:l;let h=e+"."+i,a=[],S={};Object.keys(n).forEach((o,d)=>{a.push(o),S[o]={$get(){return this.v[d]},$doc:n[o]}});let t=a.length,s=t;Object.keys(r).forEach((o,d)=>{S[o]={$get(){return this.$hidden[d]||Sk.builtin.none.none$},$doc:r[o]},s++});var c=Sk.abstr.buildNativeClass(h,{constructor:function(o,d){Sk.asserts.assert(this instanceof c),Sk.builtin.tuple.call(this,o),this.$hidden=d||[]},base:Sk.builtin.tuple,slots:{tp$new(o,d){if(Sk.abstr.checkOneArg(h,o,d),o=Sk.misceval.arrayFromIterable(o[0]),o.lengths)throw new Sk.builtin.TypeError(h+"() takes an at most "+s+"-sequence ("+o.length+"-sequence given)");return new c(o.slice(0,t),o.slice(t))},tp$doc:l||Sk.builtin.none.none$,$r(){var o;if(this.v.length===0)return new Sk.builtin.str(h+"()");var d=[];for(o=0;o")}},iternext(e,i){var n=this;if(this.gi$running)throw new Sk.builtin.ValueError("generator already executing");return this.gi$running=!0,i===void 0&&(i=Sk.builtin.none.none$),this.gi$sentvalue=i,i=[this],this.func_closure&&i.push(this.func_closure),function r(l){if(l instanceof Sk.misceval.Suspension){if(e)return new Sk.misceval.Suspension(r,l);l=Sk.misceval.retryOptionalSuspensionOrThrow(l)}if(n.gi$running=!1,Sk.asserts.assert(l!==void 0),Array.isArray(l))return n.gi$resumeat=l[0],l=l[1];n.gi$ret=l}(this.func_code.apply(this.func_globals,i))},methods:{send:{$meth(e){return Sk.misceval.chain(this.tp$iternext(!0,e),i=>{if(i===void 0)throw i=this.gi$ret,i!==void 0&&i!==Sk.builtin.none.none$?new Sk.builtin.StopIteration(i):new Sk.builtin.StopIteration;return i})},$flags:{OneArg:!0},$doc:`send(arg) -> send 'arg' into generator, -return next yielded value or raise StopIteration.`}}}),Sk.exportSymbol("Sk.builtin.generator",Sk.builtin.generator),Sk.builtin.makeGenerator=function(e,i){var n,r=new Sk.builtin.generator(null,null,null);r.tp$iternext=e;for(n in i)i.hasOwnProperty(n)&&(r[n]=i[n]);return r},Sk.exportSymbol("Sk.builtin.makeGenerator",Sk.builtin.makeGenerator)},function(p,g){Sk.builtin.file=function(e,i,n){var r;if(!(this instanceof Sk.builtin.file))return new Sk.builtin.file(e,i,n);if(this.mode=i,this.name=Sk.ffi.remapToJs(e),this.closed=!1,this.name==="/dev/stdout")this.data$=Sk.builtin.none.none$,this.fileno=1;else if(this.name==="/dev/stdin")this.fileno=0;else if(this.name==="/dev/stderr")this.fileno=2;else{if(Sk.inBrowser)if(this.fileno=10,n=document.getElementById(e.v),n==null)if(i.v=="w"||i.v=="a")this.data$="";else throw new Sk.builtin.IOError("[Errno 2] No such file or directory: '"+e.v+"'");else n.nodeName.toLowerCase()=="textarea"?this.data$=n.value:this.data$=n.textContent;else this.fileno=11,this.data$=Sk.read(e.v);this.lineList=this.data$.split(` +specialized dir() implementation`}},proto:{sk$hasDict:!0,init$dict(e,i){this.$d.__name__=e,this.$d.__doc__=i,this.$d.__package__=Sk.builtin.none.none$,this.$d.__spec__=Sk.builtin.none.none$,this.$d.__loader__=Sk.builtin.none.none$},sk$attrError(){let e=this.get$name();return e=e===void 0?"module":"module "+e,this.$initializing&&(e="(most likely due to a circular import) partially initialized "+e),e},get$name(){let e=this.tp$getattr(Sk.builtin.str.$name);return e&&Sk.misceval.objectRepr(e)},from$file(){let e=this.tp$getattr(Sk.builtin.str.$file);return e&&" from "+Sk.misceval.objectRepr(e)},empty_or$loader(){if(this.$js&&this.$js.includes("$builtinmodule"))return" (built-in)";let e=this.tp$getattr(Sk.builtin.str.$loader);return e===void 0||Sk.builtin.checkNone(e)?"":" ("+Sk.misceval.objectRepr(e)+")"},get$mod_reprf(){let e=this.tp$getattr(Sk.builtin.str.$loader);return e&&e.tp$getattr(this.str$mod_repr)},str$mod_repr:new Sk.builtin.str("module_repr")}}),Sk.exportSymbol("Sk.builtin.module",Sk.builtin.module)},function(p,b){Sk.builtin.structseq_types={},Sk.builtin.make_structseq=function(e,i,n,r,l){r=r===void 0?{}:r,l=l===void 0?null:l;let h=e+"."+i,a=[],S={};Object.keys(n).forEach((o,d)=>{a.push(o),S[o]={$get(){return this.v[d]},$doc:n[o]}});let t=a.length,s=t;Object.keys(r).forEach((o,d)=>{S[o]={$get(){return this.$hidden[d]||Sk.builtin.none.none$},$doc:r[o]},s++});var c=Sk.abstr.buildNativeClass(h,{constructor:function(o,d){Sk.asserts.assert(this instanceof c),Sk.builtin.tuple.call(this,o),this.$hidden=d||[]},base:Sk.builtin.tuple,slots:{tp$new(o,d){if(Sk.abstr.checkOneArg(h,o,d),o=Sk.misceval.arrayFromIterable(o[0]),o.lengths)throw new Sk.builtin.TypeError(h+"() takes an at most "+s+"-sequence ("+o.length+"-sequence given)");return new c(o.slice(0,t),o.slice(t))},tp$doc:l||Sk.builtin.none.none$,$r(){var o;if(this.v.length===0)return new Sk.builtin.str(h+"()");var d=[];for(o=0;o")}},iternext(e,i){var n=this;if(this.gi$running)throw new Sk.builtin.ValueError("generator already executing");return this.gi$running=!0,i===void 0&&(i=Sk.builtin.none.none$),this.gi$sentvalue=i,i=[this],this.func_closure&&i.push(this.func_closure),function r(l){if(l instanceof Sk.misceval.Suspension){if(e)return new Sk.misceval.Suspension(r,l);l=Sk.misceval.retryOptionalSuspensionOrThrow(l)}if(n.gi$running=!1,Sk.asserts.assert(l!==void 0),Array.isArray(l))return n.gi$resumeat=l[0],l=l[1];n.gi$ret=l}(this.func_code.apply(this.func_globals,i))},methods:{send:{$meth(e){return Sk.misceval.chain(this.tp$iternext(!0,e),i=>{if(i===void 0)throw i=this.gi$ret,i!==void 0&&i!==Sk.builtin.none.none$?new Sk.builtin.StopIteration(i):new Sk.builtin.StopIteration;return i})},$flags:{OneArg:!0},$doc:`send(arg) -> send 'arg' into generator, +return next yielded value or raise StopIteration.`}}}),Sk.exportSymbol("Sk.builtin.generator",Sk.builtin.generator),Sk.builtin.makeGenerator=function(e,i){var n,r=new Sk.builtin.generator(null,null,null);r.tp$iternext=e;for(n in i)i.hasOwnProperty(n)&&(r[n]=i[n]);return r},Sk.exportSymbol("Sk.builtin.makeGenerator",Sk.builtin.makeGenerator)},function(p,b){Sk.builtin.file=function(e,i,n){var r;if(!(this instanceof Sk.builtin.file))return new Sk.builtin.file(e,i,n);if(this.mode=i,this.name=Sk.ffi.remapToJs(e),this.closed=!1,this.name==="/dev/stdout")this.data$=Sk.builtin.none.none$,this.fileno=1;else if(this.name==="/dev/stdin")this.fileno=0;else if(this.name==="/dev/stderr")this.fileno=2;else{if(Sk.inBrowser)if(this.fileno=10,n=document.getElementById(e.v),n==null)if(i.v=="w"||i.v=="a")this.data$="";else throw new Sk.builtin.IOError("[Errno 2] No such file or directory: '"+e.v+"'");else n.nodeName.toLowerCase()=="textarea"?this.data$=n.value:this.data$=n.textContent;else this.fileno=11,this.data$=Sk.read(e.v);this.lineList=this.data$.split(` `),this.lineList=this.lineList.slice(0,-1);for(r in this.lineList)this.lineList[r]+=` -`;this.currentLine=0}return this.pos$=0,Sk.fileopen&&10<=this.fileno&&Sk.fileopen(this),this},Sk.abstr.setUpInheritance("file",Sk.builtin.file,Sk.builtin.object),Sk.abstr.setUpBuiltinMro(Sk.builtin.file),Sk.builtin.file.prototype.$r=function(){return new Sk.builtin.str("<"+(this.closed?"closed":"open")+"file '"+this.name+"', mode '"+Sk.ffi.remapToJs(this.mode)+"'>")},Sk.builtin.file.prototype.tp$iter=function(){var e={tp$iter:function(){return e},$obj:this,$index:this.currentLine,$lines:this.lineList,tp$iternext:function(){if(!(e.$index>=e.$lines.length))return new Sk.builtin.str(e.$lines[e.$index++])}};return e},Sk.abstr.setUpSlots(Sk.builtin.file),Sk.builtin.file.prototype.__enter__=new Sk.builtin.func(function(e){return e}),Sk.builtin.file.prototype.__exit__=new Sk.builtin.func(function(e){return Sk.misceval.callsimArray(Sk.builtin.file.prototype.close,[e])}),Sk.builtin.file.prototype.close=new Sk.builtin.func(function(e){return e.closed=!0,Sk.builtin.none.none$}),Sk.builtin.file.prototype.flush=new Sk.builtin.func(function(e){}),Sk.builtin.file.prototype.fileno=new Sk.builtin.func(function(e){return this.fileno}),Sk.builtin.file.prototype.isatty=new Sk.builtin.func(function(e){return!1}),Sk.builtin.file.prototype.read=new Sk.builtin.func(function(e,i){var n=e.data$.length;if(e.closed)throw new Sk.builtin.ValueError("I/O operation on closed file");var r=i===void 0?n:Sk.ffi.remapToJs(i);return r=new Sk.builtin.str(e.data$.substr(e.pos$,r)),e.pos$=i===void 0?n:e.pos$+Sk.ffi.remapToJs(i),e.pos$>=n&&(e.pos$=n),r}),Sk.builtin.file.$readline=function(e,i,n){if(e.fileno===0){if(e=Sk.ffi.remapToJs(n),e=Sk.inputfun(e||""),e instanceof Promise||e&&typeof e.then=="function"){var r=new Sk.misceval.Suspension;return r.resume=function(){if(r.data.error)throw r.data.error;return new Sk.builtin.str(r.data.result)},r.data={type:"Sk.promise",promise:e},r}return new Sk.builtin.str(e)}return i="",e.currentLinee(E,q)));if(X==="object"){if(X=B.constructor,X===Object&&Object.getPrototypeOf(B)===m||X===void 0)return q.dictHook?q.dictHook(B):S(B,q);if(X===Uint8Array)return new Sk.builtin.bytes(B);if(X===Set)return q.setHook?q.setHook(B):a(B,q);if(X===Map){if(q.mapHook)return q.mapHook(B);let E=new Sk.builtin.dict;return B.forEach((y,T)=>{E.mp$ass_subscript(e(T,q),e(y,q))}),E}return X===Sk.misceval.Suspension?B:q.proxyHook?q.proxyHook(B):t(B)}if(q.unhandledHook)return q.unhandledHook(B);Sk.asserts.fail("unhandled remap case of type "+X)}function i(B,q){if(B==null)return B;let X=B.valueOf();if(X===null)return X;let E=typeof X;if(q=q||{},E==="string")return q.stringHook?q.stringHook(X):X;if(E==="symbol"||E==="boolean")return X;if(E==="number")return q.numberHook?q.numberHook(X,B):X;if(JSBI.__isBigInt(X))return q.bigintHook?q.bigintHook(X,B):X;if(Array.isArray(X))return q.arrayHook?q.arrayHook(X,B):X.map(y=>i(y,q));if(X.sk$object)return B instanceof Sk.builtin.dict?q.dictHook?q.dictHook(B):r(B,q):B instanceof Sk.builtin.set?q.setHook?q.setHook(B):new Set(n(B,q)):q.unhandledHook?q.unhandledHook(B):void 0;if(E==="object")return q.objectHook?q.objectHook(X,B):X;if(E==="function")return q.funcHook?q.funcHook(X,B):X;Sk.asserts.fail("unhandled type "+E)}function n(B,q){return Array.from(B,X=>i(X,q))}function r(B,q){let X={};return B.$items().forEach(E=>{var[y,T]=E;X[y.valueOf()]=i(T,q)}),X}function l(B){return Number.isInteger(B)?Math.abs(B)e(X,q)))}function a(B,q){return new Sk.builtin.set(Array.from(B,X=>e(X,q)))}function S(B,q){let X=new Sk.builtin.dict;return Object.entries(B).forEach(E=>{var[y,T]=E;X.mp$ass_subscript(new Sk.builtin.str(y),e(T,q))}),X}function t(B,q){if(B==null)return Sk.builtin.none.none$;var X=typeof B;if(X!=="object"&&X!=="function")return e(B);q=q||{};let E=M.get(B);if(E){if(q.bound===E.$bound)return E;q.name||(q.name=E.$name)}return X==="function"?q=new P(B,q):Array.isArray(B)?q=new J(B):(X=Object.getPrototypeOf(B),q=X===v?new L(B):X===A?new K(B):new P(B,q)),M.set(B,q),q}function s(B,q){B=B.toString(),q===void 0?delete this.js$wrapped[B]:this.js$wrapped[B]=i(q,F)}function c(B){return Sk.generic.getAttr.call(this,B)||this.$lookup(B)}function o(){this.js$wrapped.clear()}function d(){return Sk.misceval.callsimOrSuspendArray(Sk.builtin.dict,[this])}function u(){return this.js$wrapped.size}function f(B){if(B=i(B,F),this.js$wrapped.has(B))return this.proxy$getItem(B)}function $(B){if(B=i(B,F),this.js$wrapped.has(B)){let q=this.proxy$getItem(B);return this.js$wrapped.delete(B),q}}Sk.ffi={remapToPy:e,remapToJs:i,remapToJsOrWrap:function(B){return i(B,F)},toPy:e,toJs:i,isTrue:function(B){return B!=null&&B.nb$bool?B.nb$bool():B.sq$length?B.sq$length()!==0:!!B},toJsString:function(B){return String(B)},toJsNumber:function(B){return Number(B)},toJsArray:n,toJsHashMap:r,toPyDict:S,toPyFloat:function(B){return new Sk.builtin.float_(Number(B))},toPyInt:function(B){if(typeof B=="number")return B=Math.trunc(B),Math.abs(B)e(X,q)))},toPySet:a,numberToPy:l,proxy:t};let m=Object.prototype,_=Function.prototype,v=Map.prototype,A=Set.prototype,N=/^-?\d+$/,M=new WeakMap,R=new WeakMap,H=B=>t(B),ee=B=>Object.isFrozen(B)?h(B,k):t(B),Y=B=>String(B),k={arrayHook:ee,dictHook:H,unhandledHook:Y,setHook:H,mapHook:H},x=(B,q)=>({dictHook:H,funcHook:X=>t(X,{bound:B,name:q}),unhandledHook:Y,arrayHook:ee,setHook:H,mapHook:H}),C=B=>({dictHook:H,proxyHook:q=>t(q,{name:B}),arrayHook:ee,setHook:H,mapHook:H}),F={unhandledHook:B=>{var q=M.get(B);if(q)return q;if(q={v:B,$isPyWrapped:!0,unwrap:()=>B},B.tp$call===void 0)return M.set(B,q),q;if(B.ob$type===Sk.builtin.method){var X=B.im_self,E=B.im_func;let y=R.get(X);if(y===void 0&&(y=new Map,R.set(X,y)),X=y.get(E),X===void 0)X=B,y.set(E,B);else if(B=X,E=M.get(B))return E}return E=(...y)=>{y=y.map(I=>e(I,k));let T=Sk.misceval.tryCatch(()=>Sk.misceval.chain(B.tp$call(y),I=>i(I,F)),I=>{if(Sk.uncaughtException)Sk.uncaughtException(I);else throw I});for(;T instanceof Sk.misceval.Suspension;){if(!T.optional)return Sk.misceval.asyncToPromise(()=>T);T=T.resume()}return T},M.set(B,Object.assign(E,q)),E},arrayHook:B=>B[ie]||B.map(q=>i(q,F))};p={__dir__:{$meth:function(){let B=[];for(var q=this.js$wrapped;q!=null&&q!==m&&q!==_;)B.push(...Object.getOwnPropertyNames(q)),q=Object.getPrototypeOf(q);return q=n(Sk.misceval.callsimArray(Sk.builtin.type.prototype.__dir__,[this.ob$type])),new h(new Set([...q,...B]))},$flags:{NoArgs:!0}}};let P=Sk.abstr.buildNativeClass("Proxy",{constructor:function(B,q){if(B===void 0)throw new Sk.builtin.TypeError("Proxy cannot be called from python");this.js$wrapped=B,this.$module=null,this.$methods=Object.create(null),this.in$repr=!1,q||(q={}),Object.defineProperties(this,this.memoized$slots),typeof B=="function"?(this.is$callable=!0,this.$bound=q.bound,this.$name=q.name||B.name||"(native JS)",2>=this.$name.length&&(this.$name+=" (native JS)")):(this.is$callable=!1,delete this.is$type,this.is$type=!1,this.$name=q.name)},slots:{tp$doc:"proxy for a javascript object",tp$hash(){return Sk.builtin.object.prototype.tp$hash.call(this.js$wrapped)},tp$getattr(B){return this.$lookup(B)||Sk.generic.getAttr.call(this,B)},tp$setattr:s,$r(){if(this.is$callable){if(this.is$type||!this.$bound)return new Sk.builtin.str("<"+this.tp$name+" '"+this.$name+"'>");var B=Sk.misceval.objectRepr(t(this.$bound));return new Sk.builtin.str("")}return this.js$proto===m?this.in$repr?new Sk.builtin.str("{...}"):(this.in$repr=!0,B=Object.entries(this.js$wrapped).map(q=>{var[X,E]=q;return E=e(E,x(this.js$wrapped,X)),"'"+X+"': "+Sk.misceval.objectRepr(E)}),B=new Sk.builtin.str("proxyobject({"+B.join(", ")+"})"),this.in$repr=!1,B):new Sk.builtin.str("<"+this.tp$name+" "+(this.tp$name==="proxyobject"?"object":"proxyobject")+">")},tp$as_sequence_or_mapping:!0,mp$subscript(B){let q=this.$lookup(B);if(q===void 0)throw new Sk.builtin.LookupError(B);return q},mp$ass_subscript(B,q){return this.tp$setattr(B,q)},sq$contains(B){return i(B)in this.js$wrapped},ob$eq(B){return this.js$wrapped===B.js$wrapped},ob$ne(B){return this.js$wrapped!==B.js$wrapped},tp$as_number:!0,nb$bool(){return this.js$proto===m?0new Sk.builtin.str(B)))},$flags:{NoArgs:!0}},get:{$meth(B,q){return this.$lookup(B)||q||Sk.builtin.none.none$},$flags:{MinArgs:1,MaxArgs:2}}}),getsets:{__class__:{$get(){return e(this.js$wrapped.constructor,k)},$set(){throw new Sk.builtin.TypeError("not writable")}},__name__:{$get(){return new Sk.builtin.str(this.$name)}},__module__:{$get(){return this.$module||Sk.builtin.none.none$},$set(B){this.$module=B}}},proto:{valueOf(){return this.js$wrapped},$new(B,q){return Sk.abstr.checkNoKwargs("__new__",q),e(new this.js$wrapped(...B.map(X=>i(X,F))),C(this.$name))},$call(B,q){return Sk.abstr.checkNoKwargs("__call__",q),Sk.misceval.chain(this.js$wrapped.apply(this.$bound,B.map(X=>i(X,F))),X=>X instanceof Promise?Sk.misceval.promiseToSuspension(X):X,X=>e(X,k))},$lookup(B){B=B.toString();let q=this.js$wrapped[B];if(q!==void 0)return q!==null&&typeof q=="object"&&q.window===q&&Object.getPrototypeOf(q)===null?t(q,{name:"CrossOriginWindow"}):e(q,x(this.js$wrapped,B));if(B in this.js$wrapped)return Sk.builtin.none.none$},memoized$slots:{js$proto:{configurable:!0,get(){return delete this.js$proto,this.js$proto=Object.getPrototypeOf(this.js$wrapped)}},tp$iter:{configurable:!0,get(){return delete this.tp$iter,this.js$wrapped[Symbol.iterator]!==void 0?this.tp$iter=()=>t(this.js$wrapped[Symbol.iterator]()):this.tp$iter=()=>{throw new Sk.builtin.TypeError(Sk.misceval.objectRepr(this)+" is not iterable")}}},tp$iternext:{configurable:!0,get(){if(delete this.tp$iternext,this.js$wrapped.next!==void 0)return this.tp$iternext=()=>{let B=this.js$wrapped.next().value;return B&&e(B,k)}}},sq$length:{configurable:!0,get(){if(delete this.sq$length,!this.is$callable&&this.js$wrapped.length!==void 0)return this.sq$length=()=>this.js$wrapped.length}},tp$call:{configurable:!0,get(){if(delete this.tp$call,this.is$callable)return this.tp$call=this.is$type?this.$new:this.$call}},tp$name:{configurable:!0,get(){if(delete this.tp$name,this.is$callable)return this.tp$name=this.is$type?"proxyclass":this.$bound?"proxymethod":"proxyfunction";{let B=this.js$wrapped,q=B[Symbol.toStringTag]||this.$name||B.constructor&&B.constructor.name||"proxyobject";return q==="Object"?q="proxyobject":2>=q.length&&(q=t(B.constructor).$name),this.tp$name=q}}},is$type:{configurable:!0,get(){delete this.is$type;var B=this.js$wrapped;let q=B.prototype;if(q===void 0)return this.is$type=B===Sk.global.Proxy;{let X=z.call(B).match(pe);B=X===null?null:X[0]==="class"?!0:!G.has(B)}return B===!0?this.is$type=!0:B===!1?this.is$type=!1:1{var[q,X]=B;return[e(q,k),e(X,k)]})},valueOf:P.prototype.valueOf},flags:{sk$unacceptableBase:!0}}),U=Sk.abstr.buildNativeClass("InternalProxySet",{base:Sk.builtin.dict,constructor:function(B){Sk.builtin.dict.call(this),this.js$wrapped=B},proto:{proxy$getItem(B){return!0},mp$lookup:f,dict$setItem(B,q){this.js$wrapped.add(i(B,F))},dict$clear:o,pop$item:$,dict$copy:d,get$size:u,$items(){return[...this.js$wrapped].map(B=>[e(B,k),!0])}},flags:{sk$unacceptableBase:!0}}),K=Sk.abstr.buildNativeClass("ProxySet",{base:Sk.builtin.set,constructor:function(B){Sk.builtin.set.call(this),this.v=new U(B),this.js$wrapped=B},slots:{tp$getattr:c},methods:p,proto:{$lookup:P.prototype.$lookup,valueOf:P.prototype.valueOf},flags:{sk$unacceptableBase:!0}}),te={apply(B,q,X){return X=n(X,F),B.apply(q,X)}},Z={},oe=Array.prototype,ie=Symbol("$proxy"),ce={get(B,q){if(q===ie)return B;let X=B[q];return q in oe?typeof X=="function"?Z[q]||(Z[q]=new Proxy(X,te)):X:X!==void 0||q in B?e(X,k):X},set(B,q,X){return B[q]=i(X,F),!0}},J=Sk.abstr.buildNativeClass("ProxyList",{base:Sk.builtin.list,constructor:function(B){Sk.builtin.list.call(this,B),this.js$wrapped=this.v,this.v=new Proxy(this.v,ce)},slots:{tp$getattr:c,tp$setattr:s,$r(){return new Sk.builtin.str("proxylist("+Sk.builtin.list.prototype.$r.call(this)+")")}},methods:p,proto:{$lookup:P.prototype.$lookup}}),pe=/^class|^function[a-zA-Z\d\(\)\{\s]+\[native code\]\s+\}$/,z=_.toString,G=new Set([Number,String,Symbol,Boolean]);typeof Sk.global.BigInt<"u"&&G.add(Sk.global.BigInt);let he=Sk.abstr.buildNativeClass("ProxySymbol",{constructor:function(B){this.v=B},slots:{$r(){return new Sk.builtin.str(this.toString())}},proto:{toString(){return this.v.toString()},valueOf(){return this.v}}})},function(p,g){function e(l,h,a){if(l=l===void 0?l:Sk.misceval.asIndexOrThrow(l),h=h===void 0?h:Sk.misceval.asIndexOrThrow(h),a=a===void 0?a:Sk.misceval.asIndexOrThrow(a),h===void 0&&a===void 0)h=l,l=0,a=1;else if(a===void 0)a=1;else if(a===0)throw new Sk.builtin.ValueError("range() step argument must not be zero");let S=[];if(typeof l=="number"&&typeof h=="number"&&typeof a=="number")if(0h;t+=a)S.push(new Sk.builtin.int_(t));else{if(l=t=JSBI.BigInt(l),a=JSBI.BigInt(a),h=JSBI.BigInt(h),JSBI.greaterThan(a,JSBI.__ZERO))for(;JSBI.lessThan(t,h);)S.push(new Sk.builtin.int_(i(t))),t=JSBI.add(t,a);else for(;JSBI.greaterThan(t,h);)S.push(new Sk.builtin.int_(i(t))),t=JSBI.add(t,a);l=i(l),a=i(a),h=i(h)}return new Sk.builtin.range_(l,h,a,S)}function i(l){return JSBI.lessThan(l,JSBI.__MAX_SAFE)&&JSBI.greaterThan(l,JSBI.__MIN_SAFE)?JSBI.toNumber(l):l}Sk.builtin.range_=Sk.abstr.buildNativeClass("range",{constructor:function(l,h,a,S){this.start=l,this.stop=h,this.step=a,this.v=S},slots:{tp$getattr:Sk.generic.getAttr,tp$as_sequence_or_mapping:!0,tp$doc:`range(stop) -> range object +`;this.currentLine=0}return this.pos$=0,Sk.fileopen&&10<=this.fileno&&Sk.fileopen(this),this},Sk.abstr.setUpInheritance("file",Sk.builtin.file,Sk.builtin.object),Sk.abstr.setUpBuiltinMro(Sk.builtin.file),Sk.builtin.file.prototype.$r=function(){return new Sk.builtin.str("<"+(this.closed?"closed":"open")+"file '"+this.name+"', mode '"+Sk.ffi.remapToJs(this.mode)+"'>")},Sk.builtin.file.prototype.tp$iter=function(){var e={tp$iter:function(){return e},$obj:this,$index:this.currentLine,$lines:this.lineList,tp$iternext:function(){if(!(e.$index>=e.$lines.length))return new Sk.builtin.str(e.$lines[e.$index++])}};return e},Sk.abstr.setUpSlots(Sk.builtin.file),Sk.builtin.file.prototype.__enter__=new Sk.builtin.func(function(e){return e}),Sk.builtin.file.prototype.__exit__=new Sk.builtin.func(function(e){return Sk.misceval.callsimArray(Sk.builtin.file.prototype.close,[e])}),Sk.builtin.file.prototype.close=new Sk.builtin.func(function(e){return e.closed=!0,Sk.builtin.none.none$}),Sk.builtin.file.prototype.flush=new Sk.builtin.func(function(e){}),Sk.builtin.file.prototype.fileno=new Sk.builtin.func(function(e){return this.fileno}),Sk.builtin.file.prototype.isatty=new Sk.builtin.func(function(e){return!1}),Sk.builtin.file.prototype.read=new Sk.builtin.func(function(e,i){var n=e.data$.length;if(e.closed)throw new Sk.builtin.ValueError("I/O operation on closed file");var r=i===void 0?n:Sk.ffi.remapToJs(i);return r=new Sk.builtin.str(e.data$.substr(e.pos$,r)),e.pos$=i===void 0?n:e.pos$+Sk.ffi.remapToJs(i),e.pos$>=n&&(e.pos$=n),r}),Sk.builtin.file.$readline=function(e,i,n){if(e.fileno===0){if(e=Sk.ffi.remapToJs(n),e=Sk.inputfun(e||""),e instanceof Promise||e&&typeof e.then=="function"){var r=new Sk.misceval.Suspension;return r.resume=function(){if(r.data.error)throw r.data.error;return new Sk.builtin.str(r.data.result)},r.data={type:"Sk.promise",promise:e},r}return new Sk.builtin.str(e)}return i="",e.currentLinee(E,q)));if(Z==="object"){if(Z=B.constructor,Z===Object&&Object.getPrototypeOf(B)===m||Z===void 0)return q.dictHook?q.dictHook(B):S(B,q);if(Z===Uint8Array)return new Sk.builtin.bytes(B);if(Z===Set)return q.setHook?q.setHook(B):a(B,q);if(Z===Map){if(q.mapHook)return q.mapHook(B);let E=new Sk.builtin.dict;return B.forEach((y,T)=>{E.mp$ass_subscript(e(T,q),e(y,q))}),E}return Z===Sk.misceval.Suspension?B:q.proxyHook?q.proxyHook(B):t(B)}if(q.unhandledHook)return q.unhandledHook(B);Sk.asserts.fail("unhandled remap case of type "+Z)}function i(B,q){if(B==null)return B;let Z=B.valueOf();if(Z===null)return Z;let E=typeof Z;if(q=q||{},E==="string")return q.stringHook?q.stringHook(Z):Z;if(E==="symbol"||E==="boolean")return Z;if(E==="number")return q.numberHook?q.numberHook(Z,B):Z;if(JSBI.__isBigInt(Z))return q.bigintHook?q.bigintHook(Z,B):Z;if(Array.isArray(Z))return q.arrayHook?q.arrayHook(Z,B):Z.map(y=>i(y,q));if(Z.sk$object)return B instanceof Sk.builtin.dict?q.dictHook?q.dictHook(B):r(B,q):B instanceof Sk.builtin.set?q.setHook?q.setHook(B):new Set(n(B,q)):q.unhandledHook?q.unhandledHook(B):void 0;if(E==="object")return q.objectHook?q.objectHook(Z,B):Z;if(E==="function")return q.funcHook?q.funcHook(Z,B):Z;Sk.asserts.fail("unhandled type "+E)}function n(B,q){return Array.from(B,Z=>i(Z,q))}function r(B,q){let Z={};return B.$items().forEach(E=>{var[y,T]=E;Z[y.valueOf()]=i(T,q)}),Z}function l(B){return Number.isInteger(B)?Math.abs(B)e(Z,q)))}function a(B,q){return new Sk.builtin.set(Array.from(B,Z=>e(Z,q)))}function S(B,q){let Z=new Sk.builtin.dict;return Object.entries(B).forEach(E=>{var[y,T]=E;Z.mp$ass_subscript(new Sk.builtin.str(y),e(T,q))}),Z}function t(B,q){if(B==null)return Sk.builtin.none.none$;var Z=typeof B;if(Z!=="object"&&Z!=="function")return e(B);q=q||{};let E=M.get(B);if(E){if(q.bound===E.$bound)return E;q.name||(q.name=E.$name)}return Z==="function"?q=new P(B,q):Array.isArray(B)?q=new Y(B):(Z=Object.getPrototypeOf(B),q=Z===v?new D(B):Z===A?new K(B):new P(B,q)),M.set(B,q),q}function s(B,q){B=B.toString(),q===void 0?delete this.js$wrapped[B]:this.js$wrapped[B]=i(q,F)}function c(B){return Sk.generic.getAttr.call(this,B)||this.$lookup(B)}function o(){this.js$wrapped.clear()}function d(){return Sk.misceval.callsimOrSuspendArray(Sk.builtin.dict,[this])}function u(){return this.js$wrapped.size}function f(B){if(B=i(B,F),this.js$wrapped.has(B))return this.proxy$getItem(B)}function $(B){if(B=i(B,F),this.js$wrapped.has(B)){let q=this.proxy$getItem(B);return this.js$wrapped.delete(B),q}}Sk.ffi={remapToPy:e,remapToJs:i,remapToJsOrWrap:function(B){return i(B,F)},toPy:e,toJs:i,isTrue:function(B){return B!=null&&B.nb$bool?B.nb$bool():B.sq$length?B.sq$length()!==0:!!B},toJsString:function(B){return String(B)},toJsNumber:function(B){return Number(B)},toJsArray:n,toJsHashMap:r,toPyDict:S,toPyFloat:function(B){return new Sk.builtin.float_(Number(B))},toPyInt:function(B){if(typeof B=="number")return B=Math.trunc(B),Math.abs(B)e(Z,q)))},toPySet:a,numberToPy:l,proxy:t};let m=Object.prototype,_=Function.prototype,v=Map.prototype,A=Set.prototype,N=/^-?\d+$/,M=new WeakMap,R=new WeakMap,H=B=>t(B),ee=B=>Object.isFrozen(B)?h(B,g):t(B),J=B=>String(B),g={arrayHook:ee,dictHook:H,unhandledHook:J,setHook:H,mapHook:H},x=(B,q)=>({dictHook:H,funcHook:Z=>t(Z,{bound:B,name:q}),unhandledHook:J,arrayHook:ee,setHook:H,mapHook:H}),C=B=>({dictHook:H,proxyHook:q=>t(q,{name:B}),arrayHook:ee,setHook:H,mapHook:H}),F={unhandledHook:B=>{var q=M.get(B);if(q)return q;if(q={v:B,$isPyWrapped:!0,unwrap:()=>B},B.tp$call===void 0)return M.set(B,q),q;if(B.ob$type===Sk.builtin.method){var Z=B.im_self,E=B.im_func;let y=R.get(Z);if(y===void 0&&(y=new Map,R.set(Z,y)),Z=y.get(E),Z===void 0)Z=B,y.set(E,B);else if(B=Z,E=M.get(B))return E}return E=(...y)=>{y=y.map(I=>e(I,g));let T=Sk.misceval.tryCatch(()=>Sk.misceval.chain(B.tp$call(y),I=>i(I,F)),I=>{if(Sk.uncaughtException)Sk.uncaughtException(I);else throw I});for(;T instanceof Sk.misceval.Suspension;){if(!T.optional)return Sk.misceval.asyncToPromise(()=>T);T=T.resume()}return T},M.set(B,Object.assign(E,q)),E},arrayHook:B=>B[ie]||B.map(q=>i(q,F))};p={__dir__:{$meth:function(){let B=[];for(var q=this.js$wrapped;q!=null&&q!==m&&q!==_;)B.push(...Object.getOwnPropertyNames(q)),q=Object.getPrototypeOf(q);return q=n(Sk.misceval.callsimArray(Sk.builtin.type.prototype.__dir__,[this.ob$type])),new h(new Set([...q,...B]))},$flags:{NoArgs:!0}}};let P=Sk.abstr.buildNativeClass("Proxy",{constructor:function(B,q){if(B===void 0)throw new Sk.builtin.TypeError("Proxy cannot be called from python");this.js$wrapped=B,this.$module=null,this.$methods=Object.create(null),this.in$repr=!1,q||(q={}),Object.defineProperties(this,this.memoized$slots),typeof B=="function"?(this.is$callable=!0,this.$bound=q.bound,this.$name=q.name||B.name||"(native JS)",2>=this.$name.length&&(this.$name+=" (native JS)")):(this.is$callable=!1,delete this.is$type,this.is$type=!1,this.$name=q.name)},slots:{tp$doc:"proxy for a javascript object",tp$hash(){return Sk.builtin.object.prototype.tp$hash.call(this.js$wrapped)},tp$getattr(B){return this.$lookup(B)||Sk.generic.getAttr.call(this,B)},tp$setattr:s,$r(){if(this.is$callable){if(this.is$type||!this.$bound)return new Sk.builtin.str("<"+this.tp$name+" '"+this.$name+"'>");var B=Sk.misceval.objectRepr(t(this.$bound));return new Sk.builtin.str("")}return this.js$proto===m?this.in$repr?new Sk.builtin.str("{...}"):(this.in$repr=!0,B=Object.entries(this.js$wrapped).map(q=>{var[Z,E]=q;return E=e(E,x(this.js$wrapped,Z)),"'"+Z+"': "+Sk.misceval.objectRepr(E)}),B=new Sk.builtin.str("proxyobject({"+B.join(", ")+"})"),this.in$repr=!1,B):new Sk.builtin.str("<"+this.tp$name+" "+(this.tp$name==="proxyobject"?"object":"proxyobject")+">")},tp$as_sequence_or_mapping:!0,mp$subscript(B){let q=this.$lookup(B);if(q===void 0)throw new Sk.builtin.LookupError(B);return q},mp$ass_subscript(B,q){return this.tp$setattr(B,q)},sq$contains(B){return i(B)in this.js$wrapped},ob$eq(B){return this.js$wrapped===B.js$wrapped},ob$ne(B){return this.js$wrapped!==B.js$wrapped},tp$as_number:!0,nb$bool(){return this.js$proto===m?0new Sk.builtin.str(B)))},$flags:{NoArgs:!0}},get:{$meth(B,q){return this.$lookup(B)||q||Sk.builtin.none.none$},$flags:{MinArgs:1,MaxArgs:2}}}),getsets:{__class__:{$get(){return e(this.js$wrapped.constructor,g)},$set(){throw new Sk.builtin.TypeError("not writable")}},__name__:{$get(){return new Sk.builtin.str(this.$name)}},__module__:{$get(){return this.$module||Sk.builtin.none.none$},$set(B){this.$module=B}}},proto:{valueOf(){return this.js$wrapped},$new(B,q){return Sk.abstr.checkNoKwargs("__new__",q),e(new this.js$wrapped(...B.map(Z=>i(Z,F))),C(this.$name))},$call(B,q){return Sk.abstr.checkNoKwargs("__call__",q),Sk.misceval.chain(this.js$wrapped.apply(this.$bound,B.map(Z=>i(Z,F))),Z=>Z instanceof Promise?Sk.misceval.promiseToSuspension(Z):Z,Z=>e(Z,g))},$lookup(B){B=B.toString();let q=this.js$wrapped[B];if(q!==void 0)return q!==null&&typeof q=="object"&&q.window===q&&Object.getPrototypeOf(q)===null?t(q,{name:"CrossOriginWindow"}):e(q,x(this.js$wrapped,B));if(B in this.js$wrapped)return Sk.builtin.none.none$},memoized$slots:{js$proto:{configurable:!0,get(){return delete this.js$proto,this.js$proto=Object.getPrototypeOf(this.js$wrapped)}},tp$iter:{configurable:!0,get(){return delete this.tp$iter,this.js$wrapped[Symbol.iterator]!==void 0?this.tp$iter=()=>t(this.js$wrapped[Symbol.iterator]()):this.tp$iter=()=>{throw new Sk.builtin.TypeError(Sk.misceval.objectRepr(this)+" is not iterable")}}},tp$iternext:{configurable:!0,get(){if(delete this.tp$iternext,this.js$wrapped.next!==void 0)return this.tp$iternext=()=>{let B=this.js$wrapped.next().value;return B&&e(B,g)}}},sq$length:{configurable:!0,get(){if(delete this.sq$length,!this.is$callable&&this.js$wrapped.length!==void 0)return this.sq$length=()=>this.js$wrapped.length}},tp$call:{configurable:!0,get(){if(delete this.tp$call,this.is$callable)return this.tp$call=this.is$type?this.$new:this.$call}},tp$name:{configurable:!0,get(){if(delete this.tp$name,this.is$callable)return this.tp$name=this.is$type?"proxyclass":this.$bound?"proxymethod":"proxyfunction";{let B=this.js$wrapped,q=B[Symbol.toStringTag]||this.$name||B.constructor&&B.constructor.name||"proxyobject";return q==="Object"?q="proxyobject":2>=q.length&&(q=t(B.constructor).$name),this.tp$name=q}}},is$type:{configurable:!0,get(){delete this.is$type;var B=this.js$wrapped;let q=B.prototype;if(q===void 0)return this.is$type=B===Sk.global.Proxy;{let Z=z.call(B).match(pe);B=Z===null?null:Z[0]==="class"?!0:!G.has(B)}return B===!0?this.is$type=!0:B===!1?this.is$type=!1:1{var[q,Z]=B;return[e(q,g),e(Z,g)]})},valueOf:P.prototype.valueOf},flags:{sk$unacceptableBase:!0}}),U=Sk.abstr.buildNativeClass("InternalProxySet",{base:Sk.builtin.dict,constructor:function(B){Sk.builtin.dict.call(this),this.js$wrapped=B},proto:{proxy$getItem(B){return!0},mp$lookup:f,dict$setItem(B,q){this.js$wrapped.add(i(B,F))},dict$clear:o,pop$item:$,dict$copy:d,get$size:u,$items(){return[...this.js$wrapped].map(B=>[e(B,g),!0])}},flags:{sk$unacceptableBase:!0}}),K=Sk.abstr.buildNativeClass("ProxySet",{base:Sk.builtin.set,constructor:function(B){Sk.builtin.set.call(this),this.v=new U(B),this.js$wrapped=B},slots:{tp$getattr:c},methods:p,proto:{$lookup:P.prototype.$lookup,valueOf:P.prototype.valueOf},flags:{sk$unacceptableBase:!0}}),te={apply(B,q,Z){return Z=n(Z,F),B.apply(q,Z)}},Q={},oe=Array.prototype,ie=Symbol("$proxy"),ce={get(B,q){if(q===ie)return B;let Z=B[q];return q in oe?typeof Z=="function"?Q[q]||(Q[q]=new Proxy(Z,te)):Z:Z!==void 0||q in B?e(Z,g):Z},set(B,q,Z){return B[q]=i(Z,F),!0}},Y=Sk.abstr.buildNativeClass("ProxyList",{base:Sk.builtin.list,constructor:function(B){Sk.builtin.list.call(this,B),this.js$wrapped=this.v,this.v=new Proxy(this.v,ce)},slots:{tp$getattr:c,tp$setattr:s,$r(){return new Sk.builtin.str("proxylist("+Sk.builtin.list.prototype.$r.call(this)+")")}},methods:p,proto:{$lookup:P.prototype.$lookup}}),pe=/^class|^function[a-zA-Z\d\(\)\{\s]+\[native code\]\s+\}$/,z=_.toString,G=new Set([Number,String,Symbol,Boolean]);typeof Sk.global.BigInt<"u"&&G.add(Sk.global.BigInt);let he=Sk.abstr.buildNativeClass("ProxySymbol",{constructor:function(B){this.v=B},slots:{$r(){return new Sk.builtin.str(this.toString())}},proto:{toString(){return this.v.toString()},valueOf(){return this.v}}})},function(p,b){function e(l,h,a){if(l=l===void 0?l:Sk.misceval.asIndexOrThrow(l),h=h===void 0?h:Sk.misceval.asIndexOrThrow(h),a=a===void 0?a:Sk.misceval.asIndexOrThrow(a),h===void 0&&a===void 0)h=l,l=0,a=1;else if(a===void 0)a=1;else if(a===0)throw new Sk.builtin.ValueError("range() step argument must not be zero");let S=[];if(typeof l=="number"&&typeof h=="number"&&typeof a=="number")if(0h;t+=a)S.push(new Sk.builtin.int_(t));else{if(l=t=JSBI.BigInt(l),a=JSBI.BigInt(a),h=JSBI.BigInt(h),JSBI.greaterThan(a,JSBI.__ZERO))for(;JSBI.lessThan(t,h);)S.push(new Sk.builtin.int_(i(t))),t=JSBI.add(t,a);else for(;JSBI.greaterThan(t,h);)S.push(new Sk.builtin.int_(i(t))),t=JSBI.add(t,a);l=i(l),a=i(a),h=i(h)}return new Sk.builtin.range_(l,h,a,S)}function i(l){return JSBI.lessThan(l,JSBI.__MAX_SAFE)&&JSBI.greaterThan(l,JSBI.__MIN_SAFE)?JSBI.toNumber(l):l}Sk.builtin.range_=Sk.abstr.buildNativeClass("range",{constructor:function(l,h,a,S){this.start=l,this.stop=h,this.step=a,this.v=S},slots:{tp$getattr:Sk.generic.getAttr,tp$as_sequence_or_mapping:!0,tp$doc:`range(stop) -> range object range(start, stop[, step]) -> range object Return an object that produces a sequence of integers from start (inclusive) @@ -533,7 +533,7 @@ to stop (exclusive) by step. range(i, j) produces i, i+1, i+2, ..., j-1. start defaults to 0, and stop is omitted! range(4) produces 0, 1, 2, 3. These are exactly the valid indices for a list of 4 elements. When step is given, it specifies the increment (or decrement).`,tp$new(l,h){return Sk.abstr.checkNoKwargs("range",h),Sk.abstr.checkArgsLen("range",l,1,3),e(l[0],l[1],l[2])},$r(){let l="range("+this.start+", "+this.stop;return this.step!=1&&(l+=", "+this.step),new Sk.builtin.str(l+")")},tp$richcompare(l,h){return h!=="Eq"&&h!=="NotEq"||l.ob$type!==Sk.builtin.range_?Sk.builtin.NotImplemented.NotImplemented$:(l=new Sk.builtin.list(l.v),new Sk.builtin.list(this.v).tp$richcompare(l,h))},tp$iter(){return new n(this)},nb$bool(){return this.v.length!==0},sq$contains(l){let h=this.v;for(let a=0;al&&(l=this.v.length+l),0>l||l>=this.v.length)throw new Sk.builtin.IndexError("range object index out of range");return this.v[l]}if(l.constructor===Sk.builtin.slice){let h=[],a=this.v;l.sssiter$(a.length,c=>{h.push(a[c])});let{start:S,stop:t,step:s}=l.slice$indices(a.length);return S=Sk.misceval.asIndex(a[S])||this.start,t=Sk.misceval.asIndex(a[t])||this.stop,s=typeof this.step=="number"?s*this.step:JSBI.multiply(this.step,JSBI.BigInt(s)),new Sk.builtin.range_(S,t,s,h)}throw new Sk.builtin.TypeError("range indices must be integers or slices, not "+Sk.abstr.typeName(l))}},getsets:{start:{$get(){return new Sk.builtin.int_(this.start)}},step:{$get(){return new Sk.builtin.int_(this.step)}},stop:{$get(){return new Sk.builtin.int_(this.stop)}}},methods:{__reversed__:{$meth(){return new r(this)},$flags:{NoArgs:!0},$textsig:null,$doc:"Return a reverse iterator."},count:{$meth(l){let h=0;for(let a=0;a integer -- return number of occurrences of value"},index:{$meth(l){for(let h=0;h integer -- return index of value. -Raise ValueError if the value is not present.`}},proto:{sk$asarray(){return this.v.slice(0)}},flags:{sk$unacceptableBase:!0}});var n=Sk.abstr.buildIteratorClass("range_iterator",{constructor:function(l){this.$index=0,this.$seq=l.v},iternext(){return this.$seq[this.$index++]},methods:{__length_hint__:Sk.generic.iterLengthHintWithArrayMethodDef},flags:{sk$unacceptableBase:!0}}),r=Sk.abstr.buildIteratorClass("range_reverseiterator",{constructor:function(l){this.$seq=l.v,this.$index=this.$seq.length-1},iternext(){return this.$seq[this.$index--]},methods:{__length_hint__:Sk.generic.iterReverseLengthHintMethodDef},flags:{sk$unacceptableBase:!0}});Sk.builtin.range=Sk.builtin.xrange=function(l,h,a){return l=e(l,h,a),new Sk.builtin.list(l.v)}},function(p,g){Sk.builtin.enumerate=Sk.abstr.buildIteratorClass("enumerate",{constructor:function(e,i){if(!(this instanceof Sk.builtin.enumerate))throw TypeError("Failed to construct 'enumerate': Please use the 'new' operator");return this.$iterable=e,this.$index=i,this},iternext(e){let i=Sk.misceval.chain(this.$iterable.tp$iternext(e),n=>{if(n!==void 0)return new Sk.builtin.tuple([new Sk.builtin.int_(this.$index++),n])});return e?i:Sk.misceval.retryOptionalSuspensionOrThrow(i)},slots:{tp$doc:`Return an enumerate object. +Raise ValueError if the value is not present.`}},proto:{sk$asarray(){return this.v.slice(0)}},flags:{sk$unacceptableBase:!0}});var n=Sk.abstr.buildIteratorClass("range_iterator",{constructor:function(l){this.$index=0,this.$seq=l.v},iternext(){return this.$seq[this.$index++]},methods:{__length_hint__:Sk.generic.iterLengthHintWithArrayMethodDef},flags:{sk$unacceptableBase:!0}}),r=Sk.abstr.buildIteratorClass("range_reverseiterator",{constructor:function(l){this.$seq=l.v,this.$index=this.$seq.length-1},iternext(){return this.$seq[this.$index--]},methods:{__length_hint__:Sk.generic.iterReverseLengthHintMethodDef},flags:{sk$unacceptableBase:!0}});Sk.builtin.range=Sk.builtin.xrange=function(l,h,a){return l=e(l,h,a),new Sk.builtin.list(l.v)}},function(p,b){Sk.builtin.enumerate=Sk.abstr.buildIteratorClass("enumerate",{constructor:function(e,i){if(!(this instanceof Sk.builtin.enumerate))throw TypeError("Failed to construct 'enumerate': Please use the 'new' operator");return this.$iterable=e,this.$index=i,this},iternext(e){let i=Sk.misceval.chain(this.$iterable.tp$iternext(e),n=>{if(n!==void 0)return new Sk.builtin.tuple([new Sk.builtin.int_(this.$index++),n])});return e?i:Sk.misceval.retryOptionalSuspensionOrThrow(i)},slots:{tp$doc:`Return an enumerate object. iterable an object supporting iteration @@ -542,24 +542,24 @@ The enumerate object yields pairs containing a count (from start, which defaults to zero) and a value yielded by the iterable argument. enumerate is useful for obtaining an indexed list: - (0, seq[0]), (1, seq[1]), (2, seq[2]), ...`,tp$new(e,i){let[n,r]=Sk.abstr.copyKeywordsToNamedArgs("enumerate",["iterable","start"],e,i,[new Sk.builtin.int_(0)]);return n=Sk.abstr.iter(n),r=Sk.misceval.asIndexOrThrow(r),this===Sk.builtin.enumerate.prototype?new Sk.builtin.enumerate(n,r):(e=new this.constructor,Sk.builtin.enumerate.call(e,n,r),e)}},classmethods:Sk.generic.classGetItem}),Sk.exportSymbol("Sk.builtin.enumerate",Sk.builtin.enumerate)},function(p,g){Sk.builtin.filter_=Sk.abstr.buildIteratorClass("filter",{constructor:function(e,i){this.$func=e,this.$iterable=i},iternext(e){let i=Sk.misceval.iterFor(this.$iterable,n=>Sk.misceval.chain(this.check$filter(n),r=>r?new Sk.misceval.Break(r):void 0));return e?i:Sk.misceval.retryOptionalSuspensionOrThrow(i)},slots:{tp$doc:`Return an iterator yielding those items of iterable for which function(item) -is true. If function is None, return the items that are true.`,tp$new(e,i){let[n,r]=Sk.abstr.copyKeywordsToNamedArgs("filter",["predicate","iterable"],e,i,[]);return n=Sk.builtin.checkNone(n)?null:n,r=Sk.abstr.iter(r),this===Sk.builtin.filter_.prototype?new Sk.builtin.filter_(n,r):(e=new this.constructor,Sk.builtin.filter_.call(e,n,r),e)}},proto:{check$filter(e){let i;return i=this.$func===null?e:Sk.misceval.callsimOrSuspendArray(this.$func,[e]),Sk.misceval.chain(i,n=>Sk.misceval.isTrue(n)?e:void 0)}}}),Sk.exportSymbol("Sk.builtin.filter_",Sk.builtin.filter_)},function(p,g){Sk.builtin.map_=Sk.abstr.buildIteratorClass("map",{constructor:function(e,i){this.$func=e,this.$iters=i},iternext(e){let i=[],n=Sk.misceval.chain(Sk.misceval.iterArray(this.$iters,r=>Sk.misceval.chain(r.tp$iternext(e),l=>{if(l===void 0)return new Sk.misceval.Break(!0);i.push(l)})),r=>r?void 0:Sk.misceval.callsimOrSuspendArray(this.$func,i));return e?n:Sk.misceval.retryOptionalSuspensionOrThrow(n)},slots:{tp$doc:`map(func, *iterables) --> map object + (0, seq[0]), (1, seq[1]), (2, seq[2]), ...`,tp$new(e,i){let[n,r]=Sk.abstr.copyKeywordsToNamedArgs("enumerate",["iterable","start"],e,i,[new Sk.builtin.int_(0)]);return n=Sk.abstr.iter(n),r=Sk.misceval.asIndexOrThrow(r),this===Sk.builtin.enumerate.prototype?new Sk.builtin.enumerate(n,r):(e=new this.constructor,Sk.builtin.enumerate.call(e,n,r),e)}},classmethods:Sk.generic.classGetItem}),Sk.exportSymbol("Sk.builtin.enumerate",Sk.builtin.enumerate)},function(p,b){Sk.builtin.filter_=Sk.abstr.buildIteratorClass("filter",{constructor:function(e,i){this.$func=e,this.$iterable=i},iternext(e){let i=Sk.misceval.iterFor(this.$iterable,n=>Sk.misceval.chain(this.check$filter(n),r=>r?new Sk.misceval.Break(r):void 0));return e?i:Sk.misceval.retryOptionalSuspensionOrThrow(i)},slots:{tp$doc:`Return an iterator yielding those items of iterable for which function(item) +is true. If function is None, return the items that are true.`,tp$new(e,i){let[n,r]=Sk.abstr.copyKeywordsToNamedArgs("filter",["predicate","iterable"],e,i,[]);return n=Sk.builtin.checkNone(n)?null:n,r=Sk.abstr.iter(r),this===Sk.builtin.filter_.prototype?new Sk.builtin.filter_(n,r):(e=new this.constructor,Sk.builtin.filter_.call(e,n,r),e)}},proto:{check$filter(e){let i;return i=this.$func===null?e:Sk.misceval.callsimOrSuspendArray(this.$func,[e]),Sk.misceval.chain(i,n=>Sk.misceval.isTrue(n)?e:void 0)}}}),Sk.exportSymbol("Sk.builtin.filter_",Sk.builtin.filter_)},function(p,b){Sk.builtin.map_=Sk.abstr.buildIteratorClass("map",{constructor:function(e,i){this.$func=e,this.$iters=i},iternext(e){let i=[],n=Sk.misceval.chain(Sk.misceval.iterArray(this.$iters,r=>Sk.misceval.chain(r.tp$iternext(e),l=>{if(l===void 0)return new Sk.misceval.Break(!0);i.push(l)})),r=>r?void 0:Sk.misceval.callsimOrSuspendArray(this.$func,i));return e?n:Sk.misceval.retryOptionalSuspensionOrThrow(n)},slots:{tp$doc:`map(func, *iterables) --> map object Make an iterator that computes the function using arguments from -each of the iterables. Stops when the shortest iterable is exhausted.`,tp$new(e,i){this===Sk.builtin.map_.prototype&&Sk.abstr.checkNoKwargs("map",i),Sk.abstr.checkArgsLen("map",e,2),i=e[0];let n=[];for(let r=1;rthis.$idx)){var i=Sk.misceval.tryCatch(()=>Sk.abstr.objectGetItem(this.$seq,new Sk.builtin.int_(this.$idx--),e),n=>{if(n instanceof Sk.builtin.IndexError)this.$idx=-1;else throw n});return e?i:Sk.misceval.retryOptionalSuspensionOrThrow(i)}},slots:{tp$doc:"Return a reverse iterator over the values of the given sequence.",tp$new(e,i){if(this===Sk.builtin.reversed.prototype&&Sk.abstr.checkNoKwargs("reversed",i),Sk.abstr.checkArgsLen("reversed",e,1,1),e=e[0],i=Sk.abstr.lookupSpecial(e,Sk.builtin.str.$reversed),i!==void 0)return Sk.misceval.callsimArray(i,[]);if(!Sk.builtin.checkSequence(e)||Sk.abstr.lookupSpecial(e,Sk.builtin.str.$len)===void 0)throw new Sk.builtin.TypeError("'"+Sk.abstr.typeName(e)+"' object is not a sequence");return this===Sk.builtin.reversed.prototype?new Sk.builtin.reversed(e):(i=new this.constructor,Sk.builtin.reversed.call(i,e),i)}},methods:{__length_hint__:{$meth:function(){return 0<=this.$idx?new Sk.builtin.int_(this.$idx):new Sk.builtin.int_(0)},$flags:{NoArgs:!0}}}})},function(p,g){Sk.builtin.zip_=Sk.abstr.buildIteratorClass("zip",{constructor:function(e){this.$iters=e,e.length===0&&(this.tp$iternext=()=>{})},iternext(e){let i=[],n=Sk.misceval.chain(Sk.misceval.iterArray(this.$iters,r=>Sk.misceval.chain(r.tp$iternext(e),l=>{if(l===void 0)return new Sk.misceval.Break(!0);i.push(l)})),r=>r?void 0:new Sk.builtin.tuple(i));return e?n:Sk.misceval.retryOptionalSuspensionOrThrow(n)},slots:{tp$doc:`zip(iter1 [,iter2 [...]]) --> zip object +each of the iterables. Stops when the shortest iterable is exhausted.`,tp$new(e,i){this===Sk.builtin.map_.prototype&&Sk.abstr.checkNoKwargs("map",i),Sk.abstr.checkArgsLen("map",e,2),i=e[0];let n=[];for(let r=1;rthis.$idx)){var i=Sk.misceval.tryCatch(()=>Sk.abstr.objectGetItem(this.$seq,new Sk.builtin.int_(this.$idx--),e),n=>{if(n instanceof Sk.builtin.IndexError)this.$idx=-1;else throw n});return e?i:Sk.misceval.retryOptionalSuspensionOrThrow(i)}},slots:{tp$doc:"Return a reverse iterator over the values of the given sequence.",tp$new(e,i){if(this===Sk.builtin.reversed.prototype&&Sk.abstr.checkNoKwargs("reversed",i),Sk.abstr.checkArgsLen("reversed",e,1,1),e=e[0],i=Sk.abstr.lookupSpecial(e,Sk.builtin.str.$reversed),i!==void 0)return Sk.misceval.callsimArray(i,[]);if(!Sk.builtin.checkSequence(e)||Sk.abstr.lookupSpecial(e,Sk.builtin.str.$len)===void 0)throw new Sk.builtin.TypeError("'"+Sk.abstr.typeName(e)+"' object is not a sequence");return this===Sk.builtin.reversed.prototype?new Sk.builtin.reversed(e):(i=new this.constructor,Sk.builtin.reversed.call(i,e),i)}},methods:{__length_hint__:{$meth:function(){return 0<=this.$idx?new Sk.builtin.int_(this.$idx):new Sk.builtin.int_(0)},$flags:{NoArgs:!0}}}})},function(p,b){Sk.builtin.zip_=Sk.abstr.buildIteratorClass("zip",{constructor:function(e){this.$iters=e,e.length===0&&(this.tp$iternext=()=>{})},iternext(e){let i=[],n=Sk.misceval.chain(Sk.misceval.iterArray(this.$iters,r=>Sk.misceval.chain(r.tp$iternext(e),l=>{if(l===void 0)return new Sk.misceval.Break(!0);i.push(l)})),r=>r?void 0:new Sk.builtin.tuple(i));return e?n:Sk.misceval.retryOptionalSuspensionOrThrow(n)},slots:{tp$doc:`zip(iter1 [,iter2 [...]]) --> zip object Return a zip object whose .__next__() method returns a tuple where the i-th element comes from the i-th iterable argument. The .__next__() method continues until the shortest iterable in the argument sequence -is exhausted and then it raises StopIteration.`,tp$new(e,i){this===Sk.builtin.zip_.prototype&&Sk.abstr.checkNoKwargs("zip",i),i=[];for(let n=0;n":e.T_RARROW,".":e.T_DOT,"...":e.T_ELLIPSIS,"/":e.T_SLASH,"//":e.T_DOUBLESLASH,"//=":e.T_DOUBLESLASHEQUAL,"/=":e.T_SLASHEQUAL,":":e.T_COLON,";":e.T_SEMI,"<":e.T_LESS,"<<":e.T_LEFTSHIFT,"<<=":e.T_LEFTSHIFTEQUAL,"<=":e.T_LESSEQUAL,"=":e.T_EQUAL,"==":e.T_EQEQUAL,">":e.T_GREATER,">=":e.T_GREATEREQUAL,">>":e.T_RIGHTSHIFT,">>=":e.T_RIGHTSHIFTEQUAL,"@":e.T_AT,"@=":e.T_ATEQUAL,"[":e.T_LSQB,"]":e.T_RSQB,"^":e.T_CIRCUMFLEX,"^=":e.T_CIRCUMFLEXEQUAL,"{":e.T_LBRACE,"|":e.T_VBAR,"|=":e.T_VBAREQUAL,"}":e.T_RBRACE,"~":e.T_TILDE};var i={};(function(){for(var n in e)i[e[n]]=n})(),["tok_name","ISTERMINAL","ISNONTERMINAL","ISEOF"].concat(Object.keys(i).map(function(n){return i[n]})),Sk.token={},Sk.token.tokens=e,Sk.token.tok_name=i,Sk.token.EXACT_TOKEN_TYPES=p,Sk.token.ISTERMINAL=function(n){return n=e.T_NT_OFFSET},Sk.token.ISEOF=function(n){return n==e.T_ENDMARKER},Sk.exportSymbol("Sk.token",Sk.token),Sk.exportSymbol("Sk.token.tokens",Sk.token.tokens),Sk.exportSymbol("Sk.token.tok_name",Sk.token.tok_name),Sk.exportSymbol("Sk.token.EXACT_TOKEN_TYPES"),Sk.exportSymbol("Sk.token.ISTERMINAL",Sk.token.ISTERMINAL),Sk.exportSymbol("Sk.token.ISNONTERMINAL",Sk.token.ISNONTERMINAL),Sk.exportSymbol("Sk.token.ISEOF",Sk.token.ISEOF)},function(p,g){Sk.OpMap={"(":Sk.token.tokens.T_LPAR,")":Sk.token.tokens.T_RPAR,"[":Sk.token.tokens.T_LSQB,"]":Sk.token.tokens.T_RSQB,":":Sk.token.tokens.T_COLON,",":Sk.token.tokens.T_COMMA,";":Sk.token.tokens.T_SEMI,"+":Sk.token.tokens.T_PLUS,"-":Sk.token.tokens.T_MINUS,"*":Sk.token.tokens.T_STAR,"/":Sk.token.tokens.T_SLASH,"|":Sk.token.tokens.T_VBAR,"&":Sk.token.tokens.T_AMPER,"<":Sk.token.tokens.T_LESS,">":Sk.token.tokens.T_GREATER,"=":Sk.token.tokens.T_EQUAL,".":Sk.token.tokens.T_DOT,"%":Sk.token.tokens.T_PERCENT,"`":Sk.token.tokens.T_BACKQUOTE,"{":Sk.token.tokens.T_LBRACE,"}":Sk.token.tokens.T_RBRACE,"@":Sk.token.tokens.T_AT,"@=":Sk.token.tokens.T_ATEQUAL,"==":Sk.token.tokens.T_EQEQUAL,"!=":Sk.token.tokens.T_NOTEQUAL,"<>":Sk.token.tokens.T_NOTEQUAL,"<=":Sk.token.tokens.T_LESSEQUAL,">=":Sk.token.tokens.T_GREATEREQUAL,"~":Sk.token.tokens.T_TILDE,"^":Sk.token.tokens.T_CIRCUMFLEX,"<<":Sk.token.tokens.T_LEFTSHIFT,">>":Sk.token.tokens.T_RIGHTSHIFT,"**":Sk.token.tokens.T_DOUBLESTAR,"+=":Sk.token.tokens.T_PLUSEQUAL,"-=":Sk.token.tokens.T_MINEQUAL,"*=":Sk.token.tokens.T_STAREQUAL,"/=":Sk.token.tokens.T_SLASHEQUAL,"%=":Sk.token.tokens.T_PERCENTEQUAL,"&=":Sk.token.tokens.T_AMPEREQUAL,"|=":Sk.token.tokens.T_VBAREQUAL,"^=":Sk.token.tokens.T_CIRCUMFLEXEQUAL,"<<=":Sk.token.tokens.T_LEFTSHIFTEQUAL,">>=":Sk.token.tokens.T_RIGHTSHIFTEQUAL,"**=":Sk.token.tokens.T_DOUBLESTAREQUAL,"//":Sk.token.tokens.T_DOUBLESLASH,"//=":Sk.token.tokens.T_DOUBLESLASHEQUAL,"->":Sk.token.tokens.T_RARROW,"...":Sk.token.tokens.T_ELLIPSIS},Sk.ParseTables={sym:{and_expr:257,and_test:258,annassign:259,arglist:260,argument:261,arith_expr:262,assert_stmt:263,async_funcdef:264,async_stmt:265,atom:266,atom_expr:267,augassign:268,break_stmt:269,classdef:270,comp_for:271,comp_if:272,comp_iter:273,comp_op:274,comparison:275,compound_stmt:276,continue_stmt:277,debugger_stmt:278,decorated:279,decorator:280,decorators:281,del_stmt:282,dictorsetmaker:283,dotted_as_name:284,dotted_as_names:285,dotted_name:286,encoding_decl:287,eval_input:288,except_clause:289,expr:290,expr_stmt:291,exprlist:292,factor:293,file_input:294,flow_stmt:295,for_stmt:296,funcdef:297,global_stmt:298,if_stmt:299,import_as_name:300,import_as_names:301,import_from:302,import_name:303,import_stmt:304,lambdef:305,lambdef_nocond:306,nonlocal_stmt:307,not_test:308,or_test:309,parameters:310,pass_stmt:311,power:312,print_stmt:313,raise_stmt:314,return_stmt:315,shift_expr:316,simple_stmt:317,single_input:256,sliceop:318,small_stmt:319,star_expr:320,stmt:321,subscript:322,subscriptlist:323,suite:324,term:325,test:326,test_nocond:327,testlist:328,testlist_comp:329,testlist_star_expr:330,tfpdef:331,trailer:332,try_stmt:333,typedargslist:334,varargslist:335,vfpdef:336,while_stmt:337,with_item:338,with_stmt:339,xor_expr:340,yield_arg:341,yield_expr:342,yield_stmt:343},number2symbol:{256:"single_input",257:"and_expr",258:"and_test",259:"annassign",260:"arglist",261:"argument",262:"arith_expr",263:"assert_stmt",264:"async_funcdef",265:"async_stmt",266:"atom",267:"atom_expr",268:"augassign",269:"break_stmt",270:"classdef",271:"comp_for",272:"comp_if",273:"comp_iter",274:"comp_op",275:"comparison",276:"compound_stmt",277:"continue_stmt",278:"debugger_stmt",279:"decorated",280:"decorator",281:"decorators",282:"del_stmt",283:"dictorsetmaker",284:"dotted_as_name",285:"dotted_as_names",286:"dotted_name",287:"encoding_decl",288:"eval_input",289:"except_clause",290:"expr",291:"expr_stmt",292:"exprlist",293:"factor",294:"file_input",295:"flow_stmt",296:"for_stmt",297:"funcdef",298:"global_stmt",299:"if_stmt",300:"import_as_name",301:"import_as_names",302:"import_from",303:"import_name",304:"import_stmt",305:"lambdef",306:"lambdef_nocond",307:"nonlocal_stmt",308:"not_test",309:"or_test",310:"parameters",311:"pass_stmt",312:"power",313:"print_stmt",314:"raise_stmt",315:"return_stmt",316:"shift_expr",317:"simple_stmt",318:"sliceop",319:"small_stmt",320:"star_expr",321:"stmt",322:"subscript",323:"subscriptlist",324:"suite",325:"term",326:"test",327:"test_nocond",328:"testlist",329:"testlist_comp",330:"testlist_star_expr",331:"tfpdef",332:"trailer",333:"try_stmt",334:"typedargslist",335:"varargslist",336:"vfpdef",337:"while_stmt",338:"with_item",339:"with_stmt",340:"xor_expr",341:"yield_arg",342:"yield_expr",343:"yield_stmt"},dfas:{256:[[[[1,1],[2,1],[3,2]],[[0,1]],[[2,1]]],{2:1,4:1,5:1,6:1,7:1,8:1,9:1,10:1,11:1,12:1,13:1,14:1,15:1,16:1,17:1,18:1,19:1,20:1,21:1,22:1,23:1,24:1,25:1,26:1,27:1,28:1,29:1,30:1,31:1,32:1,33:1,34:1,35:1,36:1,37:1,38:1,39:1,40:1,41:1,42:1,43:1}],257:[[[[44,1]],[[45,0],[0,1]]],{6:1,7:1,9:1,11:1,12:1,19:1,22:1,25:1,29:1,30:1,33:1,35:1,38:1,43:1}],258:[[[[46,1]],[[47,0],[0,1]]],{6:1,7:1,8:1,9:1,11:1,12:1,19:1,22:1,25:1,29:1,30:1,33:1,35:1,38:1,43:1}],259:[[[[48,1]],[[49,2]],[[50,3],[0,2]],[[49,4]],[[0,4]]],{48:1}],260:[[[[51,1]],[[52,2],[0,1]],[[51,1],[0,2]]],{6:1,7:1,8:1,9:1,11:1,12:1,14:1,15:1,19:1,22:1,25:1,29:1,30:1,33:1,35:1,38:1,43:1,53:1}],261:[[[[49,1],[15,2],[53,2]],[[50,2],[54,3],[0,1]],[[49,3]],[[0,3]]],{6:1,7:1,8:1,9:1,11:1,12:1,14:1,15:1,19:1,22:1,25:1,29:1,30:1,33:1,35:1,38:1,43:1,53:1}],262:[[[[55,1]],[[30,0],[43,0],[0,1]]],{6:1,7:1,9:1,11:1,12:1,19:1,22:1,25:1,29:1,30:1,33:1,35:1,38:1,43:1}],263:[[[[24,1]],[[49,2]],[[52,3],[0,2]],[[49,4]],[[0,4]]],{24:1}],264:[[[[10,1]],[[56,2]],[[0,2]]],{10:1}],265:[[[[10,1]],[[57,2],[56,2],[58,2]],[[0,2]]],{10:1}],266:[[[[6,1],[25,1],[33,1],[9,1],[11,1],[12,2],[35,3],[38,4],[19,1],[7,5]],[[0,1]],[[59,1],[60,6]],[[61,1],[62,7],[63,7]],[[64,1],[63,8]],[[7,5],[0,5]],[[59,1]],[[61,1]],[[64,1]]],{6:1,7:1,9:1,11:1,12:1,19:1,25:1,33:1,35:1,38:1}],267:[[[[29,1],[65,2]],[[65,2]],[[66,2],[0,2]]],{6:1,7:1,9:1,11:1,12:1,19:1,25:1,29:1,33:1,35:1,38:1}],268:[[[[67,1],[68,1],[69,1],[70,1],[71,1],[72,1],[73,1],[74,1],[75,1],[76,1],[77,1],[78,1],[79,1]],[[0,1]]],{67:1,68:1,69:1,70:1,71:1,72:1,73:1,74:1,75:1,76:1,77:1,78:1,79:1}],269:[[[[39,1]],[[0,1]]],{39:1}],270:[[[[13,1]],[[25,2]],[[48,3],[35,4]],[[80,5]],[[61,6],[81,7]],[[0,5]],[[48,3]],[[61,6]]],{13:1}],271:[[[[10,1],[34,2]],[[34,2]],[[82,3]],[[83,4]],[[84,5]],[[85,6],[0,5]],[[0,6]]],{10:1,34:1}],272:[[[[37,1]],[[86,2]],[[85,3],[0,2]],[[0,3]]],{37:1}],273:[[[[87,1],[54,1]],[[0,1]]],{10:1,34:1,37:1}],274:[[[[88,1],[89,1],[8,2],[90,1],[88,1],[83,1],[91,1],[92,3],[93,1],[94,1]],[[0,1]],[[83,1]],[[8,1],[0,3]]],{8:1,83:1,88:1,89:1,90:1,91:1,92:1,93:1,94:1}],275:[[[[95,1]],[[96,0],[0,1]]],{6:1,7:1,9:1,11:1,12:1,19:1,22:1,25:1,29:1,30:1,33:1,35:1,38:1,43:1}],276:[[[[97,1],[98,1],[58,1],[99,1],[57,1],[100,1],[56,1],[101,1],[102,1]],[[0,1]]],{4:1,10:1,13:1,20:1,21:1,34:1,37:1,41:1,42:1}],277:[[[[40,1]],[[0,1]]],{40:1}],278:[[[[17,1]],[[0,1]]],{17:1}],279:[[[[103,1]],[[56,2],[104,2],[99,2]],[[0,2]]],{41:1}],280:[[[[41,1]],[[105,2]],[[2,4],[35,3]],[[61,5],[81,6]],[[0,4]],[[2,4]],[[61,5]]],{41:1}],281:[[[[106,1]],[[106,1],[0,1]]],{41:1}],282:[[[[27,1]],[[82,2]],[[0,2]]],{27:1}],283:[[[[49,1],[107,2],[53,3]],[[48,4],[54,5],[52,6],[0,1]],[[54,5],[52,6],[0,2]],[[95,7]],[[49,7]],[[0,5]],[[49,8],[107,8],[0,6]],[[54,5],[52,9],[0,7]],[[52,6],[0,8]],[[49,10],[53,11],[0,9]],[[48,12]],[[95,13]],[[49,13]],[[52,9],[0,13]]],{6:1,7:1,8:1,9:1,11:1,12:1,14:1,15:1,19:1,22:1,25:1,29:1,30:1,33:1,35:1,38:1,43:1,53:1}],284:[[[[105,1]],[[108,2],[0,1]],[[25,3]],[[0,3]]],{25:1}],285:[[[[109,1]],[[52,0],[0,1]]],{25:1}],286:[[[[25,1]],[[110,0],[0,1]]],{25:1}],287:[[[[25,1]],[[0,1]]],{25:1}],288:[[[[111,1]],[[2,1],[112,2]],[[0,2]]],{6:1,7:1,8:1,9:1,11:1,12:1,14:1,19:1,22:1,25:1,29:1,30:1,33:1,35:1,38:1,43:1}],289:[[[[113,1]],[[49,2],[0,1]],[[108,3],[52,3],[0,2]],[[49,4]],[[0,4]]],{113:1}],290:[[[[114,1]],[[115,0],[0,1]]],{6:1,7:1,9:1,11:1,12:1,19:1,22:1,25:1,29:1,30:1,33:1,35:1,38:1,43:1}],291:[[[[116,1]],[[117,2],[50,3],[118,4],[0,1]],[[111,4],[62,4]],[[116,5],[62,5]],[[0,4]],[[50,3],[0,5]]],{6:1,7:1,8:1,9:1,11:1,12:1,14:1,15:1,19:1,22:1,25:1,29:1,30:1,33:1,35:1,38:1,43:1}],292:[[[[95,1],[107,1]],[[52,2],[0,1]],[[95,1],[107,1],[0,2]]],{6:1,7:1,9:1,11:1,12:1,15:1,19:1,22:1,25:1,29:1,30:1,33:1,35:1,38:1,43:1}],293:[[[[119,2],[30,1],[22,1],[43,1]],[[120,2]],[[0,2]]],{6:1,7:1,9:1,11:1,12:1,19:1,22:1,25:1,29:1,30:1,33:1,35:1,38:1,43:1}],294:[[[[2,0],[112,1],[121,0]],[[0,1]]],{2:1,4:1,5:1,6:1,7:1,8:1,9:1,10:1,11:1,12:1,13:1,14:1,15:1,16:1,17:1,18:1,19:1,20:1,21:1,22:1,23:1,24:1,25:1,26:1,27:1,28:1,29:1,30:1,31:1,32:1,33:1,34:1,35:1,36:1,37:1,38:1,39:1,40:1,41:1,42:1,43:1,112:1}],295:[[[[122,1],[123,1],[124,1],[125,1],[126,1]],[[0,1]]],{5:1,23:1,31:1,39:1,40:1}],296:[[[[34,1]],[[82,2]],[[83,3]],[[111,4]],[[48,5]],[[80,6]],[[127,7],[0,6]],[[48,8]],[[80,9]],[[0,9]]],{34:1}],297:[[[[4,1]],[[25,2]],[[128,3]],[[48,4],[129,5]],[[80,6]],[[49,7]],[[0,6]],[[48,4]]],{4:1}],298:[[[[26,1]],[[25,2]],[[52,1],[0,2]]],{26:1}],299:[[[[37,1]],[[49,2]],[[48,3]],[[80,4]],[[127,5],[130,1],[0,4]],[[48,6]],[[80,7]],[[0,7]]],{37:1}],300:[[[[25,1]],[[108,2],[0,1]],[[25,3]],[[0,3]]],{25:1}],301:[[[[131,1]],[[52,2],[0,1]],[[131,1],[0,2]]],{25:1}],302:[[[[36,1]],[[105,2],[19,3],[110,3]],[[32,4]],[[105,2],[19,3],[32,4],[110,3]],[[132,5],[15,5],[35,6]],[[0,5]],[[132,7]],[[61,5]]],{36:1}],303:[[[[32,1]],[[133,2]],[[0,2]]],{32:1}],304:[[[[134,1],[135,1]],[[0,1]]],{32:1,36:1}],305:[[[[14,1]],[[48,2],[136,3]],[[49,4]],[[48,2]],[[0,4]]],{14:1}],306:[[[[14,1]],[[48,2],[136,3]],[[86,4]],[[48,2]],[[0,4]]],{14:1}],307:[[[[18,1]],[[25,2]],[[52,1],[0,2]]],{18:1}],308:[[[[8,1],[137,2]],[[46,2]],[[0,2]]],{6:1,7:1,8:1,9:1,11:1,12:1,19:1,22:1,25:1,29:1,30:1,33:1,35:1,38:1,43:1}],309:[[[[138,1]],[[139,0],[0,1]]],{6:1,7:1,8:1,9:1,11:1,12:1,19:1,22:1,25:1,29:1,30:1,33:1,35:1,38:1,43:1}],310:[[[[35,1]],[[61,2],[140,3]],[[0,2]],[[61,2]]],{35:1}],311:[[[[28,1]],[[0,1]]],{28:1}],312:[[[[141,1]],[[53,2],[0,1]],[[120,3]],[[0,3]]],{6:1,7:1,9:1,11:1,12:1,19:1,25:1,29:1,33:1,35:1,38:1}],313:[[[[16,1]],[[49,2],[142,3],[0,1]],[[52,4],[0,2]],[[49,5]],[[49,2],[0,4]],[[52,6],[0,5]],[[49,7]],[[52,8],[0,7]],[[49,7],[0,8]]],{16:1}],314:[[[[5,1]],[[49,2],[0,1]],[[36,3],[52,3],[0,2]],[[49,4]],[[52,5],[0,4]],[[49,6]],[[0,6]]],{5:1}],315:[[[[23,1]],[[111,2],[0,1]],[[0,2]]],{23:1}],316:[[[[143,1]],[[144,0],[142,0],[0,1]]],{6:1,7:1,9:1,11:1,12:1,19:1,22:1,25:1,29:1,30:1,33:1,35:1,38:1,43:1}],317:[[[[145,1]],[[2,2],[146,3]],[[0,2]],[[145,1],[2,2]]],{5:1,6:1,7:1,8:1,9:1,11:1,12:1,14:1,15:1,16:1,17:1,18:1,19:1,22:1,23:1,24:1,25:1,26:1,27:1,28:1,29:1,30:1,31:1,32:1,33:1,35:1,36:1,38:1,39:1,40:1,43:1}],318:[[[[48,1]],[[49,2],[0,1]],[[0,2]]],{48:1}],319:[[[[147,1],[148,1],[149,1],[150,1],[151,1],[152,1],[153,1],[154,1],[155,1],[156,1]],[[0,1]]],{5:1,6:1,7:1,8:1,9:1,11:1,12:1,14:1,15:1,16:1,17:1,18:1,19:1,22:1,23:1,24:1,25:1,26:1,27:1,28:1,29:1,30:1,31:1,32:1,33:1,35:1,36:1,38:1,39:1,40:1,43:1}],320:[[[[15,1]],[[95,2]],[[0,2]]],{15:1}],321:[[[[1,1],[3,1]],[[0,1]]],{4:1,5:1,6:1,7:1,8:1,9:1,10:1,11:1,12:1,13:1,14:1,15:1,16:1,17:1,18:1,19:1,20:1,21:1,22:1,23:1,24:1,25:1,26:1,27:1,28:1,29:1,30:1,31:1,32:1,33:1,34:1,35:1,36:1,37:1,38:1,39:1,40:1,41:1,42:1,43:1}],322:[[[[49,1],[48,2]],[[48,2],[0,1]],[[49,3],[157,4],[0,2]],[[157,4],[0,3]],[[0,4]]],{6:1,7:1,8:1,9:1,11:1,12:1,14:1,19:1,22:1,25:1,29:1,30:1,33:1,35:1,38:1,43:1,48:1}],323:[[[[158,1]],[[52,2],[0,1]],[[158,1],[0,2]]],{6:1,7:1,8:1,9:1,11:1,12:1,14:1,19:1,22:1,25:1,29:1,30:1,33:1,35:1,38:1,43:1,48:1}],324:[[[[1,1],[2,2]],[[0,1]],[[159,3]],[[121,4]],[[160,1],[121,4]]],{2:1,5:1,6:1,7:1,8:1,9:1,11:1,12:1,14:1,15:1,16:1,17:1,18:1,19:1,22:1,23:1,24:1,25:1,26:1,27:1,28:1,29:1,30:1,31:1,32:1,33:1,35:1,36:1,38:1,39:1,40:1,43:1}],325:[[[[120,1]],[[161,0],[15,0],[162,0],[41,0],[163,0],[0,1]]],{6:1,7:1,9:1,11:1,12:1,19:1,22:1,25:1,29:1,30:1,33:1,35:1,38:1,43:1}],326:[[[[84,1],[164,2]],[[37,3],[0,1]],[[0,2]],[[84,4]],[[127,5]],[[49,2]]],{6:1,7:1,8:1,9:1,11:1,12:1,14:1,19:1,22:1,25:1,29:1,30:1,33:1,35:1,38:1,43:1}],327:[[[[165,1],[84,1]],[[0,1]]],{6:1,7:1,8:1,9:1,11:1,12:1,14:1,19:1,22:1,25:1,29:1,30:1,33:1,35:1,38:1,43:1}],328:[[[[49,1]],[[52,2],[0,1]],[[49,1],[0,2]]],{6:1,7:1,8:1,9:1,11:1,12:1,14:1,19:1,22:1,25:1,29:1,30:1,33:1,35:1,38:1,43:1}],329:[[[[49,1],[107,1]],[[54,2],[52,3],[0,1]],[[0,2]],[[49,4],[107,4],[0,3]],[[52,3],[0,4]]],{6:1,7:1,8:1,9:1,11:1,12:1,14:1,15:1,19:1,22:1,25:1,29:1,30:1,33:1,35:1,38:1,43:1}],330:[[[[49,1],[107,1]],[[52,2],[0,1]],[[49,1],[107,1],[0,2]]],{6:1,7:1,8:1,9:1,11:1,12:1,14:1,15:1,19:1,22:1,25:1,29:1,30:1,33:1,35:1,38:1,43:1}],331:[[[[25,1]],[[48,2],[0,1]],[[49,3]],[[0,3]]],{25:1}],332:[[[[35,1],[110,2],[38,3]],[[61,4],[81,5]],[[25,4]],[[166,6]],[[0,4]],[[61,4]],[[64,4]]],{35:1,38:1,110:1}],333:[[[[20,1]],[[48,2]],[[80,3]],[[167,4],[168,5]],[[48,6]],[[48,7]],[[80,8]],[[80,9]],[[167,4],[127,10],[168,5],[0,8]],[[0,9]],[[48,11]],[[80,12]],[[168,5],[0,12]]],{20:1}],334:[[[[15,1],[169,2],[53,3]],[[169,4],[52,5],[0,1]],[[50,6],[52,7],[0,2]],[[169,8]],[[52,5],[0,4]],[[169,9],[53,3],[0,5]],[[49,10]],[[15,11],[169,2],[53,3],[0,7]],[[52,12],[0,8]],[[50,13],[52,5],[0,9]],[[52,7],[0,10]],[[169,14],[52,15],[0,11]],[[0,12]],[[49,4]],[[52,15],[0,14]],[[169,16],[53,3],[0,15]],[[50,17],[52,15],[0,16]],[[49,14]]],{15:1,25:1,53:1}],335:[[[[15,1],[53,2],[170,3]],[[170,5],[52,4],[0,1]],[[170,6]],[[50,7],[52,8],[0,3]],[[53,2],[170,9],[0,4]],[[52,4],[0,5]],[[52,10],[0,6]],[[49,11]],[[15,12],[53,2],[170,3],[0,8]],[[50,13],[52,4],[0,9]],[[0,10]],[[52,8],[0,11]],[[52,15],[170,14],[0,12]],[[49,5]],[[52,15],[0,14]],[[53,2],[170,16],[0,15]],[[50,17],[52,15],[0,16]],[[49,14]]],{15:1,25:1,53:1}],336:[[[[25,1]],[[0,1]]],{25:1}],337:[[[[21,1]],[[49,2]],[[48,3]],[[80,4]],[[127,5],[0,4]],[[48,6]],[[80,7]],[[0,7]]],{21:1}],338:[[[[49,1]],[[108,2],[0,1]],[[95,3]],[[0,3]]],{6:1,7:1,8:1,9:1,11:1,12:1,14:1,19:1,22:1,25:1,29:1,30:1,33:1,35:1,38:1,43:1}],339:[[[[42,1]],[[171,2]],[[48,3],[52,1]],[[80,4]],[[0,4]]],{42:1}],340:[[[[172,1]],[[173,0],[0,1]]],{6:1,7:1,9:1,11:1,12:1,19:1,22:1,25:1,29:1,30:1,33:1,35:1,38:1,43:1}],341:[[[[111,2],[36,1]],[[49,2]],[[0,2]]],{6:1,7:1,8:1,9:1,11:1,12:1,14:1,19:1,22:1,25:1,29:1,30:1,33:1,35:1,36:1,38:1,43:1}],342:[[[[31,1]],[[174,2],[0,1]],[[0,2]]],{31:1}],343:[[[[62,1]],[[0,1]]],{31:1}]},states:[[[[1,1],[2,1],[3,2]],[[0,1]],[[2,1]]],[[[44,1]],[[45,0],[0,1]]],[[[46,1]],[[47,0],[0,1]]],[[[48,1]],[[49,2]],[[50,3],[0,2]],[[49,4]],[[0,4]]],[[[51,1]],[[52,2],[0,1]],[[51,1],[0,2]]],[[[49,1],[15,2],[53,2]],[[50,2],[54,3],[0,1]],[[49,3]],[[0,3]]],[[[55,1]],[[30,0],[43,0],[0,1]]],[[[24,1]],[[49,2]],[[52,3],[0,2]],[[49,4]],[[0,4]]],[[[10,1]],[[56,2]],[[0,2]]],[[[10,1]],[[57,2],[56,2],[58,2]],[[0,2]]],[[[6,1],[25,1],[33,1],[9,1],[11,1],[12,2],[35,3],[38,4],[19,1],[7,5]],[[0,1]],[[59,1],[60,6]],[[61,1],[62,7],[63,7]],[[64,1],[63,8]],[[7,5],[0,5]],[[59,1]],[[61,1]],[[64,1]]],[[[29,1],[65,2]],[[65,2]],[[66,2],[0,2]]],[[[67,1],[68,1],[69,1],[70,1],[71,1],[72,1],[73,1],[74,1],[75,1],[76,1],[77,1],[78,1],[79,1]],[[0,1]]],[[[39,1]],[[0,1]]],[[[13,1]],[[25,2]],[[48,3],[35,4]],[[80,5]],[[61,6],[81,7]],[[0,5]],[[48,3]],[[61,6]]],[[[10,1],[34,2]],[[34,2]],[[82,3]],[[83,4]],[[84,5]],[[85,6],[0,5]],[[0,6]]],[[[37,1]],[[86,2]],[[85,3],[0,2]],[[0,3]]],[[[87,1],[54,1]],[[0,1]]],[[[88,1],[89,1],[8,2],[90,1],[88,1],[83,1],[91,1],[92,3],[93,1],[94,1]],[[0,1]],[[83,1]],[[8,1],[0,3]]],[[[95,1]],[[96,0],[0,1]]],[[[97,1],[98,1],[58,1],[99,1],[57,1],[100,1],[56,1],[101,1],[102,1]],[[0,1]]],[[[40,1]],[[0,1]]],[[[17,1]],[[0,1]]],[[[103,1]],[[56,2],[104,2],[99,2]],[[0,2]]],[[[41,1]],[[105,2]],[[2,4],[35,3]],[[61,5],[81,6]],[[0,4]],[[2,4]],[[61,5]]],[[[106,1]],[[106,1],[0,1]]],[[[27,1]],[[82,2]],[[0,2]]],[[[49,1],[107,2],[53,3]],[[48,4],[54,5],[52,6],[0,1]],[[54,5],[52,6],[0,2]],[[95,7]],[[49,7]],[[0,5]],[[49,8],[107,8],[0,6]],[[54,5],[52,9],[0,7]],[[52,6],[0,8]],[[49,10],[53,11],[0,9]],[[48,12]],[[95,13]],[[49,13]],[[52,9],[0,13]]],[[[105,1]],[[108,2],[0,1]],[[25,3]],[[0,3]]],[[[109,1]],[[52,0],[0,1]]],[[[25,1]],[[110,0],[0,1]]],[[[25,1]],[[0,1]]],[[[111,1]],[[2,1],[112,2]],[[0,2]]],[[[113,1]],[[49,2],[0,1]],[[108,3],[52,3],[0,2]],[[49,4]],[[0,4]]],[[[114,1]],[[115,0],[0,1]]],[[[116,1]],[[117,2],[50,3],[118,4],[0,1]],[[111,4],[62,4]],[[116,5],[62,5]],[[0,4]],[[50,3],[0,5]]],[[[95,1],[107,1]],[[52,2],[0,1]],[[95,1],[107,1],[0,2]]],[[[119,2],[30,1],[22,1],[43,1]],[[120,2]],[[0,2]]],[[[2,0],[112,1],[121,0]],[[0,1]]],[[[122,1],[123,1],[124,1],[125,1],[126,1]],[[0,1]]],[[[34,1]],[[82,2]],[[83,3]],[[111,4]],[[48,5]],[[80,6]],[[127,7],[0,6]],[[48,8]],[[80,9]],[[0,9]]],[[[4,1]],[[25,2]],[[128,3]],[[48,4],[129,5]],[[80,6]],[[49,7]],[[0,6]],[[48,4]]],[[[26,1]],[[25,2]],[[52,1],[0,2]]],[[[37,1]],[[49,2]],[[48,3]],[[80,4]],[[127,5],[130,1],[0,4]],[[48,6]],[[80,7]],[[0,7]]],[[[25,1]],[[108,2],[0,1]],[[25,3]],[[0,3]]],[[[131,1]],[[52,2],[0,1]],[[131,1],[0,2]]],[[[36,1]],[[105,2],[19,3],[110,3]],[[32,4]],[[105,2],[19,3],[32,4],[110,3]],[[132,5],[15,5],[35,6]],[[0,5]],[[132,7]],[[61,5]]],[[[32,1]],[[133,2]],[[0,2]]],[[[134,1],[135,1]],[[0,1]]],[[[14,1]],[[48,2],[136,3]],[[49,4]],[[48,2]],[[0,4]]],[[[14,1]],[[48,2],[136,3]],[[86,4]],[[48,2]],[[0,4]]],[[[18,1]],[[25,2]],[[52,1],[0,2]]],[[[8,1],[137,2]],[[46,2]],[[0,2]]],[[[138,1]],[[139,0],[0,1]]],[[[35,1]],[[61,2],[140,3]],[[0,2]],[[61,2]]],[[[28,1]],[[0,1]]],[[[141,1]],[[53,2],[0,1]],[[120,3]],[[0,3]]],[[[16,1]],[[49,2],[142,3],[0,1]],[[52,4],[0,2]],[[49,5]],[[49,2],[0,4]],[[52,6],[0,5]],[[49,7]],[[52,8],[0,7]],[[49,7],[0,8]]],[[[5,1]],[[49,2],[0,1]],[[36,3],[52,3],[0,2]],[[49,4]],[[52,5],[0,4]],[[49,6]],[[0,6]]],[[[23,1]],[[111,2],[0,1]],[[0,2]]],[[[143,1]],[[144,0],[142,0],[0,1]]],[[[145,1]],[[2,2],[146,3]],[[0,2]],[[145,1],[2,2]]],[[[48,1]],[[49,2],[0,1]],[[0,2]]],[[[147,1],[148,1],[149,1],[150,1],[151,1],[152,1],[153,1],[154,1],[155,1],[156,1]],[[0,1]]],[[[15,1]],[[95,2]],[[0,2]]],[[[1,1],[3,1]],[[0,1]]],[[[49,1],[48,2]],[[48,2],[0,1]],[[49,3],[157,4],[0,2]],[[157,4],[0,3]],[[0,4]]],[[[158,1]],[[52,2],[0,1]],[[158,1],[0,2]]],[[[1,1],[2,2]],[[0,1]],[[159,3]],[[121,4]],[[160,1],[121,4]]],[[[120,1]],[[161,0],[15,0],[162,0],[41,0],[163,0],[0,1]]],[[[84,1],[164,2]],[[37,3],[0,1]],[[0,2]],[[84,4]],[[127,5]],[[49,2]]],[[[165,1],[84,1]],[[0,1]]],[[[49,1]],[[52,2],[0,1]],[[49,1],[0,2]]],[[[49,1],[107,1]],[[54,2],[52,3],[0,1]],[[0,2]],[[49,4],[107,4],[0,3]],[[52,3],[0,4]]],[[[49,1],[107,1]],[[52,2],[0,1]],[[49,1],[107,1],[0,2]]],[[[25,1]],[[48,2],[0,1]],[[49,3]],[[0,3]]],[[[35,1],[110,2],[38,3]],[[61,4],[81,5]],[[25,4]],[[166,6]],[[0,4]],[[61,4]],[[64,4]]],[[[20,1]],[[48,2]],[[80,3]],[[167,4],[168,5]],[[48,6]],[[48,7]],[[80,8]],[[80,9]],[[167,4],[127,10],[168,5],[0,8]],[[0,9]],[[48,11]],[[80,12]],[[168,5],[0,12]]],[[[15,1],[169,2],[53,3]],[[169,4],[52,5],[0,1]],[[50,6],[52,7],[0,2]],[[169,8]],[[52,5],[0,4]],[[169,9],[53,3],[0,5]],[[49,10]],[[15,11],[169,2],[53,3],[0,7]],[[52,12],[0,8]],[[50,13],[52,5],[0,9]],[[52,7],[0,10]],[[169,14],[52,15],[0,11]],[[0,12]],[[49,4]],[[52,15],[0,14]],[[169,16],[53,3],[0,15]],[[50,17],[52,15],[0,16]],[[49,14]]],[[[15,1],[53,2],[170,3]],[[170,5],[52,4],[0,1]],[[170,6]],[[50,7],[52,8],[0,3]],[[53,2],[170,9],[0,4]],[[52,4],[0,5]],[[52,10],[0,6]],[[49,11]],[[15,12],[53,2],[170,3],[0,8]],[[50,13],[52,4],[0,9]],[[0,10]],[[52,8],[0,11]],[[52,15],[170,14],[0,12]],[[49,5]],[[52,15],[0,14]],[[53,2],[170,16],[0,15]],[[50,17],[52,15],[0,16]],[[49,14]]],[[[25,1]],[[0,1]]],[[[21,1]],[[49,2]],[[48,3]],[[80,4]],[[127,5],[0,4]],[[48,6]],[[80,7]],[[0,7]]],[[[49,1]],[[108,2],[0,1]],[[95,3]],[[0,3]]],[[[42,1]],[[171,2]],[[48,3],[52,1]],[[80,4]],[[0,4]]],[[[172,1]],[[173,0],[0,1]]],[[[111,2],[36,1]],[[49,2]],[[0,2]]],[[[31,1]],[[174,2],[0,1]],[[0,2]]],[[[62,1]],[[0,1]]]],labels:[[0,"EMPTY"],[317,null],[4,null],[276,null],[1,"def"],[1,"raise"],[1,"True"],[3,null],[1,"not"],[1,"None"],[55,null],[2,null],[25,null],[1,"class"],[1,"lambda"],[16,null],[1,"print"],[1,"debugger"],[1,"nonlocal"],[52,null],[1,"try"],[1,"while"],[31,null],[1,"return"],[1,"assert"],[1,null],[1,"global"],[1,"del"],[1,"pass"],[54,null],[15,null],[1,"yield"],[1,"import"],[1,"False"],[1,"for"],[7,null],[1,"from"],[1,"if"],[9,null],[1,"break"],[1,"continue"],[49,null],[1,"with"],[14,null],[316,null],[19,null],[308,null],[1,"and"],[11,null],[326,null],[22,null],[261,null],[12,null],[35,null],[271,null],[325,null],[297,null],[339,null],[296,null],[26,null],[283,null],[8,null],[342,null],[329,null],[10,null],[266,null],[332,null],[45,null],[38,null],[40,null],[50,null],[46,null],[41,null],[42,null],[36,null],[43,null],[48,null],[44,null],[37,null],[39,null],[324,null],[260,null],[292,null],[1,"in"],[309,null],[273,null],[327,null],[272,null],[28,null],[21,null],[27,null],[29,null],[1,"is"],[30,null],[20,null],[290,null],[274,null],[333,null],[299,null],[270,null],[337,null],[279,null],[265,null],[281,null],[264,null],[286,null],[280,null],[320,null],[1,"as"],[284,null],[23,null],[328,null],[0,null],[1,"except"],[340,null],[18,null],[330,null],[268,null],[259,null],[312,null],[293,null],[321,null],[269,null],[277,null],[314,null],[315,null],[343,null],[1,"else"],[310,null],[51,null],[1,"elif"],[300,null],[301,null],[285,null],[303,null],[302,null],[335,null],[275,null],[258,null],[1,"or"],[334,null],[267,null],[34,null],[262,null],[33,null],[319,null],[13,null],[295,null],[263,null],[291,null],[311,null],[307,null],[313,null],[282,null],[298,null],[304,null],[278,null],[318,null],[322,null],[5,null],[6,null],[47,null],[17,null],[24,null],[305,null],[306,null],[323,null],[289,null],[1,"finally"],[331,null],[336,null],[338,null],[257,null],[32,null],[341,null]],keywords:{False:33,None:9,True:6,and:47,as:108,assert:24,break:39,class:13,continue:40,debugger:17,def:4,del:27,elif:130,else:127,except:113,finally:168,for:34,from:36,global:26,if:37,import:32,in:83,is:92,lambda:14,nonlocal:18,not:8,or:139,pass:28,print:16,raise:5,return:23,try:20,while:21,with:42,yield:31},tokens:{0:112,1:25,2:11,3:7,4:2,5:159,6:160,7:35,8:61,9:38,10:64,11:48,12:52,13:146,14:43,15:30,16:15,17:162,18:115,19:45,20:94,21:89,22:50,23:110,24:163,25:12,26:59,27:90,28:88,29:91,30:93,31:22,32:173,33:144,34:142,35:53,36:74,37:78,38:68,39:79,40:69,41:72,42:73,43:75,44:77,45:67,46:71,47:161,48:76,49:41,50:70,51:129,52:19,54:29,55:10},start:256}},function(p,g){function e(n,r){return this.filename=n,this.grammar=r,this.p_flags=0,this}function i(n,r){return r===void 0&&(r="file_input"),n=new e(n,Sk.ParseTables),r==="file_input"?n.setup(Sk.ParseTables.sym.file_input):Sk.asserts.fail("todo;"),n}e.FUTURE_PRINT_FUNCTION="print_function",e.FUTURE_UNICODE_LITERALS="unicode_literals",e.FUTURE_DIVISION="division",e.FUTURE_ABSOLUTE_IMPORT="absolute_import",e.FUTURE_WITH_STATEMENT="with_statement",e.FUTURE_NESTED_SCOPES="nested_scopes",e.FUTURE_GENERATORS="generators",e.CO_FUTURE_PRINT_FUNCTION=65536,e.CO_FUTURE_UNICODE_LITERALS=131072,e.CO_FUTURE_DIVISON=8192,e.CO_FUTURE_ABSOLUTE_IMPORT=16384,e.CO_FUTURE_WITH_STATEMENT=32768,e.prototype.setup=function(n){n=n||this.grammar.start,this.stack=[{dfa:this.grammar.dfas[n],state:0,node:{type:n,value:null,context:null,children:[]}}],this.used_names={}},e.prototype.addtoken=function(n,r,l){var h,a=this.classify(n,r,l);e:for(;;){var S=this.stack[this.stack.length-1],t=S.dfa[0],s=t[S.state];for(h=0;hd),this.shift(n,r,o,l),l=o;t[l].length===1&&t[l][0][0]===0&&t[l][0][1]===l;){if(this.pop(),this.stack.length===0)return!0;S=this.stack[this.stack.length-1],l=S.state,t=S.dfa[0]}return!1}if(256<=d&&(c=this.grammar.dfas[d],c=c[1],c.hasOwnProperty(a))){this.push(d,this.grammar.dfas[d],o,l);continue e}}t:{for(t=[0,S.state],S=s.length;S--;)if(s[S][0]===t[0]&&s[S][1]===t[1]){s=!0;break t}s=!1}if(s){if(this.pop(),this.stack.length===0)throw new Sk.builtin.SyntaxError("too much input",this.filename)}else throw n=l[0][0],new Sk.builtin.SyntaxError("bad input",this.filename,n,l)}},e.prototype.classify=function(n,r,l){if(n===Sk.token.tokens.T_NAME){this.used_names[r]=!0;var h=this.grammar.keywords.hasOwnProperty(r)&&this.grammar.keywords[r];if(r==="print"&&(this.p_flags&e.CO_FUTURE_PRINT_FUNCTION||Sk.__future__.print_function===!0)&&(h=!1),h)return h}if(h=this.grammar.tokens.hasOwnProperty(n)&&this.grammar.tokens[n],!h){r="#"+n;for(let a in Sk.token.tokens)if(Sk.token.tokens[a]==n){r=a;break}throw new Sk.builtin.SyntaxError("bad token "+r,this.filename,l[0][0],l)}return h},e.prototype.shift=function(n,r,l,h){var a=this.stack[this.stack.length-1].dfa,S=this.stack[this.stack.length-1].node;S.children.push({type:n,value:r,lineno:h[0][0],col_offset:h[0][1],children:null}),this.stack[this.stack.length-1]={dfa:a,state:l,node:S}},e.prototype.push=function(n,r,l,h){n={type:n,value:null,lineno:h[0][0],col_offset:h[0][1],children:[]},this.stack[this.stack.length-1]={dfa:this.stack[this.stack.length-1].dfa,state:l,node:this.stack[this.stack.length-1].node},this.stack.push({dfa:r,state:0,node:n})},e.prototype.pop=function(){var n=this.stack.pop().node;if(n)if(this.stack.length!==0){var r=this.stack[this.stack.length-1].node;r.children.push(n)}else this.rootnode=n,this.rootnode.used_names=this.used_names},Sk.parse=function(n,r){var l=Sk.token.tokens.T_COMMENT,h=Sk.token.tokens.T_NL,a=Sk.token.tokens.T_OP,S=Sk.token.tokens.T_ENDMARKER,t=Sk.token.tokens.T_ENCODING,s=!1,c=i(n);if(Sk._tokenize(n,function(o){var d=o.split(` +is exhausted and then it raises StopIteration.`,tp$new(e,i){this===Sk.builtin.zip_.prototype&&Sk.abstr.checkNoKwargs("zip",i),i=[];for(let n=0;n":e.T_RARROW,".":e.T_DOT,"...":e.T_ELLIPSIS,"/":e.T_SLASH,"//":e.T_DOUBLESLASH,"//=":e.T_DOUBLESLASHEQUAL,"/=":e.T_SLASHEQUAL,":":e.T_COLON,";":e.T_SEMI,"<":e.T_LESS,"<<":e.T_LEFTSHIFT,"<<=":e.T_LEFTSHIFTEQUAL,"<=":e.T_LESSEQUAL,"=":e.T_EQUAL,"==":e.T_EQEQUAL,">":e.T_GREATER,">=":e.T_GREATEREQUAL,">>":e.T_RIGHTSHIFT,">>=":e.T_RIGHTSHIFTEQUAL,"@":e.T_AT,"@=":e.T_ATEQUAL,"[":e.T_LSQB,"]":e.T_RSQB,"^":e.T_CIRCUMFLEX,"^=":e.T_CIRCUMFLEXEQUAL,"{":e.T_LBRACE,"|":e.T_VBAR,"|=":e.T_VBAREQUAL,"}":e.T_RBRACE,"~":e.T_TILDE};var i={};(function(){for(var n in e)i[e[n]]=n})(),["tok_name","ISTERMINAL","ISNONTERMINAL","ISEOF"].concat(Object.keys(i).map(function(n){return i[n]})),Sk.token={},Sk.token.tokens=e,Sk.token.tok_name=i,Sk.token.EXACT_TOKEN_TYPES=p,Sk.token.ISTERMINAL=function(n){return n=e.T_NT_OFFSET},Sk.token.ISEOF=function(n){return n==e.T_ENDMARKER},Sk.exportSymbol("Sk.token",Sk.token),Sk.exportSymbol("Sk.token.tokens",Sk.token.tokens),Sk.exportSymbol("Sk.token.tok_name",Sk.token.tok_name),Sk.exportSymbol("Sk.token.EXACT_TOKEN_TYPES"),Sk.exportSymbol("Sk.token.ISTERMINAL",Sk.token.ISTERMINAL),Sk.exportSymbol("Sk.token.ISNONTERMINAL",Sk.token.ISNONTERMINAL),Sk.exportSymbol("Sk.token.ISEOF",Sk.token.ISEOF)},function(p,b){Sk.OpMap={"(":Sk.token.tokens.T_LPAR,")":Sk.token.tokens.T_RPAR,"[":Sk.token.tokens.T_LSQB,"]":Sk.token.tokens.T_RSQB,":":Sk.token.tokens.T_COLON,",":Sk.token.tokens.T_COMMA,";":Sk.token.tokens.T_SEMI,"+":Sk.token.tokens.T_PLUS,"-":Sk.token.tokens.T_MINUS,"*":Sk.token.tokens.T_STAR,"/":Sk.token.tokens.T_SLASH,"|":Sk.token.tokens.T_VBAR,"&":Sk.token.tokens.T_AMPER,"<":Sk.token.tokens.T_LESS,">":Sk.token.tokens.T_GREATER,"=":Sk.token.tokens.T_EQUAL,".":Sk.token.tokens.T_DOT,"%":Sk.token.tokens.T_PERCENT,"`":Sk.token.tokens.T_BACKQUOTE,"{":Sk.token.tokens.T_LBRACE,"}":Sk.token.tokens.T_RBRACE,"@":Sk.token.tokens.T_AT,"@=":Sk.token.tokens.T_ATEQUAL,"==":Sk.token.tokens.T_EQEQUAL,"!=":Sk.token.tokens.T_NOTEQUAL,"<>":Sk.token.tokens.T_NOTEQUAL,"<=":Sk.token.tokens.T_LESSEQUAL,">=":Sk.token.tokens.T_GREATEREQUAL,"~":Sk.token.tokens.T_TILDE,"^":Sk.token.tokens.T_CIRCUMFLEX,"<<":Sk.token.tokens.T_LEFTSHIFT,">>":Sk.token.tokens.T_RIGHTSHIFT,"**":Sk.token.tokens.T_DOUBLESTAR,"+=":Sk.token.tokens.T_PLUSEQUAL,"-=":Sk.token.tokens.T_MINEQUAL,"*=":Sk.token.tokens.T_STAREQUAL,"/=":Sk.token.tokens.T_SLASHEQUAL,"%=":Sk.token.tokens.T_PERCENTEQUAL,"&=":Sk.token.tokens.T_AMPEREQUAL,"|=":Sk.token.tokens.T_VBAREQUAL,"^=":Sk.token.tokens.T_CIRCUMFLEXEQUAL,"<<=":Sk.token.tokens.T_LEFTSHIFTEQUAL,">>=":Sk.token.tokens.T_RIGHTSHIFTEQUAL,"**=":Sk.token.tokens.T_DOUBLESTAREQUAL,"//":Sk.token.tokens.T_DOUBLESLASH,"//=":Sk.token.tokens.T_DOUBLESLASHEQUAL,"->":Sk.token.tokens.T_RARROW,"...":Sk.token.tokens.T_ELLIPSIS},Sk.ParseTables={sym:{and_expr:257,and_test:258,annassign:259,arglist:260,argument:261,arith_expr:262,assert_stmt:263,async_funcdef:264,async_stmt:265,atom:266,atom_expr:267,augassign:268,break_stmt:269,classdef:270,comp_for:271,comp_if:272,comp_iter:273,comp_op:274,comparison:275,compound_stmt:276,continue_stmt:277,debugger_stmt:278,decorated:279,decorator:280,decorators:281,del_stmt:282,dictorsetmaker:283,dotted_as_name:284,dotted_as_names:285,dotted_name:286,encoding_decl:287,eval_input:288,except_clause:289,expr:290,expr_stmt:291,exprlist:292,factor:293,file_input:294,flow_stmt:295,for_stmt:296,funcdef:297,global_stmt:298,if_stmt:299,import_as_name:300,import_as_names:301,import_from:302,import_name:303,import_stmt:304,lambdef:305,lambdef_nocond:306,nonlocal_stmt:307,not_test:308,or_test:309,parameters:310,pass_stmt:311,power:312,print_stmt:313,raise_stmt:314,return_stmt:315,shift_expr:316,simple_stmt:317,single_input:256,sliceop:318,small_stmt:319,star_expr:320,stmt:321,subscript:322,subscriptlist:323,suite:324,term:325,test:326,test_nocond:327,testlist:328,testlist_comp:329,testlist_star_expr:330,tfpdef:331,trailer:332,try_stmt:333,typedargslist:334,varargslist:335,vfpdef:336,while_stmt:337,with_item:338,with_stmt:339,xor_expr:340,yield_arg:341,yield_expr:342,yield_stmt:343},number2symbol:{256:"single_input",257:"and_expr",258:"and_test",259:"annassign",260:"arglist",261:"argument",262:"arith_expr",263:"assert_stmt",264:"async_funcdef",265:"async_stmt",266:"atom",267:"atom_expr",268:"augassign",269:"break_stmt",270:"classdef",271:"comp_for",272:"comp_if",273:"comp_iter",274:"comp_op",275:"comparison",276:"compound_stmt",277:"continue_stmt",278:"debugger_stmt",279:"decorated",280:"decorator",281:"decorators",282:"del_stmt",283:"dictorsetmaker",284:"dotted_as_name",285:"dotted_as_names",286:"dotted_name",287:"encoding_decl",288:"eval_input",289:"except_clause",290:"expr",291:"expr_stmt",292:"exprlist",293:"factor",294:"file_input",295:"flow_stmt",296:"for_stmt",297:"funcdef",298:"global_stmt",299:"if_stmt",300:"import_as_name",301:"import_as_names",302:"import_from",303:"import_name",304:"import_stmt",305:"lambdef",306:"lambdef_nocond",307:"nonlocal_stmt",308:"not_test",309:"or_test",310:"parameters",311:"pass_stmt",312:"power",313:"print_stmt",314:"raise_stmt",315:"return_stmt",316:"shift_expr",317:"simple_stmt",318:"sliceop",319:"small_stmt",320:"star_expr",321:"stmt",322:"subscript",323:"subscriptlist",324:"suite",325:"term",326:"test",327:"test_nocond",328:"testlist",329:"testlist_comp",330:"testlist_star_expr",331:"tfpdef",332:"trailer",333:"try_stmt",334:"typedargslist",335:"varargslist",336:"vfpdef",337:"while_stmt",338:"with_item",339:"with_stmt",340:"xor_expr",341:"yield_arg",342:"yield_expr",343:"yield_stmt"},dfas:{256:[[[[1,1],[2,1],[3,2]],[[0,1]],[[2,1]]],{2:1,4:1,5:1,6:1,7:1,8:1,9:1,10:1,11:1,12:1,13:1,14:1,15:1,16:1,17:1,18:1,19:1,20:1,21:1,22:1,23:1,24:1,25:1,26:1,27:1,28:1,29:1,30:1,31:1,32:1,33:1,34:1,35:1,36:1,37:1,38:1,39:1,40:1,41:1,42:1,43:1}],257:[[[[44,1]],[[45,0],[0,1]]],{6:1,7:1,9:1,11:1,12:1,19:1,22:1,25:1,29:1,30:1,33:1,35:1,38:1,43:1}],258:[[[[46,1]],[[47,0],[0,1]]],{6:1,7:1,8:1,9:1,11:1,12:1,19:1,22:1,25:1,29:1,30:1,33:1,35:1,38:1,43:1}],259:[[[[48,1]],[[49,2]],[[50,3],[0,2]],[[49,4]],[[0,4]]],{48:1}],260:[[[[51,1]],[[52,2],[0,1]],[[51,1],[0,2]]],{6:1,7:1,8:1,9:1,11:1,12:1,14:1,15:1,19:1,22:1,25:1,29:1,30:1,33:1,35:1,38:1,43:1,53:1}],261:[[[[49,1],[15,2],[53,2]],[[50,2],[54,3],[0,1]],[[49,3]],[[0,3]]],{6:1,7:1,8:1,9:1,11:1,12:1,14:1,15:1,19:1,22:1,25:1,29:1,30:1,33:1,35:1,38:1,43:1,53:1}],262:[[[[55,1]],[[30,0],[43,0],[0,1]]],{6:1,7:1,9:1,11:1,12:1,19:1,22:1,25:1,29:1,30:1,33:1,35:1,38:1,43:1}],263:[[[[24,1]],[[49,2]],[[52,3],[0,2]],[[49,4]],[[0,4]]],{24:1}],264:[[[[10,1]],[[56,2]],[[0,2]]],{10:1}],265:[[[[10,1]],[[57,2],[56,2],[58,2]],[[0,2]]],{10:1}],266:[[[[6,1],[25,1],[33,1],[9,1],[11,1],[12,2],[35,3],[38,4],[19,1],[7,5]],[[0,1]],[[59,1],[60,6]],[[61,1],[62,7],[63,7]],[[64,1],[63,8]],[[7,5],[0,5]],[[59,1]],[[61,1]],[[64,1]]],{6:1,7:1,9:1,11:1,12:1,19:1,25:1,33:1,35:1,38:1}],267:[[[[29,1],[65,2]],[[65,2]],[[66,2],[0,2]]],{6:1,7:1,9:1,11:1,12:1,19:1,25:1,29:1,33:1,35:1,38:1}],268:[[[[67,1],[68,1],[69,1],[70,1],[71,1],[72,1],[73,1],[74,1],[75,1],[76,1],[77,1],[78,1],[79,1]],[[0,1]]],{67:1,68:1,69:1,70:1,71:1,72:1,73:1,74:1,75:1,76:1,77:1,78:1,79:1}],269:[[[[39,1]],[[0,1]]],{39:1}],270:[[[[13,1]],[[25,2]],[[48,3],[35,4]],[[80,5]],[[61,6],[81,7]],[[0,5]],[[48,3]],[[61,6]]],{13:1}],271:[[[[10,1],[34,2]],[[34,2]],[[82,3]],[[83,4]],[[84,5]],[[85,6],[0,5]],[[0,6]]],{10:1,34:1}],272:[[[[37,1]],[[86,2]],[[85,3],[0,2]],[[0,3]]],{37:1}],273:[[[[87,1],[54,1]],[[0,1]]],{10:1,34:1,37:1}],274:[[[[88,1],[89,1],[8,2],[90,1],[88,1],[83,1],[91,1],[92,3],[93,1],[94,1]],[[0,1]],[[83,1]],[[8,1],[0,3]]],{8:1,83:1,88:1,89:1,90:1,91:1,92:1,93:1,94:1}],275:[[[[95,1]],[[96,0],[0,1]]],{6:1,7:1,9:1,11:1,12:1,19:1,22:1,25:1,29:1,30:1,33:1,35:1,38:1,43:1}],276:[[[[97,1],[98,1],[58,1],[99,1],[57,1],[100,1],[56,1],[101,1],[102,1]],[[0,1]]],{4:1,10:1,13:1,20:1,21:1,34:1,37:1,41:1,42:1}],277:[[[[40,1]],[[0,1]]],{40:1}],278:[[[[17,1]],[[0,1]]],{17:1}],279:[[[[103,1]],[[56,2],[104,2],[99,2]],[[0,2]]],{41:1}],280:[[[[41,1]],[[105,2]],[[2,4],[35,3]],[[61,5],[81,6]],[[0,4]],[[2,4]],[[61,5]]],{41:1}],281:[[[[106,1]],[[106,1],[0,1]]],{41:1}],282:[[[[27,1]],[[82,2]],[[0,2]]],{27:1}],283:[[[[49,1],[107,2],[53,3]],[[48,4],[54,5],[52,6],[0,1]],[[54,5],[52,6],[0,2]],[[95,7]],[[49,7]],[[0,5]],[[49,8],[107,8],[0,6]],[[54,5],[52,9],[0,7]],[[52,6],[0,8]],[[49,10],[53,11],[0,9]],[[48,12]],[[95,13]],[[49,13]],[[52,9],[0,13]]],{6:1,7:1,8:1,9:1,11:1,12:1,14:1,15:1,19:1,22:1,25:1,29:1,30:1,33:1,35:1,38:1,43:1,53:1}],284:[[[[105,1]],[[108,2],[0,1]],[[25,3]],[[0,3]]],{25:1}],285:[[[[109,1]],[[52,0],[0,1]]],{25:1}],286:[[[[25,1]],[[110,0],[0,1]]],{25:1}],287:[[[[25,1]],[[0,1]]],{25:1}],288:[[[[111,1]],[[2,1],[112,2]],[[0,2]]],{6:1,7:1,8:1,9:1,11:1,12:1,14:1,19:1,22:1,25:1,29:1,30:1,33:1,35:1,38:1,43:1}],289:[[[[113,1]],[[49,2],[0,1]],[[108,3],[52,3],[0,2]],[[49,4]],[[0,4]]],{113:1}],290:[[[[114,1]],[[115,0],[0,1]]],{6:1,7:1,9:1,11:1,12:1,19:1,22:1,25:1,29:1,30:1,33:1,35:1,38:1,43:1}],291:[[[[116,1]],[[117,2],[50,3],[118,4],[0,1]],[[111,4],[62,4]],[[116,5],[62,5]],[[0,4]],[[50,3],[0,5]]],{6:1,7:1,8:1,9:1,11:1,12:1,14:1,15:1,19:1,22:1,25:1,29:1,30:1,33:1,35:1,38:1,43:1}],292:[[[[95,1],[107,1]],[[52,2],[0,1]],[[95,1],[107,1],[0,2]]],{6:1,7:1,9:1,11:1,12:1,15:1,19:1,22:1,25:1,29:1,30:1,33:1,35:1,38:1,43:1}],293:[[[[119,2],[30,1],[22,1],[43,1]],[[120,2]],[[0,2]]],{6:1,7:1,9:1,11:1,12:1,19:1,22:1,25:1,29:1,30:1,33:1,35:1,38:1,43:1}],294:[[[[2,0],[112,1],[121,0]],[[0,1]]],{2:1,4:1,5:1,6:1,7:1,8:1,9:1,10:1,11:1,12:1,13:1,14:1,15:1,16:1,17:1,18:1,19:1,20:1,21:1,22:1,23:1,24:1,25:1,26:1,27:1,28:1,29:1,30:1,31:1,32:1,33:1,34:1,35:1,36:1,37:1,38:1,39:1,40:1,41:1,42:1,43:1,112:1}],295:[[[[122,1],[123,1],[124,1],[125,1],[126,1]],[[0,1]]],{5:1,23:1,31:1,39:1,40:1}],296:[[[[34,1]],[[82,2]],[[83,3]],[[111,4]],[[48,5]],[[80,6]],[[127,7],[0,6]],[[48,8]],[[80,9]],[[0,9]]],{34:1}],297:[[[[4,1]],[[25,2]],[[128,3]],[[48,4],[129,5]],[[80,6]],[[49,7]],[[0,6]],[[48,4]]],{4:1}],298:[[[[26,1]],[[25,2]],[[52,1],[0,2]]],{26:1}],299:[[[[37,1]],[[49,2]],[[48,3]],[[80,4]],[[127,5],[130,1],[0,4]],[[48,6]],[[80,7]],[[0,7]]],{37:1}],300:[[[[25,1]],[[108,2],[0,1]],[[25,3]],[[0,3]]],{25:1}],301:[[[[131,1]],[[52,2],[0,1]],[[131,1],[0,2]]],{25:1}],302:[[[[36,1]],[[105,2],[19,3],[110,3]],[[32,4]],[[105,2],[19,3],[32,4],[110,3]],[[132,5],[15,5],[35,6]],[[0,5]],[[132,7]],[[61,5]]],{36:1}],303:[[[[32,1]],[[133,2]],[[0,2]]],{32:1}],304:[[[[134,1],[135,1]],[[0,1]]],{32:1,36:1}],305:[[[[14,1]],[[48,2],[136,3]],[[49,4]],[[48,2]],[[0,4]]],{14:1}],306:[[[[14,1]],[[48,2],[136,3]],[[86,4]],[[48,2]],[[0,4]]],{14:1}],307:[[[[18,1]],[[25,2]],[[52,1],[0,2]]],{18:1}],308:[[[[8,1],[137,2]],[[46,2]],[[0,2]]],{6:1,7:1,8:1,9:1,11:1,12:1,19:1,22:1,25:1,29:1,30:1,33:1,35:1,38:1,43:1}],309:[[[[138,1]],[[139,0],[0,1]]],{6:1,7:1,8:1,9:1,11:1,12:1,19:1,22:1,25:1,29:1,30:1,33:1,35:1,38:1,43:1}],310:[[[[35,1]],[[61,2],[140,3]],[[0,2]],[[61,2]]],{35:1}],311:[[[[28,1]],[[0,1]]],{28:1}],312:[[[[141,1]],[[53,2],[0,1]],[[120,3]],[[0,3]]],{6:1,7:1,9:1,11:1,12:1,19:1,25:1,29:1,33:1,35:1,38:1}],313:[[[[16,1]],[[49,2],[142,3],[0,1]],[[52,4],[0,2]],[[49,5]],[[49,2],[0,4]],[[52,6],[0,5]],[[49,7]],[[52,8],[0,7]],[[49,7],[0,8]]],{16:1}],314:[[[[5,1]],[[49,2],[0,1]],[[36,3],[52,3],[0,2]],[[49,4]],[[52,5],[0,4]],[[49,6]],[[0,6]]],{5:1}],315:[[[[23,1]],[[111,2],[0,1]],[[0,2]]],{23:1}],316:[[[[143,1]],[[144,0],[142,0],[0,1]]],{6:1,7:1,9:1,11:1,12:1,19:1,22:1,25:1,29:1,30:1,33:1,35:1,38:1,43:1}],317:[[[[145,1]],[[2,2],[146,3]],[[0,2]],[[145,1],[2,2]]],{5:1,6:1,7:1,8:1,9:1,11:1,12:1,14:1,15:1,16:1,17:1,18:1,19:1,22:1,23:1,24:1,25:1,26:1,27:1,28:1,29:1,30:1,31:1,32:1,33:1,35:1,36:1,38:1,39:1,40:1,43:1}],318:[[[[48,1]],[[49,2],[0,1]],[[0,2]]],{48:1}],319:[[[[147,1],[148,1],[149,1],[150,1],[151,1],[152,1],[153,1],[154,1],[155,1],[156,1]],[[0,1]]],{5:1,6:1,7:1,8:1,9:1,11:1,12:1,14:1,15:1,16:1,17:1,18:1,19:1,22:1,23:1,24:1,25:1,26:1,27:1,28:1,29:1,30:1,31:1,32:1,33:1,35:1,36:1,38:1,39:1,40:1,43:1}],320:[[[[15,1]],[[95,2]],[[0,2]]],{15:1}],321:[[[[1,1],[3,1]],[[0,1]]],{4:1,5:1,6:1,7:1,8:1,9:1,10:1,11:1,12:1,13:1,14:1,15:1,16:1,17:1,18:1,19:1,20:1,21:1,22:1,23:1,24:1,25:1,26:1,27:1,28:1,29:1,30:1,31:1,32:1,33:1,34:1,35:1,36:1,37:1,38:1,39:1,40:1,41:1,42:1,43:1}],322:[[[[49,1],[48,2]],[[48,2],[0,1]],[[49,3],[157,4],[0,2]],[[157,4],[0,3]],[[0,4]]],{6:1,7:1,8:1,9:1,11:1,12:1,14:1,19:1,22:1,25:1,29:1,30:1,33:1,35:1,38:1,43:1,48:1}],323:[[[[158,1]],[[52,2],[0,1]],[[158,1],[0,2]]],{6:1,7:1,8:1,9:1,11:1,12:1,14:1,19:1,22:1,25:1,29:1,30:1,33:1,35:1,38:1,43:1,48:1}],324:[[[[1,1],[2,2]],[[0,1]],[[159,3]],[[121,4]],[[160,1],[121,4]]],{2:1,5:1,6:1,7:1,8:1,9:1,11:1,12:1,14:1,15:1,16:1,17:1,18:1,19:1,22:1,23:1,24:1,25:1,26:1,27:1,28:1,29:1,30:1,31:1,32:1,33:1,35:1,36:1,38:1,39:1,40:1,43:1}],325:[[[[120,1]],[[161,0],[15,0],[162,0],[41,0],[163,0],[0,1]]],{6:1,7:1,9:1,11:1,12:1,19:1,22:1,25:1,29:1,30:1,33:1,35:1,38:1,43:1}],326:[[[[84,1],[164,2]],[[37,3],[0,1]],[[0,2]],[[84,4]],[[127,5]],[[49,2]]],{6:1,7:1,8:1,9:1,11:1,12:1,14:1,19:1,22:1,25:1,29:1,30:1,33:1,35:1,38:1,43:1}],327:[[[[165,1],[84,1]],[[0,1]]],{6:1,7:1,8:1,9:1,11:1,12:1,14:1,19:1,22:1,25:1,29:1,30:1,33:1,35:1,38:1,43:1}],328:[[[[49,1]],[[52,2],[0,1]],[[49,1],[0,2]]],{6:1,7:1,8:1,9:1,11:1,12:1,14:1,19:1,22:1,25:1,29:1,30:1,33:1,35:1,38:1,43:1}],329:[[[[49,1],[107,1]],[[54,2],[52,3],[0,1]],[[0,2]],[[49,4],[107,4],[0,3]],[[52,3],[0,4]]],{6:1,7:1,8:1,9:1,11:1,12:1,14:1,15:1,19:1,22:1,25:1,29:1,30:1,33:1,35:1,38:1,43:1}],330:[[[[49,1],[107,1]],[[52,2],[0,1]],[[49,1],[107,1],[0,2]]],{6:1,7:1,8:1,9:1,11:1,12:1,14:1,15:1,19:1,22:1,25:1,29:1,30:1,33:1,35:1,38:1,43:1}],331:[[[[25,1]],[[48,2],[0,1]],[[49,3]],[[0,3]]],{25:1}],332:[[[[35,1],[110,2],[38,3]],[[61,4],[81,5]],[[25,4]],[[166,6]],[[0,4]],[[61,4]],[[64,4]]],{35:1,38:1,110:1}],333:[[[[20,1]],[[48,2]],[[80,3]],[[167,4],[168,5]],[[48,6]],[[48,7]],[[80,8]],[[80,9]],[[167,4],[127,10],[168,5],[0,8]],[[0,9]],[[48,11]],[[80,12]],[[168,5],[0,12]]],{20:1}],334:[[[[15,1],[169,2],[53,3]],[[169,4],[52,5],[0,1]],[[50,6],[52,7],[0,2]],[[169,8]],[[52,5],[0,4]],[[169,9],[53,3],[0,5]],[[49,10]],[[15,11],[169,2],[53,3],[0,7]],[[52,12],[0,8]],[[50,13],[52,5],[0,9]],[[52,7],[0,10]],[[169,14],[52,15],[0,11]],[[0,12]],[[49,4]],[[52,15],[0,14]],[[169,16],[53,3],[0,15]],[[50,17],[52,15],[0,16]],[[49,14]]],{15:1,25:1,53:1}],335:[[[[15,1],[53,2],[170,3]],[[170,5],[52,4],[0,1]],[[170,6]],[[50,7],[52,8],[0,3]],[[53,2],[170,9],[0,4]],[[52,4],[0,5]],[[52,10],[0,6]],[[49,11]],[[15,12],[53,2],[170,3],[0,8]],[[50,13],[52,4],[0,9]],[[0,10]],[[52,8],[0,11]],[[52,15],[170,14],[0,12]],[[49,5]],[[52,15],[0,14]],[[53,2],[170,16],[0,15]],[[50,17],[52,15],[0,16]],[[49,14]]],{15:1,25:1,53:1}],336:[[[[25,1]],[[0,1]]],{25:1}],337:[[[[21,1]],[[49,2]],[[48,3]],[[80,4]],[[127,5],[0,4]],[[48,6]],[[80,7]],[[0,7]]],{21:1}],338:[[[[49,1]],[[108,2],[0,1]],[[95,3]],[[0,3]]],{6:1,7:1,8:1,9:1,11:1,12:1,14:1,19:1,22:1,25:1,29:1,30:1,33:1,35:1,38:1,43:1}],339:[[[[42,1]],[[171,2]],[[48,3],[52,1]],[[80,4]],[[0,4]]],{42:1}],340:[[[[172,1]],[[173,0],[0,1]]],{6:1,7:1,9:1,11:1,12:1,19:1,22:1,25:1,29:1,30:1,33:1,35:1,38:1,43:1}],341:[[[[111,2],[36,1]],[[49,2]],[[0,2]]],{6:1,7:1,8:1,9:1,11:1,12:1,14:1,19:1,22:1,25:1,29:1,30:1,33:1,35:1,36:1,38:1,43:1}],342:[[[[31,1]],[[174,2],[0,1]],[[0,2]]],{31:1}],343:[[[[62,1]],[[0,1]]],{31:1}]},states:[[[[1,1],[2,1],[3,2]],[[0,1]],[[2,1]]],[[[44,1]],[[45,0],[0,1]]],[[[46,1]],[[47,0],[0,1]]],[[[48,1]],[[49,2]],[[50,3],[0,2]],[[49,4]],[[0,4]]],[[[51,1]],[[52,2],[0,1]],[[51,1],[0,2]]],[[[49,1],[15,2],[53,2]],[[50,2],[54,3],[0,1]],[[49,3]],[[0,3]]],[[[55,1]],[[30,0],[43,0],[0,1]]],[[[24,1]],[[49,2]],[[52,3],[0,2]],[[49,4]],[[0,4]]],[[[10,1]],[[56,2]],[[0,2]]],[[[10,1]],[[57,2],[56,2],[58,2]],[[0,2]]],[[[6,1],[25,1],[33,1],[9,1],[11,1],[12,2],[35,3],[38,4],[19,1],[7,5]],[[0,1]],[[59,1],[60,6]],[[61,1],[62,7],[63,7]],[[64,1],[63,8]],[[7,5],[0,5]],[[59,1]],[[61,1]],[[64,1]]],[[[29,1],[65,2]],[[65,2]],[[66,2],[0,2]]],[[[67,1],[68,1],[69,1],[70,1],[71,1],[72,1],[73,1],[74,1],[75,1],[76,1],[77,1],[78,1],[79,1]],[[0,1]]],[[[39,1]],[[0,1]]],[[[13,1]],[[25,2]],[[48,3],[35,4]],[[80,5]],[[61,6],[81,7]],[[0,5]],[[48,3]],[[61,6]]],[[[10,1],[34,2]],[[34,2]],[[82,3]],[[83,4]],[[84,5]],[[85,6],[0,5]],[[0,6]]],[[[37,1]],[[86,2]],[[85,3],[0,2]],[[0,3]]],[[[87,1],[54,1]],[[0,1]]],[[[88,1],[89,1],[8,2],[90,1],[88,1],[83,1],[91,1],[92,3],[93,1],[94,1]],[[0,1]],[[83,1]],[[8,1],[0,3]]],[[[95,1]],[[96,0],[0,1]]],[[[97,1],[98,1],[58,1],[99,1],[57,1],[100,1],[56,1],[101,1],[102,1]],[[0,1]]],[[[40,1]],[[0,1]]],[[[17,1]],[[0,1]]],[[[103,1]],[[56,2],[104,2],[99,2]],[[0,2]]],[[[41,1]],[[105,2]],[[2,4],[35,3]],[[61,5],[81,6]],[[0,4]],[[2,4]],[[61,5]]],[[[106,1]],[[106,1],[0,1]]],[[[27,1]],[[82,2]],[[0,2]]],[[[49,1],[107,2],[53,3]],[[48,4],[54,5],[52,6],[0,1]],[[54,5],[52,6],[0,2]],[[95,7]],[[49,7]],[[0,5]],[[49,8],[107,8],[0,6]],[[54,5],[52,9],[0,7]],[[52,6],[0,8]],[[49,10],[53,11],[0,9]],[[48,12]],[[95,13]],[[49,13]],[[52,9],[0,13]]],[[[105,1]],[[108,2],[0,1]],[[25,3]],[[0,3]]],[[[109,1]],[[52,0],[0,1]]],[[[25,1]],[[110,0],[0,1]]],[[[25,1]],[[0,1]]],[[[111,1]],[[2,1],[112,2]],[[0,2]]],[[[113,1]],[[49,2],[0,1]],[[108,3],[52,3],[0,2]],[[49,4]],[[0,4]]],[[[114,1]],[[115,0],[0,1]]],[[[116,1]],[[117,2],[50,3],[118,4],[0,1]],[[111,4],[62,4]],[[116,5],[62,5]],[[0,4]],[[50,3],[0,5]]],[[[95,1],[107,1]],[[52,2],[0,1]],[[95,1],[107,1],[0,2]]],[[[119,2],[30,1],[22,1],[43,1]],[[120,2]],[[0,2]]],[[[2,0],[112,1],[121,0]],[[0,1]]],[[[122,1],[123,1],[124,1],[125,1],[126,1]],[[0,1]]],[[[34,1]],[[82,2]],[[83,3]],[[111,4]],[[48,5]],[[80,6]],[[127,7],[0,6]],[[48,8]],[[80,9]],[[0,9]]],[[[4,1]],[[25,2]],[[128,3]],[[48,4],[129,5]],[[80,6]],[[49,7]],[[0,6]],[[48,4]]],[[[26,1]],[[25,2]],[[52,1],[0,2]]],[[[37,1]],[[49,2]],[[48,3]],[[80,4]],[[127,5],[130,1],[0,4]],[[48,6]],[[80,7]],[[0,7]]],[[[25,1]],[[108,2],[0,1]],[[25,3]],[[0,3]]],[[[131,1]],[[52,2],[0,1]],[[131,1],[0,2]]],[[[36,1]],[[105,2],[19,3],[110,3]],[[32,4]],[[105,2],[19,3],[32,4],[110,3]],[[132,5],[15,5],[35,6]],[[0,5]],[[132,7]],[[61,5]]],[[[32,1]],[[133,2]],[[0,2]]],[[[134,1],[135,1]],[[0,1]]],[[[14,1]],[[48,2],[136,3]],[[49,4]],[[48,2]],[[0,4]]],[[[14,1]],[[48,2],[136,3]],[[86,4]],[[48,2]],[[0,4]]],[[[18,1]],[[25,2]],[[52,1],[0,2]]],[[[8,1],[137,2]],[[46,2]],[[0,2]]],[[[138,1]],[[139,0],[0,1]]],[[[35,1]],[[61,2],[140,3]],[[0,2]],[[61,2]]],[[[28,1]],[[0,1]]],[[[141,1]],[[53,2],[0,1]],[[120,3]],[[0,3]]],[[[16,1]],[[49,2],[142,3],[0,1]],[[52,4],[0,2]],[[49,5]],[[49,2],[0,4]],[[52,6],[0,5]],[[49,7]],[[52,8],[0,7]],[[49,7],[0,8]]],[[[5,1]],[[49,2],[0,1]],[[36,3],[52,3],[0,2]],[[49,4]],[[52,5],[0,4]],[[49,6]],[[0,6]]],[[[23,1]],[[111,2],[0,1]],[[0,2]]],[[[143,1]],[[144,0],[142,0],[0,1]]],[[[145,1]],[[2,2],[146,3]],[[0,2]],[[145,1],[2,2]]],[[[48,1]],[[49,2],[0,1]],[[0,2]]],[[[147,1],[148,1],[149,1],[150,1],[151,1],[152,1],[153,1],[154,1],[155,1],[156,1]],[[0,1]]],[[[15,1]],[[95,2]],[[0,2]]],[[[1,1],[3,1]],[[0,1]]],[[[49,1],[48,2]],[[48,2],[0,1]],[[49,3],[157,4],[0,2]],[[157,4],[0,3]],[[0,4]]],[[[158,1]],[[52,2],[0,1]],[[158,1],[0,2]]],[[[1,1],[2,2]],[[0,1]],[[159,3]],[[121,4]],[[160,1],[121,4]]],[[[120,1]],[[161,0],[15,0],[162,0],[41,0],[163,0],[0,1]]],[[[84,1],[164,2]],[[37,3],[0,1]],[[0,2]],[[84,4]],[[127,5]],[[49,2]]],[[[165,1],[84,1]],[[0,1]]],[[[49,1]],[[52,2],[0,1]],[[49,1],[0,2]]],[[[49,1],[107,1]],[[54,2],[52,3],[0,1]],[[0,2]],[[49,4],[107,4],[0,3]],[[52,3],[0,4]]],[[[49,1],[107,1]],[[52,2],[0,1]],[[49,1],[107,1],[0,2]]],[[[25,1]],[[48,2],[0,1]],[[49,3]],[[0,3]]],[[[35,1],[110,2],[38,3]],[[61,4],[81,5]],[[25,4]],[[166,6]],[[0,4]],[[61,4]],[[64,4]]],[[[20,1]],[[48,2]],[[80,3]],[[167,4],[168,5]],[[48,6]],[[48,7]],[[80,8]],[[80,9]],[[167,4],[127,10],[168,5],[0,8]],[[0,9]],[[48,11]],[[80,12]],[[168,5],[0,12]]],[[[15,1],[169,2],[53,3]],[[169,4],[52,5],[0,1]],[[50,6],[52,7],[0,2]],[[169,8]],[[52,5],[0,4]],[[169,9],[53,3],[0,5]],[[49,10]],[[15,11],[169,2],[53,3],[0,7]],[[52,12],[0,8]],[[50,13],[52,5],[0,9]],[[52,7],[0,10]],[[169,14],[52,15],[0,11]],[[0,12]],[[49,4]],[[52,15],[0,14]],[[169,16],[53,3],[0,15]],[[50,17],[52,15],[0,16]],[[49,14]]],[[[15,1],[53,2],[170,3]],[[170,5],[52,4],[0,1]],[[170,6]],[[50,7],[52,8],[0,3]],[[53,2],[170,9],[0,4]],[[52,4],[0,5]],[[52,10],[0,6]],[[49,11]],[[15,12],[53,2],[170,3],[0,8]],[[50,13],[52,4],[0,9]],[[0,10]],[[52,8],[0,11]],[[52,15],[170,14],[0,12]],[[49,5]],[[52,15],[0,14]],[[53,2],[170,16],[0,15]],[[50,17],[52,15],[0,16]],[[49,14]]],[[[25,1]],[[0,1]]],[[[21,1]],[[49,2]],[[48,3]],[[80,4]],[[127,5],[0,4]],[[48,6]],[[80,7]],[[0,7]]],[[[49,1]],[[108,2],[0,1]],[[95,3]],[[0,3]]],[[[42,1]],[[171,2]],[[48,3],[52,1]],[[80,4]],[[0,4]]],[[[172,1]],[[173,0],[0,1]]],[[[111,2],[36,1]],[[49,2]],[[0,2]]],[[[31,1]],[[174,2],[0,1]],[[0,2]]],[[[62,1]],[[0,1]]]],labels:[[0,"EMPTY"],[317,null],[4,null],[276,null],[1,"def"],[1,"raise"],[1,"True"],[3,null],[1,"not"],[1,"None"],[55,null],[2,null],[25,null],[1,"class"],[1,"lambda"],[16,null],[1,"print"],[1,"debugger"],[1,"nonlocal"],[52,null],[1,"try"],[1,"while"],[31,null],[1,"return"],[1,"assert"],[1,null],[1,"global"],[1,"del"],[1,"pass"],[54,null],[15,null],[1,"yield"],[1,"import"],[1,"False"],[1,"for"],[7,null],[1,"from"],[1,"if"],[9,null],[1,"break"],[1,"continue"],[49,null],[1,"with"],[14,null],[316,null],[19,null],[308,null],[1,"and"],[11,null],[326,null],[22,null],[261,null],[12,null],[35,null],[271,null],[325,null],[297,null],[339,null],[296,null],[26,null],[283,null],[8,null],[342,null],[329,null],[10,null],[266,null],[332,null],[45,null],[38,null],[40,null],[50,null],[46,null],[41,null],[42,null],[36,null],[43,null],[48,null],[44,null],[37,null],[39,null],[324,null],[260,null],[292,null],[1,"in"],[309,null],[273,null],[327,null],[272,null],[28,null],[21,null],[27,null],[29,null],[1,"is"],[30,null],[20,null],[290,null],[274,null],[333,null],[299,null],[270,null],[337,null],[279,null],[265,null],[281,null],[264,null],[286,null],[280,null],[320,null],[1,"as"],[284,null],[23,null],[328,null],[0,null],[1,"except"],[340,null],[18,null],[330,null],[268,null],[259,null],[312,null],[293,null],[321,null],[269,null],[277,null],[314,null],[315,null],[343,null],[1,"else"],[310,null],[51,null],[1,"elif"],[300,null],[301,null],[285,null],[303,null],[302,null],[335,null],[275,null],[258,null],[1,"or"],[334,null],[267,null],[34,null],[262,null],[33,null],[319,null],[13,null],[295,null],[263,null],[291,null],[311,null],[307,null],[313,null],[282,null],[298,null],[304,null],[278,null],[318,null],[322,null],[5,null],[6,null],[47,null],[17,null],[24,null],[305,null],[306,null],[323,null],[289,null],[1,"finally"],[331,null],[336,null],[338,null],[257,null],[32,null],[341,null]],keywords:{False:33,None:9,True:6,and:47,as:108,assert:24,break:39,class:13,continue:40,debugger:17,def:4,del:27,elif:130,else:127,except:113,finally:168,for:34,from:36,global:26,if:37,import:32,in:83,is:92,lambda:14,nonlocal:18,not:8,or:139,pass:28,print:16,raise:5,return:23,try:20,while:21,with:42,yield:31},tokens:{0:112,1:25,2:11,3:7,4:2,5:159,6:160,7:35,8:61,9:38,10:64,11:48,12:52,13:146,14:43,15:30,16:15,17:162,18:115,19:45,20:94,21:89,22:50,23:110,24:163,25:12,26:59,27:90,28:88,29:91,30:93,31:22,32:173,33:144,34:142,35:53,36:74,37:78,38:68,39:79,40:69,41:72,42:73,43:75,44:77,45:67,46:71,47:161,48:76,49:41,50:70,51:129,52:19,54:29,55:10},start:256}},function(p,b){function e(n,r){return this.filename=n,this.grammar=r,this.p_flags=0,this}function i(n,r){return r===void 0&&(r="file_input"),n=new e(n,Sk.ParseTables),r==="file_input"?n.setup(Sk.ParseTables.sym.file_input):Sk.asserts.fail("todo;"),n}e.FUTURE_PRINT_FUNCTION="print_function",e.FUTURE_UNICODE_LITERALS="unicode_literals",e.FUTURE_DIVISION="division",e.FUTURE_ABSOLUTE_IMPORT="absolute_import",e.FUTURE_WITH_STATEMENT="with_statement",e.FUTURE_NESTED_SCOPES="nested_scopes",e.FUTURE_GENERATORS="generators",e.CO_FUTURE_PRINT_FUNCTION=65536,e.CO_FUTURE_UNICODE_LITERALS=131072,e.CO_FUTURE_DIVISON=8192,e.CO_FUTURE_ABSOLUTE_IMPORT=16384,e.CO_FUTURE_WITH_STATEMENT=32768,e.prototype.setup=function(n){n=n||this.grammar.start,this.stack=[{dfa:this.grammar.dfas[n],state:0,node:{type:n,value:null,context:null,children:[]}}],this.used_names={}},e.prototype.addtoken=function(n,r,l){var h,a=this.classify(n,r,l);e:for(;;){var S=this.stack[this.stack.length-1],t=S.dfa[0],s=t[S.state];for(h=0;hd),this.shift(n,r,o,l),l=o;t[l].length===1&&t[l][0][0]===0&&t[l][0][1]===l;){if(this.pop(),this.stack.length===0)return!0;S=this.stack[this.stack.length-1],l=S.state,t=S.dfa[0]}return!1}if(256<=d&&(c=this.grammar.dfas[d],c=c[1],c.hasOwnProperty(a))){this.push(d,this.grammar.dfas[d],o,l);continue e}}t:{for(t=[0,S.state],S=s.length;S--;)if(s[S][0]===t[0]&&s[S][1]===t[1]){s=!0;break t}s=!1}if(s){if(this.pop(),this.stack.length===0)throw new Sk.builtin.SyntaxError("too much input",this.filename)}else throw n=l[0][0],new Sk.builtin.SyntaxError("bad input",this.filename,n,l)}},e.prototype.classify=function(n,r,l){if(n===Sk.token.tokens.T_NAME){this.used_names[r]=!0;var h=this.grammar.keywords.hasOwnProperty(r)&&this.grammar.keywords[r];if(r==="print"&&(this.p_flags&e.CO_FUTURE_PRINT_FUNCTION||Sk.__future__.print_function===!0)&&(h=!1),h)return h}if(h=this.grammar.tokens.hasOwnProperty(n)&&this.grammar.tokens[n],!h){r="#"+n;for(let a in Sk.token.tokens)if(Sk.token.tokens[a]==n){r=a;break}throw new Sk.builtin.SyntaxError("bad token "+r,this.filename,l[0][0],l)}return h},e.prototype.shift=function(n,r,l,h){var a=this.stack[this.stack.length-1].dfa,S=this.stack[this.stack.length-1].node;S.children.push({type:n,value:r,lineno:h[0][0],col_offset:h[0][1],children:null}),this.stack[this.stack.length-1]={dfa:a,state:l,node:S}},e.prototype.push=function(n,r,l,h){n={type:n,value:null,lineno:h[0][0],col_offset:h[0][1],children:[]},this.stack[this.stack.length-1]={dfa:this.stack[this.stack.length-1].dfa,state:l,node:this.stack[this.stack.length-1].node},this.stack.push({dfa:r,state:0,node:n})},e.prototype.pop=function(){var n=this.stack.pop().node;if(n)if(this.stack.length!==0){var r=this.stack[this.stack.length-1].node;r.children.push(n)}else this.rootnode=n,this.rootnode.used_names=this.used_names},Sk.parse=function(n,r){var l=Sk.token.tokens.T_COMMENT,h=Sk.token.tokens.T_NL,a=Sk.token.tokens.T_OP,S=Sk.token.tokens.T_ENDMARKER,t=Sk.token.tokens.T_ENCODING,s=!1,c=i(n);if(Sk._tokenize(n,function(o){var d=o.split(` `).reverse().map(function(u){return u+` `});return function(){if(d.length===0)throw new Sk.builtin.Exception("EOF");return d.pop()}}(r),"utf-8",function(o){var d=null;o.type!==l&&o.type!==h&&o.type!==t&&(o.type===a&&(d=Sk.OpMap[o.string]),c.addtoken(d||o.type,o.string,[o.start,o.end,o.line]),o.type===S&&(s=!0))}),!s)throw new Sk.builtin.SyntaxError("incomplete input",this.filename);return{cst:c.rootnode,flags:c.p_flags}},Sk.parseTreeDump=function(n,r){var l;r=r||"";var h=""+r;if(256<=n.type)for(h+=Sk.ParseTables.number2symbol[n.type]+` `,l=0;l=i(y)||D+2==i(y)&&n(y,D+1).type==G.T_COMMA)throw new Sk.builtin.SyntaxError("named arguments must follow bare *",E.c_filename,y.lineno);re=n(y,D+1),re.type==G.T_COMMA?(D+=2,D=H(E,y,D,V,Q)):(W=R(E,re),D+=3,DE.c_feature_version)return l(E,D,"Async functions are only supported in Python 3.5 and greater"),null;r(D,z.funcdef);var Q=c(n(D,j));if(S(E,Q,n(D,j),0))return null;var W=ee(E,n(D,j+1));if(!W)return null;if(n(D,j+2).type==G.T_RARROW){if(O=J(E,n(D,j+3)),!O)return null;j+=2}if(n(D,j+3).type==G.T_TYPE_COMMENT){if(V=G.T_NEW_TYPE_COMMENT(n(D,j+3)),!V)return null;j+=1}var se=f(E,n(D,j+3));if(!se)return null;if(1":return Sk.astnodes.RShift;case"&":return Sk.astnodes.BitAnd;case"^":return Sk.astnodes.BitXor;case"|":return Sk.astnodes.BitOr;case"*":return y.value.charAt(1)==="*"?Sk.astnodes.Pow:Sk.astnodes.Mult;case"@":if(Sk.__future__.python3)return Sk.astnodes.MatMult;default:Sk.asserts.fail("invalid augassign")}}function L(E,y){return Sk.asserts.assert(0=y),Sk.asserts.assert(E.charAt(y-1)=="{"),Sk.asserts.assert(E.charAt(T)=="}"||E.charAt(T)=="!"||E.charAt(T)==":"),E=E.substring(y,T),/^\s*$/.test(E)&&l(I,D,"f-string: empty expression not allowed");try{let j=Sk.parse("","("+E+")");var O=Sk.astFromParse(j.cst,"",j.flags)}catch(j){throw j.traceback&&j.traceback[0]&&(O=j.traceback[0],O.lineno=(O.lineno||1)-1+D.lineno,O.filename=I.c_filename),j}return Sk.asserts.assert(O.body.length==1&&O.body[0].constructor===Sk.astnodes.Expr),O.body[0].value}function te(E,y,T,I,D,O,j){Sk.asserts.assert(E.charAt(y)=="{"),y++;var V=y;let Q=null,W=0,se=0,re,ae,me=()=>l(O,j,"f-string: expecting '}'");for(Sk.asserts.assert(y<=T);y=T&&me(),ae=E.charAt(y),y++,ae!="s"&&ae!="r"&&ae!="a"&&l(O,j,"f-string: invalid conversion character: expected 's', 'r', or 'a'")),y>=T&&me(),E.charAt(y)==":"&&(y++,y>=T&&me(),[re,y]=Z(E,y,T,I,D+1,O,j)),(y>=T||E.charAt(y)!="}")&&me(),y++,[new Sk.astnodes.FormattedValue(V,ae,re,j.lineno,j.col_offset),y]}function Z(E,y,T,I,D,O,j){let V=[],Q=W=>{if(W.indexOf("}")!==-1){if(/(^|[^}])}(}})*($|[^}])/.test(W))throw new Sk.builtin.SyntaxError("f-string: single '}' is not allowed",O.c_filename,j.lineno,j.col_offset);W=W.replace(/}}/g,"}")}V.push(new Sk.astnodes.Str(new Sk.builtin.str(W),j.lineno,j.col_offset,O.end_lineno,j.end_col_offset))};for(;yse&&(W=-1,T=se))}if(W===-1){Q(E.substring(y,T)),y=T;break}else if(W+1=I.length){if(I==="None")return new Sk.astnodes.NameConstant(Sk.builtin.none.none$,y.lineno,y.col_offset);if(I==="True")return new Sk.astnodes.NameConstant(Sk.builtin.bool.true$,y.lineno,y.col_offset);if(I==="False")return new Sk.astnodes.NameConstant(Sk.builtin.bool.false$,y.lineno,y.col_offset)}return E=c(I,E),new Sk.astnodes.Name(E,Sk.astnodes.Load,y.lineno,y.col_offset,y.end_lineno,y.end_col_offset);case G.T_STRING:T=[];for(var D=0;D=i(y)||j+2==i(y)&&n(y,j+1).type==G.T_COMMA)throw new Sk.builtin.SyntaxError("named arguments must follow bare *",E.c_filename,y.lineno);re=n(y,j+1),re.type==G.T_COMMA?(j+=2,j=H(E,y,j,V,X)):(W=R(E,re),j+=3,jE.c_feature_version)return l(E,j,"Async functions are only supported in Python 3.5 and greater"),null;r(j,z.funcdef);var X=c(n(j,L));if(S(E,X,n(j,L),0))return null;var W=ee(E,n(j,L+1));if(!W)return null;if(n(j,L+2).type==G.T_RARROW){if(O=Y(E,n(j,L+3)),!O)return null;L+=2}if(n(j,L+3).type==G.T_TYPE_COMMENT){if(V=G.T_NEW_TYPE_COMMENT(n(j,L+3)),!V)return null;L+=1}var se=f(E,n(j,L+3));if(!se)return null;if(1":return Sk.astnodes.RShift;case"&":return Sk.astnodes.BitAnd;case"^":return Sk.astnodes.BitXor;case"|":return Sk.astnodes.BitOr;case"*":return y.value.charAt(1)==="*"?Sk.astnodes.Pow:Sk.astnodes.Mult;case"@":if(Sk.__future__.python3)return Sk.astnodes.MatMult;default:Sk.asserts.fail("invalid augassign")}}function D(E,y){return Sk.asserts.assert(0=y),Sk.asserts.assert(E.charAt(y-1)=="{"),Sk.asserts.assert(E.charAt(T)=="}"||E.charAt(T)=="!"||E.charAt(T)==":"),E=E.substring(y,T),/^\s*$/.test(E)&&l(I,j,"f-string: empty expression not allowed");try{let L=Sk.parse("","("+E+")");var O=Sk.astFromParse(L.cst,"",L.flags)}catch(L){throw L.traceback&&L.traceback[0]&&(O=L.traceback[0],O.lineno=(O.lineno||1)-1+j.lineno,O.filename=I.c_filename),L}return Sk.asserts.assert(O.body.length==1&&O.body[0].constructor===Sk.astnodes.Expr),O.body[0].value}function te(E,y,T,I,j,O,L){Sk.asserts.assert(E.charAt(y)=="{"),y++;var V=y;let X=null,W=0,se=0,re,ae,me=()=>l(O,L,"f-string: expecting '}'");for(Sk.asserts.assert(y<=T);y=T&&me(),ae=E.charAt(y),y++,ae!="s"&&ae!="r"&&ae!="a"&&l(O,L,"f-string: invalid conversion character: expected 's', 'r', or 'a'")),y>=T&&me(),E.charAt(y)==":"&&(y++,y>=T&&me(),[re,y]=Q(E,y,T,I,j+1,O,L)),(y>=T||E.charAt(y)!="}")&&me(),y++,[new Sk.astnodes.FormattedValue(V,ae,re,L.lineno,L.col_offset),y]}function Q(E,y,T,I,j,O,L){let V=[],X=W=>{if(W.indexOf("}")!==-1){if(/(^|[^}])}(}})*($|[^}])/.test(W))throw new Sk.builtin.SyntaxError("f-string: single '}' is not allowed",O.c_filename,L.lineno,L.col_offset);W=W.replace(/}}/g,"}")}V.push(new Sk.astnodes.Str(new Sk.builtin.str(W),L.lineno,L.col_offset,O.end_lineno,L.end_col_offset))};for(;yse&&(W=-1,T=se))}if(W===-1){X(E.substring(y,T)),y=T;break}else if(W+1=I.length){if(I==="None")return new Sk.astnodes.NameConstant(Sk.builtin.none.none$,y.lineno,y.col_offset);if(I==="True")return new Sk.astnodes.NameConstant(Sk.builtin.bool.true$,y.lineno,y.col_offset);if(I==="False")return new Sk.astnodes.NameConstant(Sk.builtin.bool.false$,y.lineno,y.col_offset)}return E=c(I,E),new Sk.astnodes.Name(E,Sk.astnodes.Load,y.lineno,y.col_offset,y.end_lineno,y.end_col_offset);case G.T_STRING:T=[];for(var j=0;j=ae&&l(j,V,"Truncated \\xNN escape"),me+=String.fromCharCode(parseInt(se.substr(Q+1,2),16)),Q+=2):re||W!=="u"?re||W!=="U"?me+="\\"+W:(Q+8>=ae&&l(j,V,"Truncated \\UXXXXXXXX escape"),me+=String.fromCodePoint(parseInt(se.substr(Q+1,8),16)),Q+=8):(Q+4>=ae&&l(j,V,"Truncated \\uXXXX escape"),me+=String.fromCharCode(parseInt(se.substr(Q+1,4),16)),Q+=4))):re&&127I.charCodeAt(1)&&(I="0o"+I.substring(1)),T=!0,(D==="l"||D==="L")&&(I=I.slice(0,-1),T=!1),D=Number(I),I=D>Number.MAX_SAFE_INTEGER?T?new Sk.builtin.int_(JSBI.BigInt(I)):new Sk.builtin.lng(JSBI.BigInt(I)):T?new Sk.builtin.int_(D):new Sk.builtin.lng(D)),new E(I,y.lineno,y.col_offset);case G.T_ELLIPSIS:return new Sk.astnodes.Ellipsis(y.lineno,y.col_offset,y.end_lineno,y.end_col_offset);case G.T_LPAR:return T=n(y,1),T.type==G.T_RPAR?new Sk.astnodes.Tuple([],Sk.astnodes.Load,y.lineno,y.col_offset,y.end_lineno,y.end_col_offset):T.type==z.yield_expr?J(E,T):i(T)==1?L(E,T):n(T,1).type==z.comp_for?d(_(E,T),y):d(L(E,T),y);case G.T_LSQB:return T=n(y,1),T.type==G.T_RSQB?new Sk.astnodes.List([],Sk.astnodes.Load,y.lineno,y.col_offset,y.end_lineno,y.end_col_offset):(r(T,z.testlist_comp),i(T)==1||n(T,1).type==G.T_COMMA?(E=u(E,T))?new Sk.astnodes.List(E,Sk.astnodes.Load,y.lineno,y.col_offset,y.end_lineno,y.end_col_offset):null:(I=T,Sk.asserts.assert(I.type==z.testlist_comp),E=F(E,I,1),d(E,y)));case G.T_LBRACE:if(T=n(y,1),T.type==G.T_RBRACE)return new Sk.astnodes.Dict(null,null,y.lineno,y.col_offset,y.end_lineno,y.end_col_offset);if(I=n(T,0).type==G.T_DOUBLESTAR,i(T)==1||13-I&&n(T,3-I).type==z.comp_for){if(I)return l(E,y,"dict unpacking cannot be used in dict comprehension"),null;I=T,Sk.asserts.assert(3>11&7,this.__namespaces=t||[]}function i(a,S,t,s,c){this.symFlags={},this.name=S,this.varnames=[],this.children=[],this.blockType=t,this.returnsValue=this.varkeywords=this.varargs=this.generator=this.childHasFree=this.hasFree=this.isNested=!1,this.lineno=c,this.table=a,a.cur&&(a.cur.nested||a.cur.blockType==="function")&&(this.isNested=!0),s.scopeId=h++,a.stss[s.scopeId]=this,this.symbols={}}function n(a){this.filename=a,this.top=this.cur=null,this.stack=[],this.curClass=this.global=null,this.tmpname=0,this.stss={}}function r(a,S){var t;for(t=0;t>11&7,a==3||a==2})),this._funcGlobals},i.prototype.get_frees=function(){return Sk.asserts.assert(this.get_type()=="function","get_frees only valid for function scopes"),this._funcFrees||(this._funcFrees=this._identsMatching(function(a){return(a>>11&7)==4})),this._funcFrees},i.prototype.get_methods=function(){var a;if(Sk.asserts.assert(this.get_type()=="class","get_methods only valid for class scopes"),!this._classMethods){var S=[];for(a=0;a>11&7},n.prototype.getStsForAst=function(a){return Sk.asserts.assert(a.scopeId!==void 0,"ast wasn't added to st?"),a=this.stss[a.scopeId],Sk.asserts.assert(a!==void 0,"unknown sym tab entry"),a},n.prototype.SEQStmt=function(a){var S,t;if(a!==null){Sk.asserts.assert(Sk.isArrayLike(a),"SEQ: nodes isn't array? got "+a.toString());var s=a.length;for(t=0;t=ae&&l(L,V,"Truncated \\xNN escape"),me+=String.fromCharCode(parseInt(se.substr(X+1,2),16)),X+=2):re||W!=="u"?re||W!=="U"?me+="\\"+W:(X+8>=ae&&l(L,V,"Truncated \\UXXXXXXXX escape"),me+=String.fromCodePoint(parseInt(se.substr(X+1,8),16)),X+=8):(X+4>=ae&&l(L,V,"Truncated \\uXXXX escape"),me+=String.fromCharCode(parseInt(se.substr(X+1,4),16)),X+=4))):re&&127I.charCodeAt(1)&&(I="0o"+I.substring(1)),T=!0,(j==="l"||j==="L")&&(I=I.slice(0,-1),T=!1),j=Number(I),I=j>Number.MAX_SAFE_INTEGER?T?new Sk.builtin.int_(JSBI.BigInt(I)):new Sk.builtin.lng(JSBI.BigInt(I)):T?new Sk.builtin.int_(j):new Sk.builtin.lng(j)),new E(I,y.lineno,y.col_offset);case G.T_ELLIPSIS:return new Sk.astnodes.Ellipsis(y.lineno,y.col_offset,y.end_lineno,y.end_col_offset);case G.T_LPAR:return T=n(y,1),T.type==G.T_RPAR?new Sk.astnodes.Tuple([],Sk.astnodes.Load,y.lineno,y.col_offset,y.end_lineno,y.end_col_offset):T.type==z.yield_expr?Y(E,T):i(T)==1?D(E,T):n(T,1).type==z.comp_for?d(_(E,T),y):d(D(E,T),y);case G.T_LSQB:return T=n(y,1),T.type==G.T_RSQB?new Sk.astnodes.List([],Sk.astnodes.Load,y.lineno,y.col_offset,y.end_lineno,y.end_col_offset):(r(T,z.testlist_comp),i(T)==1||n(T,1).type==G.T_COMMA?(E=u(E,T))?new Sk.astnodes.List(E,Sk.astnodes.Load,y.lineno,y.col_offset,y.end_lineno,y.end_col_offset):null:(I=T,Sk.asserts.assert(I.type==z.testlist_comp),E=F(E,I,1),d(E,y)));case G.T_LBRACE:if(T=n(y,1),T.type==G.T_RBRACE)return new Sk.astnodes.Dict(null,null,y.lineno,y.col_offset,y.end_lineno,y.end_col_offset);if(I=n(T,0).type==G.T_DOUBLESTAR,i(T)==1||13-I&&n(T,3-I).type==z.comp_for){if(I)return l(E,y,"dict unpacking cannot be used in dict comprehension"),null;I=T,Sk.asserts.assert(3>11&7,this.__namespaces=t||[]}function i(a,S,t,s,c){this.symFlags={},this.name=S,this.varnames=[],this.children=[],this.blockType=t,this.returnsValue=this.varkeywords=this.varargs=this.generator=this.childHasFree=this.hasFree=this.isNested=!1,this.lineno=c,this.table=a,a.cur&&(a.cur.nested||a.cur.blockType==="function")&&(this.isNested=!0),s.scopeId=h++,a.stss[s.scopeId]=this,this.symbols={}}function n(a){this.filename=a,this.top=this.cur=null,this.stack=[],this.curClass=this.global=null,this.tmpname=0,this.stss={}}function r(a,S){var t;for(t=0;t>11&7,a==3||a==2})),this._funcGlobals},i.prototype.get_frees=function(){return Sk.asserts.assert(this.get_type()=="function","get_frees only valid for function scopes"),this._funcFrees||(this._funcFrees=this._identsMatching(function(a){return(a>>11&7)==4})),this._funcFrees},i.prototype.get_methods=function(){var a;if(Sk.asserts.assert(this.get_type()=="class","get_methods only valid for class scopes"),!this._classMethods){var S=[];for(a=0;a>11&7},n.prototype.getStsForAst=function(a){return Sk.asserts.assert(a.scopeId!==void 0,"ast wasn't added to st?"),a=this.stss[a.scopeId],Sk.asserts.assert(a!==void 0,"unknown sym tab entry"),a},n.prototype.SEQStmt=function(a){var S,t;if(a!==null){Sk.asserts.assert(Sk.isArrayLike(a),"SEQ: nodes isn't array? got "+a.toString());var s=a.length;for(t=0;t",this.u.blocks[s]._next=null,s},e.prototype.setBlock=function(t){Sk.asserts.assert(0<=t&&t0) { $err=err; $blk=$exc.pop(); } else { throw err; } }};",f+="var $saveSuspension = function($child, $filename, $lineno, $colno) {var susp = new Sk.misceval.Suspension(); susp.child=$child;susp.resume=function(){"+t.scopename+".$wakingSuspension=susp; return "+t.scopename+"("+(t.ste.generator?"$gen":"")+"); };susp.data=susp.child.data;susp.$blk=$blk;susp.$loc=$loc;susp.$gbl=$gbl;susp.$exc=$exc;susp.$err=$err;susp.$postfinally=$postfinally;susp.$filename=$filename;susp.$lineno=$lineno;susp.$colno=$colno;susp.optional=susp.child.optional;"+(u?"susp.$cell=$cell;":""),d={},s=0;sF?this.vexpr(F):"undefined")),o&&o.vararg&&(A=o.vararg),o&&o.kwarg&&(N=o.kwarg),!Sk.__future__.python3&&o&&o.kwonlyargs&&o.kwonlyargs.length!=0)throw new Sk.builtin.SyntaxError("Keyword-only arguments are not supported in Python 2");var M=this.enterScope(s,t,t.lineno,this.canSuspend),R=this.u.ste.generator,H=this.u.ste.hasFree,ee=this.u.ste.childHasFree,Y=this.newBlock("codeobj entry");this.u.prefixCode="var "+M+"=(function "+this.niceName(s.v)+"$(";var k=[];if(R){if(N)throw new Sk.builtin.SyntaxError(s.v+"(): keyword arguments in generators not supported",this.filename,t.lineno);if(A)throw new Sk.builtin.SyntaxError(s.v+"(): variable number of arguments in generators not supported",this.filename,t.lineno);k.push("$gen")}else{for(N&&(k.push("$kwa"),this.u.tempsToSave.push("$kwa")),$=0;o&&$",this.u.blocks[s]._next=null,s},e.prototype.setBlock=function(t){Sk.asserts.assert(0<=t&&t0) { $err=err; $blk=$exc.pop(); } else { throw err; } }};",f+="var $saveSuspension = function($child, $filename, $lineno, $colno) {var susp = new Sk.misceval.Suspension(); susp.child=$child;susp.resume=function(){"+t.scopename+".$wakingSuspension=susp; return "+t.scopename+"("+(t.ste.generator?"$gen":"")+"); };susp.data=susp.child.data;susp.$blk=$blk;susp.$loc=$loc;susp.$gbl=$gbl;susp.$exc=$exc;susp.$err=$err;susp.$postfinally=$postfinally;susp.$filename=$filename;susp.$lineno=$lineno;susp.$colno=$colno;susp.optional=susp.child.optional;"+(u?"susp.$cell=$cell;":""),d={},s=0;sF?this.vexpr(F):"undefined")),o&&o.vararg&&(A=o.vararg),o&&o.kwarg&&(N=o.kwarg),!Sk.__future__.python3&&o&&o.kwonlyargs&&o.kwonlyargs.length!=0)throw new Sk.builtin.SyntaxError("Keyword-only arguments are not supported in Python 2");var M=this.enterScope(s,t,t.lineno,this.canSuspend),R=this.u.ste.generator,H=this.u.ste.hasFree,ee=this.u.ste.childHasFree,J=this.newBlock("codeobj entry");this.u.prefixCode="var "+M+"=(function "+this.niceName(s.v)+"$(";var g=[];if(R){if(N)throw new Sk.builtin.SyntaxError(s.v+"(): keyword arguments in generators not supported",this.filename,t.lineno);if(A)throw new Sk.builtin.SyntaxError(s.v+"(): variable number of arguments in generators not supported",this.filename,t.lineno);g.push("$gen")}else{for(N&&(g.push("$kwa"),this.u.tempsToSave.push("$kwa")),$=0;o&&$0) { $err = err; $blk=$exc.pop(); continue; } else { throw err; }} }});",d.call(this,M),o){for(let F of o.args)f.push(F.arg.v);for(let F of o.kwonlyargs||[])f.push(F.arg.v);this.u.argnames=f}if(this.exitScope(),0<_.length&&l(M,".$defaults=[",_.join(","),"];"),o&&o.kwonlyargs&&0"),null,t.args,function(s){s=this.vexpr(t.body),l("return ",s,";")})},e.prototype.cifexp=function(t){var s=this.newBlock("next of ifexp"),c=this.newBlock("end of ifexp"),o=this._gr("res","null"),d=this.vexpr(t.test);return this._jumpfalse(d,s),l(o,"=",this.vexpr(t.body),";"),this._jump(c),this.setBlock(s),l(o,"=",this.vexpr(t.orelse),";"),this._jump(c),this.setBlock(c),o},e.prototype.cgenexpgen=function(t,s,c){var o=this.newBlock("start for "+s),d=this.newBlock("skip for "+s);this.newBlock("if cleanup for "+s);var u=this.newBlock("end for "+s),f=t[s];if(s===0)var $="$loc.$iter0";else{var m=this.vexpr(f.iter);$="$loc."+this.gensym("iter"),l($,"=","Sk.abstr.iter(",m,");")}this._jump(o),this.setBlock(o),this.annotateSource(c),l("$ret = Sk.abstr.iternext(",$,this.u.canSuspend?", true":", false",");"),this._checkSuspension(c),m=this._gr("next","$ret"),this._jumpundef(m,u),this.vexpr(f.target,m);var _=f.ifs?f.ifs.length:0;for($=0;$<_;++$)this.annotateSource(f.ifs[$]),m=this.vexpr(f.ifs[$]),this._jumpfalse(m,o);++s=t.length&&(this.annotateSource(c),t=this.vexpr(c),l("return [",d,"/*resume*/,",t,"/*ret*/];"),this.setBlock(d)),this._jump(o),this.setBlock(u),s===1&&l("return Sk.builtin.none.none$;")},e.prototype.cgenexp=function(t){var s=this.buildcodeobj(t,new Sk.builtin.str(""),null,null,function(c){this.cgenexpgen(t.generators,0,t.elt)});return s=this._gr("gener","Sk.misceval.callsimArray(",s,");"),l(s,".gi$locals.$iter0=Sk.abstr.iter(",this.vexpr(t.generators[0].iter),");"),s},e.prototype.cclass=function(t){Sk.asserts.assert(t instanceof Sk.astnodes.ClassDef);var s=this.vseqexpr(t.decorator_list),c=this.vseqexpr(t.bases);let o=this.cunpackkwstoarray(t.keywords);var d=this.enterScope(t.name,t,t.lineno),u=this.newBlock("class entry");this.u.prefixCode="var "+d+"=(function $"+t.name.v+"$class_outer($globals,$locals,$cell){var $gbl=$globals,$loc=$locals,$free=$globals;",this.u.switchCode+="(function $"+t.name.v+"$_closure($cell){",this.u.switchCode+="var $blk="+u+",$exc=[],$ret=undefined,$postfinally=undefined,$currLineNo=undefined,$currColNo=undefined;",Sk.execLimit!==null&&(this.u.switchCode+="if (typeof Sk.execStart === 'undefined') {Sk.execStart = Date.now()}"),Sk.yieldLimit!==null&&this.u.canSuspend&&(this.u.switchCode+="if (typeof Sk.lastYield === 'undefined') {Sk.lastYield = Date.now()}"),this.u.switchCode+="while(true){try{",this.u.switchCode+=this.outputInterruptTest(),this.u.switchCode+="switch($blk){",this.u.suffixCode="}}catch(err){ if (!(err instanceof Sk.builtin.BaseException)) { err = new Sk.builtin.ExternalError(err); } err.traceback.push({lineno: $currLineNo, colno: $currColNo, filename: '"+this.filename+"'}); if ($exc.length>0) { $err = err; $blk=$exc.pop(); continue; } else { throw err; }}}",this.u.suffixCode+="}).call(null, $cell);});",this.u.private_=t.name,this.cbody(t.body,t.name),l("return;"),this.exitScope(),l("$ret = Sk.misceval.buildClass($gbl,",d,",",t.name.$r().v,",[",c,"], $cell, ",o,");"),this._checkSuspension();for(let f of s.reverse())l("$ret = Sk.misceval.callsimOrSuspendArray(",f,", [$ret]);"),this._checkSuspension();this.nameop(t.name,Sk.astnodes.Store,"$ret")},e.prototype.ccontinue=function(t){var s=this.peekFinallyBlock();if(this.u.continueBlocks.length==0)throw new Sk.builtin.SyntaxError("'continue' outside loop",this.filename,t.lineno);t=this.u.continueBlocks[this.u.continueBlocks.length-1],Sk.asserts.assert(this.u.breakBlocks.length===this.u.continueBlocks.length),s&&s.breakDepth==this.u.continueBlocks.length?l("$postfinally={isBreak:true,gotoBlock:",t,"};"):this._jump(t)},e.prototype.cbreak=function(t){var s=this.peekFinallyBlock();if(this.u.breakBlocks.length===0)throw new Sk.builtin.SyntaxError("'break' outside loop",this.filename,t.lineno);t=this.u.breakBlocks[this.u.breakBlocks.length-1],s&&s.breakDepth==this.u.breakBlocks.length?l("$postfinally={isBreak:true,gotoBlock:",t,"};"):this._jump(t)},e.prototype.vstmt=function(t,s){if(this.u.lineno=t.lineno,this.u.linenoSet=!1,this.u.localtemps=[],Sk.debugging&&this.u.canSuspend){var c=this.newBlock("debug breakpoint for line "+t.lineno);l("if (Sk.breakpoints('"+this.filename+"',"+t.lineno+","+t.col_offset+")) {","var $susp = $saveSuspension({data: {type: 'Sk.debug'}, resume: function() {}}, '"+this.filename+"',"+t.lineno+","+t.col_offset+");","$susp.$blk = "+c+";","$susp.optional = true;","return $susp;","}"),this._jump(c),this.setBlock(c),this.u.doesSuspend=!0}switch(this.annotateSource(t),t.constructor){case Sk.astnodes.FunctionDef:this.cfunction(t,s);break;case Sk.astnodes.ClassDef:this.cclass(t);break;case Sk.astnodes.Return:if(this.u.ste.blockType!==Sk.SYMTAB_CONSTS.FunctionBlock)throw new Sk.builtin.SyntaxError("'return' outside function",this.filename,t.lineno);c=t.value?this.vexpr(t.value):"Sk.builtin.none.none$",this.u.finallyBlocks.length==0?l("return ",c,";"):(l("$postfinally={returning:",c,"};"),this._jump(this.peekFinallyBlock().blk));break;case Sk.astnodes.Delete:this.vseqexpr(t.targets);break;case Sk.astnodes.Assign:var o=t.targets.length;for(c=this.vexpr(t.value),s=0;s0) { $err = err; $blk=$exc.pop(); continue; } else { throw err; }} }});",d.call(this,M),o){for(let F of o.args)f.push(F.arg.v);for(let F of o.kwonlyargs||[])f.push(F.arg.v);this.u.argnames=f}if(this.exitScope(),0<_.length&&l(M,".$defaults=[",_.join(","),"];"),o&&o.kwonlyargs&&0"),null,t.args,function(s){s=this.vexpr(t.body),l("return ",s,";")})},e.prototype.cifexp=function(t){var s=this.newBlock("next of ifexp"),c=this.newBlock("end of ifexp"),o=this._gr("res","null"),d=this.vexpr(t.test);return this._jumpfalse(d,s),l(o,"=",this.vexpr(t.body),";"),this._jump(c),this.setBlock(s),l(o,"=",this.vexpr(t.orelse),";"),this._jump(c),this.setBlock(c),o},e.prototype.cgenexpgen=function(t,s,c){var o=this.newBlock("start for "+s),d=this.newBlock("skip for "+s);this.newBlock("if cleanup for "+s);var u=this.newBlock("end for "+s),f=t[s];if(s===0)var $="$loc.$iter0";else{var m=this.vexpr(f.iter);$="$loc."+this.gensym("iter"),l($,"=","Sk.abstr.iter(",m,");")}this._jump(o),this.setBlock(o),this.annotateSource(c),l("$ret = Sk.abstr.iternext(",$,this.u.canSuspend?", true":", false",");"),this._checkSuspension(c),m=this._gr("next","$ret"),this._jumpundef(m,u),this.vexpr(f.target,m);var _=f.ifs?f.ifs.length:0;for($=0;$<_;++$)this.annotateSource(f.ifs[$]),m=this.vexpr(f.ifs[$]),this._jumpfalse(m,o);++s=t.length&&(this.annotateSource(c),t=this.vexpr(c),l("return [",d,"/*resume*/,",t,"/*ret*/];"),this.setBlock(d)),this._jump(o),this.setBlock(u),s===1&&l("return Sk.builtin.none.none$;")},e.prototype.cgenexp=function(t){var s=this.buildcodeobj(t,new Sk.builtin.str(""),null,null,function(c){this.cgenexpgen(t.generators,0,t.elt)});return s=this._gr("gener","Sk.misceval.callsimArray(",s,");"),l(s,".gi$locals.$iter0=Sk.abstr.iter(",this.vexpr(t.generators[0].iter),");"),s},e.prototype.cclass=function(t){Sk.asserts.assert(t instanceof Sk.astnodes.ClassDef);var s=this.vseqexpr(t.decorator_list),c=this.vseqexpr(t.bases);let o=this.cunpackkwstoarray(t.keywords);var d=this.enterScope(t.name,t,t.lineno),u=this.newBlock("class entry");this.u.prefixCode="var "+d+"=(function $"+t.name.v+"$class_outer($globals,$locals,$cell){var $gbl=$globals,$loc=$locals,$free=$globals;",this.u.switchCode+="(function $"+t.name.v+"$_closure($cell){",this.u.switchCode+="var $blk="+u+",$exc=[],$ret=undefined,$postfinally=undefined,$currLineNo=undefined,$currColNo=undefined;",Sk.execLimit!==null&&(this.u.switchCode+="if (typeof Sk.execStart === 'undefined') {Sk.execStart = Date.now()}"),Sk.yieldLimit!==null&&this.u.canSuspend&&(this.u.switchCode+="if (typeof Sk.lastYield === 'undefined') {Sk.lastYield = Date.now()}"),this.u.switchCode+="while(true){try{",this.u.switchCode+=this.outputInterruptTest(),this.u.switchCode+="switch($blk){",this.u.suffixCode="}}catch(err){ if (!(err instanceof Sk.builtin.BaseException)) { err = new Sk.builtin.ExternalError(err); } err.traceback.push({lineno: $currLineNo, colno: $currColNo, filename: '"+this.filename+"'}); if ($exc.length>0) { $err = err; $blk=$exc.pop(); continue; } else { throw err; }}}",this.u.suffixCode+="}).call(null, $cell);});",this.u.private_=t.name,this.cbody(t.body,t.name),l("return;"),this.exitScope(),l("$ret = Sk.misceval.buildClass($gbl,",d,",",t.name.$r().v,",[",c,"], $cell, ",o,");"),this._checkSuspension();for(let f of s.reverse())l("$ret = Sk.misceval.callsimOrSuspendArray(",f,", [$ret]);"),this._checkSuspension();this.nameop(t.name,Sk.astnodes.Store,"$ret")},e.prototype.ccontinue=function(t){var s=this.peekFinallyBlock();if(this.u.continueBlocks.length==0)throw new Sk.builtin.SyntaxError("'continue' outside loop",this.filename,t.lineno);t=this.u.continueBlocks[this.u.continueBlocks.length-1],Sk.asserts.assert(this.u.breakBlocks.length===this.u.continueBlocks.length),s&&s.breakDepth==this.u.continueBlocks.length?l("$postfinally={isBreak:true,gotoBlock:",t,"};"):this._jump(t)},e.prototype.cbreak=function(t){var s=this.peekFinallyBlock();if(this.u.breakBlocks.length===0)throw new Sk.builtin.SyntaxError("'break' outside loop",this.filename,t.lineno);t=this.u.breakBlocks[this.u.breakBlocks.length-1],s&&s.breakDepth==this.u.breakBlocks.length?l("$postfinally={isBreak:true,gotoBlock:",t,"};"):this._jump(t)},e.prototype.vstmt=function(t,s){if(this.u.lineno=t.lineno,this.u.linenoSet=!1,this.u.localtemps=[],Sk.debugging&&this.u.canSuspend){var c=this.newBlock("debug breakpoint for line "+t.lineno);l("if (Sk.breakpoints('"+this.filename+"',"+t.lineno+","+t.col_offset+")) {","var $susp = $saveSuspension({data: {type: 'Sk.debug'}, resume: function() {}}, '"+this.filename+"',"+t.lineno+","+t.col_offset+");","$susp.$blk = "+c+";","$susp.optional = true;","return $susp;","}"),this._jump(c),this.setBlock(c),this.u.doesSuspend=!0}switch(this.annotateSource(t),t.constructor){case Sk.astnodes.FunctionDef:this.cfunction(t,s);break;case Sk.astnodes.ClassDef:this.cclass(t);break;case Sk.astnodes.Return:if(this.u.ste.blockType!==Sk.SYMTAB_CONSTS.FunctionBlock)throw new Sk.builtin.SyntaxError("'return' outside function",this.filename,t.lineno);c=t.value?this.vexpr(t.value):"Sk.builtin.none.none$",this.u.finallyBlocks.length==0?l("return ",c,";"):(l("$postfinally={returning:",c,"};"),this._jump(this.peekFinallyBlock().blk));break;case Sk.astnodes.Delete:this.vseqexpr(t.targets);break;case Sk.astnodes.Assign:var o=t.targets.length;for(c=this.vexpr(t.value),s=0;s"){var s=t.name.$r().v;s=s.substring(1,s.length-1),l(t.scopename,".co_name=new Sk.builtins['str']('",s,"');"),this.stack.length&&this.u.ste.blockType=="class"&&l(t.scopename,".co_qualname=new Sk.builtins['str']('"+this.u.name.v+"."+s+"');")}for(var c in t.consts)t.consts.hasOwnProperty(c)&&(t.suffixCode+=c+" = "+t.consts[c]+";")},e.prototype.cbody=function(t,s){var c=0;let o=this.maybeCDocstringOfBody(t);for(o!==null&&(l("$loc.__doc__ = ",o,";"),c=1);c"),t,0,this.canSuspend),c=this.newBlock("module entry");switch(this.u.prefixCode="var "+s+"=(function($forcegbl, $forceloc){",this.u.varDeclsCode="var $gbl = $forcegbl || {}, $blk="+c+",$exc=[],$loc=$forceloc || $gbl,$cell={},$err=undefined;var $ret=undefined,$postfinally=undefined,$currLineNo=undefined,$currColNo=undefined;",Sk.execLimit!==null&&(this.u.varDeclsCode+="if (typeof Sk.execStart === 'undefined') {Sk.execStart = Date.now()}"),Sk.yieldLimit!==null&&this.u.canSuspend&&(this.u.varDeclsCode+="if (typeof Sk.lastYield === 'undefined') {Sk.lastYield = Date.now()}"),this.u.varDeclsCode+="var $waking=false; if ("+s+".$wakingSuspension!==undefined) { $wakeFromSuspension(); $waking=true; }if (Sk.retainGlobals) { if (Sk.globals) { $gbl = Sk.globals; Sk.globals = $gbl; $loc = $gbl; } else { Sk.globals = $gbl; }} else { Sk.globals = $gbl; }",this.u.switchCode="while(true){try{",this.u.switchCode+=this.outputInterruptTest(),this.u.switchCode+="switch($blk){",this.u.suffixCode="}",this.u.suffixCode+="}catch(err){ if (!(err instanceof Sk.builtin.BaseException)) { err = new Sk.builtin.ExternalError(err); } err.traceback.push({lineno: $currLineNo, colno: $currColNo, filename: '"+this.filename+"'}); if ($exc.length>0) { $err = err; $blk=$exc.pop(); continue; } else { throw err; }} } });",t.constructor){case Sk.astnodes.Module:this.cbody(t.body),l("return $loc;");break;default:Sk.asserts.fail("todo; unhandled case in compilerMod")}return this.exitScope(),this.result.push(this.outputAllUnits()),s},Sk.compile=function(t,s,c,o){c=Sk.__future__,Sk.__future__=Object.create(Sk.__future__);var d=Sk.parse(s,t),u=Sk.astFromParse(d.cst,s,d.flags);d=d.flags;var f=Sk.symboltable(u,s);return t=new e(s,f,d,o,t),o=t.cmod(u),Sk.__future__=c,{funcname:"$compiledmod",code:`var $compiledmod = function() {${t.result.join("")} return ${o};}(); -$compiledmod;`,filename:s}},Sk.exportSymbol("Sk.compile",Sk.compile),Sk.resetCompiler=function(){Sk.gensymcount=0},Sk.exportSymbol("Sk.resetCompiler",Sk.resetCompiler),Sk.fixReserved=n,Sk.exportSymbol("Sk.fixReserved",Sk.fixReserved),Sk.unfixReserved=function(t){return t.replace(a,"")},Sk.exportSymbol("Sk.unfixReserved",Sk.unfixReserved),Sk.mangleName=r,Sk.exportSymbol("Sk.mangleName",Sk.mangleName),Sk.reservedWords_=h,Sk.exportSymbol("Sk.reservedWords_",Sk.reservedWords_)},function(p,g){Sk.sysmodules=new Sk.builtin.dict([]),Sk.realsyspath=void 0,Sk.importSearchPathForName=function(e,i,n){var r=e.replace(/\./g,"/"),l=function(h,a){return Sk.misceval.chain(Sk.misceval.tryCatch(function(){return Sk.read(h)},function(S){}),function(S){if(S!==void 0)return new Sk.misceval.Break({filename:h,code:S,packagePath:a})})};return n===void 0&&(n=Sk.realsyspath),Sk.misceval.iterFor(n.tp$iter(),function(h){return Sk.misceval.chain(l(h.v+"/"+r+i,!1),function(a){return a||l(h.v+"/"+r+"/__init__"+i,h.v+"/"+r)})})},Sk.importSetUpPath=function(e){if(!Sk.realsyspath){var i=[new Sk.builtin.str("src/builtin"),new Sk.builtin.str("src/lib"),new Sk.builtin.str(".")];for(e=0;eF;++F)k+=" ";C[x-1]="/* "+k+x+" */ "+C[x-1]}return C.join(` +$compiledmod;`,filename:s}},Sk.exportSymbol("Sk.compile",Sk.compile),Sk.resetCompiler=function(){Sk.gensymcount=0},Sk.exportSymbol("Sk.resetCompiler",Sk.resetCompiler),Sk.fixReserved=n,Sk.exportSymbol("Sk.fixReserved",Sk.fixReserved),Sk.unfixReserved=function(t){return t.replace(a,"")},Sk.exportSymbol("Sk.unfixReserved",Sk.unfixReserved),Sk.mangleName=r,Sk.exportSymbol("Sk.mangleName",Sk.mangleName),Sk.reservedWords_=h,Sk.exportSymbol("Sk.reservedWords_",Sk.reservedWords_)},function(p,b){Sk.sysmodules=new Sk.builtin.dict([]),Sk.realsyspath=void 0,Sk.importSearchPathForName=function(e,i,n){var r=e.replace(/\./g,"/"),l=function(h,a){return Sk.misceval.chain(Sk.misceval.tryCatch(function(){return Sk.read(h)},function(S){}),function(S){if(S!==void 0)return new Sk.misceval.Break({filename:h,code:S,packagePath:a})})};return n===void 0&&(n=Sk.realsyspath),Sk.misceval.iterFor(n.tp$iter(),function(h){return Sk.misceval.chain(l(h.v+"/"+r+i,!1),function(a){return a||l(h.v+"/"+r+"/__init__"+i,h.v+"/"+r)})})},Sk.importSetUpPath=function(e){if(!Sk.realsyspath){var i=[new Sk.builtin.str("src/builtin"),new Sk.builtin.str("src/lib"),new Sk.builtin.str(".")];for(e=0;eF;++F)g+=" ";C[x-1]="/* "+g+x+" */ "+C[x-1]}return C.join(` `)};N=M(N),Sk.debugout(N)}A.funcname!=="$compiledmod"&&(N+=` -`+A.funcname+";");var R=new Sk.builtin.str(n),H=new Sk.builtin.str(e);Sk.sysmodules.mp$ass_subscript(R,c),l&&l.tp$setattr(H,c);var ee=Sk.global.eval(N);c.init$dict(R,Sk.builtin.none.none$),c.$d.__package__=A.packagePath?R:m?new Sk.builtin.str(u+m):d||Sk.builtin.none.none$,A.packagePath&&(c.$d.__path__=new Sk.builtin.tuple([new Sk.builtin.str(A.packagePath)])),A.filename&&A.funcname!=="$builtinmodule"&&(c.$d.__file__=new Sk.builtin.str(A.filename));var Y=l&&l.$initializing;return c.$initializing=!0,l&&!Y&&(l.$initializing=!0),Sk.misceval.tryCatch(()=>Sk.misceval.chain(ee(c.$d),k=>(c.$initializing=!1,l&&!Y&&(l.$initializing=!1),k)),k=>{try{Sk.abstr.objectDelItem(Sk.sysmodules,R)}catch{}if(l)try{l.tp$setattr(H,void 0)}catch{}throw c.$initializing=!1,l&&!Y&&(l.$initializing=!1),k})}},function(A){var N;if(A===void 0){if(h&&!o)return;throw new Sk.builtin.ModuleNotFoundError("No module named "+Sk.misceval.objectRepr(new Sk.builtin.str(e)))}if(A!==c.$d){for(N in c.$d)A[N]||(A[N]=c.$d[N]);c.$d=A}if(Sk.onAfterImport&&typeof Sk.onAfterImport=="function")try{Sk.onAfterImport(e)}catch{}return o?(s.tp$setattr(new Sk.builtin.str($[$.length-1]),c),o):c})});return a?_:Sk.misceval.retryOptionalSuspensionOrThrow(_)},Sk.importModule=function(e,i,n){return Sk.importModuleInternal_(e,i,void 0,void 0,void 0,!1,n)},Sk.importMain=function(e,i,n){return Sk.dateSet=!1,Sk.filesLoaded=!1,Sk.sysmodules=new Sk.builtin.dict([]),Sk.realsyspath=void 0,Sk.resetCompiler(),Sk.importModuleInternal_(e,i,"__main__",void 0,void 0,!1,n)},Sk.importMainWithBody=function(e,i,n,r){return Sk.dateSet=!1,Sk.filesLoaded=!1,Sk.sysmodules=new Sk.builtin.dict([]),Sk.realsyspath=void 0,Sk.resetCompiler(),Sk.importModuleInternal_(e,i,"__main__",n,void 0,!1,r)},Sk.importBuiltinWithBody=function(e,i,n,r){return Sk.importModuleInternal_(e,i,"__builtin__."+e,n,void 0,!1,r)},Sk.builtin.__import__=function(e,i,n,r,l){e=e.toString();var h=Sk.globals,a;if(l==null&&(l=Sk.__future__.absolute_import?0:-1),l!==0&&i.__package__&&i.__package__!==Sk.builtin.none.none$){if((a=i.__package__.v)&&0=i.length)throw new Sk.builtin.ImportError("Attempted relative import beyond toplevel package");i.length-=l-1,a=i.join(".")}var S=Sk.sysmodules.quick$lookup(new Sk.builtin.str(a))}if(0Sk.importModuleInternal_(o,void 0,void 0,void 0,s,!0,!0))}return Sk.misceval.chain(...t,function(){return Sk.asserts.assert(s),s})}return t},function(t){return h!==Sk.globals&&(Sk.globals=h),t})},Sk.importStar=function(e,i,n){if(n=e.tp$getattr(new Sk.builtin.str("__all__")))for(let r=Sk.abstr.iter(n),l=r.tp$iternext();l!==void 0;l=r.tp$iternext())i[l.v]=Sk.abstr.gattr(e,l);else{n=Object.getOwnPropertyNames(e.$d);for(let r in n)n[r].charAt(0)!="_"&&(i[n[r]]=e.$d[n[r]])}},Sk.exportSymbol("Sk.importMain",Sk.importMain),Sk.exportSymbol("Sk.importMainWithBody",Sk.importMainWithBody),Sk.exportSymbol("Sk.importBuiltinWithBody",Sk.importBuiltinWithBody),Sk.exportSymbol("Sk.builtin.__import__",Sk.builtin.__import__),Sk.exportSymbol("Sk.importStar",Sk.importStar)},function(p,g){Sk.builtin.timSort=function(e,i){this.list=new Sk.builtin.list(e.v),this.MIN_GALLOP=7,this.listlength=i||e.sq$length()},Sk.builtin.timSort.prototype.lt=function(e,i){return Sk.misceval.richCompareBool(e,i,"Lt")},Sk.builtin.timSort.prototype.le=function(e,i){return!this.lt(i,e)},Sk.builtin.timSort.prototype.setitem=function(e,i){this.list.v[e]=i},Sk.builtin.timSort.prototype.binary_sort=function(e,i){var n;for(n=e.base+i;n>1);this.lt(i,e.getitem(h))?l=h:r=h+1}for(Sk.asserts.assert(r===l),h=n;h>r;h--)e.setitem(h,e.getitem(h-1));e.setitem(r,i)}},Sk.builtin.timSort.prototype.count_run=function(e){var i;if(1>=e.len)var n=e.len,r=!1;else if(n=2,this.lt(e.getitem(e.base+1),e.getitem(e.base)))for(r=!0,i=e.base+2;ii.len)){for(this.merge_init(),e=this.merge_compute_minrun(i.len);0l&&(t=l),S+=n,t+=n}else{for(l=n+1;tl&&(t=l),a=n-S,S=n-t,t=a}for(Sk.asserts.assert(-1<=S>1),r(i.getitem(i.base+n),e)?S=n+1:t=n;return Sk.asserts.assert(S==t),t},Sk.builtin.timSort.prototype.merge_init=function(){this.min_gallop=this.MIN_GALLOP,this.pending=[]},Sk.builtin.timSort.prototype.merge_lo=function(e,i){var n,r,l;Sk.asserts.assert(0=h)break}else{if(this.setitem(a,e.popleft()),a++,e.len==1)return;if(n++,r=0,n>=h)break}for(h+=1;;){for(this.min_gallop=h-=1=e.len||(this.setitem(a,i.popleft()),a++,i.len===0))return;for(r=this.gallop(e.getitem(e.base),i,0,!1),l=i.base;l=h)break}else{if(a--,this.setitem(a,t),i.len--,i.len==1)return;if(r++,n=0,r>=h)break}}for(h+=1;;){this.min_gallop=h-=1e.base+s-1;l--)a--,this.setitem(a,e.getitem(l));if(e.len-=n,e.len===0||(a--,this.setitem(a,i.popright()),i.len==1))return;for(S=e.getitem(e.base+e.len-1),s=this.gallop(S,i,i.len-1,!1),r=i.len-s,l=i.base+i.len-1;l>i.base+s-1;l--)a--,this.setitem(a,i.getitem(l));if(i.len-=r,1>=i.len||(a--,this.setitem(a,e.popright()),e.len===0))return;if(ne.base-1;l--)a--,this.setitem(a,e.getitem(l));for(l=i.base+i.len-1;l>i.base-1;l--)a--,this.setitem(a,i.getitem(l))}},Sk.builtin.timSort.prototype.merge_at=function(e){0>e&&(e=this.pending.length+e);var i=this.pending[e],n=this.pending[e+1];Sk.asserts.assert(0>=1;return e+i},Sk.builtin.listSlice=function(e,i,n){this.list=e,this.base=i,this.len=n},Sk.builtin.listSlice.prototype.copyitems=function(){var e=this.base,i=this.base+this.len;return Sk.asserts.assert(0<=e<=i),new Sk.builtin.listSlice(new Sk.builtin.list(this.list.v.slice(e,i)),0,this.len)},Sk.builtin.listSlice.prototype.advance=function(e){this.base+=e,this.len-=e,Sk.asserts.assert(this.base<=this.list.sq$length())},Sk.builtin.listSlice.prototype.getitem=function(e){return this.list.v[e]},Sk.builtin.listSlice.prototype.setitem=function(e,i){this.list.v[e]=i},Sk.builtin.listSlice.prototype.popleft=function(){var e=this.list.v[this.base];return this.base++,this.len--,e},Sk.builtin.listSlice.prototype.popright=function(){return this.len--,this.list.v[this.base+this.len]},Sk.builtin.listSlice.prototype.reverse=function(){for(var e,i,n=this.list,r=this.base,l=r+this.len-1;r same as super(__class__, ) +`+A.funcname+";");var R=new Sk.builtin.str(n),H=new Sk.builtin.str(e);Sk.sysmodules.mp$ass_subscript(R,c),l&&l.tp$setattr(H,c);var ee=Sk.global.eval(N);c.init$dict(R,Sk.builtin.none.none$),c.$d.__package__=A.packagePath?R:m?new Sk.builtin.str(u+m):d||Sk.builtin.none.none$,A.packagePath&&(c.$d.__path__=new Sk.builtin.tuple([new Sk.builtin.str(A.packagePath)])),A.filename&&A.funcname!=="$builtinmodule"&&(c.$d.__file__=new Sk.builtin.str(A.filename));var J=l&&l.$initializing;return c.$initializing=!0,l&&!J&&(l.$initializing=!0),Sk.misceval.tryCatch(()=>Sk.misceval.chain(ee(c.$d),g=>(c.$initializing=!1,l&&!J&&(l.$initializing=!1),g)),g=>{try{Sk.abstr.objectDelItem(Sk.sysmodules,R)}catch{}if(l)try{l.tp$setattr(H,void 0)}catch{}throw c.$initializing=!1,l&&!J&&(l.$initializing=!1),g})}},function(A){var N;if(A===void 0){if(h&&!o)return;throw new Sk.builtin.ModuleNotFoundError("No module named "+Sk.misceval.objectRepr(new Sk.builtin.str(e)))}if(A!==c.$d){for(N in c.$d)A[N]||(A[N]=c.$d[N]);c.$d=A}if(Sk.onAfterImport&&typeof Sk.onAfterImport=="function")try{Sk.onAfterImport(e)}catch{}return o?(s.tp$setattr(new Sk.builtin.str($[$.length-1]),c),o):c})});return a?_:Sk.misceval.retryOptionalSuspensionOrThrow(_)},Sk.importModule=function(e,i,n){return Sk.importModuleInternal_(e,i,void 0,void 0,void 0,!1,n)},Sk.importMain=function(e,i,n){return Sk.dateSet=!1,Sk.filesLoaded=!1,Sk.sysmodules=new Sk.builtin.dict([]),Sk.realsyspath=void 0,Sk.resetCompiler(),Sk.importModuleInternal_(e,i,"__main__",void 0,void 0,!1,n)},Sk.importMainWithBody=function(e,i,n,r){return Sk.dateSet=!1,Sk.filesLoaded=!1,Sk.sysmodules=new Sk.builtin.dict([]),Sk.realsyspath=void 0,Sk.resetCompiler(),Sk.importModuleInternal_(e,i,"__main__",n,void 0,!1,r)},Sk.importBuiltinWithBody=function(e,i,n,r){return Sk.importModuleInternal_(e,i,"__builtin__."+e,n,void 0,!1,r)},Sk.builtin.__import__=function(e,i,n,r,l){e=e.toString();var h=Sk.globals,a;if(l==null&&(l=Sk.__future__.absolute_import?0:-1),l!==0&&i.__package__&&i.__package__!==Sk.builtin.none.none$){if((a=i.__package__.v)&&0=i.length)throw new Sk.builtin.ImportError("Attempted relative import beyond toplevel package");i.length-=l-1,a=i.join(".")}var S=Sk.sysmodules.quick$lookup(new Sk.builtin.str(a))}if(0Sk.importModuleInternal_(o,void 0,void 0,void 0,s,!0,!0))}return Sk.misceval.chain(...t,function(){return Sk.asserts.assert(s),s})}return t},function(t){return h!==Sk.globals&&(Sk.globals=h),t})},Sk.importStar=function(e,i,n){if(n=e.tp$getattr(new Sk.builtin.str("__all__")))for(let r=Sk.abstr.iter(n),l=r.tp$iternext();l!==void 0;l=r.tp$iternext())i[l.v]=Sk.abstr.gattr(e,l);else{n=Object.getOwnPropertyNames(e.$d);for(let r in n)n[r].charAt(0)!="_"&&(i[n[r]]=e.$d[n[r]])}},Sk.exportSymbol("Sk.importMain",Sk.importMain),Sk.exportSymbol("Sk.importMainWithBody",Sk.importMainWithBody),Sk.exportSymbol("Sk.importBuiltinWithBody",Sk.importBuiltinWithBody),Sk.exportSymbol("Sk.builtin.__import__",Sk.builtin.__import__),Sk.exportSymbol("Sk.importStar",Sk.importStar)},function(p,b){Sk.builtin.timSort=function(e,i){this.list=new Sk.builtin.list(e.v),this.MIN_GALLOP=7,this.listlength=i||e.sq$length()},Sk.builtin.timSort.prototype.lt=function(e,i){return Sk.misceval.richCompareBool(e,i,"Lt")},Sk.builtin.timSort.prototype.le=function(e,i){return!this.lt(i,e)},Sk.builtin.timSort.prototype.setitem=function(e,i){this.list.v[e]=i},Sk.builtin.timSort.prototype.binary_sort=function(e,i){var n;for(n=e.base+i;n>1);this.lt(i,e.getitem(h))?l=h:r=h+1}for(Sk.asserts.assert(r===l),h=n;h>r;h--)e.setitem(h,e.getitem(h-1));e.setitem(r,i)}},Sk.builtin.timSort.prototype.count_run=function(e){var i;if(1>=e.len)var n=e.len,r=!1;else if(n=2,this.lt(e.getitem(e.base+1),e.getitem(e.base)))for(r=!0,i=e.base+2;ii.len)){for(this.merge_init(),e=this.merge_compute_minrun(i.len);0l&&(t=l),S+=n,t+=n}else{for(l=n+1;tl&&(t=l),a=n-S,S=n-t,t=a}for(Sk.asserts.assert(-1<=S>1),r(i.getitem(i.base+n),e)?S=n+1:t=n;return Sk.asserts.assert(S==t),t},Sk.builtin.timSort.prototype.merge_init=function(){this.min_gallop=this.MIN_GALLOP,this.pending=[]},Sk.builtin.timSort.prototype.merge_lo=function(e,i){var n,r,l;Sk.asserts.assert(0=h)break}else{if(this.setitem(a,e.popleft()),a++,e.len==1)return;if(n++,r=0,n>=h)break}for(h+=1;;){for(this.min_gallop=h-=1=e.len||(this.setitem(a,i.popleft()),a++,i.len===0))return;for(r=this.gallop(e.getitem(e.base),i,0,!1),l=i.base;l=h)break}else{if(a--,this.setitem(a,t),i.len--,i.len==1)return;if(r++,n=0,r>=h)break}}for(h+=1;;){this.min_gallop=h-=1e.base+s-1;l--)a--,this.setitem(a,e.getitem(l));if(e.len-=n,e.len===0||(a--,this.setitem(a,i.popright()),i.len==1))return;for(S=e.getitem(e.base+e.len-1),s=this.gallop(S,i,i.len-1,!1),r=i.len-s,l=i.base+i.len-1;l>i.base+s-1;l--)a--,this.setitem(a,i.getitem(l));if(i.len-=r,1>=i.len||(a--,this.setitem(a,e.popright()),e.len===0))return;if(ne.base-1;l--)a--,this.setitem(a,e.getitem(l));for(l=i.base+i.len-1;l>i.base-1;l--)a--,this.setitem(a,i.getitem(l))}},Sk.builtin.timSort.prototype.merge_at=function(e){0>e&&(e=this.pending.length+e);var i=this.pending[e],n=this.pending[e+1];Sk.asserts.assert(0>=1;return e+i},Sk.builtin.listSlice=function(e,i,n){this.list=e,this.base=i,this.len=n},Sk.builtin.listSlice.prototype.copyitems=function(){var e=this.base,i=this.base+this.len;return Sk.asserts.assert(0<=e<=i),new Sk.builtin.listSlice(new Sk.builtin.list(this.list.v.slice(e,i)),0,this.len)},Sk.builtin.listSlice.prototype.advance=function(e){this.base+=e,this.len-=e,Sk.asserts.assert(this.base<=this.list.sq$length())},Sk.builtin.listSlice.prototype.getitem=function(e){return this.list.v[e]},Sk.builtin.listSlice.prototype.setitem=function(e,i){this.list.v[e]=i},Sk.builtin.listSlice.prototype.popleft=function(){var e=this.list.v[this.base];return this.base++,this.len--,e},Sk.builtin.listSlice.prototype.popright=function(){return this.len--,this.list.v[this.base+this.len]},Sk.builtin.listSlice.prototype.reverse=function(){for(var e,i,n=this.list,r=this.base,l=r+this.len-1;r same as super(__class__, ) super(type) -> unbound super object super(type, obj) -> bound super object; requires isinstance(obj, type) super(type, type2) -> bound super object; requires issubclass(type2, type) @@ -630,9 +630,9 @@ class C(B): @classmethod def cmeth(cls, arg): super().cmeth(arg) -`,tp$new:Sk.generic.new,tp$init(e,i){if(Sk.abstr.checkNoKwargs("super",i),Sk.abstr.checkArgsLen("super",e,1,2),i=e[0],e=e[1],!Sk.builtin.checkClass(i))throw new Sk.builtin.TypeError("must be type, not "+Sk.abstr.typeName(i));this.obj=e,this.type=i,this.obj!=null&&(this.obj_type=this.$supercheck(i,this.obj))},$r(){return this.obj?new Sk.builtin.str(", <"+Sk.abstr.typeName(this.obj)+" object>>"):new Sk.builtin.str(", NULL>")},tp$getattr(e,i){let n=this.obj_type;if(n==null)return Sk.generic.getAttr.call(this,e,i);var r=n.prototype.tp$mro;let l=r.length;if(e===Sk.builtin.str.$class)return Sk.generic.getAttr.call(this,e,i);let h;for(h=0;h+1=l)return Sk.generic.getAttr.call(this,e,i);e=e.$mangled;let a;for(;h{i+=0, <"+Sk.abstr.typeName(this.obj)+" object>>"):new Sk.builtin.str(", NULL>")},tp$getattr(e,i){let n=this.obj_type;if(n==null)return Sk.generic.getAttr.call(this,e,i);var r=n.prototype.tp$mro;let l=r.length;if(e===Sk.builtin.str.$class)return Sk.generic.getAttr.call(this,e,i);let h;for(h=0;h+1=l)return Sk.generic.getAttr.call(this,e,i);e=e.$mangled;let a;for(;h{i+=0{this.is$typevar(i)&&0>this.tuple$index(e,i)&&e.push(i)}),this.$params=new Sk.builtin.tuple(e)},tuple$index(e,i){return e.indexOf(i)},is$typevar(e){if(e.tp$name!=="TypeVar")return!1;if(e=Sk.abstr.lookupSpecial(e,Sk.builtin.str.$module),e===void 0)throw Sk.builtin.RuntimeError("found object withought a __module__");return e.toString()==="typing"},ga$repr(e){if(e===Sk.builtin.Ellipsis)return"...";if(Sk.abstr.lookupSpecial(e,this.str$orig)&&Sk.abstr.lookupSpecial(e,this.str$args))return Sk.misceval.objectRepr(e);let i=Sk.abstr.lookupSpecial(e,Sk.builtin.str.$qualname);if(i===void 0)return Sk.misceval.objectRepr(e);let n=Sk.abstr.lookupSpecial(e,Sk.builtin.str.$module);return n===void 0||Sk.builtin.checkNone(n)?Sk.misceval.objectRepr(e):n.toString()==="builtins"?i.toString():n.toString()+"."+i.toString()},str$orig:new Sk.builtin.str("__origin__"),str$args:new Sk.builtin.str("__args__"),attr$exc:"__origin__ __args__ __parameters__ __mro_entries__ __reduce_ex__ __reduce__".split(" ").map(e=>new Sk.builtin.str(e))}})},function(p,g){function e(r,l){let h;if(r===void 0||Sk.builtin.checkNone(r))r=void 0;else if(r instanceof Sk.builtin.dict)h={},r.$items().forEach(a=>{var[S,t]=a;Sk.builtin.checkString(S)&&(h[S.$mangled]=t)});else throw new Sk.builtin.TypeError(l+" must be a dict or None, not "+Sk.abstr.typeName(r));return h}function i(r,l){if(r!==void 0&&!Sk.builtin.checkNone(r))for(let h in l)r.mp$ass_subscript(new Sk.builtin.str(Sk.unfixReserved(h)),l[h])}Sk.builtins={round:null,len:null,min:null,max:null,sum:null,abs:null,fabs:null,ord:null,chr:null,hex:null,oct:null,bin:null,dir:null,repr:null,open:null,isinstance:null,hash:null,getattr:null,hasattr:null,id:null,sorted:null,any:null,all:null,enumerate:Sk.builtin.enumerate,filter:Sk.builtin.filter_,map:Sk.builtin.map_,range:Sk.builtin.range_,reversed:Sk.builtin.reversed,zip:Sk.builtin.zip_,BaseException:Sk.builtin.BaseException,AttributeError:Sk.builtin.AttributeError,ArithmeticError:Sk.builtin.ArithmeticError,ValueError:Sk.builtin.ValueError,Exception:Sk.builtin.Exception,ZeroDivisionError:Sk.builtin.ZeroDivisionError,AssertionError:Sk.builtin.AssertionError,ImportError:Sk.builtin.ImportError,ModuleNotFoundError:Sk.builtin.ModuleNotFoundError,IndentationError:Sk.builtin.IndentationError,IndexError:Sk.builtin.IndexError,LookupError:Sk.builtin.LookupError,KeyError:Sk.builtin.KeyError,TypeError:Sk.builtin.TypeError,UnicodeDecodeError:Sk.builtin.UnicodeDecodeError,UnicodeEncodeError:Sk.builtin.UnicodeEncodeError,NameError:Sk.builtin.NameError,UnboundLocalError:Sk.builtin.UnboundLocalError,IOError:Sk.builtin.IOError,NotImplementedError:Sk.builtin.NotImplementedError,SystemExit:Sk.builtin.SystemExit,OverflowError:Sk.builtin.OverflowError,OperationError:Sk.builtin.OperationError,NegativePowerError:Sk.builtin.NegativePowerError,RuntimeError:Sk.builtin.RuntimeError,RecursionError:Sk.builtin.RecursionError,StopIteration:Sk.builtin.StopIteration,SyntaxError:Sk.builtin.SyntaxError,SystemError:Sk.builtin.SystemError,KeyboardInterrupt:Sk.builtin.KeyboardInterrupt,float_$rw$:Sk.builtin.float_,int_$rw$:Sk.builtin.int_,bool:Sk.builtin.bool,complex:Sk.builtin.complex,dict:Sk.builtin.dict,file:Sk.builtin.file,frozenset:Sk.builtin.frozenset,function:Sk.builtin.func,generator:Sk.builtin.generator,list:Sk.builtin.list,long_$rw$:Sk.builtin.lng,method:Sk.builtin.method,object:Sk.builtin.object,slice:Sk.builtin.slice,str:Sk.builtin.str,set:Sk.builtin.set,tuple:Sk.builtin.tuple,type:Sk.builtin.type,input:null,raw_input:new Sk.builtin.func(Sk.builtin.raw_input),setattr:null,jseval:Sk.builtin.jseval,jsmillis:Sk.builtin.jsmillis,quit:new Sk.builtin.func(Sk.builtin.quit),exit:new Sk.builtin.func(Sk.builtin.quit),print:null,divmod:null,format:null,globals:null,issubclass:null,iter:null,execfile:Sk.builtin.execfile,help:Sk.builtin.help,memoryview:Sk.builtin.memoryview,reload:Sk.builtin.reload,super_$rw$:Sk.builtin.super_,unichr:new Sk.builtin.func(Sk.builtin.unichr),vars:Sk.builtin.vars,apply_$rw$:Sk.builtin.apply_,buffer:Sk.builtin.buffer,coerce:Sk.builtin.coerce,intern:Sk.builtin.intern,property:Sk.builtin.property,classmethod:Sk.builtin.classmethod,staticmethod:Sk.builtin.staticmethod,Ellipsis:Sk.builtin.Ellipsis},p=Sk.builtin.none.none$,g=new Sk.builtin.tuple;let n=new Sk.builtin.int_(0);Sk.abstr.setUpModuleMethods("builtins",Sk.builtins,{__import__:{$meth(r,l,h,a,S){if(!Sk.builtin.checkString(r))throw new Sk.builtin.TypeError("__import__() argument 1 must be str, not "+r.tp$name);if(r===Sk.builtin.str.$empty&&S.v===0)throw new Sk.builtin.ValueError("Empty module name");return l=e(l,"globals")||{},a=Sk.ffi.remapToJs(a),S=Sk.ffi.remapToJs(S),Sk.builtin.__import__(r,l,void 0,a,S)},$flags:{NamedArgs:["name","globals","locals","fromlist","level"],Defaults:[p,p,g,n]},$textsig:null,$doc:`__import__(name, globals=None, locals=None, fromlist=(), level=0) -> module +E.g. for t = list[int], t.origin is list and t.args is (int,).`,tp$hash(){let e=Sk.abstr.objectHash(this.$origin);if(e==-1)return-1;let i=Sk.abstr.objectHash(this.$args);return i==-1?-1:e^i},tp$call(e,i){e=Sk.misceval.callsimArray(this.$origin,e,i);try{e.tp$setattr(new Sk.builtin.str("__orig_class__"),this)}catch(n){if(!(n instanceof Sk.builtin.AttributeError||n instanceof Sk.builtin.TypeError))throw n}return e},tp$richcompare(e,i){if(!(e instanceof Sk.builtin.GenericAlias)||i!=="Eq"&&i!=="NotEq")return Sk.builtin.NotImplemented.NotImplemented$;let n=Sk.misceval.richCompareBool(this.$origin,e.$origin,"Eq");return n?(e=Sk.misceval.richCompareBool(this.$args,e.$args,"Eq"),i==="Eq"?e:!e):i==="Eq"?n:!n},tp$as_sequence_or_mapping:!0,mp$subscript(e){if(this.$params===null&&this.mk$params(),this.$params.sq$length()===0)throw new Sk.builtin.TypeError("There are no type variables left in "+Sk.misceval.objectRepr(this))}},methods:{__mro_entries__:{$meth(){return new Sk.builtin.tuple([this.$origin])},$flags:{NoArgs:!0}},__instancecheck__:{$meth(e){throw new Sk.builtin.TypeError("isinstance() argument 2 cannot be a parameterized generic")},$flags:{OneArg:!0}},__subclasscheck__:{$meth(e){throw new Sk.builtin.TypeError("issubclass() argument 2 cannot be a parameterized generic")},$flags:{OneArg:!0}}},getsets:{__parameters__:{$get(){return this.$params===null&&this.mk$params(),this.$params},$doc:"Type variables in the GenericAlias."},__origin__:{$get(){return this.$origin}},__args__:{$get(){return this.$args}}},proto:{mk$params(){let e=[];this.$args.v.forEach(i=>{this.is$typevar(i)&&0>this.tuple$index(e,i)&&e.push(i)}),this.$params=new Sk.builtin.tuple(e)},tuple$index(e,i){return e.indexOf(i)},is$typevar(e){if(e.tp$name!=="TypeVar")return!1;if(e=Sk.abstr.lookupSpecial(e,Sk.builtin.str.$module),e===void 0)throw Sk.builtin.RuntimeError("found object withought a __module__");return e.toString()==="typing"},ga$repr(e){if(e===Sk.builtin.Ellipsis)return"...";if(Sk.abstr.lookupSpecial(e,this.str$orig)&&Sk.abstr.lookupSpecial(e,this.str$args))return Sk.misceval.objectRepr(e);let i=Sk.abstr.lookupSpecial(e,Sk.builtin.str.$qualname);if(i===void 0)return Sk.misceval.objectRepr(e);let n=Sk.abstr.lookupSpecial(e,Sk.builtin.str.$module);return n===void 0||Sk.builtin.checkNone(n)?Sk.misceval.objectRepr(e):n.toString()==="builtins"?i.toString():n.toString()+"."+i.toString()},str$orig:new Sk.builtin.str("__origin__"),str$args:new Sk.builtin.str("__args__"),attr$exc:"__origin__ __args__ __parameters__ __mro_entries__ __reduce_ex__ __reduce__".split(" ").map(e=>new Sk.builtin.str(e))}})},function(p,b){function e(r,l){let h;if(r===void 0||Sk.builtin.checkNone(r))r=void 0;else if(r instanceof Sk.builtin.dict)h={},r.$items().forEach(a=>{var[S,t]=a;Sk.builtin.checkString(S)&&(h[S.$mangled]=t)});else throw new Sk.builtin.TypeError(l+" must be a dict or None, not "+Sk.abstr.typeName(r));return h}function i(r,l){if(r!==void 0&&!Sk.builtin.checkNone(r))for(let h in l)r.mp$ass_subscript(new Sk.builtin.str(Sk.unfixReserved(h)),l[h])}Sk.builtins={round:null,len:null,min:null,max:null,sum:null,abs:null,fabs:null,ord:null,chr:null,hex:null,oct:null,bin:null,dir:null,repr:null,open:null,isinstance:null,hash:null,getattr:null,hasattr:null,id:null,sorted:null,any:null,all:null,enumerate:Sk.builtin.enumerate,filter:Sk.builtin.filter_,map:Sk.builtin.map_,range:Sk.builtin.range_,reversed:Sk.builtin.reversed,zip:Sk.builtin.zip_,BaseException:Sk.builtin.BaseException,AttributeError:Sk.builtin.AttributeError,ArithmeticError:Sk.builtin.ArithmeticError,ValueError:Sk.builtin.ValueError,Exception:Sk.builtin.Exception,ZeroDivisionError:Sk.builtin.ZeroDivisionError,AssertionError:Sk.builtin.AssertionError,ImportError:Sk.builtin.ImportError,ModuleNotFoundError:Sk.builtin.ModuleNotFoundError,IndentationError:Sk.builtin.IndentationError,IndexError:Sk.builtin.IndexError,LookupError:Sk.builtin.LookupError,KeyError:Sk.builtin.KeyError,TypeError:Sk.builtin.TypeError,UnicodeDecodeError:Sk.builtin.UnicodeDecodeError,UnicodeEncodeError:Sk.builtin.UnicodeEncodeError,NameError:Sk.builtin.NameError,UnboundLocalError:Sk.builtin.UnboundLocalError,IOError:Sk.builtin.IOError,NotImplementedError:Sk.builtin.NotImplementedError,SystemExit:Sk.builtin.SystemExit,OverflowError:Sk.builtin.OverflowError,OperationError:Sk.builtin.OperationError,NegativePowerError:Sk.builtin.NegativePowerError,RuntimeError:Sk.builtin.RuntimeError,RecursionError:Sk.builtin.RecursionError,StopIteration:Sk.builtin.StopIteration,SyntaxError:Sk.builtin.SyntaxError,SystemError:Sk.builtin.SystemError,KeyboardInterrupt:Sk.builtin.KeyboardInterrupt,float_$rw$:Sk.builtin.float_,int_$rw$:Sk.builtin.int_,bool:Sk.builtin.bool,complex:Sk.builtin.complex,dict:Sk.builtin.dict,file:Sk.builtin.file,frozenset:Sk.builtin.frozenset,function:Sk.builtin.func,generator:Sk.builtin.generator,list:Sk.builtin.list,long_$rw$:Sk.builtin.lng,method:Sk.builtin.method,object:Sk.builtin.object,slice:Sk.builtin.slice,str:Sk.builtin.str,set:Sk.builtin.set,tuple:Sk.builtin.tuple,type:Sk.builtin.type,input:null,raw_input:new Sk.builtin.func(Sk.builtin.raw_input),setattr:null,jseval:Sk.builtin.jseval,jsmillis:Sk.builtin.jsmillis,quit:new Sk.builtin.func(Sk.builtin.quit),exit:new Sk.builtin.func(Sk.builtin.quit),print:null,divmod:null,format:null,globals:null,issubclass:null,iter:null,execfile:Sk.builtin.execfile,help:Sk.builtin.help,memoryview:Sk.builtin.memoryview,reload:Sk.builtin.reload,super_$rw$:Sk.builtin.super_,unichr:new Sk.builtin.func(Sk.builtin.unichr),vars:Sk.builtin.vars,apply_$rw$:Sk.builtin.apply_,buffer:Sk.builtin.buffer,coerce:Sk.builtin.coerce,intern:Sk.builtin.intern,property:Sk.builtin.property,classmethod:Sk.builtin.classmethod,staticmethod:Sk.builtin.staticmethod,Ellipsis:Sk.builtin.Ellipsis},p=Sk.builtin.none.none$,b=new Sk.builtin.tuple;let n=new Sk.builtin.int_(0);Sk.abstr.setUpModuleMethods("builtins",Sk.builtins,{__import__:{$meth(r,l,h,a,S){if(!Sk.builtin.checkString(r))throw new Sk.builtin.TypeError("__import__() argument 1 must be str, not "+r.tp$name);if(r===Sk.builtin.str.$empty&&S.v===0)throw new Sk.builtin.ValueError("Empty module name");return l=e(l,"globals")||{},a=Sk.ffi.remapToJs(a),S=Sk.ffi.remapToJs(S),Sk.builtin.__import__(r,l,void 0,a,S)},$flags:{NamedArgs:["name","globals","locals","fromlist","level"],Defaults:[p,p,b,n]},$textsig:null,$doc:`__import__(name, globals=None, locals=None, fromlist=(), level=0) -> module Import a module. Because this function is meant for use by the Python interpreter and not for general use, it is better to use @@ -784,14 +784,14 @@ With an argument, equivalent to object.__dict__.`}}),Sk.setupObjects=function(r) As repr(), return a string containing a printable representation of an object, but escape the non-ASCII characters in the string returned by repr() using \\\\x, \\\\u or \\\\U escapes. This generates a string similar -to that returned by repr() in Python 2.`},null,"builtins")):(Sk.builtins.range=new Sk.builtin.sk_method({$meth:Sk.builtin.range,$name:"range",$flags:{MinArgs:1,MaxArgs:3}},void 0,"builtins"),Sk.builtins.xrange=new Sk.builtin.sk_method({$meth:Sk.builtin.xrange,$name:"xrange",$flags:{MinArgs:1,MaxArgs:3}},null,"builtins"),Sk.builtins.reduce=new Sk.builtin.sk_method({$meth:Sk.builtin.reduce,$name:"reduce",$flags:{MinArgs:2,MaxArgs:3}},null,"builtins"),Sk.builtins.filter=new Sk.builtin.func(Sk.builtin.filter),Sk.builtins.map=new Sk.builtin.func(Sk.builtin.map),Sk.builtins.zip=new Sk.builtin.func(Sk.builtin.zip),Sk.builtins.StandardError=Sk.builtin.Exception,Sk.builtins.unicode=Sk.builtin.str,Sk.builtins.basestring=Sk.builtin.str,Sk.builtins.long_$rw$=Sk.builtin.lng,Sk.builtin.int_.prototype.$r=function(){let l=this.v;return typeof l=="number"?new Sk.builtin.str(l.toString()):new Sk.builtin.str(l.toString()+"L")},Sk.builtin.int_.prototype.tp$str=function(){return new Sk.builtin.str(this.v.toString())},Sk.builtin.bool.prototype.tp$str=function(){return this.$r()},Sk.builtins.raw_input=new Sk.builtin.func(Sk.builtin.raw_input),Sk.builtins.unichr=new Sk.builtin.func(Sk.builtin.unichr),Sk.builtin.str.prototype.decode=Sk.builtin.str.$py2decode,delete Sk.builtins.bytes,delete Sk.builtins.ascii)},Sk.exportSymbol("Sk.setupObjects",Sk.setupObjects),Sk.exportSymbol("Sk.builtins",Sk.builtins)},function(p,g){Sk.builtin.str.$empty=new Sk.builtin.str(""),Sk.builtin.str.$emptystr=Sk.builtin.str.$empty,Sk.builtin.str.$utf8=new Sk.builtin.str("utf-8"),Sk.builtin.str.$ascii=new Sk.builtin.str("ascii"),Sk.builtin.str.$default_factory=new Sk.builtin.str("default_factory"),Sk.builtin.str.$imag=new Sk.builtin.str("imag"),Sk.builtin.str.$real=new Sk.builtin.str("real"),Sk.builtin.str.$abs=new Sk.builtin.str("__abs__"),Sk.builtin.str.$bases=new Sk.builtin.str("__bases__"),Sk.builtin.str.$bytes=new Sk.builtin.str("__bytes__"),Sk.builtin.str.$call=new Sk.builtin.str("__call__"),Sk.builtin.str.$class=new Sk.builtin.str("__class__"),Sk.builtin.str.$class_getitem=new Sk.builtin.str("__class_getitem__"),Sk.builtin.str.$cmp=new Sk.builtin.str("__cmp__"),Sk.builtin.str.$complex=new Sk.builtin.str("__complex__"),Sk.builtin.str.$contains=new Sk.builtin.str("__contains__"),Sk.builtin.str.$copy=new Sk.builtin.str("__copy__"),Sk.builtin.str.$dict=new Sk.builtin.str("__dict__"),Sk.builtin.str.$dir=new Sk.builtin.str("__dir__"),Sk.builtin.str.$doc=new Sk.builtin.str("__doc__"),Sk.builtin.str.$enter=new Sk.builtin.str("__enter__"),Sk.builtin.str.$eq=new Sk.builtin.str("__eq__"),Sk.builtin.str.$exit=new Sk.builtin.str("__exit__"),Sk.builtin.str.$index=new Sk.builtin.str("__index__"),Sk.builtin.str.$init=new Sk.builtin.str("__init__"),Sk.builtin.str.$initsubclass=new Sk.builtin.str("__init_subclass__"),Sk.builtin.str.$int_=new Sk.builtin.str("__int__"),Sk.builtin.str.$iter=new Sk.builtin.str("__iter__"),Sk.builtin.str.$file=new Sk.builtin.str("__file__"),Sk.builtin.str.$float_=new Sk.builtin.str("__float__"),Sk.builtin.str.$format=new Sk.builtin.str("__format__"),Sk.builtin.str.$ge=new Sk.builtin.str("__ge__"),Sk.builtin.str.$getattr=new Sk.builtin.str("__getattr__"),Sk.builtin.str.$getattribute=new Sk.builtin.str("__getattribute__"),Sk.builtin.str.$getitem=new Sk.builtin.str("__getitem__"),Sk.builtin.str.$gt=new Sk.builtin.str("__gt__"),Sk.builtin.str.$keys=new Sk.builtin.str("keys"),Sk.builtin.str.$le=new Sk.builtin.str("__le__"),Sk.builtin.str.$len=new Sk.builtin.str("__len__"),Sk.builtin.str.$length_hint=new Sk.builtin.str("__length_hint__"),Sk.builtin.str.$loader=new Sk.builtin.str("__loader__"),Sk.builtin.str.$lt=new Sk.builtin.str("__lt__"),Sk.builtin.str.$module=new Sk.builtin.str("__module__"),Sk.builtin.str.$missing=new Sk.builtin.str("__missing__"),Sk.builtin.str.$name=new Sk.builtin.str("__name__"),Sk.builtin.str.$ne=new Sk.builtin.str("__ne__"),Sk.builtin.str.$new=new Sk.builtin.str("__new__"),Sk.builtin.str.$next=new Sk.builtin.str("__next__"),Sk.builtin.str.$path=new Sk.builtin.str("__path__"),Sk.builtin.str.$prepare=new Sk.builtin.str("__prepare__"),Sk.builtin.str.$qualname=new Sk.builtin.str("__qualname__"),Sk.builtin.str.$repr=new Sk.builtin.str("__repr__"),Sk.builtin.str.$reversed=new Sk.builtin.str("__reversed__"),Sk.builtin.str.$round=new Sk.builtin.str("__round__"),Sk.builtin.str.$setattr=new Sk.builtin.str("__setattr__"),Sk.builtin.str.$setitem=new Sk.builtin.str("__setitem__"),Sk.builtin.str.$slots=new Sk.builtin.str("__slots__"),Sk.builtin.str.$str=new Sk.builtin.str("__str__"),Sk.builtin.str.$setname=new Sk.builtin.str("__set_name__"),Sk.builtin.str.$trunc=new Sk.builtin.str("__trunc__"),Sk.builtin.str.$write=new Sk.builtin.str("write"),Sk.misceval.op2method_={Eq:Sk.builtin.str.$eq,NotEq:Sk.builtin.str.$ne,Gt:Sk.builtin.str.$gt,GtE:Sk.builtin.str.$ge,Lt:Sk.builtin.str.$lt,LtE:Sk.builtin.str.$le}},function(p,g,e){function i(Z,oe,ie,ce,J){this.type=Z,this.string=oe,this.start=ie,this.end=ce,this.line=J}function n(Z){return"("+Array.prototype.slice.call(arguments).join("|")+")"}function r(Z){return n.apply(null,arguments)+"?"}function l(Z,oe){for(var ie=Z.length;ie--;)if(Z[ie]===oe)return!0;return!1}function h(Z){return Z=Z.normalize("NFKC"),ee.test(Z)}function a(){return" FR RF Br BR Fr r B R b bR f rb rB F Rf U rF u RB br fR fr rf Rb".split(" ")}function S(Z){Z?delete Sk.token.EXACT_TOKEN_TYPES["<>"]:Sk.token.EXACT_TOKEN_TYPES["<>"]=Sk.token.tokens.T_NOTEQUAL,x=Object.keys(Sk.token.EXACT_TOKEN_TYPES).sort(),C=n.apply(this,x.reverse().map(function(oe){return oe&&d.test(oe)?oe.replace(o,"\\$&"):oe})),F=n("\\r?\\n",C)}e.r(g),p={Cc:"\\0-\\x1F\\x7F-\\x9F",Cf:"\\xAD\\u0600-\\u0605\\u061C\\u06DD\\u070F\\u08E2\\u180E\\u200B-\\u200F\\u202A-\\u202E\\u2060-\\u2064\\u2066-\\u206F\\uFEFF\\uFFF9-\\uFFFB",Co:"\\uE000-\\uF8FF",Cs:"\\uD800-\\uDFFF",Ll:"a-z\\xB5\\xDF-\\xF6\\xF8-\\xFF\\u0101\\u0103\\u0105\\u0107\\u0109\\u010B\\u010D\\u010F\\u0111\\u0113\\u0115\\u0117\\u0119\\u011B\\u011D\\u011F\\u0121\\u0123\\u0125\\u0127\\u0129\\u012B\\u012D\\u012F\\u0131\\u0133\\u0135\\u0137\\u0138\\u013A\\u013C\\u013E\\u0140\\u0142\\u0144\\u0146\\u0148\\u0149\\u014B\\u014D\\u014F\\u0151\\u0153\\u0155\\u0157\\u0159\\u015B\\u015D\\u015F\\u0161\\u0163\\u0165\\u0167\\u0169\\u016B\\u016D\\u016F\\u0171\\u0173\\u0175\\u0177\\u017A\\u017C\\u017E-\\u0180\\u0183\\u0185\\u0188\\u018C\\u018D\\u0192\\u0195\\u0199-\\u019B\\u019E\\u01A1\\u01A3\\u01A5\\u01A8\\u01AA\\u01AB\\u01AD\\u01B0\\u01B4\\u01B6\\u01B9\\u01BA\\u01BD-\\u01BF\\u01C6\\u01C9\\u01CC\\u01CE\\u01D0\\u01D2\\u01D4\\u01D6\\u01D8\\u01DA\\u01DC\\u01DD\\u01DF\\u01E1\\u01E3\\u01E5\\u01E7\\u01E9\\u01EB\\u01ED\\u01EF\\u01F0\\u01F3\\u01F5\\u01F9\\u01FB\\u01FD\\u01FF\\u0201\\u0203\\u0205\\u0207\\u0209\\u020B\\u020D\\u020F\\u0211\\u0213\\u0215\\u0217\\u0219\\u021B\\u021D\\u021F\\u0221\\u0223\\u0225\\u0227\\u0229\\u022B\\u022D\\u022F\\u0231\\u0233-\\u0239\\u023C\\u023F\\u0240\\u0242\\u0247\\u0249\\u024B\\u024D\\u024F-\\u0293\\u0295-\\u02AF\\u0371\\u0373\\u0377\\u037B-\\u037D\\u0390\\u03AC-\\u03CE\\u03D0\\u03D1\\u03D5-\\u03D7\\u03D9\\u03DB\\u03DD\\u03DF\\u03E1\\u03E3\\u03E5\\u03E7\\u03E9\\u03EB\\u03ED\\u03EF-\\u03F3\\u03F5\\u03F8\\u03FB\\u03FC\\u0430-\\u045F\\u0461\\u0463\\u0465\\u0467\\u0469\\u046B\\u046D\\u046F\\u0471\\u0473\\u0475\\u0477\\u0479\\u047B\\u047D\\u047F\\u0481\\u048B\\u048D\\u048F\\u0491\\u0493\\u0495\\u0497\\u0499\\u049B\\u049D\\u049F\\u04A1\\u04A3\\u04A5\\u04A7\\u04A9\\u04AB\\u04AD\\u04AF\\u04B1\\u04B3\\u04B5\\u04B7\\u04B9\\u04BB\\u04BD\\u04BF\\u04C2\\u04C4\\u04C6\\u04C8\\u04CA\\u04CC\\u04CE\\u04CF\\u04D1\\u04D3\\u04D5\\u04D7\\u04D9\\u04DB\\u04DD\\u04DF\\u04E1\\u04E3\\u04E5\\u04E7\\u04E9\\u04EB\\u04ED\\u04EF\\u04F1\\u04F3\\u04F5\\u04F7\\u04F9\\u04FB\\u04FD\\u04FF\\u0501\\u0503\\u0505\\u0507\\u0509\\u050B\\u050D\\u050F\\u0511\\u0513\\u0515\\u0517\\u0519\\u051B\\u051D\\u051F\\u0521\\u0523\\u0525\\u0527\\u0529\\u052B\\u052D\\u052F\\u0560-\\u0588\\u10D0-\\u10FA\\u10FD-\\u10FF\\u13F8-\\u13FD\\u1C80-\\u1C88\\u1D00-\\u1D2B\\u1D6B-\\u1D77\\u1D79-\\u1D9A\\u1E01\\u1E03\\u1E05\\u1E07\\u1E09\\u1E0B\\u1E0D\\u1E0F\\u1E11\\u1E13\\u1E15\\u1E17\\u1E19\\u1E1B\\u1E1D\\u1E1F\\u1E21\\u1E23\\u1E25\\u1E27\\u1E29\\u1E2B\\u1E2D\\u1E2F\\u1E31\\u1E33\\u1E35\\u1E37\\u1E39\\u1E3B\\u1E3D\\u1E3F\\u1E41\\u1E43\\u1E45\\u1E47\\u1E49\\u1E4B\\u1E4D\\u1E4F\\u1E51\\u1E53\\u1E55\\u1E57\\u1E59\\u1E5B\\u1E5D\\u1E5F\\u1E61\\u1E63\\u1E65\\u1E67\\u1E69\\u1E6B\\u1E6D\\u1E6F\\u1E71\\u1E73\\u1E75\\u1E77\\u1E79\\u1E7B\\u1E7D\\u1E7F\\u1E81\\u1E83\\u1E85\\u1E87\\u1E89\\u1E8B\\u1E8D\\u1E8F\\u1E91\\u1E93\\u1E95-\\u1E9D\\u1E9F\\u1EA1\\u1EA3\\u1EA5\\u1EA7\\u1EA9\\u1EAB\\u1EAD\\u1EAF\\u1EB1\\u1EB3\\u1EB5\\u1EB7\\u1EB9\\u1EBB\\u1EBD\\u1EBF\\u1EC1\\u1EC3\\u1EC5\\u1EC7\\u1EC9\\u1ECB\\u1ECD\\u1ECF\\u1ED1\\u1ED3\\u1ED5\\u1ED7\\u1ED9\\u1EDB\\u1EDD\\u1EDF\\u1EE1\\u1EE3\\u1EE5\\u1EE7\\u1EE9\\u1EEB\\u1EED\\u1EEF\\u1EF1\\u1EF3\\u1EF5\\u1EF7\\u1EF9\\u1EFB\\u1EFD\\u1EFF-\\u1F07\\u1F10-\\u1F15\\u1F20-\\u1F27\\u1F30-\\u1F37\\u1F40-\\u1F45\\u1F50-\\u1F57\\u1F60-\\u1F67\\u1F70-\\u1F7D\\u1F80-\\u1F87\\u1F90-\\u1F97\\u1FA0-\\u1FA7\\u1FB0-\\u1FB4\\u1FB6\\u1FB7\\u1FBE\\u1FC2-\\u1FC4\\u1FC6\\u1FC7\\u1FD0-\\u1FD3\\u1FD6\\u1FD7\\u1FE0-\\u1FE7\\u1FF2-\\u1FF4\\u1FF6\\u1FF7\\u210A\\u210E\\u210F\\u2113\\u212F\\u2134\\u2139\\u213C\\u213D\\u2146-\\u2149\\u214E\\u2184\\u2C30-\\u2C5E\\u2C61\\u2C65\\u2C66\\u2C68\\u2C6A\\u2C6C\\u2C71\\u2C73\\u2C74\\u2C76-\\u2C7B\\u2C81\\u2C83\\u2C85\\u2C87\\u2C89\\u2C8B\\u2C8D\\u2C8F\\u2C91\\u2C93\\u2C95\\u2C97\\u2C99\\u2C9B\\u2C9D\\u2C9F\\u2CA1\\u2CA3\\u2CA5\\u2CA7\\u2CA9\\u2CAB\\u2CAD\\u2CAF\\u2CB1\\u2CB3\\u2CB5\\u2CB7\\u2CB9\\u2CBB\\u2CBD\\u2CBF\\u2CC1\\u2CC3\\u2CC5\\u2CC7\\u2CC9\\u2CCB\\u2CCD\\u2CCF\\u2CD1\\u2CD3\\u2CD5\\u2CD7\\u2CD9\\u2CDB\\u2CDD\\u2CDF\\u2CE1\\u2CE3\\u2CE4\\u2CEC\\u2CEE\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\uA641\\uA643\\uA645\\uA647\\uA649\\uA64B\\uA64D\\uA64F\\uA651\\uA653\\uA655\\uA657\\uA659\\uA65B\\uA65D\\uA65F\\uA661\\uA663\\uA665\\uA667\\uA669\\uA66B\\uA66D\\uA681\\uA683\\uA685\\uA687\\uA689\\uA68B\\uA68D\\uA68F\\uA691\\uA693\\uA695\\uA697\\uA699\\uA69B\\uA723\\uA725\\uA727\\uA729\\uA72B\\uA72D\\uA72F-\\uA731\\uA733\\uA735\\uA737\\uA739\\uA73B\\uA73D\\uA73F\\uA741\\uA743\\uA745\\uA747\\uA749\\uA74B\\uA74D\\uA74F\\uA751\\uA753\\uA755\\uA757\\uA759\\uA75B\\uA75D\\uA75F\\uA761\\uA763\\uA765\\uA767\\uA769\\uA76B\\uA76D\\uA76F\\uA771-\\uA778\\uA77A\\uA77C\\uA77F\\uA781\\uA783\\uA785\\uA787\\uA78C\\uA78E\\uA791\\uA793-\\uA795\\uA797\\uA799\\uA79B\\uA79D\\uA79F\\uA7A1\\uA7A3\\uA7A5\\uA7A7\\uA7A9\\uA7AF\\uA7B5\\uA7B7\\uA7B9\\uA7BB\\uA7BD\\uA7BF\\uA7C3\\uA7C8\\uA7CA\\uA7F6\\uA7FA\\uAB30-\\uAB5A\\uAB60-\\uAB68\\uAB70-\\uABBF\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFF41-\\uFF5A",Lm:"\\u02B0-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0374\\u037A\\u0559\\u0640\\u06E5\\u06E6\\u07F4\\u07F5\\u07FA\\u081A\\u0824\\u0828\\u0971\\u0E46\\u0EC6\\u10FC\\u17D7\\u1843\\u1AA7\\u1C78-\\u1C7D\\u1D2C-\\u1D6A\\u1D78\\u1D9B-\\u1DBF\\u2071\\u207F\\u2090-\\u209C\\u2C7C\\u2C7D\\u2D6F\\u2E2F\\u3005\\u3031-\\u3035\\u303B\\u309D\\u309E\\u30FC-\\u30FE\\uA015\\uA4F8-\\uA4FD\\uA60C\\uA67F\\uA69C\\uA69D\\uA717-\\uA71F\\uA770\\uA788\\uA7F8\\uA7F9\\uA9CF\\uA9E6\\uAA70\\uAADD\\uAAF3\\uAAF4\\uAB5C-\\uAB5F\\uAB69\\uFF70\\uFF9E\\uFF9F",Lo:"\\xAA\\xBA\\u01BB\\u01C0-\\u01C3\\u0294\\u05D0-\\u05EA\\u05EF-\\u05F2\\u0620-\\u063F\\u0641-\\u064A\\u066E\\u066F\\u0671-\\u06D3\\u06D5\\u06EE\\u06EF\\u06FA-\\u06FC\\u06FF\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07CA-\\u07EA\\u0800-\\u0815\\u0840-\\u0858\\u0860-\\u086A\\u08A0-\\u08B4\\u08B6-\\u08C7\\u0904-\\u0939\\u093D\\u0950\\u0958-\\u0961\\u0972-\\u0980\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BD\\u09CE\\u09DC\\u09DD\\u09DF-\\u09E1\\u09F0\\u09F1\\u09FC\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A59-\\u0A5C\\u0A5E\\u0A72-\\u0A74\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABD\\u0AD0\\u0AE0\\u0AE1\\u0AF9\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3D\\u0B5C\\u0B5D\\u0B5F-\\u0B61\\u0B71\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BD0\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C39\\u0C3D\\u0C58-\\u0C5A\\u0C60\\u0C61\\u0C80\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBD\\u0CDE\\u0CE0\\u0CE1\\u0CF1\\u0CF2\\u0D04-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D3A\\u0D3D\\u0D4E\\u0D54-\\u0D56\\u0D5F-\\u0D61\\u0D7A-\\u0D7F\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0E01-\\u0E30\\u0E32\\u0E33\\u0E40-\\u0E45\\u0E81\\u0E82\\u0E84\\u0E86-\\u0E8A\\u0E8C-\\u0EA3\\u0EA5\\u0EA7-\\u0EB0\\u0EB2\\u0EB3\\u0EBD\\u0EC0-\\u0EC4\\u0EDC-\\u0EDF\\u0F00\\u0F40-\\u0F47\\u0F49-\\u0F6C\\u0F88-\\u0F8C\\u1000-\\u102A\\u103F\\u1050-\\u1055\\u105A-\\u105D\\u1061\\u1065\\u1066\\u106E-\\u1070\\u1075-\\u1081\\u108E\\u1100-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u1380-\\u138F\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16F1-\\u16F8\\u1700-\\u170C\\u170E-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17DC\\u1820-\\u1842\\u1844-\\u1878\\u1880-\\u1884\\u1887-\\u18A8\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1950-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19B0-\\u19C9\\u1A00-\\u1A16\\u1A20-\\u1A54\\u1B05-\\u1B33\\u1B45-\\u1B4B\\u1B83-\\u1BA0\\u1BAE\\u1BAF\\u1BBA-\\u1BE5\\u1C00-\\u1C23\\u1C4D-\\u1C4F\\u1C5A-\\u1C77\\u1CE9-\\u1CEC\\u1CEE-\\u1CF3\\u1CF5\\u1CF6\\u1CFA\\u2135-\\u2138\\u2D30-\\u2D67\\u2D80-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u3006\\u303C\\u3041-\\u3096\\u309F\\u30A1-\\u30FA\\u30FF\\u3105-\\u312F\\u3131-\\u318E\\u31A0-\\u31BF\\u31F0-\\u31FF\\u3400-\\u4DBF\\u4E00-\\u9FFC\\uA000-\\uA014\\uA016-\\uA48C\\uA4D0-\\uA4F7\\uA500-\\uA60B\\uA610-\\uA61F\\uA62A\\uA62B\\uA66E\\uA6A0-\\uA6E5\\uA78F\\uA7F7\\uA7FB-\\uA801\\uA803-\\uA805\\uA807-\\uA80A\\uA80C-\\uA822\\uA840-\\uA873\\uA882-\\uA8B3\\uA8F2-\\uA8F7\\uA8FB\\uA8FD\\uA8FE\\uA90A-\\uA925\\uA930-\\uA946\\uA960-\\uA97C\\uA984-\\uA9B2\\uA9E0-\\uA9E4\\uA9E7-\\uA9EF\\uA9FA-\\uA9FE\\uAA00-\\uAA28\\uAA40-\\uAA42\\uAA44-\\uAA4B\\uAA60-\\uAA6F\\uAA71-\\uAA76\\uAA7A\\uAA7E-\\uAAAF\\uAAB1\\uAAB5\\uAAB6\\uAAB9-\\uAABD\\uAAC0\\uAAC2\\uAADB\\uAADC\\uAAE0-\\uAAEA\\uAAF2\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uABC0-\\uABE2\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB1D\\uFB1F-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF66-\\uFF6F\\uFF71-\\uFF9D\\uFFA0-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC",Lt:"\\u01C5\\u01C8\\u01CB\\u01F2\\u1F88-\\u1F8F\\u1F98-\\u1F9F\\u1FA8-\\u1FAF\\u1FBC\\u1FCC\\u1FFC",Lu:"A-Z\\xC0-\\xD6\\xD8-\\xDE\\u0100\\u0102\\u0104\\u0106\\u0108\\u010A\\u010C\\u010E\\u0110\\u0112\\u0114\\u0116\\u0118\\u011A\\u011C\\u011E\\u0120\\u0122\\u0124\\u0126\\u0128\\u012A\\u012C\\u012E\\u0130\\u0132\\u0134\\u0136\\u0139\\u013B\\u013D\\u013F\\u0141\\u0143\\u0145\\u0147\\u014A\\u014C\\u014E\\u0150\\u0152\\u0154\\u0156\\u0158\\u015A\\u015C\\u015E\\u0160\\u0162\\u0164\\u0166\\u0168\\u016A\\u016C\\u016E\\u0170\\u0172\\u0174\\u0176\\u0178\\u0179\\u017B\\u017D\\u0181\\u0182\\u0184\\u0186\\u0187\\u0189-\\u018B\\u018E-\\u0191\\u0193\\u0194\\u0196-\\u0198\\u019C\\u019D\\u019F\\u01A0\\u01A2\\u01A4\\u01A6\\u01A7\\u01A9\\u01AC\\u01AE\\u01AF\\u01B1-\\u01B3\\u01B5\\u01B7\\u01B8\\u01BC\\u01C4\\u01C7\\u01CA\\u01CD\\u01CF\\u01D1\\u01D3\\u01D5\\u01D7\\u01D9\\u01DB\\u01DE\\u01E0\\u01E2\\u01E4\\u01E6\\u01E8\\u01EA\\u01EC\\u01EE\\u01F1\\u01F4\\u01F6-\\u01F8\\u01FA\\u01FC\\u01FE\\u0200\\u0202\\u0204\\u0206\\u0208\\u020A\\u020C\\u020E\\u0210\\u0212\\u0214\\u0216\\u0218\\u021A\\u021C\\u021E\\u0220\\u0222\\u0224\\u0226\\u0228\\u022A\\u022C\\u022E\\u0230\\u0232\\u023A\\u023B\\u023D\\u023E\\u0241\\u0243-\\u0246\\u0248\\u024A\\u024C\\u024E\\u0370\\u0372\\u0376\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E\\u038F\\u0391-\\u03A1\\u03A3-\\u03AB\\u03CF\\u03D2-\\u03D4\\u03D8\\u03DA\\u03DC\\u03DE\\u03E0\\u03E2\\u03E4\\u03E6\\u03E8\\u03EA\\u03EC\\u03EE\\u03F4\\u03F7\\u03F9\\u03FA\\u03FD-\\u042F\\u0460\\u0462\\u0464\\u0466\\u0468\\u046A\\u046C\\u046E\\u0470\\u0472\\u0474\\u0476\\u0478\\u047A\\u047C\\u047E\\u0480\\u048A\\u048C\\u048E\\u0490\\u0492\\u0494\\u0496\\u0498\\u049A\\u049C\\u049E\\u04A0\\u04A2\\u04A4\\u04A6\\u04A8\\u04AA\\u04AC\\u04AE\\u04B0\\u04B2\\u04B4\\u04B6\\u04B8\\u04BA\\u04BC\\u04BE\\u04C0\\u04C1\\u04C3\\u04C5\\u04C7\\u04C9\\u04CB\\u04CD\\u04D0\\u04D2\\u04D4\\u04D6\\u04D8\\u04DA\\u04DC\\u04DE\\u04E0\\u04E2\\u04E4\\u04E6\\u04E8\\u04EA\\u04EC\\u04EE\\u04F0\\u04F2\\u04F4\\u04F6\\u04F8\\u04FA\\u04FC\\u04FE\\u0500\\u0502\\u0504\\u0506\\u0508\\u050A\\u050C\\u050E\\u0510\\u0512\\u0514\\u0516\\u0518\\u051A\\u051C\\u051E\\u0520\\u0522\\u0524\\u0526\\u0528\\u052A\\u052C\\u052E\\u0531-\\u0556\\u10A0-\\u10C5\\u10C7\\u10CD\\u13A0-\\u13F5\\u1C90-\\u1CBA\\u1CBD-\\u1CBF\\u1E00\\u1E02\\u1E04\\u1E06\\u1E08\\u1E0A\\u1E0C\\u1E0E\\u1E10\\u1E12\\u1E14\\u1E16\\u1E18\\u1E1A\\u1E1C\\u1E1E\\u1E20\\u1E22\\u1E24\\u1E26\\u1E28\\u1E2A\\u1E2C\\u1E2E\\u1E30\\u1E32\\u1E34\\u1E36\\u1E38\\u1E3A\\u1E3C\\u1E3E\\u1E40\\u1E42\\u1E44\\u1E46\\u1E48\\u1E4A\\u1E4C\\u1E4E\\u1E50\\u1E52\\u1E54\\u1E56\\u1E58\\u1E5A\\u1E5C\\u1E5E\\u1E60\\u1E62\\u1E64\\u1E66\\u1E68\\u1E6A\\u1E6C\\u1E6E\\u1E70\\u1E72\\u1E74\\u1E76\\u1E78\\u1E7A\\u1E7C\\u1E7E\\u1E80\\u1E82\\u1E84\\u1E86\\u1E88\\u1E8A\\u1E8C\\u1E8E\\u1E90\\u1E92\\u1E94\\u1E9E\\u1EA0\\u1EA2\\u1EA4\\u1EA6\\u1EA8\\u1EAA\\u1EAC\\u1EAE\\u1EB0\\u1EB2\\u1EB4\\u1EB6\\u1EB8\\u1EBA\\u1EBC\\u1EBE\\u1EC0\\u1EC2\\u1EC4\\u1EC6\\u1EC8\\u1ECA\\u1ECC\\u1ECE\\u1ED0\\u1ED2\\u1ED4\\u1ED6\\u1ED8\\u1EDA\\u1EDC\\u1EDE\\u1EE0\\u1EE2\\u1EE4\\u1EE6\\u1EE8\\u1EEA\\u1EEC\\u1EEE\\u1EF0\\u1EF2\\u1EF4\\u1EF6\\u1EF8\\u1EFA\\u1EFC\\u1EFE\\u1F08-\\u1F0F\\u1F18-\\u1F1D\\u1F28-\\u1F2F\\u1F38-\\u1F3F\\u1F48-\\u1F4D\\u1F59\\u1F5B\\u1F5D\\u1F5F\\u1F68-\\u1F6F\\u1FB8-\\u1FBB\\u1FC8-\\u1FCB\\u1FD8-\\u1FDB\\u1FE8-\\u1FEC\\u1FF8-\\u1FFB\\u2102\\u2107\\u210B-\\u210D\\u2110-\\u2112\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u2130-\\u2133\\u213E\\u213F\\u2145\\u2183\\u2C00-\\u2C2E\\u2C60\\u2C62-\\u2C64\\u2C67\\u2C69\\u2C6B\\u2C6D-\\u2C70\\u2C72\\u2C75\\u2C7E-\\u2C80\\u2C82\\u2C84\\u2C86\\u2C88\\u2C8A\\u2C8C\\u2C8E\\u2C90\\u2C92\\u2C94\\u2C96\\u2C98\\u2C9A\\u2C9C\\u2C9E\\u2CA0\\u2CA2\\u2CA4\\u2CA6\\u2CA8\\u2CAA\\u2CAC\\u2CAE\\u2CB0\\u2CB2\\u2CB4\\u2CB6\\u2CB8\\u2CBA\\u2CBC\\u2CBE\\u2CC0\\u2CC2\\u2CC4\\u2CC6\\u2CC8\\u2CCA\\u2CCC\\u2CCE\\u2CD0\\u2CD2\\u2CD4\\u2CD6\\u2CD8\\u2CDA\\u2CDC\\u2CDE\\u2CE0\\u2CE2\\u2CEB\\u2CED\\u2CF2\\uA640\\uA642\\uA644\\uA646\\uA648\\uA64A\\uA64C\\uA64E\\uA650\\uA652\\uA654\\uA656\\uA658\\uA65A\\uA65C\\uA65E\\uA660\\uA662\\uA664\\uA666\\uA668\\uA66A\\uA66C\\uA680\\uA682\\uA684\\uA686\\uA688\\uA68A\\uA68C\\uA68E\\uA690\\uA692\\uA694\\uA696\\uA698\\uA69A\\uA722\\uA724\\uA726\\uA728\\uA72A\\uA72C\\uA72E\\uA732\\uA734\\uA736\\uA738\\uA73A\\uA73C\\uA73E\\uA740\\uA742\\uA744\\uA746\\uA748\\uA74A\\uA74C\\uA74E\\uA750\\uA752\\uA754\\uA756\\uA758\\uA75A\\uA75C\\uA75E\\uA760\\uA762\\uA764\\uA766\\uA768\\uA76A\\uA76C\\uA76E\\uA779\\uA77B\\uA77D\\uA77E\\uA780\\uA782\\uA784\\uA786\\uA78B\\uA78D\\uA790\\uA792\\uA796\\uA798\\uA79A\\uA79C\\uA79E\\uA7A0\\uA7A2\\uA7A4\\uA7A6\\uA7A8\\uA7AA-\\uA7AE\\uA7B0-\\uA7B4\\uA7B6\\uA7B8\\uA7BA\\uA7BC\\uA7BE\\uA7C2\\uA7C4-\\uA7C7\\uA7C9\\uA7F5\\uFF21-\\uFF3A",M:"\\u0300-\\u036F\\u0483-\\u0489\\u0591-\\u05BD\\u05BF\\u05C1\\u05C2\\u05C4\\u05C5\\u05C7\\u0610-\\u061A\\u064B-\\u065F\\u0670\\u06D6-\\u06DC\\u06DF-\\u06E4\\u06E7\\u06E8\\u06EA-\\u06ED\\u0711\\u0730-\\u074A\\u07A6-\\u07B0\\u07EB-\\u07F3\\u07FD\\u0816-\\u0819\\u081B-\\u0823\\u0825-\\u0827\\u0829-\\u082D\\u0859-\\u085B\\u08D3-\\u08E1\\u08E3-\\u0903\\u093A-\\u093C\\u093E-\\u094F\\u0951-\\u0957\\u0962\\u0963\\u0981-\\u0983\\u09BC\\u09BE-\\u09C4\\u09C7\\u09C8\\u09CB-\\u09CD\\u09D7\\u09E2\\u09E3\\u09FE\\u0A01-\\u0A03\\u0A3C\\u0A3E-\\u0A42\\u0A47\\u0A48\\u0A4B-\\u0A4D\\u0A51\\u0A70\\u0A71\\u0A75\\u0A81-\\u0A83\\u0ABC\\u0ABE-\\u0AC5\\u0AC7-\\u0AC9\\u0ACB-\\u0ACD\\u0AE2\\u0AE3\\u0AFA-\\u0AFF\\u0B01-\\u0B03\\u0B3C\\u0B3E-\\u0B44\\u0B47\\u0B48\\u0B4B-\\u0B4D\\u0B55-\\u0B57\\u0B62\\u0B63\\u0B82\\u0BBE-\\u0BC2\\u0BC6-\\u0BC8\\u0BCA-\\u0BCD\\u0BD7\\u0C00-\\u0C04\\u0C3E-\\u0C44\\u0C46-\\u0C48\\u0C4A-\\u0C4D\\u0C55\\u0C56\\u0C62\\u0C63\\u0C81-\\u0C83\\u0CBC\\u0CBE-\\u0CC4\\u0CC6-\\u0CC8\\u0CCA-\\u0CCD\\u0CD5\\u0CD6\\u0CE2\\u0CE3\\u0D00-\\u0D03\\u0D3B\\u0D3C\\u0D3E-\\u0D44\\u0D46-\\u0D48\\u0D4A-\\u0D4D\\u0D57\\u0D62\\u0D63\\u0D81-\\u0D83\\u0DCA\\u0DCF-\\u0DD4\\u0DD6\\u0DD8-\\u0DDF\\u0DF2\\u0DF3\\u0E31\\u0E34-\\u0E3A\\u0E47-\\u0E4E\\u0EB1\\u0EB4-\\u0EBC\\u0EC8-\\u0ECD\\u0F18\\u0F19\\u0F35\\u0F37\\u0F39\\u0F3E\\u0F3F\\u0F71-\\u0F84\\u0F86\\u0F87\\u0F8D-\\u0F97\\u0F99-\\u0FBC\\u0FC6\\u102B-\\u103E\\u1056-\\u1059\\u105E-\\u1060\\u1062-\\u1064\\u1067-\\u106D\\u1071-\\u1074\\u1082-\\u108D\\u108F\\u109A-\\u109D\\u135D-\\u135F\\u1712-\\u1714\\u1732-\\u1734\\u1752\\u1753\\u1772\\u1773\\u17B4-\\u17D3\\u17DD\\u180B-\\u180D\\u1885\\u1886\\u18A9\\u1920-\\u192B\\u1930-\\u193B\\u1A17-\\u1A1B\\u1A55-\\u1A5E\\u1A60-\\u1A7C\\u1A7F\\u1AB0-\\u1AC0\\u1B00-\\u1B04\\u1B34-\\u1B44\\u1B6B-\\u1B73\\u1B80-\\u1B82\\u1BA1-\\u1BAD\\u1BE6-\\u1BF3\\u1C24-\\u1C37\\u1CD0-\\u1CD2\\u1CD4-\\u1CE8\\u1CED\\u1CF4\\u1CF7-\\u1CF9\\u1DC0-\\u1DF9\\u1DFB-\\u1DFF\\u20D0-\\u20F0\\u2CEF-\\u2CF1\\u2D7F\\u2DE0-\\u2DFF\\u302A-\\u302F\\u3099\\u309A\\uA66F-\\uA672\\uA674-\\uA67D\\uA69E\\uA69F\\uA6F0\\uA6F1\\uA802\\uA806\\uA80B\\uA823-\\uA827\\uA82C\\uA880\\uA881\\uA8B4-\\uA8C5\\uA8E0-\\uA8F1\\uA8FF\\uA926-\\uA92D\\uA947-\\uA953\\uA980-\\uA983\\uA9B3-\\uA9C0\\uA9E5\\uAA29-\\uAA36\\uAA43\\uAA4C\\uAA4D\\uAA7B-\\uAA7D\\uAAB0\\uAAB2-\\uAAB4\\uAAB7\\uAAB8\\uAABE\\uAABF\\uAAC1\\uAAEB-\\uAAEF\\uAAF5\\uAAF6\\uABE3-\\uABEA\\uABEC\\uABED\\uFB1E\\uFE00-\\uFE0F\\uFE20-\\uFE2F",Mc:"\\u0903\\u093B\\u093E-\\u0940\\u0949-\\u094C\\u094E\\u094F\\u0982\\u0983\\u09BE-\\u09C0\\u09C7\\u09C8\\u09CB\\u09CC\\u09D7\\u0A03\\u0A3E-\\u0A40\\u0A83\\u0ABE-\\u0AC0\\u0AC9\\u0ACB\\u0ACC\\u0B02\\u0B03\\u0B3E\\u0B40\\u0B47\\u0B48\\u0B4B\\u0B4C\\u0B57\\u0BBE\\u0BBF\\u0BC1\\u0BC2\\u0BC6-\\u0BC8\\u0BCA-\\u0BCC\\u0BD7\\u0C01-\\u0C03\\u0C41-\\u0C44\\u0C82\\u0C83\\u0CBE\\u0CC0-\\u0CC4\\u0CC7\\u0CC8\\u0CCA\\u0CCB\\u0CD5\\u0CD6\\u0D02\\u0D03\\u0D3E-\\u0D40\\u0D46-\\u0D48\\u0D4A-\\u0D4C\\u0D57\\u0D82\\u0D83\\u0DCF-\\u0DD1\\u0DD8-\\u0DDF\\u0DF2\\u0DF3\\u0F3E\\u0F3F\\u0F7F\\u102B\\u102C\\u1031\\u1038\\u103B\\u103C\\u1056\\u1057\\u1062-\\u1064\\u1067-\\u106D\\u1083\\u1084\\u1087-\\u108C\\u108F\\u109A-\\u109C\\u17B6\\u17BE-\\u17C5\\u17C7\\u17C8\\u1923-\\u1926\\u1929-\\u192B\\u1930\\u1931\\u1933-\\u1938\\u1A19\\u1A1A\\u1A55\\u1A57\\u1A61\\u1A63\\u1A64\\u1A6D-\\u1A72\\u1B04\\u1B35\\u1B3B\\u1B3D-\\u1B41\\u1B43\\u1B44\\u1B82\\u1BA1\\u1BA6\\u1BA7\\u1BAA\\u1BE7\\u1BEA-\\u1BEC\\u1BEE\\u1BF2\\u1BF3\\u1C24-\\u1C2B\\u1C34\\u1C35\\u1CE1\\u1CF7\\u302E\\u302F\\uA823\\uA824\\uA827\\uA880\\uA881\\uA8B4-\\uA8C3\\uA952\\uA953\\uA983\\uA9B4\\uA9B5\\uA9BA\\uA9BB\\uA9BE-\\uA9C0\\uAA2F\\uAA30\\uAA33\\uAA34\\uAA4D\\uAA7B\\uAA7D\\uAAEB\\uAAEE\\uAAEF\\uAAF5\\uABE3\\uABE4\\uABE6\\uABE7\\uABE9\\uABEA\\uABEC",Me:"\\u0488\\u0489\\u1ABE\\u20DD-\\u20E0\\u20E2-\\u20E4\\uA670-\\uA672",Mn:"\\u0300-\\u036F\\u0483-\\u0487\\u0591-\\u05BD\\u05BF\\u05C1\\u05C2\\u05C4\\u05C5\\u05C7\\u0610-\\u061A\\u064B-\\u065F\\u0670\\u06D6-\\u06DC\\u06DF-\\u06E4\\u06E7\\u06E8\\u06EA-\\u06ED\\u0711\\u0730-\\u074A\\u07A6-\\u07B0\\u07EB-\\u07F3\\u07FD\\u0816-\\u0819\\u081B-\\u0823\\u0825-\\u0827\\u0829-\\u082D\\u0859-\\u085B\\u08D3-\\u08E1\\u08E3-\\u0902\\u093A\\u093C\\u0941-\\u0948\\u094D\\u0951-\\u0957\\u0962\\u0963\\u0981\\u09BC\\u09C1-\\u09C4\\u09CD\\u09E2\\u09E3\\u09FE\\u0A01\\u0A02\\u0A3C\\u0A41\\u0A42\\u0A47\\u0A48\\u0A4B-\\u0A4D\\u0A51\\u0A70\\u0A71\\u0A75\\u0A81\\u0A82\\u0ABC\\u0AC1-\\u0AC5\\u0AC7\\u0AC8\\u0ACD\\u0AE2\\u0AE3\\u0AFA-\\u0AFF\\u0B01\\u0B3C\\u0B3F\\u0B41-\\u0B44\\u0B4D\\u0B55\\u0B56\\u0B62\\u0B63\\u0B82\\u0BC0\\u0BCD\\u0C00\\u0C04\\u0C3E-\\u0C40\\u0C46-\\u0C48\\u0C4A-\\u0C4D\\u0C55\\u0C56\\u0C62\\u0C63\\u0C81\\u0CBC\\u0CBF\\u0CC6\\u0CCC\\u0CCD\\u0CE2\\u0CE3\\u0D00\\u0D01\\u0D3B\\u0D3C\\u0D41-\\u0D44\\u0D4D\\u0D62\\u0D63\\u0D81\\u0DCA\\u0DD2-\\u0DD4\\u0DD6\\u0E31\\u0E34-\\u0E3A\\u0E47-\\u0E4E\\u0EB1\\u0EB4-\\u0EBC\\u0EC8-\\u0ECD\\u0F18\\u0F19\\u0F35\\u0F37\\u0F39\\u0F71-\\u0F7E\\u0F80-\\u0F84\\u0F86\\u0F87\\u0F8D-\\u0F97\\u0F99-\\u0FBC\\u0FC6\\u102D-\\u1030\\u1032-\\u1037\\u1039\\u103A\\u103D\\u103E\\u1058\\u1059\\u105E-\\u1060\\u1071-\\u1074\\u1082\\u1085\\u1086\\u108D\\u109D\\u135D-\\u135F\\u1712-\\u1714\\u1732-\\u1734\\u1752\\u1753\\u1772\\u1773\\u17B4\\u17B5\\u17B7-\\u17BD\\u17C6\\u17C9-\\u17D3\\u17DD\\u180B-\\u180D\\u1885\\u1886\\u18A9\\u1920-\\u1922\\u1927\\u1928\\u1932\\u1939-\\u193B\\u1A17\\u1A18\\u1A1B\\u1A56\\u1A58-\\u1A5E\\u1A60\\u1A62\\u1A65-\\u1A6C\\u1A73-\\u1A7C\\u1A7F\\u1AB0-\\u1ABD\\u1ABF\\u1AC0\\u1B00-\\u1B03\\u1B34\\u1B36-\\u1B3A\\u1B3C\\u1B42\\u1B6B-\\u1B73\\u1B80\\u1B81\\u1BA2-\\u1BA5\\u1BA8\\u1BA9\\u1BAB-\\u1BAD\\u1BE6\\u1BE8\\u1BE9\\u1BED\\u1BEF-\\u1BF1\\u1C2C-\\u1C33\\u1C36\\u1C37\\u1CD0-\\u1CD2\\u1CD4-\\u1CE0\\u1CE2-\\u1CE8\\u1CED\\u1CF4\\u1CF8\\u1CF9\\u1DC0-\\u1DF9\\u1DFB-\\u1DFF\\u20D0-\\u20DC\\u20E1\\u20E5-\\u20F0\\u2CEF-\\u2CF1\\u2D7F\\u2DE0-\\u2DFF\\u302A-\\u302D\\u3099\\u309A\\uA66F\\uA674-\\uA67D\\uA69E\\uA69F\\uA6F0\\uA6F1\\uA802\\uA806\\uA80B\\uA825\\uA826\\uA82C\\uA8C4\\uA8C5\\uA8E0-\\uA8F1\\uA8FF\\uA926-\\uA92D\\uA947-\\uA951\\uA980-\\uA982\\uA9B3\\uA9B6-\\uA9B9\\uA9BC\\uA9BD\\uA9E5\\uAA29-\\uAA2E\\uAA31\\uAA32\\uAA35\\uAA36\\uAA43\\uAA4C\\uAA7C\\uAAB0\\uAAB2-\\uAAB4\\uAAB7\\uAAB8\\uAABE\\uAABF\\uAAC1\\uAAEC\\uAAED\\uAAF6\\uABE5\\uABE8\\uABED\\uFB1E\\uFE00-\\uFE0F\\uFE20-\\uFE2F",Nd:"0-9\\u0660-\\u0669\\u06F0-\\u06F9\\u07C0-\\u07C9\\u0966-\\u096F\\u09E6-\\u09EF\\u0A66-\\u0A6F\\u0AE6-\\u0AEF\\u0B66-\\u0B6F\\u0BE6-\\u0BEF\\u0C66-\\u0C6F\\u0CE6-\\u0CEF\\u0D66-\\u0D6F\\u0DE6-\\u0DEF\\u0E50-\\u0E59\\u0ED0-\\u0ED9\\u0F20-\\u0F29\\u1040-\\u1049\\u1090-\\u1099\\u17E0-\\u17E9\\u1810-\\u1819\\u1946-\\u194F\\u19D0-\\u19D9\\u1A80-\\u1A89\\u1A90-\\u1A99\\u1B50-\\u1B59\\u1BB0-\\u1BB9\\u1C40-\\u1C49\\u1C50-\\u1C59\\uA620-\\uA629\\uA8D0-\\uA8D9\\uA900-\\uA909\\uA9D0-\\uA9D9\\uA9F0-\\uA9F9\\uAA50-\\uAA59\\uABF0-\\uABF9\\uFF10-\\uFF19",Nl:"\\u16EE-\\u16F0\\u2160-\\u2182\\u2185-\\u2188\\u3007\\u3021-\\u3029\\u3038-\\u303A\\uA6E6-\\uA6EF",No:"\\xB2\\xB3\\xB9\\xBC-\\xBE\\u09F4-\\u09F9\\u0B72-\\u0B77\\u0BF0-\\u0BF2\\u0C78-\\u0C7E\\u0D58-\\u0D5E\\u0D70-\\u0D78\\u0F2A-\\u0F33\\u1369-\\u137C\\u17F0-\\u17F9\\u19DA\\u2070\\u2074-\\u2079\\u2080-\\u2089\\u2150-\\u215F\\u2189\\u2460-\\u249B\\u24EA-\\u24FF\\u2776-\\u2793\\u2CFD\\u3192-\\u3195\\u3220-\\u3229\\u3248-\\u324F\\u3251-\\u325F\\u3280-\\u3289\\u32B1-\\u32BF\\uA830-\\uA835",Pc:"_\\u203F\\u2040\\u2054\\uFE33\\uFE34\\uFE4D-\\uFE4F\\uFF3F",Pd:"\\-\\u058A\\u05BE\\u1400\\u1806\\u2010-\\u2015\\u2E17\\u2E1A\\u2E3A\\u2E3B\\u2E40\\u301C\\u3030\\u30A0\\uFE31\\uFE32\\uFE58\\uFE63\\uFF0D",Pe:"\\)\\]\\}\\u0F3B\\u0F3D\\u169C\\u2046\\u207E\\u208E\\u2309\\u230B\\u232A\\u2769\\u276B\\u276D\\u276F\\u2771\\u2773\\u2775\\u27C6\\u27E7\\u27E9\\u27EB\\u27ED\\u27EF\\u2984\\u2986\\u2988\\u298A\\u298C\\u298E\\u2990\\u2992\\u2994\\u2996\\u2998\\u29D9\\u29DB\\u29FD\\u2E23\\u2E25\\u2E27\\u2E29\\u3009\\u300B\\u300D\\u300F\\u3011\\u3015\\u3017\\u3019\\u301B\\u301E\\u301F\\uFD3E\\uFE18\\uFE36\\uFE38\\uFE3A\\uFE3C\\uFE3E\\uFE40\\uFE42\\uFE44\\uFE48\\uFE5A\\uFE5C\\uFE5E\\uFF09\\uFF3D\\uFF5D\\uFF60\\uFF63",Pf:"\\xBB\\u2019\\u201D\\u203A\\u2E03\\u2E05\\u2E0A\\u2E0D\\u2E1D\\u2E21",Pi:"\\xAB\\u2018\\u201B\\u201C\\u201F\\u2039\\u2E02\\u2E04\\u2E09\\u2E0C\\u2E1C\\u2E20",Po:"!-#%-'\\*,\\.\\/:;\\?@\\xA1\\xA7\\xB6\\xB7\\xBF\\u037E\\u0387\\u055A-\\u055F\\u0589\\u05C0\\u05C3\\u05C6\\u05F3\\u05F4\\u0609\\u060A\\u060C\\u060D\\u061B\\u061E\\u061F\\u066A-\\u066D\\u06D4\\u0700-\\u070D\\u07F7-\\u07F9\\u0830-\\u083E\\u085E\\u0964\\u0965\\u0970\\u09FD\\u0A76\\u0AF0\\u0C77\\u0C84\\u0DF4\\u0E4F\\u0E5A\\u0E5B\\u0F04-\\u0F12\\u0F14\\u0F85\\u0FD0-\\u0FD4\\u0FD9\\u0FDA\\u104A-\\u104F\\u10FB\\u1360-\\u1368\\u166E\\u16EB-\\u16ED\\u1735\\u1736\\u17D4-\\u17D6\\u17D8-\\u17DA\\u1800-\\u1805\\u1807-\\u180A\\u1944\\u1945\\u1A1E\\u1A1F\\u1AA0-\\u1AA6\\u1AA8-\\u1AAD\\u1B5A-\\u1B60\\u1BFC-\\u1BFF\\u1C3B-\\u1C3F\\u1C7E\\u1C7F\\u1CC0-\\u1CC7\\u1CD3\\u2016\\u2017\\u2020-\\u2027\\u2030-\\u2038\\u203B-\\u203E\\u2041-\\u2043\\u2047-\\u2051\\u2053\\u2055-\\u205E\\u2CF9-\\u2CFC\\u2CFE\\u2CFF\\u2D70\\u2E00\\u2E01\\u2E06-\\u2E08\\u2E0B\\u2E0E-\\u2E16\\u2E18\\u2E19\\u2E1B\\u2E1E\\u2E1F\\u2E2A-\\u2E2E\\u2E30-\\u2E39\\u2E3C-\\u2E3F\\u2E41\\u2E43-\\u2E4F\\u2E52\\u3001-\\u3003\\u303D\\u30FB\\uA4FE\\uA4FF\\uA60D-\\uA60F\\uA673\\uA67E\\uA6F2-\\uA6F7\\uA874-\\uA877\\uA8CE\\uA8CF\\uA8F8-\\uA8FA\\uA8FC\\uA92E\\uA92F\\uA95F\\uA9C1-\\uA9CD\\uA9DE\\uA9DF\\uAA5C-\\uAA5F\\uAADE\\uAADF\\uAAF0\\uAAF1\\uABEB\\uFE10-\\uFE16\\uFE19\\uFE30\\uFE45\\uFE46\\uFE49-\\uFE4C\\uFE50-\\uFE52\\uFE54-\\uFE57\\uFE5F-\\uFE61\\uFE68\\uFE6A\\uFE6B\\uFF01-\\uFF03\\uFF05-\\uFF07\\uFF0A\\uFF0C\\uFF0E\\uFF0F\\uFF1A\\uFF1B\\uFF1F\\uFF20\\uFF3C\\uFF61\\uFF64\\uFF65",Ps:"\\(\\[\\{\\u0F3A\\u0F3C\\u169B\\u201A\\u201E\\u2045\\u207D\\u208D\\u2308\\u230A\\u2329\\u2768\\u276A\\u276C\\u276E\\u2770\\u2772\\u2774\\u27C5\\u27E6\\u27E8\\u27EA\\u27EC\\u27EE\\u2983\\u2985\\u2987\\u2989\\u298B\\u298D\\u298F\\u2991\\u2993\\u2995\\u2997\\u29D8\\u29DA\\u29FC\\u2E22\\u2E24\\u2E26\\u2E28\\u2E42\\u3008\\u300A\\u300C\\u300E\\u3010\\u3014\\u3016\\u3018\\u301A\\u301D\\uFD3F\\uFE17\\uFE35\\uFE37\\uFE39\\uFE3B\\uFE3D\\uFE3F\\uFE41\\uFE43\\uFE47\\uFE59\\uFE5B\\uFE5D\\uFF08\\uFF3B\\uFF5B\\uFF5F\\uFF62",Sc:"\\$\\xA2-\\xA5\\u058F\\u060B\\u07FE\\u07FF\\u09F2\\u09F3\\u09FB\\u0AF1\\u0BF9\\u0E3F\\u17DB\\u20A0-\\u20BF\\uA838\\uFDFC\\uFE69\\uFF04\\uFFE0\\uFFE1\\uFFE5\\uFFE6",Sk:"\\^`\\xA8\\xAF\\xB4\\xB8\\u02C2-\\u02C5\\u02D2-\\u02DF\\u02E5-\\u02EB\\u02ED\\u02EF-\\u02FF\\u0375\\u0384\\u0385\\u1FBD\\u1FBF-\\u1FC1\\u1FCD-\\u1FCF\\u1FDD-\\u1FDF\\u1FED-\\u1FEF\\u1FFD\\u1FFE\\u309B\\u309C\\uA700-\\uA716\\uA720\\uA721\\uA789\\uA78A\\uAB5B\\uAB6A\\uAB6B\\uFBB2-\\uFBC1\\uFF3E\\uFF40\\uFFE3",Sm:"\\+<->\\|~\\xAC\\xB1\\xD7\\xF7\\u03F6\\u0606-\\u0608\\u2044\\u2052\\u207A-\\u207C\\u208A-\\u208C\\u2118\\u2140-\\u2144\\u214B\\u2190-\\u2194\\u219A\\u219B\\u21A0\\u21A3\\u21A6\\u21AE\\u21CE\\u21CF\\u21D2\\u21D4\\u21F4-\\u22FF\\u2320\\u2321\\u237C\\u239B-\\u23B3\\u23DC-\\u23E1\\u25B7\\u25C1\\u25F8-\\u25FF\\u266F\\u27C0-\\u27C4\\u27C7-\\u27E5\\u27F0-\\u27FF\\u2900-\\u2982\\u2999-\\u29D7\\u29DC-\\u29FB\\u29FE-\\u2AFF\\u2B30-\\u2B44\\u2B47-\\u2B4C\\uFB29\\uFE62\\uFE64-\\uFE66\\uFF0B\\uFF1C-\\uFF1E\\uFF5C\\uFF5E\\uFFE2\\uFFE9-\\uFFEC",So:"\\xA6\\xA9\\xAE\\xB0\\u0482\\u058D\\u058E\\u060E\\u060F\\u06DE\\u06E9\\u06FD\\u06FE\\u07F6\\u09FA\\u0B70\\u0BF3-\\u0BF8\\u0BFA\\u0C7F\\u0D4F\\u0D79\\u0F01-\\u0F03\\u0F13\\u0F15-\\u0F17\\u0F1A-\\u0F1F\\u0F34\\u0F36\\u0F38\\u0FBE-\\u0FC5\\u0FC7-\\u0FCC\\u0FCE\\u0FCF\\u0FD5-\\u0FD8\\u109E\\u109F\\u1390-\\u1399\\u166D\\u1940\\u19DE-\\u19FF\\u1B61-\\u1B6A\\u1B74-\\u1B7C\\u2100\\u2101\\u2103-\\u2106\\u2108\\u2109\\u2114\\u2116\\u2117\\u211E-\\u2123\\u2125\\u2127\\u2129\\u212E\\u213A\\u213B\\u214A\\u214C\\u214D\\u214F\\u218A\\u218B\\u2195-\\u2199\\u219C-\\u219F\\u21A1\\u21A2\\u21A4\\u21A5\\u21A7-\\u21AD\\u21AF-\\u21CD\\u21D0\\u21D1\\u21D3\\u21D5-\\u21F3\\u2300-\\u2307\\u230C-\\u231F\\u2322-\\u2328\\u232B-\\u237B\\u237D-\\u239A\\u23B4-\\u23DB\\u23E2-\\u2426\\u2440-\\u244A\\u249C-\\u24E9\\u2500-\\u25B6\\u25B8-\\u25C0\\u25C2-\\u25F7\\u2600-\\u266E\\u2670-\\u2767\\u2794-\\u27BF\\u2800-\\u28FF\\u2B00-\\u2B2F\\u2B45\\u2B46\\u2B4D-\\u2B73\\u2B76-\\u2B95\\u2B97-\\u2BFF\\u2CE5-\\u2CEA\\u2E50\\u2E51\\u2E80-\\u2E99\\u2E9B-\\u2EF3\\u2F00-\\u2FD5\\u2FF0-\\u2FFB\\u3004\\u3012\\u3013\\u3020\\u3036\\u3037\\u303E\\u303F\\u3190\\u3191\\u3196-\\u319F\\u31C0-\\u31E3\\u3200-\\u321E\\u322A-\\u3247\\u3250\\u3260-\\u327F\\u328A-\\u32B0\\u32C0-\\u33FF\\u4DC0-\\u4DFF\\uA490-\\uA4C6\\uA828-\\uA82B\\uA836\\uA837\\uA839\\uAA77-\\uAA79\\uFDFD\\uFFE4\\uFFE8\\uFFED\\uFFEE\\uFFFC\\uFFFD",Zl:"\\u2028",Zp:"\\u2029",Zs:" \\xA0\\u1680\\u2000-\\u200A\\u202F\\u205F\\u3000"},p.C=p.Cc+p.Cf+p.Cs+p.Co,p.L=p.Lu+p.Ll+p.Lt+p.Lm+p.Mn+p.Lo,p.LC=p.Lu+p.Ll+p.Lt,p.M=p.Mn+p.Mc+p.Me,p.N=p.Nd+p.Nl+p.No,p.P=p.Pc+p.Pd+p.Ps+p.Pe+p.Pi+p.Pf+p.Po,p.S=p.Sm+p.Sc+p.Sk+p.So,p.Z=p.Zs+p.Zl+p.Zp,p.w="_"+p.L+p.N,p.b="(?:["+p.w+"](?:[^"+p.w+"]|$)|(?:^|[^"+p.w+"])["+p.w+"])",p.bOut="(?=[^"+p.w+"]|$)",p.bIn="(?:^|[^"+p.w+"])",p.bInCapture="(?:^|([^"+p.w+"]))",p.B="(?:["+p.w+"]["+p.w+"]|[^"+p.w+"][^"+p.w+"])",p.d=p.N;var t=Sk.token.tokens;let s=Sk.builtin.SyntaxError,c=Sk.builtin.SyntaxError;i.prototype.exact_type=function(){return this.type==t.T_OP&&this.string in Sk.token.EXACT_TOKEN_TYPES?Sk.token.EXACT_TOKEN_TYPES[this.string]:this.type};var o=/[\\^$.*+?()[\]{}|]/g,d=RegExp(o.source);let{Lu:u,Ll:f,Lt:$,Lm:m,Lo:_,Nl:v,Mn:A,Mc:N,Nd:M,Pc:R}=p;p=u+f+$+m+_+v+"_\\u1885-\\u1886\\u2118\\u212E\\u309B-\\u309C";let H="["+p+"]+["+(p+A+N+M+R+"\\u00B7\\u0387\\u1369-\\u1371\\u19DA]*"),ee=new RegExp("^"+H+"$");Sk.token.isIdentifier=h,function(Z){return n.apply(null,arguments)+"*"}("\\\\\\r?\\n[ \\f\\t]*"),r("#[^\\r\\n]*"),p=n("[0-9](?:_?[0-9])*\\.(?:[0-9](?:_?[0-9])*)?","\\.[0-9](?:_?[0-9])*")+r("[eE][-+]?[0-9](?:_?[0-9])*");var Y=n(p,"[0-9](?:_?[0-9])*[eE][-+]?[0-9](?:_?[0-9])*"),k=n("[0-9](?:_?[0-9])*[jJ]",Y+"[jJ]");p=n.apply(null,a()),g=n(p+"'''",p+'"""'),n(p+"'[^\\n'\\\\]*(?:\\\\.[^\\n'\\\\]*)*'",p+'"[^\\n"\\\\]*(?:\\\\.[^\\n"\\\\]*)*"');var x,C,F;S(!0),Sk.token.setupTokens=S;var P=n(p+"'[^\\n'\\\\]*(?:\\\\.[^\\n'\\\\]*)*"+n("'","\\\\\\r?\\n"),p+'"[^\\n"\\\\]*(?:\\\\.[^\\n"\\\\]*)*'+n('"',"\\\\\\r?\\n")),L=n("\\\\\\r?\\n|$","#[^\\r\\n]*",g),U={};p=a();for(let Z of p)U[Z+"'"]="^[^'\\\\]*(?:\\\\.[^'\\\\]*)*'",U[Z+'"']='^[^"\\\\]*(?:\\\\.[^"\\\\]*)*"',U[Z+"'''"]="^[^'\\\\]*(?:(?:\\\\.|'(?!''))[^'\\\\]*)*'''",U[Z+'"""']='^[^"\\\\]*(?:(?:\\\\.|"(?!""))[^"\\\\]*)*"""';let K=[],te=[];for(let Z of p)K.push(Z+'"'),K.push(Z+"'"),te.push(Z+'"""'),te.push(Z+"'''");Sk._tokenize=function(Z,oe,ie,ce){var J=Sk.__future__.python3?"":"(?:L?)";J=n("0[xX](?:_?[0-9a-fA-F])+"+J,"0[bB](?:_?[01])+"+J,Sk.__future__.silent_octal_literal?"0([oO]?)(?:_?[0-7])+"+J:"0([oO])(?:_?[0-7])+"+J,"(?:0(?:_?0)*|[1-9](?:_?[0-9])*)"+J),J=n(k,Y,J),J="[ \\f\\t]*"+n(L,J,F,P,H),J=new RegExp(J);var pe=0,z=0,G=0,he="",B=0,q=null,X=[0],E,y=void 0,T=void 0,I,D;ie!==void 0&&(ie=="utf-8-sig"&&(ie="utf-8"),ce(new i(t.T_ENCODING,ie,[0,0],[0,0],"")));for(var O=ie="";;){try{ie=O,O=oe()}catch{O=""}pe+=1;var j=0,V=O.length;if(he){if(!O)throw new s("EOF in multi-line string",Z,T[0],T[1]);y.lastIndex=0;var Q=y.exec(O);if(Q)j=I=Q[0].length,ce(new i(t.T_STRING,he+O.substring(0,I),T,[pe,I],q+O)),he="",B=0,q=null;else{B&&O.substring(O.length-2)!==`\\ +to that returned by repr() in Python 2.`},null,"builtins")):(Sk.builtins.range=new Sk.builtin.sk_method({$meth:Sk.builtin.range,$name:"range",$flags:{MinArgs:1,MaxArgs:3}},void 0,"builtins"),Sk.builtins.xrange=new Sk.builtin.sk_method({$meth:Sk.builtin.xrange,$name:"xrange",$flags:{MinArgs:1,MaxArgs:3}},null,"builtins"),Sk.builtins.reduce=new Sk.builtin.sk_method({$meth:Sk.builtin.reduce,$name:"reduce",$flags:{MinArgs:2,MaxArgs:3}},null,"builtins"),Sk.builtins.filter=new Sk.builtin.func(Sk.builtin.filter),Sk.builtins.map=new Sk.builtin.func(Sk.builtin.map),Sk.builtins.zip=new Sk.builtin.func(Sk.builtin.zip),Sk.builtins.StandardError=Sk.builtin.Exception,Sk.builtins.unicode=Sk.builtin.str,Sk.builtins.basestring=Sk.builtin.str,Sk.builtins.long_$rw$=Sk.builtin.lng,Sk.builtin.int_.prototype.$r=function(){let l=this.v;return typeof l=="number"?new Sk.builtin.str(l.toString()):new Sk.builtin.str(l.toString()+"L")},Sk.builtin.int_.prototype.tp$str=function(){return new Sk.builtin.str(this.v.toString())},Sk.builtin.bool.prototype.tp$str=function(){return this.$r()},Sk.builtins.raw_input=new Sk.builtin.func(Sk.builtin.raw_input),Sk.builtins.unichr=new Sk.builtin.func(Sk.builtin.unichr),Sk.builtin.str.prototype.decode=Sk.builtin.str.$py2decode,delete Sk.builtins.bytes,delete Sk.builtins.ascii)},Sk.exportSymbol("Sk.setupObjects",Sk.setupObjects),Sk.exportSymbol("Sk.builtins",Sk.builtins)},function(p,b){Sk.builtin.str.$empty=new Sk.builtin.str(""),Sk.builtin.str.$emptystr=Sk.builtin.str.$empty,Sk.builtin.str.$utf8=new Sk.builtin.str("utf-8"),Sk.builtin.str.$ascii=new Sk.builtin.str("ascii"),Sk.builtin.str.$default_factory=new Sk.builtin.str("default_factory"),Sk.builtin.str.$imag=new Sk.builtin.str("imag"),Sk.builtin.str.$real=new Sk.builtin.str("real"),Sk.builtin.str.$abs=new Sk.builtin.str("__abs__"),Sk.builtin.str.$bases=new Sk.builtin.str("__bases__"),Sk.builtin.str.$bytes=new Sk.builtin.str("__bytes__"),Sk.builtin.str.$call=new Sk.builtin.str("__call__"),Sk.builtin.str.$class=new Sk.builtin.str("__class__"),Sk.builtin.str.$class_getitem=new Sk.builtin.str("__class_getitem__"),Sk.builtin.str.$cmp=new Sk.builtin.str("__cmp__"),Sk.builtin.str.$complex=new Sk.builtin.str("__complex__"),Sk.builtin.str.$contains=new Sk.builtin.str("__contains__"),Sk.builtin.str.$copy=new Sk.builtin.str("__copy__"),Sk.builtin.str.$dict=new Sk.builtin.str("__dict__"),Sk.builtin.str.$dir=new Sk.builtin.str("__dir__"),Sk.builtin.str.$doc=new Sk.builtin.str("__doc__"),Sk.builtin.str.$enter=new Sk.builtin.str("__enter__"),Sk.builtin.str.$eq=new Sk.builtin.str("__eq__"),Sk.builtin.str.$exit=new Sk.builtin.str("__exit__"),Sk.builtin.str.$index=new Sk.builtin.str("__index__"),Sk.builtin.str.$init=new Sk.builtin.str("__init__"),Sk.builtin.str.$initsubclass=new Sk.builtin.str("__init_subclass__"),Sk.builtin.str.$int_=new Sk.builtin.str("__int__"),Sk.builtin.str.$iter=new Sk.builtin.str("__iter__"),Sk.builtin.str.$file=new Sk.builtin.str("__file__"),Sk.builtin.str.$float_=new Sk.builtin.str("__float__"),Sk.builtin.str.$format=new Sk.builtin.str("__format__"),Sk.builtin.str.$ge=new Sk.builtin.str("__ge__"),Sk.builtin.str.$getattr=new Sk.builtin.str("__getattr__"),Sk.builtin.str.$getattribute=new Sk.builtin.str("__getattribute__"),Sk.builtin.str.$getitem=new Sk.builtin.str("__getitem__"),Sk.builtin.str.$gt=new Sk.builtin.str("__gt__"),Sk.builtin.str.$keys=new Sk.builtin.str("keys"),Sk.builtin.str.$le=new Sk.builtin.str("__le__"),Sk.builtin.str.$len=new Sk.builtin.str("__len__"),Sk.builtin.str.$length_hint=new Sk.builtin.str("__length_hint__"),Sk.builtin.str.$loader=new Sk.builtin.str("__loader__"),Sk.builtin.str.$lt=new Sk.builtin.str("__lt__"),Sk.builtin.str.$module=new Sk.builtin.str("__module__"),Sk.builtin.str.$missing=new Sk.builtin.str("__missing__"),Sk.builtin.str.$name=new Sk.builtin.str("__name__"),Sk.builtin.str.$ne=new Sk.builtin.str("__ne__"),Sk.builtin.str.$new=new Sk.builtin.str("__new__"),Sk.builtin.str.$next=new Sk.builtin.str("__next__"),Sk.builtin.str.$path=new Sk.builtin.str("__path__"),Sk.builtin.str.$prepare=new Sk.builtin.str("__prepare__"),Sk.builtin.str.$qualname=new Sk.builtin.str("__qualname__"),Sk.builtin.str.$repr=new Sk.builtin.str("__repr__"),Sk.builtin.str.$reversed=new Sk.builtin.str("__reversed__"),Sk.builtin.str.$round=new Sk.builtin.str("__round__"),Sk.builtin.str.$setattr=new Sk.builtin.str("__setattr__"),Sk.builtin.str.$setitem=new Sk.builtin.str("__setitem__"),Sk.builtin.str.$slots=new Sk.builtin.str("__slots__"),Sk.builtin.str.$str=new Sk.builtin.str("__str__"),Sk.builtin.str.$setname=new Sk.builtin.str("__set_name__"),Sk.builtin.str.$trunc=new Sk.builtin.str("__trunc__"),Sk.builtin.str.$write=new Sk.builtin.str("write"),Sk.misceval.op2method_={Eq:Sk.builtin.str.$eq,NotEq:Sk.builtin.str.$ne,Gt:Sk.builtin.str.$gt,GtE:Sk.builtin.str.$ge,Lt:Sk.builtin.str.$lt,LtE:Sk.builtin.str.$le}},function(p,b,e){function i(Q,oe,ie,ce,Y){this.type=Q,this.string=oe,this.start=ie,this.end=ce,this.line=Y}function n(Q){return"("+Array.prototype.slice.call(arguments).join("|")+")"}function r(Q){return n.apply(null,arguments)+"?"}function l(Q,oe){for(var ie=Q.length;ie--;)if(Q[ie]===oe)return!0;return!1}function h(Q){return Q=Q.normalize("NFKC"),ee.test(Q)}function a(){return" FR RF Br BR Fr r B R b bR f rb rB F Rf U rF u RB br fR fr rf Rb".split(" ")}function S(Q){Q?delete Sk.token.EXACT_TOKEN_TYPES["<>"]:Sk.token.EXACT_TOKEN_TYPES["<>"]=Sk.token.tokens.T_NOTEQUAL,x=Object.keys(Sk.token.EXACT_TOKEN_TYPES).sort(),C=n.apply(this,x.reverse().map(function(oe){return oe&&d.test(oe)?oe.replace(o,"\\$&"):oe})),F=n("\\r?\\n",C)}e.r(b),p={Cc:"\\0-\\x1F\\x7F-\\x9F",Cf:"\\xAD\\u0600-\\u0605\\u061C\\u06DD\\u070F\\u08E2\\u180E\\u200B-\\u200F\\u202A-\\u202E\\u2060-\\u2064\\u2066-\\u206F\\uFEFF\\uFFF9-\\uFFFB",Co:"\\uE000-\\uF8FF",Cs:"\\uD800-\\uDFFF",Ll:"a-z\\xB5\\xDF-\\xF6\\xF8-\\xFF\\u0101\\u0103\\u0105\\u0107\\u0109\\u010B\\u010D\\u010F\\u0111\\u0113\\u0115\\u0117\\u0119\\u011B\\u011D\\u011F\\u0121\\u0123\\u0125\\u0127\\u0129\\u012B\\u012D\\u012F\\u0131\\u0133\\u0135\\u0137\\u0138\\u013A\\u013C\\u013E\\u0140\\u0142\\u0144\\u0146\\u0148\\u0149\\u014B\\u014D\\u014F\\u0151\\u0153\\u0155\\u0157\\u0159\\u015B\\u015D\\u015F\\u0161\\u0163\\u0165\\u0167\\u0169\\u016B\\u016D\\u016F\\u0171\\u0173\\u0175\\u0177\\u017A\\u017C\\u017E-\\u0180\\u0183\\u0185\\u0188\\u018C\\u018D\\u0192\\u0195\\u0199-\\u019B\\u019E\\u01A1\\u01A3\\u01A5\\u01A8\\u01AA\\u01AB\\u01AD\\u01B0\\u01B4\\u01B6\\u01B9\\u01BA\\u01BD-\\u01BF\\u01C6\\u01C9\\u01CC\\u01CE\\u01D0\\u01D2\\u01D4\\u01D6\\u01D8\\u01DA\\u01DC\\u01DD\\u01DF\\u01E1\\u01E3\\u01E5\\u01E7\\u01E9\\u01EB\\u01ED\\u01EF\\u01F0\\u01F3\\u01F5\\u01F9\\u01FB\\u01FD\\u01FF\\u0201\\u0203\\u0205\\u0207\\u0209\\u020B\\u020D\\u020F\\u0211\\u0213\\u0215\\u0217\\u0219\\u021B\\u021D\\u021F\\u0221\\u0223\\u0225\\u0227\\u0229\\u022B\\u022D\\u022F\\u0231\\u0233-\\u0239\\u023C\\u023F\\u0240\\u0242\\u0247\\u0249\\u024B\\u024D\\u024F-\\u0293\\u0295-\\u02AF\\u0371\\u0373\\u0377\\u037B-\\u037D\\u0390\\u03AC-\\u03CE\\u03D0\\u03D1\\u03D5-\\u03D7\\u03D9\\u03DB\\u03DD\\u03DF\\u03E1\\u03E3\\u03E5\\u03E7\\u03E9\\u03EB\\u03ED\\u03EF-\\u03F3\\u03F5\\u03F8\\u03FB\\u03FC\\u0430-\\u045F\\u0461\\u0463\\u0465\\u0467\\u0469\\u046B\\u046D\\u046F\\u0471\\u0473\\u0475\\u0477\\u0479\\u047B\\u047D\\u047F\\u0481\\u048B\\u048D\\u048F\\u0491\\u0493\\u0495\\u0497\\u0499\\u049B\\u049D\\u049F\\u04A1\\u04A3\\u04A5\\u04A7\\u04A9\\u04AB\\u04AD\\u04AF\\u04B1\\u04B3\\u04B5\\u04B7\\u04B9\\u04BB\\u04BD\\u04BF\\u04C2\\u04C4\\u04C6\\u04C8\\u04CA\\u04CC\\u04CE\\u04CF\\u04D1\\u04D3\\u04D5\\u04D7\\u04D9\\u04DB\\u04DD\\u04DF\\u04E1\\u04E3\\u04E5\\u04E7\\u04E9\\u04EB\\u04ED\\u04EF\\u04F1\\u04F3\\u04F5\\u04F7\\u04F9\\u04FB\\u04FD\\u04FF\\u0501\\u0503\\u0505\\u0507\\u0509\\u050B\\u050D\\u050F\\u0511\\u0513\\u0515\\u0517\\u0519\\u051B\\u051D\\u051F\\u0521\\u0523\\u0525\\u0527\\u0529\\u052B\\u052D\\u052F\\u0560-\\u0588\\u10D0-\\u10FA\\u10FD-\\u10FF\\u13F8-\\u13FD\\u1C80-\\u1C88\\u1D00-\\u1D2B\\u1D6B-\\u1D77\\u1D79-\\u1D9A\\u1E01\\u1E03\\u1E05\\u1E07\\u1E09\\u1E0B\\u1E0D\\u1E0F\\u1E11\\u1E13\\u1E15\\u1E17\\u1E19\\u1E1B\\u1E1D\\u1E1F\\u1E21\\u1E23\\u1E25\\u1E27\\u1E29\\u1E2B\\u1E2D\\u1E2F\\u1E31\\u1E33\\u1E35\\u1E37\\u1E39\\u1E3B\\u1E3D\\u1E3F\\u1E41\\u1E43\\u1E45\\u1E47\\u1E49\\u1E4B\\u1E4D\\u1E4F\\u1E51\\u1E53\\u1E55\\u1E57\\u1E59\\u1E5B\\u1E5D\\u1E5F\\u1E61\\u1E63\\u1E65\\u1E67\\u1E69\\u1E6B\\u1E6D\\u1E6F\\u1E71\\u1E73\\u1E75\\u1E77\\u1E79\\u1E7B\\u1E7D\\u1E7F\\u1E81\\u1E83\\u1E85\\u1E87\\u1E89\\u1E8B\\u1E8D\\u1E8F\\u1E91\\u1E93\\u1E95-\\u1E9D\\u1E9F\\u1EA1\\u1EA3\\u1EA5\\u1EA7\\u1EA9\\u1EAB\\u1EAD\\u1EAF\\u1EB1\\u1EB3\\u1EB5\\u1EB7\\u1EB9\\u1EBB\\u1EBD\\u1EBF\\u1EC1\\u1EC3\\u1EC5\\u1EC7\\u1EC9\\u1ECB\\u1ECD\\u1ECF\\u1ED1\\u1ED3\\u1ED5\\u1ED7\\u1ED9\\u1EDB\\u1EDD\\u1EDF\\u1EE1\\u1EE3\\u1EE5\\u1EE7\\u1EE9\\u1EEB\\u1EED\\u1EEF\\u1EF1\\u1EF3\\u1EF5\\u1EF7\\u1EF9\\u1EFB\\u1EFD\\u1EFF-\\u1F07\\u1F10-\\u1F15\\u1F20-\\u1F27\\u1F30-\\u1F37\\u1F40-\\u1F45\\u1F50-\\u1F57\\u1F60-\\u1F67\\u1F70-\\u1F7D\\u1F80-\\u1F87\\u1F90-\\u1F97\\u1FA0-\\u1FA7\\u1FB0-\\u1FB4\\u1FB6\\u1FB7\\u1FBE\\u1FC2-\\u1FC4\\u1FC6\\u1FC7\\u1FD0-\\u1FD3\\u1FD6\\u1FD7\\u1FE0-\\u1FE7\\u1FF2-\\u1FF4\\u1FF6\\u1FF7\\u210A\\u210E\\u210F\\u2113\\u212F\\u2134\\u2139\\u213C\\u213D\\u2146-\\u2149\\u214E\\u2184\\u2C30-\\u2C5E\\u2C61\\u2C65\\u2C66\\u2C68\\u2C6A\\u2C6C\\u2C71\\u2C73\\u2C74\\u2C76-\\u2C7B\\u2C81\\u2C83\\u2C85\\u2C87\\u2C89\\u2C8B\\u2C8D\\u2C8F\\u2C91\\u2C93\\u2C95\\u2C97\\u2C99\\u2C9B\\u2C9D\\u2C9F\\u2CA1\\u2CA3\\u2CA5\\u2CA7\\u2CA9\\u2CAB\\u2CAD\\u2CAF\\u2CB1\\u2CB3\\u2CB5\\u2CB7\\u2CB9\\u2CBB\\u2CBD\\u2CBF\\u2CC1\\u2CC3\\u2CC5\\u2CC7\\u2CC9\\u2CCB\\u2CCD\\u2CCF\\u2CD1\\u2CD3\\u2CD5\\u2CD7\\u2CD9\\u2CDB\\u2CDD\\u2CDF\\u2CE1\\u2CE3\\u2CE4\\u2CEC\\u2CEE\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\uA641\\uA643\\uA645\\uA647\\uA649\\uA64B\\uA64D\\uA64F\\uA651\\uA653\\uA655\\uA657\\uA659\\uA65B\\uA65D\\uA65F\\uA661\\uA663\\uA665\\uA667\\uA669\\uA66B\\uA66D\\uA681\\uA683\\uA685\\uA687\\uA689\\uA68B\\uA68D\\uA68F\\uA691\\uA693\\uA695\\uA697\\uA699\\uA69B\\uA723\\uA725\\uA727\\uA729\\uA72B\\uA72D\\uA72F-\\uA731\\uA733\\uA735\\uA737\\uA739\\uA73B\\uA73D\\uA73F\\uA741\\uA743\\uA745\\uA747\\uA749\\uA74B\\uA74D\\uA74F\\uA751\\uA753\\uA755\\uA757\\uA759\\uA75B\\uA75D\\uA75F\\uA761\\uA763\\uA765\\uA767\\uA769\\uA76B\\uA76D\\uA76F\\uA771-\\uA778\\uA77A\\uA77C\\uA77F\\uA781\\uA783\\uA785\\uA787\\uA78C\\uA78E\\uA791\\uA793-\\uA795\\uA797\\uA799\\uA79B\\uA79D\\uA79F\\uA7A1\\uA7A3\\uA7A5\\uA7A7\\uA7A9\\uA7AF\\uA7B5\\uA7B7\\uA7B9\\uA7BB\\uA7BD\\uA7BF\\uA7C3\\uA7C8\\uA7CA\\uA7F6\\uA7FA\\uAB30-\\uAB5A\\uAB60-\\uAB68\\uAB70-\\uABBF\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFF41-\\uFF5A",Lm:"\\u02B0-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0374\\u037A\\u0559\\u0640\\u06E5\\u06E6\\u07F4\\u07F5\\u07FA\\u081A\\u0824\\u0828\\u0971\\u0E46\\u0EC6\\u10FC\\u17D7\\u1843\\u1AA7\\u1C78-\\u1C7D\\u1D2C-\\u1D6A\\u1D78\\u1D9B-\\u1DBF\\u2071\\u207F\\u2090-\\u209C\\u2C7C\\u2C7D\\u2D6F\\u2E2F\\u3005\\u3031-\\u3035\\u303B\\u309D\\u309E\\u30FC-\\u30FE\\uA015\\uA4F8-\\uA4FD\\uA60C\\uA67F\\uA69C\\uA69D\\uA717-\\uA71F\\uA770\\uA788\\uA7F8\\uA7F9\\uA9CF\\uA9E6\\uAA70\\uAADD\\uAAF3\\uAAF4\\uAB5C-\\uAB5F\\uAB69\\uFF70\\uFF9E\\uFF9F",Lo:"\\xAA\\xBA\\u01BB\\u01C0-\\u01C3\\u0294\\u05D0-\\u05EA\\u05EF-\\u05F2\\u0620-\\u063F\\u0641-\\u064A\\u066E\\u066F\\u0671-\\u06D3\\u06D5\\u06EE\\u06EF\\u06FA-\\u06FC\\u06FF\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07CA-\\u07EA\\u0800-\\u0815\\u0840-\\u0858\\u0860-\\u086A\\u08A0-\\u08B4\\u08B6-\\u08C7\\u0904-\\u0939\\u093D\\u0950\\u0958-\\u0961\\u0972-\\u0980\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BD\\u09CE\\u09DC\\u09DD\\u09DF-\\u09E1\\u09F0\\u09F1\\u09FC\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A59-\\u0A5C\\u0A5E\\u0A72-\\u0A74\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABD\\u0AD0\\u0AE0\\u0AE1\\u0AF9\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3D\\u0B5C\\u0B5D\\u0B5F-\\u0B61\\u0B71\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BD0\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C39\\u0C3D\\u0C58-\\u0C5A\\u0C60\\u0C61\\u0C80\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBD\\u0CDE\\u0CE0\\u0CE1\\u0CF1\\u0CF2\\u0D04-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D3A\\u0D3D\\u0D4E\\u0D54-\\u0D56\\u0D5F-\\u0D61\\u0D7A-\\u0D7F\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0E01-\\u0E30\\u0E32\\u0E33\\u0E40-\\u0E45\\u0E81\\u0E82\\u0E84\\u0E86-\\u0E8A\\u0E8C-\\u0EA3\\u0EA5\\u0EA7-\\u0EB0\\u0EB2\\u0EB3\\u0EBD\\u0EC0-\\u0EC4\\u0EDC-\\u0EDF\\u0F00\\u0F40-\\u0F47\\u0F49-\\u0F6C\\u0F88-\\u0F8C\\u1000-\\u102A\\u103F\\u1050-\\u1055\\u105A-\\u105D\\u1061\\u1065\\u1066\\u106E-\\u1070\\u1075-\\u1081\\u108E\\u1100-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u1380-\\u138F\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16F1-\\u16F8\\u1700-\\u170C\\u170E-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17DC\\u1820-\\u1842\\u1844-\\u1878\\u1880-\\u1884\\u1887-\\u18A8\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1950-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19B0-\\u19C9\\u1A00-\\u1A16\\u1A20-\\u1A54\\u1B05-\\u1B33\\u1B45-\\u1B4B\\u1B83-\\u1BA0\\u1BAE\\u1BAF\\u1BBA-\\u1BE5\\u1C00-\\u1C23\\u1C4D-\\u1C4F\\u1C5A-\\u1C77\\u1CE9-\\u1CEC\\u1CEE-\\u1CF3\\u1CF5\\u1CF6\\u1CFA\\u2135-\\u2138\\u2D30-\\u2D67\\u2D80-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u3006\\u303C\\u3041-\\u3096\\u309F\\u30A1-\\u30FA\\u30FF\\u3105-\\u312F\\u3131-\\u318E\\u31A0-\\u31BF\\u31F0-\\u31FF\\u3400-\\u4DBF\\u4E00-\\u9FFC\\uA000-\\uA014\\uA016-\\uA48C\\uA4D0-\\uA4F7\\uA500-\\uA60B\\uA610-\\uA61F\\uA62A\\uA62B\\uA66E\\uA6A0-\\uA6E5\\uA78F\\uA7F7\\uA7FB-\\uA801\\uA803-\\uA805\\uA807-\\uA80A\\uA80C-\\uA822\\uA840-\\uA873\\uA882-\\uA8B3\\uA8F2-\\uA8F7\\uA8FB\\uA8FD\\uA8FE\\uA90A-\\uA925\\uA930-\\uA946\\uA960-\\uA97C\\uA984-\\uA9B2\\uA9E0-\\uA9E4\\uA9E7-\\uA9EF\\uA9FA-\\uA9FE\\uAA00-\\uAA28\\uAA40-\\uAA42\\uAA44-\\uAA4B\\uAA60-\\uAA6F\\uAA71-\\uAA76\\uAA7A\\uAA7E-\\uAAAF\\uAAB1\\uAAB5\\uAAB6\\uAAB9-\\uAABD\\uAAC0\\uAAC2\\uAADB\\uAADC\\uAAE0-\\uAAEA\\uAAF2\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uABC0-\\uABE2\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB1D\\uFB1F-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF66-\\uFF6F\\uFF71-\\uFF9D\\uFFA0-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC",Lt:"\\u01C5\\u01C8\\u01CB\\u01F2\\u1F88-\\u1F8F\\u1F98-\\u1F9F\\u1FA8-\\u1FAF\\u1FBC\\u1FCC\\u1FFC",Lu:"A-Z\\xC0-\\xD6\\xD8-\\xDE\\u0100\\u0102\\u0104\\u0106\\u0108\\u010A\\u010C\\u010E\\u0110\\u0112\\u0114\\u0116\\u0118\\u011A\\u011C\\u011E\\u0120\\u0122\\u0124\\u0126\\u0128\\u012A\\u012C\\u012E\\u0130\\u0132\\u0134\\u0136\\u0139\\u013B\\u013D\\u013F\\u0141\\u0143\\u0145\\u0147\\u014A\\u014C\\u014E\\u0150\\u0152\\u0154\\u0156\\u0158\\u015A\\u015C\\u015E\\u0160\\u0162\\u0164\\u0166\\u0168\\u016A\\u016C\\u016E\\u0170\\u0172\\u0174\\u0176\\u0178\\u0179\\u017B\\u017D\\u0181\\u0182\\u0184\\u0186\\u0187\\u0189-\\u018B\\u018E-\\u0191\\u0193\\u0194\\u0196-\\u0198\\u019C\\u019D\\u019F\\u01A0\\u01A2\\u01A4\\u01A6\\u01A7\\u01A9\\u01AC\\u01AE\\u01AF\\u01B1-\\u01B3\\u01B5\\u01B7\\u01B8\\u01BC\\u01C4\\u01C7\\u01CA\\u01CD\\u01CF\\u01D1\\u01D3\\u01D5\\u01D7\\u01D9\\u01DB\\u01DE\\u01E0\\u01E2\\u01E4\\u01E6\\u01E8\\u01EA\\u01EC\\u01EE\\u01F1\\u01F4\\u01F6-\\u01F8\\u01FA\\u01FC\\u01FE\\u0200\\u0202\\u0204\\u0206\\u0208\\u020A\\u020C\\u020E\\u0210\\u0212\\u0214\\u0216\\u0218\\u021A\\u021C\\u021E\\u0220\\u0222\\u0224\\u0226\\u0228\\u022A\\u022C\\u022E\\u0230\\u0232\\u023A\\u023B\\u023D\\u023E\\u0241\\u0243-\\u0246\\u0248\\u024A\\u024C\\u024E\\u0370\\u0372\\u0376\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E\\u038F\\u0391-\\u03A1\\u03A3-\\u03AB\\u03CF\\u03D2-\\u03D4\\u03D8\\u03DA\\u03DC\\u03DE\\u03E0\\u03E2\\u03E4\\u03E6\\u03E8\\u03EA\\u03EC\\u03EE\\u03F4\\u03F7\\u03F9\\u03FA\\u03FD-\\u042F\\u0460\\u0462\\u0464\\u0466\\u0468\\u046A\\u046C\\u046E\\u0470\\u0472\\u0474\\u0476\\u0478\\u047A\\u047C\\u047E\\u0480\\u048A\\u048C\\u048E\\u0490\\u0492\\u0494\\u0496\\u0498\\u049A\\u049C\\u049E\\u04A0\\u04A2\\u04A4\\u04A6\\u04A8\\u04AA\\u04AC\\u04AE\\u04B0\\u04B2\\u04B4\\u04B6\\u04B8\\u04BA\\u04BC\\u04BE\\u04C0\\u04C1\\u04C3\\u04C5\\u04C7\\u04C9\\u04CB\\u04CD\\u04D0\\u04D2\\u04D4\\u04D6\\u04D8\\u04DA\\u04DC\\u04DE\\u04E0\\u04E2\\u04E4\\u04E6\\u04E8\\u04EA\\u04EC\\u04EE\\u04F0\\u04F2\\u04F4\\u04F6\\u04F8\\u04FA\\u04FC\\u04FE\\u0500\\u0502\\u0504\\u0506\\u0508\\u050A\\u050C\\u050E\\u0510\\u0512\\u0514\\u0516\\u0518\\u051A\\u051C\\u051E\\u0520\\u0522\\u0524\\u0526\\u0528\\u052A\\u052C\\u052E\\u0531-\\u0556\\u10A0-\\u10C5\\u10C7\\u10CD\\u13A0-\\u13F5\\u1C90-\\u1CBA\\u1CBD-\\u1CBF\\u1E00\\u1E02\\u1E04\\u1E06\\u1E08\\u1E0A\\u1E0C\\u1E0E\\u1E10\\u1E12\\u1E14\\u1E16\\u1E18\\u1E1A\\u1E1C\\u1E1E\\u1E20\\u1E22\\u1E24\\u1E26\\u1E28\\u1E2A\\u1E2C\\u1E2E\\u1E30\\u1E32\\u1E34\\u1E36\\u1E38\\u1E3A\\u1E3C\\u1E3E\\u1E40\\u1E42\\u1E44\\u1E46\\u1E48\\u1E4A\\u1E4C\\u1E4E\\u1E50\\u1E52\\u1E54\\u1E56\\u1E58\\u1E5A\\u1E5C\\u1E5E\\u1E60\\u1E62\\u1E64\\u1E66\\u1E68\\u1E6A\\u1E6C\\u1E6E\\u1E70\\u1E72\\u1E74\\u1E76\\u1E78\\u1E7A\\u1E7C\\u1E7E\\u1E80\\u1E82\\u1E84\\u1E86\\u1E88\\u1E8A\\u1E8C\\u1E8E\\u1E90\\u1E92\\u1E94\\u1E9E\\u1EA0\\u1EA2\\u1EA4\\u1EA6\\u1EA8\\u1EAA\\u1EAC\\u1EAE\\u1EB0\\u1EB2\\u1EB4\\u1EB6\\u1EB8\\u1EBA\\u1EBC\\u1EBE\\u1EC0\\u1EC2\\u1EC4\\u1EC6\\u1EC8\\u1ECA\\u1ECC\\u1ECE\\u1ED0\\u1ED2\\u1ED4\\u1ED6\\u1ED8\\u1EDA\\u1EDC\\u1EDE\\u1EE0\\u1EE2\\u1EE4\\u1EE6\\u1EE8\\u1EEA\\u1EEC\\u1EEE\\u1EF0\\u1EF2\\u1EF4\\u1EF6\\u1EF8\\u1EFA\\u1EFC\\u1EFE\\u1F08-\\u1F0F\\u1F18-\\u1F1D\\u1F28-\\u1F2F\\u1F38-\\u1F3F\\u1F48-\\u1F4D\\u1F59\\u1F5B\\u1F5D\\u1F5F\\u1F68-\\u1F6F\\u1FB8-\\u1FBB\\u1FC8-\\u1FCB\\u1FD8-\\u1FDB\\u1FE8-\\u1FEC\\u1FF8-\\u1FFB\\u2102\\u2107\\u210B-\\u210D\\u2110-\\u2112\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u2130-\\u2133\\u213E\\u213F\\u2145\\u2183\\u2C00-\\u2C2E\\u2C60\\u2C62-\\u2C64\\u2C67\\u2C69\\u2C6B\\u2C6D-\\u2C70\\u2C72\\u2C75\\u2C7E-\\u2C80\\u2C82\\u2C84\\u2C86\\u2C88\\u2C8A\\u2C8C\\u2C8E\\u2C90\\u2C92\\u2C94\\u2C96\\u2C98\\u2C9A\\u2C9C\\u2C9E\\u2CA0\\u2CA2\\u2CA4\\u2CA6\\u2CA8\\u2CAA\\u2CAC\\u2CAE\\u2CB0\\u2CB2\\u2CB4\\u2CB6\\u2CB8\\u2CBA\\u2CBC\\u2CBE\\u2CC0\\u2CC2\\u2CC4\\u2CC6\\u2CC8\\u2CCA\\u2CCC\\u2CCE\\u2CD0\\u2CD2\\u2CD4\\u2CD6\\u2CD8\\u2CDA\\u2CDC\\u2CDE\\u2CE0\\u2CE2\\u2CEB\\u2CED\\u2CF2\\uA640\\uA642\\uA644\\uA646\\uA648\\uA64A\\uA64C\\uA64E\\uA650\\uA652\\uA654\\uA656\\uA658\\uA65A\\uA65C\\uA65E\\uA660\\uA662\\uA664\\uA666\\uA668\\uA66A\\uA66C\\uA680\\uA682\\uA684\\uA686\\uA688\\uA68A\\uA68C\\uA68E\\uA690\\uA692\\uA694\\uA696\\uA698\\uA69A\\uA722\\uA724\\uA726\\uA728\\uA72A\\uA72C\\uA72E\\uA732\\uA734\\uA736\\uA738\\uA73A\\uA73C\\uA73E\\uA740\\uA742\\uA744\\uA746\\uA748\\uA74A\\uA74C\\uA74E\\uA750\\uA752\\uA754\\uA756\\uA758\\uA75A\\uA75C\\uA75E\\uA760\\uA762\\uA764\\uA766\\uA768\\uA76A\\uA76C\\uA76E\\uA779\\uA77B\\uA77D\\uA77E\\uA780\\uA782\\uA784\\uA786\\uA78B\\uA78D\\uA790\\uA792\\uA796\\uA798\\uA79A\\uA79C\\uA79E\\uA7A0\\uA7A2\\uA7A4\\uA7A6\\uA7A8\\uA7AA-\\uA7AE\\uA7B0-\\uA7B4\\uA7B6\\uA7B8\\uA7BA\\uA7BC\\uA7BE\\uA7C2\\uA7C4-\\uA7C7\\uA7C9\\uA7F5\\uFF21-\\uFF3A",M:"\\u0300-\\u036F\\u0483-\\u0489\\u0591-\\u05BD\\u05BF\\u05C1\\u05C2\\u05C4\\u05C5\\u05C7\\u0610-\\u061A\\u064B-\\u065F\\u0670\\u06D6-\\u06DC\\u06DF-\\u06E4\\u06E7\\u06E8\\u06EA-\\u06ED\\u0711\\u0730-\\u074A\\u07A6-\\u07B0\\u07EB-\\u07F3\\u07FD\\u0816-\\u0819\\u081B-\\u0823\\u0825-\\u0827\\u0829-\\u082D\\u0859-\\u085B\\u08D3-\\u08E1\\u08E3-\\u0903\\u093A-\\u093C\\u093E-\\u094F\\u0951-\\u0957\\u0962\\u0963\\u0981-\\u0983\\u09BC\\u09BE-\\u09C4\\u09C7\\u09C8\\u09CB-\\u09CD\\u09D7\\u09E2\\u09E3\\u09FE\\u0A01-\\u0A03\\u0A3C\\u0A3E-\\u0A42\\u0A47\\u0A48\\u0A4B-\\u0A4D\\u0A51\\u0A70\\u0A71\\u0A75\\u0A81-\\u0A83\\u0ABC\\u0ABE-\\u0AC5\\u0AC7-\\u0AC9\\u0ACB-\\u0ACD\\u0AE2\\u0AE3\\u0AFA-\\u0AFF\\u0B01-\\u0B03\\u0B3C\\u0B3E-\\u0B44\\u0B47\\u0B48\\u0B4B-\\u0B4D\\u0B55-\\u0B57\\u0B62\\u0B63\\u0B82\\u0BBE-\\u0BC2\\u0BC6-\\u0BC8\\u0BCA-\\u0BCD\\u0BD7\\u0C00-\\u0C04\\u0C3E-\\u0C44\\u0C46-\\u0C48\\u0C4A-\\u0C4D\\u0C55\\u0C56\\u0C62\\u0C63\\u0C81-\\u0C83\\u0CBC\\u0CBE-\\u0CC4\\u0CC6-\\u0CC8\\u0CCA-\\u0CCD\\u0CD5\\u0CD6\\u0CE2\\u0CE3\\u0D00-\\u0D03\\u0D3B\\u0D3C\\u0D3E-\\u0D44\\u0D46-\\u0D48\\u0D4A-\\u0D4D\\u0D57\\u0D62\\u0D63\\u0D81-\\u0D83\\u0DCA\\u0DCF-\\u0DD4\\u0DD6\\u0DD8-\\u0DDF\\u0DF2\\u0DF3\\u0E31\\u0E34-\\u0E3A\\u0E47-\\u0E4E\\u0EB1\\u0EB4-\\u0EBC\\u0EC8-\\u0ECD\\u0F18\\u0F19\\u0F35\\u0F37\\u0F39\\u0F3E\\u0F3F\\u0F71-\\u0F84\\u0F86\\u0F87\\u0F8D-\\u0F97\\u0F99-\\u0FBC\\u0FC6\\u102B-\\u103E\\u1056-\\u1059\\u105E-\\u1060\\u1062-\\u1064\\u1067-\\u106D\\u1071-\\u1074\\u1082-\\u108D\\u108F\\u109A-\\u109D\\u135D-\\u135F\\u1712-\\u1714\\u1732-\\u1734\\u1752\\u1753\\u1772\\u1773\\u17B4-\\u17D3\\u17DD\\u180B-\\u180D\\u1885\\u1886\\u18A9\\u1920-\\u192B\\u1930-\\u193B\\u1A17-\\u1A1B\\u1A55-\\u1A5E\\u1A60-\\u1A7C\\u1A7F\\u1AB0-\\u1AC0\\u1B00-\\u1B04\\u1B34-\\u1B44\\u1B6B-\\u1B73\\u1B80-\\u1B82\\u1BA1-\\u1BAD\\u1BE6-\\u1BF3\\u1C24-\\u1C37\\u1CD0-\\u1CD2\\u1CD4-\\u1CE8\\u1CED\\u1CF4\\u1CF7-\\u1CF9\\u1DC0-\\u1DF9\\u1DFB-\\u1DFF\\u20D0-\\u20F0\\u2CEF-\\u2CF1\\u2D7F\\u2DE0-\\u2DFF\\u302A-\\u302F\\u3099\\u309A\\uA66F-\\uA672\\uA674-\\uA67D\\uA69E\\uA69F\\uA6F0\\uA6F1\\uA802\\uA806\\uA80B\\uA823-\\uA827\\uA82C\\uA880\\uA881\\uA8B4-\\uA8C5\\uA8E0-\\uA8F1\\uA8FF\\uA926-\\uA92D\\uA947-\\uA953\\uA980-\\uA983\\uA9B3-\\uA9C0\\uA9E5\\uAA29-\\uAA36\\uAA43\\uAA4C\\uAA4D\\uAA7B-\\uAA7D\\uAAB0\\uAAB2-\\uAAB4\\uAAB7\\uAAB8\\uAABE\\uAABF\\uAAC1\\uAAEB-\\uAAEF\\uAAF5\\uAAF6\\uABE3-\\uABEA\\uABEC\\uABED\\uFB1E\\uFE00-\\uFE0F\\uFE20-\\uFE2F",Mc:"\\u0903\\u093B\\u093E-\\u0940\\u0949-\\u094C\\u094E\\u094F\\u0982\\u0983\\u09BE-\\u09C0\\u09C7\\u09C8\\u09CB\\u09CC\\u09D7\\u0A03\\u0A3E-\\u0A40\\u0A83\\u0ABE-\\u0AC0\\u0AC9\\u0ACB\\u0ACC\\u0B02\\u0B03\\u0B3E\\u0B40\\u0B47\\u0B48\\u0B4B\\u0B4C\\u0B57\\u0BBE\\u0BBF\\u0BC1\\u0BC2\\u0BC6-\\u0BC8\\u0BCA-\\u0BCC\\u0BD7\\u0C01-\\u0C03\\u0C41-\\u0C44\\u0C82\\u0C83\\u0CBE\\u0CC0-\\u0CC4\\u0CC7\\u0CC8\\u0CCA\\u0CCB\\u0CD5\\u0CD6\\u0D02\\u0D03\\u0D3E-\\u0D40\\u0D46-\\u0D48\\u0D4A-\\u0D4C\\u0D57\\u0D82\\u0D83\\u0DCF-\\u0DD1\\u0DD8-\\u0DDF\\u0DF2\\u0DF3\\u0F3E\\u0F3F\\u0F7F\\u102B\\u102C\\u1031\\u1038\\u103B\\u103C\\u1056\\u1057\\u1062-\\u1064\\u1067-\\u106D\\u1083\\u1084\\u1087-\\u108C\\u108F\\u109A-\\u109C\\u17B6\\u17BE-\\u17C5\\u17C7\\u17C8\\u1923-\\u1926\\u1929-\\u192B\\u1930\\u1931\\u1933-\\u1938\\u1A19\\u1A1A\\u1A55\\u1A57\\u1A61\\u1A63\\u1A64\\u1A6D-\\u1A72\\u1B04\\u1B35\\u1B3B\\u1B3D-\\u1B41\\u1B43\\u1B44\\u1B82\\u1BA1\\u1BA6\\u1BA7\\u1BAA\\u1BE7\\u1BEA-\\u1BEC\\u1BEE\\u1BF2\\u1BF3\\u1C24-\\u1C2B\\u1C34\\u1C35\\u1CE1\\u1CF7\\u302E\\u302F\\uA823\\uA824\\uA827\\uA880\\uA881\\uA8B4-\\uA8C3\\uA952\\uA953\\uA983\\uA9B4\\uA9B5\\uA9BA\\uA9BB\\uA9BE-\\uA9C0\\uAA2F\\uAA30\\uAA33\\uAA34\\uAA4D\\uAA7B\\uAA7D\\uAAEB\\uAAEE\\uAAEF\\uAAF5\\uABE3\\uABE4\\uABE6\\uABE7\\uABE9\\uABEA\\uABEC",Me:"\\u0488\\u0489\\u1ABE\\u20DD-\\u20E0\\u20E2-\\u20E4\\uA670-\\uA672",Mn:"\\u0300-\\u036F\\u0483-\\u0487\\u0591-\\u05BD\\u05BF\\u05C1\\u05C2\\u05C4\\u05C5\\u05C7\\u0610-\\u061A\\u064B-\\u065F\\u0670\\u06D6-\\u06DC\\u06DF-\\u06E4\\u06E7\\u06E8\\u06EA-\\u06ED\\u0711\\u0730-\\u074A\\u07A6-\\u07B0\\u07EB-\\u07F3\\u07FD\\u0816-\\u0819\\u081B-\\u0823\\u0825-\\u0827\\u0829-\\u082D\\u0859-\\u085B\\u08D3-\\u08E1\\u08E3-\\u0902\\u093A\\u093C\\u0941-\\u0948\\u094D\\u0951-\\u0957\\u0962\\u0963\\u0981\\u09BC\\u09C1-\\u09C4\\u09CD\\u09E2\\u09E3\\u09FE\\u0A01\\u0A02\\u0A3C\\u0A41\\u0A42\\u0A47\\u0A48\\u0A4B-\\u0A4D\\u0A51\\u0A70\\u0A71\\u0A75\\u0A81\\u0A82\\u0ABC\\u0AC1-\\u0AC5\\u0AC7\\u0AC8\\u0ACD\\u0AE2\\u0AE3\\u0AFA-\\u0AFF\\u0B01\\u0B3C\\u0B3F\\u0B41-\\u0B44\\u0B4D\\u0B55\\u0B56\\u0B62\\u0B63\\u0B82\\u0BC0\\u0BCD\\u0C00\\u0C04\\u0C3E-\\u0C40\\u0C46-\\u0C48\\u0C4A-\\u0C4D\\u0C55\\u0C56\\u0C62\\u0C63\\u0C81\\u0CBC\\u0CBF\\u0CC6\\u0CCC\\u0CCD\\u0CE2\\u0CE3\\u0D00\\u0D01\\u0D3B\\u0D3C\\u0D41-\\u0D44\\u0D4D\\u0D62\\u0D63\\u0D81\\u0DCA\\u0DD2-\\u0DD4\\u0DD6\\u0E31\\u0E34-\\u0E3A\\u0E47-\\u0E4E\\u0EB1\\u0EB4-\\u0EBC\\u0EC8-\\u0ECD\\u0F18\\u0F19\\u0F35\\u0F37\\u0F39\\u0F71-\\u0F7E\\u0F80-\\u0F84\\u0F86\\u0F87\\u0F8D-\\u0F97\\u0F99-\\u0FBC\\u0FC6\\u102D-\\u1030\\u1032-\\u1037\\u1039\\u103A\\u103D\\u103E\\u1058\\u1059\\u105E-\\u1060\\u1071-\\u1074\\u1082\\u1085\\u1086\\u108D\\u109D\\u135D-\\u135F\\u1712-\\u1714\\u1732-\\u1734\\u1752\\u1753\\u1772\\u1773\\u17B4\\u17B5\\u17B7-\\u17BD\\u17C6\\u17C9-\\u17D3\\u17DD\\u180B-\\u180D\\u1885\\u1886\\u18A9\\u1920-\\u1922\\u1927\\u1928\\u1932\\u1939-\\u193B\\u1A17\\u1A18\\u1A1B\\u1A56\\u1A58-\\u1A5E\\u1A60\\u1A62\\u1A65-\\u1A6C\\u1A73-\\u1A7C\\u1A7F\\u1AB0-\\u1ABD\\u1ABF\\u1AC0\\u1B00-\\u1B03\\u1B34\\u1B36-\\u1B3A\\u1B3C\\u1B42\\u1B6B-\\u1B73\\u1B80\\u1B81\\u1BA2-\\u1BA5\\u1BA8\\u1BA9\\u1BAB-\\u1BAD\\u1BE6\\u1BE8\\u1BE9\\u1BED\\u1BEF-\\u1BF1\\u1C2C-\\u1C33\\u1C36\\u1C37\\u1CD0-\\u1CD2\\u1CD4-\\u1CE0\\u1CE2-\\u1CE8\\u1CED\\u1CF4\\u1CF8\\u1CF9\\u1DC0-\\u1DF9\\u1DFB-\\u1DFF\\u20D0-\\u20DC\\u20E1\\u20E5-\\u20F0\\u2CEF-\\u2CF1\\u2D7F\\u2DE0-\\u2DFF\\u302A-\\u302D\\u3099\\u309A\\uA66F\\uA674-\\uA67D\\uA69E\\uA69F\\uA6F0\\uA6F1\\uA802\\uA806\\uA80B\\uA825\\uA826\\uA82C\\uA8C4\\uA8C5\\uA8E0-\\uA8F1\\uA8FF\\uA926-\\uA92D\\uA947-\\uA951\\uA980-\\uA982\\uA9B3\\uA9B6-\\uA9B9\\uA9BC\\uA9BD\\uA9E5\\uAA29-\\uAA2E\\uAA31\\uAA32\\uAA35\\uAA36\\uAA43\\uAA4C\\uAA7C\\uAAB0\\uAAB2-\\uAAB4\\uAAB7\\uAAB8\\uAABE\\uAABF\\uAAC1\\uAAEC\\uAAED\\uAAF6\\uABE5\\uABE8\\uABED\\uFB1E\\uFE00-\\uFE0F\\uFE20-\\uFE2F",Nd:"0-9\\u0660-\\u0669\\u06F0-\\u06F9\\u07C0-\\u07C9\\u0966-\\u096F\\u09E6-\\u09EF\\u0A66-\\u0A6F\\u0AE6-\\u0AEF\\u0B66-\\u0B6F\\u0BE6-\\u0BEF\\u0C66-\\u0C6F\\u0CE6-\\u0CEF\\u0D66-\\u0D6F\\u0DE6-\\u0DEF\\u0E50-\\u0E59\\u0ED0-\\u0ED9\\u0F20-\\u0F29\\u1040-\\u1049\\u1090-\\u1099\\u17E0-\\u17E9\\u1810-\\u1819\\u1946-\\u194F\\u19D0-\\u19D9\\u1A80-\\u1A89\\u1A90-\\u1A99\\u1B50-\\u1B59\\u1BB0-\\u1BB9\\u1C40-\\u1C49\\u1C50-\\u1C59\\uA620-\\uA629\\uA8D0-\\uA8D9\\uA900-\\uA909\\uA9D0-\\uA9D9\\uA9F0-\\uA9F9\\uAA50-\\uAA59\\uABF0-\\uABF9\\uFF10-\\uFF19",Nl:"\\u16EE-\\u16F0\\u2160-\\u2182\\u2185-\\u2188\\u3007\\u3021-\\u3029\\u3038-\\u303A\\uA6E6-\\uA6EF",No:"\\xB2\\xB3\\xB9\\xBC-\\xBE\\u09F4-\\u09F9\\u0B72-\\u0B77\\u0BF0-\\u0BF2\\u0C78-\\u0C7E\\u0D58-\\u0D5E\\u0D70-\\u0D78\\u0F2A-\\u0F33\\u1369-\\u137C\\u17F0-\\u17F9\\u19DA\\u2070\\u2074-\\u2079\\u2080-\\u2089\\u2150-\\u215F\\u2189\\u2460-\\u249B\\u24EA-\\u24FF\\u2776-\\u2793\\u2CFD\\u3192-\\u3195\\u3220-\\u3229\\u3248-\\u324F\\u3251-\\u325F\\u3280-\\u3289\\u32B1-\\u32BF\\uA830-\\uA835",Pc:"_\\u203F\\u2040\\u2054\\uFE33\\uFE34\\uFE4D-\\uFE4F\\uFF3F",Pd:"\\-\\u058A\\u05BE\\u1400\\u1806\\u2010-\\u2015\\u2E17\\u2E1A\\u2E3A\\u2E3B\\u2E40\\u301C\\u3030\\u30A0\\uFE31\\uFE32\\uFE58\\uFE63\\uFF0D",Pe:"\\)\\]\\}\\u0F3B\\u0F3D\\u169C\\u2046\\u207E\\u208E\\u2309\\u230B\\u232A\\u2769\\u276B\\u276D\\u276F\\u2771\\u2773\\u2775\\u27C6\\u27E7\\u27E9\\u27EB\\u27ED\\u27EF\\u2984\\u2986\\u2988\\u298A\\u298C\\u298E\\u2990\\u2992\\u2994\\u2996\\u2998\\u29D9\\u29DB\\u29FD\\u2E23\\u2E25\\u2E27\\u2E29\\u3009\\u300B\\u300D\\u300F\\u3011\\u3015\\u3017\\u3019\\u301B\\u301E\\u301F\\uFD3E\\uFE18\\uFE36\\uFE38\\uFE3A\\uFE3C\\uFE3E\\uFE40\\uFE42\\uFE44\\uFE48\\uFE5A\\uFE5C\\uFE5E\\uFF09\\uFF3D\\uFF5D\\uFF60\\uFF63",Pf:"\\xBB\\u2019\\u201D\\u203A\\u2E03\\u2E05\\u2E0A\\u2E0D\\u2E1D\\u2E21",Pi:"\\xAB\\u2018\\u201B\\u201C\\u201F\\u2039\\u2E02\\u2E04\\u2E09\\u2E0C\\u2E1C\\u2E20",Po:"!-#%-'\\*,\\.\\/:;\\?@\\xA1\\xA7\\xB6\\xB7\\xBF\\u037E\\u0387\\u055A-\\u055F\\u0589\\u05C0\\u05C3\\u05C6\\u05F3\\u05F4\\u0609\\u060A\\u060C\\u060D\\u061B\\u061E\\u061F\\u066A-\\u066D\\u06D4\\u0700-\\u070D\\u07F7-\\u07F9\\u0830-\\u083E\\u085E\\u0964\\u0965\\u0970\\u09FD\\u0A76\\u0AF0\\u0C77\\u0C84\\u0DF4\\u0E4F\\u0E5A\\u0E5B\\u0F04-\\u0F12\\u0F14\\u0F85\\u0FD0-\\u0FD4\\u0FD9\\u0FDA\\u104A-\\u104F\\u10FB\\u1360-\\u1368\\u166E\\u16EB-\\u16ED\\u1735\\u1736\\u17D4-\\u17D6\\u17D8-\\u17DA\\u1800-\\u1805\\u1807-\\u180A\\u1944\\u1945\\u1A1E\\u1A1F\\u1AA0-\\u1AA6\\u1AA8-\\u1AAD\\u1B5A-\\u1B60\\u1BFC-\\u1BFF\\u1C3B-\\u1C3F\\u1C7E\\u1C7F\\u1CC0-\\u1CC7\\u1CD3\\u2016\\u2017\\u2020-\\u2027\\u2030-\\u2038\\u203B-\\u203E\\u2041-\\u2043\\u2047-\\u2051\\u2053\\u2055-\\u205E\\u2CF9-\\u2CFC\\u2CFE\\u2CFF\\u2D70\\u2E00\\u2E01\\u2E06-\\u2E08\\u2E0B\\u2E0E-\\u2E16\\u2E18\\u2E19\\u2E1B\\u2E1E\\u2E1F\\u2E2A-\\u2E2E\\u2E30-\\u2E39\\u2E3C-\\u2E3F\\u2E41\\u2E43-\\u2E4F\\u2E52\\u3001-\\u3003\\u303D\\u30FB\\uA4FE\\uA4FF\\uA60D-\\uA60F\\uA673\\uA67E\\uA6F2-\\uA6F7\\uA874-\\uA877\\uA8CE\\uA8CF\\uA8F8-\\uA8FA\\uA8FC\\uA92E\\uA92F\\uA95F\\uA9C1-\\uA9CD\\uA9DE\\uA9DF\\uAA5C-\\uAA5F\\uAADE\\uAADF\\uAAF0\\uAAF1\\uABEB\\uFE10-\\uFE16\\uFE19\\uFE30\\uFE45\\uFE46\\uFE49-\\uFE4C\\uFE50-\\uFE52\\uFE54-\\uFE57\\uFE5F-\\uFE61\\uFE68\\uFE6A\\uFE6B\\uFF01-\\uFF03\\uFF05-\\uFF07\\uFF0A\\uFF0C\\uFF0E\\uFF0F\\uFF1A\\uFF1B\\uFF1F\\uFF20\\uFF3C\\uFF61\\uFF64\\uFF65",Ps:"\\(\\[\\{\\u0F3A\\u0F3C\\u169B\\u201A\\u201E\\u2045\\u207D\\u208D\\u2308\\u230A\\u2329\\u2768\\u276A\\u276C\\u276E\\u2770\\u2772\\u2774\\u27C5\\u27E6\\u27E8\\u27EA\\u27EC\\u27EE\\u2983\\u2985\\u2987\\u2989\\u298B\\u298D\\u298F\\u2991\\u2993\\u2995\\u2997\\u29D8\\u29DA\\u29FC\\u2E22\\u2E24\\u2E26\\u2E28\\u2E42\\u3008\\u300A\\u300C\\u300E\\u3010\\u3014\\u3016\\u3018\\u301A\\u301D\\uFD3F\\uFE17\\uFE35\\uFE37\\uFE39\\uFE3B\\uFE3D\\uFE3F\\uFE41\\uFE43\\uFE47\\uFE59\\uFE5B\\uFE5D\\uFF08\\uFF3B\\uFF5B\\uFF5F\\uFF62",Sc:"\\$\\xA2-\\xA5\\u058F\\u060B\\u07FE\\u07FF\\u09F2\\u09F3\\u09FB\\u0AF1\\u0BF9\\u0E3F\\u17DB\\u20A0-\\u20BF\\uA838\\uFDFC\\uFE69\\uFF04\\uFFE0\\uFFE1\\uFFE5\\uFFE6",Sk:"\\^`\\xA8\\xAF\\xB4\\xB8\\u02C2-\\u02C5\\u02D2-\\u02DF\\u02E5-\\u02EB\\u02ED\\u02EF-\\u02FF\\u0375\\u0384\\u0385\\u1FBD\\u1FBF-\\u1FC1\\u1FCD-\\u1FCF\\u1FDD-\\u1FDF\\u1FED-\\u1FEF\\u1FFD\\u1FFE\\u309B\\u309C\\uA700-\\uA716\\uA720\\uA721\\uA789\\uA78A\\uAB5B\\uAB6A\\uAB6B\\uFBB2-\\uFBC1\\uFF3E\\uFF40\\uFFE3",Sm:"\\+<->\\|~\\xAC\\xB1\\xD7\\xF7\\u03F6\\u0606-\\u0608\\u2044\\u2052\\u207A-\\u207C\\u208A-\\u208C\\u2118\\u2140-\\u2144\\u214B\\u2190-\\u2194\\u219A\\u219B\\u21A0\\u21A3\\u21A6\\u21AE\\u21CE\\u21CF\\u21D2\\u21D4\\u21F4-\\u22FF\\u2320\\u2321\\u237C\\u239B-\\u23B3\\u23DC-\\u23E1\\u25B7\\u25C1\\u25F8-\\u25FF\\u266F\\u27C0-\\u27C4\\u27C7-\\u27E5\\u27F0-\\u27FF\\u2900-\\u2982\\u2999-\\u29D7\\u29DC-\\u29FB\\u29FE-\\u2AFF\\u2B30-\\u2B44\\u2B47-\\u2B4C\\uFB29\\uFE62\\uFE64-\\uFE66\\uFF0B\\uFF1C-\\uFF1E\\uFF5C\\uFF5E\\uFFE2\\uFFE9-\\uFFEC",So:"\\xA6\\xA9\\xAE\\xB0\\u0482\\u058D\\u058E\\u060E\\u060F\\u06DE\\u06E9\\u06FD\\u06FE\\u07F6\\u09FA\\u0B70\\u0BF3-\\u0BF8\\u0BFA\\u0C7F\\u0D4F\\u0D79\\u0F01-\\u0F03\\u0F13\\u0F15-\\u0F17\\u0F1A-\\u0F1F\\u0F34\\u0F36\\u0F38\\u0FBE-\\u0FC5\\u0FC7-\\u0FCC\\u0FCE\\u0FCF\\u0FD5-\\u0FD8\\u109E\\u109F\\u1390-\\u1399\\u166D\\u1940\\u19DE-\\u19FF\\u1B61-\\u1B6A\\u1B74-\\u1B7C\\u2100\\u2101\\u2103-\\u2106\\u2108\\u2109\\u2114\\u2116\\u2117\\u211E-\\u2123\\u2125\\u2127\\u2129\\u212E\\u213A\\u213B\\u214A\\u214C\\u214D\\u214F\\u218A\\u218B\\u2195-\\u2199\\u219C-\\u219F\\u21A1\\u21A2\\u21A4\\u21A5\\u21A7-\\u21AD\\u21AF-\\u21CD\\u21D0\\u21D1\\u21D3\\u21D5-\\u21F3\\u2300-\\u2307\\u230C-\\u231F\\u2322-\\u2328\\u232B-\\u237B\\u237D-\\u239A\\u23B4-\\u23DB\\u23E2-\\u2426\\u2440-\\u244A\\u249C-\\u24E9\\u2500-\\u25B6\\u25B8-\\u25C0\\u25C2-\\u25F7\\u2600-\\u266E\\u2670-\\u2767\\u2794-\\u27BF\\u2800-\\u28FF\\u2B00-\\u2B2F\\u2B45\\u2B46\\u2B4D-\\u2B73\\u2B76-\\u2B95\\u2B97-\\u2BFF\\u2CE5-\\u2CEA\\u2E50\\u2E51\\u2E80-\\u2E99\\u2E9B-\\u2EF3\\u2F00-\\u2FD5\\u2FF0-\\u2FFB\\u3004\\u3012\\u3013\\u3020\\u3036\\u3037\\u303E\\u303F\\u3190\\u3191\\u3196-\\u319F\\u31C0-\\u31E3\\u3200-\\u321E\\u322A-\\u3247\\u3250\\u3260-\\u327F\\u328A-\\u32B0\\u32C0-\\u33FF\\u4DC0-\\u4DFF\\uA490-\\uA4C6\\uA828-\\uA82B\\uA836\\uA837\\uA839\\uAA77-\\uAA79\\uFDFD\\uFFE4\\uFFE8\\uFFED\\uFFEE\\uFFFC\\uFFFD",Zl:"\\u2028",Zp:"\\u2029",Zs:" \\xA0\\u1680\\u2000-\\u200A\\u202F\\u205F\\u3000"},p.C=p.Cc+p.Cf+p.Cs+p.Co,p.L=p.Lu+p.Ll+p.Lt+p.Lm+p.Mn+p.Lo,p.LC=p.Lu+p.Ll+p.Lt,p.M=p.Mn+p.Mc+p.Me,p.N=p.Nd+p.Nl+p.No,p.P=p.Pc+p.Pd+p.Ps+p.Pe+p.Pi+p.Pf+p.Po,p.S=p.Sm+p.Sc+p.Sk+p.So,p.Z=p.Zs+p.Zl+p.Zp,p.w="_"+p.L+p.N,p.b="(?:["+p.w+"](?:[^"+p.w+"]|$)|(?:^|[^"+p.w+"])["+p.w+"])",p.bOut="(?=[^"+p.w+"]|$)",p.bIn="(?:^|[^"+p.w+"])",p.bInCapture="(?:^|([^"+p.w+"]))",p.B="(?:["+p.w+"]["+p.w+"]|[^"+p.w+"][^"+p.w+"])",p.d=p.N;var t=Sk.token.tokens;let s=Sk.builtin.SyntaxError,c=Sk.builtin.SyntaxError;i.prototype.exact_type=function(){return this.type==t.T_OP&&this.string in Sk.token.EXACT_TOKEN_TYPES?Sk.token.EXACT_TOKEN_TYPES[this.string]:this.type};var o=/[\\^$.*+?()[\]{}|]/g,d=RegExp(o.source);let{Lu:u,Ll:f,Lt:$,Lm:m,Lo:_,Nl:v,Mn:A,Mc:N,Nd:M,Pc:R}=p;p=u+f+$+m+_+v+"_\\u1885-\\u1886\\u2118\\u212E\\u309B-\\u309C";let H="["+p+"]+["+(p+A+N+M+R+"\\u00B7\\u0387\\u1369-\\u1371\\u19DA]*"),ee=new RegExp("^"+H+"$");Sk.token.isIdentifier=h,function(Q){return n.apply(null,arguments)+"*"}("\\\\\\r?\\n[ \\f\\t]*"),r("#[^\\r\\n]*"),p=n("[0-9](?:_?[0-9])*\\.(?:[0-9](?:_?[0-9])*)?","\\.[0-9](?:_?[0-9])*")+r("[eE][-+]?[0-9](?:_?[0-9])*");var J=n(p,"[0-9](?:_?[0-9])*[eE][-+]?[0-9](?:_?[0-9])*"),g=n("[0-9](?:_?[0-9])*[jJ]",J+"[jJ]");p=n.apply(null,a()),b=n(p+"'''",p+'"""'),n(p+"'[^\\n'\\\\]*(?:\\\\.[^\\n'\\\\]*)*'",p+'"[^\\n"\\\\]*(?:\\\\.[^\\n"\\\\]*)*"');var x,C,F;S(!0),Sk.token.setupTokens=S;var P=n(p+"'[^\\n'\\\\]*(?:\\\\.[^\\n'\\\\]*)*"+n("'","\\\\\\r?\\n"),p+'"[^\\n"\\\\]*(?:\\\\.[^\\n"\\\\]*)*'+n('"',"\\\\\\r?\\n")),D=n("\\\\\\r?\\n|$","#[^\\r\\n]*",b),U={};p=a();for(let Q of p)U[Q+"'"]="^[^'\\\\]*(?:\\\\.[^'\\\\]*)*'",U[Q+'"']='^[^"\\\\]*(?:\\\\.[^"\\\\]*)*"',U[Q+"'''"]="^[^'\\\\]*(?:(?:\\\\.|'(?!''))[^'\\\\]*)*'''",U[Q+'"""']='^[^"\\\\]*(?:(?:\\\\.|"(?!""))[^"\\\\]*)*"""';let K=[],te=[];for(let Q of p)K.push(Q+'"'),K.push(Q+"'"),te.push(Q+'"""'),te.push(Q+"'''");Sk._tokenize=function(Q,oe,ie,ce){var Y=Sk.__future__.python3?"":"(?:L?)";Y=n("0[xX](?:_?[0-9a-fA-F])+"+Y,"0[bB](?:_?[01])+"+Y,Sk.__future__.silent_octal_literal?"0([oO]?)(?:_?[0-7])+"+Y:"0([oO])(?:_?[0-7])+"+Y,"(?:0(?:_?0)*|[1-9](?:_?[0-9])*)"+Y),Y=n(g,J,Y),Y="[ \\f\\t]*"+n(D,Y,F,P,H),Y=new RegExp(Y);var pe=0,z=0,G=0,he="",B=0,q=null,Z=[0],E,y=void 0,T=void 0,I,j;ie!==void 0&&(ie=="utf-8-sig"&&(ie="utf-8"),ce(new i(t.T_ENCODING,ie,[0,0],[0,0],"")));for(var O=ie="";;){try{ie=O,O=oe()}catch{O=""}pe+=1;var L=0,V=O.length;if(he){if(!O)throw new s("EOF in multi-line string",Q,T[0],T[1]);y.lastIndex=0;var X=y.exec(O);if(X)L=I=X[0].length,ce(new i(t.T_STRING,he+O.substring(0,I),T,[pe,I],q+O)),he="",B=0,q=null;else{B&&O.substring(O.length-2)!==`\\ `&&O.substring(O.length-3)!==`\\\r -`?(ce(new i(t.T_ERRORTOKEN,he+O,T,[pe,O.length],q)),he="",q=null):(he+=O,q+=O);continue}}else if(z!=0||G){if(!O)throw new s("EOF in multi-line statement",Z,pe,0);G=0}else{if(!O)break;for(E=0;jX[X.length-1]&&(X.push(E),ce(new i(t.T_INDENT,O.substring(j),[pe,0],[pe,j],O)));E{Sk.builtinFiles={files:{"src/builtin/this.py":`s = """Gur Mra bs Clguba, ol Gvz Crgref +`?(ce(new i(t.T_ERRORTOKEN,he+O,T,[pe,O.length],q)),he="",q=null):(he+=O,q+=O);continue}}else if(z!=0||G){if(!O)throw new s("EOF in multi-line statement",Q,pe,0);G=0}else{if(!O)break;for(E=0;LZ[Z.length-1]&&(Z.push(E),ce(new i(t.T_INDENT,O.substring(L),[pe,0],[pe,L],O)));E{Sk.builtinFiles={files:{"src/builtin/this.py":`s = """Gur Mra bs Clguba, ol Gvz Crgref Ornhgvshy vf orggre guna htyl. Rkcyvpvg vf orggre guna vzcyvpvg. @@ -3833,91 +3833,3116 @@ class TestCaseGui(TestCase): `,"src/lib/xmllib.py":`import _sk_fail; _sk_fail._("xmllib") `,"src/lib/xmlrpclib.py":`import _sk_fail; _sk_fail._("xmlrpclib") `,"src/lib/zipfile.py":`import _sk_fail; _sk_fail._("zipfile") -`,"src/builtin/sys.js":'var $builtinmodule=function(i){var t,n={},e=[],u=Sk.getSysArgv();for(t=0;tnew Sk.builtin.str("utf-8"))),n.getExecutionLimit=new Sk.builtin.func((function(){return null===Sk.execLimit?Sk.builtin.none.none$:new Sk.builtin.int_(Sk.execLimit)})),n.setExecutionLimit=new Sk.builtin.func((function(i){if(null===Sk.execLimit)throw new Sk.builtin.NotImplementedError("Execution limiting is not enabled");void 0!==i&&(Sk.execLimit=Sk.builtin.asnum$(i))})),n.resetTimeout=new Sk.builtin.func((function(){Sk.execStart=new Date})),n.getYieldLimit=new Sk.builtin.func((function(){return null===Sk.yieldLimit?Sk.builtin.none.none$:new Sk.builtin.int_(Sk.yieldLimit)})),n.setYieldLimit=new Sk.builtin.func((function(i){if(null===Sk.yieldLimit)throw new Sk.builtin.NotImplementedError("Yielding is not enabled");void 0!==i&&(Sk.yieldLimit=Sk.builtin.asnum$(i))})),n.debug=new Sk.builtin.func((function(){return Sk.builtin.none.none$}));const o=Sk.builtin.make_structseq("sys","float_info",{max:"DBL_MAX -- maximum representable finite float",max_exp:"DBL_MAX_EXP -- maximum int e such that radix**(e-1) is representable",max_10_exp:"DBL_MAX_10_EXP -- maximum int e such that 10**e is representable",min:"DBL_MIN -- Minimum positive normalized float",min_exp:"DBL_MIN_EXP -- minimum int e such that radix**(e-1) is a normalized float",min_10_exp:"DBL_MIN_10_EXP -- minimum int e such that 10**e is a normalized",dig:"DBL_DIG -- digits",mant_dig:"DBL_MANT_DIG -- mantissa digits",epsilon:"DBL_EPSILON -- Difference between 1 and the next representable float",radix:"FLT_RADIX -- radix of exponent",rounds:"FLT_ROUNDS -- rounding mode"});n.float_info=new o([Number.MAX_VALUE,Math.floor(Math.log2(Number.MAX_VALUE)),Math.floor(Math.log10(Number.MAX_VALUE)),Number.MIN_VALUE,Math.ceil(Math.log2(Number.MIN_VALUE)),Math.ceil(Math.log10(Number.MIN_VALUE)),15,Math.log2(Number.MAX_SAFE_INTEGER),Number.EPSILON,2,1].map((i=>Sk.ffi.remapToPy(i))));const s=Sk.builtin.make_structseq("sys","int_info",{bits_per_digit:"size of a digit in bits",sizeof_digit:"size in bytes of the C type used to represent a digit"});n.int_info=new s([30,4].map((i=>Sk.ffi.remapToPy(i))));const l=Sk.builtin.make_structseq("sys","hash_info",{width:"width of the type used for hashing, in bits",modulus:"prime number giving the modulus on which the hash function is based",inf:"value to be used for hash of a positive infinity",nan:"value to be used for hash of a nan",imag:"multiplier used for the imaginary part of a complex number",algorithm:"name of the algorithm for hashing of str, bytes and memoryviews",hash_bits:"internal output size of hash algorithm",seed_bits:"seed size of hash algorithm",cutoff:"small string optimization cutoff"});return n.hash_info=new l([32,536870911,314159,0,1000003,"siphash24",32,128,0].map((i=>Sk.ffi.remapToPy(i)))),n.__stdout__=new Sk.builtin.file(new Sk.builtin.str("/dev/stdout"),new Sk.builtin.str("w")),n.__stdin__=new Sk.builtin.file(new Sk.builtin.str("/dev/stdin"),new Sk.builtin.str("r")),n.stdout=n.__stdout__,n.stdin=n.__stdin__,n};',"src/lib/_strptime.js":`function $builtinmodule(){const e=Sk.builtin.int_,t=Sk.builtin.none.none$,i=Sk.builtin.str,s=Sk.builtin.tuple,n=Sk.misceval.callsimOrSuspendArray,{isTrue:a,richCompareBool:r,chain:l}=Sk.misceval,{typeName:o,setUpModuleMethods:_,buildNativeClass:c}=Sk.abstr,{TypeError:m,ValueError:d,KeyError:h,IndexError:f,checkString:u,asnum$:w}=Sk.builtin,{remapToPy:p,remapToJs:g}=Sk.ffi,{getAttr:$,setAttr:y}=Sk.generic,S=l,k=/^[0-9]+$/;function _as_integer(e){if(!k.test(e))throw new d(\`invalid literal for int() with base 10: '\${e}'\`);return parseInt(e)}const b=/([\\\\.^$*+?\\(\\){}\\[\\]|])/g,v=/\\s+/g;let O=Sk.importModule("time",!1,!0),z=Sk.importModule("datetime",!1,!0);const L=S(z,(e=>(z=e.$d,O)),(e=>{O=e.$d}));return S(L,(()=>{function _strftime(e){return t=>e.$strftime(t).toString().toLowerCase()}function _strftime_timetuple(e,t){return O.strftime.tp$call([new i(e),t]).toString().toLowerCase()}const l=new i("fromordinal");function _struct_time(t){return O.struct_time.tp$call([new s(t.map((t=>new e(t))))])}function _localized_month(){const e=[()=>""];for(let t=0;t<12;t++){const i=new k(2001,t+1,1);e.push(_strftime(i))}return e}function _localized_day(){const e=[];for(let t=0;t<7;t++){const i=new k(2001,1,t+1);e.push(_strftime(i))}return e}const S={__name__:new i("_strptime")},k=z.date,L=z.timedelta,E=z.timezone;function _getlang(){return[t,t]}class LocaleTime{constructor(){this.lang=_getlang(),this.__calc_weekday(),this.__calc_month(),this.__calc_am_pm(),this.__calc_timezone(),this.__calc_date_time()}__calc_weekday(){this.a_weekday=_localized_day().map((e=>e("%a"))),this.f_weekday=_localized_day().map((e=>e("%A")))}__calc_month(){this.a_month=_localized_month().map((e=>e("%b"))),this.f_month=_localized_month().map((e=>e("%B")))}__calc_am_pm(){const e=[];[1,22].forEach((t=>{const i=_strftime_timetuple("%p",_struct_time([1999,3,17,t,44,55,2,76,0]));e.push(i)})),this.am_pm=e}__calc_date_time(){const e=_struct_time([1999,3,17,22,44,55,2,76,0]),i=[t,t,t];i[0]=_strftime_timetuple("%c",e),i[1]=_strftime_timetuple("%x",e),i[2]=_strftime_timetuple("%X",e);const s=[["%","%%"],[this.f_weekday[2],"%A"],[this.f_month[3],"%B"],[this.a_weekday[2],"%a"],[this.a_month[3],"%b"],[this.am_pm[1],"%p"],["1999","%Y"],["99","%y"],["22","%H"],["44","%M"],["55","%S"],["76","%j"],["17","%d"],["03","%m"],["3","%m"],["2","%w"],["10","%I"]];s.push(...this.timezone.flat().map((e=>[e,"%Z"]))),[[0,"%c"],[1,"%x"],[2,"%X"]].forEach((([e,t])=>{let n=i[e];s.forEach((([e,t])=>{e&&(n=n.replace(e,t))}));let a;a=_strftime_timetuple(t,_struct_time([1999,1,3,1,1,1,6,3,0])).includes("00")?"%W":"%U",i[e]=n.replace("11",a)})),this.LC_date_time=i[0],this.LC_date=i[1],this.LC_time=i[2]}__calc_timezone(){try{O.tzset.tp$call([])}catch{}this.tzname=O.tzname.v.map((e=>e.toString())),this.daylight=w(O.daylight);const e=[this.tzname[0].toLowerCase(),"utc","gmt"];let t;t=this.daylight?[this.tzname[1].toLowerCase()]:[],this.timezone=[e,t]}}class TimeRE{constructor(e=null){this.locale_time=e||new LocaleTime,Object.assign(this,{d:"(?3[0-1]|[1-2]\\\\d|0[1-9]|[1-9]| [1-9])",f:"(?[0-9]{1,6})",H:"(?2[0-3]|[0-1]\\\\d|\\\\d)",I:"(?1[0-2]|0[1-9]|[1-9])",G:"(?\\\\d\\\\d\\\\d\\\\d)",j:"(?36[0-6]|3[0-5]\\\\d|[1-2]\\\\d\\\\d|0[1-9]\\\\d|00[1-9]|[1-9]\\\\d|0[1-9]|[1-9])",m:"(?1[0-2]|0[1-9]|[1-9])",M:"(?[0-5]\\\\d|\\\\d)",S:"(?6[0-1]|[0-5]\\\\d|\\\\d)",U:"(?5[0-3]|[0-4]\\\\d|\\\\d)",w:"(?[0-6])",u:"(?[1-7])",V:"(?5[0-3]|0[1-9]|[1-4]\\\\d|\\\\d)",y:"(?\\\\d\\\\d)",Y:"(?\\\\d\\\\d\\\\d\\\\d)",z:"(?[+-]\\\\d\\\\d:?[0-5]\\\\d(:?[0-5]\\\\d(\\\\.\\\\d{1,6})?)?|Z)",A:this.__seqToRE(this.locale_time.f_weekday,"A"),a:this.__seqToRE(this.locale_time.a_weekday,"a"),B:this.__seqToRE(this.locale_time.f_month.slice(1),"B"),b:this.__seqToRE(this.locale_time.a_month.slice(1),"b"),p:this.__seqToRE(this.locale_time.am_pm,"p"),Z:this.__seqToRE(this.locale_time.timezone.flat(),"Z"),"%":"%"}),this.W=this.U.replace("U","W"),this.x=this.pattern(this.locale_time.LC_date),this.X=this.pattern(this.locale_time.LC_time),this.c=this.pattern(this.locale_time.LC_date_time)}__seqToRE(e,t){if((e=e.slice(0).sort(((e,t)=>t.length-e.length))).every((e=>""===e)))return"";return\`(?<\${t}>\${e.map((e=>e)).join("|")})\`}pattern(e){let t="";for(e=(e=e.replace(b,"\\\\$1")).replace(v,"\\\\s+");e.includes("%");){const i=e.indexOf("%")+1,s=this[e[i]];if(void 0===s)throw new h(e[i]);t=\`\${t}\${e.slice(0,i-1)}\${s}\`,e=e.slice(i+1)}return t+e}compile(e){return new RegExp("^"+this.pattern(e),"i")}}let C=new TimeRE;let T={};function _strptime(i,s="%a %b %d %H:%M:%S %Y"){function _checkString(e,t){if("string"!=typeof e&&!u(e))throw new m(\`strptime() argument \${t} must be a str, not '\${o(e)}'\`)}_checkString(i,0),_checkString(s,1),i=i.toString(),s=s.toString();let n,_=C.locale_time;if(Object.keys(T).length>5&&(T={}),n=T[s],void 0===n)try{n=C.compile(s)}catch(R){if(R instanceof h){let e=R.args.v[0];throw"\\\\"==e&&(e="%"),new d(\`'\${e}' is a bad directive in format '\${s}'\`)}if(R instanceof f)throw new d("stray %% in format '"+s+"'");throw R}const c=i.match(n);if(null===c)throw new d(\`time data '\${i}' does not match format '\${s}'\`);if(i.length!==c[0].length)throw new d(\`unconverted data remains: \${i.slice(c[0].length)}\`);let w=t,p=t,g=1,$=1,y=0,S=0,b=0,v=0,z=-1,L=t,E=0,A=t,I=t,M=t,H=t,Y=t,j=c.groups||{};if(Object.keys(j).forEach((e=>{if(void 0!==j[e])if("y"===e)p=_as_integer(j.y),p+=p<=68?2e3:1900;else if("Y"===e)p=_as_integer(j.Y);else if("G"===e)w=_as_integer(j.G);else if("m"===e)g=_as_integer(j.m);else if("B"===e)g=_.f_month.indexOf(j.B.toLowerCase());else if("b"===e)g=_.a_month.indexOf(j.b.toLowerCase());else if("d"===e)$=_as_integer(j.d);else if("H"===e)y=_as_integer(j.H);else if("H"===e)y=_as_integer(j.H);else if("I"===e){y=_as_integer(j.I);const e=(j.p||"").toLowerCase();["",_.am_pm[0]].includes(e)?12===y&&(y=0):e===_.am_pm[1]&&12!==y&&(y+=12)}else if("M"===e)S=_as_integer(j.M);else if("S"===e)b=_as_integer(j.S);else if("f"===e){let e=j.f;e+="0".repeat(6-e.length),v=_as_integer(e)}else if("A"===e)H=_.f_weekday.indexOf(j.A.toLowerCase());else if("a"===e)H=_.a_weekday.indexOf(j.a.toLowerCase());else if("w"===e)H=_as_integer(j.w),0===H?H=6:H-=1;else if("u"===e)H=_as_integer(j.u),H-=1;else if("j"===e)Y=_as_integer(j.j);else if(["U","W"].includes(e))I=_as_integer(j[e]),M="U"===e?6:0;else if("V"===e)A=_as_integer(j.V);else if("z"===e){let e=j.z;if("Z"===e)L=0;else{if(":"===e[3]&&(e=e.slice(0,3)+e.slice(4),e.length>5)){if(":"!==e[5]){const e=\`Inconsistent use of : in \${j.z}\`;throw new d(e)}e=e.slice(0,5)+e.slice(6)}const t=_as_integer(e.slice(1,3)),i=_as_integer(e.slice(3,5)),s=_as_integer(e.slice(5,7)||0);L=3600*t+60*i+s;const n=e.slice(8),a="0".repeat(6-n.length);E=_as_integer(n+a),e.startsWith("-")&&(L=-L,E=-E)}}else if("Z"===e){let e=j.Z.toLowerCase(),t=0;for(let i of _.timezone){if(i.includes(e)){const i=O.tzname.v;if(r(i[0],i[1],"Eq")&&a(O.daylight)&&!["utc","gmt"].includes(e))break;z=t}t++}}})),p===t&&w!==t){if(A===t||H===t)throw new d("ISO year directive '%G' must be used with the ISO week directive '%V' and a weekday directive ('%A','%a', '%w', or '%u').");if(Y!==t)throw new d("Day of the year directive '%j' is not compatible with ISO year directive '%G'.Use '%Y' instead.")}else if(I===t&&A!==t)throw new d(H===t?"ISO week directive '%V' must be used with the ISO year directive '%G' and a weekday directive ('%A', '%a', '%w', or '%u').":"ISO week directive '%V' is incompatible with the year directive '%Y'. Use the ISO year '%G' instead.");let U=!1;if(p===t&&2===g&&29===$?(p=1904,U=!0):p===t&&(p=1900),Y===t&&H!==t){if(I!==t){Y=function _calc_julian_from_U_or_W(e,t,i,s){let n=(new k(e,1,1).$toOrdinal()+6)%7;return s||(n=(n+1)%7,i=(i+1)%7),0===t?1+i-n:(7-n)%7+7*(t-1)+1+i}(p,I,H,0===M)}else w!==t&&A!==t&&([p,Y]=function _calc_julian_from_V(e,t,i){let s=7*t+i-((new k(e,1,4).$toOrdinal()%7||7)+3);return s<1&&(s+=new k(e,1,1).$toOrdinal(),s-=new k(e-=1,1,1).$toOrdinal()),[e,s]}(w,A,H+1));if(Y!==t&&Y<=0){p-=1;const e=function _is_leap(e){return e%4==0&&(e%100!=0||e%400==0)}(p)?366:365;Y+=e}}if(Y===t)Y=new k(p,g,$).$toOrdinal()-new k(p,1,1).$toOrdinal()+1;else{const t=function _fromordinal(t){return k.tp$getattr(l).tp$call([new e(t)])}(Y-1+new k(p,1,1).$toOrdinal());p=t.$year,g=t.$month,$=t.$day}H===t&&(H=(new k(p,g,$).$toOrdinal()+6)%7);const x=j.Z||t;return U&&(p=1900),[[p,g,$,y,S,b,H,Y,z,x,L],v,E]}return _("_strptime",S,{_strptime_time:{$meth:function _strptime_time(t,i="%a %b %d %H:%M:%S %Y"){let n=_strptime(t,i)[0].slice(0,11);return n=n.map(((t,i)=>i<9?new e(t):p(t))),O.struct_time.tp$call([new s(n)])},$flags:{NamedArgs:["data_string","format"],Defaults:["%a %b %d %H:%M:%S %Y"]}},_strptime_datetime:{$meth:function _strptime_datetime(s,r,l="%a %b %d %H:%M:%S %Y"){const[o,_,c]=_strptime(r,l),[m,d]=o.slice(-2),h=o.slice(0,6);let f,u;return h.push(_),h.map((t=>new e(t))),d!==t&&(f=new L(0,d,c),u=a(m)?new E(f,new i(m)):new E(f),h.push(u)),n(s,h)},$flags:{NamedArgs:["cls","data_string","format"],Defaults:["%a %b %d %H:%M:%S %Y"]}},_strptime:{$meth(i,n){const a=_strptime(i,n);return a[0]=new s(a[0].map((i=>i===t?i:new e(i)))),a[1]=new e(a[1]),a[2]=new e(a[2]),new s(a)},$flags:{NamedArgs:["data_string","format"],Defaults:["%a %b %d %H:%M:%S %Y"]}},_getlang:{$meth:()=>p(_getlang()),$flags:{NoArgs:!0}}}),S.LocaleTime=c("_strptime.LocaleTime",{constructor:function(){this.v=new LocaleTime},slots:{tp$getattr(e,t){return this.v.hasOwnProperty(e.toString())?p(this.v[e.toString()]):$.call(this,e,t)},tp$setattr(e,t){if(!this.v.hasOwnProperty(e.toString()))return y.call(this,e,t);this.v[e.toString()]=g(t)}}}),S}))}`,"src/lib/array.js":`function $builtinmodule(e){var n={},t=["c","b","B","u","h","H","i","I","l","L","f","d"];return n.__name__=new Sk.builtin.str("array"),n.array=Sk.misceval.buildClass(n,(function(e,n){n.__init__=new Sk.builtin.func((function(e,n,i){if(Sk.builtin.pyCheckArgsLen("__init__",arguments.length,2,3),-1==t.indexOf(Sk.ffi.remapToJs(n)))throw new Sk.builtin.ValueError("bad typecode (must be c, b, B, u, h, H, i, I, l, L, f or d)");if(i&&!Sk.builtin.checkIterable(i))throw new Sk.builtin.TypeError("iteration over non-sequence");if(e.$d.mp$ass_subscript(new Sk.builtin.str("typecode"),n),e.$d.mp$ass_subscript(new Sk.builtin.str("__module__"),new Sk.builtin.str("array")),e.typecode=n,void 0===i)e.internalIterable=new Sk.builtin.list;else if(i instanceof Sk.builtin.list)e.internalIterable=i;else{e.internalIterable=new Sk.builtin.list;for(let n=Sk.abstr.iter(i),t=n.tp$iternext();void 0!==t;t=n.tp$iternext())Sk.misceval.callsimArray(e.internalIterable.append,[e.internalIterable,t])}})),n.__repr__=new Sk.builtin.func((function(e){var n=Sk.ffi.remapToJs(e.typecode),t="";return Sk.ffi.remapToJs(e.internalIterable).length&&(t="c"==Sk.ffi.remapToJs(e.typecode)?", '"+Sk.ffi.remapToJs(e.internalIterable).join("")+"'":", "+Sk.ffi.remapToJs(Sk.misceval.callsimArray(e.internalIterable.__repr__,[e.internalIterable]))),new Sk.builtin.str("array('"+n+"'"+t+")")})),n.__str__=n.__repr__,n.__getattribute__=new Sk.builtin.func((function(e,n){return e.tp$getattr(n)})),n.append=new Sk.builtin.func((function(e,n){return Sk.misceval.callsimArray(e.internalIterable.append,[e.internalIterable,n]),Sk.builtin.none.none$})),n.extend=new Sk.builtin.func((function(e,n){if(Sk.builtin.pyCheckArgsLen("__init__",arguments.length,2,2),!Sk.builtin.checkIterable(n))throw new Sk.builtin.TypeError("iteration over non-sequence");for(let t=Sk.abstr.iter(n),i=t.tp$iternext();void 0!==i;i=t.tp$iternext())Sk.misceval.callsimArray(e.internalIterable.append,[e.internalIterable,i])}))}),"array",[]),n}`,"src/lib/calendar.js":'function $builtinmodule(e){const t={},{misceval:{chain:n},importModule:r}=Sk,importOrSuspend=e=>r(e,!1,!0);return n(importOrSuspend("datetime"),(e=>(t.datetime=e,importOrSuspend("itertools"))),(e=>(t.iterRepeat=e.$d.repeat,t.iterChain=e.$d.chain,calendarModule(t))))}function calendarModule(e){const{abstr:{setUpModuleMethods:t,numberBinOp:n,iter:r,objectGetItem:o},builtin:{bool:s,bool:{true$:m,false$:d},func:l,int_:i,list:c,none:{none$:f},str:h,slice:w,tuple:y,range:u,max:_,min:g,property:k,print:p,enumerate:$,ValueError:b},ffi:{remapToPy:M},misceval:{isTrue:T,iterator:C,arrayFromIterable:O,buildClass:L,richCompareBool:x,asIndexOrThrow:F,objectRepr:I,callsimArray:A},global:v,global:{strftime:E}}=Sk,S=new i(0),H=new i(1),D=new i(2),N=new i(3),R=new i(6),j=new i(7),J=new i(9),P=new i(12),Y=new i(13),U=new i(24),z=new i(60),le=(e,t)=>x(e,t,"LtE"),eq=(e,t)=>x(e,t,"Eq"),mod=(e,t)=>n(e,t,"Mod"),add=(e,t)=>n(e,t,"Add"),sub=(e,t)=>n(e,t,"Sub"),mul=(e,t)=>n(e,t,"Mult"),inc=e=>add(e,H),dec=e=>sub(e,H),mod7=e=>mod(e,j),getA=(e,t)=>e.tp$getattr(new h(t)),callA=(e,t,...n)=>A(e.tp$getattr(new h(t)),n);function*iterJs(e){const t=r(e);let n;for(;n=t.tp$iternext();)yield n}function iterFn(e,t){return e=r(e),new C((()=>{const n=e.tp$iternext();return n&&t(n)}),!0)}function makePyMethod(e,t,{args:n,name:r,doc:o,defaults:s}){t.co_varnames=["self",...n||[]],t.co_docstring=o?new h(o):f,s&&(t.$defaults=s),t.co_name=new h(r),t.co_qualname=new h(e+"."+r);const m=new l(t);return m.$module=Q.__name__,m}const{datetime:B,iterRepeat:W,iterChain:q}=e;let{MINYEAR:G,MAXYEAR:X,date:V}=B.$d;const K=getA(h,"center"),pyCenter=(e,t)=>A(K,[e,t]),pyRStrip=e=>new h(e.toString().trimRight());G=G.valueOf(),X=X.valueOf();const Q={__name__:new h("calendar"),__all__:M(["IllegalMonthError","IllegalWeekdayError","setfirstweekday","firstweekday","isleap","leapdays","weekday","monthrange","monthcalendar","prmonth","month","prcal","calendar","timegm","month_name","month_abbr","day_name","day_abbr","Calendar","TextCalendar","HTMLCalendar","LocaleTextCalendar","LocaleHTMLCalendar","weekheader"])};function makeErr(e,t){return L(Q,((e,n)=>{n.__init__=new l((function __init__(e,t){e.$attr=t})),n.__str__=new l((function __str__(e){return new h(t.replace("$",I(e.$attr)))}))}),e,[b])}const Z=makeErr("IllegalMonthError","bad month $; must be 1-12"),ee=makeErr("IllegalWeekdayError","bad weekday number $; must be 0 (Monday) to 6 (Sunday)"),te=[0,31,28,31,30,31,30,31,31,30,31,30,31];function mkLocalizedCls(e,t){t.__init__=new l((function __init__(e,t){e.format=t})),t.__getitem__=new l((function __getitem__(t,n){const r=o(e,n);if(n instanceof w){const e=[];for(const n of r.valueOf())e.push(A(n,[t.format]));return new c(e)}return A(r,[t.format])}));const n=new i(e.valueOf().length);t.__len__=new l((function __len__(e){return n}))}const ae=new h("strftime"),ne=L(Q,((e,t)=>{let n=[new l((e=>h.$empty))];for(let r=0;r<12;r++){const e=new V(2001,r+1,1);n.push(e.tp$getattr(ae))}n=new c(n),t._months=n,mkLocalizedCls(n,t)}),"_localized_month"),re=L(Q,((e,t)=>{let n=[];for(let r=0;r<7;r++){const e=new V(2001,1,r+1);n.push(e.tp$getattr(ae))}n=new c(n),t._days=n,mkLocalizedCls(n,t)}),"_localized_day"),oe=A(re,[new h("%A")]),se=A(re,[new h("%a")]),me=A(ne,[new h("%B")]),de=A(ne,[new h("%b")]),[ie,ce,fe,he,we,ye,ue]=[0,1,2,3,4,5,6];function isleap(e){return(e=F(e))%4==0&&(e%100!=0||e%400==0)}function weekday(e,t,n){e=F(e),G<=e&&e<=X||(e=2e3+e%400);const r=A(V,[new i(e),t,n]);return callA(V,"weekday",r)}function monthrange(e,t){if(!le(H,t)||!le(t,P))throw A(Z,[t]);const n=weekday(e,t,H);t=F(t);const r=te[t]+Number(2===t&&isleap(e));return[n,new i(r)]}function iterweekdays(e){return iterFn(A(u,[e.fwd,add(e.fwd,j)]),mod7)}function itermonthdates(e,t,n){return iterFn(itermonthdays3(e,t,n),(e=>A(V,e.valueOf())))}function itermonthdays(e,t,n){const[r,o]=monthrange(t,n),s=mod7(sub(r,e.fwd)),m=A(W,[S,s]),d=A(u,[H,inc(o)]),l=mod7(sub(e.fwd,add(r,o))),i=A(W,[S,l]);return A(q,[m,d,i])}function itermonthdays2(e,t,n){return iterFn(A($,[itermonthdays(e,t,n),e.fwd]),(e=>{const[t,n]=e.valueOf();return new y([n,mod7(t)])}))}function itermonthdays3(e,t,n){const ymdIter=(e,t,n)=>iterFn(n,(n=>new y([e,t,n]))),[r,o]=monthrange(t,n),s=mod7(sub(r,e.fwd)),m=mod7(sub(e.fwd,add(r,o))),[d,l]=function _prevmonth(e,t){return eq(t,H)?[dec(e),P]:[e,dec(t)]}(t,n),c=inc(function _monthlen(e,t){return t=F(t),new i(te[t]+Number(2===t&&isleap(e)))}(d,l)),f=A(u,[sub(c,s),c]),h=A(u,[H,inc(o)]),[w,_]=function _nextmonth(e,t){return eq(t,P)?[inc(e),H]:[e,inc(t)]}(t,n),g=A(u,[H,inc(m)]);return A(q,[ymdIter(d,l,f),ymdIter(t,n,h),ymdIter(w,_,g)])}function itermonthdays4(e,t,n){const r=itermonthdays3(e,t,n);let o=0;return iterFn(r,(t=>new y([...t.valueOf(),mod7(add(e.fwd,new i(o++)))])))}function _monthIter(e,t,n,r){const o=O(e(t,n,r)),s=[];for(let m=0;m{const n=makePyMethod.bind(null,"Calendar"),r=["firstweekday"],o=["year","month"],s=["year","width"],m={__init__:n((function __init__(e,t){return Object.defineProperty(e,"fwd",{get(){return mod7(this._fwd)},set(e){return this._fwd=e,!0}}),e.fwd=t,f}),{name:"__init__",args:r,defaults:[S]}),getfirstweekday:n((function getfirstweekday(e){return e.fwd}),{name:"getfirstweekday"}),setfirstweekday:n((function setfirstweekday(e,t){return e.fwd=t,f}),{name:"setfirstweekday",args:r}),iterweekdays:n(iterweekdays,{name:"iterweekdays"}),itermonthdates:n(itermonthdates,{name:"itermonthdates",args:o}),itermonthdays:n(itermonthdays,{name:"itermonthdays",args:o}),itermonthdays2:n(itermonthdays2,{name:"itermonthdays2",args:o}),itermonthdays3:n(itermonthdays3,{name:"itermonthdays3",args:o}),itermonthdays4:n(itermonthdays4,{name:"itermonthdays4",args:o}),monthdatescalendar:n(monthdatescalendar,{name:"monthdatescalendar",args:o}),monthdays2calendar:n(monthdays2calendar,{name:"monthdays2calendar",args:o}),monthdayscalendar:n(monthdayscalendar,{name:"monthdayscalendar",args:o}),yeardatescalendar:n(yeardatescalendar,{name:"yeardatescalendar",args:s,defaults:[N]}),yeardays2calendar:n(yeardays2calendar,{name:"yeardays2calendar",args:s,defaults:[N]}),yeardayscalendar:n(yeardayscalendar,{name:"yeardayscalendar",args:s,defaults:[N]})};m.firstweekday=new k(m.getfirstweekday,m.setfirstweekday),Object.assign(t,m)}),"Calendar");function doTextFormatweekday(e,t,n){let r;return r=x(n,J,"GtE")?oe:se,pyCenter(o(o(r,t),new w(f,n)),n)}function doTextFormatmonthname(e,t,n,r,s=!0){let m=o(me,n);return T(s)&&(m=mod(new h("%s %r"),new y([m,t]))),pyCenter(m,r)}const ge=L(Q,((e,t)=>{const txtPrint=e=>p([e],["end",h.$empty]);const n=doTextFormatweekday;function formatweekheader(e,t){const n=[];for(const r of iterJs(iterweekdays(e)))n.push(callA(e,"formatweekday",r,t).toString());return new h(n.join(" "))}const r=doTextFormatmonthname;const o=makePyMethod.bind(null,"TextCalendar"),s={prweek:o((function prweek(e,t,n){txtPrint(callA(e,"formatweek",t,n))}),{name:"prweek",args:["theweek","width"]}),formatday:o((function formatday(e,t,n,r){let o;return o=eq(t,S)?h.$empty:mod(new h("%2i"),t),pyCenter(o,r)}),{name:"formatday",args:["day","weekday","width"]}),formatweek:o((function formatweek(e,t,n){const r=[];for(const o of iterJs(t)){const[t,s]=o.valueOf();r.push(callA(e,"formatday",t,s,n).toString())}return new h(r.join(" "))}),{name:"formatweek",args:["theweek","width"]}),formatweekday:o(n,{name:"formatweekday",args:["day","width"]}),formatweekheader:o(formatweekheader,{name:"formatweekheader",args:["width"]}),formatmonthname:o(r,{name:"formatmonthname",args:["theyear","themonth","width","withyear"],defaults:[m]}),prmonth:o((function prmonth(e,t,n,r,o){txtPrint(callA(e,"formatmonth",t,n,r,o))}),{name:"prmonth",args:["theyear","themonth","w","l"],defaults:[S,S]}),formatmonth:o((function formatmonth(e,t,n,r,o){const addNewLines=e=>new h(e+"\\n".repeat(o.valueOf()));r=_([D,r]),o=_([H,o]);let s=callA(e,"formatmonthname",t,n,dec(mul(j,inc(r))),!0);s=pyRStrip(s),s=addNewLines(s),s=add(s,pyRStrip(callA(e,"formatweekheader",r))),s=addNewLines(s);for(const m of iterJs(monthdays2calendar(e,t,n)))s=add(s,pyRStrip(callA(e,"formatweek",m,r))),s=addNewLines(s);return s}),{name:"formatmonth",args:["thyear","themonth","w","l"],defaults:[S,S]}),formatyear:o((function formatyear(e,t,n,r,o,s){n=_([D,n]),r=_([H,r]),o=_([D,o]);const m=dec(mul(inc(n),j));let d="";const a=e=>d+=e;a(pyRStrip(pyCenter(t.$r(),add(mul(m,s),mul(o,dec(s)))))),a("\\n".repeat(r));const l=formatweekheader(e,n);let f=0;for(const w of iterJs(yeardays2calendar(e,t,s))){const d=new i(f),y=inc(mul(s,d)),_=g([inc(mul(s,inc(d))),Y]),k=A(u,[y,_]);a("\\n".repeat(r));const p=iterFn(k,(n=>callA(e,"formatmonthname",t,n,m,!1)));a(pyRStrip(formatstring(p,m,o))),a("\\n".repeat(r));const $=iterFn(k,(e=>l));a(pyRStrip(formatstring($,m,o))),a("\\n".repeat(r));const b=Math.max(...w.valueOf().map((e=>e.valueOf().length)));for(let t=0;t=r.length?s.push(h.$empty):s.push(callA(e,"formatweek",r[t],n));a(pyRStrip(formatstring(new c(s),m,o))),a("\\n".repeat(r))}f++}return new h(d)}),{name:"formatyear",args:["theyear","w","l","c","m"],defaults:[D,H,R,N]}),pryear:o((function pryear(e,t,n,r,o,s){txtPrint(callA(e,"formatyear",t,n,r,o,s))}),{name:"pryear",args:["theyear","w","l","c","m"],defaults:[S,S,R,N]})};Object.assign(t,s)}),"TextCalendar",[_e]);function doHtmlFormatweekday(e,t){return new h(`${o(se,t)}`)}function doHtmlFormatmonthname(e,t,n,r=!0){let s=""+o(me,n);return T(r)&&(s+=" "+t),new h(`${s}`)}const ke=L(Q,((e,t)=>{const n=M(["mon","tue","wed","thu","fri","sat","sun"]),r=n,s=new h("noday"),d=new h("month"),l=d,c=new h("year"),w=c,u=new h(\' \'),g=new h(\'%d\');const k=doHtmlFormatweekday;function formatweekheader(e){let t="";for(const n of iterJs(iterweekdays(e)))t+=callA(e,"formatweekday",n);return new h(`${t}`)}const p=doHtmlFormatmonthname;const $=makePyMethod.bind(null,"HTMLCalendar"),b={formatday:$((function formatday(e,t,n){return eq(t,S)?mod(u,getA(e,"cssclass_noday")):mod(g,new y([o(getA(e,"cssclasses"),n),t]))}),{name:"formatday",args:["day","weekday"]}),formatweek:$((function formatweek(e,t){let n="";for(const r of iterJs(t)){const[t,o]=r.valueOf();n+=callA(e,"formatday",t,o)}return new h(`${n}`)}),{name:"formatweek",args:["theweek"]}),formatweekday:$(k,{name:"formatweekday",args:["day"]}),formatweekheader:$(formatweekheader,{name:"formatweekheader"}),formatmonthname:$(p,{name:"formatmonthname",args:["theyear","themonth","withyear"],defaults:[m]}),formatmonth:$((function formatmonth(e,t,n,r=!0){let o="";const a=e=>o+=e+"\\n";a(``),a(callA(e,"formatmonthname",t,n,r)),a(formatweekheader(e));for(const s of iterJs(monthdays2calendar(e,t,n)))a(callA(e,"formatweek",s));return a("
"),new h(o)}),{name:"formatmonth",args:["thyear","themonth","withyear"],defaults:[m]}),formatyear:$((function formatyear(e,t,n){let r="";const a=e=>r+=e;n=_([n,H]).valueOf(),a(``),a("\\n"),a(``);for(let o=1;o<13;o+=n){a("");const r=Math.min(o+n,13);for(let n=o;n"),a(callA(e,"formatmonth",t,new i(n),!1)),a("");a("")}return a("
${t}
"),new h(r)}),{name:"formatyear",args:["theyear","width"],defaults:[N]}),formatyearpage:$((function formatyearpage(e,t,n=3,r="calendar.css",o=null){null!==o&&o!==f||(o=new h("utf-8"));let s="";const a=e=>s+=e;return a(`\\n`),a(\'\\n\'),a("\\n"),a("\\n"),a(`\\n`),r!==f&&a(`\\n`),a(`Calendar for ${t}\\n`),a("\\n"),a("\\n"),a(callA(e,"formatyear",t,n)),a("\\n"),a("\\n"),callA(h,"encode",new h(s),o,new h("ignore"))}),{name:"formatyearpage",args:["theyear","width","css","encoding"],defaults:[N,new h("calendar.css"),new h("utf-8")]}),cssclasses:n,cssclasses_weekday_head:r,cssclass_noday:s,cssclass_month_head:d,cssclass_month:l,cssclass_year_head:c,cssclass_year:w};Object.assign(t,b)}),"HTMLCalendar",[_e]);function withLocale(e,t){const n=E.localizeByIdentifier(e.toString());v.strftime=n;try{return t()}finally{v.strftime=E}}function localInit(e,t){T(t)||(t=new h("en_US")),e.locale=t}const pe=L(Q,((e,t)=>{const n=makePyMethod.bind(null,"LocaleTextCalendar"),r={__init__:n((function __init__(e,t,n){return callA(ge,"__init__",e,t),localInit(e,n),f}),{name:"__init__",args:["firstweekday","locale"],defaults:[S,f]}),formatweekday:n((function formatweekday(e,t,n){return withLocale(e.locale,(()=>doTextFormatweekday(0,t,n)))}),{name:"formatweekday",args:["day","width"]}),formatmonthname:n((function formatmonthname(e,t,n,r,o){return withLocale(e.locale,(()=>doTextFormatmonthname(0,t,n,r,o)))}),{name:"formatmonthname",args:["theyear","themonth","width","withyear"],defaults:[m]})};Object.assign(t,r)}),"LocaleTextCalendar",[ge]),$e=L(Q,((e,t)=>{const n=makePyMethod.bind(null,"LocaleHTMLCalendar"),r={__init__:n((function __init__(e,t,n){return callA(ke,"__init__",e,t),localInit(e,n),f}),{name:"__init__",args:["firstweekday","locale"],defaults:[S,f]}),formatweekday:n((function formatweekday(e,t){return withLocale(e.locale,(()=>doHtmlFormatweekday(e,t)))}),{name:"formatweekday",args:["day"]}),formatmonthname:n((function formatmonthname(e,t,n,r){return withLocale(e.locale,(()=>doHtmlFormatmonthname(e,t,n,r)))}),{name:"formatmonthname",args:["theyear","themonth","withyear"],defaults:[m]})};Object.assign(t,r)}),"LocaleHTMLCalendar",[ke]),be=A(ge,[]);Object.assign(Q,{IllegalMonthError:Z,IllegalWeekdayError:ee,day_name:oe,month_name:me,day_abbr:se,month_abbr:de,January:new i(1),February:new i(2),mdays:M(te),MONDAY:new i(ie),TUESDAY:new i(ce),WEDNESDAY:new i(fe),THURSDAY:new i(he),FRIDAY:new i(we),SATURDAY:new i(ye),SUNDAY:new i(ue),Calendar:_e,TextCalendar:ge,HTMLCalendar:ke,LocaleTextCalendar:pe,LocaleHTMLCalendar:$e,c:be,firstweekday:getA(be,"getfirstweekday"),monthcalendar:getA(be,"monthdayscalendar"),prweek:getA(be,"prweek"),week:getA(be,"formatweek"),weekheader:getA(be,"formatweekheader"),prmonth:getA(be,"prmonth"),month:getA(be,"formatmonth"),calendar:getA(be,"formatyear"),prcal:getA(be,"pryear")});const Me=new i(20),Te=R;function formatstring(e,t,n){t||(t=Me),n||(n=Te),n=mul(n,new h(" "));const r=[];for(const o of iterJs(e))r.push(pyCenter(o,t).toString());return new h(r.join(n.toString()))}const Ce=getA(V,"toordinal"),Oe=A(Ce,[new V(1970,1,1)]);return t("calendar",Q,{isleap:{$meth:e=>s(isleap(e)),$flags:{NamedArgs:["year"]},$doc:"Return True for leap years, False for non-leap years"},leapdays:{$meth(e,t){e=F(e)-1,t=F(t)-1;const n=Math.floor;return new i(n(t/4)-n(e/4)-(n(t/100)-n(e/100))+(n(t/400)-n(e/400)))},$flags:{MinArgs:2,MaxArgs:2}},weekday:{$meth:weekday,$flags:{NamedArgs:["year","month","day"]},$doc:"Return weekday (0-6 ~ Mon-Sun) for year, month (1-12), day (1-31)."},monthrange:{$meth:(e,t)=>new y(monthrange(e,t)),$flags:{NamedArgs:["year","month"]},$doc:"Return weekday (0-6 ~ Mon-Sun) and number of days (28-31) for year, month."},setfirstweekday:{$meth(e){const t=F(e);if(!(ie<=t&&t<=ue))throw A(ee,[e]);be.fwd=e},$flags:{NamedArgs:["firstweekday"]}},format:{$meth:function format(e,t,n){return p([formatstring(e,t,n)]),f},$flags:{NamedArgs:["cols","colwidth","spacing"],Defaults:[Me,Te]}},formatstring:{$meth:formatstring,$flags:{NamedArgs:["cols","colwidth","spacing"],Defaults:[Me,Te]}},timegm:{$meth(e){const[t,n,r,o,s,m]=e.valueOf(),d=A(V,[t,n,H]),l=A(Ce,[d]),i=add(sub(l,Oe),dec(r)),c=add(mul(i,U),o),f=add(mul(c,z),s);return add(mul(f,z),m)},$flags:{OneArg:!0}}}),Q}',"src/lib/collections.js":`function $builtinmodule(t){const e={};return Sk.misceval.chain(Sk.importModule("keyword",!1,!0),(t=>(e._iskeyword=t.$d.iskeyword,Sk.importModule("itertools",!1,!0))),(t=>(e._chain=t.$d.chain,e._starmap=t.$d.starmap,e._repeat=t.$d.repeat,Sk.importModule("operator",!1,!0))),(t=>{e._itemgetter=t.$d.itemgetter}),(()=>collections_mod(e)))}function collections_mod(t){function counterNumberSlot(e){return function(i){if(void 0!==i&&!(i instanceof t.Counter))return Sk.builtin.NotImplemented.NotImplemented$;const s=new t.Counter;return e.call(this,s,i),s}}function counterInplaceSlot(t,e){return function(i){if(!(i instanceof Sk.builtin.dict))throw new Sk.builtin.TypeError("Counter "+t+"= "+Sk.abstr.typeName(i)+" is not supported");return e.call(this,i),this.keep$positive()}}t.__all__=new Sk.builtin.list(["deque","defaultdict","namedtuple","Counter","OrderedDict"].map((t=>new Sk.builtin.str(t)))),t.defaultdict=Sk.abstr.buildNativeClass("collections.defaultdict",{constructor:function defaultdict(t,e){this.default_factory=t,Sk.builtin.dict.call(this,e)},base:Sk.builtin.dict,methods:{copy:{$meth(){return this.$copy()},$flags:{NoArgs:!0}},__copy__:{$meth(){return this.$copy()},$flags:{NoArgs:!0}},__missing__:{$meth(t){if(Sk.builtin.checkNone(this.default_factory))throw new Sk.builtin.KeyError(Sk.misceval.objectRepr(t));{const e=Sk.misceval.callsimArray(this.default_factory,[]);return this.mp$ass_subscript(t,e),e}},$flags:{OneArg:!0}}},getsets:{default_factory:{$get(){return this.default_factory},$set(t){t=t||Sk.builtin.none.none$,this.default_factory=t}}},slots:{tp$doc:"defaultdict(default_factory[, ...]) --\\x3e dict with default factory\\n\\nThe default factory is called without arguments to produce\\na new value when a key is not present, in __getitem__ only.\\nA defaultdict compares equal to a dict with the same items.\\nAll remaining arguments are treated the same as if they were\\npassed to the dict constructor, including keyword arguments.\\n",tp$init(t,e){const i=t.shift();if(void 0===i)this.default_factory=Sk.builtin.none.none$;else{if(!Sk.builtin.checkCallable(i)&&!Sk.builtin.checkNone(i))throw new Sk.builtin.TypeError("first argument must be callable");this.default_factory=i}return Sk.builtin.dict.prototype.tp$init.call(this,t,e)},$r(){const t=Sk.misceval.objectRepr(this.default_factory),e=Sk.builtin.dict.prototype.$r.call(this).v;return new Sk.builtin.str("defaultdict("+t+", "+e+")")}},proto:{$copy(){const e=[];return Sk.misceval.iterFor(Sk.abstr.iter(this),(t=>{e.push(t),e.push(this.mp$subscript(t))})),new t.defaultdict(this.default_factory,e)}}}),t.Counter=Sk.abstr.buildNativeClass("Counter",{constructor:function Counter(){this.$d=new Sk.builtin.dict,Sk.builtin.dict.apply(this)},base:Sk.builtin.dict,methods:{elements:{$flags:{NoArgs:!0},$meth(){const e=t._chain.tp$getattr(new Sk.builtin.str("from_iterable")),i=t._starmap,s=t._repeat,n=Sk.misceval.callsimArray;return n(e,[n(i,[s,n(this.tp$getattr(this.str$items))])])}},most_common:{$flags:{NamedArgs:["n"],Defaults:[Sk.builtin.none.none$]},$meth(t){const e=this.sq$length();t=Sk.builtin.checkNone(t)||(t=Sk.misceval.asIndexOrThrow(t))>e?e:t<0?0:t;const i=this.$items().sort(((t,e)=>Sk.misceval.richCompareBool(t[1],e[1],"Lt")?1:Sk.misceval.richCompareBool(t[1],e[1],"Gt")?-1:0));return new Sk.builtin.list(i.slice(0,t).map((t=>new Sk.builtin.tuple(t))))}},update:{$flags:{FastCall:!0},$meth(t,e){return Sk.abstr.checkArgsLen("update",t,0,1),this.counter$update(t,e)}},subtract:{$flags:{FastCall:!0},$meth(t,e){Sk.abstr.checkArgsLen("subtract",t,0,1);const i=t[0];if(void 0!==i)if(i instanceof Sk.builtin.dict)for(let s=Sk.abstr.iter(i),n=s.tp$iternext();void 0!==n;n=s.tp$iternext()){const t=this.mp$subscript(n);this.mp$ass_subscript(n,Sk.abstr.numberBinOp(t,i.mp$subscript(n),"Sub"))}else for(let s=Sk.abstr.iter(i),n=s.tp$iternext();void 0!==n;n=s.tp$iternext()){const t=this.mp$subscript(n);this.mp$ass_subscript(n,Sk.abstr.numberBinOp(t,this.$one,"Sub"))}e=e||[];for(let s=0;s>> c = Counter('abcdeabcdabcaba') # count elements from a string\\n\\n >>> c.most_common(3) # three most common elements\\n [('a', 5), ('b', 4), ('c', 3)]\\n >>> sorted(c) # list all unique elements\\n ['a', 'b', 'c', 'd', 'e']\\n >>> ''.join(sorted(c.elements())) # list elements with repetitions\\n 'aaaaabbbbcccdde'\\n >>> sum(c.values()) # total of all counts\\n 15\\n\\n >>> c['a'] # count of letter 'a'\\n 5\\n >>> for elem in 'shazam': # update counts from an iterable\\n ... c[elem] += 1 # by adding 1 to each element's count\\n >>> c['a'] # now there are seven 'a'\\n 7\\n >>> del c['b'] # remove all 'b'\\n >>> c['b'] # now there are zero 'b'\\n 0\\n\\n >>> d = Counter('simsalabim') # make another counter\\n >>> c.update(d) # add in the second counter\\n >>> c['a'] # now there are nine 'a'\\n 9\\n\\n >>> c.clear() # empty the counter\\n >>> c\\n Counter()\\n\\n Note: If a count is set to zero or reduced to zero, it will remain\\n in the counter until the entry is deleted or the counter is cleared:\\n\\n >>> c = Counter('aaabbc')\\n >>> c['b'] -= 2 # reduce the count of 'b' by two\\n >>> c.most_common() # 'b' is still in, but its count is zero\\n [('a', 3), ('c', 1), ('b', 0)]\\n\\n",tp$init(t,e){return Sk.abstr.checkArgsLen(this.tpjs_name,t,0,1),this.counter$update(t,e)},$r(){const t=this.size>0?Sk.builtin.dict.prototype.$r.call(this).v:"";return new Sk.builtin.str(Sk.abstr.typeName(this)+"("+t+")")},tp$as_sequence_or_mapping:!0,mp$ass_subscript(t,e){return void 0===e?this.mp$lookup(t)&&Sk.builtin.dict.prototype.mp$ass_subscript.call(this,t,e):Sk.builtin.dict.prototype.mp$ass_subscript.call(this,t,e)},tp$as_number:!0,nb$positive:counterNumberSlot((function(t){this.$items().forEach((([e,i])=>{Sk.misceval.richCompareBool(i,this.$zero,"Gt")&&t.mp$ass_subscript(e,i)}))})),nb$negative:counterNumberSlot((function(t){this.$items().forEach((([e,i])=>{Sk.misceval.richCompareBool(i,this.$zero,"Lt")&&t.mp$ass_subscript(e,Sk.abstr.numberBinOp(this.$zero,i,"Sub"))}))})),nb$subtract:counterNumberSlot((function(t,e){this.$items().forEach((([i,s])=>{const n=Sk.abstr.numberBinOp(s,e.mp$subscript(i),"Sub");Sk.misceval.richCompareBool(n,this.$zero,"Gt")&&t.mp$ass_subscript(i,n)})),e.$items().forEach((([e,i])=>{void 0===this.mp$lookup(e)&&Sk.misceval.richCompareBool(i,this.$zero,"Lt")&&t.mp$ass_subscript(e,Sk.abstr.numberBinOp(this.$zero,i,"Sub"))}))})),nb$add:counterNumberSlot((function(t,e){this.$items().forEach((([i,s])=>{const n=Sk.abstr.numberBinOp(s,e.mp$subscript(i),"Add");Sk.misceval.richCompareBool(n,this.$zero,"Gt")&&t.mp$ass_subscript(i,n)})),e.$items().forEach((([e,i])=>{void 0===this.mp$lookup(e)&&Sk.misceval.richCompareBool(i,this.$zero,"Gt")&&t.mp$ass_subscript(e,i)}))})),nb$inplace_add:counterInplaceSlot("+",(function(t){t.$items().forEach((([t,e])=>{const i=Sk.abstr.numberInplaceBinOp(this.mp$subscript(t),e,"Add");this.mp$ass_subscript(t,i)}))})),nb$inplace_subtract:counterInplaceSlot("-",(function(t){t.$items().forEach((([t,e])=>{const i=Sk.abstr.numberInplaceBinOp(this.mp$subscript(t),e,"Sub");this.mp$ass_subscript(t,i)}))})),nb$or:counterNumberSlot((function(t,e){this.$items().forEach((([i,s])=>{const n=e.mp$subscript(i),r=Sk.misceval.richCompareBool(s,n,"Lt")?n:s;Sk.misceval.richCompareBool(r,this.$zero,"Gt")&&t.mp$ass_subscript(i,r)})),e.$items().forEach((([e,i])=>{void 0===this.mp$lookup(e)&&Sk.misceval.richCompareBool(i,this.$zero,"Gt")&&t.mp$ass_subscript(e,i)}))})),nb$and:counterNumberSlot((function(t,e){this.$items().forEach((([i,s])=>{const n=e.mp$subscript(i),r=Sk.misceval.richCompareBool(s,n,"Lt")?s:n;Sk.misceval.richCompareBool(r,this.$zero,"Gt")&&t.mp$ass_subscript(i,r)}))})),nb$inplace_and:counterInplaceSlot("&",(function(t){this.$items().forEach((([e,i])=>{const s=t.mp$subscript(e);Sk.misceval.richCompareBool(s,i,"Lt")&&this.mp$ass_subscript(e,s)}))})),nb$inplace_or:counterInplaceSlot("|",(function(t){t.$items().forEach((([t,e])=>{Sk.misceval.richCompareBool(e,this.mp$subscript(t),"Gt")&&this.mp$ass_subscript(t,e)}))})),nb$reflected_and:null,nb$reflected_or:null,nb$reflected_add:null,nb$reflected_subtract:null},proto:{keep$positive(){return this.$items().forEach((([t,e])=>{Sk.misceval.richCompareBool(e,this.$zero,"LtE")&&this.mp$ass_subscript(t)})),this},$zero:new Sk.builtin.int_(0),$one:new Sk.builtin.int_(1),str$items:new Sk.builtin.str("items"),counter$update(t,e){const i=t[0];if(void 0!==i)if(Sk.builtin.checkMapping(i))if(this.sq$length())for(let s=Sk.abstr.iter(i),n=s.tp$iternext();void 0!==n;n=s.tp$iternext()){const t=this.mp$subscript(n);this.mp$ass_subscript(n,Sk.abstr.numberBinOp(t,i.mp$subscript(n),"Add"))}else this.update$common(t,void 0,"update");else for(let s=Sk.abstr.iter(i),n=s.tp$iternext();void 0!==n;n=s.tp$iternext()){const t=this.mp$subscript(n);this.mp$ass_subscript(n,Sk.abstr.numberBinOp(t,this.$one,"Add"))}if(e&&e.length)if(this.sq$length())for(let s=0;s\`(\${Sk.misceval.objectRepr(t)}, \${Sk.misceval.objectRepr(e)})\`));return t=0===t.length?"":"["+t.join(", ")+"]",this.in$repr=!1,new Sk.builtin.str(Sk.abstr.typeName(this)+"("+t+")")},tp$richcompare(e,i){if("Eq"!==i&&"Ne"!==i)return Sk.builtin.NotImplemented.NotImplemented$;if(!(e instanceof t.OrderedDict))return Sk.builtin.dict.prototype.tp$richcompare.call(this,e,i);const s="Eq"==i,n=this.size;if(n!==e.size)return!s;const r=e.$items(),a=this.$items();for(let t=0;t=r||l>=a)switch(i){case"Lt":return ra;case"GtE":return r>=a}return"Eq"!==i&&("NotEq"===i||Sk.misceval.richCompareBool(n[this.head+l&this.mask],e[s.head+l&s.mask],i))},tp$iter(){return new e(this)},$r(){const t=[],e=this.tail-this.head&this.mask;if(this.$entered_repr)return new Sk.builtin.str("[...]");this.$entered_repr=!0;for(let s=0;s=e||t<-e)throw new Sk.builtin.IndexError("deque index out of range");const i=(t>=0?this.head:this.tail)+t&this.mask;return this.v[i]},mp$ass_subscript(t,e){t=Sk.misceval.asIndexOrThrow(t);const i=this.tail-this.head&this.mask;if(t>=i||t<-i)throw new Sk.builtin.IndexError("deque index out of range");void 0===e?this.del$item(t):this.set$item(t,e)},nb$inplace_add(t){this.maxlen=void 0;for(let e=Sk.abstr.iter(t),i=e.tp$iternext();void 0!==i;i=e.tp$iternext())this.$push(i);return this},nb$inplace_multiply(t){(t=Sk.misceval.asIndexSized(t,Sk.builtin.OverflowError,"can't multiply sequence by non-int of type '{tp$name}'"))<=0&&this.$clear();const e=this.$copy(),i=this.tail-this.head&this.mask;for(let s=1;s integer -- return number of occurrences of value"},extend:{$meth(t){return this.$extend(t),Sk.builtin.none.none$},$flags:{OneArg:!0},$textsig:null,$doc:"Extend the right side of the deque with elements from the iterable"},extendleft:{$meth(t){for(let e=Sk.abstr.iter(t),i=e.tp$iternext();void 0!==i;i=e.tp$iternext())this.$pushLeft(i);return Sk.builtin.none.none$},$flags:{OneArg:!0},$textsig:null,$doc:"Extend the left side of the deque with elements from the iterable"},index:{$meth(t,e,i){const s=this.$index(t,e,i);if(void 0!==s)return new Sk.builtin.int_(s);throw new Sk.builtin.ValueError(Sk.misceval.objectRepr(t)+" is not in deque")},$flags:{MinArgs:1,MaxArgs:3},$textsig:null,$doc:"D.index(value, [start, [stop]]) -> integer -- return first index of value.\\nRaises ValueError if the value is not present."},insert:{$meth(t,e){t=Sk.misceval.asIndexOrThrow(t,"integer argument expected, got {tp$name}");const i=this.tail-this.head&this.mask;if(void 0!==this.maxlen&&i>=this.maxlen)throw new Sk.builtin.IndexError("deque already at its maximum size");t>i&&(t=i),t<=-i&&(t=0);const s=(t>=0?this.head:this.tail)+t&this.mask;let n=this.tail;for(this.tail=this.tail+1&this.mask;n!==s;){const t=n-1&this.mask;this.v[n]=this.v[t],n=t}return this.v[s]=e,this.head===this.tail&&this.$resize(this.v.length,this.v.length<<1),Sk.builtin.none.none$},$flags:{MinArgs:2,MaxArgs:2},$textsig:null,$doc:"D.insert(index, object) -- insert object before index"},pop:{$meth(){return this.$pop()},$flags:{NoArgs:!0},$textsig:null,$doc:"Remove and return the rightmost element."},popleft:{$meth(){return this.$popLeft()},$flags:{NoArgs:!0},$textsig:null,$doc:"Remove and return the leftmost element."},remove:{$meth(t){const e=this.$index(t);if(void 0===e)throw new Sk.builtin.ValueError(Sk.misceval.objectRepr(t)+" is not in deque");let i=this.head+e&this.mask;for(;i!==this.tail;){const t=i+1&this.mask;this.v[i]=this.v[t],i=t}this.tail=this.tail-1&this.mask;var s=this.tail-this.head&this.mask;s>>1&&this.$resize(s,this.v.length>>>1)},$flags:{OneArg:!0},$textsig:null,$doc:"D.remove(value) -- remove first occurrence of value."},__reversed__:{$meth(){return new i(this)},$flags:{NoArgs:!0},$textsig:null,$doc:"D.__reversed__() -- return a reverse iterator over the deque"},reverse:{$meth(){const t=this.head,e=this.tail,i=this.mask,s=this.tail-this.head&this.mask;for(let n=0;n<~~(s/2);n++){const s=e-n-1&i,r=t+n&i,a=this.v[s];this.v[s]=this.v[r],this.v[r]=a}return Sk.builtin.none.none$},$flags:{NoArgs:!0},$textsig:null,$doc:"D.reverse() -- reverse *IN PLACE*"},rotate:{$meth(t){t=void 0===t?1:Sk.misceval.asIndexSized(t,Sk.builtin.OverflowError);const e=this.head,i=this.tail;if(0===t||e===i)return this;if(this.head=e-t&this.mask,this.tail=i-t&this.mask,t>0)for(let s=1;s<=t;s++){const t=e-s&this.mask,n=i-s&this.mask;this.v[t]=this.v[n],this.v[n]=void 0}else for(let s=0;s>t;s--){const t=i-s&this.mask,n=e-s&this.mask;this.v[t]=this.v[n],this.v[n]=void 0}return Sk.builtin.none.none$},$flags:{MinArgs:0,MaxArgs:1},$textsig:null,$doc:"Rotate the deque n steps to the right (default n=1). If n is negative, rotates left."}},classmethods:Sk.generic.classGetItem,getsets:{maxlen:{$get(){return void 0===this.maxlen?Sk.builtin.none.none$:new Sk.builtin.int_(this.maxlen)},$doc:"maximum size of a deque or None if unbounded"}},proto:{$clear(){this.head=0,this.tail=0,this.mask=1,this.v=new Array(2)},$copy(){return new t.deque(this.v.slice(0),this.maxlen,this.head,this.tail,this.mask)},$extend(t){for(let e=Sk.abstr.iter(t),i=e.tp$iternext();void 0!==i;i=e.tp$iternext())this.$push(i)},set$item(t,e){const i=(t>=0?this.head:this.tail)+t&this.mask;this.v[i]=e},del$item(t){let e=(t>=0?this.head:this.tail)+t&this.mask;for(;e!==this.tail;){const t=e+1&this.mask;this.v[e]=this.v[t],e=t}const i=this.tail-this.head&this.mask;this.tail=this.tail-1&this.mask,i>>1&&this.$resize(i,this.v.length>>>1)},$push(t){this.v[this.tail]=t,this.tail=this.tail+1&this.mask,this.head===this.tail&&this.$resize(this.v.length,this.v.length<<1);const e=this.tail-this.head&this.mask;return void 0!==this.maxlen&&e>this.maxlen&&this.$popLeft(),this},$pushLeft(t){this.head=this.head-1&this.mask,this.v[this.head]=t,this.head===this.tail&&this.$resize(this.v.length,this.v.length<<1);const e=this.tail-this.head&this.mask;return void 0!==this.maxlen&&e>this.maxlen&&this.$pop(),this},$pop(){if(this.head===this.tail)throw new Sk.builtin.IndexError("pop from an empty deque");this.tail=this.tail-1&this.mask;const t=this.v[this.tail];this.v[this.tail]=void 0;const e=this.tail-this.head&this.mask;return e>>1&&this.$resize(e,this.v.length>>>1),t},$popLeft(){if(this.head===this.tail)throw new Sk.builtin.IndexError("pop from an empty deque");const t=this.v[this.head];this.v[this.head]=void 0,this.head=this.head+1&this.mask;const e=this.tail-this.head&this.mask;return e>>1&&this.$resize(e,this.v.length>>>1),t},$resize(t,e){const i=this.head,s=this.mask;if(this.head=0,this.tail=t,this.mask=e-1,0===i)return void(this.v.length=e);const n=new Array(e);for(let r=0;r=0?i:i<-s?0:s+i;for(let o=e>=0?e:e<-s?0:s+e;o=this.$length)return;const t=(this.$index>=0?this.$head:this.$tail)+this.$index&this.$mask;return this.$index++,this.dq[t]},methods:{__length_hint__:{$meth:function __length_hint__(){return new Sk.builtin.int_(this.$length-this.$index)},$flags:{NoArgs:!0}}}}),i=Sk.abstr.buildIteratorClass("_collections._deque_reverse_iterator",{constructor:function _deque_reverse_iterator(t){this.$index=(t.tail-t.head&t.mask)-1,this.dq=t.v,this.$head=t.head,this.$mask=t.mask},iternext(){if(this.$index<0)return;const t=this.$head+this.$index&this.$mask;return this.$index--,this.dq[t]},methods:{__length_hint__:Sk.generic.iterReverseLengthHintMethodDef}}),s=new RegExp(/^[0-9].*/),n=new RegExp(/^[0-9_].*/),r=new RegExp(/^\\w*$/),a=/,/g,o=/\\s+/;function namedtuple(e,i,l,h,c){if(e=e.tp$str(),Sk.misceval.isTrue(Sk.misceval.callsimArray(t._iskeyword,[e])))throw new Sk.builtin.ValueError("Type names and field names cannot be a keyword: '"+Sk.misceval.objectRepr(e)+"'");const u=e.$jsstr();if(s.test(u)||!r.test(u)||!u)throw new Sk.builtin.ValueError("Type names and field names must be valid identifiers: '"+u+"'");let m,d;if(Sk.builtin.checkString(i))m=i.$jsstr().replace(a," ").split(o),1==m.length&&""===m[0]&&(m=[]),d=m.map((t=>new Sk.builtin.str(t)));else{m=[],d=[];for(let t=Sk.abstr.iter(i),e=t.tp$iternext();void 0!==e;e=t.tp$iternext())e=e.tp$str(),d.push(e),m.push(e.$jsstr())}let p=new Set;if(Sk.misceval.isTrue(l))for(let s=0;sm.length)throw new Sk.builtin.TypeError("Got more default values than field names");for(let t=0,e=d.length-b.length;e"'"+t.$jsstr()+"'"))+"]")}return r}_make.co_varnames=["_cls","iterable"],_asdict.co_varnames=["self"],_replace.co_kwargs=1,_replace.co_varnames=["_self"];const S={};for(let s=0;sm[e]+"="+Sk.misceval.objectRepr(t)));return new Sk.builtin.str(Sk.abstr.typeName(this)+"("+t.join(", ")+")")}},flags:{sk$klass:!0},proto:Object.assign({__module__:Sk.builtin.checkNone(c)?Sk.globals.__name__:c,__slots__:new Sk.builtin.tuple,_fields:$,_field_defaults:f,_make:new Sk.builtin.classmethod(new Sk.builtin.func(_make)),_asdict:new Sk.builtin.func(_asdict),_replace:new Sk.builtin.func(_replace)},S)})}return namedtuple.co_argcount=2,namedtuple.co_kwonlyargcount=3,namedtuple.$kwdefs=[Sk.builtin.bool.false$,Sk.builtin.none.none$,Sk.builtin.none.none$],namedtuple.co_varnames=["typename","field_names","rename","defaults","module"],t.namedtuple=new Sk.builtin.func(namedtuple),t}`,"src/lib/datetime.js":'function $builtinmodule(){const{isTrue:t,richCompareBool:e,asIndexOrThrow:n,asIndexSized:i,objectRepr:s,opAllowsEquality:o,callsimArray:r,callsimOrSuspendArray:a}=Sk.misceval,{numberBinOp:$,typeName:c,buildNativeClass:h,checkArgsLen:m,objectHash:u,copyKeywordsToNamedArgs:l}=Sk.abstr,{int_:f,float_:d,str:w,bytes:_,tuple:p,bool:{true$:g},none:{none$:y},NotImplemented:{NotImplemented$:b},TypeError:z,ValueError:v,OverflowError:M,ZeroDivisionError:A,NotImplementedError:x,checkNumber:N,checkFloat:S,checkString:k,checkInt:O,asnum$:I,round:E,getattr:T}=Sk.builtin,{remapToPy:D,remapToJs:R}=Sk.ffi,intRound=t=>E(t).nb$int(),q=$,C=new w("auto"),U=new w("utcoffset"),Y=new w("tzname"),j=new w("as_integer_ratio"),F=new w("dst"),H=new w("isoformat"),J=new w("replace"),B=new w("fromtimestamp"),G=new w("fromordinal"),L=new w("utcfromtimestamp"),X=new w("strftime"),P=new w("fromutc"),W=new f(0),Z=new d(0),K=new f(7),V=new f(60),Q=new f(3600),tt=new f(1e3),et=new f(1e6),nt=new d(1e6),it=new f(86400),st=new d(86400);let ot=null;function pyDivMod(t,e){return q(t,e,"DivMod").v}function $divMod(t,e){if("number"!=typeof t||"number"!=typeof e)return t=JSBI.BigInt(t),e=JSBI.BigInt(e),[JSBI.toNumber(JSBI.divide(t,e)),JSBI.toNumber(JSBI.remainder(t,e))];if(0===e)throw new A("integer division or modulo by zero");return[Math.floor(t/e),t-Math.floor(t/e)*e]}function modf(t){const e=(t=I(t))<0?-1:1;return t=Math.abs(t),[new d(e*(t-Math.floor(t))),new d(e*Math.floor(t))]}function _d(t,e="0",n=2){return t.toString().padStart(n,e)}const rt=/^[0-9]+$/;function _as_integer(t){if(!rt.test(t))throw new Error;return parseInt(t)}function _as_int_ratio(t){let e=r(t.tp$getattr(j));if(!(e instanceof p))throw new z("unexpected return type from as_integer_ratio(): expected tuple, got \'"+c(e)+"\'");if(e=e.v,2!==e.length)throw new v("as_integer_ratio() must return a 2-tuple");return e}return Sk.misceval.chain(Sk.importModule("time",!1,!0),(a=>{const $=a.$d,E={__name__:new w("datetime"),__all__:new Sk.builtin.list(["date","datetime","time","timedelta","timezone","tzinfo","MINYEAR","MAXYEAR"].map((t=>new w(t))))};function _cmp(t,e){for(let n=0;ne[n]?1:-1;return 0}function _do_compare(t,e,n){const i=t.$cmp(e,n);switch(n){case"Lt":return i<0;case"LtE":return i<=0;case"Eq":return 0===i;case"NotEq":return 0!==i;case"Gt":return i>0;case"GtE":return i>=0}}const j=9999;E.MINYEAR=new f(1),E.MAXYEAR=new f(j);const rt=3652059,at=[-1,31,28,31,30,31,30,31,31,30,31,30,31],$t=[-1];let ct=0;function _is_leap(t){return t%4==0&&(t%100!=0||t%400==0)}function _days_before_year(t){const e=t-1;return 365*e+Math.floor(e/4)-Math.floor(e/100)+Math.floor(e/400)}function _days_before_month(t,e){return $t[e]+(e>2&&_is_leap(t))}function _ymd2ord(t,e,n){return _days_before_year(t)+_days_before_month(t,e)+n}at.slice(1).forEach((t=>{$t.push(ct),ct+=t}));const ht=_days_before_year(401),mt=_days_before_year(101),ut=_days_before_year(5);function _ord2ymd(t){if((t=n(t))>Number.MAX_SAFE_INTEGER)throw new M("Python int too large to convert to js number");if(t<1)throw new v("ordinal must be >= 1");let e,i,s,o;t-=1,[e,t]=$divMod(t,ht);let r=400*e+1;if([i,t]=$divMod(t,mt),[s,t]=$divMod(t,ut),[o,t]=$divMod(t,365),r+=100*i+4*s+o,4===o||4===i)return[r-1,12,31].map((t=>new f(t)));const a=3===o&&(24!==s||3===i);let $=t+50>>5,c=$t[$]+($>2&&a);return c>t&&($-=1,c-=at[$]+(2===$&&a)),[r,$,(t-=c)+1].map((t=>new f(t)))}const lt=[null,"Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],ft=[null,"Mon","Tue","Wed","Thu","Fri","Sat","Sun"];function _build_struct_time(t,e,n,i,s,o,r){const a=(_ymd2ord(t,e,n)+6)%7,c=_days_before_month(t,e)+n;return $.struct_time.tp$call([new p([t,e,n,i,s,o,a,c,r].map((t=>new f(t))))])}const dt={hours:t=>_d(t),minutes:(t,e)=>_d(t)+":"+_d(e),seconds:(t,e,n)=>_d(t)+":"+_d(e)+":"+_d(n),milliseconds:(t,e,n,i)=>_d(t)+":"+_d(e)+":"+_d(n)+"."+_d(i,"0",3),microseconds:(t,e,n,i)=>_d(t)+":"+_d(e)+":"+_d(n)+"."+_d(i,"0",6)};function _format_time(t,e,n,i,s="auto"){if("string"!=typeof s&&!k(s))throw new z("must be str, not "+c(s));"auto"===(s=s.toString())?s=i?"microseconds":"seconds":"milliseconds"===s&&(i=Math.floor(i/1e3));let o=dt[s];if(void 0===o)throw new v("Unknown timespec value");return o(t,e,n,i)}function _format_offset(t){let e,n="";if(t!==y){let i,s,o;return t.$days<0?(e="-",t=new wt(-t.$days,-t.$secs,-t.$micro)):e="+",[i,s]=pyDivMod(t,pt),[s,o]=pyDivMod(s,gt),n+=e+`${_d(i)}:${_d(s)}`,(o.$secs||o.$micro)&&(n+=":"+_d(o.$secs,"0",2),o.$micro&&(n+="."+_d(o.$micro,"0",6))),n}}function _wrap_strftime(t,e,n){let i=null,s=null,o=null,a=[],c=0;const h=e.length;for(;cnew f(t)))}function _parse_hh_mm_ss_ff(t){const e=t.length,n=[0,0,0,0];let i=0;for(let s=0;s<3;s++){if(e-i<2)throw new v("Incomplete time component");n[s]=_as_integer(t.slice(i,i+2)),i+=2;const o=t.substr(i,1);if(!o||s>=2)break;if(":"!==o)throw new v("Invalid time separator: "+o);i+=1}if(i0?t.slice(0,e-1):t),s=y;if(e>0){if(n=t.slice(e),![5,8,15].includes(n.length))throw new v("Malformed time zone string");const i=_parse_hh_mm_ss_ff(n);if(i.every((t=>0===t)))s=St.prototype.utc;else{const n="-"===t[e-1]?-1:1,o=new wt(0,n*(3600*i[0]+60*i[1]+i[2]),n*i[3]);s=new St(o)}}return i=i.map((t=>new f(t))),i.push(s),i}function _check_tzname(t){if(t!==y&&!k(t))throw new z("tzinfo.tzname() must return None or string, not \'"+c(t)+"\'")}function _check_utc_offset(t,n){if(n!==y){if(!(n instanceof wt))throw new z(`tzinfo.${t}() must return None or timedelta, not \'${c(n)}\'`);if(!e(zt,n,"Lt")||!e(n,_t,"Lt"))throw new v(`${t}()=${n.toString()}, must be strictly between -timedelta(hours=24) and timedelta(hours=24)`)}}function _check_date_fields(t,e=null,i=null){if(null===e||null===i){throw new z(`function missing required argument \'${null===i?"day":"month"}\' (pos ${null===i?"3":"2"})`)}if(t=n(t),e=n(e),i=n(i),!(1<=t&&t<=j))throw new v("year must be in 1..9999",new f(t));if(!(1<=e&&e<=12))throw new v("month must be in 1..12",new f(e));const s=function _days_in_month(t,e){return 2===e&&_is_leap(t)?29:at[e]}(t,e);if(!(1<=i&&i<=s))throw new v("day must be in 1.."+s,new f(i));return[t,e,i]}function _check_time_fields(t,e,i,s,o){if(t=n(t),e=n(e),i=n(i),s=n(s),o=n(o),!(0<=t&&t<=23))throw new v("hour must be in 0..23",new f(t));if(!(0<=e&&e<=59))throw new v("minute must be in 0..59",new f(e));if(!(0<=i&&i<=59))throw new v("second must be in 0..59",new f(i));if(!(0<=s&&s<=999999))throw new v("microsecond must be in 0..999999",new f(s));if(0!==o&&1!==o)throw new v("fold must be either 0 or 1",new f(o));return[t,e,i,s,o]}function _check_tzinfo_arg(t){if(t!==y&&!(t instanceof Mt))throw new z("tzinfo argument must be None or of a tzinfo subclass")}function _divide_and_round(t,e){let[n,i]=$divMod(t,e);return i*=2,((e>0?i>e:i999999999)throw new M(`days=${t}; must have magnitude <= 999999999`)},slots:{tp$new(t,e){let i,s,o,r,a,$,c,[h,m,u,d,w,_,p]=l("timedelta",["days","seconds","microseconds","milliseconds","minutes","hours","weeks"],t,e,new Array(7).fill(W));i=s=o=W,h=q(h,q(p,K,"Mult"),"Add"),m=q(m,q(q(w,V,"Mult"),q(_,Q,"Mult"),"Add"),"Add"),u=q(u,q(d,tt,"Mult"),"Add"),S(h)?([r,h]=modf(h),[a,$]=modf(q(r,st,"Mult")),s=new f($),i=new f(h)):(a=Z,i=h),S(m)?([c,m]=modf(m),m=new f(m),c=q(c,a,"Add")):c=a,[h,m]=pyDivMod(m,it),i=q(i,h,"Add"),s=q(s,new f(m),"Add");const g=q(c,nt,"Mult");if(S(u)?(u=intRound(q(u,g,"Add")),[m,u]=pyDivMod(u,et),[h,m]=pyDivMod(m,it),i=q(i,h,"Add"),s=q(s,m,"Add")):(u=new f(u),[m,u]=pyDivMod(u,et),[h,m]=pyDivMod(m,it),i=q(i,h,"Add"),s=q(s,m,"Add"),u=intRound(q(u,g,"Add"))),[m,o]=pyDivMod(u,et),s=q(s,m,"Add"),[h,s]=pyDivMod(s,it),i=q(i,h,"Add"),i=n(i),s=n(s),o=n(o),Math.abs(i)>999999999)throw new M("timedelta # of days is too large: "+h.toString());if(this===wt.prototype)return new wt(i,s,o);{const t=new this.constructor;return wt.call(t,i,s,o),t}},$r(){const t=[];return this.$days&&t.push(`days=${this.$days}`),this.$secs&&t.push(`seconds=${this.$secs}`),this.$micro&&t.push(`microseconds=${this.$micro}`),t.length||t.push("0"),new w(`${this.tp$name}(${t.join(", ")})`)},tp$str(){const t=this.$secs%60;let e=Math.floor(this.$secs/60);const n=Math.floor(e/60);e%=60;let i=`${n}:${_d(e)}:${_d(t)}`;if(this.$days){i=`${this.$days} day${function plural(t){return 1!==Math.abs(t)?"s":""}(this.$days)}, `+i}return this.$micro&&(i+=`.${_d(this.$micro,"0",6)}`),new w(i)},tp$as_number:!0,nb$add(t){return t instanceof wt?new wt(this.$days+t.$days,this.$secs+t.$secs,this.$micro+t.$micro):b},nb$subtract(t){return t instanceof wt?new wt(this.$days-t.$days,this.$secs-t.$secs,this.$micro-t.$micro):b},nb$positive(){return this},nb$negative(){return new wt(-this.$days,-this.$secs,-this.$micro)},nb$abs(){return this.$days<0?this.nb$negative():this},nb$multiply(t){if(O(t))return t=i(t,M),new wt(this.$days*t,this.$secs*t,this.$micro*t);if(S(t)){const e=this.$toMicrosecs();let[s,o]=_as_int_ratio(t);return s=i(s,M),o=n(o),new wt(0,0,_divide_and_round(e*s,o))}return b},nb$floor_divide(t){const e=this.$toMicrosecs();if(t instanceof wt){const n=t.$toMicrosecs();if(0===n)throw new A("integer division or modulo by zero");return new f(Math.floor(e/n))}if(O(t)){if(0===(t=i(t,M)))throw new A("integer division or modulo by zero");return new wt(0,0,Math.floor(e/t))}return b},nb$divide(t){const e=this.$toMicrosecs();if(t instanceof wt){if(0===t.$toMicrosecs())throw new A("integer division or modulo by zero");return new d(e/t.$toMicrosecs())}if(O(t))return t=n(t),new wt(0,0,_divide_and_round(e,t));if(S(t)){let[s,o]=_as_int_ratio(t);return s=n(s),o=i(o,M),new wt(0,0,_divide_and_round(o*e,s))}return b},nb$remainder(t){if(!(t instanceof wt))return b;const e=this.$toMicrosecs(),n=t.$toMicrosecs();if(0===n)throw new A("integer division or modulo by zero");const i=e-Math.floor(e/n)*n;return new wt(0,0,i)},nb$divmod(t){if(!(t instanceof wt))return b;const e=this.$toMicrosecs(),n=t.$toMicrosecs(),[i,s]=$divMod(e,n);return new p([new f(i),new wt(0,0,s)])},tp$richcompare(t,e){return t instanceof wt?_do_compare(this,t,e):b},tp$hash(){return-1===this.$hashcode&&(this.$hashcode=u(new p(this.$getState().map((t=>new f(t)))))),this.$hashcode},nb$bool(){return 0!==this.$days||0!==this.$secs||0!==this.$micro}},methods:{total_seconds:{$meth(){return new d(((86400*this.$days+this.$secs)*10**6+this.$micro)/10**6)},$flags:{NoArgs:!0},$doc:"Total seconds in the duration."},__reduce__:{$meth(){return new p([this.ob$type,new p(this.$getState().map((t=>D(t))))])},$flags:{NoArgs:!0},$textsig:null,$doc:"__reduce__() -> (cls, state)"}},getsets:{days:{$get(){return new f(this.$days)},$doc:"Number of days."},seconds:{$get(){return new f(this.$secs)},$doc:"Number of seconds (>= 0 and less than 1 day)."},microseconds:{$get(){return new f(this.$micro)},$doc:"Number of microseconds (>= 0 and less than 1 second)."}},proto:{$toMicrosecs(){return 1e6*(86400*this.$days+this.$secs)+this.$micro},$cmp(t){return _cmp(this.$getState(),t.$getState())},$getState(){return[this.$days,this.$secs,this.$micro]}}});wt.prototype.min=new wt(-999999999),wt.prototype.max=new wt(999999999,86399,999999),wt.prototype.resolution=new wt(0,0,1);const _t=new wt(1),pt=new wt(0,3600),gt=new wt(0,60),yt=new wt(0,1),bt=new wt(0),zt=new wt(-1),vt=E.date=h("datetime.date",{constructor:function date(t,e,n){this.$year=t,this.$month=e,this.$day=n,this.$hashcode=-1},slots:{tp$new(t,e){let n,[i,s,o]=l("date",["year","month","day"],t,e,[null,null]);if(null===s&&i instanceof _&&4===(n=i.valueOf()).length&&1<=n[2]&&n[2]<=12){const t=new this.constructor;return t.$setState(n),t}if([i,s,o]=_check_date_fields(i,s,o),this===vt.prototype)return new vt(i,s,o);{const t=new this.constructor;return vt.call(t,i,s,o),t}},$r(){return new w(`${this.tp$name}(${this.$year}, ${this.$month}, ${this.$day})`)},tp$str(){return this.tp$getattr(H).tp$call([])},tp$richcompare(t,e){return t instanceof vt?_do_compare(this,t,e):b},tp$hash(){return-1===this.$hashcode&&(this.$hashcode=u(this.$getState())),this.$hashcode},tp$as_number:!0,nb$add(t){if(t instanceof wt){const e=this.$toOrdinal()+t.$days;if(0 local date from a POSIX timestamp (like time.time())."},fromordinal:{$meth:function fromordinal(t){return this.tp$call(_ord2ymd(t))},$flags:{OneArg:!0},$textsig:null,$doc:"int -> date corresponding to a proleptic Gregorian ordinal."},fromisocalendar:{$meth:function fromisocalendar(t,e,i){if(t=n(t),e=n(e),i=n(i),!(1<=t&&t<=j))throw new v(`Year is out of range: ${t}`);let s,o;if(!(0 date corresponding to a proleptic Gregorian ordinal."},fromisoformat:{$meth:function fromisoformat(t){if(!k(t))throw new z("fromisoformat: argument must be str");t=t.toString();try{if(10!==t.length)throw new Error;return this.tp$call(_parse_isoformat_date(t))}catch(e){throw new v("Invalid isoformat string: \'"+t+"\'")}},$flags:{OneArg:!0},$textsig:null,$doc:"str -> Construct a date from the output of date.isoformat()"},today:{$meth:function today(){const t=$.time.tp$call([]);return this.tp$getattr(B).tp$call([t])},$flags:{NoArgs:!0},$textsig:null,$doc:"Current date or datetime: same as self.__class__.fromtimestamp(time.time())."}},methods:{ctime:{$meth:function ctime(){const t=this.$toOrdinal()%7||7,e=ft[t],n=lt[this.$month];return new w(`${e} ${n} ${_d(this.$day," ",2)} 00:00:00 ${_d(this.$year,"0",4)}`)},$flags:{NoArgs:!0},$textsig:null,$doc:"Return ctime() style string."},strftime:{$meth:function strftime(t){if(!k(t))throw new z("must be str, not "+c(t));return _wrap_strftime(this,t=t.toString(),this.$timetuple())},$flags:{OneArg:!0},$textsig:null,$doc:"format -> strftime() style string."},__format__:{$meth:function __format__(t){if(!k(t))throw new z("must be str, not "+c(t));return t!==w.$empty?this.tp$getattr(X).tp$call([t]):this.tp$str()},$flags:{OneArg:!0},$textsig:null,$doc:"Formats self with strftime."},timetuple:{$meth:function timetuple(){return this.$timetuple()},$flags:{NoArgs:!0},$textsig:null,$doc:"Return time tuple, compatible with time.localtime()."},isocalendar:{$meth:function isocalendar(){let t=this.$year,e=_isoweek1monday(t);const n=_ymd2ord(this.$year,this.$month,this.$day);let[i,s]=$divMod(n-e,7);return i<0?(t-=1,e=_isoweek1monday(t),[i,s]=$divMod(n-e,7)):i>=52&&n>=_isoweek1monday(t+1)&&(t+=1,i=0),new At(new f(t),new f(i+1),new f(s+1))},$flags:{NoArgs:!0},$textsig:null,$doc:"Return a 3-tuple containing ISO year, week number, and weekday."},isoformat:{$meth:function isoformat(){return this.$isoformat()},$flags:{NoArgs:!0},$textsig:null,$doc:"Return string in ISO 8601 format, YYYY-MM-DD."},isoweekday:{$meth:function isoweekday(){return new f(this.$toOrdinal()%7||7)},$flags:{NoArgs:!0},$textsig:null,$doc:"Return the day of the week represented by the date.\\nMonday == 1 ... Sunday == 7"},toordinal:{$meth:function toordinal(){return new f(this.$toOrdinal())},$flags:{NoArgs:!0},$textsig:null,$doc:"Return proleptic Gregorian ordinal. January 1 of year 1 is day 1."},weekday:{$meth:function weekday(){return new f((this.$toOrdinal()+6)%7)},$flags:{NoArgs:!0},$textsig:null,$doc:"Return the day of the week represented by the date.\\nMonday == 0 ... Sunday == 6"},replace:{$meth:function replace(t,e,n){return t===y&&(t=new f(this.$year)),e===y&&(e=new f(this.$month)),n===y&&(n=new f(this.$day)),this.ob$type.tp$call([t,e,n])},$flags:{NamedArgs:["year","month","day"],Defaults:[y,y,y]},$textsig:null,$doc:"Return date with new specified fields."},__reduce__:{$meth(){return new p([this.ob$type,new p([this.$getState()])])},$flags:{NoArgs:!0},$textsig:null,$doc:"__reduce__() -> (cls, state)"}},getsets:{year:{$get(){return new f(this.$year)},$doc:"year (1-9999)"},month:{$get(){return new f(this.$month)},$doc:"month (1-12)"},day:{$get(){return new f(this.$day)},$doc:"day (1-31)"}},proto:{$cmp(t){return _cmp([this.$year,this.$month,this.$day],[t.$year,t.$month,t.$day])},$getState(){const[t,e]=$divMod(this.$year,256);return new _([t,e,this.$month,this.$day])},$setState(t){const[e,n,i,s]=t,o=256*e+n;this.$year=o,this.$month=i,this.$day=s},$toOrdinal(){return _ymd2ord(this.$year,this.$month,this.$day)},$isoformat(){return new w(`${_d(this.$year,"0",4)}-${_d(this.$month,"0",2)}-${_d(this.$day,"0",2)}`)},$timetuple(){return _build_struct_time(this.$year,this.$month,this.$day,this.$hour||0,this.$min||0,this.$sec||0,-1)},$strftime(t=""){return _wrap_strftime(this,t.toString(),this.$timetuple())}}});vt.prototype.min=new vt(1,1,1),vt.prototype.max=new vt(9999,12,31),vt.prototype.resolution=new wt(1);const Mt=E.tzinfo=h("datetime.tzinfo",{constructor:function tzinfo(){},methods:{tzname:{$meth:function tzname(t){throw new x("tzinfo subclass must override tzname()")},$flags:{OneArg:!0},$textsig:null,$doc:"datetime -> string name of time zone."},utcoffset:{$meth:function utcoffset(t){throw new x("tzinfo subclass must override utcoffset()")},$flags:{OneArg:!0},$textsig:null,$doc:"datetime -> timedelta showing offset from UTC, negative values indicating West of UTC"},dst:{$meth:function dst(t){throw new x("tzinfo subclass must override dst()")},$flags:{OneArg:!0},$textsig:null,$doc:"datetime -> DST offset as timedelta positive east of UTC."},fromutc:{$meth:function fromutc(e){if(!(e instanceof Nt))throw new z("fromutc() requires a datetime argument");if(e.$tzinfo!==this)throw new v("dt.tzinfo is not self");const n=r(e.tp$getattr(U));if(n===y)throw new v("fromutc() requires a non-None utcoffset() result");let i=r(e.tp$getattr(F));if(i===y)throw new v("fromutc() requires a non-None dst() result");const s=q(n,i,"Sub");if(t(s)&&(e=q(e,s,"Add"),i=r(e.tp$getattr(F)),i===y))throw new v("fromutc(): dt.dst gave inconsistent results; cannot convert");return q(e,i,"Add")},$flags:{OneArg:!0},$textsig:null,$doc:"datetime in UTC -> datetime in local time."},__reduce__:{$meth(){let e,n;const i=T(this,new w("__getinitargs__"),y);e=i!==y?r(i,[]):new p;const s=T(this,new w("__getstate__"),y);return s!==y?n=r(s,[]):(n=T(this,new w("__dict__"),y),n=t(n)?n:y),new p(n===y?[this.ob$type,e]:[this.ob$type,e,n])},$flags:{NoArgs:!0},$textsig:null,$doc:"-> (cls, state)"}}}),At=h("datetime.IsoCalendarDate",{base:p,constructor:function IsoCalendarDate(t,e,n){this.y=t,this.w=e,this.wd=n,p.call(this,[t,e,n])},slots:{tp$new(t,e){const[n,i,s]=l("IsoCalendarDate",["year","week","weekday"],t,e);return new this.constructor(n,i,s)},$r(){return new w(`${this.tp$name}(year=${this.y}, week=${this.w}, weekday=${this.wd})`)}},getsets:{year:{$get(){return this.y}},week:{$get(){return this.w}},weekday:{$get(){return this.wd}}}}),xt=E.time=h("datetime.time",{constructor:function time(t=0,e=0,n=0,i=0,s=null,o=0){this.$hour=t,this.$min=e,this.$sec=n,this.$micro=i,this.$tzinfo=s||y,this.$fold=o,this.$hashcode=-1},slots:{tp$new(t,e){m("time",t,0,5);let n,[i,s,o,r,a,$]=l("time",["hour","minute","second","microsecond","tzinfo","fold"],t,e,[W,W,W,W,y,W]);if(i instanceof _&&6===(n=i.valueOf()).length&&(127&n[0])<24){const t=new this.constructor;return t.$setState(n,s===W?y:s),t}if([i,s,o,r,$]=_check_time_fields(i,s,o,r,$),_check_tzinfo_arg(a),this===xt.prototype)return new xt(i,s,o,r,a,$);{const t=new this.constructor;return xt.call(t,i,s,o,r,a,$),t}},tp$richcompare(t,e){return t instanceof xt?_do_compare(this,t,e):b},tp$hash(){if(-1===this.$hashcode){const e=this.$fold?r(this.tp$getattr(J),[],["fold",W]):this,n=r(e.tp$getattr(U));if(t(n)){let[t,e]=pyDivMod(new wt(0,3600*this.$hour+60*this.$min).nb$subtract(n),pt);e=e.nb$floor_divide(gt),0<=t&&t<=24?(t=I(t),e=I(e),this.$hashcode=u(new xt(t,e,this.$sec,this.$micro))):this.$hashcode=u(new p([t,e,new f(this.$sec),new f(this.$micro)]))}else this.$hashcode=u(e.$getState()[0])}return this.$hashcode},$r(){let t;return t=0!==this.$micro?`, ${this.$sec}, ${this.$micro}`:0!==this.$sec?`, ${this.$sec}`:"",t=`${this.tp$name}(${this.$hour}, ${this.$min}${t})`,this.$tzinfo!==y&&(t=t.slice(0,-1)+", tzinfo="+s(this.$tzinfo)+")"),this.$fold&&(t=t.slice(0,-1)+", fold=1)"),new w(t)},tp$str(){return this.tp$getattr(H).tp$call([])}},methods:{isoformat:{$meth:function isoformat(t){let e=_format_time(this.$hour,this.$min,this.$sec,this.$micro,t);const n=this.$tzstr();return n&&(e+=n),new w(e)},$flags:{NamedArgs:["timespec"],Defaults:[C]},$textsig:null,$doc:"Return string in ISO 8601 format, [HH[:MM[:SS[.mmm[uuu]]]]][+HH:MM].\\n\\ntimespec specifies what components of the time to include.\\n"},strftime:{$meth:function strftime(t){if(!k(t))throw new z("must be str, not "+c(t));return _wrap_strftime(this,t=t.toString(),new p([1900,1,1,this.$hour,this.$min,this.$sec,0,1,-1].map((t=>new f(t)))))},$flags:{OneArg:!0},$textsig:null,$doc:"format -> strftime() style string."},__format__:{$meth:function __format__(t){if(!k(t))throw new z("must be str, not "+c(t));return t!==w.$empty?this.tp$getattr(X).tp$call([t]):this.tp$str()},$flags:{OneArg:!0},$textsig:null,$doc:"Formats self with strftime."},utcoffset:{$meth:function utcoffset(){if(this.$tzinfo===y)return y;const t=this.$tzinfo.tp$getattr(U),e=r(t,[y]);return _check_utc_offset("utcoffset",e),e},$flags:{NoArgs:!0},$textsig:null,$doc:"Return self.tzinfo.utcoffset(self)."},tzname:{$meth:function tzname(){if(this.$tzinfo===y)return y;const t=this.$tzinfo.tp$getattr(Y),e=r(t,[y]);return _check_tzname(e),e},$flags:{NoArgs:!0},$textsig:null,$doc:"Return self.tzinfo.tzname(self)."},dst:{$meth:function dst(){if(this.$tzinfo===y)return y;const t=this.$tzinfo.tp$getattr(F),e=r(t,[y]);return _check_utc_offset("dst",e),e},$flags:{NoArgs:!0},$textsig:null,$doc:"Return self.tzinfo.dst(self)."},replace:{$meth:function replace(t,e){m("replace",t,0,5);let[n,i,s,o,r,a]=l("replace",["hour","minute","second","microsecond","tzinfo","fold"],t,e,[y,y,y,y,g,y]);return n===y&&(n=new f(this.$hour)),i===y&&(i=new f(this.$min)),s===y&&(s=new f(this.$sec)),o===y&&(o=new f(this.$micro)),r===g&&(r=this.$tzinfo),a===y&&(a=new f(this.$fold)),this.ob$type.tp$call([n,i,s,o,r],["fold",a])},$flags:{FastCall:!0},$textsig:null,$doc:"Return time with new specified fields."},__reduce_ex__:{$meth(t){return new p([this.ob$type,new p(this.$getState(R(t)))])},$flags:{OneArg:!0},$textsig:null,$doc:"__reduce_ex__(proto) -> (cls, state)"},__reduce__:{$meth(){return this.tp$getattr(new w("__reduce_ex__")).tp$call([new f(2)])},$flags:{NoArgs:!0},$textsig:null,$doc:"__reduce__() -> (cls, state)"}},classmethods:{fromisoformat:{$meth:function fromisoformat(t){if(!k(t))throw new z("fromisoformat: argument must be str");t=t.toString();try{return this.tp$call(_parse_isoformat_time(t))}catch{throw new v("Invalid isofrmat string: \'"+t+"\'")}},$flags:{OneArg:!0},$textsig:null,$doc:"string -> time from time.isoformat() output"}},getsets:{hour:{$get(){return new f(this.$hour)}},minute:{$get(){return new f(this.$min)}},second:{$get(){return new f(this.$sec)}},microsecond:{$get(){return new f(this.$micro)}},tzinfo:{$get(){return this.$tzinfo}},fold:{$get(){return new f(this.$fold)}}},proto:{$cmp(t,n){const s=this.$tzinfo,o=t.$tzinfo;let a,$,c;if(a=$=y,s===o?c=!0:(a=r(this.tp$getattr(U)),$=r(t.tp$getattr(U)),c=e(a,$,"Eq")),c)return _cmp([this.$hour,this.$min,this.$sec,this.$micro],[t.$hour,t.$min,t.$sec,t.$micro]);if(a===y||$===y){if("Eq"===n||"NotEq"===n)return 2;throw new z("cannot compare naive and aware times")}const h=60*this.$hour+this.$min-i(a.nb$floor_divide(gt)),m=60*t.$hour+t.$min-i($.nb$floor_divide(gt));return _cmp([h,this.$sec,this.$micro],[m,t.$sec,t.$micro])},$tzstr(){return _format_offset(r(this.tp$getattr(U)))},$getState(t=3){let[e,n]=$divMod(this.$micro,256),[i,s]=$divMod(e,256),o=this.$hour;this.$fold&&t>3&&(o+=128);const r=new _([o,this.$min,this.$sec,i,s,n]);return this.$tzinfo===y?[r]:[r,this.$tzinfo]},$setState(t,e){const[n,i,s,o,r,a]=t;n>127?(this.$fold=1,this.$hour=n-128):(this.$fold=0,this.$hour=n),this.$min=i,this.$sec=s,this.$micro=(o<<8|r)<<8|a,this.$tzinfo=e}}});xt.prototype.min=new xt(0,0,0),xt.prototype.max=new xt(23,59,59,999999),xt.prototype.resolution=new wt;const Nt=E.datetime=h("datetime.datetime",{base:vt,constructor:function datetime(t,e,n,i=0,s=0,o=0,r=0,a=null,$=0){this.$year=t,this.$month=e,this.$day=n,this.$hour=i,this.$min=s,this.$sec=o,this.$micro=r,this.$tzinfo=a||y,this.$fold=$,this.$hashcode=-1},slots:{tp$new(t,e){m("datetime",t,0,9);let n,[i,s,o,r,a,$,c,h,u]=l("time",["year","month","day","hour","minute","second","microsecond","tzinfo","fold"],t,e,[null,null,W,W,W,W,y,W]);if(i instanceof _&&10===(n=i.valueOf()).length&&(127&n[2])<=12){const t=new this.constructor;return t.$setState(n,null===s?y:s),t}if([i,s,o]=_check_date_fields(i,s,o),[r,a,$,c,u]=_check_time_fields(r,a,$,c,u),_check_tzinfo_arg(h),this===Nt.prototype)return new Nt(i,s,o,r,a,$,c,h,u);{const t=new this.constructor;return Nt.call(t,i,s,o,r,a,$,c,h,u),t}},$r(){const t=[this.$year,this.$month,this.$day,this.$hour,this.$min,this.$sec,this.$micro];0===t[t.length-1]&&t.pop(),0===t[t.length-1]&&t.pop();let e=`${this.tp$name}(${t.join(", ")})`;return this.$tzinfo!==y&&(e=e.slice(0,-1)+", tzinfo="+s(this.$tzinfo)+")"),this.$fold&&(e=e.slice(0,-1)+", fold=1)"),new w(e)},tp$str(){return this.tp$getattr(H).tp$call([],["sep",new w(" ")])},tp$richcompare(t,e){if(t instanceof Nt)return _do_compare(this,t,e);if(!(t instanceof vt))return b;if("Eq"===e||"NotEq"===e)return"NotEq"===e;throw new z(`can\'t compare \'${c(this)}\' to \'${c(t)}\'`)},tp$as_number:!0,nb$add(t){if(!(t instanceof wt))return b;let e=new wt(this.$toOrdinal(),3600*this.$hour+60*this.$min+this.$sec,this.$micro);e=q(e,t,"Add");let[n,i]=$divMod(e.$secs,3600),[s,o]=$divMod(i,60);if(0 string in ISO 8601 format, YYYY-MM-DDT[HH[:MM[:SS[.mmm[uuu]]]]][+HH:MM].\\nsep is used to separate the year from the time, and defaults to \'T\'.\\ntimespec specifies what components of the time to include (allowed values are \'auto\', \'hours\', \'minutes\', \'seconds\', \'milliseconds\', and \'microseconds\').\\n"},utcoffset:{$meth:function utcoffset(){if(this.$tzinfo===y)return y;const t=this.$tzinfo.tp$getattr(U),e=r(t,[this]);return _check_utc_offset("utcoffset",e),e},$flags:{NoArgs:!0},$textsig:null,$doc:"Return self.tzinfo.utcoffset(self)."},tzname:{$meth:function tzname(){if(this.$tzinfo===y)return y;const t=this.$tzinfo.tp$getattr(Y),e=r(t,[this]);return _check_tzname(e),e},$flags:{NoArgs:!0},$textsig:null,$doc:"Return self.tzinfo.tzname(self)."},dst:{$meth:function dst(){if(this.$tzinfo===y)return y;const t=this.$tzinfo.tp$getattr(F),e=r(t,[this]);return _check_utc_offset("dst",e),e},$flags:{NoArgs:!0},$textsig:null,$doc:"Return self.tzinfo.dst(self)."},replace:{$meth:function replace(t,e){m("replace",t,0,8);let[n,i,s,o,r,a,$,c,h]=l("replace",["year","month","day","hour","minute","second","microsecond","tzinfo","fold"],t,e,[y,y,y,y,y,y,y,g,y]);return n===y&&(n=new f(this.$year)),i===y&&(i=new f(this.$month)),s===y&&(s=new f(this.$day)),o===y&&(o=new f(this.$hour)),r===y&&(r=new f(this.$min)),a===y&&(a=new f(this.$sec)),$===y&&($=new f(this.$micro)),c===g&&(c=this.$tzinfo),h===y&&(h=new f(this.$fold)),this.ob$type.tp$call([n,i,s,o,r,a,$,c],["fold",h])},$flags:{FastCall:!0},$textsig:null,$doc:"Return datetime with new specified fields."},astimezone:{$meth:function astimezone(t){if(t===y)t=this.$localTimezone();else if(!(t instanceof Mt))throw new z("tz argument must be an instance of tzinfo");let e,n=this.$tzinfo;if(n===y?(n=this.$localTimezone(),e=r(n.tp$getattr(U),[this])):(e=r(n.tp$getattr(U),[this]),e===y&&(n=r(this.tp$getattr(J),[],["tzinfo",y]).$localTimezone(),e=r(n.tp$getattr(U),[this]))),t===n)return this;const i=r(this.nb$subtract(e).tp$getattr(J),[],["tzinfo",t]);return t.tp$getattr(P).tp$call([i])},$flags:{NamedArgs:["tz"],Defaults:[y]},$textsig:null,$doc:"tz -> convert to local time in new timezone tz\\n"},__reduce_ex__:{$meth(t){return new p([this.ob$type,new p(this.$getState(R(t)))])},$flags:{OneArg:!0},$textsig:null,$doc:"__reduce_ex__(proto) -> (cls, state)"},__reduce__:{$meth(){return this.tp$getattr(new w("__reduce_ex__")).tp$call([new f(2)])},$flags:{NoArgs:!0},$textsig:null,$doc:"__reduce__() -> (cls, state)"}},classmethods:{now:{$meth:function now(t){const e=$.time.tp$call([]);return this.tp$getattr(B).tp$call([e,t])},$flags:{NamedArgs:["tz"],Defaults:[y]},$textsig:"($type, /, tz=None)",$doc:"Returns new datetime object representing current time local to tz.\\n\\n tz\\n Timezone object.\\n\\nIf no tz is specified, uses local timezone."},utcnow:{$meth:function utcnow(){const t=$.time.tp$call([]);return this.tp$getattr(L).tp$call([t])},$flags:{NoArgs:!0},$textsig:null,$doc:"Return a new datetime representing UTC day and time."},fromtimestamp:{$meth:function fromtimestamp(t,e){return _check_tzinfo_arg(e),this.prototype.$fromtimestamp.call(this,t,e!==y,e)},$flags:{NamedArgs:["timestamp","tz"],Defaults:[y]},$textsig:null,$doc:"timestamp[, tz] -> tz\'s local time from POSIX timestamp."},utcfromtimestamp:{$meth:function utcfromtimestamp(t){return this.prototype.$fromtimestamp.call(this,t,!0,y)},$flags:{OneArg:!0},$textsig:null,$doc:"Construct a naive UTC datetime from a POSIX timestamp."},strptime:{$meth:function strptime(t,e){return null===ot?Sk.misceval.chain(Sk.importModule("_strptime",!1,!0),(n=>(ot=n.tp$getattr(new w("_strptime_datetime")),ot.tp$call([this,t,e])))):ot.tp$call([this,t,e])},$flags:{MinArgs:2,MaxArgs:2},$textsig:null,$doc:"string, format -> new datetime parsed from a string (like time.strptime())."},combine:{$meth:function combine(t,e,n){if(!(t instanceof vt))throw new z("date argument must be a date instance");if(!(e instanceof xt))throw new z("time argument must be a time instance");n===g&&(n=e.$tzinfo);const i=[t.$year,t.$month,t.$day,e.$hour,e.$min,e.$sec,e.$micro].map((t=>new f(t)));return i.push(n),this.tp$call(i,["fold",new f(e.$fold)])},$flags:{NamedArgs:["date","time","tzinfo"],Defaults:[g]},$textsig:null,$doc:"date, time -> datetime with same date and time fields"},fromisoformat:{$meth:function fromisoformat(t){if(!k(t))throw new z("fromisoformat: argument must be str");const e=(t=t.toString()).slice(0,10),n=t.slice(11);let i,s;try{i=_parse_isoformat_date(e)}catch(o){throw new v("Invalid isoformat string: \'"+t+"\'")}if(n)try{s=_parse_isoformat_time(n)}catch(o){throw new v("Invalid isoformat string: \'"+t+"\'")}else s=[W,W,W,W,y];return this.tp$call(i.concat(s))},$flags:{OneArg:!0},$textsig:null,$doc:"string -> datetime from datetime.isoformat() output"}},getsets:{hour:{$get(){return new f(this.$hour)}},minute:{$get(){return new f(this.$min)}},second:{$get(){return new f(this.$sec)}},microsecond:{$get(){return new f(this.$micro)}},tzinfo:{$get(){return this.$tzinfo}},fold:{$get(){return new f(this.$fold)}}},proto:{$cmp(n,i){const s=this.$tzinfo,o=n.$tzinfo;let a,$,c;if(a=$=y,s===o)c=!0;else{if(a=r(this.tp$getattr(U)),$=r(n.tp$getattr(U)),"Eq"===i||"NotEq"===i){const t=r(this.tp$getattr(J),[],["fold",new f(Number(!this.$fold))]);if(e(a,r(t.tp$getattr(U)),"NotEq"))return 2;const i=r(n.tp$getattr(J),[],["fold",new f(Number(!n.$fold))]);if(e($,r(i.tp$getattr(U)),"NotEq"))return 2}c=e(a,$,"Eq")}if(c)return _cmp([this.$year,this.$month,this.$day,this.$hour,this.$min,this.$sec,this.$micro],[n.$year,n.$month,n.$day,n.$hour,n.$min,n.$sec,n.$micro]);if(a===y||$===y){if("Eq"===i||"NotEq"===i)return 2;throw new z("cannot compare naive and aware datetimes")}const h=this.nb$subtract(n);return h.$days<0?-1:t(h)?1:0},$mkTime(){const t=new Nt(1970,1,1),e=this.nb$subtract(t).nb$floor_divide(yt);function local(e){const[n,i,s,o,r,a]=$.localtime.tp$call([e]).v;return Nt.tp$call([n,i,s,o,r,a]).nb$subtract(t).nb$floor_divide(yt)}let n,i,s=local(e).nb$subtract(e),o=e.nb$subtract(s),r=local(o);if(r.ob$eq(e)){if(n=o.nb$add([new f(-86400),new f(86400)][this.$fold]),i=local(n).nb$subtract(n),s.ob$eq(i))return o}else i=r.nb$subtract(o);n=e.nb$subtract(i);if(local(n).ob$eq(e))return n;if(r.ob$eq(e))return o;const a=o.ob$ge(n)?o:n;return[a,o===a?n:o][this.$fold]},$fromtimestamp(t,n,s){let o;if(!N(t))throw new z("a number is required, (got \'"+c(t)+"\'");[o,t]=modf(t);let a=intRound(q(o,nt,"Mult"));a=a.v,t=t.v,a>=1e6?(t+=1,a-=1e6):a<0&&(t-=1,a+=1e6),t=new f(t),Number.isInteger(a)||(a=Math.trunc(a)),a=new f(a);const h=n?$.gmtime:$.localtime;function converter(t){return h.tp$call([t]).v}let[m,u,l,d,_,p]=converter(t);p=new f(Math.min(i(p),59));let g=r(this,[m,u,l,d,_,p,a,s]);if(s===y){const n=86400;[m,u,l,d,_,p]=converter(q(t,new f(n),"Sub"));const i=r(this,[m,u,l,d,_,p,a,s]),o=q(q(g,i,"Sub"),new wt(0,n),"Sub");if(o.$days<0){[m,u,l,d,_,p]=converter(q(t,q(o,yt,"FloorDiv"),"Add"));const n=r(this,[m,u,l,d,_,p,a,s]);e(n,g,"Eq")&&(g.$fold=1)}}else g=r(s.tp$getattr(new w("fromutc")),[g]);return g},$localTimezone(){let t;t=this.$tzinfo===y?this.$mkTime():this.nb$subtract(kt).nb$floor_divide(yt);const e=$.localtime.tp$call([t]),n=(Nt.tp$call(e.v.slice(0,6)),e.tp$getattr(new w("tm_gmtoff"))),i=e.tp$getattr(new w("tm_zone"));return new St(wt.tp$call([W,n]),i)},$getState(t=3){let[e,n]=$divMod(this.$year,256),[i,s]=$divMod(this.$micro,256),[o,r]=$divMod(i,256),a=this.$month;this.$fold&&t>3&&(a+=128);const $=new _([e,n,a,this.$day,this.$hour,this.$min,this.$sec,o,r,s]);return this.$tzinfo===y?[$]:[$,this.$tzinfo]},$setState(t,e){const[n,i,s,o,r,a,$,c,h,m]=t;s>127?(this.$fold=1,this.$month=s-128):(this.$fold=0,this.$month=s),this.$year=256*n+i,this.$day=o,this.$hour=r,this.$min=a,this.$sec=$,this.$micro=(c<<8|h)<<8|m,this.$tzinfo=e}}});function _isoweek1monday(t){const e=_ymd2ord(t,1,1),n=(e+6)%7;let i=e-n;return n>3&&(i+=7),i}Nt.prototype.min=new Nt(1,1,1),Nt.prototype.max=new Nt(9999,12,31,23,59,59,999999),Nt.prototype.resolution=new wt(0,0,1);const St=E.timezone=h("datetime.timezone",{base:Mt,constructor:function timezone(t,n){if(this.$offset=t,this.$name=n||y,!e(this.$minoffset,t,"LtE")||!e(this.$maxoffset,t,"GtE"))throw new v("offset must be a timedelta strictly between -timedelta(hours=24) and timedelta(hours=24).")},slots:{tp$new(e,n){let[i,s]=l("timezone",["offset","name"],e,n,[null]);if(!(i instanceof wt))throw new z("offset must be a timedelta");if(null===s){if(!t(i))return this.utc;s=y}else if(!k(s))throw new z("name must be a string");if(this===St.prototype)return new St(i,s);{const t=new this.constructor;return St.call(t,i,s),t}},tp$richcompare(t,n){if(!(t instanceof St))return b;const i=e(this.$offset,t.$offset,"Eq");return"NotEq"===n?!i:"Eq"===n||i&&o(n)?i:b},$r(){return this===this.utc?new w("datetime.timezone.utc"):this.$name===y?new w(`${this.tp$name}(${s(this.$offset)})`):new w(`${this.tp$name}(${s(this.$offset)}, ${s(this.$name)})`)},tp$str(){return this.tp$getattr(Y).tp$call([y])},tp$hash(){return u(this.$offset)}},methods:{tzname:{$meth:function tzname(t){if(t instanceof Nt||t===y)return this.$name===y?this.$nameFromOff(this.$offset):this.$name;throw new z("tzname() argument must be a datetime instance or None")},$flags:{OneArg:!0},$textsig:null,$doc:"If name is specified when timezone is created, returns the name. Otherwise returns offset as \'UTC(+|-)HH:MM\'."},utcoffset:{$meth:function utcoffset(t){if(t instanceof Nt||t===y)return this.$offset;throw new z("utcoffset() argument must be a datetime instance or None")},$flags:{OneArg:!0},$textsig:null,$doc:"Return fixed offset."},dst:{$meth:function dst(t){if(t instanceof Nt||t===y)return y;throw new z("dst() argument must be a datetime instance or None")},$flags:{OneArg:!0},$textsig:null,$doc:"Return None."},fromutc:{$meth:function fromutc(t){if(t instanceof Nt){if(t.$tzinfo!==this)throw new v("fromutc: dt.tzinfo is not self");return q(t,this.$offset,"Add")}throw new z("fromutc() argument must be a datetime instance or None")},$flags:{OneArg:!0},$textsig:null,$doc:"datetime in UTC -> datetime in local time."},__getinitargs__:{$meth(){return this.$name===y?new p([this.$offset]):new p([this.$offset,this.$name])},$flags:{NoArgs:!0}}},proto:{$maxoffset:new wt(0,86399,999999),$minoffset:new wt(-1,0,1),$nameFromOff(n){if(!t(n))return new w("UTC");let i,s,o,r,a,$;return e(n,bt,"Lt")?(i="-",n=n.nb$negative()):i="+",[s,o]=pyDivMod(n,pt),[r,o]=pyDivMod(o,gt),a=o.$secs,$=o.$micro,new w($?`UTC${i}${_d(s)}:${_d(r)}:${_d(a)}.${_d($,"0",6)}`:a?`UTC${i}${_d(s)}:${_d(r)}:${_d(a)}`:`UTC${i}${_d(s)}:${_d(r)}`)}}});St.prototype.utc=new St(new wt(0)),St.prototype.min=new St(new wt(0,-86340,0)),St.prototype.max=new St(new wt(0,86340,0));const kt=new Nt(1970,1,1,0,0,0,0,St.prototype.utc);return E}))}',"src/lib/document.js":'function $builtinmodule(){const{builtin:{str:t},misceval:{callsimArray:e},ffi:{toPy:r},abstr:{gattr:a}}=Sk,n={__name__:new t("document")},_=r(Sk.global.document);return Sk.abstr.setUpModuleMethods("document",n,{__getattr__:{$meth:t=>a(_,t,!0),$flags:{OneArg:!0}},__dir__:{$meth:()=>e(_.tp$getattr(t.$dir)),$flags:{NoArgs:!0}}}),n}',"src/lib/fractions.js":'function $builtinmodule(t){const e={};return Sk.misceval.chain(Sk.importModule("math",!1,!0),(t=>(e.math=t,Sk.importModule("sys",!1,!0))),(t=>(e.sys=t,fractionsMod(e))))}function fractionsMod({math:t,sys:e}){const{builtin:{int_:n,bool:{true$:i,false$:r},none:{none$:s},NotImplemented:{NotImplemented$:o},tuple:a,float_:$,complex:u,str:h,isinstance:l,TypeError:m,ZeroDivisionError:d,ValueError:f,NotImplementedError:c,abs:_,round:b,pow:p},ffi:{remapToPy:g},abstr:{buildNativeClass:w,copyKeywordsToNamedArgs:v,numberBinOp:y,typeName:k,lookupSpecial:E,checkArgsLen:N},misceval:{isTrue:F,richCompareBool:A,callsimArray:S,objectRepr:M}}=Sk,O={__name__:new h("fractions"),__all__:g(["Fraction"])},D=/^\\s*(?[-+]?)(?=\\d|\\.\\d)(?\\d*)(?:(?:\\/(?\\d+))?|(?:\\.(?\\d*))?(?:E(?[-+]?\\d+))?)\\s*$/i,q=new n(0),x=new n(1),z=new n(2),I=new n(10),T=new h("numerator"),R=new h("denominator"),B=new h("as_integer_ratio"),C=new h("from_float"),getNumer=t=>t.tp$getattr(T),getDenom=t=>t.tp$getattr(R),mul=(t,e)=>y(t,e,"Mult"),div=(t,e)=>y(t,e,"Div"),pow=(t,e)=>y(t,e,"Pow"),add=(t,e)=>y(t,e,"Add"),sub=(t,e)=>y(t,e,"Sub"),floorDiv=(t,e)=>y(t,e,"FloorDiv"),divmod=(t,e)=>y(t,e,"DivMod"),mod=(t,e)=>y(t,e,"Mod"),K=t.tp$getattr(new h("gcd")),eq=(t,e)=>A(t,e,"Eq"),lt=(t,e)=>A(t,e,"Lt"),ge=(t,e)=>A(t,e,"GtE"),L={NoArgs:!0},P={OneArg:!0},j=e.tp$getattr(new h("hash_info")),G=j.tp$getattr(new h("modulus")),V=j.tp$getattr(new h("inf"));function _operator_fallbacks(t,e){return[function(n){return isRational(n)?t(this,n):n instanceof $?e(this.nb$float(),n):n instanceof u?e(S(u,[this]),n):o},function(n){return isRational(n)?t(n,this):n instanceof $?e(n,this.nb$float()):n instanceof u?e(n,S(u,[this])):o}]}const[Z,H]=_operator_fallbacks(((t,e)=>{const n=getDenom(t),i=getDenom(e);return S(ot,[add(mul(getNumer(t),i),mul(getNumer(e),n)),mul(n,i)])}),add),[J,Q]=_operator_fallbacks(((t,e)=>{const n=getDenom(t),i=getDenom(e);return S(ot,[sub(mul(getNumer(t),i),mul(getNumer(e),n)),mul(n,i)])}),sub),[U,W]=_operator_fallbacks(((t,e)=>S(ot,[mul(getNumer(t),getNumer(e)),mul(getDenom(t),getDenom(e))])),mul),[X,Y]=_operator_fallbacks(((t,e)=>S(ot,[mul(getNumer(t),getDenom(e)),mul(getDenom(t),getNumer(e))])),div),[tt,et]=_operator_fallbacks(((t,e)=>floorDiv(mul(getNumer(t),getDenom(e)),mul(getDenom(t),getNumer(e)))),floorDiv),[nt,it]=_operator_fallbacks(((t,e)=>{const n=getDenom(t),i=getDenom(e),[r,s]=divmod(mul(getNumer(t),i),mul(n,getNumer(e))).valueOf();return new a([r,S(ot,[s,mul(n,i)])])}),divmod),[rt,st]=_operator_fallbacks(((t,e)=>{const n=getDenom(t),i=getDenom(e),r=mod(mul(getNumer(t),i),mul(getNumer(e),n));return S(ot,[r,mul(n,i)])}),mod),ot=O.Fraction=w("fractions.Fraction",{constructor:function(t,e){this.$num=t||q,this.$den=e||x},slots:{tp$new(t,e){N("Fraction",t,0,2);let[r,o,a]=v("Fraction",["numerator","denominator","_normalize"],t,e,[q,s,i]);const u=new this.constructor;if(o===s){if(r.ob$type===n)return u.$num=r,u.$den=x,u;if(isRational(r))return u.$num=getNumer(r),u.$den=getDenom(r),u;if(r instanceof $)return[u.$num,u.$den]=S(r.tp$getattr(B)).valueOf(),u;if(!(r instanceof h))throw new m("argument should be a string or a Rational instance");{const t=r.toString().match(D);if(null===t)throw new f("Invalid literal for Fraction: "+M(r));r=new n(t.groups.num||"0");const e=t.groups.denom;if(e)o=new n(e);else{o=x;const e=t.groups.decimal;if(e){const t=new n(""+10**e.length);r=add(mul(r,t),new n(e)),o=mul(o,t)}let i=t.groups.exp;i&&(i=new n(i),lt(i,q)?o=mul(o,pow(I,i.nb$negative())):r=mul(r,pow(I,i)))}"-"==t.groups.sign&&(r=r.nb$negative())}}else if(r.ob$type===n&&o.ob$type===n);else{if(!isRational(r)||!isRational(o))throw new m("both arguments should be Rational instances");[r,o]=[mul(getNumer(r),getDenom(o)),mul(getNumer(o),getDenom(r))]}if(eq(o,q))throw new d(`Fraction(${r}, 0)`);if(F(a)){let t=S(K,[r,o]);lt(o,q)&&(t=t.nb$negative()),r=floorDiv(r,t),o=floorDiv(o,t)}return u.$num=r,u.$den=o,u},$r(){const t=E(this.ob$type,h.$name);return new h(`${t}(${this.$num}, ${this.$den})`)},tp$str(){return eq(this.$den,x)?new h(this.$num):new h(`${this.$num}/${this.$den}`)},tp$hash(){const t=p(this.$den,sub(G,z),G);let e;e=F(t)?mod(mul(_(this.$num),t),G):V;let n=ge(this,q)?e:e.nb$negative();return n=n.tp$hash(),-1===n?-2:n},tp$richcompare(t,e){const op=(t,n)=>A(t,n,e);if("Eq"===e||"NotEq"==e){if(t.ob$type===n){const n=eq(this.$num,t)&&eq(this.$den,x);return"Eq"===e?n:!n}if(t instanceof ot||t instanceof n){const n=eq(this.$num,getNumer(t))&&eq(this.$den,getDenom(t));return"Eq"===e?n:!n}t instanceof u&&eq(t.tp$getattr(new h("imag")),q)&&(t=t.tp$getattr(new h("real")))}return isRational(t)?op(mul(getNumer(this),getDenom(t)),mul(getDenom(this),getNumer(t))):t instanceof $?Number.isFinite(t.valueOf())?op(this,S(this.tp$getattr(C),[t])):op(new $(0),t):o},tp$as_number:!0,nb$add:Z,nb$reflected_add:H,nb$subtract:J,nb$reflected_subtract:Q,nb$multiply:U,nb$reflected_multiply:W,nb$divide:X,nb$reflected_divide:Y,nb$floor_divide:tt,nb$reflected_floor_divide:et,nb$divmod:nt,nb$reflected_divmod:it,nb$remainder:rt,nb$reflected_remainder:st,nb$power(t){if(isRational(t)){if(eq(getDenom(t),x)){let e=getNumer(t);return ge(e,q)?S(ot,[pow(this.$num,e),pow(this.$den,e)],["_normalize",r]):ge(this.$num,q)?(e=e.nb$negative(),S(ot,[pow(this.$den,e),pow(this.$num,e)],["_normalize",r])):(e=e.nb$negative(),S(ot,[pow(this.$den.nb$negative(),e),pow(this.$num.nb$negative(),e)],["_normalize",r]))}return pow(this.nb$float(),S($,[t]))}return pow(this.nb$float(),t)},nb$reflected_power(t){return eq(this.$den,x)&&ge(this.$num,q)?pow(t,this.$num):isRational(t)?pow(new ot(getNumer(t),getDenom(t)),this):eq(this.$den,x)?pow(t,this.$num):pow(t,this.nb$float())},nb$positive(){return new ot(this.$num,this.$den)},nb$negative(){return new ot(this.$num.nb$negative(),this.$den)},nb$abs(){return new ot(this.$num.nb$abs(),this.$den)},nb$bool(){return this.$num.nb$bool()},nb$float(){return div(this.$num,this.$den)}},methods:{as_integer_ratio:{$meth(){return new a([this.$num,this.$den])},$flags:L},limit_denominator:{$meth(t){if(lt(t,x))throw new f("max_denominator should be at least 1");if(ge(t,this.$den))return S(ot,[this]);let[e,n,i,r]=[q,x,x,q],s=this.$num,o=this.$den;for(;;){const a=floorDiv(s,o),$=add(n,mul(a,r));if(lt(t,$))break;[e,n,i,r]=[i,r,add(e,mul(a,i)),$],[s,o]=[o,sub(s,mul(a,o))]}const a=floorDiv(sub(t,n),r),$=S(ot,[add(e,mul(a,i)),add(n,mul(a,r))]),u=S(ot,[i,r]);return ge(_(sub($,this)),_(sub(u,this)))?u:$},$flags:{NamedArgs:["max_denominator"],Defaults:[new n(1e6)]}},__trunc__:{$meth(){return lt(this.$num,q)?floorDiv(this.$num.nb$negative(),this.$den).nb$negative():floorDiv(this.$num,this.$den)},$flags:L},__floor__:{$meth(){return floorDiv(this.$num,this.$den)},$flags:L},__ceil__:{$meth(){return floorDiv(this.$num.nb$negative(),this.$den).nb$negative()},$flags:L},__round__:{$meth(t){if(t===s){const[t,e]=divmod(this.$num,this.$den).valueOf(),n=mul(e,z);return lt(n,this.$den)?t:lt(this.$den,n)?add(t,x):eq(mod(t,z),q)?t:add(t,x)}const e=pow(I,_(t));return lt(q,t)?S(ot,[b(mul(this,e)),e]):S(ot,[mul(b(div(this,e)),e)])},$flags:{NamedArgs:["ndigits"],Defaults:[s]}},__reduce__:{$meth(){return new a([this.ob$type,new a([new h(this)])])},$flags:L},__copy__:{$meth(){return this.ob$type===ot?this:S(this.ob$type,[this.$num,this.$den])},$flags:L},__deepcopy__:{$meth(t){return this.ob$type===ot?this:S(this.ob$type,[this.$num,this.$den])},$flags:P}},classmethods:{from_float:{$meth(t){if(t instanceof n)return S(this,[t]);if(t instanceof $){const[e,n]=S(t.tp$getattr(B)).valueOf();return S(this,[e,n])}throw new m(`${k(this)}.from_float() only takes floats, not ${M(t)}, (${k(t)})`)},$flags:P},from_decimal:{$meth(){throw c("from_decimal not yet implemented in SKulpt")},$flags:P}},getsets:{numerator:{$get(){return this.$num}},denominator:{$get(){return this.$den}},_numerator:{$get(){return this.$num},$set(t){this.$num=t}},_denominator:{$get(){return this.$den},$set(t){this.$den=t}}}}),at=new a([n,ot]),isRational=t=>F(l(t,at));return O}',"src/lib/functools.js":`function $builtinmodule(){const t={};return Sk.misceval.chain(Sk.importModule("collections",!1,!0),(e=>(t._namedtuple=e.$d.namedtuple,functools_mod(t))))}function functools_mod(t){const{object:e,int_:n,str:r,list:s,tuple:a,dict:i,none:{none$:o},bool:{false$:c},NotImplemented:{NotImplemented$:_},bool:l,func:h,method:p,TypeError:u,RuntimeError:d,ValueError:f,NotImplementedError:m,AttributeError:w,OverflowError:g,checkNone:$,checkBool:y,checkCallable:k,checkClass:b}=Sk.builtin,{callsimArray:x,callsimOrSuspendArray:A,iterFor:S,chain:E,isIndex:v,asIndexSized:N,isTrue:P,richCompareBool:j,objectRepr:R,retryOptionalSuspeionOrThrow:z,chain:q}=Sk.misceval,{remapToPy:T}=Sk.ffi,{checkOneArg:I,checkNoKwargs:C,buildNativeClass:D,setUpModuleMethods:M,keywordArrayFromPyDict:O,keywordArrayToPyDict:W,objectHash:U,lookupSpecial:F,copyKeywordsToNamedArgs:G,typeName:B,objectSetItem:K,iter:L,gattr:H}=Sk.abstr,{getSetDict:V,getAttr:J,setAttr:Q}=Sk.generic;function proxyFail(t){return new h((()=>{throw new m(t+" is not yet implemented in skulpt")}))}Object.assign(t,{__name__:new r("functools"),__doc__:new r("Tools for working with functions and callable objects"),__all__:new s(["update_wrapper","wraps","WRAPPER_ASSIGNMENTS","WRAPPER_UPDATES","total_ordering","cmp_to_key","cache","lru_cache","reduce","partial","partialmethod","singledispatch","singledispatchmethod","cached_property"].map((t=>new r(t)))),WRAPPER_ASSIGNMENTS:new a(["__module__","__name__","__qualname__","__doc__","__annotations__"].map((t=>new r(t)))),WRAPPER_UPDATES:new a([new r("__dict__")]),singledispatch:proxyFail("singledispatch"),singledispatchmethod:proxyFail("singledispatchmethod")});const X=new r("cache_parameters");function _lru_cache(e,n){if(n||(n=c),v(e))(e=N(e,g))<0&&(e=0);else{if(k(e)&&y(n)){const r=e,s=new Z(r,e=128,n);return s.tp$setattr(X,new h((()=>T({maxsize:e,typed:n})))),A(t.update_wrapper,[s,r])}if(!$(e))throw new u("Expected first argument to be an integer, a callable, or None")}return new h((r=>{const s=new Z(r,e,n);return s.tp$setattr(X,new h((()=>T({maxsize:e,typed:n})))),A(t.update_wrapper,[s,r])}))}const Y=t._CacheInfo=x(t._namedtuple,["CacheInfo",["hits","misses","maxsize","currsize"]].map((t=>T(t))),["module",new r("functools")]),Z=D("functools._lru_cache_wrapper",{constructor:function _lru_cache_wrapper(t,e,n,r){if(!k(t))throw new u("the first argument must be callable");let s;if($(e))s=infinite_lru_cache_wrapper,e=-1;else{if(!v(e))throw new u("maxsize should be integer or None");(e=N(e,g))<0&&(e=0),s=0===e?uncached_lru_cache_wrapper:bounded_lru_cache_wrapper}this.root={},this.root.prev=this.root.next=this.root,this.wrapper=s,this.maxsize=e,this.typed=n,this.cache=new i([]),this.func=t,this.misses=this.hits=0,this.$d=new i([])},slots:{tp$new(t,e){const[n,r,s,a]=G("_lru_cache_wrapper",["user_function","maxsize","typed","cache_info_type"],t,e);return new Z(n,r,s,a)},tp$call(t,e){return this.wrapper(t,e)},tp$descr_get(t,e){return null===t?this:new p(this,t)},tp$doc:"Create a cached callable that wraps another function.\\n\\nuser_function: the function being cached\\n\\nmaxsize: 0 for no caching\\n None for unlimited cache size\\n n for a bounded cache\\n\\ntyped: False cache f(3) and f(3.0) as identical calls\\n True cache f(3) and f(3.0) as distinct calls\\n\\ncache_info_type: namedtuple class with the fields:\\n hits misses currsize maxsize\\n"},methods:{cache_info:{$meth(){return A(Y,[this.hits,this.misses,-1===this.maxsize?o:this.maxsize,this.cache.get$size()].map((t=>T(t))))},$flags:{NoArgs:!0},$doc:"Report cache statistics"},cache_clear:{$meth(){return this.hits=this.misses=0,this.root={},this.root.next=this.root.prev=this.root,A(this.cache.tp$getattr(new r("clear"),!0))},$flags:{NoArgs:!0},$doc:"Clear the cache and cache statistics"},__deepcopy__:{$meth(t){return this},$flags:{OneArg:!0}},__copy__:{$meth(){return this},$flags:{NoArgs:!0}}},getsets:{__dict__:V}});function infinite_lru_cache_wrapper(t,e){const n=_make_key(t,e,this.typed),r=this.cache.mp$lookup(n);return void 0!==r?(this.hits++,r):(this.misses++,E(A(this.func,t,e),(t=>(this.cache.mp$ass_subscript(n,t),t))))}function uncached_lru_cache_wrapper(t,e){return this.misses++,A(this.func,t,e)}function bounded_lru_cache_wrapper(t,e){const n=_make_key(t,e,this.typed),r=this.cache.mp$lookup(n);if(void 0!==r){const{result:t}=r;return lru_cache_extract_link(r),lru_cache_append_link(this,r),this.hits++,t}return this.misses++,E(A(this.func,t,e),(t=>{if(void 0!==this.cache.mp$lookup(n))return t;if(this.cache.get$size()t.ob$type)),...i.map((t=>t.ob$type)));else if(1===s.length&&nt.has(s[0].ob$type))return s[0];return new tt(s)}function partial_adjust_args_kwargs(t,e){if(t=this.arg_arr.concat(t),e){e=W(e);const t=this.kwdict.dict$copy();t.dict$merge(e),e=O(t)}else e=O(this.kwdict);return{args:t,kwargs:e}}function partial_new(t,e){if(t.length<1)throw new u("type 'partial' takes at least 1 argument");let n,r,s=t.shift();if(s instanceof this.sk$builtinBase){const t=s;s=t.fn,n=t.arg_arr,r=t.kwdict}this.check$func(s),n&&(t=n.concat(t));let a=W(e=e||[]);if(r){const t=r.dict$copy();t.dict$merge(a),a=t}if(this.sk$builtinBase===this.constructor)return new this.constructor(s,t,a);{const e=new this.constructor;return this.sk$builtinBase.call(e,s,t,a),e}}function partial_repr(){if(this.in$repr)return new r("...");this.in$repr=!0;const t=[R(this.fn)];return this.arg_arr.forEach((e=>{t.push(R(e))})),this.kwdict.$items().forEach((([e,n])=>{t.push(e.toString()+"="+R(n))})),this.in$repr=!1,new r(this.tp$name+"("+t.join(", ")+")")}t.partial=D("functools.partial",{constructor:function partial(t,e,n){this.fn=t,this.arg_arr=e,this.arg_tup=new a(e),this.kwdict=n,this.in$repr=!1,this.$d=new i([])},slots:{tp$new:partial_new,tp$call(t,e){return({args:t,kwargs:e}=this.adj$args_kws(t,e)),this.fn.tp$call(t,e)},tp$doc:"partial(func, *args, **keywords) - new function with partial application\\n of the given arguments and keywords.\\n",$r:partial_repr,tp$getattr:J,tp$setattr:Q},getsets:{func:{$get(){return this.fn},$doc:"function object to use in future partial calls"},args:{$get(){return this.arg_tup},$doc:"tuple of arguments to future partial calls"},keywords:{$get(){return this.kwdict},$doc:"dictionary of keyword arguments to future partial calls"},__dict__:V},methods:{},classmethods:Sk.generic.classGetItem,proto:{adj$args_kws:partial_adjust_args_kwargs,check$func(t){if(!k(t))throw new u("the first argument must be callable")}}}),t.partialmethod=D("functools.partialmethod",{constructor:function partialmethod(t,e,n){this.fn=t,this.arg_arr=e,this.arg_tup=new a(e),this.kwdict=n},slots:{tp$new:partial_new,tp$doc:"Method descriptor with partial application of the given arguments\\n and keywords.\\n\\n Supports wrapping existing descriptors and handles non-descriptor\\n callables as instance methods.\\n ",$r:partial_repr,tp$descr_get(e,n){let r;if(this.fn.tp$descr_get){const s=this.fn.tp$descr_get(e,n);if(s!==this.fn){if(!k(s))throw new u("type 'partial' requires a callable");r=new t.partial(s,this.arg_arr.slice(0),this.kwdict.dict$copy());const e=F(s,this.str$self);void 0!==e&&r.tp$setattr(this.str$self,e)}}return void 0===r&&(r=this.make$unbound().tp$descr_get(e,n)),r}},methods:{_make_unbound_method:{$meth(){return this.make$unbound()},$flags:{NoArgs:!0}}},classmethods:Sk.generic.classGetItem,getsets:{func:{$get(){return this.fn},$doc:"function object to use in future partial calls"},args:{$get(){return this.arg_tup},$doc:"tuple of arguments to future partial calls"},keywords:{$get(){return this.kwdict},$doc:"dictionary of keyword arguments to future partial calls"},__dict__:V},proto:{str$self:new r("__self__"),make$unbound(){const t=this;function _method(e,n){const r=e.shift();return({args:e,kwargs:n}=t.adj$args_kws(e,n)),e.unshift(r),A(t.fn,e,n)}return _method.co_fastcall=!0,new h(_method)},adj$args_kws:partial_adjust_args_kwargs,check$func(t){if(!k(t)&&void 0===t.tp$descr_get)throw new u(R(t)+" is not callable or a descriptor")}}});const rt={__lt__:r.$lt,__le__:r.$le,__gt__:r.$gt,__ge__:r.$ge};function from_slot(t,e){const n=rt[t];function compare_slot(t,r){let s=x(t.tp$getattr(n),[r]);return s===_?s:(s=P(s),new l(e(s,t,r)))}return compare_slot.co_name=n,compare_slot}const st=from_slot("__lt__",((t,e,n)=>!t&&j(e,n,"NotEq"))),at=from_slot("__lt__",((t,e,n)=>t||j(e,n,"Eq"))),it=from_slot("__lt__",(t=>!t)),ot=from_slot("__le__",((t,e,n)=>!t||j(e,n,"Eq"))),ct=from_slot("__le__",((t,e,n)=>t&&j(e,n,"NotEq"))),_t=from_slot("__le__",(t=>!t)),lt=from_slot("__gt__",((t,e,n)=>!t&&j(e,n,"NotEq"))),ht=from_slot("__gt__",((t,e,n)=>t||j(e,n,"Eq"))),pt=from_slot("__gt__",(t=>!t)),ut=from_slot("__ge__",((t,e,n)=>!t||j(e,n,"Eq"))),dt=from_slot("__ge__",((t,e,n)=>t&&j(e,n,"NotEq"))),ft=from_slot("__ge__",(t=>!t)),mt={__lt__:{__gt__:new h(st),__le__:new h(at),__ge__:new h(it)},__le__:{__ge__:new h(ot),__lt__:new h(ct),__gt__:new h(_t)},__gt__:{__lt__:new h(lt),__ge__:new h(ht),__le__:new h(pt)},__ge__:{__le__:new h(ut),__gt__:new h(dt),__lt__:new h(ft)}},wt={__lt__:"ob$lt",__le__:"ob$le",__gt__:"ob$gt",__ge__:"ob$ge"};const gt=new r("get"),$t=new e;t.cached_property=D("functools.cached_property",{constructor:function(){},slots:{tp$init(t,e){I("cached_property",t,e),C("cached_property",e),this._func=t[0],this._attr=o},tp$descr_get(t,e,n){if(null==t)return this;if(this._attr===o)throw new u("Cannot use cached_property instance without calling __set_name__ on it.");let s;try{s=H(t,r.$dict)}catch(c){if(c instanceof w){const e=\`No '__dict__' attribute on '\${B(t)}' instance to cache \${R(this._attr)} property.\`;throw new u(e)}throw c}const a=H(s,gt);let i=x(a,[this._attr,$t]);if(i===$t){const e=A(this._func,[t]);i=q(e,(n=>{try{return K(s,this._attr,e),n}catch(c){if(c instanceof u){const e=\`The '__dict__' attribute on '\${B(t)}' instance does not support item assignment for caching \${R(this._attr)} property.\`;throw new u(e)}throw c}}))}return n?i:z(i)}},getsets:{__doc__:{$get(){return this._func.tp$getattr(r.$doc)||o}}},methods:{__set_name__:{$meth(t,e){if(this._attr===o)this._attr=e;else if(e.toString()!==this._attr.toString())throw new u(\`Cannot assign the same cached_property to two different names (\${R(this._attr)} and \${R(e)})\`)},$flags:{MinArgs:2,MaxArgs:2}}},classmethods:Sk.generic.classGetItem});const yt=new n(0),kt=D("functools.KeyWrapper",{constructor:function(t,e){this.cmp=t,this.obj=e},slots:{tp$call(t,e){const[n]=G("K",["obj"],t,e,[]);return new kt(this.cmp,n)},tp$richcompare(t,e){if(!(t instanceof kt))throw new u("other argument must be K instance");const n=this.obj,r=t.obj;if(!n||!r)throw new w("object");const s=A(this.cmp,[n,r]);return E(s,(t=>j(t,yt,e)))},tp$getattr:J,tp$hash:o},getsets:{obj:{$get(){return this.obj||o},$set(t){this.obj=t},$doc:"Value wrapped by a key function."}}}),bt=new r("update"),xt=new r("__wrapped__");return M("functools",t,{cache:{$meth:function cache(t){return A(_lru_cache(o),[t])},$flags:{OneArg:!0},$doc:'Simple lightweight unbounded cache. Sometimes called "memoize".',$textsig:"($module, user_function, /)"},lru_cache:{$meth:_lru_cache,$flags:{NamedArgs:["maxsize","typed"],Defaults:[new n(128),c]},$doc:"Least-recently-used cache decorator.\\n\\nIf *maxsize* is set to None, the LRU features are disabled and the cache\\ncan grow without bound.\\n\\nIf *typed* is True, arguments of different types will be cached separately.\\nFor example, f(3.0) and f(3) will be treated as distinct calls with\\ndistinct results.\\n\\nArguments to the cached function must be hashable.\\n\\nView the cache statistics named tuple (hits, misses, maxsize, currsize)\\nwith f.cache_info(). Clear the cache and statistics with f.cache_clear().\\nAccess the underlying function with f.__wrapped__.\\n\\nSee: http://en.wikipedia.org/wiki/Cache_replacement_policies#Least_recently_used_(LRU)"},cmp_to_key:{$meth:function cmp_to_key(t){return new kt(t)},$flags:{NamedArgs:["mycmp"],Defaults:[]},$doc:"Convert a cmp= function into a key= function.",$textsig:"($module, cmp, /)"},reduce:{$meth:function reduce(t,e,n){const r=L(e);let s;return n=n||r.tp$iternext(!0),E(n,(e=>{if(void 0===e)throw new u("reduce() of empty sequence with no initial value");return s=e,S(r,(e=>E(A(t,[s,e]),(t=>{s=t}))))}),(()=>s))},$flags:{MinArgs:2,MaxArgs:3},$doc:"reduce(function, sequence[, initial]) -> value\\n\\nApply a function of two arguments cumulatively to the items of a sequence,\\nfrom left to right, so as to reduce the sequence to a single value.\\nFor example, reduce(lambda x, y: x+y, [1, 2, 3, 4, 5]) calculates\\n((((1+2)+3)+4)+5). If initial is present, it is placed before the items\\nof the sequence in the calculation, and serves as a default when the\\nsequence is empty.",$textsig:"($module, function, sequence[, initial], /)"},total_ordering:{$meth:function total_ordering(t){const n=[];if(!b(t))throw new u("total ordering only supported for type objects not '"+B(t)+"'");if(Object.keys(mt).forEach((r=>{const s=wt[r];t.prototype[s]!==e.prototype[s]&&n.push(r)})),!n.length)throw new f("must define atleast one ordering operation: <, >, <=, >=");const r=n[0];return Object.entries(mt[r]).forEach((([e,r])=>{n.includes(e)||t.tp$setattr(rt[e],r)})),t},$flags:{OneArg:!0},$doc:"Class decorator that fills in missing ordering methods"},update_wrapper:{$meth:function update_wrapper(t,e,n,r){let s,a=L(n);for(let i=a.tp$iternext();void 0!==i;i=a.tp$iternext())void 0!==(s=e.tp$getattr(i))&&t.tp$setattr(i,s);a=L(r);for(let o=a.tp$iternext();void 0!==o;o=a.tp$iternext()){s=e.tp$getattr(o)||new i([]);const n=H(t,o),r=H(n,bt);x(r,[s])}return t.tp$setattr(xt,e),t},$flags:{NamedArgs:["wrapper","wrapped","assigned","updated"],Defaults:[t.WRAPPER_ASSIGNMENTS,t.WRAPPER_UPDATES]},$doc:"Update a wrapper function to look like the wrapped function\\n\\n wrapper is the function to be updated\\n wrapped is the original function\\n assigned is a tuple naming the attributes assigned directly\\n from the wrapped function to the wrapper function (defaults to\\n functools.WRAPPER_ASSIGNMENTS)\\n updated is a tuple naming the attributes of the wrapper that\\n are updated with the corresponding attribute from the wrapped\\n function (defaults to functools.WRAPPER_UPDATES)\\n ",$textsig:"($module, /, wrapper, wrapped, assigned=('__module__', '__name__', '__qualname__', '__doc__', '__annotations__'), updated=('__dict__',))"},wraps:{$meth:function wraps(e,n,r){const s=["wrapped",e,"assigned",n,"updated",r];return A(t.partial,[t.update_wrapper],s)},$flags:{NamedArgs:["wrapped","assigned","updated"],Defaults:[t.WRAPPER_ASSIGNMENTS,t.WRAPPER_UPDATES]},$doc:"Decorator factory to apply update_wrapper() to a wrapper function\\n\\n Returns a decorator that invokes update_wrapper() with the decorated\\n function as the wrapper argument and the arguments to wraps() as the\\n remaining arguments. Default arguments are as for update_wrapper().\\n This is a convenience function to simplify applying partial() to\\n update_wrapper().\\n ",$textsig:"($module, /, wrapped, assigned=('__module__', '__name__', '__qualname__', '__doc__', '__annotations__'), updated=('__dict__',))"}}),t}`,"src/lib/image.js":'var ImageMod,$builtinmodule;ImageMod||((ImageMod={}).canvasLib=[]),$builtinmodule=function(e){var n,t,i,a,u,l,r,s={__name__:new Sk.builtin.str("image")};return s.Image=Sk.misceval.buildClass(s,(function(e,n){u=function(e){e.width=e.image.width,e.height=e.image.height,e.delay=0,e.updateCount=0,e.updateInterval=1,e.lastx=0,e.lasty=0,e.canvas=document.createElement("canvas"),e.canvas.height=e.height,e.canvas.width=e.width,e.ctx=e.canvas.getContext("2d"),e.ctx.drawImage(e.image,0,0),e.imagedata=e.ctx.getImageData(0,0,e.width,e.height)},n.__init__=new Sk.builtin.func((function(e,n){var t;Sk.builtin.pyCheckArgsLen("__init__",arguments.length,2,2);try{e.image=document.getElementById(Sk.ffi.remapToJs(n)),u(e)}catch(i){e.image=null}if(null==e.image)return(t=new Sk.misceval.Suspension).resume=function(){if(t.data.error)throw new Sk.builtin.IOError(t.data.error.message)},t.data={type:"Sk.promise",promise:new Promise((function(t,i){var a=new Image;a.crossOrigin="",a.onerror=function(){i(Error("Failed to load URL: "+a.src))},a.onload=function(){e.image=this,u(e),t()},a.src=r(n)}))},t})),r=function(e){var n,t,i="function"==typeof Sk.imageProxy?Sk.imageProxy:function(e){return(n=document.createElement("a")).href=t,window.location.host!==n.host?Sk.imageProxy+"/"+e:e};return t=i(t=Sk.ffi.remapToJs(e))},l=function(e,n,t){if(n<0||t<0||n>=e.width||t>=e.height)throw new Sk.builtin.ValueError("Pixel index out of range.")};var setdelay=function(e,n,t){var i;Sk.builtin.pyCheckArgsLen("setdelay",arguments.length,2,3),e.delay=Sk.ffi.remapToJs(n),i=Sk.builtin.asnum$(t),e.updateInterval=i||1};n.set_delay=new Sk.builtin.func(setdelay),n.setDelay=new Sk.builtin.func(setdelay);var getpixels=function(e){var n,t=[];for(Sk.builtin.pyCheckArgsLen("getpixels",arguments.length,1,1),n=0;n=e.width?e.lastCtx.putImageData(e.imagedata,e.lastUlx,e.lastUly,0,e.lasty,e.width,2):e.lasty+e.updateInterval>=e.height?e.lastCtx.putImageData(e.imagedata,e.lastUlx,e.lastUly,e.lastx,0,2,e.height):e.lastCtx.putImageData(e.imagedata,e.lastUlx,e.lastUly,Math.min(n,e.lastx),Math.min(t,e.lasty),Math.max(Math.abs(n-e.lastx),1),Math.max(Math.abs(t-e.lasty),1)),e.lastx=n,e.lasty=t,e.delay>0?window.setTimeout(i,e.delay):i()):i()}))},i};var setpixel=function(e,n,t,i){var u;return Sk.builtin.pyCheckArgsLen("setpixel",arguments.length,4,4),n=Sk.builtin.asnum$(n),t=Sk.builtin.asnum$(t),l(e,n,t),u=4*t*e.width+4*n,e.imagedata.data[u]=Sk.builtin.asnum$(Sk.misceval.callsimArray(i.getRed,[i])),e.imagedata.data[u+1]=Sk.builtin.asnum$(Sk.misceval.callsimArray(i.getGreen,[i])),e.imagedata.data[u+2]=Sk.builtin.asnum$(Sk.misceval.callsimArray(i.getBlue,[i])),e.imagedata.data[u+3]=255,a(e,n,t)};n.set_pixel=new Sk.builtin.func(setpixel),n.setPixel=new Sk.builtin.func(setpixel);var setpixelat=function(e,n,t){var i,u,r;return Sk.builtin.pyCheckArgsLen("setpixelat",arguments.length,3,3),i=(n=Sk.builtin.asnum$(n))%e.image.width,u=Math.floor(n/e.image.width),l(e,i,u),r=4*u*e.width+4*i,e.imagedata.data[r]=Sk.builtin.asnum$(Sk.misceval.callsimArray(t.getRed,[t])),e.imagedata.data[r+1]=Sk.builtin.asnum$(Sk.misceval.callsimArray(t.getGreen,[t])),e.imagedata.data[r+2]=Sk.builtin.asnum$(Sk.misceval.callsimArray(t.getBlue,[t])),e.imagedata.data[r+3]=255,a(e,i,u)};n.set_pixel_at=new Sk.builtin.func(setpixelat),n.setPixelAt=new Sk.builtin.func(setpixelat);var updatepixel=function(e,n){var t,i,u;return Sk.builtin.pyCheckArgsLen("updatepixel",arguments.length,2,2),t=Sk.builtin.asnum$(Sk.misceval.callsimArray(n.getX,[n])),i=Sk.builtin.asnum$(Sk.misceval.callsimArray(n.getY,[n])),l(e,t,i),u=4*i*e.width+4*t,e.imagedata.data[u]=Sk.builtin.asnum$(Sk.misceval.callsimArray(n.getRed,[n])),e.imagedata.data[u+1]=Sk.builtin.asnum$(Sk.misceval.callsimArray(n.getGreen,[n])),e.imagedata.data[u+2]=Sk.builtin.asnum$(Sk.misceval.callsimArray(n.getBlue,[n])),e.imagedata.data[u+3]=255,a(e,t,i)};n.update_pixel=new Sk.builtin.func(updatepixel),n.updatePixel=new Sk.builtin.func(updatepixel);var getheight=function(e){return Sk.builtin.pyCheckArgsLen("getheight",arguments.length,1,1),new Sk.builtin.int_(e.height)};n.get_height=new Sk.builtin.func(getheight),n.getHeight=new Sk.builtin.func(getheight);var getwidth=function(e,n){return Sk.builtin.pyCheckArgsLen("getwidth",arguments.length,1,1),new Sk.builtin.int_(e.width)};n.get_width=new Sk.builtin.func(getwidth),n.getWidth=new Sk.builtin.func(getwidth),n.__getattr__=new Sk.builtin.func((function(e,n){return"height"===(n=Sk.ffi.remapToJs(n))?Sk.builtin.assk$(e.height):"width"===n?Sk.builtin.assk$(e.width):void 0})),n.__setattr__=new Sk.builtin.func((function(e,n,t){throw"height"===(n=Sk.ffi.remapToJs(n))||"width"===n?new Sk.builtin.Exception("Cannot change height or width they can only be set on creation"):new Sk.builtin.Exception("Unknown attribute: "+n)})),n.draw=new Sk.builtin.func((function(e,n,t,i){var a;return Sk.builtin.pyCheckArgsLen("draw",arguments.length,2,4),(a=new Sk.misceval.Suspension).resume=function(){return Sk.builtin.none.none$},a.data={type:"Sk.promise",promise:new Promise((function(a,u){var l;n=Sk.builtin.asnum$(n),t=Sk.builtin.asnum$(t),i=Sk.builtin.asnum$(i),l=Sk.misceval.callsimArray(n.getWin,[n]).getContext("2d"),void 0===t&&(t=0,i=0),e.lastUlx=t,e.lastUly=i,e.lastCtx=l,l.putImageData(e.imagedata,t,i),e.delay>0?window.setTimeout(a,e.delay):window.setTimeout(a,200)}))},a}))}),"Image",[]),i=function(e,n){n.__init__=new Sk.builtin.func((function(e,n,t){Sk.builtin.pyCheckArgsLen("__init__",arguments.length,3,3),e.width=Sk.builtin.asnum$(n),e.height=Sk.builtin.asnum$(t),e.canvas=document.createElement("canvas"),e.ctx=e.canvas.getContext("2d"),e.canvas.height=e.height,e.canvas.width=e.width,e.imagedata=e.ctx.getImageData(0,0,e.width,e.height)}))},s.EmptyImage=Sk.misceval.buildClass(s,i,"EmptyImage",[s.Image]),t=function(e,n){n.__init__=new Sk.builtin.func((function(e,n,t,i,a,u){Sk.builtin.pyCheckArgsLen("__init__",arguments.length,4,6),e.red=Sk.builtin.asnum$(n),e.green=Sk.builtin.asnum$(t),e.blue=Sk.builtin.asnum$(i),e.x=Sk.builtin.asnum$(a),e.y=Sk.builtin.asnum$(u)}));var getred=function(e){return Sk.builtin.pyCheckArgsLen("getred",arguments.length,1,1),Sk.builtin.assk$(e.red)};n.get_red=new Sk.builtin.func(getred),n.getRed=new Sk.builtin.func(getred);var getgreen=function(e){return Sk.builtin.pyCheckArgsLen("getgreen",arguments.length,1,1),Sk.builtin.assk$(e.green)};n.get_green=new Sk.builtin.func(getgreen),n.getGreen=new Sk.builtin.func(getgreen);var getblue=function(e){return Sk.builtin.pyCheckArgsLen("getblue",arguments.length,1,1),Sk.builtin.assk$(e.blue)};n.get_blue=new Sk.builtin.func(getblue),n.getBlue=new Sk.builtin.func(getblue);var getx=function(e){return Sk.builtin.pyCheckArgsLen("getx",arguments.length,1,1),Sk.builtin.assk$(e.x)};n.get_x=new Sk.builtin.func(getx),n.getX=new Sk.builtin.func(getx);var gety=function(e){return Sk.builtin.pyCheckArgsLen("gety",arguments.length,1,1),Sk.builtin.assk$(e.y)};n.get_y=new Sk.builtin.func(gety),n.getY=new Sk.builtin.func(gety);var setred=function(e,n){Sk.builtin.pyCheckArgsLen("setred",arguments.length,2,2),e.red=Sk.builtin.asnum$(n)};n.set_red=new Sk.builtin.func(setred),n.setRed=new Sk.builtin.func(setred);var setgreen=function(e,n){Sk.builtin.pyCheckArgsLen("setgreen",arguments.length,2,2),e.green=Sk.builtin.asnum$(n)};n.set_green=new Sk.builtin.func(setgreen),n.setGreen=new Sk.builtin.func(setgreen);var setblue=function(e,n){Sk.builtin.pyCheckArgsLen("setblue",arguments.length,2,2),e.blue=Sk.builtin.asnum$(n)};n.set_blue=new Sk.builtin.func(setblue),n.setBlue=new Sk.builtin.func(setblue),n.__getattr__=new Sk.builtin.func((function(e,n){return"red"===(n=Sk.ffi.remapToJs(n))?Sk.builtin.assk$(e.red):"green"===n?Sk.builtin.assk$(e.green):"blue"===n?Sk.builtin.assk$(e.blue):void 0})),n.__setattr__=new Sk.builtin.func((function(e,n,t){"red"!==(n=Sk.ffi.remapToJs(n))&&"green"!==n&&"blue"!==n||(e[n]=Sk.builtin.asnum$(t))}));var setx=function(e,n){Sk.builtin.pyCheckArgsLen("setx",arguments.length,2,2),e.x=Sk.builtin.asnum$(n)};n.set_x=new Sk.builtin.func(setx),n.setX=new Sk.builtin.func(setx);var sety=function(e,n){Sk.builtin.pyCheckArgsLen("sety",arguments.length,2,2),e.y=Sk.builtin.asnum$(n)};n.set_y=new Sk.builtin.func(sety),n.setY=new Sk.builtin.func(sety),n.__getitem__=new Sk.builtin.func((function(e,n){return 0===(n=Sk.builtin.asnum$(n))?e.red:1==n?e.green:2==n?e.blue:void 0})),n.__str__=new Sk.builtin.func((function(e){return Sk.ffi.remapToPy("["+e.red+","+e.green+","+e.blue+"]")})),n.getColorTuple=new Sk.builtin.func((function(e,n,t){})),n.setRange=new Sk.builtin.func((function(e,n){e.max=Sk.builtin.asnum$(n)}))},s.Pixel=Sk.misceval.buildClass(s,t,"Pixel",[]),n=function(e,n){n.__init__=new Sk.builtin.func((function(e,n,t){var i,a,u;Sk.builtin.pyCheckArgsLen("__init__",arguments.length,1,3),void 0===(i=ImageMod.canvasLib[Sk.canvas])?(a=document.createElement("canvas"),u=document.getElementById(Sk.canvas),e.theScreen=a,u.appendChild(a),ImageMod.canvasLib[Sk.canvas]=a,ImageMod.canvasLib[Sk.canvas]=e.theScreen):(e.theScreen=i,e.theScreen.height=e.theScreen.height),void 0!==n?(e.theScreen.height=t.v,e.theScreen.width=n.v):(Sk.availableHeight&&(e.theScreen.height=Sk.availableHeight),Sk.availableWidth&&(e.theScreen.width=Sk.availableWidth)),e.theScreen.style.display="block"})),n.getWin=new Sk.builtin.func((function(e){return e.theScreen})),n.exitonclick=new Sk.builtin.func((function(e){var n=e.theScreen.id;e.theScreen.onclick=function(){document.getElementById(n).style.display="none",document.getElementById(n).onclick=null,delete ImageMod.canvasLib[n]}}))},s.ImageWin=Sk.misceval.buildClass(s,n,"ImageWin",[]),s};',"src/lib/itertools.js":`var $builtinmodule=function(t){var e={};function combinationsNew(t,e,i){let r,s;[r,s]=Sk.abstr.copyKeywordsToNamedArgs(t.tp$name,["iterable","r"],e,i,[]);const n=Sk.misceval.arrayFromIterable(r);if(s=Sk.misceval.asIndexSized(s,Sk.builtin.OverFlowError),s<0)throw new Sk.builtin.ValueError("r must be non-negative");if(this===t)return new t.constructor(n,s);{const e=new this.constructor;return t.constructor.call(e,n,s),e}}return e.accumulate=Sk.abstr.buildIteratorClass("itertools.accumulate",{constructor:function accumulate(t,e,i){this.iter=t,this.func=e,this.total=i,this.tp$iternext=()=>(this.total=Sk.builtin.checkNone(this.total)?this.iter.tp$iternext():this.total,this.tp$iternext=this.constructor.prototype.tp$iternext,this.total)},iternext(t){let e=this.iter.tp$iternext();if(void 0!==e)return this.total=Sk.misceval.callsimArray(this.func,[this.total,e]),this.total},slots:{tp$doc:"accumulate(iterable[, func, initial]) --\\x3e accumulate object\\n\\nReturn series of accumulated sums (or other binary function results).",tp$new(t,i){Sk.abstr.checkArgsLen("accumulate",t,0,2);let[r,s,n]=Sk.abstr.copyKeywordsToNamedArgs("accumulate",["iterable","func","initial"],t,i,[Sk.builtin.none.none$,Sk.builtin.none.none$]);if(r=Sk.abstr.iter(r),s=Sk.builtin.checkNone(s)?new Sk.builtin.func(((t,e)=>Sk.abstr.numberBinOp(t,e,"Add"))):s,this===e.accumulate.prototype)return new e.accumulate(r,s,n);{const t=new this.constructor;return e.accumulate.call(t,r,s,n),t}}}}),e.chain=Sk.abstr.buildIteratorClass("itertools.chain",{constructor:function chain(t){this.iterables=t,this.current_it=null,this.tp$iternext=()=>{if(this.tp$iternext=this.constructor.prototype.tp$iternext,this.current_it=this.iterables.tp$iternext(),void 0!==this.current_it)return this.current_it=Sk.abstr.iter(this.current_it),this.tp$iternext();this.tp$iternext=()=>{}}},iternext(t){let e;for(;void 0===e;){if(e=this.current_it.tp$iternext(),void 0!==e)return e;if(this.current_it=this.iterables.tp$iternext(),void 0===this.current_it)return void(this.tp$iternext=()=>{});this.current_it=Sk.abstr.iter(this.current_it)}},slots:{tp$doc:"chain(*iterables) --\\x3e chain object\\n\\nReturn a chain object whose .__next__() method returns elements from the\\nfirst iterable until it is exhausted, then elements from the next\\niterable, until all of the iterables are exhausted.",tp$new(t,i){if(Sk.abstr.checkNoKwargs("chain",i),t=new Sk.builtin.tuple(t.slice(0)).tp$iter(),this===e.chain.prototype)return new e.chain(t);{const i=new this.constructor;return e.chain.call(i,t),i}}},classmethods:Object.assign({from_iterable:{$meth(t){const i=Sk.abstr.iter(t);return new e.chain(i)},$flags:{OneArg:!0},$doc:"chain.from_iterable(iterable) --\\x3e chain object\\n\\nAlternate chain() constructor taking a single iterable argument\\nthat evaluates lazily.",$textsig:null}},Sk.generic.classGetItem)}),e.combinations=Sk.abstr.buildIteratorClass("itertools.combinations",{constructor:function combinations(t,e){this.pool=t,this.r=e,this.indices=new Array(e).fill().map(((t,e)=>e)),this.n=t.length,this.tp$iternext=()=>{if(!(this.r>this.n))return this.tp$iternext=this.constructor.prototype.tp$iternext,new Sk.builtin.tuple(this.pool.slice(0,this.r))}},iternext(t){let e,i=!1;for(e=this.r-1;e>=0;e--)if(this.indices[e]!=e+this.n-this.r){i=!0;break}if(!i)return void(this.r=0);this.indices[e]++;for(let s=e+1;sthis.pool[t]));return new Sk.builtin.tuple(r)},slots:{tp$doc:"combinations(iterable, r) --\\x3e combinations object\\n\\nReturn successive r-length combinations of elements in the iterable.\\n\\ncombinations(range(4), 3) --\\x3e (0,1,2), (0,1,3), (0,2,3), (1,2,3)",tp$new(t,i){return combinationsNew.call(this,e.combinations.prototype,t,i)}}}),e.combinations_with_replacement=Sk.abstr.buildIteratorClass("itertools.combinations_with_replacement",{constructor:function combinations_with_replacement(t,e){this.pool=t,this.r=e,this.indices=new Array(e).fill(0),this.n=t.length,this.tp$iternext=()=>{if(this.r&&!this.n)return;this.tp$iternext=this.constructor.prototype.tp$iternext;const t=this.indices.map((t=>this.pool[t]));return new Sk.builtin.tuple(t)}},iternext(t){let e,i=!1;for(e=this.r-1;e>=0;e--)if(this.indices[e]!=this.n-1){i=!0;break}if(!i)return void(this.r=0);const r=this.indices[e]+1;for(let n=e;nthis.pool[t]));return new Sk.builtin.tuple(s)},slots:{tp$doc:"combinations_with_replacement(iterable, r) --\\x3e combinations_with_replacement object\\n\\nReturn successive r-length combinations of elements in the iterable\\nallowing individual elements to have successive repeats.\\ncombinations_with_replacement('ABC', 2) --\\x3e AA AB AC BB BC CC",tp$new(t,i){return combinationsNew.call(this,e.combinations_with_replacement.prototype,t,i)}}}),e.compress=Sk.abstr.buildIteratorClass("itertools.compress",{constructor:function compress(t,e){this.data=t,this.selectors=e},iternext(){let t=this.data.tp$iternext(),e=this.selectors.tp$iternext();for(;void 0!==t&&void 0!==e;){if(Sk.misceval.isTrue(e))return t;t=this.data.tp$iternext(),e=this.selectors.tp$iternext()}},slots:{tp$doc:"compress(data, selectors) --\\x3e iterator over selected data\\n\\nReturn data elements corresponding to true selector elements.\\nForms a shorter iterator from selected data elements using the\\nselectors to choose the data elements.",tp$new(t,i){let r,s;if([r,s]=Sk.abstr.copyKeywordsToNamedArgs("compress",["data","selectors"],t,i,[]),r=Sk.abstr.iter(r),s=Sk.abstr.iter(s),this===e.count.prototype)return new e.compress(r,s);{const t=new this.constructor;return e.compress.call(t,r,s),t}}}}),e.count=Sk.abstr.buildIteratorClass("itertools.count",{constructor:function count(t,e){this.start=t,this.step=e},iternext(){const t=this.start;return this.start=Sk.abstr.numberBinOp(this.start,this.step,"Add"),t},slots:{tp$doc:"count(start=0, step=1) --\\x3e count object\\n\\nReturn a count object whose .__next__() method returns consecutive values.\\nEquivalent to:\\n\\n def count(firstval=0, step=1):\\n x = firstval\\n while 1:\\n yield x\\n x += step\\n",tp$new(t,i){const[r,s]=Sk.abstr.copyKeywordsToNamedArgs("count",["start","step"],t,i,[new Sk.builtin.int_(0),new Sk.builtin.int_(1)]);if(!Sk.builtin.checkNumber(r)&&!Sk.builtin.checkComplex(r))throw new Sk.builtin.TypeError("a number is required");if(!Sk.builtin.checkNumber(s)&&!Sk.builtin.checkComplex(s))throw new Sk.builtin.TypeError("a number is required");if(this===e.count.prototype)return new e.count(r,s);{const t=new this.constructor;return e.count.call(t,r,s),t}},$r(){const t=Sk.misceval.objectRepr(this.start);let e=Sk.misceval.objectRepr(this.step);return e="1"===e?"":", "+e,new Sk.builtin.str(Sk.abstr.typeName(this)+"("+t+e+")")}}}),e.cycle=Sk.abstr.buildIteratorClass("itertools.cycle",{constructor:function cycle(t){this.iter=t,this.saved=[],this.consumed=!1,this.i=0,this.length},iternext(){let t;if(!this.consumed){if(t=this.iter.tp$iternext(),void 0!==t)return this.saved.push(t),t;if(this.consumed=!0,this.length=this.saved.length,!this.length)return}return t=this.saved[this.i],this.i=(this.i+1)%this.length,t},slots:{tp$doc:"cycle(iterable) --\\x3e cycle object\\n\\nReturn elements from the iterable until it is exhausted.\\nThen repeat the sequence indefinitely.",tp$new(t,i){Sk.abstr.checkOneArg("cycle",t,i);const r=Sk.abstr.iter(t[0]);if(this===e.cycle.prototype)return new e.cycle(r);{const t=new this.constructor;return e.cycle.call(t,r),t}}}}),e.dropwhile=Sk.abstr.buildIteratorClass("itertools.dropwhile",{constructor:function dropwhile(t,e){this.predicate=t,this.iter=e,this.passed},iternext(){let t=this.iter.tp$iternext();for(;void 0===this.passed&&void 0!==t;){const e=Sk.misceval.callsimArray(this.predicate,[t]);if(!Sk.misceval.isTrue(e))return this.passed=!0,t;t=this.iter.tp$iternext()}return t},slots:{tp$doc:"dropwhile(predicate, iterable) --\\x3e dropwhile object\\n\\nDrop items from the iterable while predicate(item) is true.\\nAfterwards, return every element until the iterable is exhausted.",tp$new(t,i){Sk.abstr.checkNoKwargs("dropwhile",i),Sk.abstr.checkArgsLen("dropwhile",t,2,2);const r=t[0],s=Sk.abstr.iter(t[1]);if(this===e.dropwhile.prototype)return new e.dropwhile(r,s);{const t=new this.constructor;return e.dropwhile.call(t,r,s),t}}}}),e.filterfalse=Sk.abstr.buildIteratorClass("itertools.filterfalse",{constructor:function filterfalse(t,e){this.predicate=t,this.iter=e},iternext(t){let e=this.iter.tp$iternext();if(void 0===e)return;let i=Sk.misceval.callsimArray(this.predicate,[e]);for(;Sk.misceval.isTrue(i);){if(e=this.iter.tp$iternext(),void 0===e)return;i=Sk.misceval.callsimArray(this.predicate,[e])}return e},slots:{tp$doc:"filterfalse(function or None, sequence) --\\x3e filterfalse object\\n\\nReturn those items of sequence for which function(item) is false.\\nIf function is None, return the items that are false.",tp$new(t,i){Sk.abstr.checkNoKwargs("filterfalse",i),Sk.abstr.checkArgsLen("filterfalse",t,2,2);const r=Sk.builtin.checkNone(t[0])?Sk.builtin.bool:t[0],s=Sk.abstr.iter(t[1]);if(this===e.filterfalse.prototype)return new e.filterfalse(r,s);{const t=new this.constructor;return e.filterfalse.call(t,r,s),t}}}}),e._grouper=Sk.abstr.buildIteratorClass("itertools._grouper",{constructor:function _grouper(t,e){this.groupby=t,this.tgtkey=t.tgtkey,this.id=t.id},iternext(t){const e=Sk.misceval.richCompareBool(this.groupby.currkey,this.tgtkey,"Eq");if(this.groupby.id===this.id&&e){let t=this.groupby.currval;return this.groupby.currval=this.groupby.iter.tp$iternext(),void 0!==this.groupby.currval&&(this.groupby.currkey=Sk.misceval.callsimArray(this.groupby.keyf,[this.groupby.currval])),t}}}),e.groupby=Sk.abstr.buildIteratorClass("itertools.groupby",{constructor:function groupby(t,e){this.iter=t,this.keyf=e,this.currval,this.currkey=this.tgtkey=new Sk.builtin.object,this.id},iternext(t){this.id=new Object;let i=Sk.misceval.richCompareBool(this.currkey,this.tgtkey,"Eq");for(;i;){if(this.currval=this.iter.tp$iternext(),void 0===this.currval)return;this.currkey=Sk.misceval.callsimArray(this.keyf,[this.currval]),i=Sk.misceval.richCompareBool(this.currkey,this.tgtkey,"Eq")}this.tgtkey=this.currkey;const r=new e._grouper(this);return new Sk.builtin.tuple([this.currkey,r])},slots:{tp$doc:"groupby(iterable, key=None) -> make an iterator that returns consecutive\\nkeys and groups from the iterable. If the key function is not specified or\\nis None, the element itself is used for grouping.\\n",tp$new(t,i){let r,s;if([r,s]=Sk.abstr.copyKeywordsToNamedArgs("groupby",["iterable","key"],t,i,[Sk.builtin.none.none$]),r=Sk.abstr.iter(r),s=Sk.builtin.checkNone(s)?new Sk.builtin.func((t=>t)):s,this===e.groupby.prototype)return new e.groupby(r,s);{const t=new this.constructor;return e.groupby.call(t,r,s),t}}}}),e.islice=Sk.abstr.buildIteratorClass("itertools.islice",{constructor:function islice(t,e,i,r){this.iter=t,this.previt=e,this.stop=i,this.step=r,this.tp$iternext=()=>{if(this.tp$iternext=this.constructor.prototype.tp$iternext,!(this.previt>=this.stop)){for(let t=0;t=this.stop)){for(let t=this.previt+1;tNumber.MAX_SAFE_INTEGER)throw new Sk.builtin.ValueError("Stop for islice() must be None or an integer: 0 <= x <= sys.maxsize.");if(!Sk.builtin.checkNone(s)&&!Sk.misceval.isIndex(s))throw new Sk.builtin.ValueError("Indices for islice() must be None or an integer: 0 <= x <= sys.maxsize.");if(s=Sk.builtin.checkNone(s)?0:Sk.misceval.asIndexSized(s),s<0||s>Number.MAX_SAFE_INTEGER)throw new Sk.builtin.ValueError("Indices for islice() must be None or an integer: 0 <= x <= sys.maxsize.");if(!Sk.builtin.checkNone(o)&&!Sk.misceval.isIndex(o))throw new Sk.builtin.ValueError("Step for islice() must be a positive integer or None");if(o=Sk.builtin.checkNone(o)?1:Sk.misceval.asIndexSized(o),o<=0||o>Number.MAX_SAFE_INTEGER)throw new Sk.builtin.ValueError("Step for islice() must be a positive integer or None.");if(this===e.islice.prototype)return new e.islice(r,s,n,o);{const t=new this.constructor;return e.islice.call(t,r,s,n,o),t}}}}),e.permutations=Sk.abstr.buildIteratorClass("itertools.permutations",{constructor:function permutations(t,e){this.pool=t,this.r=e;const i=t.length;this.indices=new Array(i).fill().map(((t,e)=>e)),this.cycles=new Array(e).fill().map(((t,e)=>i-e)),this.n=i,this.tp$iternext=()=>{if(!(this.r>this.n))return this.tp$iternext=this.constructor.prototype.tp$iternext,new Sk.builtin.tuple(this.pool.slice(0,this.r))}},iternext(t){for(let e=this.r-1;e>=0;e--){if(this.cycles[e]--,0!=this.cycles[e]){const t=this.cycles[e];[this.indices[e],this.indices[this.n-t]]=[this.indices[this.n-t],this.indices[e]];const i=this.indices.map((t=>this.pool[t])).slice(0,this.r);return new Sk.builtin.tuple(i)}this.indices.push(this.indices.splice(e,1)[0]),this.cycles[e]=this.n-e}this.r=0},slots:{tp$doc:"permutations(iterable[, r]) --\\x3e permutations object\\n\\nReturn successive r-length permutations of elements in the iterable.\\n\\npermutations(range(3), 2) --\\x3e (0,1), (0,2), (1,0), (1,2), (2,0), (2,1)",tp$new(t,i){let r,s;[r,s]=Sk.abstr.copyKeywordsToNamedArgs("permutations",["iterable","r"],t,i,[Sk.builtin.none.none$]);const n=Sk.misceval.arrayFromIterable(r);if(s=Sk.builtin.checkNone(s)?n.length:Sk.misceval.asIndexSized(s,Sk.builtin.OverFlowError),s<0)throw new Sk.builtin.ValueError("r must be non-negative");if(this===e.permutations.prototype)return new e.permutations(n,s);{const t=new this.constructor;return e.permutations.call(t,n,s),t}}}}),e.product=Sk.abstr.buildIteratorClass("itertools.product",{constructor:function product(t){this.pools=t,this.n=t.length,this.indices=Array(t.length).fill(0),this.pool_sizes=t.map((t=>t.length)),this.tp$iternext=()=>{this.tp$iternext=this.constructor.prototype.tp$iternext;const t=this.indices.map(((t,e)=>this.pools[e][this.indices[e]]));if(!t.some((t=>void 0===t)))return new Sk.builtin.tuple(t);this.n=0}},iternext(t){let e=this.n-1;for(;e>=0&&e=this.pool_sizes[e]?(this.indices[e]=-1,e--):e++;if(this.n&&!this.indices.every((t=>-1===t))){const t=this.indices.map(((t,e)=>this.pools[e][this.indices[e]]));return new Sk.builtin.tuple(t)}this.n=0},slots:{tp$doc:"product(*iterables, repeat=1) --\\x3e product object\\n\\nCartesian product of input iterables. Equivalent to nested for-loops.\\n\\nFor example, product(A, B) returns the same as: ((x,y) for x in A for y in B).\\nThe leftmost iterators are in the outermost for-loop, so the output tuples\\ncycle in a manner similar to an odometer (with the rightmost element changing\\non every iteration).\\n\\nTo compute the product of an iterable with itself, specify the number\\nof repetitions with the optional repeat keyword argument. For example,\\nproduct(A, repeat=4) means the same as product(A, A, A, A).\\n\\nproduct('ab', range(3)) --\\x3e ('a',0) ('a',1) ('a',2) ('b',0) ('b',1) ('b',2)\\nproduct((0,1), (0,1), (0,1)) --\\x3e (0,0,0) (0,0,1) (0,1,0) (0,1,1) (1,0,0) ...",tp$new(t,i){let[r]=Sk.abstr.copyKeywordsToNamedArgs("product",["repeat"],[],i,[new Sk.builtin.int_(1)]);if(r=Sk.misceval.asIndexSized(r,Sk.builtin.OverFlowError),r<0)throw new Sk.builtin.ValueError("repeat argument cannot be negative");const s=[];for(let e=0;ethis.object)},iternext(t){return this.times-- >0?this.object:void 0},slots:{tp$doc:"repeat(object [,times]) -> create an iterator which returns the object\\nfor the specified number of times. If not specified, returns the object\\nendlessly.",tp$new(t,i){let r,s;if([r,s]=Sk.abstr.copyKeywordsToNamedArgs("repeat",["object","times"],t,i,[null]),s=null!==s?Sk.misceval.asIndexSized(s,Sk.builtin.OverFlowError):void 0,this===e.repeat.prototype)return new e.repeat(r,s);{const t=new this.constructor;return e.repeat.call(t,r,s),t}},$r(){const t=Sk.misceval.objectRepr(this.object),e=void 0===this.times?"":", "+(this.times>=0?this.times:0);return new Sk.builtin.str(Sk.abstr.typeName(this)+"("+t+e+")")}},methods:{__lenght_hint__:{$meth(){if(void 0===this.times)throw new Sk.builtin.TypeError("len() of unsized object");return new Sk.builtin.int_(this.times)},$flags:{NoArgs:!0},$textsig:null}}}),e.starmap=Sk.abstr.buildIteratorClass("itertools.starmap",{constructor:function starmap(t,e){this.func=t,this.iter=e},iternext(t){const e=this.iter.tp$iternext();if(void 0===e)return;const i=Sk.misceval.arrayFromIterable(e);return Sk.misceval.callsimArray(this.func,i)},slots:{tp$new(t,i){let r,s;if([r,s]=Sk.abstr.copyKeywordsToNamedArgs("starmap",["func","iterable"],t,i,[]),s=Sk.abstr.iter(s),r=Sk.builtin.checkNone(r)?Sk.builtin.bool:r,this===e.starmap.prototype)return new e.starmap(r,s);{const t=new this.constructor;return e.starmap.call(t,r,s),t}}}}),e.takewhile=Sk.abstr.buildIteratorClass("itertools.takewhile",{constructor:function takewhile(t,e){this.predicate=t,this.iter=e},iternext(){const t=this.iter.tp$iternext();if(void 0!==t){const e=Sk.misceval.callsimArray(this.predicate,[t]);if(Sk.misceval.isTrue(e))return t;this.tp$iternext=()=>{}}},slots:{tp$doc:"takewhile(predicate, iterable) --\\x3e takewhile object\\n\\nReturn successive entries from an iterable as long as the \\npredicate evaluates to true for each entry.",tp$new(t,i){Sk.abstr.checkNoKwargs("takewhile",i),Sk.abstr.checkArgsLen("takewhile",t,2,2);const r=t[0],s=Sk.abstr.iter(t[1]);if(this===e.takewhile.prototype)return new e.takewhile(r,s);{const t=new this.constructor;return e.takewhile.call(t,r,s),t}}}}),e.tee=new Sk.builtin.func((function(){throw new Sk.builtin.NotImplementedError("tee is not yet implemented in Skulpt")})),e.zip_longest=Sk.abstr.buildIteratorClass("itertools.zip_longest",{constructor:function zip_longest(t,e){this.iters=t,this.fillvalue=e,this.active=this.iters.length},iternext(t){if(!this.active)return;let i;const r=[];for(let s=0;s{throw new a(e+" is not yet implemented in skulpt")}))}const j=E.JSONDecodeError=N("json.JSONDecodeError",{base:l,constructor:function JSONDecodeError(e,t,n){const r=t.slice(0,n),o=r.split("\\n").length,s=n-r.lastIndexOf("\\n"),i=`${e}: line ${o} column ${s} (char ${n})`;l.call(this,i),this.$msg=e,this.$doc=t,this.$pos=n,this.$lineno=o,this.$colno=s},getsets:Object.fromEntries(["msg","doc","pos","lineno","colno"].map((e=>[e,{$get(){return g(this["$"+e])}}])))});class JSONEncoder{constructor(e,t,n,r,o,s,i,l){this.skipkeys=e,this.ensure_ascii=t,this.check_circular=n,this.allow_nan=r,this.indent=o,this.separators=s,this.sort_keys=l,this.item_separator=", ",this.key_separator=": ",null!==this.separators?[this.item_separator,this.key_separator]=this.separators:null!==this.indent&&(this.item_separator=","),null!==i&&(this.default=i),this.encoder=this.make_encoder()}default(e){throw new i(`Object of type ${y(e)} is not JSON serializable`)}encode(t){return new e(this.encoder(t))}make_encoder(){let e,t;e=this.check_circular?new Set:null,t=(this.ensure_ascii,JSON.stringify);return function _make_iterencode(e,t,n,r,s,a,u,h,d){null!==r&&"string"!=typeof r&&(r=" ".repeat(r));let f,p,g,w;null!==e?(f=t=>{if(e.has(t))throw new l("Circular reference detected");e.add(t)},p=t=>e.delete(t)):(f=e=>{},p=e=>{});null!==r?(g=(e,t)=>{t+=1;const n="\\n"+r.repeat(t);return[e+=n,t,u+n]},w=(e,t,n)=>(n-=1,e+="\\n"+r.repeat(n)+t)):(g=(e,t)=>[e,t,u],w=(e,t,n)=>e+t);const _unhandled=(e,n)=>{f(e);const r=_iterencode(t(e),n);return p(e),r},_iterencode_list=(e,t)=>{if(!e.length)return"[]";let n,r;f(e),[n,t,r]=g("[",t);let o=!0;for(let s of e)o?o=!1:n+=r,n+=_iterencode(s,t);return p(e),w(n,"]",t)},_iterencode_dict=(e,t)=>{if(!e.sq$length())return"{}";let r,l;f(e),[r,t,l]=g("{",t);let u=!0;if(h){const t=$(e.tp$getattr(v)),n=c(t);e=$(o,[n])}for(let[o,c]of e.$items()){const e=o.valueOf(),h=typeof e;if("string"===h)o=e;else if("number"===h)o=s(o);else if("boolean"===h||null===e)o=String(e);else{if(!JSBI.__isBigInt(e)){if(d)continue;throw new i("keys must be str, int, float, bool or None, not "+y(o))}o=e.toString()}u?u=!1:r+=l,r+=n(o),r+=a,r+=_iterencode(c,t)}return p(e),w(r,"}",t)},_iterencode=(e,t=0)=>String(m(e,{stringHook:e=>n(e),numberHook:(e,t)=>s(t),bigintHook:e=>e.toString(),dictHook:e=>_iterencode_dict(e,t),arrayHook:e=>_iterencode_list(e,t),setHook:e=>_unhandled(e,t),funcHook:(e,n)=>_unhandled(n,t),objecthook:(e,n)=>_unhandled(n,t),unhandledHook:e=>_unhandled(e,t)}));return _iterencode}(e,this.default,t,this.indent,((e,t=this.allow_nan)=>{const n=e.valueOf();let r;if(Number.isFinite(n))return J(e);if(r=n.toString(),!t)throw new l("Out of range float values are not JSON compliant: "+J(e));return r}),this.key_separator,this.item_separator,this.sort_keys,this.skipkeys)}}const v=new e("items");const x=[!1,!0,!0,!0,null,null,null,!1],D=new JSONEncoder(...x),F=/(-?(?:0|[1-9]\\d*))(\\.\\d+)?([eE][-+]?\\d+)?/;const I=/"[^"\\\\]*(?:\\\\.[^"\\\\]*)*"/m;function scanstring(t,n){const r=t.substring(n-1).match(I);if(null===r)throw new j("Unterminated string starting at",t,n-1);try{return[new e(JSON.parse(r[0])),n+r[0].length-1]}catch(o){let e=o.message.match(/(?:column|position) (\\d+)/);e=e&&Number(e[1]);n=n+(e||0)-(void 0===o.columnNumber?1:2);const r=o.message.replace("JSON.parse: ","").replace(/ at line \\d+ column \\d+ of the JSON data/,"").replace(/ in JSON at position \\d+$/,"");throw new j(r,t,n)}}const A=/[ \\t\\n\\r]*/;function JSONArray(e,t,r){const o=[];let s=e[t];const adjust_white_space=()=>{if(" "===s||"\\t"===s||"\\n"===s||"\\r"===s){const n=e.substring(t).match(A);t+=n[0].length,s=e[t]}};if(adjust_white_space(),"]"===s)return[new n([]),t+1];for(;;){let n;if([n,t]=r(e,t),void 0===n)throw new j("Expecting value",e,t);if(o.push(n),s=e[t],adjust_white_space(),t++,"]"===s)break;if(","!==s)throw new j("Expecting \',\' delimiter",e,t-1);s=e[t],adjust_white_space()}return[new n(o),t]}function JSONObject(e,t,s,i,l){let a=[],c=e[t];const adjust_white_space=()=>{if(" "===c||"\\t"===c||"\\n"===c||"\\r"===c){const n=e.substring(t).match(A);t+=n[0].length,c=e[t]}};if(\'"\'!==c){if(adjust_white_space(),"}"===c){if(null!==l){return[l(new n([])),t+1]}return a=new o([]),null!==i&&(a=i(a)),[a,t+1]}if(\'"\'!==c)throw new j("Expecting property name enclosed in double quotes",e,t)}let u,h;for(t+=1;;){if([u,t]=scanstring(e,t),":"!==(c=e[t])&&(adjust_white_space(),":"!==e[t]))throw new j("Expecting \':\' delimiter",e,t);if(c=e[++t],adjust_white_space(),[h,t]=s(e,t),void 0===h)throw new j("Expecting value",e,t);if(c=e[t],a.push([u,h]),adjust_white_space(),t++,"}"===c)break;if(","!==c)throw new j("Expecting \',\' delimiter",e,t-1);if(c=e[t],adjust_white_space(),t++,\'"\'!==c)throw new j("Expecting property name enclosed in double quotes",e,t-1)}if(null!==l){return[l(new n(a.map((e=>new r(e))))),t]}return a=new o(a.flat()),null!==i&&(a=i(a)),[a,t]}const H={NaN:new t(NaN),Infinity:new t(1/0),"-Infinity":new t(-1/0)};class JSONDecoder{constructor(e,t,n,r,o){this.object_hook=e,this.parse_float=t||w,this.parse_int=n||_,this.parse_constant=r||(e=>H[e]),this.object_pairs_hook=o,this.parse_object=JSONObject,this.parse_array=JSONArray,this.parse_string=scanstring,this.scan_once=function make_scanner(e){const{parse_object:t,parse_array:n,parse_string:r,parse_float:o,parse_int:s,parse_constant:i,object_hook:l,object_pairs_hook:a}=e,scan_once=(e,c)=>{const f=e[c];if(void 0===f)return[f,c];if(\'"\'===f)return r(e,c+1);if("{"===f)return t(e,c+1,scan_once,l,a);if("["===f)return n(e,c+1,scan_once);if("n"===f&&"null"===e.substring(c,c+4))return[u,c+4];if("t"===f&&"true"===e.substring(c,c+4))return[h,c+4];if("f"===f&&"false"===e.substring(c,c+5))return[d,c+5];const p=e.substring(c).match(F);if(null!==p){let e;const[t,n,r,i]=p;return e=r||i?o(n+(r||"")+(i||"")):s(n),[e,c+t.length]}return"N"===f&&"NaN"===e.substring(c,c+3)?[i("NaN"),c+3]:"I"==f&&"Infinity"===e.substring(c,c+8)?[i("Infinity"),c+8]:"-"==f&&"-Infinity"===e.substring(c,c+9)?[i("-Infinity"),c+9]:[void 0,c]};return scan_once}(this)}white(e,t){const n=(0===t?e:e.substring(t)).match(A);return null!==n&&(t+=n[0].length),t}decode(e){e=e.toString();let[t,n]=this.scan_once(e,this.white(e,0));if(void 0===t)throw new j("Expecting value",e,n);if(n=this.white(e,n),n!==e.length)throw new j("Extra data",e,n);return t}}const T=Array(5).fill(null),C=new JSONDecoder(...T);function convertToNullOrFunc(e){return null===e||e===u?null:t=>$(e,[g(t)])}return k("json",E,{loads:{$meth(e,t){O("dumps",e);let n=e[0];if(f(n));else{if(!p(n))throw new i(`the JSON object must be str or bytes, not ${y(n)}`);n=(new TextDecoder).decode(n.valueOf())}const r=S("dumps",["object_hook","parse_float","parse_int","parse_constant","object_pairs_hook"],[],t,T).map(convertToNullOrFunc);return r.every((e=>null===e))?C.decode(n):new JSONDecoder(...r).decode(n)},$doc:"Deserialize ``s`` (a ``str`` or ``bytes`` instance containing a JSON document) to a Python object.",$flags:{FastCall:!0}},dumps:{$meth(e,t){O("dumps",e);const n=e[0];let[r,o,s,l,a,c,u,h]=S("loads",["skipkeys","ensure_ascii","check_circular","allow_nan","indent","separators","default","sort_keys"],[],t,x);if(r=b(r),o=b(o),s=b(s),l=b(l),a=m(a),c=m(c),u=convertToNullOrFunc(u),h=b(h),!r&&o&&s&&l&&null===a&&null===c&&null===u&&!h)return D.encode(n);if(null===c);else if(!Array.isArray(c)||2!==c.length||"string"!=typeof c[0]||"string"!=typeof c[1])throw new i("separators shuld be a list or tuple of strings of length 2");return new JSONEncoder(r,o,s,l,a,c,u,h).encode(n)},$doc:"Serialize ``obj`` to a JSON formatted ``str``",$flags:{FastCall:!0}}}),E}',"src/lib/keyword.js":'function $builtinmodule(){const{ffi:{remapToPy:t},builtin:{frozenset:e,str:s}}=Sk,i=new s("keyword"),n=t(["iskeyword","issoftkeyword","kwlist","softkwlist"]),o=t(["False","None","True","and","as","assert","async","await","break","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","nonlocal","not","or","pass","raise","return","try","while","with","yield"]),a=t(["_","case","match"]);return{__name__:i,__all__:n,kwlist:o,softkwlist:a,iskeyword:new e(o).tp$getattr(s.$contains),issoftkeyword:new e(a).tp$getattr(s.$contains)}}',"src/lib/math.js":`const $builtinmodule=function(e){const{builtin:{str:t,int_:n,float_:i,TypeError:r,pyCheckType:u,checkNumber:l},abstr:{lookupSpecial:o},misceval:{callsimOrSuspendArray:a}}=Sk,s={pi:new Sk.builtin.float_(Math.PI),e:new Sk.builtin.float_(Math.E),tau:new Sk.builtin.float_(2*Math.PI),nan:new Sk.builtin.float_(NaN),inf:new Sk.builtin.float_(1/0)},b=new t("__ceil__");const get_sign=function(e){return e=e?e<0?-1:1:1/e<0?-1:1};function factorial(e){Sk.builtin.pyCheckType("x","number",Sk.builtin.checkNumber(e));let t=Sk.builtin.asnum$(e);if((e=Math.floor(t))!=t)throw new Sk.builtin.ValueError("factorial() only accepts integral values");if(e<0)throw new Sk.builtin.ValueError("factorial() not defined for negative numbers");let n=1;for(let i=2;i<=e&&i<=18;i++)n*=i;if(e<=18)return new Sk.builtin.int_(n);n=JSBI.BigInt(n);for(let i=19;i<=e;i++)n=JSBI.multiply(n,JSBI.BigInt(i));return new Sk.builtin.int_(n)}const c=new t("__floor__");function _gcd_internal(e,t){let n;return"number"==typeof e&&"number"==typeof t?(n=function _gcd(e,t){return 0==t?e:_gcd(t,e%t)}(e=Math.abs(e),t=Math.abs(t)),n=n<0?-n:n):(n=function _biggcd(e,t){return JSBI.equal(t,JSBI.__ZERO)?e:_biggcd(t,JSBI.remainder(e,t))}(e=JSBI.BigInt(e),t=JSBI.BigInt(t)),JSBI.lessThan(n,JSBI.__ZERO)&&(n=JSBI.multiply(n,JSBI.BigInt(-1)))),n}return Sk.abstr.setUpModuleMethods("math",s,{acos:{$meth:function acos(e){return Sk.builtin.pyCheckType("rad","number",Sk.builtin.checkNumber(e)),new Sk.builtin.float_(Math.acos(Sk.builtin.asnum$(e)))},$flags:{OneArg:!0},$textsig:"($module, x, /)",$doc:"Return the arc cosine (measured in radians) of x."},acosh:{$meth:function acosh(e){Sk.builtin.pyCheckType("x","number",Sk.builtin.checkNumber(e));const t=(e=Sk.builtin.asnum$(e))+Math.sqrt(e*e-1);return new Sk.builtin.float_(Math.log(t))},$flags:{OneArg:!0},$textsig:"($module, x, /)",$doc:"Return the inverse hyperbolic cosine of x."},asin:{$meth:function asin(e){return Sk.builtin.pyCheckType("rad","number",Sk.builtin.checkNumber(e)),new Sk.builtin.float_(Math.asin(Sk.builtin.asnum$(e)))},$flags:{OneArg:!0},$textsig:"($module, x, /)",$doc:"Return the arc sine (measured in radians) of x."},asinh:{$meth:function asinh(e){Sk.builtin.pyCheckType("x","number",Sk.builtin.checkNumber(e));const t=(e=Sk.builtin.asnum$(e))+Math.sqrt(e*e+1);return new Sk.builtin.float_(Math.log(t))},$flags:{OneArg:!0},$textsig:"($module, x, /)",$doc:"Return the inverse hyperbolic sine of x."},atan:{$meth:function atan(e){return Sk.builtin.pyCheckType("rad","number",Sk.builtin.checkNumber(e)),new Sk.builtin.float_(Math.atan(Sk.builtin.asnum$(e)))},$flags:{OneArg:!0},$textsig:"($module, x, /)",$doc:"Return the arc tangent (measured in radians) of x."},atan2:{$meth:function atan2(e,t){return Sk.builtin.pyCheckType("y","number",Sk.builtin.checkNumber(e)),Sk.builtin.pyCheckType("x","number",Sk.builtin.checkNumber(t)),new Sk.builtin.float_(Math.atan2(Sk.builtin.asnum$(e),Sk.builtin.asnum$(t)))},$flags:{MinArgs:2,MaxArgs:2},$textsig:"($module, y, x, /)",$doc:"Return the arc tangent (measured in radians) of y/x.\\n\\nUnlike atan(y/x), the signs of both x and y are considered."},atanh:{$meth:function atanh(e){Sk.builtin.pyCheckType("x","number",Sk.builtin.checkNumber(e));const t=(1+(e=Sk.builtin.asnum$(e)))/(1-e);return new Sk.builtin.float_(Math.log(t)/2)},$flags:{OneArg:!0},$textsig:"($module, x, /)",$doc:"Return the inverse hyperbolic tangent of x."},ceil:{$meth:function ceil(e){let t;if(e.ob$type!==i){const n=o(e,b);if(void 0!==n)return a(n);u("","real number",l(e)),t=Sk.builtin.asnum$(e)}else t=e.v;return new n(Math.ceil(t))},$flags:{OneArg:!0},$textsig:"($module, x, /)",$doc:"Return the ceiling of x as an Integral.\\n\\nThis is the smallest integer >= x."},comb:{$meth:function comb(e,t){let n=Sk.misceval.asIndexOrThrow(e),i=Sk.misceval.asIndexOrThrow(t);if(n<0)throw new Sk.builtin.ValueError("n must be an non-negative integer");if(i<0)throw new Sk.builtin.ValueError("k must be a non-negative integer");if(i>e)return new Sk.builtin.int_(0);e=new Sk.builtin.int_(n),t=new Sk.builtin.int_(i);let r=Sk.ffi.remapToJs(e.nb$subtract(t));if(rNumber.MAX_SAFE_INTEGER)throw new Sk.builtin.OverflowError("min(n - k, k) must not exceed "+Number.MAX_SAFE_INTEGER);const u=new Sk.builtin.int_(1);let l=e;for(let o=1;o n.\\n\\nIf k is not specified or is None, then k defaults to n\\nand the function returns n!.\\n\\nRaises TypeError if either of the arguments are not integers.\\nRaises ValueError if either of the arguments are negative."},copysign:{$meth:function copysign(e,t){Sk.builtin.pyCheckType("x","number",Sk.builtin.checkNumber(e)),Sk.builtin.pyCheckType("y","number",Sk.builtin.checkNumber(t));const n=Sk.builtin.asnum$(t),i=Sk.builtin.asnum$(e),r=get_sign(i)*get_sign(n);return new Sk.builtin.float_(i*r)},$flags:{MinArgs:2,MaxArgs:2},$textsig:"($module, x, y, /)",$doc:"Return a float with the magnitude (absolute value) of x but the sign of y.\\n\\nOn platforms that support signed zeros, copysign(1.0, -0.0)\\nreturns -1.0.\\n"},cos:{$meth:function cos(e){return Sk.builtin.pyCheckType("rad","number",Sk.builtin.checkNumber(e)),new Sk.builtin.float_(Math.cos(Sk.builtin.asnum$(e)))},$flags:{OneArg:!0},$textsig:"($module, x, /)",$doc:"Return the cosine of x (measured in radians)."},cosh:{$meth:function cosh(e){Sk.builtin.pyCheckType("x","number",Sk.builtin.checkNumber(e)),e=Sk.builtin.asnum$(e);const t=Math.E,n=Math.pow(t,e),i=(n+1/n)/2;return new Sk.builtin.float_(i)},$flags:{OneArg:!0},$textsig:"($module, x, /)",$doc:"Return the hyperbolic cosine of x."},degrees:{$meth:function degrees(e){Sk.builtin.pyCheckType("rad","number",Sk.builtin.checkNumber(e));const t=180/Math.PI*Sk.builtin.asnum$(e);return new Sk.builtin.float_(t)},$flags:{OneArg:!0},$textsig:"($module, x, /)",$doc:"Convert angle x from radians to degrees."},erf:{$meth:function erf(e){throw new Sk.builtin.NotImplementedError("math.erf() is not yet implemented in Skulpt")},$flags:{OneArg:!0},$textsig:"($module, x, /)",$doc:"Error function at x."},erfc:{$meth:function erfc(e){throw new Sk.builtin.NotImplementedError("math.erfc() is not yet implemented in Skulpt")},$flags:{OneArg:!0},$textsig:"($module, x, /)",$doc:"Complementary error function at x."},exp:{$meth:function exp(e){Sk.builtin.pyCheckType("x","number",Sk.builtin.checkNumber(e));let t=e.v;if("number"!=typeof t&&(t=e.nb$float().v),t==1/0||t==-1/0||isNaN(t))return new Sk.builtin.float_(Math.exp(t));const n=Math.exp(t);if(!isFinite(n))throw new Sk.builtin.OverflowError("math range error");return new Sk.builtin.float_(n)},$flags:{OneArg:!0},$textsig:"($module, x, /)",$doc:"Return e raised to the power of x."},expm1:{$meth:function expm1(e){Sk.builtin.pyCheckType("x","number",Sk.builtin.checkNumber(e));const t=Sk.builtin.asnum$(e);if(Math.abs(t)<.7){const e=Math.exp(t);if(1==e)return new Sk.builtin.float_(t);{const n=(e-1)*t/Math.log(e);return new Sk.builtin.float_(n)}}{const e=Math.exp(t)-1;return new Sk.builtin.float_(e)}},$flags:{OneArg:!0},$textsig:"($module, x, /)",$doc:"Return exp(x)-1.\\n\\nThis function avoids the loss of precision involved in the direct evaluation of exp(x)-1 for small x."},fabs:{$meth:function fabs(e){Sk.builtin.pyCheckType("x","number",Sk.builtin.checkNumber(e));let t=e.v;return JSBI.__isBigInt(t)&&(t=e.nb$float().v),t=Math.abs(t),new Sk.builtin.float_(t)},$flags:{OneArg:!0},$textsig:"($module, x, /)",$doc:"Return the absolute value of the float x."},factorial:{$meth:factorial,$flags:{OneArg:!0},$textsig:"($module, x, /)",$doc:"Find x!.\\n\\nRaise a ValueError if x is negative or non-integral."},floor:{$meth:function floor(e){let t;if(e.ob$type===i)t=e.v;else{const n=o(e,c);if(void 0!==n)return a(n);u("x","number",l(e)),t=Sk.builtin.asnum$(e)}return new n(Math.floor(t))},$flags:{OneArg:!0},$textsig:"($module, x, /)",$doc:"Return the floor of x as an Integral.\\n\\nThis is the largest integer <= x."},fmod:{$meth:function fmod(e,t){Sk.builtin.pyCheckType("x","number",Sk.builtin.checkNumber(e)),Sk.builtin.pyCheckType("y","number",Sk.builtin.checkNumber(t));let n=e.v,i=t.v;if("number"!=typeof n&&(n=e.nb$float().v),"number"!=typeof i&&(i=t.nb$float().v),(i==1/0||i==-1/0)&&isFinite(n))return new Sk.builtin.float_(n);const r=n%i;if(isNaN(r)&&!isNaN(n)&&!isNaN(i))throw new Sk.builtin.ValueError("math domain error");return new Sk.builtin.float_(r)},$flags:{MinArgs:2,MaxArgs:2},$textsig:"($module, x, y, /)",$doc:"Return fmod(x, y), according to platform C.\\n\\nx % y may differ."},frexp:{$meth:function frexp(e){Sk.builtin.pyCheckType("x","number",Sk.builtin.checkNumber(e));const t=Sk.builtin.asnum$(e),n=[t,0];if(0!==t&&Number.isFinite(t)){const e=Math.abs(t);let i=Math.max(-1023,Math.floor(Math.log2(e))+1),r=e*Math.pow(2,-i);for(;r<.5;)r*=2,i--;for(;r>=1;)r*=.5,i++;t<0&&(r=-r),n[0]=r,n[1]=i}return n[0]=new Sk.builtin.float_(n[0]),n[1]=new Sk.builtin.int_(n[1]),new Sk.builtin.tuple(n)},$flags:{OneArg:!0},$textsig:"($module, x, /)",$doc:"Return the mantissa and exponent of x, as pair (m, e).\\n\\nm is a float and e is an int, such that x = m * 2.**e.\\nIf x is 0, m and e are both 0. Else 0.5 <= abs(m) < 1.0."},fsum:{$meth:function fsum(e){if(!Sk.builtin.checkIterable(e))throw new Sk.builtin.TypeError("'"+Sk.abstr.typeName(e)+"' object is not iterable");let t,n,i,r=[];for(let l=(e=Sk.abstr.iter(e)).tp$iternext();void 0!==l;l=e.tp$iternext()){Sk.builtin.pyCheckType("","real number",Sk.builtin.checkNumber(l)),t=0;let e=l.v;"number"!=typeof e&&(e=l.nb$float().v),l=e;for(let u=0,o=r.length;u0;){n--;let t=a;a=JSBI.signedRightShift(u,JSBI.BigInt(n));const r=JSBI.subtract(JSBI.subtract(a,t),i),s=JSBI.leftShift(o,r),b=JSBI.add(JSBI.subtract(JSBI.subtract(l,t),a),i),c=JSBI.signedRightShift(e,b);o=JSBI.add(s,JSBI.divide(c,o))}let s=o;return JSBI.greaterThan(JSBI.multiply(s,s),e)&&(s=JSBI.subtract(s,i)),JSBI.lessThanOrEqual(s,JSBI.BigInt(Number.MAX_SAFE_INTEGER))&&(s=Number(s)),new Sk.builtin.int_(s)}(t)},$flags:{OneArg:!0},$textsig:"($module, n, /)",$doc:"Return the integer part of the square root of the input."},lcm:{$meth:function lcm(...e){function abs(e){return"number"==typeof e?new Sk.builtin.int_(Math.abs(e)):JSBI.lessThan(e,JSBI.__ZERO)?new Sk.builtin.int_(JSBI.unaryMinus(e)):new Sk.builtin.int_(e)}const t=e.length;if(0===t)return new Sk.builtin.int_(1);let n;for(n=0;nNumber.MAX_SAFE_INTEGER?JSBI.BigInt(r):e}else r=JSBI.BigInt(r);"number"!=typeof r&&(i=JSBI.BigInt(i),r=JSBI.multiply(JSBI.divide(r,_gcd_internal(r,i)),i))}return abs(r)},$flags:{MinArgs:0},$textsig:"($module, *integers, /)",$doc:"Return the least common multiple of the specified integer arguments. If all arguments are nonzero, then the returned value is the smallest positive integer that is a multiple of all arguments. If any of the arguments is zero, then the returned value is 0. lcm() without arguments returns 1."},ldexp:{$meth:function ldexp(e,t){Sk.builtin.pyCheckType("x","number",Sk.builtin.checkNumber(e)),Sk.builtin.pyCheckType("i","integer",Sk.builtin.checkInt(t));let n=e.v;"number"!=typeof n&&(n=e.nb$float().v);const i=Sk.builtin.asnum$(t);if(n==1/0||n==-1/0||0==n||isNaN(n))return new Sk.builtin.float_(n);const r=n*Math.pow(2,i);if(!isFinite(r))throw new Sk.builtin.OverflowError("math range error");return new Sk.builtin.float_(r)},$flags:{MinArgs:2,MaxArgs:2},$textsig:"($module, x, i, /)",$doc:"Return x * (2**i).\\n\\nThis is essentially the inverse of frexp()."},lgamma:{$meth:function lgamma(e){throw new Sk.builtin.NotImplementedError("math.lgamma() is not yet implemented in Skulpt")},$flags:{OneArg:!0},$textsig:"($module, x, /)",$doc:"Natural logarithm of absolute value of Gamma function at x."},log:{$meth:function log(e,t){Sk.builtin.pyCheckType("x","number",Sk.builtin.checkNumber(e));let n,i,r=Sk.builtin.asnum$(e);if(r<=0)throw new Sk.builtin.ValueError("math domain error");if(void 0===t?n=Math.E:(Sk.builtin.pyCheckType("base","number",Sk.builtin.checkNumber(t)),n=Sk.builtin.asnum$(t)),n<=0)throw new Sk.builtin.ValueError("math domain error");if(Sk.builtin.checkFloat(e)||re)return new Sk.builtin.int_(0);if(0===t)return new Sk.builtin.int_(1);if(t>Number.MAX_SAFE_INTEGER)throw new Sk.builtin.OverflowError("k must not exceed "+Number.MAX_SAFE_INTEGER);const n=new Sk.builtin.int_(1);let i=e=new Sk.builtin.int_(e);for(let r=1;r n.\\n\\nIf k is not specified or is None, then k defaults to n\\nand the function returns n!.\\n\\nRaises TypeError if either of the arguments are not integers.\\nRaises ValueError if either of the arguments are negative.'"},prod:{$meth:function prod(e,t){Sk.abstr.checkArgsLen("prod",e,1,1),e=Sk.abstr.copyKeywordsToNamedArgs("prod",[null,"start"],e,t,[new Sk.builtin.int_(1)]);const n=Sk.abstr.iter(e[0]);let i,r=e[1];return i=r.constructor===Sk.builtin.int_?function fastProdInt(){return Sk.misceval.iterFor(n,(e=>{if(e.constructor!==Sk.builtin.int_)return e.constructor===Sk.builtin.float_?(r=r.nb$float().nb$multiply(e),new Sk.misceval.Break("float")):(r=Sk.abstr.numberBinOp(r,e,"Mult"),new Sk.misceval.Break("slow"));r=r.nb$multiply(e)}))}():r.constructor===Sk.builtin.float_?"float":"slow",Sk.misceval.chain(i,(e=>"float"===e?function fastProdFloat(){return Sk.misceval.iterFor(n,(e=>{if(e.constructor!==Sk.builtin.float_&&e.constructor!==Sk.builtin.int_)return r=Sk.abstr.numberBinOp(r,e,"Mult"),new Sk.misceval.Break("slow");r=r.nb$multiply(e)}))}():e),(e=>{if("slow"===e)return function slowProd(){return Sk.misceval.iterFor(n,(e=>{r=Sk.abstr.numberBinOp(r,e,"Mult")}))}()}),(()=>r))},$flags:{FastCall:!0},$textsig:"($module, iterable, /, *, start=1)",$doc:"Calculate the product of all the elements in the input iterable. The default start value for the product is 1.\\n\\nWhen the iterable is empty, return the start value. This function is intended specifically for use with numeric values and may reject non-numeric types."},pow:{$meth:function pow(e,t){Sk.builtin.pyCheckType("x","number",Sk.builtin.checkNumber(e)),Sk.builtin.pyCheckType("y","number",Sk.builtin.checkNumber(t));let n=e.v,i=t.v;if("number"!=typeof n&&(n=e.nb$float().v),"number"!=typeof i&&(i=t.nb$float().v),0==n&&i<0)throw new Sk.builtin.ValueError("math domain error");if(1==n)return new Sk.builtin.float_(1);if(Number.isFinite(n)&&Number.isFinite(i)&&n<0&&!Number.isInteger(i))throw new Sk.builtin.ValueError("math domain error");if(-1==n&&(i==-1/0||i==1/0))return new Sk.builtin.float_(1);const r=Math.pow(n,i);if(!Number.isFinite(n)||!Number.isFinite(i))return new Sk.builtin.float_(r);if(r==1/0||r==-1/0)throw new Sk.builtin.OverflowError("math range error");return new Sk.builtin.float_(r)},$flags:{MinArgs:2,MaxArgs:2},$textsig:"($module, x, y, /)",$doc:"Return x**y (x to the power of y)."},radians:{$meth:function radians(e){Sk.builtin.pyCheckType("deg","number",Sk.builtin.checkNumber(e));const t=Math.PI/180*Sk.builtin.asnum$(e);return new Sk.builtin.float_(t)},$flags:{OneArg:!0},$textsig:"($module, x, /)",$doc:"Convert angle x from degrees to radians."},remainder:{$meth:function remainder(e,t){Sk.builtin.pyCheckType("x","number",Sk.builtin.checkNumber(e)),Sk.builtin.pyCheckType("y","number",Sk.builtin.checkNumber(t));let n=e.v,i=t.v;if("number"!=typeof n&&(n=e.nb$float().v),"number"!=typeof i&&(i=t.nb$float().v),isFinite(n)&&isFinite(i)){let e,t,r,u,l;if(0==i)throw new Sk.builtin.ValueError("math domain error");if(e=Math.abs(n),t=Math.abs(i),u=e%t,r=t-u,ur)l=-r;else{if(u!=r)throw new Sk.builtin.AssertionError;l=u-.5*(e-u)%t*2}return new Sk.builtin.float_(get_sign(n)*l)}if(isNaN(n))return e;if(isNaN(i))return t;if(n==1/0||n==-1/0)throw new Sk.builtin.ValueError("math domain error");if(i!=1/0&&i!=-1/0)throw new Sk.builtin.AssertionError;return new Sk.builtin.float_(n)},$flags:{MinArgs:2,MaxArgs:2},$textsig:"($module, x, y, /)",$doc:"Difference between x and the closest integer multiple of y.\\n\\nReturn x - n*y where n*y is the closest integer multiple of y.\\nIn the case where x is exactly halfway between two multiples of\\ny, the nearest even value of n is used. The result is always exact."},sin:{$meth:function sin(e){return Sk.builtin.pyCheckType("rad","number",Sk.builtin.checkNumber(e)),new Sk.builtin.float_(Math.sin(Sk.builtin.asnum$(e)))},$flags:{OneArg:!0},$textsig:"($module, x, /)",$doc:"Return the sine of x (measured in radians)."},sinh:{$meth:function sinh(e){Sk.builtin.pyCheckType("x","number",Sk.builtin.checkNumber(e)),e=Sk.builtin.asnum$(e);const t=Math.E,n=Math.pow(t,e),i=(n-1/n)/2;return new Sk.builtin.float_(i)},$flags:{OneArg:!0},$textsig:"($module, x, /)",$doc:"Return the hyperbolic sine of x."},sqrt:{$meth:function sqrt(e){Sk.builtin.pyCheckType("x","number",Sk.builtin.checkNumber(e));const t=Sk.builtin.asnum$(e);if(t<0)throw new Sk.builtin.ValueError("math domain error");return new Sk.builtin.float_(Math.sqrt(t))},$flags:{OneArg:!0},$textsig:"($module, x, /)",$doc:"Return the square root of x."},tan:{$meth:function tan(e){return Sk.builtin.pyCheckType("rad","number",Sk.builtin.checkNumber(e)),new Sk.builtin.float_(Math.tan(Sk.builtin.asnum$(e)))},$flags:{OneArg:!0},$textsig:"($module, x, /)",$doc:"Return the tangent of x (measured in radians)."},tanh:{$meth:function tanh(e){Sk.builtin.pyCheckType("x","number",Sk.builtin.checkNumber(e));const t=Sk.builtin.asnum$(e);if(0===t)return new Sk.builtin.float_(t);const n=Math.E,i=Math.pow(n,t),r=1/i,u=(i-r)/2/((i+r)/2);return new Sk.builtin.float_(u)},$flags:{OneArg:!0},$textsig:"($module, x, /)",$doc:"Return the hyperbolic tangent of x."},trunc:{$meth:function trunc(e){if(e.ob$type===i)return e.nb$int();const n=o(e,t.$trunc);if(void 0===n)throw new r(\`type \${e.tp$name} doesn't define __trunc__ method\`);return a(n)},$flags:{OneArg:!0},$textsig:"($module, x, /)",$doc:"Truncates the Real x to the nearest Integral toward 0.\\n\\nUses the __trunc__ magic method."}}),s};`,"src/lib/operator.js":`function $builtinmodule(e){const{builtin:{str:t,tuple:a,list:r,int_:o,bool:n,TypeError:s,ValueError:i,none:{none$:m},NotImplemented:{NotImplemented$:d},abs:l,len:h,checkString:u,checkInt:c},abstr:{buildNativeClass:M,checkNoKwargs:b,checkArgsLen:g,checkOneArg:f,numberUnaryOp:p,numberBinOp:A,numberInplaceBinOp:k,objectGetItem:$,objectDelItem:_,objectSetItem:w,sequenceConcat:v,sequenceContains:x,sequenceGetCountOf:j,sequenceGetIndexOf:O,sequenceInPlaceConcat:I,typeName:S,lookupSpecial:y,gattr:q,setUpModuleMethods:R},misceval:{richCompareBool:B,asIndexOrThrow:N,chain:E,callsimArray:T,callsimOrSuspendArray:C,objectRepr:D},generic:{getAttr:G}}=Sk,L=["abs","add","and_","concat","contains","delitem","eq","floordiv","ge","getitem","gt","iadd","iand","iconcat","ifloordiv","ilshift","imatmul","imod","imul","index","inv","invert","ior","ipow","irshift","isub","itruediv","ixor","le","lshift","lt","matmul","mod","mul","ne","neg","not_","or_","pos","pow","rshift","setitem","sub","truediv","xor"],F=["attrgetter","countOf","indexOf","is_","is_not","itemgetter","length_hint","methodcaller","truth",...L].sort(),P={__name__:new t("operator"),__doc__:new t("Operator interface.\\n\\nThis module exports a set of functions implemented in javascript corresponding\\nto the intrinsic operators of Python. For example, operator.add(x, y)\\nis equivalent to the expression x+y. The function names are those\\nused for special methods; variants without leading and trailing\\n'__' are also provided for convenience."),__all__:new r(F.map((e=>new t(e))))};P.itemgetter=M("operator.itemgetter",{constructor:function itemgetter(e){this.items=e,this.oneitem=1===e.length,this.item=e[0],this.in$repr=!1},slots:{tp$getattr:G,tp$new:(e,t)=>(b("itemgetter",t),g("itemgetter",e,1),new P.itemgetter(e)),tp$call(e,t){f("itemgetter",e,t);const r=e[0];return this.oneitem?$(r,this.item,!0):new a(this.items.map((e=>$(r,e))))},tp$doc:"Return a callable object that fetches the given item(s) from its operand.\\n After f = itemgetter(2), the call f(r) returns r[2].\\n After g = itemgetter(2, 5, 3), the call g(r) returns (r[2], r[5], r[3])",$r(){if(this.in$repr)return new t(this.tp$name+"(...)");this.in$repr=!0;const e=this.tp$name+"("+this.items.map((e=>D(e))).join(", ")+")";return this.in$repr=!1,e}}}),P.attrgetter=M("operator.attrgetter",{constructor:function attrgetter(e){this.attrs=e,this.oneattr=1===e.length,this.attr=e[0],this.in$repr=!1},slots:{tp$getattr:G,tp$new(e,a){b("attrgetter",a),g("attrgetter",e,1);const r=[];for(let o=0;onew t(e)))):r.push([a])}return new P.attrgetter(r)},tp$call(e,t){f("attrgetter",e,t);const r=e[0];if(this.oneattr)return this.attr.reduce(((e,t)=>q(e,t)),r);const o=this.attrs.map((e=>e.reduce(((e,t)=>q(e,t)),r)));return new a(o)},tp$doc:"attrgetter(attr, ...) --\\x3e attrgetter object\\n\\nReturn a callable object that fetches the given attribute(s) from its operand.\\nAfter f = attrgetter('name'), the call f(r) returns r.name.\\nAfter g = attrgetter('name', 'date'), the call g(r) returns (r.name, r.date).\\nAfter h = attrgetter('name.first', 'name.last'), the call h(r) returns\\n(r.name.first, r.name.last).",$r(){if(this.in$repr)return new t(this.tp$name+"(...)");this.in$repr=!0;const e=this.tp$name+"("+this.items.map((e=>D(e))).join(", ")+")";return this.in$repr=!1,e}}}),P.methodcaller=M("operator.methodcaller",{constructor:function methodcaller(e,t,a){this.$name=e,this.args=t,this.kwargs=a||[],this.in$repr=!1},slots:{tp$getattr:G,tp$new(e,t){g("methodcaller",e,1);const a=e[0];if(!u(a))throw new s("method name must be a string");return new P.methodcaller(a,e.slice(1),t)},tp$call(e,t){f("methodcaller",e,t);const a=e[0];return E(q(a,this.$name,!0),(e=>C(e,this.args,this.kwargs)))},tp$doc:"methodcaller(name, ...) --\\x3e methodcaller object\\n\\nReturn a callable object that calls the given method on its operand.\\nAfter f = methodcaller('name'), the call f(r) returns r.name().\\nAfter g = methodcaller('name', 'date', foo=1), the call g(r) returns\\nr.name('date', foo=1).",$r(){if(this.in$repr)return new t(this.tp$name+"(...)");this.in$repr=!0;let e=[D(this.$name)];e.push(...this.args.map((e=>D(e))));for(let t=0;tn(B(e,t,"Lt"))),sameAs("a < b")),le:makeModuleMethod(((e,t)=>n(B(e,t,"LtE"))),sameAs("a <= b")),eq:makeModuleMethod(((e,t)=>n(B(e,t,"Eq"))),sameAs("a == b")),ne:makeModuleMethod(((e,t)=>n(B(e,t,"NotEq"))),sameAs("a != b")),ge:makeModuleMethod(((e,t)=>n(B(e,t,"GtE"))),sameAs("a >= b")),gt:makeModuleMethod(((e,t)=>n(B(e,t,"Gt"))),sameAs("a > b")),not_:makeModuleMethod((e=>p(e,"Not")),sameAs("not a")),truth:makeModuleMethod((e=>n(e)),"Return True if a is true, False otherwise."),is_:makeModuleMethod(((e,t)=>n(B(e,t,"Is"))),sameAs("a is b")),is_not:makeModuleMethod(((e,t)=>n(B(e,t,"IsNot"))),sameAs("a is not b")),abs:makeModuleMethod((e=>l(e)),sameAs("abs(a)")),add:makeModuleMethod(((e,t)=>A(e,t,"Add")),sameAs("a + b")),and_:makeModuleMethod(((e,t)=>A(e,t,"BitAnd")),sameAs("a & b")),floordiv:makeModuleMethod(((e,t)=>A(e,t,"FloorDiv")),sameAs("a // b")),index:makeModuleMethod((e=>new o(N(e))),sameAs("a.__index__()")),inv:makeModuleMethod((e=>p(e,"Invert")),sameAs("~a")),invert:makeModuleMethod((e=>p(e,"Invert")),sameAs("~a")),lshift:makeModuleMethod(((e,t)=>A(e,t,"LShift")),sameAs("a << b")),mod:makeModuleMethod(((e,t)=>A(e,t,"Mod")),sameAs("a % b")),mul:makeModuleMethod(((e,t)=>A(e,t,"Mult")),sameAs("a * b")),matmul:makeModuleMethod(((e,t)=>A(e,t,"MatMult")),sameAs("a @ b")),neg:makeModuleMethod((e=>p(e,"USub")),sameAs("-a")),or_:makeModuleMethod(((e,t)=>A(e,t,"BitOr")),sameAs("a | b")),pos:makeModuleMethod((e=>p(e,"UAdd")),sameAs("+a")),pow:makeModuleMethod(((e,t)=>A(e,t,"Pow")),sameAs("a ** b")),rshift:makeModuleMethod(((e,t)=>A(e,t,"RShift")),sameAs("a >> b")),sub:makeModuleMethod(((e,t)=>A(e,t,"Sub")),sameAs("a - b")),truediv:makeModuleMethod(((e,t)=>A(e,t,"Div")),sameAs("a / b")),xor:makeModuleMethod(((e,t)=>A(e,t,"BitXor")),sameAs("a ^ b")),concat:makeModuleMethod(((e,t)=>v(e,t)),sameAs("a + b, for a and b sequences")),contains:makeModuleMethod(((e,t)=>E(x(e,t),n)),sameAs("b in a (note reversed operands)")),countOf:makeModuleMethod(((e,t)=>j(e,t)),"Return thenumber of times b occurs in a."),delitem:makeModuleMethod(((e,t)=>E(_(e,t,!0),(()=>m))),sameAs("del a[b]")),getitem:makeModuleMethod(((e,t)=>$(e,t,!0)),sameAs("a[b]")),indexOf:makeModuleMethod(((e,t)=>O(e,t)),"Return the first index of b in a"),setitem:makeModuleMethod(((e,t,a)=>E(w(e,t,a,!0),(()=>m))),sameAs("a[b] = c")),length_hint:{$meth:function length_hint(e,a){if(void 0===a)a=new o(0);else if(!c(a))throw new s("'"+S(a)+"' object cannot be interpreted as an integer");try{return h(e)}catch(m){if(!(m instanceof s))throw m}const r=y(e,t.$length_hint);if(void 0===r)return a;let n;try{n=T(r,[])}catch(m){if(!(m instanceof s))throw m;return a}if(n===d)return a;if(!c(n))throw new s("__length_hint__ must be an integer, not "+S(n));if(n.nb$isnegative())throw new i("__length_hint__() should return >= 0");return n},$flags:{MinArgs:1,MaxArgs:2},$textsig:"($module, obj, default=0, /)",$doc:"Return an estimate of the number of items in obj.\\n\\nThis is useful for presizing containers when building from an iterable.\\n\\nIf the object supports len(), the result will be exact.\\nOtherwise, it may over- or under-estimate by an arbitrary amount.\\nThe result will be an integer >= 0."},iadd:makeModuleMethod(((e,t)=>k(e,t,"Add")),sameAs("a += b")),iand:makeModuleMethod(((e,t)=>k(e,t,"BitAnd")),sameAs("a &= b")),iconcat:makeModuleMethod(((e,t)=>I(e,t)),sameAs("a += b, for a and b sequences")),ifloordiv:makeModuleMethod(((e,t)=>k(e,t,"FloorDiv")),sameAs("a //= b")),ilshift:makeModuleMethod(((e,t)=>k(e,t,"LShift")),sameAs("a <<= b")),imod:makeModuleMethod(((e,t)=>k(e,t,"Mod")),sameAs("a %= b")),imul:makeModuleMethod(((e,t)=>k(e,t,"Mult")),sameAs("a *= b")),imatmul:makeModuleMethod(((e,t)=>k(e,t,"MatMult")),sameAs("a @= b")),ior:makeModuleMethod(((e,t)=>k(e,t,"BitOr")),sameAs("a |= b")),ipow:makeModuleMethod(((e,t)=>k(e,t,"Pow")),sameAs("a **= b")),irshift:makeModuleMethod(((e,t)=>k(e,t,"RShift")),sameAs("a >>= b")),isub:makeModuleMethod(((e,t)=>k(e,t,"Sub")),sameAs("a -= b")),itruediv:makeModuleMethod(((e,t)=>k(e,t,"Div")),sameAs("a /= b")),ixor:makeModuleMethod(((e,t)=>k(e,t,"BitXor")),sameAs("a ^= b"))}),L.forEach((e=>{P[\`__\${e.replace("_","")}__\`]=P[e]})),P.div=P.truediv,P.__div__=P.div,P}`,"src/lib/platform.js":'var $builtinmodule=function(n){var e={},i="undefined"!=typeof window&&"undefined"!=typeof window.navigator;return e.python_implementation=new Sk.builtin.func((function(){return Sk.builtin.pyCheckArgsLen("python_implementation",arguments.length,0,0),new Sk.builtin.str("Skulpt")})),e.node=new Sk.builtin.func((function(){return Sk.builtin.pyCheckArgsLen("node",arguments.length,0,0),new Sk.builtin.str("")})),e.version=new Sk.builtin.func((function(){return Sk.builtin.pyCheckArgsLen("version",arguments.length,0,0),new Sk.builtin.str("")})),e.python_version=new Sk.builtin.func((function(){var n;return Sk.builtin.pyCheckArgsLen("python_version",arguments.length,0,0),n=Sk.__future__.python_version?"3.2.0":"2.7.0",new Sk.builtin.str(n)})),e.system=new Sk.builtin.func((function(){var n;return Sk.builtin.pyCheckArgsLen("system",arguments.length,0,0),n=i?window.navigator.appCodeName:"",new Sk.builtin.str(n)})),e.machine=new Sk.builtin.func((function(){var n;return Sk.builtin.pyCheckArgsLen("machine",arguments.length,0,0),n=i?window.navigator.platform:"",new Sk.builtin.str(n)})),e.release=new Sk.builtin.func((function(){var n;return Sk.builtin.pyCheckArgsLen("release",arguments.length,0,0),n=i?window.navigator.appVersion:"",new Sk.builtin.str(n)})),e.architecture=new Sk.builtin.func((function(){return Sk.builtin.pyCheckArgsLen("architecture",arguments.length,0,0),new Sk.builtin.tuple([new Sk.builtin.str("64bit"),new Sk.builtin.str("")])})),e.processor=new Sk.builtin.func((function(){return Sk.builtin.pyCheckArgsLen("processor",arguments.length,0,0),new Sk.builtin.str("")})),e};',"src/lib/processing.js":`var $builtinmodule=function(n){var i,e,t,u,o,s,l,c={__name__:new Sk.builtin.str("processing")},r=[],v=!0,f=null;c.processing=null,c.p=null,c.X=new Sk.builtin.int_(0),c.Y=new Sk.builtin.int_(1),c.Z=new Sk.builtin.int_(2),c.R=new Sk.builtin.int_(3),c.G=new Sk.builtin.int_(4),c.B=new Sk.builtin.int_(5),c.A=new Sk.builtin.int_(6),c.U=new Sk.builtin.int_(7),c.V=new Sk.builtin.int_(8),c.NX=new Sk.builtin.int_(9),c.NY=new Sk.builtin.int_(10),c.NZ=new Sk.builtin.int_(11),c.EDGE=new Sk.builtin.int_(12),c.SR=new Sk.builtin.int_(13),c.SG=new Sk.builtin.int_(14),c.SB=new Sk.builtin.int_(15),c.SA=new Sk.builtin.int_(16),c.SW=new Sk.builtin.int_(17),c.TX=new Sk.builtin.int_(18),c.TY=new Sk.builtin.int_(19),c.TZ=new Sk.builtin.int_(20),c.VX=new Sk.builtin.int_(21),c.VY=new Sk.builtin.int_(22),c.VZ=new Sk.builtin.int_(23),c.VW=new Sk.builtin.int_(24),c.AR=new Sk.builtin.int_(25),c.AG=new Sk.builtin.int_(26),c.AB=new Sk.builtin.int_(27),c.DR=new Sk.builtin.int_(3),c.DG=new Sk.builtin.int_(4),c.DB=new Sk.builtin.int_(5),c.DA=new Sk.builtin.int_(6),c.SPR=new Sk.builtin.int_(28),c.SPG=new Sk.builtin.int_(29),c.SPB=new Sk.builtin.int_(30),c.SHINE=new Sk.builtin.int_(31),c.ER=new Sk.builtin.int_(32),c.EG=new Sk.builtin.int_(33),c.EB=new Sk.builtin.int_(34),c.BEEN_LIT=new Sk.builtin.int_(35),c.VERTEX_FIELD_COUNT=new Sk.builtin.int_(36),c.CENTER=new Sk.builtin.int_(3),c.RADIUS=new Sk.builtin.int_(2),c.CORNERS=new Sk.builtin.int_(1),c.CORNER=new Sk.builtin.int_(0),c.DIAMETER=new Sk.builtin.int_(3),c.BASELINE=new Sk.builtin.int_(0),c.TOP=new Sk.builtin.int_(101),c.BOTTOM=new Sk.builtin.int_(102),c.NORMAL=new Sk.builtin.int_(1),c.NORMALIZED=new Sk.builtin.int_(1),c.IMAGE=new Sk.builtin.int_(2),c.MODEL=new Sk.builtin.int_(4),c.SHAPE=new Sk.builtin.int_(5),c.AMBIENT=new Sk.builtin.int_(0),c.DIRECTIONAL=new Sk.builtin.int_(1),c.SPOT=new Sk.builtin.int_(3),c.RGB=new Sk.builtin.int_(1),c.ARGB=new Sk.builtin.int_(2),c.HSB=new Sk.builtin.int_(3),c.ALPHA=new Sk.builtin.int_(4),c.CMYK=new Sk.builtin.int_(5),c.TIFF=new Sk.builtin.int_(0),c.TARGA=new Sk.builtin.int_(1),c.JPEG=new Sk.builtin.int_(2),c.GIF=new Sk.builtin.int_(3),c.MITER=new Sk.builtin.str("miter"),c.BEVEL=new Sk.builtin.str("bevel"),c.ROUND=new Sk.builtin.str("round"),c.SQUARE=new Sk.builtin.str("butt"),c.PROJECT=new Sk.builtin.str("square"),c.P2D=new Sk.builtin.int_(1),c.JAVA2D=new Sk.builtin.int_(1),c.WEBGL=new Sk.builtin.int_(2),c.P3D=new Sk.builtin.int_(2),c.OPENGL=new Sk.builtin.int_(2),c.PDF=new Sk.builtin.int_(0),c.DXF=new Sk.builtin.int_(0),c.OTHER=new Sk.builtin.int_(0),c.WINDOWS=new Sk.builtin.int_(1),c.MAXOSX=new Sk.builtin.int_(2),c.LINUX=new Sk.builtin.int_(3),c.EPSILON=new Sk.builtin.float_(1e-4),c.MAX_FLOAT=new Sk.builtin.float_(34028235e31),c.MIN_FLOAT=new Sk.builtin.float_(-34028235e31),c.MAX_INT=new Sk.builtin.int_(2147483647),c.MIN_INT=new Sk.builtin.int_(-2147483648),c.HALF_PI=new Sk.builtin.float_(Math.PI/2),c.THIRD_PI=new Sk.builtin.float_(Math.PI/3),c.PI=new Sk.builtin.float_(Math.PI),c.TWO_PI=new Sk.builtin.float_(2*Math.PI),c.TAU=new Sk.builtin.float_(2*Math.PI),c.QUARTER_PI=new Sk.builtin.float_(Math.PI/4),c.DEG_TO_RAD=new Sk.builtin.float_(Math.PI/180),c.RAD_TO_DEG=new Sk.builtin.float_(180/Math.PI),c.WHITESPACE=new Sk.builtin.str(" \\t\\n\\r\\f\xA0"),c.POINT=new Sk.builtin.int_(2),c.POINTS=new Sk.builtin.int_(2),c.LINE=new Sk.builtin.int_(4),c.LINES=new Sk.builtin.int_(4),c.TRIANGLE=new Sk.builtin.int_(8),c.TRIANGLES=new Sk.builtin.int_(9),c.TRIANGLE_FAN=new Sk.builtin.int_(11),c.TRIANGLE_STRIP=new Sk.builtin.int_(10),c.QUAD=new Sk.builtin.int_(16),c.QUADS=new Sk.builtin.int_(16),c.QUAD_STRIP=new Sk.builtin.int_(17),c.POLYGON=new Sk.builtin.int_(20),c.PATH=new Sk.builtin.int_(21),c.RECT=new Sk.builtin.int_(30),c.ELLIPSE=new Sk.builtin.int_(31),c.ARC=new Sk.builtin.int_(32),c.SPHERE=new Sk.builtin.int_(40),c.BOX=new Sk.builtin.int_(41),c.GROUP=new Sk.builtin.int_(0),c.PRIMITIVE=new Sk.builtin.int_(1),c.GEOMETRY=new Sk.builtin.int_(3),c.VERTEX=new Sk.builtin.int_(0),c.BEZIER_VERTEX=new Sk.builtin.int_(1),c.CURVE_VERTEX=new Sk.builtin.int_(2),c.BREAK=new Sk.builtin.int_(3),c.CLOSESHAPE=new Sk.builtin.int_(4),c.REPLACE=new Sk.builtin.int_(0),c.BLEND=new Sk.builtin.int_(1),c.ADD=new Sk.builtin.int_(2),c.SUBTRACT=new Sk.builtin.int_(4),c.LIGHTEST=new Sk.builtin.int_(8),c.DARKEST=new Sk.builtin.int_(16),c.DIFFERENCE=new Sk.builtin.int_(32),c.EXCLUSION=new Sk.builtin.int_(64),c.MULTIPLY=new Sk.builtin.int_(128),c.SCREEN=new Sk.builtin.int_(256),c.OVERLAY=new Sk.builtin.int_(512),c.HARD_LIGHT=new Sk.builtin.int_(1024),c.SOFT_LIGHT=new Sk.builtin.int_(2048),c.DODGE=new Sk.builtin.int_(4096),c.BURN=new Sk.builtin.int_(8192),c.ALPHA_MASK=new Sk.builtin.int_(4278190080),c.RED_MASK=new Sk.builtin.int_(16711680),c.GREEN_MASK=new Sk.builtin.int_(65280),c.BLUE_MASK=new Sk.builtin.int_(255),c.CUSTOM=new Sk.builtin.int_(0),c.ORTHOGRAPHIC=new Sk.builtin.int_(2),c.PERSPECTIVE=new Sk.builtin.int_(3),c.ARROW=new Sk.builtin.str("default"),c.CROSS=new Sk.builtin.str("crosshair"),c.HAND=new Sk.builtin.str("pointer"),c.MOVE=new Sk.builtin.str("move"),c.TEXT=new Sk.builtin.str("text"),c.WAIT=new Sk.builtin.str("wait"),c.NOCURSOR=Sk.builtin.assk$("url('data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw=='), auto"),c.DISABLE_OPENGL_2X_SMOOTH=new Sk.builtin.int_(1),c.ENABLE_OPENGL_2X_SMOOTH=new Sk.builtin.int_(-1),c.ENABLE_OPENGL_4X_SMOOTH=new Sk.builtin.int_(2),c.ENABLE_NATIVE_FONTS=new Sk.builtin.int_(3),c.DISABLE_DEPTH_TEST=new Sk.builtin.int_(4),c.ENABLE_DEPTH_TEST=new Sk.builtin.int_(-4),c.ENABLE_DEPTH_SORT=new Sk.builtin.int_(5),c.DISABLE_DEPTH_SORT=new Sk.builtin.int_(-5),c.DISABLE_OPENGL_ERROR_REPORT=new Sk.builtin.int_(6),c.ENABLE_OPENGL_ERROR_REPORT=new Sk.builtin.int_(-6),c.ENABLE_ACCURATE_TEXTURES=new Sk.builtin.int_(7),c.DISABLE_ACCURATE_TEXTURES=new Sk.builtin.int_(-7),c.HINT_COUNT=new Sk.builtin.int_(10),c.OPEN=new Sk.builtin.int_(1),c.CLOSE=new Sk.builtin.int_(2),c.BLUR=new Sk.builtin.int_(11),c.GRAY=new Sk.builtin.int_(12),c.INVERT=new Sk.builtin.int_(13),c.OPAQUE=new Sk.builtin.int_(14),c.POSTERIZE=new Sk.builtin.int_(15),c.THRESHOLD=new Sk.builtin.int_(16),c.ERODE=new Sk.builtin.int_(17),c.DILATE=new Sk.builtin.int_(18),c.BACKSPACE=new Sk.builtin.int_(8),c.TAB=new Sk.builtin.int_(9),c.ENTER=new Sk.builtin.int_(10),c.RETURN=new Sk.builtin.int_(13),c.ESC=new Sk.builtin.int_(27),c.DELETE=new Sk.builtin.int_(127),c.CODED=new Sk.builtin.int_(65535),c.SHIFT=new Sk.builtin.int_(16),c.CONTROL=new Sk.builtin.int_(17),c.ALT=new Sk.builtin.int_(18),c.CAPSLK=new Sk.builtin.int_(20),c.PGUP=new Sk.builtin.int_(33),c.PGDN=new Sk.builtin.int_(34),c.END=new Sk.builtin.int_(35),c.HOME=new Sk.builtin.int_(36),c.LEFT=new Sk.builtin.int_(37),c.UP=new Sk.builtin.int_(38),c.RIGHT=new Sk.builtin.int_(39),c.DOWN=new Sk.builtin.int_(40),c.F1=new Sk.builtin.int_(112),c.F2=new Sk.builtin.int_(113),c.F3=new Sk.builtin.int_(114),c.F4=new Sk.builtin.int_(115),c.F5=new Sk.builtin.int_(116),c.F6=new Sk.builtin.int_(117),c.F7=new Sk.builtin.int_(118),c.F8=new Sk.builtin.int_(119),c.F9=new Sk.builtin.int_(120),c.F10=new Sk.builtin.int_(121),c.F11=new Sk.builtin.int_(122),c.F12=new Sk.builtin.int_(123),c.NUMLK=new Sk.builtin.int_(144),c.META=new Sk.builtin.int_(157),c.INSERT=new Sk.builtin.int_(155),c.SINCOS_LENGTH=new Sk.builtin.int_(720),c.PRECISIONB=new Sk.builtin.int_(15),c.PRECISIONF=new Sk.builtin.int_(32768),c.PREC_MAXVAL=new Sk.builtin.int_(32767),c.PREC_ALPHA_SHIFT=new Sk.builtin.int_(9),c.PREC_RED_SHIFT=new Sk.builtin.int_(1),c.NORMAL_MODE_AUTO=new Sk.builtin.int_(0),c.NORMAL_MODE_SHAPE=new Sk.builtin.int_(1),c.NORMAL_MODE_VERTEX=new Sk.builtin.int_(2),c.MAX_LIGHTS=new Sk.builtin.int_(8),c.line=new Sk.builtin.func((function(n,i,e,t){c.processing.line(n.v,i.v,e.v,t.v)})),c.ellipse=new Sk.builtin.func((function(n,i,e,t){c.processing.ellipse(n.v,i.v,e.v,t.v)})),c.circle=new Sk.builtin.func((function(n,i,e){c.processing.ellipse(n.v,i.v,e.v,e.v)})),c.text=new Sk.builtin.func((function(n,i,e){c.processing.text(n.v,i.v,e.v)})),c.point=new Sk.builtin.func((function(n,i){c.processing.point(n.v,i.v)})),c.arc=new Sk.builtin.func((function(n,i,e,t,u,o){c.processing.arc(n.v,i.v,e.v,t.v,u.v,o.v)})),c.quad=new Sk.builtin.func((function(n,i,e,t,u,o,s,l){c.processing.quad(n.v,i.v,e.v,t.v,u.v,o.v,s.v,l.v)})),c.rect=new Sk.builtin.func((function(n,i,e,t,u){"undefined"==typeof u?c.processing.rect(n.v,i.v,e.v,t.v):c.processing.rect(n.v,i.v,e.v,t.v,u.v)})),c.triangle=new Sk.builtin.func((function(n,i,e,t,u,o){c.processing.triangle(n.v,i.v,e.v,t.v,u.v,o.v)})),c.bezier=new Sk.builtin.func((function(n,i,e,t,u,o,s,l,r,v,f,S){"undefined"==typeof r?c.processing.bezier(n.v,i.v,e.v,t.v,u.v,o.v,s.v,l.v):c.processing.bezier(n.v,i.v,e.v,t.v,u.v,o.v,s.v,l.v,r.v,v.v,f.v,S.v)})),c.alpha=new Sk.builtin.func((function(n,i,e){return"undefined"==typeof i?new Sk.builtin.float_(c.processing.alpha(n.v)):"undefined"==typeof e?new Sk.builtin.float_(c.processing.alpha(n.v,i.v)):new Sk.builtin.float_(c.processing.alpha(n.v,i.v,e.v))})),c.ambient=new Sk.builtin.func((function(n,i,e){"undefined"==typeof i?c.processing.ambient(n.v):"undefined"==typeof e?c.processing.ambient(n.v,i.v):c.processing.ambient(n.v,i.v,e.v)})),c.ambientLight=new Sk.builtin.func((function(n,i,e,t,u,o){"undefined"==typeof t?c.processing.ambientLight(n.v,i.v,e.v):"undefined"==typeof u?c.processing.ambientLight(n.v,i.v,e.v,t.v):"undefined"==typeof o?c.processing.ambientLight(n.v,i.v,e.v,t.v,u.v):c.processing.ambientLight(n.v,i.v,e.v,t.v,u.v,o.v)})),c.beginCamera=new Sk.builtin.func((function(){c.processing.beginCamera()})),c.beginShape=new Sk.builtin.func((function(n){"undefined"==typeof n&&(n=c.POLYGON),c.processing.beginShape(n.v)})),c.bezierDetail=new Sk.builtin.func((function(n){n="undefined"!=typeof n?n.v:20,c.processing.bezierDetail(n)})),c.bezierPoint=new Sk.builtin.func((function(n,i,e,t,u){c.processing.bezierPoint(n.v,i.v,e.v,t.v,u.v)})),c.bezierTangent=new Sk.builtin.func((function(n,i,e,t,u){c.processing.bezierTangent(n.v,i.v,e.v,t.v,u.v)})),c.bezierVertex=new Sk.builtin.func((function(n,i,e,t,u,o,s,l,r){"undefined"==typeof s?c.processing.bezierVertex(n.v,i.v,e.v,t.v,u.v,o.v):"undefined"==typeof l?c.processing.bezierVertex(n.v,i.v,e.v,t.v,u.v,o.v,s.v):"undefined"==typeof r?c.processing.bezierVertex(n.v,i.v,e.v,t.v,u.v,o.v,s.v,l.v):c.processing.bezierVertex(n.v,i.v,e.v,t.v,u.v,o.v,s.v,l.v,r.v)})),c.blend=new Sk.builtin.func((function(n,i,e,t,u,o,s,l,r,v){n instanceof Sk.builtin.int_||n instanceof Sk.builtin.float_?c.processing.blend(n.v,i.v,e.v,t.v,u.v,o.v,s.v,l.v,r.v):c.processing.blend(n.v,i.v,e.v,t.v,u.v,o.v,s.v,l.v,r.v,v.v)})),c.blendColor=new Sk.builtin.func((function(n,i,e){var t=Sk.misceval.callsimArray(c.color,[new Sk.builtin.int_(0),new Sk.builtin.int_(0),new Sk.builtin.int_(0)]);return t.v=c.processing.blendColor(n.v,i.v,e.v),t})),c.brightness=new Sk.builtin.func((function(n,i,e){return"undefined"==typeof i?new Sk.builtin.float_(c.processing.brightness(n.v)):"undefined"==typeof e?new Sk.builtin.float_(c.processing.brightness(n.v,i.v)):new Sk.builtin.float_(c.processing.brightness(n.v,i.v,e.v))})),c.camera=new Sk.builtin.func((function(n,i,e,t,u,o,s,l,r){"undefined"==typeof n?c.processing.camera():c.processing.camera(n.v,i.v,e.v,t.v,u.v,o.v,s.v,l.v,r.v)})),c.constrain=new Sk.builtin.func((function(n,i,e){return new Sk.builtin.float_(c.processing.constrain(n.v,i.v,e.v))})),c.copy=new Sk.builtin.func((function(n,i,e,t,u,o,s,l,r){n instanceof Sk.builtin.int_||n instanceof Sk.builtin.float_?c.processing.copy(n.v,i.v,e.v,t.v,u.v,o.v,s.v,l.v):c.processing.copy(n.v,i.v,e.v,t.v,u.v,o.v,s.v,l.v,r.v)})),c.createFont=new Sk.builtin.func((function(n,i,e,t){var u=Sk.misceval.callsimArray(c.PFont);return u.v="undefined"==typeof e?c.processing.createFont(n.v,i.v):"undefined"==typeof t?c.processing.createFont(n.v,i.v,e.v):c.processing.createFont(n.v,i.v,e.v,t.v),u})),c.createGraphics=new Sk.builtin.func((function(n,i,e,t){var u=Sk.misceval.callsimArray(c.PGraphics);return u.v="undefined"==typeof t?c.processing.createGraphics(n.v,i.v,e.v):c.processing.createGraphics(n.v,i.v,e.v,t.v),u})),c.createImage=new Sk.builtin.func((function(n,i,e){var t=Sk.misceval.callsimArray(c.PImage);return t.v=c.processing.createImage(n.v,i.v,e.v),t})),c.cursor=new Sk.builtin.func((function(n,i,e){"undefined"==typeof n?c.processing.cursor():"undefined"==typeof i?c.processing.cursor(n.v):"undefined"==typeof e?c.processing.cursor(n.v,i.v):c.processing.cursor(n.v,i.v,e.v)})),c.curve=new Sk.builtin.func((function(n,i,e,t,u,o,s,l,r,v,f,S){"undefined"==typeof r?c.processing.curve(n.v,i.v,e.v,t.v,u.v,o.v,s.v,l.v):"undefined"==typeof v?c.processing.curve(n.v,i.v,e.v,t.v,u.v,o.v,s.v,l.v,r.v):"undefined"==typeof f?c.processing.curve(n.v,i.v,e.v,t.v,u.v,o.v,s.v,l.v,r.v,v.v):"undefined"==typeof S?c.processing.curve(n.v,i.v,e.v,t.v,u.v,o.v,s.v,l.v,r.v,v.v,f.v):c.processing.curve(n.v,i.v,e.v,t.v,u.v,o.v,s.v,l.v,r.v,v.v,f.v,S.v)})),c.curveDetail=new Sk.builtin.func((function(n){c.processing.curveDetail(n.v)})),c.curvePoint=new Sk.builtin.func((function(n,i,e,t,u){c.processing.curvePoint(n.v,i.v,e.v,t.v,u.v)})),c.curveTangent=new Sk.builtin.func((function(n,i,e,t,u){c.processing.curveTangent(n.v,i.v,e.v,t.v,u.v)})),c.curveTightness=new Sk.builtin.func((function(n){c.processing.curveTightness(n.v)})),c.curveVertex=new Sk.builtin.func((function(n,i,e){"undefined"==typeof e?c.processing.curveVertex(n.v,i.v):c.processing.curveVertex(n.v,i.v,e.v)})),c.day=new Sk.builtin.func((function(){return new Sk.builtin.int_(c.processing.day())})),c.degrees=new Sk.builtin.func((function(n){return new Sk.builtin.float_(c.processing.degrees(n.v))})),c.directionalLight=new Sk.builtin.func((function(n,i,e,t,u,o){c.processing.directionalLight(n.v,i.v,e.v,t.v,u.v,o.v)})),c.dist=new Sk.builtin.func((function(n,i,e,t,u,o){return"undefined"==typeof u?new Sk.builtin.float_(c.processing.dist(n.v,i.v,e.v,t.v)):"undefined"==typeof o?new Sk.builtin.float_(c.processing.dist(n.v,i.v,e.v,t.v,u.v)):new Sk.builtin.float_(c.processing.dist(n.v,i.v,e.v,t.v,u.v,o.v))})),c.emissive=new Sk.builtin.func((function(n,i,e){"undefined"==typeof i?c.processing.emissive(n.v):"undefined"==typeof e?c.processing.emissive(n.v,i.v):c.processing.emissive(n.v,i.v,e.v)})),c.endCamera=new Sk.builtin.func((function(){c.processing.endCamera()})),c.endShape=new Sk.builtin.func((function(n){"undefined"==typeof n?c.processing.endShape():c.processing.endShape(n.v)})),c.filter=new Sk.builtin.func((function(n,i){"undefined"==typeof i?c.processing.filter(n.v):c.processing.filter(n.v,i.v)})),c.frustum=new Sk.builtin.func((function(n,i,e,t,u,o){c.processing.frustum(n,i,e,t,u,o)})),c.hint=new Sk.builtin.func((function(n){c.processing.hint(n)})),c.hour=new Sk.builtin.func((function(){return new Sk.builtin.int_(c.processing.hour())})),c.hue=new Sk.builtin.func((function(n){return new Sk.builtin.float_(c.processing.hue(n.v))})),c.imageMode=new Sk.builtin.func((function(n){c.processing.imageMode(n.v)})),c.lerp=new Sk.builtin.func((function(n,i,e){return new Sk.builtin.float_(c.processing.lerp(n.v,i.v,e.v))})),c.lerpColor=new Sk.builtin.func((function(n,i,e){var t=Sk.misceval.callsimArray(c.color,[new Sk.builtin.int_(0),new Sk.builtin.int_(0),new Sk.builtin.int_(0)]);return t.v=c.processing.lerpColor(n.v,i.v,e.v),t})),c.lightFalloff=new Sk.builtin.func((function(n,i,e){c.processing.lightFalloff(n.v,i.v,e.v)})),c.lights=new Sk.builtin.func((function(){c.processing.lights()})),c.lightSpecular=new Sk.builtin.func((function(n,i,e){c.processing.lightSpecular(n.v,i.v,e.v)})),c.loadBytes=new Sk.builtin.func((function(n){return new Sk.builtin.list(c.processing.loadBytes(n.v))})),c.loadFont=new Sk.builtin.func((function(n){var i=Sk.misceval.callsimArray(c.PFont);return i.v=c.processing.loadFont(n.v),i})),c.loadShape=new Sk.builtin.func((function(n){return Sk.misceval.callsimArray(c.PShapeSVG,[new Sk.builtin.str("string"),n])})),c.loadStrings=new Sk.builtin.func((function(n){return new Sk.builtin.list(c.processing.loadStrings(n.v))})),c.mag=new Sk.builtin.func((function(n,i,e){return"undefined"==typeof e?new Sk.builtin.float_(c.processing.mag(n.v,i.v)):new Sk.builtin.float_(c.processing.mag(n.v,i.v,e.v))})),c.map=new Sk.builtin.func((function(n,i,e,t,u){return new Sk.builtin.float_(c.processing.map(n.v,i.v,e.v,t.v,u.v))})),c.millis=new Sk.builtin.func((function(){return new Sk.builtin.int_(c.processing.millis())})),c.minute=new Sk.builtin.func((function(){return new Sk.builtin.int_(c.processing.minute())})),c.modelX=new Sk.builtin.func((function(n,i,e){return new Sk.builtin.float_(c.processing.modelX(n.v,i.v,e.v))})),c.modelY=new Sk.builtin.func((function(n,i,e){return new Sk.builtin.float_(c.processing.modelY(n.v,i.v,e.v))})),c.modelZ=new Sk.builtin.func((function(n,i,e){return new Sk.builtin.float_(c.processing.modelZ(n.v,i.v,e.v))})),c.month=new Sk.builtin.func((function(){return new Sk.builtin.int_(c.processing.month())})),c.noCursor=new Sk.builtin.func((function(){c.processing.noCursor()})),c.noise=new Sk.builtin.func((function(n,i,e){return"undefined"==typeof i?new Sk.builtin.float_(c.processing.noise(n.v)):"undefined"==typeof e?new Sk.builtin.float_(c.processing.noise(n.v,i.v)):new Sk.builtin.float_(c.processing.noise(n.v,i.v,e.v))})),c.noiseDetail=new Sk.builtin.func((function(n,i){c.processing.noiseDetail(n.v,i.v)})),c.noiseSeed=new Sk.builtin.func((function(n){return new Sk.builtin.float_(c.processing.noiseSeed(n.v))})),c.noLights=new Sk.builtin.func((function(){c.processing.noLights()})),c.norm=new Sk.builtin.func((function(n,i,e){return new Sk.builtin.float_(c.processing.norm(n.v,i.v,e.v))})),c.normal=new Sk.builtin.func((function(n,i,e){c.processing.normal(n.v,i.v,e.v)})),c.noTint=new Sk.builtin.func((function(){c.processing.noTint()})),c.ortho=new Sk.builtin.func((function(n,i,e,t,u,o){c.processing.ortho(n.v,i.v,e.v,t.v,u.v,o.v)})),c.perspective=new Sk.builtin.func((function(n,i,e,t){"undefined"==typeof n?c.processing.perspective():"undefined"==typeof i?c.processing.perspective(n.v):"undefined"==typeof e?c.processing.perspective(n.v,i.v):"undefined"==typeof t?c.processing.perspective(n.v,i.v,e.v):c.processing.perspective(n.v,i.v,e.v,t.v)})),c.pointLight=new Sk.builtin.func((function(n,i,e,t,u,o){c.processing.pointLight(n.v,i.v,e.v,t.v,u.v,o.v)})),c.printCamera=new Sk.builtin.func((function(){c.processing.printCamera()})),c.println=new Sk.builtin.func((function(n){c.processing.println(n.v)})),c.printProjection=new Sk.builtin.func((function(){c.processing.printProjection()})),c.radians=new Sk.builtin.func((function(n){return new Sk.builtin.float_(c.processing.radians(n.v))})),c.randomSeed=new Sk.builtin.func((function(n){return new Sk.builtin.float_(c.processing.randomSeed(n.v))})),c.random=new Sk.builtin.func((function(n,i){return"undefined"==typeof n?new Sk.builtin.float_(c.processing.random()):"undefined"==typeof i?new Sk.builtin.float_(c.processing.random(n.v)):new Sk.builtin.float_(c.processing.random(n.v,i.v))})),c.requestImage=new Sk.builtin.func((function(n,i){var e=Sk.misceval.callsimArray(c.PImage);return e.v="undefined"==typeof i?c.processing.requestImage(n.v):c.processing.requestImage(n.v,i.v),e})),c.saturation=new Sk.builtin.func((function(n){return new Sk.builtin.float_(c.processing.saturation(n.v))})),c.save=new Sk.builtin.func((function(n){c.processing.save(n.v)})),c.saveFrame=new Sk.builtin.func((function(n){"undefined"==typeof n?c.processing.saveFrame():c.processing.saveFrame(n.v)})),c.saveStrings=new Sk.builtin.func((function(n,i){c.processing.saveStrings(n.v,i.v)})),c.screenX=new Sk.builtin.func((function(n,i,e){return new Sk.builtin.float_(c.processing.screenX(n.v,i.v,e.v))})),c.screenY=new Sk.builtin.func((function(n,i,e){return new Sk.builtin.float_(c.processing.screenY(n.v,i.v,e.v))})),c.screenZ=new Sk.builtin.func((function(n,i,e){return new Sk.builtin.float_(c.processing.screenZ(n.v,i.v,e.v))})),c.second=new Sk.builtin.func((function(){return new Sk.builtin.int_(c.processing.second())})),c.shape=new Sk.builtin.func((function(n,i,e,t,u){"undefined"==typeof i?c.processing.shape(n.v):"undefined"==typeof e?c.processing.shape(n.v,i.v):"undefined"==typeof t?c.processing.shape(n.v,i.v,e.v):"undefined"==typeof u?c.processing.shape(n.v,i.v,e.v,t.v):c.processing.shape(n.v,i.v,e.v,t.v,u.v)})),c.shapeMode=new Sk.builtin.func((function(n){c.processing.shapeMode(n.v)})),c.shininess=new Sk.builtin.func((function(n){c.processing.shininess(n.v)})),c.specular=new Sk.builtin.func((function(n,i,e){"undefined"==typeof i?c.processing.specular(n.v):"undefined"==typeof e?c.processing.specular(n.v,i.v):c.processing.specular(n.v,i.v,e.v)})),c.spotLight=new Sk.builtin.func((function(n,i,e,t,u,o,s,l){c.processing.spotLight(n.v,i.v,e.v,t.v,u.v,o.v,s.v,l.v)})),c.sq=new Sk.builtin.func((function(n){return new Sk.builtin.float_(c.processing.sq(n))})),c.status=new Sk.builtin.func((function(n){c.processing.status(n.v)})),c.textAlign=new Sk.builtin.func((function(n,i){"undefined"==typeof i?c.processing.textAlign(n.v):c.processing.textAlign(n.v,i.v)})),c.textAscent=new Sk.builtin.func((function(){return new Sk.builtin.float_(c.processing.textAscent())})),c.textDescent=new Sk.builtin.func((function(){return new Sk.builtin.float_(c.processing.textDescent())})),c.textFont=new Sk.builtin.func((function(n,i){"undefined"==typeof i?c.processing.textFont(n.v):c.processing.textFont(n.v,i.v)})),c.textLeading=new Sk.builtin.func((function(n){c.processing.textLeading(n.v)})),c.textMode=new Sk.builtin.func((function(n){c.processing.textMode(n.v)})),c.textSize=new Sk.builtin.func((function(n){c.processing.textSize(n.v)})),c.texture=new Sk.builtin.func((function(n){c.processing.texture(n.v)})),c.textureMode=new Sk.builtin.func((function(n){c.processing.textureMode(n.v)})),c.textWidth=new Sk.builtin.func((function(n){return new Sk.builtin.float_(c.processing.textWidth(n.v))})),c.tint=new Sk.builtin.func((function(n,i,e,t){"undefined"==typeof i?c.processing.tint(n.v):"undefined"==typeof e?c.processing.tint(n.v,i.v):"undefined"==typeof t?c.processing.tint(n.v,i.v,e.v):c.processing.tint(n.v,i.v,e.v,t.v)})),c.updatePixels=new Sk.builtin.func((function(){c.processing.updatePixels()})),c.vertex=new Sk.builtin.func((function(n,i,e,t,u){"undefined"==typeof e?c.processing.vertex(n.v,i.v):"undefined"==typeof t?c.processing.vertex(n.v,i.v,e.v):"undefined"==typeof u?c.processing.vertex(n.v,i.v,e.v,t.v):c.processing.vertex(n.v,i.v,e.v,t.v,u.v)})),c.year=new Sk.builtin.func((function(){return new Sk.builtin.int_(c.processing.year())})),c.box=new Sk.builtin.func((function(n){c.processing.box(n.v)})),c.sphere=new Sk.builtin.func((function(n){c.processing.sphere(n.v)})),c.sphereDetail=new Sk.builtin.func((function(n,i){"undefined"==typeof i?c.processing.sphereDetail(n.v):c.processing.sphereDetail(n.v,i.v)})),c.background=new Sk.builtin.func((function(n,i,e){"undefined"!=typeof i&&(i=i.v),"undefined"!=typeof e&&(e=e.v),c.processing.background(n.v,i,e)})),c.fill=new Sk.builtin.func((function(n,i,e,t){"undefined"!=typeof i&&(i=i.v),"undefined"!=typeof e&&(e=e.v),"undefined"!=typeof t&&(t=t.v),c.processing.fill(n.v,i,e,t)})),c.stroke=new Sk.builtin.func((function(n,i,e,t){"undefined"!=typeof i&&(i=i.v),"undefined"!=typeof e&&(e=e.v),"undefined"!=typeof t&&(t=t.v),c.processing.stroke(n.v,i,e,t)})),c.noStroke=new Sk.builtin.func((function(){c.processing.noStroke()})),c.colorMode=new Sk.builtin.func((function(n,i,e,t,u){i="undefined"==typeof i?255:i.v,"undefined"!=typeof e&&(e=e.v),"undefined"!=typeof t&&(t=t.v),"undefined"!=typeof u&&(u=u.v),c.processing.colorMode(n.v,i,e,t,u)})),c.noFill=new Sk.builtin.func((function(){c.processing.noFill()})),c.loop=new Sk.builtin.func((function(){if(null===c.processing)throw new Sk.builtin.Exception("loop() should be called after run()");v=!0,c.processing.loop()})),c.noLoop=new Sk.builtin.func((function(){if(null===c.processing)throw new Sk.builtin.Exception("noLoop() should be called after run()");v=!1,c.processing.noLoop()})),c.frameRate=new Sk.builtin.func((function(n){c.processing.frameRate(n.v)})),c.width=new Sk.builtin.int_(0),c.height=new Sk.builtin.int_(0),c.renderMode=c.P2D,c.size=new Sk.builtin.func((function(n,i,e){"undefined"==typeof e&&(e=c.P2D),c.processing.size(n.v,i.v,e.v),c.width=new Sk.builtin.int_(c.processing.width),c.height=new Sk.builtin.int_(c.processing.height),c.renderMode=e})),c.exitp=new Sk.builtin.func((function(){c.processing.exit()})),c.mouseX=new Sk.builtin.func((function(){return new Sk.builtin.int_(c.processing.mouseX)})),c.mouseY=new Sk.builtin.func((function(){return new Sk.builtin.int_(c.processing.mouseY)})),c.pmouseX=new Sk.builtin.func((function(){return new Sk.builtin.int_(c.processing.pmouseX)})),c.pmouseY=new Sk.builtin.func((function(){return new Sk.builtin.int_(c.processing.pmouseY)})),c.rectMode=new Sk.builtin.func((function(n){c.processing.rectMode(n.v)})),c.strokeWeight=new Sk.builtin.func((function(n){c.processing.strokeWeight(n.v)})),c.smooth=new Sk.builtin.func((function(){c.processing.smooth()})),c.noSmooth=new Sk.builtin.func((function(){c.processing.noSmooth()})),c.ellipseMode=new Sk.builtin.func((function(n){c.processing.ellipseMode(n.v)})),c.strokeCap=new Sk.builtin.func((function(n){c.processing.strokeCap(n.v)})),c.strokeJoin=new Sk.builtin.func((function(n){c.processing.strokeJoin(n.v)})),c.rotate=new Sk.builtin.func((function(n){c.processing.rotate(n.v)})),c.rotateX=new Sk.builtin.func((function(n){c.processing.rotateX(n.v)})),c.rotateY=new Sk.builtin.func((function(n){c.processing.rotateY(n.v)})),c.rotateZ=new Sk.builtin.func((function(n){c.processing.rotateZ(n.v)})),c.scale=new Sk.builtin.func((function(n,i,e){i="undefined"==typeof i?1:i.v,e="undefined"==typeof e?1:e.v,c.processing.scale(n.v,i,e)})),c.translate=new Sk.builtin.func((function(n,i,e){i="undefined"==typeof i?1:i.v,e="undefined"==typeof e?1:e.v,c.processing.translate(n.v,i,e)})),c.popMatrix=new Sk.builtin.func((function(){c.processing.popMatrix()})),c.pushMatrix=new Sk.builtin.func((function(){c.processing.pushMatrix()})),c.applyMatrix=new Sk.builtin.func((function(){var n,i=Array.prototype.slice.call(arguments,0,16);for(n=0;n>>0,this.mti=1;this.mti>>30,this.mt[this.mti]=(1812433253*((4294901760&n)>>>16)<<16)+1812433253*(65535&n)+this.mti,this.mt[this.mti]>>>=0},MersenneTwister.prototype.init_by_array=function(n,t){var i,e,r;for(this.init_genrand(19650218),i=1,e=0,r=this.N>t?this.N:t;r;r--){var u=this.mt[i-1]^this.mt[i-1]>>>30;this.mt[i]=(this.mt[i]^(1664525*((4294901760&u)>>>16)<<16)+1664525*(65535&u))+n[e]+e,this.mt[i]>>>=0,e++,++i>=this.N&&(this.mt[0]=this.mt[this.N-1],i=1),e>=t&&(e=0)}for(r=this.N-1;r;r--){u=this.mt[i-1]^this.mt[i-1]>>>30;this.mt[i]=(this.mt[i]^(1566083941*((4294901760&u)>>>16)<<16)+1566083941*(65535&u))-i,this.mt[i]>>>=0,++i>=this.N&&(this.mt[0]=this.mt[this.N-1],i=1)}this.mt[0]=2147483648},MersenneTwister.prototype.genrand_int32=function(){var n,t=new Array(0,this.MATRIX_A);if(this.mti>=this.N){var i;for(this.mti==this.N+1&&this.init_genrand(5489),i=0;i>>1^t[1&n];for(;i>>1^t[1&n];n=this.mt[this.N-1]&this.UPPER_MASK|this.mt[0]&this.LOWER_MASK,this.mt[this.N-1]=this.mt[this.M-1]^n>>>1^t[1&n],this.mti=0}return n=this.mt[this.mti++],n^=n>>>11,n^=n<<7&2636928640,n^=n<<15&4022730752,(n^=n>>>18)>>>0},MersenneTwister.prototype.genrand_int31=function(){return this.genrand_int32()>>>1},MersenneTwister.prototype.genrand_real1=function(){return this.genrand_int32()*(1/4294967295)},MersenneTwister.prototype.random=function(){return this.genrand_int32()*(1/4294967296)},MersenneTwister.prototype.genrand_real3=function(){return(this.genrand_int32()+.5)*(1/4294967296)},MersenneTwister.prototype.genrand_res53=function(){return(67108864*(this.genrand_int32()>>>5)+(this.genrand_int32()>>>6))*(1/9007199254740992)};var $builtinmodule=function(n){var t={},i=new MersenneTwister,e=void 0;t.seed=new Sk.builtin.func((function(n){return Sk.builtin.pyCheckArgsLen("seed",arguments.length,0,1),n=Sk.builtin.asnum$(n),i=arguments.length>0?new MersenneTwister(n):new MersenneTwister,Sk.builtin.none.none$})),t.random=new Sk.builtin.func((function(){return Sk.builtin.pyCheckArgsLen("random",arguments.length,0,0),new Sk.builtin.float_(i.genrand_res53())}));var toInt=function(n){return 0|n},randrange=function(n,t,e){var r,u,s;if(!Sk.builtin.checkInt(n))throw new Sk.builtin.ValueError("non-integer first argument for randrange()");if(void 0===t)return s=toInt(i.genrand_res53()*n),new Sk.builtin.int_(s);if(!Sk.builtin.checkInt(t))throw new Sk.builtin.ValueError("non-integer stop for randrange()");if(void 0===e&&(e=1),r=t-n,1==e&&r>0)return s=n+toInt(i.genrand_res53()*r),new Sk.builtin.int_(s);if(1==e)throw new Sk.builtin.ValueError("empty range for randrange() ("+n+", "+t+", "+r+")");if(!Sk.builtin.checkInt(e))throw new Sk.builtin.ValueError("non-integer step for randrange()");if(e>0)u=toInt((r+e-1)/e);else{if(!(e<0))throw new Sk.builtin.ValueError("zero step for randrange()");u=toInt((r+e+1)/e)}if(u<=0)throw new Sk.builtin.ValueError("empty range for randrange()");return s=n+e*toInt(i.genrand_res53()*u),new Sk.builtin.int_(s)};t.randint=new Sk.builtin.func((function(n,t){return Sk.builtin.pyCheckArgsLen("randint",arguments.length,2,2),n=Sk.builtin.asnum$(n),t=Sk.builtin.asnum$(t),randrange(n,t+1)})),t.randrange=new Sk.builtin.func((function(n,t,i){return Sk.builtin.pyCheckArgsLen("randrange",arguments.length,1,3),n=Sk.builtin.asnum$(n),t=Sk.builtin.asnum$(t),i=Sk.builtin.asnum$(i),randrange(n,t,i)})),t.uniform=new Sk.builtin.func((function(n,t){Sk.builtin.pyCheckArgsLen("uniform",arguments.length,2,2),n=Sk.builtin.asnum$(n),t=Sk.builtin.asnum$(t);var e=i.genrand_res53();const r=n+e*(t-n);return new Sk.builtin.float_(r)})),t.triangular=new Sk.builtin.func((function(n,t,e){var r,u,s;return Sk.builtin.pyCheckArgsLen("triangular",arguments.length,2,3),Sk.builtin.pyCheckType("low","number",Sk.builtin.checkNumber(n)),Sk.builtin.pyCheckType("high","number",Sk.builtin.checkNumber(t)),(n=Sk.builtin.asnum$(n))>(t=Sk.builtin.asnum$(t))&&(s=n,n=t,t=s),void 0===e||e===Sk.builtin.none.none$?e=(t-n)/2:(Sk.builtin.pyCheckType("mode","number",Sk.builtin.checkNumber(e)),e=Sk.builtin.asnum$(e)),u=(r=i.genrand_res53())<(e-n)/(t-n)?n+Math.sqrt(r*(t-n)*(e-n)):t-Math.sqrt((1-r)*(t-n)*(t-e)),new Sk.builtin.float_(u)}));var normalSample=function(n,t){var r,u,s,h,l;return void 0!==e?(l=e,e=void 0):(r=i.genrand_res53(),u=i.genrand_res53(),s=Math.sqrt(-2*Math.log(r)),h=2*Math.PI*u,l=s*Math.cos(h),e=s*Math.sin(h)),n+t*l};return t.gauss=new Sk.builtin.func((function(n,t){return Sk.builtin.pyCheckArgsLen("gauss",arguments.length,2,2),Sk.builtin.pyCheckType("mu","number",Sk.builtin.checkNumber(n)),Sk.builtin.pyCheckType("sigma","number",Sk.builtin.checkNumber(t)),n=Sk.builtin.asnum$(n),t=Sk.builtin.asnum$(t),new Sk.builtin.float_(normalSample(n,t))})),t.normalvariate=t.gauss,t.lognormvariate=new Sk.builtin.func((function(n,t){return Sk.builtin.pyCheckArgsLen("lognormvariate",arguments.length,2,2),Sk.builtin.pyCheckType("mu","number",Sk.builtin.checkNumber(n)),Sk.builtin.pyCheckType("sigma","number",Sk.builtin.checkNumber(t)),n=Sk.builtin.asnum$(n),t=Sk.builtin.asnum$(t),new Sk.builtin.float_(Math.exp(normalSample(n,t)))})),t.expovariate=new Sk.builtin.func((function(n){Sk.builtin.pyCheckArgsLen("expovariate",arguments.length,1,1),Sk.builtin.pyCheckType("lambd","number",Sk.builtin.checkNumber(n)),n=Sk.builtin.asnum$(n);var t=i.genrand_res53();return new Sk.builtin.float_(-Math.log(t)/n)})),t.choice=new Sk.builtin.func((function(n){if(Sk.builtin.pyCheckArgsLen("choice",arguments.length,1,1),Sk.builtin.pyCheckType("seq","sequence",Sk.builtin.checkSequence(n)),void 0!==n.sq$length){var t=new Sk.builtin.int_(toInt(i.genrand_res53()*n.sq$length()));return n.mp$subscript(t)}throw new Sk.builtin.TypeError("object has no length")})),t.shuffle=new Sk.builtin.func((function(n){if(Sk.builtin.pyCheckArgsLen("shuffle",arguments.length,1,1),Sk.builtin.pyCheckType("x","sequence",Sk.builtin.checkSequence(n)),n.constructor===Sk.builtin.list){const u=n.v;for(var t=u.length-1;t>0;t-=1){var e=u[r=toInt(i.genrand_res53()*(t+1))];u[r]=u[t],u[t]=e}}else{if(void 0===n.sq$length)throw new Sk.builtin.TypeError("object has no length");if(void 0===n.mp$ass_subscript)throw new Sk.builtin.TypeError("object is immutable");for(t=n.sq$length()-1;t>0;t-=1){var r=new Sk.builtin.int_(toInt(i.genrand_res53()*(t+1)));t=new Sk.builtin.int_(t);e=n.mp$subscript(r);n.mp$ass_subscript(r,n.mp$subscript(t)),n.mp$ass_subscript(t,e)}}return Sk.builtin.none.none$})),t.sample=new Sk.builtin.func((function(n,t){var e,r,u,s,h;for(Sk.builtin.pyCheckArgsLen("sample",arguments.length,2,2),Sk.builtin.pyCheckType("population","iterable",Sk.builtin.checkIterable(n)),Sk.builtin.pyCheckType("k","integer",Sk.builtin.checkInt(t)),t=Sk.builtin.asnum$(t),h=[],e=0,s=(u=Sk.abstr.iter(n)).tp$iternext();void 0!==s;e++,s=u.tp$iternext())r=Math.floor(i.genrand_res53()*(e+1)),enew pyStr(e))))},_value2member={},RegexFlagMeta=buildNativeClass("RegexFlagMeta",{constructor:function RegexFlagMeta(){},base:pyType,slots:{tp$iter(){const e=Object.values(_members)[Symbol.iterator]();return new pyIterator((()=>e.next().value))},sq$contains(e){if(!(e instanceof this))throw new TypeError("unsupported operand type(s) for 'in': '"+typeName(e)+"' and '"+typeName(this)+"'");return Object.values(_members).includes(e)}}});re.RegexFlag=buildNativeClass("RegexFlag",{meta:RegexFlagMeta,base:pyInt,constructor:function RegexFlag(e){const t=_value2member[e];if(t)return t;this.v=e,_value2member[e]=this},slots:{tp$new(e,t){checkOneArg("RegexFlag",e,t);const r=e[0].valueOf();if(!checkInt(r))throw new ValueError(objectRepr(r)+" is not a valid RegexFlag");return new re.RegexFlag(r)},$r(){let e=this.valueOf();const t=e<0;e=t?~e:e;const r=[];Object.entries(_members).forEach((([t,n])=>{const s=n.valueOf();e&s&&(e&=~s,r.push("re."+t))})),e&&r.push(hex(e).toString());let n=r.join("|");return t&&(n=r.length>1?"~("+n+")":"~"+n),new pyStr(n)},sq$contains(e){if(!(e instanceof re.RegexFlag))throw new TypeError("'in' requires a RegexFlag not "+typeName(e));return this.nb$and(e)===e},nb$and:flagBitSlot(((e,t)=>e&t),JSBI.bitwiseAnd),nb$or:flagBitSlot(((e,t)=>e|t),JSBI.bitwiseOr),nb$xor:flagBitSlot(((e,t)=>e^t),JSBI.bitwiseXor),nb$invert:function(){const e=this.v;return"number"==typeof e?new re.RegexFlag(~e):new re.RegexFlag(JSBI.bitwiseNot(e))}},proto:{valueOf(){return this.v}},flags:{sk$unacceptableBase:!0}}),re.TEMPLATE=re.T=new re.RegexFlag(1),re.IGNORECASE=re.I=new re.RegexFlag(2),re.LOCALE=re.L=new re.RegexFlag(4),re.MULTILINE=re.M=new re.RegexFlag(8),re.DOTALL=re.S=new re.RegexFlag(16),re.UNICODE=re.U=new re.RegexFlag(32),re.VERBOSE=re.X=new re.RegexFlag(64),re.DEBUG=new re.RegexFlag(128),re.ASCII=re.A=new re.RegexFlag(256);const _members={ASCII:re.A,IGNORECASE:re.I,LOCALE:re.L,UNICODE:re.U,MULTILINE:re.M,DOTALL:re.S,VERBOSE:re.X,TEMPLATE:re.T,DEBUG:re.DEBUG};function flagBitSlot(e,t){return function(r){if(r instanceof re.RegexFlag||r instanceof pyInt){let n=this.v,s=r.v;if("number"==typeof n&&"number"==typeof s){let t=e(n,s);return t<0&&(t+=4294967296),new re.RegexFlag(t)}return n=JSBI.BigUp(n),s=JSBI.BigUp(s),new re.RegexFlag(JSBI.numberIfSafe(t(n,s)))}return pyNotImplemented}}const jsFlags={i:re.I,m:re.M,s:re.S,u:re.U},jsInlineFlags={i:re.I,a:re.A,s:re.S,L:re.L,m:re.M,u:re.U,x:re.X};RegExp.prototype.hasOwnProperty("sticky")||delete jsFlags.s,RegExp.prototype.hasOwnProperty("unicode")||delete jsFlags.u;const flagFails=Object.entries({"cannot use LOCALE flag with a str pattern":re.L,"ASCII and UNICODE flags are incompatible":new re.RegexFlag(re.A.valueOf()|re.U.valueOf())}),inline_regex=/\\(\\?([isamux]+)\\)/g;function adjustFlags(e,t){let r=e.toString(),n="g",s=0;return r=r.replace(inline_regex,((e,t)=>{for(let r of t){const e=jsInlineFlags[r];s|=e.valueOf()}return""})),flagFails.forEach((([e,t])=>{if((t.valueOf()&s)===t.valueOf())throw new re.error("bad bad inline flags: "+e)})),t=numberBinOp(new re.RegexFlag(s),t,"BitOr"),flagFails.forEach((([e,r])=>{if(numberBinOp(r,t,"BitAnd")===r)throw new ValueError(e)})),numberBinOp(re.A,t,"BitAnd")!==re.A&&(t=numberBinOp(re.U,t,"BitOr")),Object.entries(jsFlags).forEach((([e,r])=>{numberBinOp(r,t,"BitAnd")===r&&(n+=e)})),t=new re.RegexFlag(t.valueOf()),[r,n,t]}let neg_lookbehind_A="(?)(?!(?:\\]|[^\\[]*[^\\\\]\\]))/g,py_to_js_unicode_escape=/\\\\[\\t\\r\\n \\v\\f#&~"'!:,;\`<>]|\\\\-(?!(?:\\]|[^\\[]*[^\\\\]\\]))/g,quantifierErrors=/Incomplete quantifier|Lone quantifier/g,_compiled_patterns=Object.create(null);function compile_pattern(e,t){let r,n;[r,n,t]=adjustFlags(e,t);const s=_compiled_patterns[e.toString()];if(s&&s.$flags===t)return s;const i={};let o,a;r="_"+r,r=r.replace(initialUnescapedBracket,"$1$2\\\\]$3"),r=r.replace(py_to_js_regex,((t,r,n,s,o,a)=>{switch(n){case"\\\\A":return r+neg_lookbehind_A+"^";case"\\\\Z":return r+"$(?!\\\\n)";case"{,":return r+"{0,";case"$":return r+"(?:(?=\\\\n$)|$)";default:if(n.endsWith(">"))return i[o]=!0,r+"(?<"+o+">";if(!i[s])throw new re.error("unknown group name "+s+" at position "+a+1,e,new pyInt(a+1));return r+"\\\\k<"+s+">"}})),r=r.slice(1);let l=r;n.includes("u")&&(l=r.replace(py_to_js_unicode_escape,(e=>{switch(e){case"\\\\ ":return" ";case"\\\\\\t":return"\\\\t";case"\\\\\\n":return"\\\\n";case"\\\\\\v":return"\\\\v";case"\\\\\\f":return"\\\\f";case"\\\\r":return"\\\\r";default:return e.slice(1)}})));try{o=new RegExp(l,n)}catch(g){if(!quantifierErrors.test(g.message))throw a=g.message.substring(g.message.lastIndexOf(":")+2)+" in pattern: "+e.toString(),new re.error(a,e);try{o=new RegExp(r,n.replace("u",""))}catch(g){throw a=g.message.substring(g.message.lastIndexOf(":")+2)+" in pattern: "+e.toString(),new re.error(a,e)}}const p=new re.Pattern(o,e,t);return _compiled_patterns[e.toString()]=p,p}function _compile(e,t){if(e instanceof re.Pattern){if(t!==zero||t.valueOf())throw new ValueError("cannot process flags argument with compiled pattern");return e}if(!checkString(e))throw new TypeError("first argument must be string or compiled pattern");return compile_pattern(e,t)}re.error=buildNativeClass("re.error",{base:Exception,constructor:function error(e,t,r){this.$pattern=t,this.$msg=e,this.$pos=r||pyNone,Exception.call(this,e)},slots:{tp$doc:"Exception raised for invalid regular expressions.\\n\\n Attributes:\\n\\n msg: The unformatted error message\\n pattern: The regular expression pattern\\n",tp$init(e,t){const[r,n,s]=copyKeywordToNamedArgs("re.error",["msg","pattern","pos"],e,t,[pyNone,pyNone]);this.$pattern=n,this.$pos=s,this.$msg=r}},getsets:{msg:{$get(){return this.$msg}},pattern:{$get(){return this.$pattern}},pos:{$get(){return this.$pos}}}});const zero=new pyInt(0),maxsize=Number.MAX_SAFE_INTEGER;re.Pattern=buildNativeClass("re.Pattern",{constructor:function(e,t,r){this.v=e,this.str=t,this.$flags=r,this.$groups=null,this.$groupindex=null},slots:{$r(){const e=objectRepr(this.str).slice(0,200),t=objectRepr(this.$flags.nb$and(re.U.nb$invert()));return new pyStr("re.compile("+e+(t?", "+t:"")+")")},tp$richcompare(e,t){if("Eq"!==t&&"NotEq"!==t||!(e instanceof re.Pattern))return pyNotImplemented;const r=this.str===e.str&&this.$flags===e.$flags;return"Eq"===t?r:!r},tp$hash(){},tp$doc:"Compiled regular expression object."},methods:{match:{$meth:function match(e,t,r){return this.$match(e,t,r)},$flags:{NamedArgs:["string","pos","endpos"],Defaults:[zero,maxsize]},$textsig:"($self, /, string, pos=0, endpos=sys.maxsize)",$doc:"Matches zero or more characters at the beginning of the string."},fullmatch:{$meth:function fullmatch(e,t,r){return this.full$match(e,t,r)},$flags:{NamedArgs:["string","pos","endpos"],Defaults:[zero,maxsize]},$textsig:"($self, /, string, pos=0, endpos=sys.maxsize)",$doc:"Matches against all of the string."},search:{$meth:function search(e,t,r){return this.$search(e,t,r)},$flags:{NamedArgs:["string","pos","endpos"],Defaults:[zero,maxsize]},$textsig:"($self, /, string, pos=0, endpos=sys.maxsize)",$doc:"Scan through string looking for a match, and return a corresponding match object instance.\\n\\nReturn None if no position in the string matches."},sub:{$meth:function sub(e,t,r){return this.$sub(e,t,r)},$flags:{NamedArgs:["repl","string","count"],Defaults:[zero]},$textsig:"($self, /, repl, string, count=0)",$doc:"Return the string obtained by replacing the leftmost non-overlapping occurrences of pattern in string by the replacement repl."},subn:{$meth:function(e,t,r){return this.$subn(e,t,r)},$flags:{NamedArgs:["repl","string","count"],Defaults:[zero]},$textsig:"($self, /, repl, string, count=0)",$doc:"Return the tuple (new_string, number_of_subs_made) found by replacing the leftmost non-overlapping occurrences of pattern with the replacement repl."},findall:{$meth:function findall(e,t,r){return this.find$all(e,t,r)},$flags:{NamedArgs:["string","pos","endpos"],Defaults:[zero,maxsize]},$textsig:"($self, /, string, pos=0, endpos=sys.maxsize)",$doc:"Return a list of all non-overlapping matches of pattern in string."},split:{$meth:function split(e,t){return this.$split(e,t)},$flags:{NamedArgs:["string","maxsplit"],Defaults:[zero]},$textsig:"($self, /, string, maxsplit=0)",$doc:"Split string by the occurrences of pattern."},finditer:{$meth:function finditer(e,t,r){return this.find$iter(e,t,r)},$flags:{NamedArgs:["string","pos","endpos"],Defaults:[zero,maxsize]},$textsig:"($self, /, string, pos=0, endpos=sys.maxsize)",$doc:"Return an iterator over all non-overlapping matches for the RE pattern in string.\\n\\nFor each match, the iterator returns a match object."},scanner:{$meth:function scanner(e,t,r){return this.$scanner(e,t,r)},$flags:{NamedArgs:["string","pos","endpos"],Defaults:[zero,maxsize]},$textsig:"($self, /, string, pos=0, endpos=sys.maxsize)",$doc:null},__copy__:{$meth:function copy(){return this},$flags:{NoArgs:!0},$textsig:"($self, /)",$doc:null},__deepcopy__:{$meth:function(){return this},$flags:{OneArg:!0},$textsig:"($self, memo, /)",$doc:null}},getsets:{pattern:{$get(){return this.str},$doc:"The pattern string from which the RE object was compiled."},flags:{$get(){return this.$flags},$doc:"The regex matching flags."},groups:{$get(){if(null===this.$groups){const e=(this.str.v.match(this.group$regex)||[]).length;this.$groups=new pyInt(e)}return this.$groups},$doc:"The number of capturing groups in the pattern."},groupindex:{$get(){if(null===this.$groupindex){const e=this.str.v.matchAll(this.group$regex),t=[];let r=1;for(const n of e)n[1]&&(t.push(new pyStr(n[1])),t.push(new pyInt(r))),r++;this.$groupindex=new pyMappingProxy(new pyDict(t))}return this.$groupindex},$doc:"A dictionary mapping group names to group numbers."}},proto:{group$regex:/\\((?!\\?(?!P<).*)(?:\\?P<([^\\d\\W]\\w*)>)?(?![^\\[]*\\])/g,get$count:e=>(e=asIndexSized(e,OverflowError))||Number.POSITIVE_INFINITY,get$jsstr(e,t,r){if(!checkString(e))throw new TypeError("expected string or bytes-like object");if(t===zero&&r===maxsize||void 0===t&&void 0===r)return{jsstr:e.toString(),pos:zero.valueOf(),endpos:e.sq$length()};const{start:n,end:s}=pySlice.startEnd$wrt(e,t,r);return{jsstr:e.toString().slice(n,s),pos:n,endpos:s}},find$all(e,t,r){let{jsstr:n}=this.get$jsstr(e,t,r);const s=this.v,i=n.matchAll(s),o=[];for(let a of i)o.push(1===a.length?new pyStr(a[0]):2===a.length?new pyStr(a[1]):new pyTuple(a.slice(1).map((e=>new pyStr(e)))));return new pyList(o)},$split(e,t){t=(t=asIndexSized(t))||Number.POSITIVE_INFINITY;let{jsstr:r}=this.get$jsstr(e);const n=this.v,s=[];let i,o=0,a=0;for(;null!==(i=n.exec(r))&&o1&&s.push(...i.slice(1).map((e=>void 0===e?pyNone:new pyStr(e)))),o++,a=n.lastIndex,i.index===n.lastIndex){if(!r)break;r=r.slice(i.index),a=0,n.lastIndex=1}return n.lastIndex=0,s.push(new pyStr(r.slice(a))),new pyList(s)},match$from_repl(e,t,r,n){let s;const i=e[e.length-1];return"object"==typeof i?(s=e.slice(0,e.length-3),Object.assign(s,{groups:i}),s.index=e[e.length-3]):(s=e.slice(0,e.length-2),s.groups=void 0,s.index=e[e.length-2]),new re.Match(s,this.str,t,r,n)},do$sub(e,t,r){const{jsstr:n,pos:s,endpos:i}=this.get$jsstr(t);let o;checkCallable(e)?o=t=>{const r=pyCall(e,[t]);if(!checkString(r))throw new TypeError("expected str instance, "+typeName(r)+" found");return r.toString()}:(e=this.get$jsstr(e).jsstr,o=t=>t.template$repl(e)),r=this.get$count(r);let a=0;const l=n.replace(this.v,((...e)=>{if(a>=r)return e[0];a++;const n=this.match$from_repl(e,t,s,i);return o(n)}));return[new pyStr(l),new pyInt(a)]},$sub(e,t,r){const[n]=this.do$sub(e,t,r);return n},$subn(e,t,r){return new pyTuple(this.do$sub(e,t,r))},do$match(e,t,r,n){let s;({jsstr:s,pos:r,endpos:n}=this.get$jsstr(t,r,n));const i=s.match(e);return null===i?pyNone:new re.Match(i,this,t,r,n)},$search(e,t,r){var n=new RegExp(this.v.source,this.v.flags.replace("g",""));return this.do$match(n,e,t,r)},$match(e,t,r){let n=this.v.source,s=this.v.flags.replace("g","").replace("m","");n="^"+n;var i=new RegExp(n,s);return this.do$match(i,e,t,r)},full$match(e,t,r){let n=this.v.source,s=this.v.flags.replace("g","").replace("m","");n="^(?:"+n+")$";var i=new RegExp(n,s);return this.do$match(i,e,t,r)},find$iter(e,t,r){let n;({jsstr:n,pos:t,endpos:r}=this.get$jsstr(e,t,r));const s=n.matchAll(this.v);return new pyIterator((()=>{const n=s.next().value;if(void 0!==n)return new re.Match(n,this,e,t,r)}))}},flags:{sk$unacceptableBase:!0}}),re.Match=buildNativeClass("re.Match",{constructor:function(e,t,r,n,s){this.v=e,this.$match=new pyStr(this.v[0]),this.str=r,this.$re=t,this.$pos=n,this.$endpos=s,this.$groupdict=null,this.$groups=null,this.$lastindex=null,this.$lastgroup=null,this.$regs=null},slots:{tp$doc:"The result of re.match() and re.search().\\nMatch objects always have a boolean value of True.",$r(){let e="",new pyStr(e)},tp$as_squence_or_mapping:!0,mp$subscript(e){const t=this.get$group(e);return void 0===t?pyNone:new pyStr(t)}},methods:{group:{$meth:function group(...e){let t;return e.length<=1?(t=this.get$group(e[0]),void 0===t?pyNone:new pyStr(t)):(t=[],e.forEach((e=>{e=this.get$group(e),t.push(void 0===e?pyNone:new pyStr(e))})),new pyTuple(t))},$flags:{MinArgs:0},$textsig:null,$doc:"group([group1, ...]) -> str or tuple.\\n Return subgroup(s) of the match by indices or names.\\n For 0 returns the entire match."},start:{$meth:function start(e){const t=this.get$group(e);return new pyInt(void 0===t?-1:this.str.v.indexOf(t,this.v.index+this.$pos))},$flags:{MinArgs:0,MaxArgs:1},$textsig:"($self, group=0, /)",$doc:"Return index of the start of the substring matched by group."},end:{$meth:function end(e){const t=this.get$group(e);return new pyInt(void 0===t?-1:this.str.v.indexOf(t,this.v.index+this.$pos)+[...t].length)},$flags:{MinArgs:0,MaxArgs:1},$textsig:"($self, group=0, /)",$doc:"Return index of the end of the substring matched by group."},span:{$meth:function span(e){return this.$span(e)},$flags:{MinArgs:0,MaxArgs:1},$textsig:"($self, group=0, /)",$doc:"For match object m, return the 2-tuple (m.start(group), m.end(group))."},groups:{$meth:function groups(e){return null!==this.$groups||(this.$groups=Array.from(this.v.slice(1),(t=>void 0===t?e:new pyStr(t))),this.$groups=new pyTuple(this.$groups)),this.$groups},$flags:{NamedArgs:["default"],Defaults:[pyNone]},$textsig:"($self, /, default=None)",$doc:"Return a tuple containing all the subgroups of the match, from 1.\\n\\n default\\n Is used for groups that did not participate in the match."},groupdict:{$meth:function groupdict(e){if(null!==this.$groupdict)return this.$groupdict;if(void 0===this.v.groups)this.$groupdict=new pyDict;else{const t=[];Object.entries(this.v.groups).forEach((([r,n])=>{t.push(new pyStr(r)),t.push(void 0===n?e:new pyStr(n))})),this.$groupdict=new pyDict(t)}return this.$groupdict},$flags:{NamedArgs:["default"],Defaults:[pyNone]},$textsig:"($self, /, default=None)",$doc:"Return a dictionary containing all the named subgroups of the match, keyed by the subgroup name.\\n\\n default\\n Is used for groups that did not participate in the match."},expand:{$meth:function expand(e){if(!checkString(e))throw new TypeError("expected str instance got "+typeName(e));return e=e.toString(),e=this.template$repl(e),new pyStr(e)},$flags:{OneArg:!0},$textsig:"($self, /, template)",$doc:"Return the string obtained by doing backslash substitution on the string template, as done by the sub() method."},__copy__:{$meth:function __copy__(){return this},$flags:{NoArgs:!0},$textsig:"($self, /)",$doc:null},__deepcopy__:{$meth:function __deepcopy__(){return this},$flags:{OneArg:!0},$textsig:"($self, memo, /)",$doc:null}},getsets:{lastindex:{$get(){if(null!==this.$lastindex)return this.$lastindex;let e,t=0;return this.v.forEach(((r,n)=>{n&&void 0!==r&&e!==r&&(t=n,e=r)})),this.$lastindex=t?new pyInt(t):pyNone,this.$lastindex},$doc:"The integer index of the last matched capturing group."},lastgroup:{$get(){if(null!==this.$lastgroup)return this.$lastgroup;if(void 0===this.v.groups)this.$lastgroup=pyNone;else{let e;Object.entries(this.v.groups).forEach((([t,r])=>{void 0!==r&&(e=t)})),this.$lastgroup=void 0===e?pyNone:new pyStr(e)}return this.$lastgroup},$doc:"The name of the last matched capturing group."},regs:{$get(){if(null!==this.$regs)return this.$regs;const e=[];return this.v.forEach(((t,r)=>{e.push(this.$span(r))})),this.$regs=new pyTuple(e),this.$regs}},string:{$get(){return this.str},$doc:"The string passed to match() or search()."},re:{$get(){return this.$re},$doc:"The regular expression object."},pos:{$get(){return new pyInt(this.$pos)},$doc:"The index into the string at which the RE engine started looking for a match."},endpos:{$get(){return new pyInt(this.$endpos)},$doc:"The index into the string beyond which the RE engine will not go."}},proto:{get$group(e){if(void 0===e)return this.v[0];if(checkString(e)){if(e=e.toString(),this.v.groups&&Object.prototype.hasOwnProperty.call(this.v.groups,e))return this.v.groups[e]}else if(isIndex(e)&&(e=asIndexSized(e))>=0&&e|\\\\g<([^\\d\\W]\\w*)>|\\\\g?/g,template$repl(e){return e.replace(this.template$regex,((e,t,r,n,s,i)=>{let o;if(void 0!==(t=t||r)?o=t{delete _compiled_patterns[e]})),pyNone},$flags:{NoArgs:!0},$textsig:"($module, / )",$doc:"Clear the regular expression caches"},template:{$meth:function template(e,t){return _compile(e,numberBinOp(re.T,t,"BitOr"))},$flags:{NamedArgs:["pattern","flags"],Defaults:[zero]},$textsig:"($module, / , pattern, flags=0)",$doc:"Compile a template pattern, returning a Pattern object"},escape:{$meth:function(e){if(!checkString(e))throw new TypeError("expected a str instances, got "+typeName(e));return e=(e=e.toString()).replace(escape_chrs,"\\\\$&"),new pyStr(e)},$flags:{NamedArgs:["pattern"],Defaults:[]},$textsig:"($module, / , pattern)",$doc:"\\n Escape special characters in a string.\\n "}});const escape_chrs=/[\\&\\~\\#.*+\\-?^\${}()|[\\]\\\\\\t\\r\\v\\f\\n ]/g;return re}`,"src/lib/signal.js":'var $builtinmodule=function(n){var i={};return i.SIG_DFL=new Sk.builtin.int_(0),i.SIG_IGN=new Sk.builtin.int_(1),i.CTRL_C_EVENT=new Sk.builtin.int_(0),i.CTRL_BREAK_EVENT=new Sk.builtin.int_(0),i.NSIG=new Sk.builtin.int_(23),i.SIGHUP=new Sk.builtin.int_(1),i.SIGNINT=new Sk.builtin.int_(2),i.SIGILL=new Sk.builtin.int_(4),i.SIGFPE=new Sk.builtin.int_(8),i.SIGKILL=new Sk.builtin.int_(9),i.SIGSEGV=new Sk.builtin.int_(11),i.SIGTERM=new Sk.builtin.int_(15),i.SIGBREAK=new Sk.builtin.int_(21),i.SIGABRT=new Sk.builtin.int_(22),i.pause=new Sk.builtin.func((function(){Sk.builtin.pyCheckArgsLen("pause",arguments.length,0,0);var n=new Sk.misceval.Suspension;return n.resume=function(){return Sk.builtin.none.none$},n.data={type:"Sk.promise",promise:new Promise((function(n,i){if(null!=Sk.signals&&Sk.signals.addEventListener){Sk.signals.addEventListener((function handleSignal(i){Sk.signals.removeEventListener(handleSignal),n()}))}else console.warn("signal.pause() not supported"),Sk.misceval.print_("signal.pause() not supported"),n()}))},n})),i.signal=new Sk.builtin.func((function(){throw new Sk.builtin.NotImplementedError("signal.signal is not supported.")})),i};',"src/lib/string.js":'var $builtinmodule=function(i){var t={};return t.ascii_lowercase=new Sk.builtin.str("abcdefghijklmnopqrstuvwxyz"),t.ascii_uppercase=new Sk.builtin.str("ABCDEFGHIJKLMNOPQRSTUVWXYZ"),t.ascii_letters=new Sk.builtin.str(t.ascii_lowercase.v+t.ascii_uppercase.v),t.lowercase=new Sk.builtin.str("abcdefghijklmnopqrstuvwxyz"),t.uppercase=new Sk.builtin.str("ABCDEFGHIJKLMNOPQRSTUVWXYZ"),t.letters=new Sk.builtin.str(t.lowercase.v+t.uppercase.v),t.digits=new Sk.builtin.str("0123456789"),t.hexdigits=new Sk.builtin.str("0123456789abcdefABCDEF"),t.octdigits=new Sk.builtin.str("01234567"),t.punctuation=new Sk.builtin.str("!\\"#$%&\'()*+,-./:;<=>?@[\\\\]^_`{|}~"),t.whitespace=new Sk.builtin.str("\\t\\n\\v\\f\\r "),t.printable=new Sk.builtin.str(t.digits.v+t.letters.v+t.punctuation.v+" \\t\\n\\r\\v\\f"),t.split=new Sk.builtin.func((function(...i){return Sk.misceval.callsimArray(Sk.builtin.str.prototype.split,i)})),t.capitalize=new Sk.builtin.func((function(i){return Sk.misceval.callsimArray(Sk.builtin.str.prototype.capitalize,[i])})),t.join=new Sk.builtin.func((function(i,t){return void 0===t&&(t=new Sk.builtin.str(" ")),Sk.misceval.callsimArray(Sk.builtin.str.prototype.join,[t,i])})),t.capwords=new Sk.builtin.func((function(i,n){if(Sk.builtin.pyCheckArgsLen("capwords",arguments.length,1,2),!Sk.builtin.checkString(i))throw new Sk.builtin.TypeError("s must be a string");if(void 0===n&&(n=new Sk.builtin.str(" ")),!Sk.builtin.checkString(n))throw new Sk.builtin.TypeError("sep must be a string");for(var e=Sk.misceval.callsimArray(t.split,[i,n]).v,r=[],l=0;l1&&function isLeapYear(t){return 0==(3&t)&&(t%100!=0||t%400==0)}(e?t.getUTCFullYear():t.getFullYear())&&u++,u}function stdTimezoneOffset(){var t=new Date(2002,0,1),e=new Date(2002,6,1);return Math.max(t.getTimezoneOffset(),e.getTimezoneOffset())}function dst(t){return t.getTimezoneOffset()1)return n[1];if(void 0===e)return null;try{return(n=t.toLocaleString(e,{timeZoneName:"short"}).split(" "))[n.length-1]}catch(i){return null}}function from_seconds(t,e){var i=new Date;if(t){Sk.builtin.pyCheckType("secs","number",Sk.builtin.checkNumber(t));var u=Sk.builtin.asnum$(t);i.setTime(1e3*u)}return function date_to_struct_time(t,e){let i;if(e=e||!1)i=[new Sk.builtin.str("UTC"),new Sk.builtin.int_(0)];else{var u=-t.getTimezoneOffset()/60,r=(u<0?"-":"+")+(""+Math.abs(u)).padStart(2,"0");i=[new Sk.builtin.str(r),new Sk.builtin.int_(3600*u)]}return new n([Sk.builtin.assk$(e?t.getUTCFullYear():t.getFullYear()),Sk.builtin.assk$((e?t.getUTCMonth():t.getMonth())+1),Sk.builtin.assk$(e?t.getUTCDate():t.getDate()),Sk.builtin.assk$(e?t.getUTCHours():t.getHours()),Sk.builtin.assk$(e?t.getUTCMinutes():t.getMinutes()),Sk.builtin.assk$(e?t.getUTCSeconds():t.getSeconds()),Sk.builtin.assk$(((e?t.getUTCDay():t.getDay())+6)%7),Sk.builtin.assk$(getDayOfYear(t,e)),Sk.builtin.assk$(e?0:dst(t)?1:0)],i)}(i,e)}e.struct_time=n,e.time=new Sk.builtin.func((function(){return Sk.builtin.pyCheckArgsLen("time",arguments.length,0,0),new Sk.builtin.float_(Date.now()/1e3)})),e.sleep=new Sk.builtin.func((function(t){return Sk.builtin.pyCheckArgsLen("sleep",arguments.length,1,1),Sk.builtin.pyCheckType("delay","float",Sk.builtin.checkNumber(t)),new Sk.misceval.promiseToSuspension(new Promise((function(e){Sk.setTimeout((function(){e(Sk.builtin.none.none$)}),1e3*Sk.ffi.remapToJs(t))})))})),e.localtime=new Sk.builtin.func((function(t){return Sk.builtin.pyCheckArgsLen("localtime",arguments.length,0,1),from_seconds(t,!1)})),e.gmtime=new Sk.builtin.func((function(t){return Sk.builtin.pyCheckArgsLen("gmtime",arguments.length,0,1),from_seconds(t,!0)}));var i=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],u=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"];function asctime_f(t){if(Sk.builtin.pyCheckArgsLen("asctime",arguments.length,0,1),!t||Sk.builtin.checkNone(t)?t=from_seconds():t instanceof n||(t=new n(t)),t instanceof Sk.builtin.tuple&&9==t.v.length){var e=[];return e.push(u[Sk.builtin.asnum$(t.v[6])]),e.push(i[Sk.builtin.asnum$(t.v[1])-1]),e.push(padLeft(Sk.builtin.asnum$(t.v[2]).toString(),2,"0")),e.push(padLeft(Sk.builtin.asnum$(t.v[3]).toString(),2,"0")+":"+padLeft(Sk.builtin.asnum$(t.v[4]).toString(),2,"0")+":"+padLeft(Sk.builtin.asnum$(t.v[5]).toString(),2,"0")),e.push(padLeft(Sk.builtin.asnum$(t.v[0]).toString(),4,"0")),new Sk.builtin.str(e.join(" "))}}function mktime_f(t){if(Sk.builtin.pyCheckArgsLen("mktime",arguments.length,1,1),t instanceof Sk.builtin.tuple&&9==t.v.length){var e=new Date(Sk.builtin.asnum$(t.v[0]),Sk.builtin.asnum$(t.v[1])-1,Sk.builtin.asnum$(t.v[2]),Sk.builtin.asnum$(t.v[3]),Sk.builtin.asnum$(t.v[4]),Sk.builtin.asnum$(t.v[5]));return Sk.builtin.assk$(e.getTime()/1e3,void 0)}throw new Sk.builtin.TypeError("mktime() requires a struct_time or 9-tuple")}e.asctime=new Sk.builtin.func(asctime_f),e.ctime=new Sk.builtin.func((function(t){return Sk.builtin.pyCheckArgsLen("ctime",arguments.length,0,1),asctime_f(from_seconds(t))})),e.mktime=new Sk.builtin.func(mktime_f),e.timezone=new Sk.builtin.int_(60*stdTimezoneOffset()),e.altzone=new Sk.builtin.int_(60*function altTimezoneOffset(){var t=new Date(2002,0,1),e=new Date(2002,6,1);return Math.min(t.getTimezoneOffset(),e.getTimezoneOffset())}()),e.daylight=new Sk.builtin.int_(function daylight_check(){const t=new Date(2002,0,1),e=new Date(2002,6,1);return t.getTimezoneOffset()!=e.getTimezoneOffset()}()?1:0),e.tzname=new Sk.builtin.tuple(function timeZoneNames(){var t=new Date(2002,0,1),e=new Date(2002,6,1);return dst(t)?[new Sk.builtin.str(timeZoneName(e)),new Sk.builtin.str(timeZoneName(t))]:[new Sk.builtin.str(timeZoneName(t)),new Sk.builtin.str(timeZoneName(e))]}()),e.accept2dyear=Sk.builtin.assk$(1),e.clock=new Sk.builtin.func((function(){var t=0;return t=Sk.global.performance&&Sk.global.performance.now?performance.now()/1e3:(new Date).getTime()/1e3,new Sk.builtin.float_(t)})),e.strftime=new Sk.builtin.func((function strftime_f(t,e){var i;if(Sk.builtin.pyCheckArgsLen("strftime",arguments.length,1,2),!Sk.builtin.checkString(t))throw new Sk.builtin.TypeError("format must be a string");return e?e instanceof n||(e=new n(e)):e=from_seconds(),check_struct_time(e),i=Sk.ffi.remapToJs(t),Sk.ffi.remapToPy(Sk.global.strftime(i,new Date(1e3*mktime_f(e).v)))})),e.tzset=new Sk.builtin.func((function tzset_f(){throw new Sk.builtin.NotImplementedError("time.tzset() is not yet implemented")}));let r=null;return e.strptime=new Sk.builtin.func((function strptime_f(...t){return Sk.builtin.pyCheckArgsLen("strptime",t.length,1,2),null===r?Sk.misceval.chain(Sk.importModule("_strptime",!1,!0),(e=>(r=e.tp$getattr(new Sk.builtin.str("_strptime_time")),r.tp$call(t)))):r.tp$call(t)})),e};`,"src/lib/token.js":'var $builtinmodule=function(n){var e={};e.__file__=new Sk.builtin.str("/src/lib/token.py");const t=[];for(let i in Sk.token.tok_name){const n=Sk.token.tok_name[i].slice(2),k=parseInt(i,10);t.push(Sk.ffi.remapToPy(k)),t.push(Sk.ffi.remapToPy(n)),e[n]=Sk.ffi.remapToPy(k)}return e.tok_name=new Sk.builtin.dict(t),e.ISTERMINAL=new Sk.builtin.func((function(n){return Sk.builtin.pyCheckArgsLen("ISTERMINAL",arguments.length,1,1),Sk.token.ISTERMINAL(Sk.ffi.remapToJs(n))})),e.ISNONTERMINAL=new Sk.builtin.func((function(n){return Sk.builtin.pyCheckArgsLen("ISNONTERMINAL",arguments.length,1,1),Sk.token.ISNONTERMINAL(Sk.ffi.remapToJs(n))})),e.ISEOF=new Sk.builtin.func((function(n){return Sk.builtin.pyCheckArgsLen("ISEOF",arguments.length,1,1),Sk.token.ISEOF(Sk.ffi.remapToJs(n))})),e};',"src/lib/tokenize.js":'var $builtinmodule=function(e){var i={};return i.tokenize=new Sk.builtin.func((function(e){Sk.builtin.pyCheckArgsLen("tokenize",1,1),Sk.builtin.checkFunction(e);const i=[];return Sk._tokenize("",(function jsReadline(){const i=Sk.misceval.callsimArray(e);return Sk.ffi.remapToJs(i)}),"UTF-8",(function receiveToken(e){i.push(new Sk.builtin.tuple([Sk.ffi.remapToPy(e.type),Sk.ffi.remapToPy(e.string),new Sk.builtin.tuple([Sk.ffi.remapToPy(e.start[0]),Sk.ffi.remapToPy(e.start[1])]),new Sk.builtin.tuple([Sk.ffi.remapToPy(e.end[0]),Sk.ffi.remapToPy(e.end[1])]),Sk.ffi.remapToPy(e.line)]))})),new Sk.builtin.list(i)})),i};',"src/lib/turtle.js":`var $builtinmodule=function(e){"use strict";var t=function getConfiguredTarget(){var e,t;for(t="string"==typeof(e=Sk.TurtleGraphics&&Sk.TurtleGraphics.target||"turtle")?document.getElementById(e):e;t.firstChild;)t.removeChild(t.firstChild);return t}();return t.turtleInstance?t.turtleInstance.reset():t.turtleInstance=function generateTurtleModule(e){var t,n,r,i,s,a,o,l,u={__name__:new Sk.builtin.str("turtle")},c=!0,h=1e3/30,d={},f={},_={target:"turtle",width:400,height:400,worldWidth:0,worldHeight:0,animate:!0,bufferSize:0,allowUndo:!0,assets:{}};function getAsset(e){var t=i.assets,n="function"==typeof t?t(e):t[e];return"string"==typeof n?new Promise((function(t,r){var s=new Image;s.onload=function(){i.assets[e]=this,t(s)},s.onerror=function(){r(new Error("Missing asset: "+n))},s.src=n})):new InstantPromise(void 0,n)}function InstantPromise(e,t){this.lastResult=t,this.lastError=e}function FrameManager(){this.reset()}function getFrameManager(){return o||(o=new FrameManager),o}function MouseHandler(){var e=this;for(var t in this._target=getTarget(),this._managers={},this._handlers={mousedown:function(t){e.onEvent("mousedown",t)},mouseup:function(t){e.onEvent("mouseup",t)},mousemove:function(t){e.onEvent("mousemove",t)}},this._handlers)this._target.addEventListener(t,this._handlers[t])}function EventManager(e,t){this._type=e,this._target=t,this._handlers=void 0,function getMouseHandler(){return a||(a=new MouseHandler),a}().addManager(e,this)}function Turtle(e){if(getFrameManager().addTurtle(this),this._screen=getScreen(),this._managers={},this._shape=e.v,!d.hasOwnProperty(this._shape))throw new Sk.builtin.ValueError("Shape:'"+this._shape+"' not in default shape, please check shape again!");this.reset()}function Screen(){var e,t;this._frames=1,this._delay=void 0,this._bgcolor="none",this._mode="standard",this._managers={},this._keyLogger={},e=(i.worldWidth||i.width||getWidth())/2,t=(i.worldHeight||i.height||getHeight())/2,this.setUpWorld(-e,-t,e,t)}function ensureAnonymous(){return s||(s=Sk.misceval.callsimArray(u.Turtle)),s.instance}function getTarget(){return e}function getScreen(){return r||(r=new Screen),r}function getWidth(){return 0|(r&&r._width||i.width||getTarget().clientWidth||_.width)}function getHeight(){return 0|(r&&r._height||i.height||getTarget().clientHeight||_.height)}function createLayer(e,t){var n,r=document.createElement("canvas"),i=getWidth(),s=getHeight(),a=getTarget().firstChild?-s+"px":"0";return r.width=i,r.height=s,r.style.position="relative",r.style.display="block",r.style.setProperty("margin-top",a),r.style.setProperty("z-index",e),t&&(r.style.display="none"),getTarget().appendChild(r),(n=r.getContext("2d")).lineCap="round",n.lineJoin="round",applyWorld(getScreen(),n),n}function cancelAnimationFrame(){t&&((window.cancelAnimationFrame||window.mozCancelAnimationFrame)(t),t=void 0),n&&(window.clearTimeout(n),n=void 0)}function applyWorld(e,t){var n=e.llx,r=(e.lly,e.urx,e.ury),i=e.xScale,s=e.yScale;t&&(clearLayer(t),t.restore(),t.save(),t.scale(1/i,1/s),t.translate(-n,-r))}function pushUndo(e){var t,n,r;if(i.allowUndo&&e._bufferSize){for(e._undoBuffer||(e._undoBuffer=[]);e._undoBuffer.length>e._bufferSize;)e._undoBuffer.shift();for(n={},t="x y angle radians color fill down filling shown shape size".split(" "),r=0;r=0;)this._turtles[e].reset();this._turtles=[],this._frames=[],this._frameCount=0,this._buffer=1,this._rate=0,this._animationFrame=animationFrame()},e.addFrame=function(e,t){return t&&(this._frameCount+=1),this.frames().push(e),!i.animate||this._buffer&&this._frameCount===this.frameBuffer()?this.update():new InstantPromise},e.frames=function(){return this._frames},e.frameBuffer=function(e){return"number"==typeof e&&(this._buffer=0|e,e&&e<=this._frameCount)?this.update():this._buffer},e.refreshInterval=function(e){return"number"==typeof e&&(this._rate=0|e,this._animationFrame=animationFrame(e)),this._rate},e.update=function(){return this._frames&&this._frames.length?this.requestAnimationFrame():new InstantPromise},e.requestAnimationFrame=function(){var e,t,n=this._frames,r=this._animationFrame,i=this._turtles,s=getScreen().spriteLayer();return this._frames=[],this._frameCount=0,new Promise((function(a){r((function paint(){for(t=0;t=0;)l[a].test(n,r,i,s)&&l[a].canMove("mousedown"===e);if(o&&o.length)for(computeCoordinates(),a=o.length;--a>=0;)("mousemove"===e&&o[a].canMove()&&o[a].test(n,r,i,s)||"mousedown"===e&&o[a].test(n,r,i,s))&&o[a].trigger([i,s])},l.reset=function(){this._managers={}},l.addManager=function(e,t){this._managers[e]||(this._managers[e]=[]),this._managers[e].push(t)},function(e){e.reset=function(){this._handlers=void 0},e.canMove=function(e){return!(!this._target||!this._target.hitTest)&&(void 0!==e&&(this._target.hitTest.hit=e),this._target.hitTest.hit)},e.test=function(e,t,n,r){return this._target&&this._target.hitTest?this._target.hitTest(e,t,n,r):!!this._target},e.trigger=function(e){var t,n=this._handlers;if(n&&n.length)for(t=0;t.5&&e<10.5?Sk.builtin.asnum$(Sk.builtin.round(Sk.builtin.assk$(e))):0,this._speed=e,this._computed_speed=2*e,this.addUpdate(void 0,!1,{speed:this._computed_speed})},e.$speed.minArgs=0,e.$speed.co_varnames=["speed"],e.$pencolor=function(e,t,n,r){return void 0!==e?(this._color=createColor(this._colorMode,e,t,n,r),this.addUpdate(void 0,this._shown,{color:this._color})):hexToRGB(this._color)},e.$pencolor.co_varnames=["r","g","b","a"],e.$pencolor.minArgs=0,e.$pencolor.returnType=f.COLOR,e.$fillcolor=function(e,t,n,r){return void 0!==e?(this._fill=createColor(this._colorMode,e,t,n,r),this.addUpdate(void 0,this._shown,{fill:this._fill})):hexToRGB(this._fill)},e.$fillcolor.co_varnames=["r","g","b","a"],e.$fillcolor.minArgs=0,e.$fillcolor.returnType=f.COLOR,e.$color=function(e,t,n,r){return void 0!==e?(void 0===t||void 0!==n?(this._color=createColor(this._colorMode,e,t,n,r),this._fill=this._color):(this._color=createColor(this._colorMode,e),this._fill=createColor(this._colorMode,t)),this.addUpdate(void 0,this._shown,{color:this._color,fill:this._fill})):[this.$pencolor(),this.$fillcolor()]},e.$color.minArgs=0,e.$color.co_varnames=["color","fill","b","a"],e.$color.returnType=function(e){return new Sk.builtin.tuple([f.COLOR(e[0]),f.COLOR(e[1])])},e.$fill=function(e){if(void 0!==e){if((e=!!e)===this._filling)return;return this._filling=e,e?(pushUndo(this),this.addUpdate(void 0,!1,{filling:!0,fillBuffer:[{x:this._x,y:this._y}]})):(pushUndo(this),this.addUpdate((function(){this.fillBuffer.push(this),drawFill.call(this)}),!0,{filling:!1,fillBuffer:void 0}))}return this._filling},e.$fill.co_varnames=["flag"],e.$fill.minArgs=0,e.$begin_fill=function(){return this.$fill(!0)},e.$end_fill=function(){return this.$fill(!1)},e.$stamp=function(){return pushUndo(this),this.addUpdate((function(){drawTurtle(this,this.context())}),!0)},e.$dot=function(e,t,n,r,i){return pushUndo(this),e="number"==typeof(e=Sk.builtin.asnum$(e))?Math.max(1,0|Math.abs(e)):Math.max(this._size+4,2*this._size),t=void 0!==t?createColor(this._colorMode,t,n,r,i):this._color,this.addUpdate(drawDot,!0,void 0,e,t)},e.$dot.co_varnames=["size","color","g","b","a"],e.$write=function(e,t,n,r){var i,s,a,o,l,u=this;return pushUndo(this),e=String(e),r&&r.constructor===Array&&(s="string"==typeof r[0]?r[0]:"Arial",a=String(r[1]||"12pt"),o="string"==typeof r[2]?r[2]:"normal",/^\\d+$/.test(a)&&(a+="pt"),r=[o,a,s].join(" ")),n||(n="left"),i=this.addUpdate(drawText,!0,void 0,e,n,r),!t||"left"!==n&&"center"!==n||(l=function measureText(e,t){return t&&(p.font=t),p.measureText(e).width}(e,r),"center"===n&&(l/=2),i=i.then((function(){var e=u.getState();return u.translate(e.x,e.y,l,0,!0)}))),i},e.$write.co_varnames=["message","move","align","font"],e.$write.minArgs=1,e.$pensize=e.$width=function(e){return void 0!==e?(this._size=e,this.addUpdate(void 0,this._shown,{size:e})):this._size},e.$pensize.minArgs=e.$width.minArgs=0,e.$pensize.co_varnames=e.$width.co_varnames=["width"],e.$showturtle=e.$st=function(){return this._shown=!0,this.addUpdate(void 0,!0,{shown:!0})},e.$hideturtle=e.$ht=function(){return this._shown=!1,this.addUpdate(void 0,!0,{shown:!1})},e.$isvisible=function(){return this._shown},e.$shape=function(e){return e&&d[e]?(this._shape=e,this.addUpdate(void 0,this._shown,{shape:e})):this._shape},e.$shape.minArgs=0,e.$shape.co_varnames=["name"],e.$window_width=function(){return this._screen.$window_width()},e.$window_height=function(){return this._screen.$window_height()},e.$tracer=function(e,t){return this._screen.$tracer(e,t)},e.$tracer.minArgs=0,e.$tracer.co_varnames=["n","delay"],e.$update=function(){return this._screen.$update()},e.$delay=function(e){return this._screen.$delay(e)},e.$delay.minArgs=0,e.$delay.co_varnames=["delay"],e.$reset=function(){return this.reset(),this.$clear()},e.$mainloop=e.$done=function(){return this._screen.$mainloop()},e.$clear=function(){return this.addUpdate((function(){clearLayer(this.context())}),!0)},e.$dot.minArgs=0,e.$onclick=function(e,t,n){this.getManager("mousedown").addHandler(e,n)},e.$onclick.minArgs=1,e.$onclick.co_varnames=["method","btn","add"],e.$onrelease=function(e,t,n){this.getManager("mouseup").addHandler(e,n)},e.$onrelease.minArgs=1,e.$onrelease.co_varnames=["method","btn","add"],e.$ondrag=function(e,t,n){this.getManager("mousemove").addHandler(e,n)},e.$ondrag.minArgs=1,e.$ondrag.co_varnames=["method","btn","add"],e.$getscreen=function(){return Sk.misceval.callsimArray(u.Screen)},e.$getscreen.isSk=!0,e.$clone=function(){var e=Sk.misceval.callsimOrSuspendArray(u.Turtle);return e.instance._x=this._x,e.instance._y=this._y,e.instance._angle=this._angle,e.instance._radians=this._radians,e.instance._shape=this._shape,e.instance._color=this._color,e.instance._fill=this._fill,e.instance._filling=this._filling,e.instance._size=this._size,e.instance._computed_speed=this._computed_speed,e.instance._down=this._down,e.instance._shown=this._shown,e.instance._colorMode=this._colorMode,e.instance._isRadians=this._isRadians,e.instance._fullCircle=this._fullCircle,e.instance._bufferSize=this._bufferSize,e.instance._undoBuffer=this._undoBuffer,e._clonedFrom=this,e},e.$clone.returnType=function(e){return e},e.$getturtle=e.$getpen=function(){return this.skInstance},e.$getturtle.isSk=!0}(Turtle.prototype),function(e){e.spriteLayer=function(){return this._sprites||(this._sprites=createLayer(3))},e.bgLayer=function(){return this._background||(this._background=createLayer(1))},e.hitTestLayer=function(){return this._hitTest||(this._hitTest=createLayer(0,!0))},e.getManager=function(e){return this._managers[e]||(this._managers[e]=new EventManager(e,this)),this._managers[e]},e.reset=function(){var e;for(e in this._keyListeners=void 0,this._keyLogger)window.clearInterval(this._keyLogger[e]),window.clearTimeout(this._keyLogger[e]),delete this._keyLogger[e];for(e in this._keyDownListener&&(getTarget().removeEventListener("keydown",this._keyDownListener),this._keyDownListener=void 0),this._keyUpListener&&(getTarget().removeEventListener("keyup",this._keyUpListener),this._keyUpListener=void 0),this._timer&&(window.clearTimeout(this._timer),this._timer=void 0),this._managers)this._managers[e].reset();this._mode="standard",removeLayer(this._sprites),this._sprites=void 0,removeLayer(this._background),this._background=void 0},e.setUpWorld=function(e,t,n,r){var i=this;i.llx=e,i.lly=t,i.urx=n,i.ury=r,i.xScale=(n-e)/getWidth(),i.yScale=-1*(r-t)/getHeight(),i.lineScale=Math.min(Math.abs(i.xScale),Math.abs(i.yScale))},e.$setup=function(e,t,n,r){return isNaN(parseFloat(e))&&(e=getWidth()),isNaN(parseFloat(t))&&(t=getHeight()),e<=1&&(e=getWidth()*e),t<=1&&(t=getHeight()*t),this._width=e,this._height=t,this._xOffset=void 0===n||isNaN(parseInt(n))?0:parseInt(n),this._yOffset=void 0===r||isNaN(parseInt(r))?0:parseInt(r),"world"===this._mode?this._setworldcoordinates(this.llx,this.lly,this.urx,this.ury):this._setworldcoordinates(-e/2,-t/2,e/2,t/2)},e.$setup.minArgs=0,e.$setup.co_varnames=["width","height","startx","starty"],e.$register_shape=e.$addshape=function(e,t){if(!t)return getAsset(e).then((function(t){d[e]=t}));d[e]=t},e.$register_shape.minArgs=1,e.$register_shape.co_varnames=["name","shape"],e.$getshapes=function(){return Object.keys(d)},e.$tracer=function(e,t){return void 0!==e||void 0!==t?("number"==typeof t&&(this._delay=t,getFrameManager().refreshInterval(t)),"number"==typeof e?(this._frames=e,getFrameManager().frameBuffer(e)):void 0):this._frames},e.$tracer.co_varnames=["frames","delay"],e.$tracer.minArgs=0,e.$delay=function(e){return void 0!==e?this.$tracer(void 0,e):void 0===this._delay?h:this._delay},e.$delay.co_varnames=["delay"],e._setworldcoordinates=function(e,t,n,r){return getFrameManager().turtles(),this.setUpWorld(e,t,n,r),this._sprites&&applyWorld(this,this._sprites),this._background&&applyWorld(this,this._background),this.$clear()},e.$setworldcoordinates=function(e,t,n,r){return this._mode="world",this._setworldcoordinates(e,t,n,r)},e.$setworldcoordinates.co_varnames=["llx","lly","urx","ury"],e.minArgs=4,e.$clear=e.$clearscreen=function(){return this.reset(),this.$reset()},e.$update=function(){return getFrameManager().update()},e.$reset=e.$resetscreen=function(){var e=this,t=getFrameManager().turtles();return getFrameManager().addFrame((function(){applyWorld(e,e._sprites),applyWorld(e,e._background);for(var n=0;n1&&t[s]&&t[s].test(r),r===a||i){e._keyListeners[r](),e._createKeyRepeater(r,s),n.preventDefault();break}}},getTarget().addEventListener("keydown",this._keyDownListener))},e._createKeyUpListener=function(){var e=this;this._keyUpListener||(this._keyUpListener=function(t){var n=e._keyLogger[t.charCode||t.keyCode];void 0!==n&&(t.preventDefault(),window.clearInterval(n),window.clearTimeout(n),delete e._keyLogger[t.charCode||t.keyCode])},getTarget().addEventListener("keyup",this._keyUpListener))},e.$title=function(e){document.title=e},e.$title.minArgs=1,e.$title.co_varnames=["title"],e.$listen=function(){this._createKeyUpListener(),this._createKeyDownListener()},e.$onkey=function(e,t){if("function"==typeof t){var n=e;e=t,t=n}t=String(t).toLowerCase(),e&&"function"==typeof e?(this._keyListeners||(this._keyListeners={}),this._keyListeners[t]=e):delete this._keyListeners[t]},e.$onkey.minArgs=2,e.$onkey.co_varnames=["method","keyValue"],e.$onscreenclick=function(e,t,n){this.getManager("mousedown").addHandler(e,n)},e.$onscreenclick.minArgs=1,e.$onscreenclick.co_varnames=["method","btn","add"],e.$ontimer=function(e,t){this._timer&&(window.clearTimeout(this._timer),this._timer=void 0),e&&"number"==typeof t&&(this._timer=window.setTimeout(e,Math.max(0,0|t)))},e.$ontimer.minArgs=0,e.$ontimer.co_varnames=["method","interval"]}(Screen.prototype);var g=new Image;function removeLayer(e){e&&e.canvas&&e.canvas.parentNode&&e.canvas.parentNode.removeChild(e.canvas)}function clearLayer(e,t,n){e&&(e.save(),e.setTransform(1,0,0,1,0,0),t?(e.fillStyle=t,e.fillRect(0,0,e.canvas.width,e.canvas.height)):e.clearRect(0,0,e.canvas.width,e.canvas.height),n&&e.drawImage(n,0,0),e.restore())}function drawTurtle(e,t){var n,r,i,s=d[e.shape],a=getScreen(),o=(getWidth(),getHeight(),a.xScale),l=a.yScale;if(t){if(n=Math.cos(e.radians)/o,r=Math.sin(e.radians)/l,i=Math.atan2(r,n)-Math.PI/2,t.save(),t.translate(e.x,e.y),t.scale(o,l),s.nodeName){var u=s.naturalWidth,c=s.naturalHeight;t.drawImage(s,0,0,u,c,-u/2,-c/2,u,c)}else{t.rotate(i),t.beginPath(),t.lineWidth=1,t.strokeStyle=e.color,t.fillStyle=e.fill,t.moveTo(-s[0][0],s[0][1]);for(var h=1;ho)throw u=l===o?"exactly "+o:"between "+l+" and "+o,new Sk.builtin.TypeError(a+"() takes "+u+" positional argument(s) ("+d.length+" given)");for(e=d.length;--e>=0;)void 0!==d[e]&&(d[e]instanceof Sk.builtin.func?d[e]=pythonToJavascriptFunction(d[e]):d[e]instanceof Sk.builtin.method?d[e]=pythonToJavascriptFunction(d[e].im_func,d[e].im_self):d[e]&&d[e].$d instanceof Sk.builtin.dict&&d[e].instance?d[e]=d[e].instance:d[e]=Sk.ffi.remapToJs(d[e]));var _=d.slice(0);for(d=[],e=_.length;e>=0;--e)null!==_[e]&&(d[e]=_[e]);try{t=f[n].apply(f,d)}catch(g){throw window&&window.console&&(window.console.log("wrapped method failed"),window.console.log(g.stack)),g}return t instanceof InstantPromise&&(t=t.lastResult),t instanceof Promise?(t=t.catch((function(e){throw window&&window.console&&(window.console.log("promise failed"),window.console.log(e.stack)),e})),(i=new Sk.misceval.Suspension).resume=function(){return void 0===s?Sk.builtin.none.none$:Sk.ffi.remapToPy(s)},i.data={type:"Sk.promise",promise:t.then((function(e){return s=e,e}))},i):void 0===t?Sk.builtin.none.none$:h?t:"function"==typeof c?c(t):Sk.ffi.remapToPy(t)},i.co_name=new Sk.builtin.str(a),i.co_varnames=u.slice(),i.$defaults=[];for(var d=l;d")})),e.__iter__=new Sk.builtin.func((function(n){var e=n.lineList;return Sk.builtin.makeGenerator((function(){if(!(this.$index>=this.$lines.length))return new Sk.builtin.str(this.$lines[this.$index++])}),{$obj:n,$index:0,$lines:e})})),e.read=new Sk.builtin.func((function(n,e){if(n.closed)throw new Sk.builtin.ValueError("I/O operation on closed file");var i=n.data$.length;void 0===e&&(e=i);var t=new Sk.builtin.str(n.data$.substr(n.pos$,e));return n.pos$+=e,n.pos$>=i&&(n.pos$=i),t})),e.readline=new Sk.builtin.func((function(n,e){var i="";return n.currentLinee===o)).length)throw new i("one of the hex, bytes, bytes_le, fields, or int arguments must be given");if(u!==o){u=u.toString().replace("urn:","").replace("uuid:","");let e=0,i=u.length-1;for(;"{}".indexOf(u[e])>=0;)e++;for(;"{}".indexOf(u[i])>=0;)i--;if(u=u.slice(e,i+1),u=u.replace(S,""),32!==u.length)throw new s("badly formed hexadecimal UUID string");f=d(n,[new t(u),U])}if(c!==o){if(!(c instanceof e))throw new i("bytes_le should be a bytes instance");if(c=c.valueOf(),16!==c.length)throw new s("bytes_le is not a 16-char string");h=switchBytesBytesLe(c),h=new e(h)}if(h!==o){if(!(h instanceof e))throw new i("bytes_le should be a bytes instance");if(16!==h.valueOf().length)throw new s("bytes is not a 16-char string");f=d(w,[h],["byteorder",v])}if(p!==o)throw new r("fields argument is not yet supported");if(f!==o&&(g(f,_,"Lt")||((e,t)=>g(e,t,"GtE"))(f,y)))throw new s("int is out of range (need a 128-bit value)");this.$int=f,this.$isSafe=I},tp$str(){const e=E.nb$remainder(this.$int).toString();return new t(`${e.slice(0,8)}-${e.slice(8,12)}-${e.slice(12,16)}-${e.slice(16,20)}-${e.slice(20)}`)},$r(){const e=u(this.ob$type,t.$name),n=c(this.tp$str());return new t(`${e}(${n})`)},tp$hash(){return this.$int.tp$hash()},tp$richcompare(e,t){return e instanceof R?this.$int.tp$richcompare(e.$int,t):l},tp$as_number:!0,nb$int(){return this.$int}},getsets:{int:{$get(){return this.$int}},is_safe:{$get(){return this.$isSafe}},bytes:{$get(){return d(b,[this.$int,U,v])}},bytes_le:{$get(){const n=this.tp$getattr(new t("bytes")).valueOf();return new e(switchBytesBytesLe(n))}},fields:{$get:()=>notImplemented()},time_low:{$get:()=>notImplemented()},time_mid:{$get:()=>notImplemented()},time_hi_version:{$get:()=>notImplemented()},clock_seq_hi_variant:{$get:()=>notImplemented()},clock_seq_low:{$get:()=>notImplemented()},time:{$get:()=>notImplemented()},clock_seq:{$get:()=>notImplemented()},node:{$get:()=>notImplemented()},hex:{$get(){return E.nb$remainder(this.$int)}},urn:{$get(){return new t(`urn:uuid:${this}`)}},variant:{$get:()=>notImplemented()},version:{$get:()=>notImplemented()}}});return h("uuid",p,{uuid1:{$meth(){notImplemented()},$flags:{FastCall:!0}},uuid2:{$meth(){notImplemented()},$flags:{FastCall:!0}},uuid3:{$meth(){notImplemented()},$flags:{FastCall:!0}},uuid4:{$meth(){const t=new e(f.getRandomValues(new Uint8Array(16)));return d(R,[],["bytes",t,"version",I])},$flags:{NoArgs:!0}},uuid5:{$meth(){notImplemented()},$flags:{FastCall:!0}}}),p}',"src/lib/webbrowser.js":'var $builtinmodule=function(n){var e={},t="undefined"!=typeof window&&"undefined"!=typeof window.navigator;function open_tab(n){return Sk.builtin.pyCheckType("url","string",Sk.builtin.checkString(n)),t?(n=n.$jsstr(),window.open(n,"_blank"),Sk.builtin.bool.true$):Sk.builtin.bool.false$}return e.__name__=new Sk.builtin.str("webbrowser"),e.open=new Sk.builtin.func((function open(n){return Sk.builtin.pyCheckArgsLen("open",arguments.length+1,1,3),open_tab(n)})),e.open_new=new Sk.builtin.func((function open_new(n){return Sk.builtin.pyCheckArgsLen("open_new",arguments.length,1,1),open_tab(n)})),e.open_new_tab=new Sk.builtin.func((function open_new_tab(n){return Sk.builtin.pyCheckArgsLen("open_new_tab",arguments.length,1,1),open_tab(n)})),e.DefaultBrowser=Sk.misceval.buildClass(e,(function dflbrowser(n,e){e.__init__=new Sk.builtin.func((function __init__(n){return Sk.builtin.none.none$})),e.open=new Sk.builtin.func((function open(n,e){return Sk.builtin.pyCheckArgsLen("open",arguments.length,2,4),open_tab(e)})),e.open_new=new Sk.builtin.func((function open_new(n,e){return Sk.builtin.pyCheckArgsLen("open_new",arguments.length,2,2),open_tab(e)})),e.open_new_tab=new Sk.builtin.func((function open_new_tab(n,e){return Sk.builtin.pyCheckArgsLen("open_new_tab",arguments.length,2,2),open_tab(e)}))}),"DefaultBrowser",[]),e.get=new Sk.builtin.func((function get(){return Sk.builtin.pyCheckArgsLen("get",arguments.length,0,1),Sk.misceval.callsimArray(e.DefaultBrowser,[])})),e};',"src/lib/webgl/__init__.js":`var $builtinmodule=function(n){var t={__name__:new Sk.builtin.str("webgl")},makeFailHTML=function(n){return'
'+n+"
"},e='This page requires a browser that supports WebGL.
Click here to upgrade your browser.';return t.Context=Sk.misceval.buildClass(t,(function(n,t){t.__init__=new Sk.builtin.func((function(n,t){var i=document.getElementById(t.v),r=function(n,t){var i=document.getElementById(n);if(t||(t=i.getElementsByTagName("canvas")[0]),t){var r=function(n){for(var t=["webgl","experimental-webgl","webkit-3d","moz-webgl"],e=null,i=0;i7||7==a.Chrome[0]&&a.Chrome[1]>0||7==a.Chrome[0]&&0==a.Chrome[1]&&a.Chrome[2]>=521)?i.innerHTML=makeFailHTML('It doesn\\'t appear your computer can support WebGL.
Click here for more information.'):i.innerHTML=makeFailHTML(e)}return r}i.innerHTML=makeFailHTML(e)}(t.v,i);if(!r)throw new Error("Your browser does not appear to support WebGL.");for(var u in n.gl=r,r.__proto__)if("number"==typeof r.__proto__[u])Sk.abstr.objectSetItem(n.$d,new Sk.builtin.str(u),r.__proto__[u]);else if("function"==typeof r.__proto__[u])switch(u){case"bufferData":case"clearColor":case"drawArrays":case"getAttribLocation":case"getUniformLocation":case"shaderSource":case"uniformMatrix4fv":case"vertexAttribPointer":case"viewport":break;default:!function(t){Sk.abstr.objectSetItem(n.$d,new Sk.builtin.str(u),new Sk.builtin.func((function(){var n=r.__proto__[t];return n.apply(r,arguments)})))}(u)}r.clearColor(100/255,149/255,237/255,1),r.clear(r.COLOR_BUFFER_BIT)})),t.tp$getattr=Sk.generic.getAttr,t.bufferData=new Sk.builtin.func((function(n,t,e,i){n.gl.bufferData(t,e.v,i)})),t.clearColor=new Sk.builtin.func((function(n,t,e,i,r){n.gl.clearColor(Sk.builtin.asnum$(t),Sk.builtin.asnum$(e),Sk.builtin.asnum$(i),Sk.builtin.asnum$(r))})),t.getAttribLocation=new Sk.builtin.func((function(n,t,e){return n.gl.getAttribLocation(t,e.v)})),t.getUniformLocation=new Sk.builtin.func((function(n,t,e){return n.gl.getUniformLocation(t,e.v)})),t.shaderSource=new Sk.builtin.func((function(n,t,e){n.gl.shaderSource(t,e.v)})),t.drawArrays=new Sk.builtin.func((function(n,t,e,i){n.gl.drawArrays(Sk.builtin.asnum$(t),Sk.builtin.asnum$(e),Sk.builtin.asnum$(i))})),t.vertexAttribPointer=new Sk.builtin.func((function(n,t,e,i,r,u,a){n.gl.vertexAttribPointer(t,Sk.builtin.asnum$(e),Sk.builtin.asnum$(i),r,Sk.builtin.asnum$(u),Sk.builtin.asnum$(a))})),t.viewport=new Sk.builtin.func((function(n,t,e,i,r){n.gl.viewport(Sk.builtin.asnum$(t),Sk.builtin.asnum$(e),Sk.builtin.asnum$(i),Sk.builtin.asnum$(r))})),t.uniformMatrix4fv=new Sk.builtin.func((function(n,t,e,i){n.gl.uniformMatrix4fv(Sk.builtin.asnum$(t),e,i.v)})),t.setDrawFunc=new Sk.builtin.func((function(n,t){var e=(new Date).getTime();setInterval((function(){Sk.misceval.callsimArray(t,[n,(new Date).getTime()-e])}),1e3/60)}))}),"Context",[]),t.Float32Array=Sk.misceval.buildClass(t,(function(n,t){t.__init__=new Sk.builtin.func((function(n,t){n.v="number"==typeof t?new Float32Array(t):new Float32Array(Sk.ffi.remapToJs(t))})),t.__repr__=new Sk.builtin.func((function(n){for(var t=[],e=0;e0&&(i=(l/=v)*l,a=(s/=v)*s,c=(m/=v)*m,u=l*s,r=s*m,f=m*l,o=l*_,k=s*_,S=m*_,y=1-w,(b=Sk.misceval.callsimArray(n.Mat44)).elements[0]=y*i+w,b.elements[1]=y*u-S,b.elements[2]=y*f+k,b.elements[3]=0,b.elements[4]=y*u+S,b.elements[5]=y*a+w,b.elements[6]=y*r-o,b.elements[7]=0,b.elements[8]=y*f-k,b.elements[9]=y*r+o,b.elements[10]=y*c+w,b.elements[11]=0,b.elements[12]=0,b.elements[13]=0,b.elements[14]=0,b.elements[15]=1,b=b.multiply(e),e.elements=b.elements);return e})),t.multiply=new Sk.builtin.func((function(e,t){for(var l=Sk.misceval.callsimArray(n.Mat44),s=0;s<4;s++)l.elements[4*s+0]=e.elements[4*s+0]*t.elements[0]+e.elements[4*s+1]*t.elements[4]+e.elements[4*s+2]*t.elements[8]+e.elements[4*s+3]*t.elements[12],l.elements[4*s+1]=e.elements[4*s+0]*t.elements[1]+e.elements[4*s+1]*t.elements[5]+e.elements[4*s+2]*t.elements[9]+e.elements[4*s+3]*t.elements[13],l.elements[4*s+2]=e.elements[4*s+0]*t.elements[2]+e.elements[4*s+1]*t.elements[6]+e.elements[4*s+2]*t.elements[10]+e.elements[4*s+3]*t.elements[14],l.elements[4*s+3]=e.elements[4*s+0]*t.elements[3]+e.elements[4*s+1]*t.elements[7]+e.elements[4*s+2]*t.elements[11]+e.elements[4*s+3]*t.elements[15];return e.elements=l.elements,e})),t.lookAt=new Sk.builtin.func((function(e,t,l,s,m,i,a,c,u,r){var f=[t-m,l-i,s-a],o=Math.sqrt(f[0]*f[0]+f[1]*f[1]+f[2]*f[2]);o&&(f[0]/=o,f[1]/=o,f[2]/=o);var k=[c,u,r],S=[];S[0]=k[1]*f[2]-k[2]*f[1],S[1]=-k[0]*f[2]+k[2]*f[0],S[2]=k[0]*f[1]-k[1]*f[0],k[0]=f[1]*S[2]-f[2]*S[1],k[1]=-f[0]*S[2]+f[2]*S[0],k[2]=f[0]*S[1]-f[1]*S[0],(o=Math.sqrt(S[0]*S[0]+S[1]*S[1]+S[2]*S[2]))&&(S[0]/=o,S[1]/=o,S[2]/=o),(o=Math.sqrt(k[0]*k[0]+k[1]*k[1]+k[2]*k[2]))&&(k[0]/=o,k[1]/=o,k[2]/=o);var y=Sk.misceval.callsimArray(n.Mat44);return y.elements[0]=S[0],y.elements[4]=S[1],y.elements[8]=S[2],y.elements[12]=0,y.elements[1]=k[0],y.elements[5]=k[1],y.elements[9]=k[2],y.elements[13]=0,y.elements[2]=f[0],y.elements[6]=f[1],y.elements[10]=f[2],y.elements[14]=0,y.elements[3]=0,y.elements[7]=0,y.elements[11]=0,y.elements[15]=1,y=y.multiply(e),e.elements=y.elements,e.translate(-t,-l,-s),e}))}),"Mat44",[]),n.Mat33=Sk.misceval.buildClass(n,(function(e,n){n.__init__=new Sk.builtin.func((function(e){Sk.misceval.callsimArray(n.loadIdentity,[e])})),n.loadIdentity=new Sk.builtin.func((function(e){e.elements=[1,0,0,0,1,0,0,0,1]}))}),"Mat33",[]),n.Vec3=Sk.misceval.buildClass(n,(function(e,t){t.__init__=new Sk.builtin.func((function(e,n,t,l){e.x=n,e.y=t,e.z=l})),t.__sub__=new Sk.builtin.func((function(e,t){return Sk.misceval.callsimArray(n.Vec3,[e.x-t.x,e.y-t.y,e.z-t.z])}))}),"Vec3",[]),n.cross=new Sk.builtin.func((function(e,t){return Sk.asserts.assert(e instanceof n.Vec3&&t instanceof n.Vec3),Sk.misceval.callsimArray(n.Vec3,[e.y*t.z-e.z*t.y,e.z*t.x-e.x*t.z,e.x*t.y-e.y*t.x])})),n};',"src/lib/webgl/matrix4.js":"var $builtinmodule=function(n){var r={},t=new Float32Array(3),a=new Float32Array(3),u=new Float32Array(3),e=(new Float32Array(4),new Float32Array(4),new Float32Array(4),new Float32Array(16),new Float32Array(16),new Float32Array(16),function(n,r){for(var t=0,a=r.length,u=0;u1e-5)for(u=0;u{const n=e.$d;var r={},Buffer=function(t,e){var r=e||n.ARRAY_BUFFER,i=n.createBuffer();if(this.target=r,this.buf=i,this.set(t),this.numComponents_=t.numComponents,this.numElements_=t.numElements,this.totalComponents_=this.numComponents_*this.numElements_,t.buffer instanceof Float32Array)this.type_=n.FLOAT;else if(t.buffer instanceof Uint8Array)this.type_=n.UNSIGNED_BYTE;else if(t.buffer instanceof Int8Array)this.type_=n._BYTE;else if(t.buffer instanceof Uint16Array)this.type_=n.UNSIGNED_SHORT;else{if(!(t.buffer instanceof Int16Array))throw"unhandled type:"+typeof t.buffer;this.type_=n.SHORT}};return Buffer.prototype.set=function(t){n.bindBuffer(this.target,this.buf),n.bufferData(this.target,t.buffer,n.STATIC_DRAW)},Buffer.prototype.type=function(){return this.type_},Buffer.prototype.numComponents=function(){return this.numComponents_},Buffer.prototype.numElements=function(){return this.numElements_},Buffer.prototype.totalComponents=function(){return this.totalComponents_},Buffer.prototype.buffer=function(){return this.buf},Buffer.prototype.stride=function(){return 0},Buffer.prototype.offset=function(){return 0},r.Model=Sk.misceval.buildClass(r,(function(e,r){r.__init__=new Sk.builtin.func((function(e,r,i,f){e.buffers={};var setBuffer=function(t,r){var i="indices"==t?n.ELEMENT_ARRAY_BUFFER:n.ARRAY_BUFFER;let f=e.buffers[t];f?f.set(r):f=new Buffer(r,i),e.buffers[t]=f};for(t in i)setBuffer(t,i[t]);var o={},s=0;for(var u in f)o[u]=s++;e.mode=n.TRIANGLES,e.textures=f.v,e.textureUnits=o,e.shader=r})),r.drawPrep=new Sk.builtin.func((function(t,e){var r=t.shader,i=t.buffers,f=t.textures;for(var o in e=Sk.ffi.remapToJs(e),Sk.misceval.callsimArray(r.use,[r]),i){var s=i[o];if("indices"==o)n.bindBuffer(n.ELEMENT_ARRAY_BUFFER,s.buffer());else{var u=r.attrib[o];u&&u(s)}}for(var a in f){var m=t.textureUnits[a];r.setUniform$impl(r,f,m),f[a].bindToUnit(m)}for(var p in e)r.setUniform$impl(r,p,e[p])})),r.draw=new Sk.builtin.func((function(t,e,r){var i=t.shader;e=Sk.ffi.remapToJs(e);for(let n in e)i.setUniform$impl(i,n,e[n]);if(r)for(var f in r){var o=t.textureUnits[f];i.setUniform$impl(i,f,o),r[f].bindToUnit(o)}var s=t.buffers;n.drawElements(t.mode,s.indices.totalComponents(),n.UNSIGNED_SHORT,0)}))}),"Model",[]),r}))};',"src/lib/webgl/primitives.js":'var $builtinmodule=function(t){var n={},AttribBuffer=function(t,n,e){e=e||"Float32Array";var r=window[e];n.length?(this.buffer=new r(n),n=this.buffer.length/t,this.cursor=n):(this.buffer=new r(t*n),this.cursor=0),this.numComponents=t,this.numElements=n,this.type=e};return AttribBuffer.prototype.stride=function(){return 0},AttribBuffer.prototype.offset=function(){return 0},AttribBuffer.prototype.getElement=function(t){for(var n=t*this.numComponents,e=[],r=0;r"u")return null;if("currentScript"in document)return document.currentScript;try{throw new Error}catch(u){var c=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(u.stack)||[])[1];if(c){var o=document.getElementsByTagName("script");for(var d in o)if(o[d].src==c)return o[d]}return null}},isActive:function(c,o,d){for(var u="no-"+o;c;){var f=c.classList;if(f.contains(o))return!0;if(f.contains(u))return!1;c=c.parentElement}return!!d}},languages:{plain:g,plaintext:g,text:g,txt:g,extend:function(c,o){var d=e.util.clone(e.languages[c]);for(var u in o)d[u]=o[u];return d},insertBefore:function(c,o,d,u){var f=(u=u||e.languages)[c],$={};for(var m in f)if(f.hasOwnProperty(m)){if(m==o)for(var _ in d)d.hasOwnProperty(_)&&($[_]=d[_]);d.hasOwnProperty(m)||($[m]=f[m])}var v=u[c];return u[c]=$,e.languages.DFS(e.languages,function(A,N){N===v&&A!=c&&(this[A]=$)}),$},DFS:function c(o,d,u,f){f=f||{};var $=e.util.objId;for(var m in o)if(o.hasOwnProperty(m)){d.call(o,m,o[m],u||m);var _=o[m],v=e.util.type(_);v!=="Object"||f[$(_)]?v!=="Array"||f[$(_)]||(f[$(_)]=!0,c(_,d,m,f)):(f[$(_)]=!0,c(_,d,null,f))}}},plugins:{},highlightAll:function(c,o){e.highlightAllUnder(document,c,o)},highlightAllUnder:function(c,o,d){var u={callback:d,container:c,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};e.hooks.run("before-highlightall",u),u.elements=Array.prototype.slice.apply(u.container.querySelectorAll(u.selector)),e.hooks.run("before-all-elements-highlight",u);for(var f,$=0;f=u.elements[$++];)e.highlightElement(f,o===!0,u.callback)},highlightElement:function(c,o,d){var u=e.util.getLanguage(c),f=e.languages[u];e.util.setLanguage(c,u);var $=c.parentElement;$&&$.nodeName.toLowerCase()==="pre"&&e.util.setLanguage($,u);var m={element:c,language:u,grammar:f,code:c.textContent};function _(A){m.highlightedCode=A,e.hooks.run("before-insert",m),m.element.innerHTML=m.highlightedCode,e.hooks.run("after-highlight",m),e.hooks.run("complete",m),d&&d.call(m.element)}if(e.hooks.run("before-sanity-check",m),($=m.element.parentElement)&&$.nodeName.toLowerCase()==="pre"&&!$.hasAttribute("tabindex")&&$.setAttribute("tabindex","0"),!m.code)return e.hooks.run("complete",m),void(d&&d.call(m.element));if(e.hooks.run("before-highlight",m),m.grammar)if(o&&b.Worker){var v=new Worker(e.filename);v.onmessage=function(A){_(A.data)},v.postMessage(JSON.stringify({language:m.language,code:m.code,immediateClose:!0}))}else _(e.highlight(m.code,m.grammar,m.language));else _(e.util.encode(m.code))},highlight:function(c,o,d){var u={code:c,grammar:o,language:d};if(e.hooks.run("before-tokenize",u),!u.grammar)throw new Error('The language "'+u.language+'" has no grammar.');return u.tokens=e.tokenize(u.code,u.grammar),e.hooks.run("after-tokenize",u),i.stringify(e.util.encode(u.tokens),u.language)},tokenize:function(c,o){var d=o.rest;if(d){for(var u in d)o[u]=d[u];delete o.rest}var f=new l;return h(f,f.head,c),r(c,f,o,f.head,0),function($){for(var m=[],_=$.head.next;_!==$.tail;)m.push(_.value),_=_.next;return m}(f)},hooks:{all:{},add:function(c,o){var d=e.hooks.all;d[c]=d[c]||[],d[c].push(o)},run:function(c,o){var d=e.hooks.all[c];if(d&&d.length)for(var u,f=0;u=d[f++];)u(o)}},Token:i};function i(c,o,d,u){this.type=c,this.content=o,this.alias=d,this.length=0|(u||"").length}function n(c,o,d,u){c.lastIndex=o;var f=c.exec(d);if(f&&u&&f[1]){var $=f[1].length;f.index+=$,f[0]=f[0].slice($)}return f}function r(c,o,d,u,f,$){for(var m in d)if(d.hasOwnProperty(m)&&d[m]){var _=d[m];_=Array.isArray(_)?_:[_];for(var v=0;v<_.length;++v){if($&&$.cause==m+","+v)return;var A=_[v],N=A.inside,M=!!A.lookbehind,R=!!A.greedy,H=A.alias;if(R&&!A.pattern.global){var ee=A.pattern.toString().match(/[imsuy]*$/)[0];A.pattern=RegExp(A.pattern.source,ee+"g")}for(var Y=A.pattern||A,k=u.next,x=f;k!==o.tail&&!($&&x>=$.reach);x+=k.value.length,k=k.next){var C=k.value;if(o.length>c.length)return;if(!(C instanceof i)){var F,P=1;if(R){if(!(F=n(Y,x,c,M))||F.index>=c.length)break;var L=F.index,U=F.index+F[0].length,K=x;for(K+=k.value.length;L>=K;)K+=(k=k.next).value.length;if(x=K-=k.value.length,k.value instanceof i)continue;for(var te=k;te!==o.tail&&(K$.reach&&($.reach=ce);var J=k.prev;if(oe&&(J=h(o,J,oe),x+=oe.length),a(o,J,P),k=h(o,J,new i(m,N?e.tokenize(Z,N):Z,H,Z)),ie&&h(o,k,ie),P>1){var pe={cause:m+","+v,reach:ce};r(c,o,d,k.prev,x,pe),$&&pe.reach>$.reach&&($.reach=pe.reach)}}}}}}function l(){var c={value:null,prev:null,next:null},o={value:null,prev:c,next:null};c.next=o,this.head=c,this.tail=o,this.length=0}function h(c,o,d){var u=o.next,f={value:d,prev:o,next:u};return o.next=f,u.prev=f,c.length++,f}function a(c,o,d){for(var u=o.next,f=0;f"+f.content+""},!b.document)return b.addEventListener&&(e.disableWorkerMessageHandler||b.addEventListener("message",function(c){var o=JSON.parse(c.data),d=o.language,u=o.code,f=o.immediateClose;b.postMessage(e.highlight(u,e.languages[d],d)),f&&b.close()},!1)),e;var S=e.util.currentScript();function t(){e.manual||e.highlightAll()}if(S&&(e.filename=S.src,S.hasAttribute("data-manual")&&(e.manual=!0)),!e.manual){var s=document.readyState;s==="loading"||s==="interactive"&&S&&S.defer?document.addEventListener("DOMContentLoaded",t):window.requestAnimationFrame?window.requestAnimationFrame(t):window.setTimeout(t,16)}return e}(vn);typeof module<"u"&&module.exports&&(module.exports=ne),typeof global<"u"&&(global.Prism=ne);ne.languages.markup={comment:{pattern://,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern://i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},ne.languages.markup.tag.inside["attr-value"].inside.entity=ne.languages.markup.entity,ne.languages.markup.doctype.inside["internal-subset"].inside=ne.languages.markup,ne.hooks.add("wrap",function(b){b.type==="entity"&&(b.attributes.title=b.content.replace(/&/,"&"))}),Object.defineProperty(ne.languages.markup.tag,"addInlined",{value:function(b,w){var p={};p["language-"+w]={pattern:/(^$)/i,lookbehind:!0,inside:ne.languages[w]},p.cdata=/^$/i;var g={"included-cdata":{pattern://i,inside:p}};g["language-"+w]={pattern:/[\s\S]+/,inside:ne.languages[w]};var e={};e[b]={pattern:RegExp("(<__[^>]*>)(?:))*\\]\\]>|(?!)".replace(/__/g,function(){return b}),"i"),lookbehind:!0,greedy:!0,inside:g},ne.languages.insertBefore("markup","cdata",e)}}),Object.defineProperty(ne.languages.markup.tag,"addAttribute",{value:function(b,w){ne.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(`(^|["'\\s])(?:`+b+`)\\s*=\\s*(?:"[^"]*"|'[^']*'|[^\\s'">=]+(?=[\\s>]))`,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[w,"language-"+w],inside:ne.languages[w]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),ne.languages.html=ne.languages.markup,ne.languages.mathml=ne.languages.markup,ne.languages.svg=ne.languages.markup,ne.languages.xml=ne.languages.extend("markup",{}),ne.languages.ssml=ne.languages.xml,ne.languages.atom=ne.languages.xml,ne.languages.rss=ne.languages.xml;(function(b){var w=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;b.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp(`@[\\w-](?:[^;{\\s"']|\\s+(?!\\s)|`+w.source+")*?(?:;|(?=\\s*\\{))"),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+w.source+`|(?:[^\\\\\r -()"']|\\\\[^])*)\\)`,"i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+w.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+w.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:w,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},b.languages.css.atrule.inside.rest=b.languages.css;var p=b.languages.markup;p&&(p.tag.addInlined("style","css"),p.tag.addAttribute("style","css"))})(ne);ne.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/};ne.languages.javascript=ne.languages.extend("clike",{"class-name":[ne.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp("(^|[^\\w$])(?:NaN|Infinity|0[bB][01]+(?:_[01]+)*n?|0[oO][0-7]+(?:_[0-7]+)*n?|0[xX][\\dA-Fa-f]+(?:_[\\dA-Fa-f]+)*n?|\\d+(?:_\\d+)*n|(?:\\d+(?:_\\d+)*(?:\\.(?:\\d+(?:_\\d+)*)?)?|\\.\\d+(?:_\\d+)*)(?:[Ee][+-]?\\d+(?:_\\d+)*)?)(?![\\w$])"),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),ne.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,ne.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(`((?:^|[^$\\w\\xA0-\\uFFFF."'\\])\\s]|\\b(?:return|yield))\\s*)/(?:(?:\\[(?:[^\\]\\\\\r +`,"src/builtin/sys.js":'var $builtinmodule=function(i){var t,n={},e=[],u=Sk.getSysArgv();for(t=0;tnew Sk.builtin.str("utf-8"))),n.getExecutionLimit=new Sk.builtin.func((function(){return null===Sk.execLimit?Sk.builtin.none.none$:new Sk.builtin.int_(Sk.execLimit)})),n.setExecutionLimit=new Sk.builtin.func((function(i){if(null===Sk.execLimit)throw new Sk.builtin.NotImplementedError("Execution limiting is not enabled");void 0!==i&&(Sk.execLimit=Sk.builtin.asnum$(i))})),n.resetTimeout=new Sk.builtin.func((function(){Sk.execStart=new Date})),n.getYieldLimit=new Sk.builtin.func((function(){return null===Sk.yieldLimit?Sk.builtin.none.none$:new Sk.builtin.int_(Sk.yieldLimit)})),n.setYieldLimit=new Sk.builtin.func((function(i){if(null===Sk.yieldLimit)throw new Sk.builtin.NotImplementedError("Yielding is not enabled");void 0!==i&&(Sk.yieldLimit=Sk.builtin.asnum$(i))})),n.debug=new Sk.builtin.func((function(){return Sk.builtin.none.none$}));const o=Sk.builtin.make_structseq("sys","float_info",{max:"DBL_MAX -- maximum representable finite float",max_exp:"DBL_MAX_EXP -- maximum int e such that radix**(e-1) is representable",max_10_exp:"DBL_MAX_10_EXP -- maximum int e such that 10**e is representable",min:"DBL_MIN -- Minimum positive normalized float",min_exp:"DBL_MIN_EXP -- minimum int e such that radix**(e-1) is a normalized float",min_10_exp:"DBL_MIN_10_EXP -- minimum int e such that 10**e is a normalized",dig:"DBL_DIG -- digits",mant_dig:"DBL_MANT_DIG -- mantissa digits",epsilon:"DBL_EPSILON -- Difference between 1 and the next representable float",radix:"FLT_RADIX -- radix of exponent",rounds:"FLT_ROUNDS -- rounding mode"});n.float_info=new o([Number.MAX_VALUE,Math.floor(Math.log2(Number.MAX_VALUE)),Math.floor(Math.log10(Number.MAX_VALUE)),Number.MIN_VALUE,Math.ceil(Math.log2(Number.MIN_VALUE)),Math.ceil(Math.log10(Number.MIN_VALUE)),15,Math.log2(Number.MAX_SAFE_INTEGER),Number.EPSILON,2,1].map((i=>Sk.ffi.remapToPy(i))));const s=Sk.builtin.make_structseq("sys","int_info",{bits_per_digit:"size of a digit in bits",sizeof_digit:"size in bytes of the C type used to represent a digit"});n.int_info=new s([30,4].map((i=>Sk.ffi.remapToPy(i))));const l=Sk.builtin.make_structseq("sys","hash_info",{width:"width of the type used for hashing, in bits",modulus:"prime number giving the modulus on which the hash function is based",inf:"value to be used for hash of a positive infinity",nan:"value to be used for hash of a nan",imag:"multiplier used for the imaginary part of a complex number",algorithm:"name of the algorithm for hashing of str, bytes and memoryviews",hash_bits:"internal output size of hash algorithm",seed_bits:"seed size of hash algorithm",cutoff:"small string optimization cutoff"});return n.hash_info=new l([32,536870911,314159,0,1000003,"siphash24",32,128,0].map((i=>Sk.ffi.remapToPy(i)))),n.__stdout__=new Sk.builtin.file(new Sk.builtin.str("/dev/stdout"),new Sk.builtin.str("w")),n.__stdin__=new Sk.builtin.file(new Sk.builtin.str("/dev/stdin"),new Sk.builtin.str("r")),n.stdout=n.__stdout__,n.stdin=n.__stdin__,n};',"src/lib/_strptime.js":`function $builtinmodule(){const e=Sk.builtin.int_,t=Sk.builtin.none.none$,i=Sk.builtin.str,s=Sk.builtin.tuple,n=Sk.misceval.callsimOrSuspendArray,{isTrue:a,richCompareBool:r,chain:l}=Sk.misceval,{typeName:o,setUpModuleMethods:_,buildNativeClass:c}=Sk.abstr,{TypeError:m,ValueError:d,KeyError:h,IndexError:f,checkString:u,asnum$:w}=Sk.builtin,{remapToPy:p,remapToJs:g}=Sk.ffi,{getAttr:$,setAttr:y}=Sk.generic,S=l,k=/^[0-9]+$/;function _as_integer(e){if(!k.test(e))throw new d(\`invalid literal for int() with base 10: '\${e}'\`);return parseInt(e)}const b=/([\\\\.^$*+?\\(\\){}\\[\\]|])/g,v=/\\s+/g;let O=Sk.importModule("time",!1,!0),z=Sk.importModule("datetime",!1,!0);const L=S(z,(e=>(z=e.$d,O)),(e=>{O=e.$d}));return S(L,(()=>{function _strftime(e){return t=>e.$strftime(t).toString().toLowerCase()}function _strftime_timetuple(e,t){return O.strftime.tp$call([new i(e),t]).toString().toLowerCase()}const l=new i("fromordinal");function _struct_time(t){return O.struct_time.tp$call([new s(t.map((t=>new e(t))))])}function _localized_month(){const e=[()=>""];for(let t=0;t<12;t++){const i=new k(2001,t+1,1);e.push(_strftime(i))}return e}function _localized_day(){const e=[];for(let t=0;t<7;t++){const i=new k(2001,1,t+1);e.push(_strftime(i))}return e}const S={__name__:new i("_strptime")},k=z.date,L=z.timedelta,E=z.timezone;function _getlang(){return[t,t]}class LocaleTime{constructor(){this.lang=_getlang(),this.__calc_weekday(),this.__calc_month(),this.__calc_am_pm(),this.__calc_timezone(),this.__calc_date_time()}__calc_weekday(){this.a_weekday=_localized_day().map((e=>e("%a"))),this.f_weekday=_localized_day().map((e=>e("%A")))}__calc_month(){this.a_month=_localized_month().map((e=>e("%b"))),this.f_month=_localized_month().map((e=>e("%B")))}__calc_am_pm(){const e=[];[1,22].forEach((t=>{const i=_strftime_timetuple("%p",_struct_time([1999,3,17,t,44,55,2,76,0]));e.push(i)})),this.am_pm=e}__calc_date_time(){const e=_struct_time([1999,3,17,22,44,55,2,76,0]),i=[t,t,t];i[0]=_strftime_timetuple("%c",e),i[1]=_strftime_timetuple("%x",e),i[2]=_strftime_timetuple("%X",e);const s=[["%","%%"],[this.f_weekday[2],"%A"],[this.f_month[3],"%B"],[this.a_weekday[2],"%a"],[this.a_month[3],"%b"],[this.am_pm[1],"%p"],["1999","%Y"],["99","%y"],["22","%H"],["44","%M"],["55","%S"],["76","%j"],["17","%d"],["03","%m"],["3","%m"],["2","%w"],["10","%I"]];s.push(...this.timezone.flat().map((e=>[e,"%Z"]))),[[0,"%c"],[1,"%x"],[2,"%X"]].forEach((([e,t])=>{let n=i[e];s.forEach((([e,t])=>{e&&(n=n.replace(e,t))}));let a;a=_strftime_timetuple(t,_struct_time([1999,1,3,1,1,1,6,3,0])).includes("00")?"%W":"%U",i[e]=n.replace("11",a)})),this.LC_date_time=i[0],this.LC_date=i[1],this.LC_time=i[2]}__calc_timezone(){try{O.tzset.tp$call([])}catch{}this.tzname=O.tzname.v.map((e=>e.toString())),this.daylight=w(O.daylight);const e=[this.tzname[0].toLowerCase(),"utc","gmt"];let t;t=this.daylight?[this.tzname[1].toLowerCase()]:[],this.timezone=[e,t]}}class TimeRE{constructor(e=null){this.locale_time=e||new LocaleTime,Object.assign(this,{d:"(?3[0-1]|[1-2]\\\\d|0[1-9]|[1-9]| [1-9])",f:"(?[0-9]{1,6})",H:"(?2[0-3]|[0-1]\\\\d|\\\\d)",I:"(?1[0-2]|0[1-9]|[1-9])",G:"(?\\\\d\\\\d\\\\d\\\\d)",j:"(?36[0-6]|3[0-5]\\\\d|[1-2]\\\\d\\\\d|0[1-9]\\\\d|00[1-9]|[1-9]\\\\d|0[1-9]|[1-9])",m:"(?1[0-2]|0[1-9]|[1-9])",M:"(?[0-5]\\\\d|\\\\d)",S:"(?6[0-1]|[0-5]\\\\d|\\\\d)",U:"(?5[0-3]|[0-4]\\\\d|\\\\d)",w:"(?[0-6])",u:"(?[1-7])",V:"(?5[0-3]|0[1-9]|[1-4]\\\\d|\\\\d)",y:"(?\\\\d\\\\d)",Y:"(?\\\\d\\\\d\\\\d\\\\d)",z:"(?[+-]\\\\d\\\\d:?[0-5]\\\\d(:?[0-5]\\\\d(\\\\.\\\\d{1,6})?)?|Z)",A:this.__seqToRE(this.locale_time.f_weekday,"A"),a:this.__seqToRE(this.locale_time.a_weekday,"a"),B:this.__seqToRE(this.locale_time.f_month.slice(1),"B"),b:this.__seqToRE(this.locale_time.a_month.slice(1),"b"),p:this.__seqToRE(this.locale_time.am_pm,"p"),Z:this.__seqToRE(this.locale_time.timezone.flat(),"Z"),"%":"%"}),this.W=this.U.replace("U","W"),this.x=this.pattern(this.locale_time.LC_date),this.X=this.pattern(this.locale_time.LC_time),this.c=this.pattern(this.locale_time.LC_date_time)}__seqToRE(e,t){if((e=e.slice(0).sort(((e,t)=>t.length-e.length))).every((e=>""===e)))return"";return\`(?<\${t}>\${e.map((e=>e)).join("|")})\`}pattern(e){let t="";for(e=(e=e.replace(b,"\\\\$1")).replace(v,"\\\\s+");e.includes("%");){const i=e.indexOf("%")+1,s=this[e[i]];if(void 0===s)throw new h(e[i]);t=\`\${t}\${e.slice(0,i-1)}\${s}\`,e=e.slice(i+1)}return t+e}compile(e){return new RegExp("^"+this.pattern(e),"i")}}let C=new TimeRE;let T={};function _strptime(i,s="%a %b %d %H:%M:%S %Y"){function _checkString(e,t){if("string"!=typeof e&&!u(e))throw new m(\`strptime() argument \${t} must be a str, not '\${o(e)}'\`)}_checkString(i,0),_checkString(s,1),i=i.toString(),s=s.toString();let n,_=C.locale_time;if(Object.keys(T).length>5&&(T={}),n=T[s],void 0===n)try{n=C.compile(s)}catch(R){if(R instanceof h){let e=R.args.v[0];throw"\\\\"==e&&(e="%"),new d(\`'\${e}' is a bad directive in format '\${s}'\`)}if(R instanceof f)throw new d("stray %% in format '"+s+"'");throw R}const c=i.match(n);if(null===c)throw new d(\`time data '\${i}' does not match format '\${s}'\`);if(i.length!==c[0].length)throw new d(\`unconverted data remains: \${i.slice(c[0].length)}\`);let w=t,p=t,g=1,$=1,y=0,S=0,b=0,v=0,z=-1,L=t,E=0,A=t,I=t,M=t,H=t,Y=t,j=c.groups||{};if(Object.keys(j).forEach((e=>{if(void 0!==j[e])if("y"===e)p=_as_integer(j.y),p+=p<=68?2e3:1900;else if("Y"===e)p=_as_integer(j.Y);else if("G"===e)w=_as_integer(j.G);else if("m"===e)g=_as_integer(j.m);else if("B"===e)g=_.f_month.indexOf(j.B.toLowerCase());else if("b"===e)g=_.a_month.indexOf(j.b.toLowerCase());else if("d"===e)$=_as_integer(j.d);else if("H"===e)y=_as_integer(j.H);else if("H"===e)y=_as_integer(j.H);else if("I"===e){y=_as_integer(j.I);const e=(j.p||"").toLowerCase();["",_.am_pm[0]].includes(e)?12===y&&(y=0):e===_.am_pm[1]&&12!==y&&(y+=12)}else if("M"===e)S=_as_integer(j.M);else if("S"===e)b=_as_integer(j.S);else if("f"===e){let e=j.f;e+="0".repeat(6-e.length),v=_as_integer(e)}else if("A"===e)H=_.f_weekday.indexOf(j.A.toLowerCase());else if("a"===e)H=_.a_weekday.indexOf(j.a.toLowerCase());else if("w"===e)H=_as_integer(j.w),0===H?H=6:H-=1;else if("u"===e)H=_as_integer(j.u),H-=1;else if("j"===e)Y=_as_integer(j.j);else if(["U","W"].includes(e))I=_as_integer(j[e]),M="U"===e?6:0;else if("V"===e)A=_as_integer(j.V);else if("z"===e){let e=j.z;if("Z"===e)L=0;else{if(":"===e[3]&&(e=e.slice(0,3)+e.slice(4),e.length>5)){if(":"!==e[5]){const e=\`Inconsistent use of : in \${j.z}\`;throw new d(e)}e=e.slice(0,5)+e.slice(6)}const t=_as_integer(e.slice(1,3)),i=_as_integer(e.slice(3,5)),s=_as_integer(e.slice(5,7)||0);L=3600*t+60*i+s;const n=e.slice(8),a="0".repeat(6-n.length);E=_as_integer(n+a),e.startsWith("-")&&(L=-L,E=-E)}}else if("Z"===e){let e=j.Z.toLowerCase(),t=0;for(let i of _.timezone){if(i.includes(e)){const i=O.tzname.v;if(r(i[0],i[1],"Eq")&&a(O.daylight)&&!["utc","gmt"].includes(e))break;z=t}t++}}})),p===t&&w!==t){if(A===t||H===t)throw new d("ISO year directive '%G' must be used with the ISO week directive '%V' and a weekday directive ('%A','%a', '%w', or '%u').");if(Y!==t)throw new d("Day of the year directive '%j' is not compatible with ISO year directive '%G'.Use '%Y' instead.")}else if(I===t&&A!==t)throw new d(H===t?"ISO week directive '%V' must be used with the ISO year directive '%G' and a weekday directive ('%A', '%a', '%w', or '%u').":"ISO week directive '%V' is incompatible with the year directive '%Y'. Use the ISO year '%G' instead.");let U=!1;if(p===t&&2===g&&29===$?(p=1904,U=!0):p===t&&(p=1900),Y===t&&H!==t){if(I!==t){Y=function _calc_julian_from_U_or_W(e,t,i,s){let n=(new k(e,1,1).$toOrdinal()+6)%7;return s||(n=(n+1)%7,i=(i+1)%7),0===t?1+i-n:(7-n)%7+7*(t-1)+1+i}(p,I,H,0===M)}else w!==t&&A!==t&&([p,Y]=function _calc_julian_from_V(e,t,i){let s=7*t+i-((new k(e,1,4).$toOrdinal()%7||7)+3);return s<1&&(s+=new k(e,1,1).$toOrdinal(),s-=new k(e-=1,1,1).$toOrdinal()),[e,s]}(w,A,H+1));if(Y!==t&&Y<=0){p-=1;const e=function _is_leap(e){return e%4==0&&(e%100!=0||e%400==0)}(p)?366:365;Y+=e}}if(Y===t)Y=new k(p,g,$).$toOrdinal()-new k(p,1,1).$toOrdinal()+1;else{const t=function _fromordinal(t){return k.tp$getattr(l).tp$call([new e(t)])}(Y-1+new k(p,1,1).$toOrdinal());p=t.$year,g=t.$month,$=t.$day}H===t&&(H=(new k(p,g,$).$toOrdinal()+6)%7);const x=j.Z||t;return U&&(p=1900),[[p,g,$,y,S,b,H,Y,z,x,L],v,E]}return _("_strptime",S,{_strptime_time:{$meth:function _strptime_time(t,i="%a %b %d %H:%M:%S %Y"){let n=_strptime(t,i)[0].slice(0,11);return n=n.map(((t,i)=>i<9?new e(t):p(t))),O.struct_time.tp$call([new s(n)])},$flags:{NamedArgs:["data_string","format"],Defaults:["%a %b %d %H:%M:%S %Y"]}},_strptime_datetime:{$meth:function _strptime_datetime(s,r,l="%a %b %d %H:%M:%S %Y"){const[o,_,c]=_strptime(r,l),[m,d]=o.slice(-2),h=o.slice(0,6);let f,u;return h.push(_),h.map((t=>new e(t))),d!==t&&(f=new L(0,d,c),u=a(m)?new E(f,new i(m)):new E(f),h.push(u)),n(s,h)},$flags:{NamedArgs:["cls","data_string","format"],Defaults:["%a %b %d %H:%M:%S %Y"]}},_strptime:{$meth(i,n){const a=_strptime(i,n);return a[0]=new s(a[0].map((i=>i===t?i:new e(i)))),a[1]=new e(a[1]),a[2]=new e(a[2]),new s(a)},$flags:{NamedArgs:["data_string","format"],Defaults:["%a %b %d %H:%M:%S %Y"]}},_getlang:{$meth:()=>p(_getlang()),$flags:{NoArgs:!0}}}),S.LocaleTime=c("_strptime.LocaleTime",{constructor:function(){this.v=new LocaleTime},slots:{tp$getattr(e,t){return this.v.hasOwnProperty(e.toString())?p(this.v[e.toString()]):$.call(this,e,t)},tp$setattr(e,t){if(!this.v.hasOwnProperty(e.toString()))return y.call(this,e,t);this.v[e.toString()]=g(t)}}}),S}))}`,"src/lib/array.js":`function $builtinmodule(e){var n={},t=["c","b","B","u","h","H","i","I","l","L","f","d"];return n.__name__=new Sk.builtin.str("array"),n.array=Sk.misceval.buildClass(n,(function(e,n){n.__init__=new Sk.builtin.func((function(e,n,i){if(Sk.builtin.pyCheckArgsLen("__init__",arguments.length,2,3),-1==t.indexOf(Sk.ffi.remapToJs(n)))throw new Sk.builtin.ValueError("bad typecode (must be c, b, B, u, h, H, i, I, l, L, f or d)");if(i&&!Sk.builtin.checkIterable(i))throw new Sk.builtin.TypeError("iteration over non-sequence");if(e.$d.mp$ass_subscript(new Sk.builtin.str("typecode"),n),e.$d.mp$ass_subscript(new Sk.builtin.str("__module__"),new Sk.builtin.str("array")),e.typecode=n,void 0===i)e.internalIterable=new Sk.builtin.list;else if(i instanceof Sk.builtin.list)e.internalIterable=i;else{e.internalIterable=new Sk.builtin.list;for(let n=Sk.abstr.iter(i),t=n.tp$iternext();void 0!==t;t=n.tp$iternext())Sk.misceval.callsimArray(e.internalIterable.append,[e.internalIterable,t])}})),n.__repr__=new Sk.builtin.func((function(e){var n=Sk.ffi.remapToJs(e.typecode),t="";return Sk.ffi.remapToJs(e.internalIterable).length&&(t="c"==Sk.ffi.remapToJs(e.typecode)?", '"+Sk.ffi.remapToJs(e.internalIterable).join("")+"'":", "+Sk.ffi.remapToJs(Sk.misceval.callsimArray(e.internalIterable.__repr__,[e.internalIterable]))),new Sk.builtin.str("array('"+n+"'"+t+")")})),n.__str__=n.__repr__,n.__getattribute__=new Sk.builtin.func((function(e,n){return e.tp$getattr(n)})),n.append=new Sk.builtin.func((function(e,n){return Sk.misceval.callsimArray(e.internalIterable.append,[e.internalIterable,n]),Sk.builtin.none.none$})),n.extend=new Sk.builtin.func((function(e,n){if(Sk.builtin.pyCheckArgsLen("__init__",arguments.length,2,2),!Sk.builtin.checkIterable(n))throw new Sk.builtin.TypeError("iteration over non-sequence");for(let t=Sk.abstr.iter(n),i=t.tp$iternext();void 0!==i;i=t.tp$iternext())Sk.misceval.callsimArray(e.internalIterable.append,[e.internalIterable,i])}))}),"array",[]),n}`,"src/lib/calendar.js":'function $builtinmodule(e){const t={},{misceval:{chain:n},importModule:r}=Sk,importOrSuspend=e=>r(e,!1,!0);return n(importOrSuspend("datetime"),(e=>(t.datetime=e,importOrSuspend("itertools"))),(e=>(t.iterRepeat=e.$d.repeat,t.iterChain=e.$d.chain,calendarModule(t))))}function calendarModule(e){const{abstr:{setUpModuleMethods:t,numberBinOp:n,iter:r,objectGetItem:o},builtin:{bool:s,bool:{true$:m,false$:d},func:l,int_:i,list:c,none:{none$:f},str:h,slice:w,tuple:y,range:u,max:_,min:g,property:k,print:p,enumerate:$,ValueError:b},ffi:{remapToPy:M},misceval:{isTrue:T,iterator:C,arrayFromIterable:O,buildClass:L,richCompareBool:x,asIndexOrThrow:F,objectRepr:I,callsimArray:A},global:v,global:{strftime:E}}=Sk,S=new i(0),H=new i(1),D=new i(2),N=new i(3),R=new i(6),j=new i(7),J=new i(9),P=new i(12),Y=new i(13),U=new i(24),z=new i(60),le=(e,t)=>x(e,t,"LtE"),eq=(e,t)=>x(e,t,"Eq"),mod=(e,t)=>n(e,t,"Mod"),add=(e,t)=>n(e,t,"Add"),sub=(e,t)=>n(e,t,"Sub"),mul=(e,t)=>n(e,t,"Mult"),inc=e=>add(e,H),dec=e=>sub(e,H),mod7=e=>mod(e,j),getA=(e,t)=>e.tp$getattr(new h(t)),callA=(e,t,...n)=>A(e.tp$getattr(new h(t)),n);function*iterJs(e){const t=r(e);let n;for(;n=t.tp$iternext();)yield n}function iterFn(e,t){return e=r(e),new C((()=>{const n=e.tp$iternext();return n&&t(n)}),!0)}function makePyMethod(e,t,{args:n,name:r,doc:o,defaults:s}){t.co_varnames=["self",...n||[]],t.co_docstring=o?new h(o):f,s&&(t.$defaults=s),t.co_name=new h(r),t.co_qualname=new h(e+"."+r);const m=new l(t);return m.$module=Q.__name__,m}const{datetime:B,iterRepeat:W,iterChain:q}=e;let{MINYEAR:G,MAXYEAR:X,date:V}=B.$d;const K=getA(h,"center"),pyCenter=(e,t)=>A(K,[e,t]),pyRStrip=e=>new h(e.toString().trimRight());G=G.valueOf(),X=X.valueOf();const Q={__name__:new h("calendar"),__all__:M(["IllegalMonthError","IllegalWeekdayError","setfirstweekday","firstweekday","isleap","leapdays","weekday","monthrange","monthcalendar","prmonth","month","prcal","calendar","timegm","month_name","month_abbr","day_name","day_abbr","Calendar","TextCalendar","HTMLCalendar","LocaleTextCalendar","LocaleHTMLCalendar","weekheader"])};function makeErr(e,t){return L(Q,((e,n)=>{n.__init__=new l((function __init__(e,t){e.$attr=t})),n.__str__=new l((function __str__(e){return new h(t.replace("$",I(e.$attr)))}))}),e,[b])}const Z=makeErr("IllegalMonthError","bad month $; must be 1-12"),ee=makeErr("IllegalWeekdayError","bad weekday number $; must be 0 (Monday) to 6 (Sunday)"),te=[0,31,28,31,30,31,30,31,31,30,31,30,31];function mkLocalizedCls(e,t){t.__init__=new l((function __init__(e,t){e.format=t})),t.__getitem__=new l((function __getitem__(t,n){const r=o(e,n);if(n instanceof w){const e=[];for(const n of r.valueOf())e.push(A(n,[t.format]));return new c(e)}return A(r,[t.format])}));const n=new i(e.valueOf().length);t.__len__=new l((function __len__(e){return n}))}const ae=new h("strftime"),ne=L(Q,((e,t)=>{let n=[new l((e=>h.$empty))];for(let r=0;r<12;r++){const e=new V(2001,r+1,1);n.push(e.tp$getattr(ae))}n=new c(n),t._months=n,mkLocalizedCls(n,t)}),"_localized_month"),re=L(Q,((e,t)=>{let n=[];for(let r=0;r<7;r++){const e=new V(2001,1,r+1);n.push(e.tp$getattr(ae))}n=new c(n),t._days=n,mkLocalizedCls(n,t)}),"_localized_day"),oe=A(re,[new h("%A")]),se=A(re,[new h("%a")]),me=A(ne,[new h("%B")]),de=A(ne,[new h("%b")]),[ie,ce,fe,he,we,ye,ue]=[0,1,2,3,4,5,6];function isleap(e){return(e=F(e))%4==0&&(e%100!=0||e%400==0)}function weekday(e,t,n){e=F(e),G<=e&&e<=X||(e=2e3+e%400);const r=A(V,[new i(e),t,n]);return callA(V,"weekday",r)}function monthrange(e,t){if(!le(H,t)||!le(t,P))throw A(Z,[t]);const n=weekday(e,t,H);t=F(t);const r=te[t]+Number(2===t&&isleap(e));return[n,new i(r)]}function iterweekdays(e){return iterFn(A(u,[e.fwd,add(e.fwd,j)]),mod7)}function itermonthdates(e,t,n){return iterFn(itermonthdays3(e,t,n),(e=>A(V,e.valueOf())))}function itermonthdays(e,t,n){const[r,o]=monthrange(t,n),s=mod7(sub(r,e.fwd)),m=A(W,[S,s]),d=A(u,[H,inc(o)]),l=mod7(sub(e.fwd,add(r,o))),i=A(W,[S,l]);return A(q,[m,d,i])}function itermonthdays2(e,t,n){return iterFn(A($,[itermonthdays(e,t,n),e.fwd]),(e=>{const[t,n]=e.valueOf();return new y([n,mod7(t)])}))}function itermonthdays3(e,t,n){const ymdIter=(e,t,n)=>iterFn(n,(n=>new y([e,t,n]))),[r,o]=monthrange(t,n),s=mod7(sub(r,e.fwd)),m=mod7(sub(e.fwd,add(r,o))),[d,l]=function _prevmonth(e,t){return eq(t,H)?[dec(e),P]:[e,dec(t)]}(t,n),c=inc(function _monthlen(e,t){return t=F(t),new i(te[t]+Number(2===t&&isleap(e)))}(d,l)),f=A(u,[sub(c,s),c]),h=A(u,[H,inc(o)]),[w,_]=function _nextmonth(e,t){return eq(t,P)?[inc(e),H]:[e,inc(t)]}(t,n),g=A(u,[H,inc(m)]);return A(q,[ymdIter(d,l,f),ymdIter(t,n,h),ymdIter(w,_,g)])}function itermonthdays4(e,t,n){const r=itermonthdays3(e,t,n);let o=0;return iterFn(r,(t=>new y([...t.valueOf(),mod7(add(e.fwd,new i(o++)))])))}function _monthIter(e,t,n,r){const o=O(e(t,n,r)),s=[];for(let m=0;m{const n=makePyMethod.bind(null,"Calendar"),r=["firstweekday"],o=["year","month"],s=["year","width"],m={__init__:n((function __init__(e,t){return Object.defineProperty(e,"fwd",{get(){return mod7(this._fwd)},set(e){return this._fwd=e,!0}}),e.fwd=t,f}),{name:"__init__",args:r,defaults:[S]}),getfirstweekday:n((function getfirstweekday(e){return e.fwd}),{name:"getfirstweekday"}),setfirstweekday:n((function setfirstweekday(e,t){return e.fwd=t,f}),{name:"setfirstweekday",args:r}),iterweekdays:n(iterweekdays,{name:"iterweekdays"}),itermonthdates:n(itermonthdates,{name:"itermonthdates",args:o}),itermonthdays:n(itermonthdays,{name:"itermonthdays",args:o}),itermonthdays2:n(itermonthdays2,{name:"itermonthdays2",args:o}),itermonthdays3:n(itermonthdays3,{name:"itermonthdays3",args:o}),itermonthdays4:n(itermonthdays4,{name:"itermonthdays4",args:o}),monthdatescalendar:n(monthdatescalendar,{name:"monthdatescalendar",args:o}),monthdays2calendar:n(monthdays2calendar,{name:"monthdays2calendar",args:o}),monthdayscalendar:n(monthdayscalendar,{name:"monthdayscalendar",args:o}),yeardatescalendar:n(yeardatescalendar,{name:"yeardatescalendar",args:s,defaults:[N]}),yeardays2calendar:n(yeardays2calendar,{name:"yeardays2calendar",args:s,defaults:[N]}),yeardayscalendar:n(yeardayscalendar,{name:"yeardayscalendar",args:s,defaults:[N]})};m.firstweekday=new k(m.getfirstweekday,m.setfirstweekday),Object.assign(t,m)}),"Calendar");function doTextFormatweekday(e,t,n){let r;return r=x(n,J,"GtE")?oe:se,pyCenter(o(o(r,t),new w(f,n)),n)}function doTextFormatmonthname(e,t,n,r,s=!0){let m=o(me,n);return T(s)&&(m=mod(new h("%s %r"),new y([m,t]))),pyCenter(m,r)}const ge=L(Q,((e,t)=>{const txtPrint=e=>p([e],["end",h.$empty]);const n=doTextFormatweekday;function formatweekheader(e,t){const n=[];for(const r of iterJs(iterweekdays(e)))n.push(callA(e,"formatweekday",r,t).toString());return new h(n.join(" "))}const r=doTextFormatmonthname;const o=makePyMethod.bind(null,"TextCalendar"),s={prweek:o((function prweek(e,t,n){txtPrint(callA(e,"formatweek",t,n))}),{name:"prweek",args:["theweek","width"]}),formatday:o((function formatday(e,t,n,r){let o;return o=eq(t,S)?h.$empty:mod(new h("%2i"),t),pyCenter(o,r)}),{name:"formatday",args:["day","weekday","width"]}),formatweek:o((function formatweek(e,t,n){const r=[];for(const o of iterJs(t)){const[t,s]=o.valueOf();r.push(callA(e,"formatday",t,s,n).toString())}return new h(r.join(" "))}),{name:"formatweek",args:["theweek","width"]}),formatweekday:o(n,{name:"formatweekday",args:["day","width"]}),formatweekheader:o(formatweekheader,{name:"formatweekheader",args:["width"]}),formatmonthname:o(r,{name:"formatmonthname",args:["theyear","themonth","width","withyear"],defaults:[m]}),prmonth:o((function prmonth(e,t,n,r,o){txtPrint(callA(e,"formatmonth",t,n,r,o))}),{name:"prmonth",args:["theyear","themonth","w","l"],defaults:[S,S]}),formatmonth:o((function formatmonth(e,t,n,r,o){const addNewLines=e=>new h(e+"\\n".repeat(o.valueOf()));r=_([D,r]),o=_([H,o]);let s=callA(e,"formatmonthname",t,n,dec(mul(j,inc(r))),!0);s=pyRStrip(s),s=addNewLines(s),s=add(s,pyRStrip(callA(e,"formatweekheader",r))),s=addNewLines(s);for(const m of iterJs(monthdays2calendar(e,t,n)))s=add(s,pyRStrip(callA(e,"formatweek",m,r))),s=addNewLines(s);return s}),{name:"formatmonth",args:["thyear","themonth","w","l"],defaults:[S,S]}),formatyear:o((function formatyear(e,t,n,r,o,s){n=_([D,n]),r=_([H,r]),o=_([D,o]);const m=dec(mul(inc(n),j));let d="";const a=e=>d+=e;a(pyRStrip(pyCenter(t.$r(),add(mul(m,s),mul(o,dec(s)))))),a("\\n".repeat(r));const l=formatweekheader(e,n);let f=0;for(const w of iterJs(yeardays2calendar(e,t,s))){const d=new i(f),y=inc(mul(s,d)),_=g([inc(mul(s,inc(d))),Y]),k=A(u,[y,_]);a("\\n".repeat(r));const p=iterFn(k,(n=>callA(e,"formatmonthname",t,n,m,!1)));a(pyRStrip(formatstring(p,m,o))),a("\\n".repeat(r));const $=iterFn(k,(e=>l));a(pyRStrip(formatstring($,m,o))),a("\\n".repeat(r));const b=Math.max(...w.valueOf().map((e=>e.valueOf().length)));for(let t=0;t=r.length?s.push(h.$empty):s.push(callA(e,"formatweek",r[t],n));a(pyRStrip(formatstring(new c(s),m,o))),a("\\n".repeat(r))}f++}return new h(d)}),{name:"formatyear",args:["theyear","w","l","c","m"],defaults:[D,H,R,N]}),pryear:o((function pryear(e,t,n,r,o,s){txtPrint(callA(e,"formatyear",t,n,r,o,s))}),{name:"pryear",args:["theyear","w","l","c","m"],defaults:[S,S,R,N]})};Object.assign(t,s)}),"TextCalendar",[_e]);function doHtmlFormatweekday(e,t){return new h(`${o(se,t)}`)}function doHtmlFormatmonthname(e,t,n,r=!0){let s=""+o(me,n);return T(r)&&(s+=" "+t),new h(`${s}`)}const ke=L(Q,((e,t)=>{const n=M(["mon","tue","wed","thu","fri","sat","sun"]),r=n,s=new h("noday"),d=new h("month"),l=d,c=new h("year"),w=c,u=new h(\' \'),g=new h(\'%d\');const k=doHtmlFormatweekday;function formatweekheader(e){let t="";for(const n of iterJs(iterweekdays(e)))t+=callA(e,"formatweekday",n);return new h(`${t}`)}const p=doHtmlFormatmonthname;const $=makePyMethod.bind(null,"HTMLCalendar"),b={formatday:$((function formatday(e,t,n){return eq(t,S)?mod(u,getA(e,"cssclass_noday")):mod(g,new y([o(getA(e,"cssclasses"),n),t]))}),{name:"formatday",args:["day","weekday"]}),formatweek:$((function formatweek(e,t){let n="";for(const r of iterJs(t)){const[t,o]=r.valueOf();n+=callA(e,"formatday",t,o)}return new h(`${n}`)}),{name:"formatweek",args:["theweek"]}),formatweekday:$(k,{name:"formatweekday",args:["day"]}),formatweekheader:$(formatweekheader,{name:"formatweekheader"}),formatmonthname:$(p,{name:"formatmonthname",args:["theyear","themonth","withyear"],defaults:[m]}),formatmonth:$((function formatmonth(e,t,n,r=!0){let o="";const a=e=>o+=e+"\\n";a(``),a(callA(e,"formatmonthname",t,n,r)),a(formatweekheader(e));for(const s of iterJs(monthdays2calendar(e,t,n)))a(callA(e,"formatweek",s));return a("
"),new h(o)}),{name:"formatmonth",args:["thyear","themonth","withyear"],defaults:[m]}),formatyear:$((function formatyear(e,t,n){let r="";const a=e=>r+=e;n=_([n,H]).valueOf(),a(``),a("\\n"),a(``);for(let o=1;o<13;o+=n){a("");const r=Math.min(o+n,13);for(let n=o;n"),a(callA(e,"formatmonth",t,new i(n),!1)),a("");a("")}return a("
${t}
"),new h(r)}),{name:"formatyear",args:["theyear","width"],defaults:[N]}),formatyearpage:$((function formatyearpage(e,t,n=3,r="calendar.css",o=null){null!==o&&o!==f||(o=new h("utf-8"));let s="";const a=e=>s+=e;return a(`\\n`),a(\'\\n\'),a("\\n"),a("\\n"),a(`\\n`),r!==f&&a(`\\n`),a(`Calendar for ${t}\\n`),a("\\n"),a("\\n"),a(callA(e,"formatyear",t,n)),a("\\n"),a("\\n"),callA(h,"encode",new h(s),o,new h("ignore"))}),{name:"formatyearpage",args:["theyear","width","css","encoding"],defaults:[N,new h("calendar.css"),new h("utf-8")]}),cssclasses:n,cssclasses_weekday_head:r,cssclass_noday:s,cssclass_month_head:d,cssclass_month:l,cssclass_year_head:c,cssclass_year:w};Object.assign(t,b)}),"HTMLCalendar",[_e]);function withLocale(e,t){const n=E.localizeByIdentifier(e.toString());v.strftime=n;try{return t()}finally{v.strftime=E}}function localInit(e,t){T(t)||(t=new h("en_US")),e.locale=t}const pe=L(Q,((e,t)=>{const n=makePyMethod.bind(null,"LocaleTextCalendar"),r={__init__:n((function __init__(e,t,n){return callA(ge,"__init__",e,t),localInit(e,n),f}),{name:"__init__",args:["firstweekday","locale"],defaults:[S,f]}),formatweekday:n((function formatweekday(e,t,n){return withLocale(e.locale,(()=>doTextFormatweekday(0,t,n)))}),{name:"formatweekday",args:["day","width"]}),formatmonthname:n((function formatmonthname(e,t,n,r,o){return withLocale(e.locale,(()=>doTextFormatmonthname(0,t,n,r,o)))}),{name:"formatmonthname",args:["theyear","themonth","width","withyear"],defaults:[m]})};Object.assign(t,r)}),"LocaleTextCalendar",[ge]),$e=L(Q,((e,t)=>{const n=makePyMethod.bind(null,"LocaleHTMLCalendar"),r={__init__:n((function __init__(e,t,n){return callA(ke,"__init__",e,t),localInit(e,n),f}),{name:"__init__",args:["firstweekday","locale"],defaults:[S,f]}),formatweekday:n((function formatweekday(e,t){return withLocale(e.locale,(()=>doHtmlFormatweekday(e,t)))}),{name:"formatweekday",args:["day"]}),formatmonthname:n((function formatmonthname(e,t,n,r){return withLocale(e.locale,(()=>doHtmlFormatmonthname(e,t,n,r)))}),{name:"formatmonthname",args:["theyear","themonth","withyear"],defaults:[m]})};Object.assign(t,r)}),"LocaleHTMLCalendar",[ke]),be=A(ge,[]);Object.assign(Q,{IllegalMonthError:Z,IllegalWeekdayError:ee,day_name:oe,month_name:me,day_abbr:se,month_abbr:de,January:new i(1),February:new i(2),mdays:M(te),MONDAY:new i(ie),TUESDAY:new i(ce),WEDNESDAY:new i(fe),THURSDAY:new i(he),FRIDAY:new i(we),SATURDAY:new i(ye),SUNDAY:new i(ue),Calendar:_e,TextCalendar:ge,HTMLCalendar:ke,LocaleTextCalendar:pe,LocaleHTMLCalendar:$e,c:be,firstweekday:getA(be,"getfirstweekday"),monthcalendar:getA(be,"monthdayscalendar"),prweek:getA(be,"prweek"),week:getA(be,"formatweek"),weekheader:getA(be,"formatweekheader"),prmonth:getA(be,"prmonth"),month:getA(be,"formatmonth"),calendar:getA(be,"formatyear"),prcal:getA(be,"pryear")});const Me=new i(20),Te=R;function formatstring(e,t,n){t||(t=Me),n||(n=Te),n=mul(n,new h(" "));const r=[];for(const o of iterJs(e))r.push(pyCenter(o,t).toString());return new h(r.join(n.toString()))}const Ce=getA(V,"toordinal"),Oe=A(Ce,[new V(1970,1,1)]);return t("calendar",Q,{isleap:{$meth:e=>s(isleap(e)),$flags:{NamedArgs:["year"]},$doc:"Return True for leap years, False for non-leap years"},leapdays:{$meth(e,t){e=F(e)-1,t=F(t)-1;const n=Math.floor;return new i(n(t/4)-n(e/4)-(n(t/100)-n(e/100))+(n(t/400)-n(e/400)))},$flags:{MinArgs:2,MaxArgs:2}},weekday:{$meth:weekday,$flags:{NamedArgs:["year","month","day"]},$doc:"Return weekday (0-6 ~ Mon-Sun) for year, month (1-12), day (1-31)."},monthrange:{$meth:(e,t)=>new y(monthrange(e,t)),$flags:{NamedArgs:["year","month"]},$doc:"Return weekday (0-6 ~ Mon-Sun) and number of days (28-31) for year, month."},setfirstweekday:{$meth(e){const t=F(e);if(!(ie<=t&&t<=ue))throw A(ee,[e]);be.fwd=e},$flags:{NamedArgs:["firstweekday"]}},format:{$meth:function format(e,t,n){return p([formatstring(e,t,n)]),f},$flags:{NamedArgs:["cols","colwidth","spacing"],Defaults:[Me,Te]}},formatstring:{$meth:formatstring,$flags:{NamedArgs:["cols","colwidth","spacing"],Defaults:[Me,Te]}},timegm:{$meth(e){const[t,n,r,o,s,m]=e.valueOf(),d=A(V,[t,n,H]),l=A(Ce,[d]),i=add(sub(l,Oe),dec(r)),c=add(mul(i,U),o),f=add(mul(c,z),s);return add(mul(f,z),m)},$flags:{OneArg:!0}}}),Q}',"src/lib/collections.js":`function $builtinmodule(t){const e={};return Sk.misceval.chain(Sk.importModule("keyword",!1,!0),(t=>(e._iskeyword=t.$d.iskeyword,Sk.importModule("itertools",!1,!0))),(t=>(e._chain=t.$d.chain,e._starmap=t.$d.starmap,e._repeat=t.$d.repeat,Sk.importModule("operator",!1,!0))),(t=>{e._itemgetter=t.$d.itemgetter}),(()=>collections_mod(e)))}function collections_mod(t){function counterNumberSlot(e){return function(i){if(void 0!==i&&!(i instanceof t.Counter))return Sk.builtin.NotImplemented.NotImplemented$;const s=new t.Counter;return e.call(this,s,i),s}}function counterInplaceSlot(t,e){return function(i){if(!(i instanceof Sk.builtin.dict))throw new Sk.builtin.TypeError("Counter "+t+"= "+Sk.abstr.typeName(i)+" is not supported");return e.call(this,i),this.keep$positive()}}t.__all__=new Sk.builtin.list(["deque","defaultdict","namedtuple","Counter","OrderedDict"].map((t=>new Sk.builtin.str(t)))),t.defaultdict=Sk.abstr.buildNativeClass("collections.defaultdict",{constructor:function defaultdict(t,e){this.default_factory=t,Sk.builtin.dict.call(this,e)},base:Sk.builtin.dict,methods:{copy:{$meth(){return this.$copy()},$flags:{NoArgs:!0}},__copy__:{$meth(){return this.$copy()},$flags:{NoArgs:!0}},__missing__:{$meth(t){if(Sk.builtin.checkNone(this.default_factory))throw new Sk.builtin.KeyError(Sk.misceval.objectRepr(t));{const e=Sk.misceval.callsimArray(this.default_factory,[]);return this.mp$ass_subscript(t,e),e}},$flags:{OneArg:!0}}},getsets:{default_factory:{$get(){return this.default_factory},$set(t){t=t||Sk.builtin.none.none$,this.default_factory=t}}},slots:{tp$doc:"defaultdict(default_factory[, ...]) --\\x3e dict with default factory\\n\\nThe default factory is called without arguments to produce\\na new value when a key is not present, in __getitem__ only.\\nA defaultdict compares equal to a dict with the same items.\\nAll remaining arguments are treated the same as if they were\\npassed to the dict constructor, including keyword arguments.\\n",tp$init(t,e){const i=t.shift();if(void 0===i)this.default_factory=Sk.builtin.none.none$;else{if(!Sk.builtin.checkCallable(i)&&!Sk.builtin.checkNone(i))throw new Sk.builtin.TypeError("first argument must be callable");this.default_factory=i}return Sk.builtin.dict.prototype.tp$init.call(this,t,e)},$r(){const t=Sk.misceval.objectRepr(this.default_factory),e=Sk.builtin.dict.prototype.$r.call(this).v;return new Sk.builtin.str("defaultdict("+t+", "+e+")")}},proto:{$copy(){const e=[];return Sk.misceval.iterFor(Sk.abstr.iter(this),(t=>{e.push(t),e.push(this.mp$subscript(t))})),new t.defaultdict(this.default_factory,e)}}}),t.Counter=Sk.abstr.buildNativeClass("Counter",{constructor:function Counter(){this.$d=new Sk.builtin.dict,Sk.builtin.dict.apply(this)},base:Sk.builtin.dict,methods:{elements:{$flags:{NoArgs:!0},$meth(){const e=t._chain.tp$getattr(new Sk.builtin.str("from_iterable")),i=t._starmap,s=t._repeat,n=Sk.misceval.callsimArray;return n(e,[n(i,[s,n(this.tp$getattr(this.str$items))])])}},most_common:{$flags:{NamedArgs:["n"],Defaults:[Sk.builtin.none.none$]},$meth(t){const e=this.sq$length();t=Sk.builtin.checkNone(t)||(t=Sk.misceval.asIndexOrThrow(t))>e?e:t<0?0:t;const i=this.$items().sort(((t,e)=>Sk.misceval.richCompareBool(t[1],e[1],"Lt")?1:Sk.misceval.richCompareBool(t[1],e[1],"Gt")?-1:0));return new Sk.builtin.list(i.slice(0,t).map((t=>new Sk.builtin.tuple(t))))}},update:{$flags:{FastCall:!0},$meth(t,e){return Sk.abstr.checkArgsLen("update",t,0,1),this.counter$update(t,e)}},subtract:{$flags:{FastCall:!0},$meth(t,e){Sk.abstr.checkArgsLen("subtract",t,0,1);const i=t[0];if(void 0!==i)if(i instanceof Sk.builtin.dict)for(let s=Sk.abstr.iter(i),n=s.tp$iternext();void 0!==n;n=s.tp$iternext()){const t=this.mp$subscript(n);this.mp$ass_subscript(n,Sk.abstr.numberBinOp(t,i.mp$subscript(n),"Sub"))}else for(let s=Sk.abstr.iter(i),n=s.tp$iternext();void 0!==n;n=s.tp$iternext()){const t=this.mp$subscript(n);this.mp$ass_subscript(n,Sk.abstr.numberBinOp(t,this.$one,"Sub"))}e=e||[];for(let s=0;s>> c = Counter('abcdeabcdabcaba') # count elements from a string\\n\\n >>> c.most_common(3) # three most common elements\\n [('a', 5), ('b', 4), ('c', 3)]\\n >>> sorted(c) # list all unique elements\\n ['a', 'b', 'c', 'd', 'e']\\n >>> ''.join(sorted(c.elements())) # list elements with repetitions\\n 'aaaaabbbbcccdde'\\n >>> sum(c.values()) # total of all counts\\n 15\\n\\n >>> c['a'] # count of letter 'a'\\n 5\\n >>> for elem in 'shazam': # update counts from an iterable\\n ... c[elem] += 1 # by adding 1 to each element's count\\n >>> c['a'] # now there are seven 'a'\\n 7\\n >>> del c['b'] # remove all 'b'\\n >>> c['b'] # now there are zero 'b'\\n 0\\n\\n >>> d = Counter('simsalabim') # make another counter\\n >>> c.update(d) # add in the second counter\\n >>> c['a'] # now there are nine 'a'\\n 9\\n\\n >>> c.clear() # empty the counter\\n >>> c\\n Counter()\\n\\n Note: If a count is set to zero or reduced to zero, it will remain\\n in the counter until the entry is deleted or the counter is cleared:\\n\\n >>> c = Counter('aaabbc')\\n >>> c['b'] -= 2 # reduce the count of 'b' by two\\n >>> c.most_common() # 'b' is still in, but its count is zero\\n [('a', 3), ('c', 1), ('b', 0)]\\n\\n",tp$init(t,e){return Sk.abstr.checkArgsLen(this.tpjs_name,t,0,1),this.counter$update(t,e)},$r(){const t=this.size>0?Sk.builtin.dict.prototype.$r.call(this).v:"";return new Sk.builtin.str(Sk.abstr.typeName(this)+"("+t+")")},tp$as_sequence_or_mapping:!0,mp$ass_subscript(t,e){return void 0===e?this.mp$lookup(t)&&Sk.builtin.dict.prototype.mp$ass_subscript.call(this,t,e):Sk.builtin.dict.prototype.mp$ass_subscript.call(this,t,e)},tp$as_number:!0,nb$positive:counterNumberSlot((function(t){this.$items().forEach((([e,i])=>{Sk.misceval.richCompareBool(i,this.$zero,"Gt")&&t.mp$ass_subscript(e,i)}))})),nb$negative:counterNumberSlot((function(t){this.$items().forEach((([e,i])=>{Sk.misceval.richCompareBool(i,this.$zero,"Lt")&&t.mp$ass_subscript(e,Sk.abstr.numberBinOp(this.$zero,i,"Sub"))}))})),nb$subtract:counterNumberSlot((function(t,e){this.$items().forEach((([i,s])=>{const n=Sk.abstr.numberBinOp(s,e.mp$subscript(i),"Sub");Sk.misceval.richCompareBool(n,this.$zero,"Gt")&&t.mp$ass_subscript(i,n)})),e.$items().forEach((([e,i])=>{void 0===this.mp$lookup(e)&&Sk.misceval.richCompareBool(i,this.$zero,"Lt")&&t.mp$ass_subscript(e,Sk.abstr.numberBinOp(this.$zero,i,"Sub"))}))})),nb$add:counterNumberSlot((function(t,e){this.$items().forEach((([i,s])=>{const n=Sk.abstr.numberBinOp(s,e.mp$subscript(i),"Add");Sk.misceval.richCompareBool(n,this.$zero,"Gt")&&t.mp$ass_subscript(i,n)})),e.$items().forEach((([e,i])=>{void 0===this.mp$lookup(e)&&Sk.misceval.richCompareBool(i,this.$zero,"Gt")&&t.mp$ass_subscript(e,i)}))})),nb$inplace_add:counterInplaceSlot("+",(function(t){t.$items().forEach((([t,e])=>{const i=Sk.abstr.numberInplaceBinOp(this.mp$subscript(t),e,"Add");this.mp$ass_subscript(t,i)}))})),nb$inplace_subtract:counterInplaceSlot("-",(function(t){t.$items().forEach((([t,e])=>{const i=Sk.abstr.numberInplaceBinOp(this.mp$subscript(t),e,"Sub");this.mp$ass_subscript(t,i)}))})),nb$or:counterNumberSlot((function(t,e){this.$items().forEach((([i,s])=>{const n=e.mp$subscript(i),r=Sk.misceval.richCompareBool(s,n,"Lt")?n:s;Sk.misceval.richCompareBool(r,this.$zero,"Gt")&&t.mp$ass_subscript(i,r)})),e.$items().forEach((([e,i])=>{void 0===this.mp$lookup(e)&&Sk.misceval.richCompareBool(i,this.$zero,"Gt")&&t.mp$ass_subscript(e,i)}))})),nb$and:counterNumberSlot((function(t,e){this.$items().forEach((([i,s])=>{const n=e.mp$subscript(i),r=Sk.misceval.richCompareBool(s,n,"Lt")?s:n;Sk.misceval.richCompareBool(r,this.$zero,"Gt")&&t.mp$ass_subscript(i,r)}))})),nb$inplace_and:counterInplaceSlot("&",(function(t){this.$items().forEach((([e,i])=>{const s=t.mp$subscript(e);Sk.misceval.richCompareBool(s,i,"Lt")&&this.mp$ass_subscript(e,s)}))})),nb$inplace_or:counterInplaceSlot("|",(function(t){t.$items().forEach((([t,e])=>{Sk.misceval.richCompareBool(e,this.mp$subscript(t),"Gt")&&this.mp$ass_subscript(t,e)}))})),nb$reflected_and:null,nb$reflected_or:null,nb$reflected_add:null,nb$reflected_subtract:null},proto:{keep$positive(){return this.$items().forEach((([t,e])=>{Sk.misceval.richCompareBool(e,this.$zero,"LtE")&&this.mp$ass_subscript(t)})),this},$zero:new Sk.builtin.int_(0),$one:new Sk.builtin.int_(1),str$items:new Sk.builtin.str("items"),counter$update(t,e){const i=t[0];if(void 0!==i)if(Sk.builtin.checkMapping(i))if(this.sq$length())for(let s=Sk.abstr.iter(i),n=s.tp$iternext();void 0!==n;n=s.tp$iternext()){const t=this.mp$subscript(n);this.mp$ass_subscript(n,Sk.abstr.numberBinOp(t,i.mp$subscript(n),"Add"))}else this.update$common(t,void 0,"update");else for(let s=Sk.abstr.iter(i),n=s.tp$iternext();void 0!==n;n=s.tp$iternext()){const t=this.mp$subscript(n);this.mp$ass_subscript(n,Sk.abstr.numberBinOp(t,this.$one,"Add"))}if(e&&e.length)if(this.sq$length())for(let s=0;s\`(\${Sk.misceval.objectRepr(t)}, \${Sk.misceval.objectRepr(e)})\`));return t=0===t.length?"":"["+t.join(", ")+"]",this.in$repr=!1,new Sk.builtin.str(Sk.abstr.typeName(this)+"("+t+")")},tp$richcompare(e,i){if("Eq"!==i&&"Ne"!==i)return Sk.builtin.NotImplemented.NotImplemented$;if(!(e instanceof t.OrderedDict))return Sk.builtin.dict.prototype.tp$richcompare.call(this,e,i);const s="Eq"==i,n=this.size;if(n!==e.size)return!s;const r=e.$items(),a=this.$items();for(let t=0;t=r||l>=a)switch(i){case"Lt":return ra;case"GtE":return r>=a}return"Eq"!==i&&("NotEq"===i||Sk.misceval.richCompareBool(n[this.head+l&this.mask],e[s.head+l&s.mask],i))},tp$iter(){return new e(this)},$r(){const t=[],e=this.tail-this.head&this.mask;if(this.$entered_repr)return new Sk.builtin.str("[...]");this.$entered_repr=!0;for(let s=0;s=e||t<-e)throw new Sk.builtin.IndexError("deque index out of range");const i=(t>=0?this.head:this.tail)+t&this.mask;return this.v[i]},mp$ass_subscript(t,e){t=Sk.misceval.asIndexOrThrow(t);const i=this.tail-this.head&this.mask;if(t>=i||t<-i)throw new Sk.builtin.IndexError("deque index out of range");void 0===e?this.del$item(t):this.set$item(t,e)},nb$inplace_add(t){this.maxlen=void 0;for(let e=Sk.abstr.iter(t),i=e.tp$iternext();void 0!==i;i=e.tp$iternext())this.$push(i);return this},nb$inplace_multiply(t){(t=Sk.misceval.asIndexSized(t,Sk.builtin.OverflowError,"can't multiply sequence by non-int of type '{tp$name}'"))<=0&&this.$clear();const e=this.$copy(),i=this.tail-this.head&this.mask;for(let s=1;s integer -- return number of occurrences of value"},extend:{$meth(t){return this.$extend(t),Sk.builtin.none.none$},$flags:{OneArg:!0},$textsig:null,$doc:"Extend the right side of the deque with elements from the iterable"},extendleft:{$meth(t){for(let e=Sk.abstr.iter(t),i=e.tp$iternext();void 0!==i;i=e.tp$iternext())this.$pushLeft(i);return Sk.builtin.none.none$},$flags:{OneArg:!0},$textsig:null,$doc:"Extend the left side of the deque with elements from the iterable"},index:{$meth(t,e,i){const s=this.$index(t,e,i);if(void 0!==s)return new Sk.builtin.int_(s);throw new Sk.builtin.ValueError(Sk.misceval.objectRepr(t)+" is not in deque")},$flags:{MinArgs:1,MaxArgs:3},$textsig:null,$doc:"D.index(value, [start, [stop]]) -> integer -- return first index of value.\\nRaises ValueError if the value is not present."},insert:{$meth(t,e){t=Sk.misceval.asIndexOrThrow(t,"integer argument expected, got {tp$name}");const i=this.tail-this.head&this.mask;if(void 0!==this.maxlen&&i>=this.maxlen)throw new Sk.builtin.IndexError("deque already at its maximum size");t>i&&(t=i),t<=-i&&(t=0);const s=(t>=0?this.head:this.tail)+t&this.mask;let n=this.tail;for(this.tail=this.tail+1&this.mask;n!==s;){const t=n-1&this.mask;this.v[n]=this.v[t],n=t}return this.v[s]=e,this.head===this.tail&&this.$resize(this.v.length,this.v.length<<1),Sk.builtin.none.none$},$flags:{MinArgs:2,MaxArgs:2},$textsig:null,$doc:"D.insert(index, object) -- insert object before index"},pop:{$meth(){return this.$pop()},$flags:{NoArgs:!0},$textsig:null,$doc:"Remove and return the rightmost element."},popleft:{$meth(){return this.$popLeft()},$flags:{NoArgs:!0},$textsig:null,$doc:"Remove and return the leftmost element."},remove:{$meth(t){const e=this.$index(t);if(void 0===e)throw new Sk.builtin.ValueError(Sk.misceval.objectRepr(t)+" is not in deque");let i=this.head+e&this.mask;for(;i!==this.tail;){const t=i+1&this.mask;this.v[i]=this.v[t],i=t}this.tail=this.tail-1&this.mask;var s=this.tail-this.head&this.mask;s>>1&&this.$resize(s,this.v.length>>>1)},$flags:{OneArg:!0},$textsig:null,$doc:"D.remove(value) -- remove first occurrence of value."},__reversed__:{$meth(){return new i(this)},$flags:{NoArgs:!0},$textsig:null,$doc:"D.__reversed__() -- return a reverse iterator over the deque"},reverse:{$meth(){const t=this.head,e=this.tail,i=this.mask,s=this.tail-this.head&this.mask;for(let n=0;n<~~(s/2);n++){const s=e-n-1&i,r=t+n&i,a=this.v[s];this.v[s]=this.v[r],this.v[r]=a}return Sk.builtin.none.none$},$flags:{NoArgs:!0},$textsig:null,$doc:"D.reverse() -- reverse *IN PLACE*"},rotate:{$meth(t){t=void 0===t?1:Sk.misceval.asIndexSized(t,Sk.builtin.OverflowError);const e=this.head,i=this.tail;if(0===t||e===i)return this;if(this.head=e-t&this.mask,this.tail=i-t&this.mask,t>0)for(let s=1;s<=t;s++){const t=e-s&this.mask,n=i-s&this.mask;this.v[t]=this.v[n],this.v[n]=void 0}else for(let s=0;s>t;s--){const t=i-s&this.mask,n=e-s&this.mask;this.v[t]=this.v[n],this.v[n]=void 0}return Sk.builtin.none.none$},$flags:{MinArgs:0,MaxArgs:1},$textsig:null,$doc:"Rotate the deque n steps to the right (default n=1). If n is negative, rotates left."}},classmethods:Sk.generic.classGetItem,getsets:{maxlen:{$get(){return void 0===this.maxlen?Sk.builtin.none.none$:new Sk.builtin.int_(this.maxlen)},$doc:"maximum size of a deque or None if unbounded"}},proto:{$clear(){this.head=0,this.tail=0,this.mask=1,this.v=new Array(2)},$copy(){return new t.deque(this.v.slice(0),this.maxlen,this.head,this.tail,this.mask)},$extend(t){for(let e=Sk.abstr.iter(t),i=e.tp$iternext();void 0!==i;i=e.tp$iternext())this.$push(i)},set$item(t,e){const i=(t>=0?this.head:this.tail)+t&this.mask;this.v[i]=e},del$item(t){let e=(t>=0?this.head:this.tail)+t&this.mask;for(;e!==this.tail;){const t=e+1&this.mask;this.v[e]=this.v[t],e=t}const i=this.tail-this.head&this.mask;this.tail=this.tail-1&this.mask,i>>1&&this.$resize(i,this.v.length>>>1)},$push(t){this.v[this.tail]=t,this.tail=this.tail+1&this.mask,this.head===this.tail&&this.$resize(this.v.length,this.v.length<<1);const e=this.tail-this.head&this.mask;return void 0!==this.maxlen&&e>this.maxlen&&this.$popLeft(),this},$pushLeft(t){this.head=this.head-1&this.mask,this.v[this.head]=t,this.head===this.tail&&this.$resize(this.v.length,this.v.length<<1);const e=this.tail-this.head&this.mask;return void 0!==this.maxlen&&e>this.maxlen&&this.$pop(),this},$pop(){if(this.head===this.tail)throw new Sk.builtin.IndexError("pop from an empty deque");this.tail=this.tail-1&this.mask;const t=this.v[this.tail];this.v[this.tail]=void 0;const e=this.tail-this.head&this.mask;return e>>1&&this.$resize(e,this.v.length>>>1),t},$popLeft(){if(this.head===this.tail)throw new Sk.builtin.IndexError("pop from an empty deque");const t=this.v[this.head];this.v[this.head]=void 0,this.head=this.head+1&this.mask;const e=this.tail-this.head&this.mask;return e>>1&&this.$resize(e,this.v.length>>>1),t},$resize(t,e){const i=this.head,s=this.mask;if(this.head=0,this.tail=t,this.mask=e-1,0===i)return void(this.v.length=e);const n=new Array(e);for(let r=0;r=0?i:i<-s?0:s+i;for(let o=e>=0?e:e<-s?0:s+e;o=this.$length)return;const t=(this.$index>=0?this.$head:this.$tail)+this.$index&this.$mask;return this.$index++,this.dq[t]},methods:{__length_hint__:{$meth:function __length_hint__(){return new Sk.builtin.int_(this.$length-this.$index)},$flags:{NoArgs:!0}}}}),i=Sk.abstr.buildIteratorClass("_collections._deque_reverse_iterator",{constructor:function _deque_reverse_iterator(t){this.$index=(t.tail-t.head&t.mask)-1,this.dq=t.v,this.$head=t.head,this.$mask=t.mask},iternext(){if(this.$index<0)return;const t=this.$head+this.$index&this.$mask;return this.$index--,this.dq[t]},methods:{__length_hint__:Sk.generic.iterReverseLengthHintMethodDef}}),s=new RegExp(/^[0-9].*/),n=new RegExp(/^[0-9_].*/),r=new RegExp(/^\\w*$/),a=/,/g,o=/\\s+/;function namedtuple(e,i,l,h,c){if(e=e.tp$str(),Sk.misceval.isTrue(Sk.misceval.callsimArray(t._iskeyword,[e])))throw new Sk.builtin.ValueError("Type names and field names cannot be a keyword: '"+Sk.misceval.objectRepr(e)+"'");const u=e.$jsstr();if(s.test(u)||!r.test(u)||!u)throw new Sk.builtin.ValueError("Type names and field names must be valid identifiers: '"+u+"'");let m,d;if(Sk.builtin.checkString(i))m=i.$jsstr().replace(a," ").split(o),1==m.length&&""===m[0]&&(m=[]),d=m.map((t=>new Sk.builtin.str(t)));else{m=[],d=[];for(let t=Sk.abstr.iter(i),e=t.tp$iternext();void 0!==e;e=t.tp$iternext())e=e.tp$str(),d.push(e),m.push(e.$jsstr())}let p=new Set;if(Sk.misceval.isTrue(l))for(let s=0;sm.length)throw new Sk.builtin.TypeError("Got more default values than field names");for(let t=0,e=d.length-b.length;e"'"+t.$jsstr()+"'"))+"]")}return r}_make.co_varnames=["_cls","iterable"],_asdict.co_varnames=["self"],_replace.co_kwargs=1,_replace.co_varnames=["_self"];const S={};for(let s=0;sm[e]+"="+Sk.misceval.objectRepr(t)));return new Sk.builtin.str(Sk.abstr.typeName(this)+"("+t.join(", ")+")")}},flags:{sk$klass:!0},proto:Object.assign({__module__:Sk.builtin.checkNone(c)?Sk.globals.__name__:c,__slots__:new Sk.builtin.tuple,_fields:$,_field_defaults:f,_make:new Sk.builtin.classmethod(new Sk.builtin.func(_make)),_asdict:new Sk.builtin.func(_asdict),_replace:new Sk.builtin.func(_replace)},S)})}return namedtuple.co_argcount=2,namedtuple.co_kwonlyargcount=3,namedtuple.$kwdefs=[Sk.builtin.bool.false$,Sk.builtin.none.none$,Sk.builtin.none.none$],namedtuple.co_varnames=["typename","field_names","rename","defaults","module"],t.namedtuple=new Sk.builtin.func(namedtuple),t}`,"src/lib/datetime.js":'function $builtinmodule(){const{isTrue:t,richCompareBool:e,asIndexOrThrow:n,asIndexSized:i,objectRepr:s,opAllowsEquality:o,callsimArray:r,callsimOrSuspendArray:a}=Sk.misceval,{numberBinOp:$,typeName:c,buildNativeClass:h,checkArgsLen:m,objectHash:u,copyKeywordsToNamedArgs:l}=Sk.abstr,{int_:f,float_:d,str:w,bytes:_,tuple:p,bool:{true$:g},none:{none$:y},NotImplemented:{NotImplemented$:b},TypeError:z,ValueError:v,OverflowError:M,ZeroDivisionError:A,NotImplementedError:x,checkNumber:N,checkFloat:S,checkString:k,checkInt:O,asnum$:I,round:E,getattr:T}=Sk.builtin,{remapToPy:D,remapToJs:R}=Sk.ffi,intRound=t=>E(t).nb$int(),q=$,C=new w("auto"),U=new w("utcoffset"),Y=new w("tzname"),j=new w("as_integer_ratio"),F=new w("dst"),H=new w("isoformat"),J=new w("replace"),B=new w("fromtimestamp"),G=new w("fromordinal"),L=new w("utcfromtimestamp"),X=new w("strftime"),P=new w("fromutc"),W=new f(0),Z=new d(0),K=new f(7),V=new f(60),Q=new f(3600),tt=new f(1e3),et=new f(1e6),nt=new d(1e6),it=new f(86400),st=new d(86400);let ot=null;function pyDivMod(t,e){return q(t,e,"DivMod").v}function $divMod(t,e){if("number"!=typeof t||"number"!=typeof e)return t=JSBI.BigInt(t),e=JSBI.BigInt(e),[JSBI.toNumber(JSBI.divide(t,e)),JSBI.toNumber(JSBI.remainder(t,e))];if(0===e)throw new A("integer division or modulo by zero");return[Math.floor(t/e),t-Math.floor(t/e)*e]}function modf(t){const e=(t=I(t))<0?-1:1;return t=Math.abs(t),[new d(e*(t-Math.floor(t))),new d(e*Math.floor(t))]}function _d(t,e="0",n=2){return t.toString().padStart(n,e)}const rt=/^[0-9]+$/;function _as_integer(t){if(!rt.test(t))throw new Error;return parseInt(t)}function _as_int_ratio(t){let e=r(t.tp$getattr(j));if(!(e instanceof p))throw new z("unexpected return type from as_integer_ratio(): expected tuple, got \'"+c(e)+"\'");if(e=e.v,2!==e.length)throw new v("as_integer_ratio() must return a 2-tuple");return e}return Sk.misceval.chain(Sk.importModule("time",!1,!0),(a=>{const $=a.$d,E={__name__:new w("datetime"),__all__:new Sk.builtin.list(["date","datetime","time","timedelta","timezone","tzinfo","MINYEAR","MAXYEAR"].map((t=>new w(t))))};function _cmp(t,e){for(let n=0;ne[n]?1:-1;return 0}function _do_compare(t,e,n){const i=t.$cmp(e,n);switch(n){case"Lt":return i<0;case"LtE":return i<=0;case"Eq":return 0===i;case"NotEq":return 0!==i;case"Gt":return i>0;case"GtE":return i>=0}}const j=9999;E.MINYEAR=new f(1),E.MAXYEAR=new f(j);const rt=3652059,at=[-1,31,28,31,30,31,30,31,31,30,31,30,31],$t=[-1];let ct=0;function _is_leap(t){return t%4==0&&(t%100!=0||t%400==0)}function _days_before_year(t){const e=t-1;return 365*e+Math.floor(e/4)-Math.floor(e/100)+Math.floor(e/400)}function _days_before_month(t,e){return $t[e]+(e>2&&_is_leap(t))}function _ymd2ord(t,e,n){return _days_before_year(t)+_days_before_month(t,e)+n}at.slice(1).forEach((t=>{$t.push(ct),ct+=t}));const ht=_days_before_year(401),mt=_days_before_year(101),ut=_days_before_year(5);function _ord2ymd(t){if((t=n(t))>Number.MAX_SAFE_INTEGER)throw new M("Python int too large to convert to js number");if(t<1)throw new v("ordinal must be >= 1");let e,i,s,o;t-=1,[e,t]=$divMod(t,ht);let r=400*e+1;if([i,t]=$divMod(t,mt),[s,t]=$divMod(t,ut),[o,t]=$divMod(t,365),r+=100*i+4*s+o,4===o||4===i)return[r-1,12,31].map((t=>new f(t)));const a=3===o&&(24!==s||3===i);let $=t+50>>5,c=$t[$]+($>2&&a);return c>t&&($-=1,c-=at[$]+(2===$&&a)),[r,$,(t-=c)+1].map((t=>new f(t)))}const lt=[null,"Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],ft=[null,"Mon","Tue","Wed","Thu","Fri","Sat","Sun"];function _build_struct_time(t,e,n,i,s,o,r){const a=(_ymd2ord(t,e,n)+6)%7,c=_days_before_month(t,e)+n;return $.struct_time.tp$call([new p([t,e,n,i,s,o,a,c,r].map((t=>new f(t))))])}const dt={hours:t=>_d(t),minutes:(t,e)=>_d(t)+":"+_d(e),seconds:(t,e,n)=>_d(t)+":"+_d(e)+":"+_d(n),milliseconds:(t,e,n,i)=>_d(t)+":"+_d(e)+":"+_d(n)+"."+_d(i,"0",3),microseconds:(t,e,n,i)=>_d(t)+":"+_d(e)+":"+_d(n)+"."+_d(i,"0",6)};function _format_time(t,e,n,i,s="auto"){if("string"!=typeof s&&!k(s))throw new z("must be str, not "+c(s));"auto"===(s=s.toString())?s=i?"microseconds":"seconds":"milliseconds"===s&&(i=Math.floor(i/1e3));let o=dt[s];if(void 0===o)throw new v("Unknown timespec value");return o(t,e,n,i)}function _format_offset(t){let e,n="";if(t!==y){let i,s,o;return t.$days<0?(e="-",t=new wt(-t.$days,-t.$secs,-t.$micro)):e="+",[i,s]=pyDivMod(t,pt),[s,o]=pyDivMod(s,gt),n+=e+`${_d(i)}:${_d(s)}`,(o.$secs||o.$micro)&&(n+=":"+_d(o.$secs,"0",2),o.$micro&&(n+="."+_d(o.$micro,"0",6))),n}}function _wrap_strftime(t,e,n){let i=null,s=null,o=null,a=[],c=0;const h=e.length;for(;cnew f(t)))}function _parse_hh_mm_ss_ff(t){const e=t.length,n=[0,0,0,0];let i=0;for(let s=0;s<3;s++){if(e-i<2)throw new v("Incomplete time component");n[s]=_as_integer(t.slice(i,i+2)),i+=2;const o=t.substr(i,1);if(!o||s>=2)break;if(":"!==o)throw new v("Invalid time separator: "+o);i+=1}if(i0?t.slice(0,e-1):t),s=y;if(e>0){if(n=t.slice(e),![5,8,15].includes(n.length))throw new v("Malformed time zone string");const i=_parse_hh_mm_ss_ff(n);if(i.every((t=>0===t)))s=St.prototype.utc;else{const n="-"===t[e-1]?-1:1,o=new wt(0,n*(3600*i[0]+60*i[1]+i[2]),n*i[3]);s=new St(o)}}return i=i.map((t=>new f(t))),i.push(s),i}function _check_tzname(t){if(t!==y&&!k(t))throw new z("tzinfo.tzname() must return None or string, not \'"+c(t)+"\'")}function _check_utc_offset(t,n){if(n!==y){if(!(n instanceof wt))throw new z(`tzinfo.${t}() must return None or timedelta, not \'${c(n)}\'`);if(!e(zt,n,"Lt")||!e(n,_t,"Lt"))throw new v(`${t}()=${n.toString()}, must be strictly between -timedelta(hours=24) and timedelta(hours=24)`)}}function _check_date_fields(t,e=null,i=null){if(null===e||null===i){throw new z(`function missing required argument \'${null===i?"day":"month"}\' (pos ${null===i?"3":"2"})`)}if(t=n(t),e=n(e),i=n(i),!(1<=t&&t<=j))throw new v("year must be in 1..9999",new f(t));if(!(1<=e&&e<=12))throw new v("month must be in 1..12",new f(e));const s=function _days_in_month(t,e){return 2===e&&_is_leap(t)?29:at[e]}(t,e);if(!(1<=i&&i<=s))throw new v("day must be in 1.."+s,new f(i));return[t,e,i]}function _check_time_fields(t,e,i,s,o){if(t=n(t),e=n(e),i=n(i),s=n(s),o=n(o),!(0<=t&&t<=23))throw new v("hour must be in 0..23",new f(t));if(!(0<=e&&e<=59))throw new v("minute must be in 0..59",new f(e));if(!(0<=i&&i<=59))throw new v("second must be in 0..59",new f(i));if(!(0<=s&&s<=999999))throw new v("microsecond must be in 0..999999",new f(s));if(0!==o&&1!==o)throw new v("fold must be either 0 or 1",new f(o));return[t,e,i,s,o]}function _check_tzinfo_arg(t){if(t!==y&&!(t instanceof Mt))throw new z("tzinfo argument must be None or of a tzinfo subclass")}function _divide_and_round(t,e){let[n,i]=$divMod(t,e);return i*=2,((e>0?i>e:i999999999)throw new M(`days=${t}; must have magnitude <= 999999999`)},slots:{tp$new(t,e){let i,s,o,r,a,$,c,[h,m,u,d,w,_,p]=l("timedelta",["days","seconds","microseconds","milliseconds","minutes","hours","weeks"],t,e,new Array(7).fill(W));i=s=o=W,h=q(h,q(p,K,"Mult"),"Add"),m=q(m,q(q(w,V,"Mult"),q(_,Q,"Mult"),"Add"),"Add"),u=q(u,q(d,tt,"Mult"),"Add"),S(h)?([r,h]=modf(h),[a,$]=modf(q(r,st,"Mult")),s=new f($),i=new f(h)):(a=Z,i=h),S(m)?([c,m]=modf(m),m=new f(m),c=q(c,a,"Add")):c=a,[h,m]=pyDivMod(m,it),i=q(i,h,"Add"),s=q(s,new f(m),"Add");const g=q(c,nt,"Mult");if(S(u)?(u=intRound(q(u,g,"Add")),[m,u]=pyDivMod(u,et),[h,m]=pyDivMod(m,it),i=q(i,h,"Add"),s=q(s,m,"Add")):(u=new f(u),[m,u]=pyDivMod(u,et),[h,m]=pyDivMod(m,it),i=q(i,h,"Add"),s=q(s,m,"Add"),u=intRound(q(u,g,"Add"))),[m,o]=pyDivMod(u,et),s=q(s,m,"Add"),[h,s]=pyDivMod(s,it),i=q(i,h,"Add"),i=n(i),s=n(s),o=n(o),Math.abs(i)>999999999)throw new M("timedelta # of days is too large: "+h.toString());if(this===wt.prototype)return new wt(i,s,o);{const t=new this.constructor;return wt.call(t,i,s,o),t}},$r(){const t=[];return this.$days&&t.push(`days=${this.$days}`),this.$secs&&t.push(`seconds=${this.$secs}`),this.$micro&&t.push(`microseconds=${this.$micro}`),t.length||t.push("0"),new w(`${this.tp$name}(${t.join(", ")})`)},tp$str(){const t=this.$secs%60;let e=Math.floor(this.$secs/60);const n=Math.floor(e/60);e%=60;let i=`${n}:${_d(e)}:${_d(t)}`;if(this.$days){i=`${this.$days} day${function plural(t){return 1!==Math.abs(t)?"s":""}(this.$days)}, `+i}return this.$micro&&(i+=`.${_d(this.$micro,"0",6)}`),new w(i)},tp$as_number:!0,nb$add(t){return t instanceof wt?new wt(this.$days+t.$days,this.$secs+t.$secs,this.$micro+t.$micro):b},nb$subtract(t){return t instanceof wt?new wt(this.$days-t.$days,this.$secs-t.$secs,this.$micro-t.$micro):b},nb$positive(){return this},nb$negative(){return new wt(-this.$days,-this.$secs,-this.$micro)},nb$abs(){return this.$days<0?this.nb$negative():this},nb$multiply(t){if(O(t))return t=i(t,M),new wt(this.$days*t,this.$secs*t,this.$micro*t);if(S(t)){const e=this.$toMicrosecs();let[s,o]=_as_int_ratio(t);return s=i(s,M),o=n(o),new wt(0,0,_divide_and_round(e*s,o))}return b},nb$floor_divide(t){const e=this.$toMicrosecs();if(t instanceof wt){const n=t.$toMicrosecs();if(0===n)throw new A("integer division or modulo by zero");return new f(Math.floor(e/n))}if(O(t)){if(0===(t=i(t,M)))throw new A("integer division or modulo by zero");return new wt(0,0,Math.floor(e/t))}return b},nb$divide(t){const e=this.$toMicrosecs();if(t instanceof wt){if(0===t.$toMicrosecs())throw new A("integer division or modulo by zero");return new d(e/t.$toMicrosecs())}if(O(t))return t=n(t),new wt(0,0,_divide_and_round(e,t));if(S(t)){let[s,o]=_as_int_ratio(t);return s=n(s),o=i(o,M),new wt(0,0,_divide_and_round(o*e,s))}return b},nb$remainder(t){if(!(t instanceof wt))return b;const e=this.$toMicrosecs(),n=t.$toMicrosecs();if(0===n)throw new A("integer division or modulo by zero");const i=e-Math.floor(e/n)*n;return new wt(0,0,i)},nb$divmod(t){if(!(t instanceof wt))return b;const e=this.$toMicrosecs(),n=t.$toMicrosecs(),[i,s]=$divMod(e,n);return new p([new f(i),new wt(0,0,s)])},tp$richcompare(t,e){return t instanceof wt?_do_compare(this,t,e):b},tp$hash(){return-1===this.$hashcode&&(this.$hashcode=u(new p(this.$getState().map((t=>new f(t)))))),this.$hashcode},nb$bool(){return 0!==this.$days||0!==this.$secs||0!==this.$micro}},methods:{total_seconds:{$meth(){return new d(((86400*this.$days+this.$secs)*10**6+this.$micro)/10**6)},$flags:{NoArgs:!0},$doc:"Total seconds in the duration."},__reduce__:{$meth(){return new p([this.ob$type,new p(this.$getState().map((t=>D(t))))])},$flags:{NoArgs:!0},$textsig:null,$doc:"__reduce__() -> (cls, state)"}},getsets:{days:{$get(){return new f(this.$days)},$doc:"Number of days."},seconds:{$get(){return new f(this.$secs)},$doc:"Number of seconds (>= 0 and less than 1 day)."},microseconds:{$get(){return new f(this.$micro)},$doc:"Number of microseconds (>= 0 and less than 1 second)."}},proto:{$toMicrosecs(){return 1e6*(86400*this.$days+this.$secs)+this.$micro},$cmp(t){return _cmp(this.$getState(),t.$getState())},$getState(){return[this.$days,this.$secs,this.$micro]}}});wt.prototype.min=new wt(-999999999),wt.prototype.max=new wt(999999999,86399,999999),wt.prototype.resolution=new wt(0,0,1);const _t=new wt(1),pt=new wt(0,3600),gt=new wt(0,60),yt=new wt(0,1),bt=new wt(0),zt=new wt(-1),vt=E.date=h("datetime.date",{constructor:function date(t,e,n){this.$year=t,this.$month=e,this.$day=n,this.$hashcode=-1},slots:{tp$new(t,e){let n,[i,s,o]=l("date",["year","month","day"],t,e,[null,null]);if(null===s&&i instanceof _&&4===(n=i.valueOf()).length&&1<=n[2]&&n[2]<=12){const t=new this.constructor;return t.$setState(n),t}if([i,s,o]=_check_date_fields(i,s,o),this===vt.prototype)return new vt(i,s,o);{const t=new this.constructor;return vt.call(t,i,s,o),t}},$r(){return new w(`${this.tp$name}(${this.$year}, ${this.$month}, ${this.$day})`)},tp$str(){return this.tp$getattr(H).tp$call([])},tp$richcompare(t,e){return t instanceof vt?_do_compare(this,t,e):b},tp$hash(){return-1===this.$hashcode&&(this.$hashcode=u(this.$getState())),this.$hashcode},tp$as_number:!0,nb$add(t){if(t instanceof wt){const e=this.$toOrdinal()+t.$days;if(0 local date from a POSIX timestamp (like time.time())."},fromordinal:{$meth:function fromordinal(t){return this.tp$call(_ord2ymd(t))},$flags:{OneArg:!0},$textsig:null,$doc:"int -> date corresponding to a proleptic Gregorian ordinal."},fromisocalendar:{$meth:function fromisocalendar(t,e,i){if(t=n(t),e=n(e),i=n(i),!(1<=t&&t<=j))throw new v(`Year is out of range: ${t}`);let s,o;if(!(0 date corresponding to a proleptic Gregorian ordinal."},fromisoformat:{$meth:function fromisoformat(t){if(!k(t))throw new z("fromisoformat: argument must be str");t=t.toString();try{if(10!==t.length)throw new Error;return this.tp$call(_parse_isoformat_date(t))}catch(e){throw new v("Invalid isoformat string: \'"+t+"\'")}},$flags:{OneArg:!0},$textsig:null,$doc:"str -> Construct a date from the output of date.isoformat()"},today:{$meth:function today(){const t=$.time.tp$call([]);return this.tp$getattr(B).tp$call([t])},$flags:{NoArgs:!0},$textsig:null,$doc:"Current date or datetime: same as self.__class__.fromtimestamp(time.time())."}},methods:{ctime:{$meth:function ctime(){const t=this.$toOrdinal()%7||7,e=ft[t],n=lt[this.$month];return new w(`${e} ${n} ${_d(this.$day," ",2)} 00:00:00 ${_d(this.$year,"0",4)}`)},$flags:{NoArgs:!0},$textsig:null,$doc:"Return ctime() style string."},strftime:{$meth:function strftime(t){if(!k(t))throw new z("must be str, not "+c(t));return _wrap_strftime(this,t=t.toString(),this.$timetuple())},$flags:{OneArg:!0},$textsig:null,$doc:"format -> strftime() style string."},__format__:{$meth:function __format__(t){if(!k(t))throw new z("must be str, not "+c(t));return t!==w.$empty?this.tp$getattr(X).tp$call([t]):this.tp$str()},$flags:{OneArg:!0},$textsig:null,$doc:"Formats self with strftime."},timetuple:{$meth:function timetuple(){return this.$timetuple()},$flags:{NoArgs:!0},$textsig:null,$doc:"Return time tuple, compatible with time.localtime()."},isocalendar:{$meth:function isocalendar(){let t=this.$year,e=_isoweek1monday(t);const n=_ymd2ord(this.$year,this.$month,this.$day);let[i,s]=$divMod(n-e,7);return i<0?(t-=1,e=_isoweek1monday(t),[i,s]=$divMod(n-e,7)):i>=52&&n>=_isoweek1monday(t+1)&&(t+=1,i=0),new At(new f(t),new f(i+1),new f(s+1))},$flags:{NoArgs:!0},$textsig:null,$doc:"Return a 3-tuple containing ISO year, week number, and weekday."},isoformat:{$meth:function isoformat(){return this.$isoformat()},$flags:{NoArgs:!0},$textsig:null,$doc:"Return string in ISO 8601 format, YYYY-MM-DD."},isoweekday:{$meth:function isoweekday(){return new f(this.$toOrdinal()%7||7)},$flags:{NoArgs:!0},$textsig:null,$doc:"Return the day of the week represented by the date.\\nMonday == 1 ... Sunday == 7"},toordinal:{$meth:function toordinal(){return new f(this.$toOrdinal())},$flags:{NoArgs:!0},$textsig:null,$doc:"Return proleptic Gregorian ordinal. January 1 of year 1 is day 1."},weekday:{$meth:function weekday(){return new f((this.$toOrdinal()+6)%7)},$flags:{NoArgs:!0},$textsig:null,$doc:"Return the day of the week represented by the date.\\nMonday == 0 ... Sunday == 6"},replace:{$meth:function replace(t,e,n){return t===y&&(t=new f(this.$year)),e===y&&(e=new f(this.$month)),n===y&&(n=new f(this.$day)),this.ob$type.tp$call([t,e,n])},$flags:{NamedArgs:["year","month","day"],Defaults:[y,y,y]},$textsig:null,$doc:"Return date with new specified fields."},__reduce__:{$meth(){return new p([this.ob$type,new p([this.$getState()])])},$flags:{NoArgs:!0},$textsig:null,$doc:"__reduce__() -> (cls, state)"}},getsets:{year:{$get(){return new f(this.$year)},$doc:"year (1-9999)"},month:{$get(){return new f(this.$month)},$doc:"month (1-12)"},day:{$get(){return new f(this.$day)},$doc:"day (1-31)"}},proto:{$cmp(t){return _cmp([this.$year,this.$month,this.$day],[t.$year,t.$month,t.$day])},$getState(){const[t,e]=$divMod(this.$year,256);return new _([t,e,this.$month,this.$day])},$setState(t){const[e,n,i,s]=t,o=256*e+n;this.$year=o,this.$month=i,this.$day=s},$toOrdinal(){return _ymd2ord(this.$year,this.$month,this.$day)},$isoformat(){return new w(`${_d(this.$year,"0",4)}-${_d(this.$month,"0",2)}-${_d(this.$day,"0",2)}`)},$timetuple(){return _build_struct_time(this.$year,this.$month,this.$day,this.$hour||0,this.$min||0,this.$sec||0,-1)},$strftime(t=""){return _wrap_strftime(this,t.toString(),this.$timetuple())}}});vt.prototype.min=new vt(1,1,1),vt.prototype.max=new vt(9999,12,31),vt.prototype.resolution=new wt(1);const Mt=E.tzinfo=h("datetime.tzinfo",{constructor:function tzinfo(){},methods:{tzname:{$meth:function tzname(t){throw new x("tzinfo subclass must override tzname()")},$flags:{OneArg:!0},$textsig:null,$doc:"datetime -> string name of time zone."},utcoffset:{$meth:function utcoffset(t){throw new x("tzinfo subclass must override utcoffset()")},$flags:{OneArg:!0},$textsig:null,$doc:"datetime -> timedelta showing offset from UTC, negative values indicating West of UTC"},dst:{$meth:function dst(t){throw new x("tzinfo subclass must override dst()")},$flags:{OneArg:!0},$textsig:null,$doc:"datetime -> DST offset as timedelta positive east of UTC."},fromutc:{$meth:function fromutc(e){if(!(e instanceof Nt))throw new z("fromutc() requires a datetime argument");if(e.$tzinfo!==this)throw new v("dt.tzinfo is not self");const n=r(e.tp$getattr(U));if(n===y)throw new v("fromutc() requires a non-None utcoffset() result");let i=r(e.tp$getattr(F));if(i===y)throw new v("fromutc() requires a non-None dst() result");const s=q(n,i,"Sub");if(t(s)&&(e=q(e,s,"Add"),i=r(e.tp$getattr(F)),i===y))throw new v("fromutc(): dt.dst gave inconsistent results; cannot convert");return q(e,i,"Add")},$flags:{OneArg:!0},$textsig:null,$doc:"datetime in UTC -> datetime in local time."},__reduce__:{$meth(){let e,n;const i=T(this,new w("__getinitargs__"),y);e=i!==y?r(i,[]):new p;const s=T(this,new w("__getstate__"),y);return s!==y?n=r(s,[]):(n=T(this,new w("__dict__"),y),n=t(n)?n:y),new p(n===y?[this.ob$type,e]:[this.ob$type,e,n])},$flags:{NoArgs:!0},$textsig:null,$doc:"-> (cls, state)"}}}),At=h("datetime.IsoCalendarDate",{base:p,constructor:function IsoCalendarDate(t,e,n){this.y=t,this.w=e,this.wd=n,p.call(this,[t,e,n])},slots:{tp$new(t,e){const[n,i,s]=l("IsoCalendarDate",["year","week","weekday"],t,e);return new this.constructor(n,i,s)},$r(){return new w(`${this.tp$name}(year=${this.y}, week=${this.w}, weekday=${this.wd})`)}},getsets:{year:{$get(){return this.y}},week:{$get(){return this.w}},weekday:{$get(){return this.wd}}}}),xt=E.time=h("datetime.time",{constructor:function time(t=0,e=0,n=0,i=0,s=null,o=0){this.$hour=t,this.$min=e,this.$sec=n,this.$micro=i,this.$tzinfo=s||y,this.$fold=o,this.$hashcode=-1},slots:{tp$new(t,e){m("time",t,0,5);let n,[i,s,o,r,a,$]=l("time",["hour","minute","second","microsecond","tzinfo","fold"],t,e,[W,W,W,W,y,W]);if(i instanceof _&&6===(n=i.valueOf()).length&&(127&n[0])<24){const t=new this.constructor;return t.$setState(n,s===W?y:s),t}if([i,s,o,r,$]=_check_time_fields(i,s,o,r,$),_check_tzinfo_arg(a),this===xt.prototype)return new xt(i,s,o,r,a,$);{const t=new this.constructor;return xt.call(t,i,s,o,r,a,$),t}},tp$richcompare(t,e){return t instanceof xt?_do_compare(this,t,e):b},tp$hash(){if(-1===this.$hashcode){const e=this.$fold?r(this.tp$getattr(J),[],["fold",W]):this,n=r(e.tp$getattr(U));if(t(n)){let[t,e]=pyDivMod(new wt(0,3600*this.$hour+60*this.$min).nb$subtract(n),pt);e=e.nb$floor_divide(gt),0<=t&&t<=24?(t=I(t),e=I(e),this.$hashcode=u(new xt(t,e,this.$sec,this.$micro))):this.$hashcode=u(new p([t,e,new f(this.$sec),new f(this.$micro)]))}else this.$hashcode=u(e.$getState()[0])}return this.$hashcode},$r(){let t;return t=0!==this.$micro?`, ${this.$sec}, ${this.$micro}`:0!==this.$sec?`, ${this.$sec}`:"",t=`${this.tp$name}(${this.$hour}, ${this.$min}${t})`,this.$tzinfo!==y&&(t=t.slice(0,-1)+", tzinfo="+s(this.$tzinfo)+")"),this.$fold&&(t=t.slice(0,-1)+", fold=1)"),new w(t)},tp$str(){return this.tp$getattr(H).tp$call([])}},methods:{isoformat:{$meth:function isoformat(t){let e=_format_time(this.$hour,this.$min,this.$sec,this.$micro,t);const n=this.$tzstr();return n&&(e+=n),new w(e)},$flags:{NamedArgs:["timespec"],Defaults:[C]},$textsig:null,$doc:"Return string in ISO 8601 format, [HH[:MM[:SS[.mmm[uuu]]]]][+HH:MM].\\n\\ntimespec specifies what components of the time to include.\\n"},strftime:{$meth:function strftime(t){if(!k(t))throw new z("must be str, not "+c(t));return _wrap_strftime(this,t=t.toString(),new p([1900,1,1,this.$hour,this.$min,this.$sec,0,1,-1].map((t=>new f(t)))))},$flags:{OneArg:!0},$textsig:null,$doc:"format -> strftime() style string."},__format__:{$meth:function __format__(t){if(!k(t))throw new z("must be str, not "+c(t));return t!==w.$empty?this.tp$getattr(X).tp$call([t]):this.tp$str()},$flags:{OneArg:!0},$textsig:null,$doc:"Formats self with strftime."},utcoffset:{$meth:function utcoffset(){if(this.$tzinfo===y)return y;const t=this.$tzinfo.tp$getattr(U),e=r(t,[y]);return _check_utc_offset("utcoffset",e),e},$flags:{NoArgs:!0},$textsig:null,$doc:"Return self.tzinfo.utcoffset(self)."},tzname:{$meth:function tzname(){if(this.$tzinfo===y)return y;const t=this.$tzinfo.tp$getattr(Y),e=r(t,[y]);return _check_tzname(e),e},$flags:{NoArgs:!0},$textsig:null,$doc:"Return self.tzinfo.tzname(self)."},dst:{$meth:function dst(){if(this.$tzinfo===y)return y;const t=this.$tzinfo.tp$getattr(F),e=r(t,[y]);return _check_utc_offset("dst",e),e},$flags:{NoArgs:!0},$textsig:null,$doc:"Return self.tzinfo.dst(self)."},replace:{$meth:function replace(t,e){m("replace",t,0,5);let[n,i,s,o,r,a]=l("replace",["hour","minute","second","microsecond","tzinfo","fold"],t,e,[y,y,y,y,g,y]);return n===y&&(n=new f(this.$hour)),i===y&&(i=new f(this.$min)),s===y&&(s=new f(this.$sec)),o===y&&(o=new f(this.$micro)),r===g&&(r=this.$tzinfo),a===y&&(a=new f(this.$fold)),this.ob$type.tp$call([n,i,s,o,r],["fold",a])},$flags:{FastCall:!0},$textsig:null,$doc:"Return time with new specified fields."},__reduce_ex__:{$meth(t){return new p([this.ob$type,new p(this.$getState(R(t)))])},$flags:{OneArg:!0},$textsig:null,$doc:"__reduce_ex__(proto) -> (cls, state)"},__reduce__:{$meth(){return this.tp$getattr(new w("__reduce_ex__")).tp$call([new f(2)])},$flags:{NoArgs:!0},$textsig:null,$doc:"__reduce__() -> (cls, state)"}},classmethods:{fromisoformat:{$meth:function fromisoformat(t){if(!k(t))throw new z("fromisoformat: argument must be str");t=t.toString();try{return this.tp$call(_parse_isoformat_time(t))}catch{throw new v("Invalid isofrmat string: \'"+t+"\'")}},$flags:{OneArg:!0},$textsig:null,$doc:"string -> time from time.isoformat() output"}},getsets:{hour:{$get(){return new f(this.$hour)}},minute:{$get(){return new f(this.$min)}},second:{$get(){return new f(this.$sec)}},microsecond:{$get(){return new f(this.$micro)}},tzinfo:{$get(){return this.$tzinfo}},fold:{$get(){return new f(this.$fold)}}},proto:{$cmp(t,n){const s=this.$tzinfo,o=t.$tzinfo;let a,$,c;if(a=$=y,s===o?c=!0:(a=r(this.tp$getattr(U)),$=r(t.tp$getattr(U)),c=e(a,$,"Eq")),c)return _cmp([this.$hour,this.$min,this.$sec,this.$micro],[t.$hour,t.$min,t.$sec,t.$micro]);if(a===y||$===y){if("Eq"===n||"NotEq"===n)return 2;throw new z("cannot compare naive and aware times")}const h=60*this.$hour+this.$min-i(a.nb$floor_divide(gt)),m=60*t.$hour+t.$min-i($.nb$floor_divide(gt));return _cmp([h,this.$sec,this.$micro],[m,t.$sec,t.$micro])},$tzstr(){return _format_offset(r(this.tp$getattr(U)))},$getState(t=3){let[e,n]=$divMod(this.$micro,256),[i,s]=$divMod(e,256),o=this.$hour;this.$fold&&t>3&&(o+=128);const r=new _([o,this.$min,this.$sec,i,s,n]);return this.$tzinfo===y?[r]:[r,this.$tzinfo]},$setState(t,e){const[n,i,s,o,r,a]=t;n>127?(this.$fold=1,this.$hour=n-128):(this.$fold=0,this.$hour=n),this.$min=i,this.$sec=s,this.$micro=(o<<8|r)<<8|a,this.$tzinfo=e}}});xt.prototype.min=new xt(0,0,0),xt.prototype.max=new xt(23,59,59,999999),xt.prototype.resolution=new wt;const Nt=E.datetime=h("datetime.datetime",{base:vt,constructor:function datetime(t,e,n,i=0,s=0,o=0,r=0,a=null,$=0){this.$year=t,this.$month=e,this.$day=n,this.$hour=i,this.$min=s,this.$sec=o,this.$micro=r,this.$tzinfo=a||y,this.$fold=$,this.$hashcode=-1},slots:{tp$new(t,e){m("datetime",t,0,9);let n,[i,s,o,r,a,$,c,h,u]=l("time",["year","month","day","hour","minute","second","microsecond","tzinfo","fold"],t,e,[null,null,W,W,W,W,y,W]);if(i instanceof _&&10===(n=i.valueOf()).length&&(127&n[2])<=12){const t=new this.constructor;return t.$setState(n,null===s?y:s),t}if([i,s,o]=_check_date_fields(i,s,o),[r,a,$,c,u]=_check_time_fields(r,a,$,c,u),_check_tzinfo_arg(h),this===Nt.prototype)return new Nt(i,s,o,r,a,$,c,h,u);{const t=new this.constructor;return Nt.call(t,i,s,o,r,a,$,c,h,u),t}},$r(){const t=[this.$year,this.$month,this.$day,this.$hour,this.$min,this.$sec,this.$micro];0===t[t.length-1]&&t.pop(),0===t[t.length-1]&&t.pop();let e=`${this.tp$name}(${t.join(", ")})`;return this.$tzinfo!==y&&(e=e.slice(0,-1)+", tzinfo="+s(this.$tzinfo)+")"),this.$fold&&(e=e.slice(0,-1)+", fold=1)"),new w(e)},tp$str(){return this.tp$getattr(H).tp$call([],["sep",new w(" ")])},tp$richcompare(t,e){if(t instanceof Nt)return _do_compare(this,t,e);if(!(t instanceof vt))return b;if("Eq"===e||"NotEq"===e)return"NotEq"===e;throw new z(`can\'t compare \'${c(this)}\' to \'${c(t)}\'`)},tp$as_number:!0,nb$add(t){if(!(t instanceof wt))return b;let e=new wt(this.$toOrdinal(),3600*this.$hour+60*this.$min+this.$sec,this.$micro);e=q(e,t,"Add");let[n,i]=$divMod(e.$secs,3600),[s,o]=$divMod(i,60);if(0 string in ISO 8601 format, YYYY-MM-DDT[HH[:MM[:SS[.mmm[uuu]]]]][+HH:MM].\\nsep is used to separate the year from the time, and defaults to \'T\'.\\ntimespec specifies what components of the time to include (allowed values are \'auto\', \'hours\', \'minutes\', \'seconds\', \'milliseconds\', and \'microseconds\').\\n"},utcoffset:{$meth:function utcoffset(){if(this.$tzinfo===y)return y;const t=this.$tzinfo.tp$getattr(U),e=r(t,[this]);return _check_utc_offset("utcoffset",e),e},$flags:{NoArgs:!0},$textsig:null,$doc:"Return self.tzinfo.utcoffset(self)."},tzname:{$meth:function tzname(){if(this.$tzinfo===y)return y;const t=this.$tzinfo.tp$getattr(Y),e=r(t,[this]);return _check_tzname(e),e},$flags:{NoArgs:!0},$textsig:null,$doc:"Return self.tzinfo.tzname(self)."},dst:{$meth:function dst(){if(this.$tzinfo===y)return y;const t=this.$tzinfo.tp$getattr(F),e=r(t,[this]);return _check_utc_offset("dst",e),e},$flags:{NoArgs:!0},$textsig:null,$doc:"Return self.tzinfo.dst(self)."},replace:{$meth:function replace(t,e){m("replace",t,0,8);let[n,i,s,o,r,a,$,c,h]=l("replace",["year","month","day","hour","minute","second","microsecond","tzinfo","fold"],t,e,[y,y,y,y,y,y,y,g,y]);return n===y&&(n=new f(this.$year)),i===y&&(i=new f(this.$month)),s===y&&(s=new f(this.$day)),o===y&&(o=new f(this.$hour)),r===y&&(r=new f(this.$min)),a===y&&(a=new f(this.$sec)),$===y&&($=new f(this.$micro)),c===g&&(c=this.$tzinfo),h===y&&(h=new f(this.$fold)),this.ob$type.tp$call([n,i,s,o,r,a,$,c],["fold",h])},$flags:{FastCall:!0},$textsig:null,$doc:"Return datetime with new specified fields."},astimezone:{$meth:function astimezone(t){if(t===y)t=this.$localTimezone();else if(!(t instanceof Mt))throw new z("tz argument must be an instance of tzinfo");let e,n=this.$tzinfo;if(n===y?(n=this.$localTimezone(),e=r(n.tp$getattr(U),[this])):(e=r(n.tp$getattr(U),[this]),e===y&&(n=r(this.tp$getattr(J),[],["tzinfo",y]).$localTimezone(),e=r(n.tp$getattr(U),[this]))),t===n)return this;const i=r(this.nb$subtract(e).tp$getattr(J),[],["tzinfo",t]);return t.tp$getattr(P).tp$call([i])},$flags:{NamedArgs:["tz"],Defaults:[y]},$textsig:null,$doc:"tz -> convert to local time in new timezone tz\\n"},__reduce_ex__:{$meth(t){return new p([this.ob$type,new p(this.$getState(R(t)))])},$flags:{OneArg:!0},$textsig:null,$doc:"__reduce_ex__(proto) -> (cls, state)"},__reduce__:{$meth(){return this.tp$getattr(new w("__reduce_ex__")).tp$call([new f(2)])},$flags:{NoArgs:!0},$textsig:null,$doc:"__reduce__() -> (cls, state)"}},classmethods:{now:{$meth:function now(t){const e=$.time.tp$call([]);return this.tp$getattr(B).tp$call([e,t])},$flags:{NamedArgs:["tz"],Defaults:[y]},$textsig:"($type, /, tz=None)",$doc:"Returns new datetime object representing current time local to tz.\\n\\n tz\\n Timezone object.\\n\\nIf no tz is specified, uses local timezone."},utcnow:{$meth:function utcnow(){const t=$.time.tp$call([]);return this.tp$getattr(L).tp$call([t])},$flags:{NoArgs:!0},$textsig:null,$doc:"Return a new datetime representing UTC day and time."},fromtimestamp:{$meth:function fromtimestamp(t,e){return _check_tzinfo_arg(e),this.prototype.$fromtimestamp.call(this,t,e!==y,e)},$flags:{NamedArgs:["timestamp","tz"],Defaults:[y]},$textsig:null,$doc:"timestamp[, tz] -> tz\'s local time from POSIX timestamp."},utcfromtimestamp:{$meth:function utcfromtimestamp(t){return this.prototype.$fromtimestamp.call(this,t,!0,y)},$flags:{OneArg:!0},$textsig:null,$doc:"Construct a naive UTC datetime from a POSIX timestamp."},strptime:{$meth:function strptime(t,e){return null===ot?Sk.misceval.chain(Sk.importModule("_strptime",!1,!0),(n=>(ot=n.tp$getattr(new w("_strptime_datetime")),ot.tp$call([this,t,e])))):ot.tp$call([this,t,e])},$flags:{MinArgs:2,MaxArgs:2},$textsig:null,$doc:"string, format -> new datetime parsed from a string (like time.strptime())."},combine:{$meth:function combine(t,e,n){if(!(t instanceof vt))throw new z("date argument must be a date instance");if(!(e instanceof xt))throw new z("time argument must be a time instance");n===g&&(n=e.$tzinfo);const i=[t.$year,t.$month,t.$day,e.$hour,e.$min,e.$sec,e.$micro].map((t=>new f(t)));return i.push(n),this.tp$call(i,["fold",new f(e.$fold)])},$flags:{NamedArgs:["date","time","tzinfo"],Defaults:[g]},$textsig:null,$doc:"date, time -> datetime with same date and time fields"},fromisoformat:{$meth:function fromisoformat(t){if(!k(t))throw new z("fromisoformat: argument must be str");const e=(t=t.toString()).slice(0,10),n=t.slice(11);let i,s;try{i=_parse_isoformat_date(e)}catch(o){throw new v("Invalid isoformat string: \'"+t+"\'")}if(n)try{s=_parse_isoformat_time(n)}catch(o){throw new v("Invalid isoformat string: \'"+t+"\'")}else s=[W,W,W,W,y];return this.tp$call(i.concat(s))},$flags:{OneArg:!0},$textsig:null,$doc:"string -> datetime from datetime.isoformat() output"}},getsets:{hour:{$get(){return new f(this.$hour)}},minute:{$get(){return new f(this.$min)}},second:{$get(){return new f(this.$sec)}},microsecond:{$get(){return new f(this.$micro)}},tzinfo:{$get(){return this.$tzinfo}},fold:{$get(){return new f(this.$fold)}}},proto:{$cmp(n,i){const s=this.$tzinfo,o=n.$tzinfo;let a,$,c;if(a=$=y,s===o)c=!0;else{if(a=r(this.tp$getattr(U)),$=r(n.tp$getattr(U)),"Eq"===i||"NotEq"===i){const t=r(this.tp$getattr(J),[],["fold",new f(Number(!this.$fold))]);if(e(a,r(t.tp$getattr(U)),"NotEq"))return 2;const i=r(n.tp$getattr(J),[],["fold",new f(Number(!n.$fold))]);if(e($,r(i.tp$getattr(U)),"NotEq"))return 2}c=e(a,$,"Eq")}if(c)return _cmp([this.$year,this.$month,this.$day,this.$hour,this.$min,this.$sec,this.$micro],[n.$year,n.$month,n.$day,n.$hour,n.$min,n.$sec,n.$micro]);if(a===y||$===y){if("Eq"===i||"NotEq"===i)return 2;throw new z("cannot compare naive and aware datetimes")}const h=this.nb$subtract(n);return h.$days<0?-1:t(h)?1:0},$mkTime(){const t=new Nt(1970,1,1),e=this.nb$subtract(t).nb$floor_divide(yt);function local(e){const[n,i,s,o,r,a]=$.localtime.tp$call([e]).v;return Nt.tp$call([n,i,s,o,r,a]).nb$subtract(t).nb$floor_divide(yt)}let n,i,s=local(e).nb$subtract(e),o=e.nb$subtract(s),r=local(o);if(r.ob$eq(e)){if(n=o.nb$add([new f(-86400),new f(86400)][this.$fold]),i=local(n).nb$subtract(n),s.ob$eq(i))return o}else i=r.nb$subtract(o);n=e.nb$subtract(i);if(local(n).ob$eq(e))return n;if(r.ob$eq(e))return o;const a=o.ob$ge(n)?o:n;return[a,o===a?n:o][this.$fold]},$fromtimestamp(t,n,s){let o;if(!N(t))throw new z("a number is required, (got \'"+c(t)+"\'");[o,t]=modf(t);let a=intRound(q(o,nt,"Mult"));a=a.v,t=t.v,a>=1e6?(t+=1,a-=1e6):a<0&&(t-=1,a+=1e6),t=new f(t),Number.isInteger(a)||(a=Math.trunc(a)),a=new f(a);const h=n?$.gmtime:$.localtime;function converter(t){return h.tp$call([t]).v}let[m,u,l,d,_,p]=converter(t);p=new f(Math.min(i(p),59));let g=r(this,[m,u,l,d,_,p,a,s]);if(s===y){const n=86400;[m,u,l,d,_,p]=converter(q(t,new f(n),"Sub"));const i=r(this,[m,u,l,d,_,p,a,s]),o=q(q(g,i,"Sub"),new wt(0,n),"Sub");if(o.$days<0){[m,u,l,d,_,p]=converter(q(t,q(o,yt,"FloorDiv"),"Add"));const n=r(this,[m,u,l,d,_,p,a,s]);e(n,g,"Eq")&&(g.$fold=1)}}else g=r(s.tp$getattr(new w("fromutc")),[g]);return g},$localTimezone(){let t;t=this.$tzinfo===y?this.$mkTime():this.nb$subtract(kt).nb$floor_divide(yt);const e=$.localtime.tp$call([t]),n=(Nt.tp$call(e.v.slice(0,6)),e.tp$getattr(new w("tm_gmtoff"))),i=e.tp$getattr(new w("tm_zone"));return new St(wt.tp$call([W,n]),i)},$getState(t=3){let[e,n]=$divMod(this.$year,256),[i,s]=$divMod(this.$micro,256),[o,r]=$divMod(i,256),a=this.$month;this.$fold&&t>3&&(a+=128);const $=new _([e,n,a,this.$day,this.$hour,this.$min,this.$sec,o,r,s]);return this.$tzinfo===y?[$]:[$,this.$tzinfo]},$setState(t,e){const[n,i,s,o,r,a,$,c,h,m]=t;s>127?(this.$fold=1,this.$month=s-128):(this.$fold=0,this.$month=s),this.$year=256*n+i,this.$day=o,this.$hour=r,this.$min=a,this.$sec=$,this.$micro=(c<<8|h)<<8|m,this.$tzinfo=e}}});function _isoweek1monday(t){const e=_ymd2ord(t,1,1),n=(e+6)%7;let i=e-n;return n>3&&(i+=7),i}Nt.prototype.min=new Nt(1,1,1),Nt.prototype.max=new Nt(9999,12,31,23,59,59,999999),Nt.prototype.resolution=new wt(0,0,1);const St=E.timezone=h("datetime.timezone",{base:Mt,constructor:function timezone(t,n){if(this.$offset=t,this.$name=n||y,!e(this.$minoffset,t,"LtE")||!e(this.$maxoffset,t,"GtE"))throw new v("offset must be a timedelta strictly between -timedelta(hours=24) and timedelta(hours=24).")},slots:{tp$new(e,n){let[i,s]=l("timezone",["offset","name"],e,n,[null]);if(!(i instanceof wt))throw new z("offset must be a timedelta");if(null===s){if(!t(i))return this.utc;s=y}else if(!k(s))throw new z("name must be a string");if(this===St.prototype)return new St(i,s);{const t=new this.constructor;return St.call(t,i,s),t}},tp$richcompare(t,n){if(!(t instanceof St))return b;const i=e(this.$offset,t.$offset,"Eq");return"NotEq"===n?!i:"Eq"===n||i&&o(n)?i:b},$r(){return this===this.utc?new w("datetime.timezone.utc"):this.$name===y?new w(`${this.tp$name}(${s(this.$offset)})`):new w(`${this.tp$name}(${s(this.$offset)}, ${s(this.$name)})`)},tp$str(){return this.tp$getattr(Y).tp$call([y])},tp$hash(){return u(this.$offset)}},methods:{tzname:{$meth:function tzname(t){if(t instanceof Nt||t===y)return this.$name===y?this.$nameFromOff(this.$offset):this.$name;throw new z("tzname() argument must be a datetime instance or None")},$flags:{OneArg:!0},$textsig:null,$doc:"If name is specified when timezone is created, returns the name. Otherwise returns offset as \'UTC(+|-)HH:MM\'."},utcoffset:{$meth:function utcoffset(t){if(t instanceof Nt||t===y)return this.$offset;throw new z("utcoffset() argument must be a datetime instance or None")},$flags:{OneArg:!0},$textsig:null,$doc:"Return fixed offset."},dst:{$meth:function dst(t){if(t instanceof Nt||t===y)return y;throw new z("dst() argument must be a datetime instance or None")},$flags:{OneArg:!0},$textsig:null,$doc:"Return None."},fromutc:{$meth:function fromutc(t){if(t instanceof Nt){if(t.$tzinfo!==this)throw new v("fromutc: dt.tzinfo is not self");return q(t,this.$offset,"Add")}throw new z("fromutc() argument must be a datetime instance or None")},$flags:{OneArg:!0},$textsig:null,$doc:"datetime in UTC -> datetime in local time."},__getinitargs__:{$meth(){return this.$name===y?new p([this.$offset]):new p([this.$offset,this.$name])},$flags:{NoArgs:!0}}},proto:{$maxoffset:new wt(0,86399,999999),$minoffset:new wt(-1,0,1),$nameFromOff(n){if(!t(n))return new w("UTC");let i,s,o,r,a,$;return e(n,bt,"Lt")?(i="-",n=n.nb$negative()):i="+",[s,o]=pyDivMod(n,pt),[r,o]=pyDivMod(o,gt),a=o.$secs,$=o.$micro,new w($?`UTC${i}${_d(s)}:${_d(r)}:${_d(a)}.${_d($,"0",6)}`:a?`UTC${i}${_d(s)}:${_d(r)}:${_d(a)}`:`UTC${i}${_d(s)}:${_d(r)}`)}}});St.prototype.utc=new St(new wt(0)),St.prototype.min=new St(new wt(0,-86340,0)),St.prototype.max=new St(new wt(0,86340,0));const kt=new Nt(1970,1,1,0,0,0,0,St.prototype.utc);return E}))}',"src/lib/document.js":'function $builtinmodule(){const{builtin:{str:t},misceval:{callsimArray:e},ffi:{toPy:r},abstr:{gattr:a}}=Sk,n={__name__:new t("document")},_=r(Sk.global.document);return Sk.abstr.setUpModuleMethods("document",n,{__getattr__:{$meth:t=>a(_,t,!0),$flags:{OneArg:!0}},__dir__:{$meth:()=>e(_.tp$getattr(t.$dir)),$flags:{NoArgs:!0}}}),n}',"src/lib/fractions.js":'function $builtinmodule(t){const e={};return Sk.misceval.chain(Sk.importModule("math",!1,!0),(t=>(e.math=t,Sk.importModule("sys",!1,!0))),(t=>(e.sys=t,fractionsMod(e))))}function fractionsMod({math:t,sys:e}){const{builtin:{int_:n,bool:{true$:i,false$:r},none:{none$:s},NotImplemented:{NotImplemented$:o},tuple:a,float_:$,complex:u,str:h,isinstance:l,TypeError:m,ZeroDivisionError:d,ValueError:f,NotImplementedError:c,abs:_,round:b,pow:p},ffi:{remapToPy:g},abstr:{buildNativeClass:w,copyKeywordsToNamedArgs:v,numberBinOp:y,typeName:k,lookupSpecial:E,checkArgsLen:N},misceval:{isTrue:F,richCompareBool:A,callsimArray:S,objectRepr:M}}=Sk,O={__name__:new h("fractions"),__all__:g(["Fraction"])},D=/^\\s*(?[-+]?)(?=\\d|\\.\\d)(?\\d*)(?:(?:\\/(?\\d+))?|(?:\\.(?\\d*))?(?:E(?[-+]?\\d+))?)\\s*$/i,q=new n(0),x=new n(1),z=new n(2),I=new n(10),T=new h("numerator"),R=new h("denominator"),B=new h("as_integer_ratio"),C=new h("from_float"),getNumer=t=>t.tp$getattr(T),getDenom=t=>t.tp$getattr(R),mul=(t,e)=>y(t,e,"Mult"),div=(t,e)=>y(t,e,"Div"),pow=(t,e)=>y(t,e,"Pow"),add=(t,e)=>y(t,e,"Add"),sub=(t,e)=>y(t,e,"Sub"),floorDiv=(t,e)=>y(t,e,"FloorDiv"),divmod=(t,e)=>y(t,e,"DivMod"),mod=(t,e)=>y(t,e,"Mod"),K=t.tp$getattr(new h("gcd")),eq=(t,e)=>A(t,e,"Eq"),lt=(t,e)=>A(t,e,"Lt"),ge=(t,e)=>A(t,e,"GtE"),L={NoArgs:!0},P={OneArg:!0},j=e.tp$getattr(new h("hash_info")),G=j.tp$getattr(new h("modulus")),V=j.tp$getattr(new h("inf"));function _operator_fallbacks(t,e){return[function(n){return isRational(n)?t(this,n):n instanceof $?e(this.nb$float(),n):n instanceof u?e(S(u,[this]),n):o},function(n){return isRational(n)?t(n,this):n instanceof $?e(n,this.nb$float()):n instanceof u?e(n,S(u,[this])):o}]}const[Z,H]=_operator_fallbacks(((t,e)=>{const n=getDenom(t),i=getDenom(e);return S(ot,[add(mul(getNumer(t),i),mul(getNumer(e),n)),mul(n,i)])}),add),[J,Q]=_operator_fallbacks(((t,e)=>{const n=getDenom(t),i=getDenom(e);return S(ot,[sub(mul(getNumer(t),i),mul(getNumer(e),n)),mul(n,i)])}),sub),[U,W]=_operator_fallbacks(((t,e)=>S(ot,[mul(getNumer(t),getNumer(e)),mul(getDenom(t),getDenom(e))])),mul),[X,Y]=_operator_fallbacks(((t,e)=>S(ot,[mul(getNumer(t),getDenom(e)),mul(getDenom(t),getNumer(e))])),div),[tt,et]=_operator_fallbacks(((t,e)=>floorDiv(mul(getNumer(t),getDenom(e)),mul(getDenom(t),getNumer(e)))),floorDiv),[nt,it]=_operator_fallbacks(((t,e)=>{const n=getDenom(t),i=getDenom(e),[r,s]=divmod(mul(getNumer(t),i),mul(n,getNumer(e))).valueOf();return new a([r,S(ot,[s,mul(n,i)])])}),divmod),[rt,st]=_operator_fallbacks(((t,e)=>{const n=getDenom(t),i=getDenom(e),r=mod(mul(getNumer(t),i),mul(getNumer(e),n));return S(ot,[r,mul(n,i)])}),mod),ot=O.Fraction=w("fractions.Fraction",{constructor:function(t,e){this.$num=t||q,this.$den=e||x},slots:{tp$new(t,e){N("Fraction",t,0,2);let[r,o,a]=v("Fraction",["numerator","denominator","_normalize"],t,e,[q,s,i]);const u=new this.constructor;if(o===s){if(r.ob$type===n)return u.$num=r,u.$den=x,u;if(isRational(r))return u.$num=getNumer(r),u.$den=getDenom(r),u;if(r instanceof $)return[u.$num,u.$den]=S(r.tp$getattr(B)).valueOf(),u;if(!(r instanceof h))throw new m("argument should be a string or a Rational instance");{const t=r.toString().match(D);if(null===t)throw new f("Invalid literal for Fraction: "+M(r));r=new n(t.groups.num||"0");const e=t.groups.denom;if(e)o=new n(e);else{o=x;const e=t.groups.decimal;if(e){const t=new n(""+10**e.length);r=add(mul(r,t),new n(e)),o=mul(o,t)}let i=t.groups.exp;i&&(i=new n(i),lt(i,q)?o=mul(o,pow(I,i.nb$negative())):r=mul(r,pow(I,i)))}"-"==t.groups.sign&&(r=r.nb$negative())}}else if(r.ob$type===n&&o.ob$type===n);else{if(!isRational(r)||!isRational(o))throw new m("both arguments should be Rational instances");[r,o]=[mul(getNumer(r),getDenom(o)),mul(getNumer(o),getDenom(r))]}if(eq(o,q))throw new d(`Fraction(${r}, 0)`);if(F(a)){let t=S(K,[r,o]);lt(o,q)&&(t=t.nb$negative()),r=floorDiv(r,t),o=floorDiv(o,t)}return u.$num=r,u.$den=o,u},$r(){const t=E(this.ob$type,h.$name);return new h(`${t}(${this.$num}, ${this.$den})`)},tp$str(){return eq(this.$den,x)?new h(this.$num):new h(`${this.$num}/${this.$den}`)},tp$hash(){const t=p(this.$den,sub(G,z),G);let e;e=F(t)?mod(mul(_(this.$num),t),G):V;let n=ge(this,q)?e:e.nb$negative();return n=n.tp$hash(),-1===n?-2:n},tp$richcompare(t,e){const op=(t,n)=>A(t,n,e);if("Eq"===e||"NotEq"==e){if(t.ob$type===n){const n=eq(this.$num,t)&&eq(this.$den,x);return"Eq"===e?n:!n}if(t instanceof ot||t instanceof n){const n=eq(this.$num,getNumer(t))&&eq(this.$den,getDenom(t));return"Eq"===e?n:!n}t instanceof u&&eq(t.tp$getattr(new h("imag")),q)&&(t=t.tp$getattr(new h("real")))}return isRational(t)?op(mul(getNumer(this),getDenom(t)),mul(getDenom(this),getNumer(t))):t instanceof $?Number.isFinite(t.valueOf())?op(this,S(this.tp$getattr(C),[t])):op(new $(0),t):o},tp$as_number:!0,nb$add:Z,nb$reflected_add:H,nb$subtract:J,nb$reflected_subtract:Q,nb$multiply:U,nb$reflected_multiply:W,nb$divide:X,nb$reflected_divide:Y,nb$floor_divide:tt,nb$reflected_floor_divide:et,nb$divmod:nt,nb$reflected_divmod:it,nb$remainder:rt,nb$reflected_remainder:st,nb$power(t){if(isRational(t)){if(eq(getDenom(t),x)){let e=getNumer(t);return ge(e,q)?S(ot,[pow(this.$num,e),pow(this.$den,e)],["_normalize",r]):ge(this.$num,q)?(e=e.nb$negative(),S(ot,[pow(this.$den,e),pow(this.$num,e)],["_normalize",r])):(e=e.nb$negative(),S(ot,[pow(this.$den.nb$negative(),e),pow(this.$num.nb$negative(),e)],["_normalize",r]))}return pow(this.nb$float(),S($,[t]))}return pow(this.nb$float(),t)},nb$reflected_power(t){return eq(this.$den,x)&&ge(this.$num,q)?pow(t,this.$num):isRational(t)?pow(new ot(getNumer(t),getDenom(t)),this):eq(this.$den,x)?pow(t,this.$num):pow(t,this.nb$float())},nb$positive(){return new ot(this.$num,this.$den)},nb$negative(){return new ot(this.$num.nb$negative(),this.$den)},nb$abs(){return new ot(this.$num.nb$abs(),this.$den)},nb$bool(){return this.$num.nb$bool()},nb$float(){return div(this.$num,this.$den)}},methods:{as_integer_ratio:{$meth(){return new a([this.$num,this.$den])},$flags:L},limit_denominator:{$meth(t){if(lt(t,x))throw new f("max_denominator should be at least 1");if(ge(t,this.$den))return S(ot,[this]);let[e,n,i,r]=[q,x,x,q],s=this.$num,o=this.$den;for(;;){const a=floorDiv(s,o),$=add(n,mul(a,r));if(lt(t,$))break;[e,n,i,r]=[i,r,add(e,mul(a,i)),$],[s,o]=[o,sub(s,mul(a,o))]}const a=floorDiv(sub(t,n),r),$=S(ot,[add(e,mul(a,i)),add(n,mul(a,r))]),u=S(ot,[i,r]);return ge(_(sub($,this)),_(sub(u,this)))?u:$},$flags:{NamedArgs:["max_denominator"],Defaults:[new n(1e6)]}},__trunc__:{$meth(){return lt(this.$num,q)?floorDiv(this.$num.nb$negative(),this.$den).nb$negative():floorDiv(this.$num,this.$den)},$flags:L},__floor__:{$meth(){return floorDiv(this.$num,this.$den)},$flags:L},__ceil__:{$meth(){return floorDiv(this.$num.nb$negative(),this.$den).nb$negative()},$flags:L},__round__:{$meth(t){if(t===s){const[t,e]=divmod(this.$num,this.$den).valueOf(),n=mul(e,z);return lt(n,this.$den)?t:lt(this.$den,n)?add(t,x):eq(mod(t,z),q)?t:add(t,x)}const e=pow(I,_(t));return lt(q,t)?S(ot,[b(mul(this,e)),e]):S(ot,[mul(b(div(this,e)),e)])},$flags:{NamedArgs:["ndigits"],Defaults:[s]}},__reduce__:{$meth(){return new a([this.ob$type,new a([new h(this)])])},$flags:L},__copy__:{$meth(){return this.ob$type===ot?this:S(this.ob$type,[this.$num,this.$den])},$flags:L},__deepcopy__:{$meth(t){return this.ob$type===ot?this:S(this.ob$type,[this.$num,this.$den])},$flags:P}},classmethods:{from_float:{$meth(t){if(t instanceof n)return S(this,[t]);if(t instanceof $){const[e,n]=S(t.tp$getattr(B)).valueOf();return S(this,[e,n])}throw new m(`${k(this)}.from_float() only takes floats, not ${M(t)}, (${k(t)})`)},$flags:P},from_decimal:{$meth(){throw c("from_decimal not yet implemented in SKulpt")},$flags:P}},getsets:{numerator:{$get(){return this.$num}},denominator:{$get(){return this.$den}},_numerator:{$get(){return this.$num},$set(t){this.$num=t}},_denominator:{$get(){return this.$den},$set(t){this.$den=t}}}}),at=new a([n,ot]),isRational=t=>F(l(t,at));return O}',"src/lib/functools.js":`function $builtinmodule(){const t={};return Sk.misceval.chain(Sk.importModule("collections",!1,!0),(e=>(t._namedtuple=e.$d.namedtuple,functools_mod(t))))}function functools_mod(t){const{object:e,int_:n,str:r,list:s,tuple:a,dict:i,none:{none$:o},bool:{false$:c},NotImplemented:{NotImplemented$:_},bool:l,func:h,method:p,TypeError:u,RuntimeError:d,ValueError:f,NotImplementedError:m,AttributeError:w,OverflowError:g,checkNone:$,checkBool:y,checkCallable:k,checkClass:b}=Sk.builtin,{callsimArray:x,callsimOrSuspendArray:A,iterFor:S,chain:E,isIndex:v,asIndexSized:N,isTrue:P,richCompareBool:j,objectRepr:R,retryOptionalSuspeionOrThrow:z,chain:q}=Sk.misceval,{remapToPy:T}=Sk.ffi,{checkOneArg:I,checkNoKwargs:C,buildNativeClass:D,setUpModuleMethods:M,keywordArrayFromPyDict:O,keywordArrayToPyDict:W,objectHash:U,lookupSpecial:F,copyKeywordsToNamedArgs:G,typeName:B,objectSetItem:K,iter:L,gattr:H}=Sk.abstr,{getSetDict:V,getAttr:J,setAttr:Q}=Sk.generic;function proxyFail(t){return new h((()=>{throw new m(t+" is not yet implemented in skulpt")}))}Object.assign(t,{__name__:new r("functools"),__doc__:new r("Tools for working with functions and callable objects"),__all__:new s(["update_wrapper","wraps","WRAPPER_ASSIGNMENTS","WRAPPER_UPDATES","total_ordering","cmp_to_key","cache","lru_cache","reduce","partial","partialmethod","singledispatch","singledispatchmethod","cached_property"].map((t=>new r(t)))),WRAPPER_ASSIGNMENTS:new a(["__module__","__name__","__qualname__","__doc__","__annotations__"].map((t=>new r(t)))),WRAPPER_UPDATES:new a([new r("__dict__")]),singledispatch:proxyFail("singledispatch"),singledispatchmethod:proxyFail("singledispatchmethod")});const X=new r("cache_parameters");function _lru_cache(e,n){if(n||(n=c),v(e))(e=N(e,g))<0&&(e=0);else{if(k(e)&&y(n)){const r=e,s=new Z(r,e=128,n);return s.tp$setattr(X,new h((()=>T({maxsize:e,typed:n})))),A(t.update_wrapper,[s,r])}if(!$(e))throw new u("Expected first argument to be an integer, a callable, or None")}return new h((r=>{const s=new Z(r,e,n);return s.tp$setattr(X,new h((()=>T({maxsize:e,typed:n})))),A(t.update_wrapper,[s,r])}))}const Y=t._CacheInfo=x(t._namedtuple,["CacheInfo",["hits","misses","maxsize","currsize"]].map((t=>T(t))),["module",new r("functools")]),Z=D("functools._lru_cache_wrapper",{constructor:function _lru_cache_wrapper(t,e,n,r){if(!k(t))throw new u("the first argument must be callable");let s;if($(e))s=infinite_lru_cache_wrapper,e=-1;else{if(!v(e))throw new u("maxsize should be integer or None");(e=N(e,g))<0&&(e=0),s=0===e?uncached_lru_cache_wrapper:bounded_lru_cache_wrapper}this.root={},this.root.prev=this.root.next=this.root,this.wrapper=s,this.maxsize=e,this.typed=n,this.cache=new i([]),this.func=t,this.misses=this.hits=0,this.$d=new i([])},slots:{tp$new(t,e){const[n,r,s,a]=G("_lru_cache_wrapper",["user_function","maxsize","typed","cache_info_type"],t,e);return new Z(n,r,s,a)},tp$call(t,e){return this.wrapper(t,e)},tp$descr_get(t,e){return null===t?this:new p(this,t)},tp$doc:"Create a cached callable that wraps another function.\\n\\nuser_function: the function being cached\\n\\nmaxsize: 0 for no caching\\n None for unlimited cache size\\n n for a bounded cache\\n\\ntyped: False cache f(3) and f(3.0) as identical calls\\n True cache f(3) and f(3.0) as distinct calls\\n\\ncache_info_type: namedtuple class with the fields:\\n hits misses currsize maxsize\\n"},methods:{cache_info:{$meth(){return A(Y,[this.hits,this.misses,-1===this.maxsize?o:this.maxsize,this.cache.get$size()].map((t=>T(t))))},$flags:{NoArgs:!0},$doc:"Report cache statistics"},cache_clear:{$meth(){return this.hits=this.misses=0,this.root={},this.root.next=this.root.prev=this.root,A(this.cache.tp$getattr(new r("clear"),!0))},$flags:{NoArgs:!0},$doc:"Clear the cache and cache statistics"},__deepcopy__:{$meth(t){return this},$flags:{OneArg:!0}},__copy__:{$meth(){return this},$flags:{NoArgs:!0}}},getsets:{__dict__:V}});function infinite_lru_cache_wrapper(t,e){const n=_make_key(t,e,this.typed),r=this.cache.mp$lookup(n);return void 0!==r?(this.hits++,r):(this.misses++,E(A(this.func,t,e),(t=>(this.cache.mp$ass_subscript(n,t),t))))}function uncached_lru_cache_wrapper(t,e){return this.misses++,A(this.func,t,e)}function bounded_lru_cache_wrapper(t,e){const n=_make_key(t,e,this.typed),r=this.cache.mp$lookup(n);if(void 0!==r){const{result:t}=r;return lru_cache_extract_link(r),lru_cache_append_link(this,r),this.hits++,t}return this.misses++,E(A(this.func,t,e),(t=>{if(void 0!==this.cache.mp$lookup(n))return t;if(this.cache.get$size()t.ob$type)),...i.map((t=>t.ob$type)));else if(1===s.length&&nt.has(s[0].ob$type))return s[0];return new tt(s)}function partial_adjust_args_kwargs(t,e){if(t=this.arg_arr.concat(t),e){e=W(e);const t=this.kwdict.dict$copy();t.dict$merge(e),e=O(t)}else e=O(this.kwdict);return{args:t,kwargs:e}}function partial_new(t,e){if(t.length<1)throw new u("type 'partial' takes at least 1 argument");let n,r,s=t.shift();if(s instanceof this.sk$builtinBase){const t=s;s=t.fn,n=t.arg_arr,r=t.kwdict}this.check$func(s),n&&(t=n.concat(t));let a=W(e=e||[]);if(r){const t=r.dict$copy();t.dict$merge(a),a=t}if(this.sk$builtinBase===this.constructor)return new this.constructor(s,t,a);{const e=new this.constructor;return this.sk$builtinBase.call(e,s,t,a),e}}function partial_repr(){if(this.in$repr)return new r("...");this.in$repr=!0;const t=[R(this.fn)];return this.arg_arr.forEach((e=>{t.push(R(e))})),this.kwdict.$items().forEach((([e,n])=>{t.push(e.toString()+"="+R(n))})),this.in$repr=!1,new r(this.tp$name+"("+t.join(", ")+")")}t.partial=D("functools.partial",{constructor:function partial(t,e,n){this.fn=t,this.arg_arr=e,this.arg_tup=new a(e),this.kwdict=n,this.in$repr=!1,this.$d=new i([])},slots:{tp$new:partial_new,tp$call(t,e){return({args:t,kwargs:e}=this.adj$args_kws(t,e)),this.fn.tp$call(t,e)},tp$doc:"partial(func, *args, **keywords) - new function with partial application\\n of the given arguments and keywords.\\n",$r:partial_repr,tp$getattr:J,tp$setattr:Q},getsets:{func:{$get(){return this.fn},$doc:"function object to use in future partial calls"},args:{$get(){return this.arg_tup},$doc:"tuple of arguments to future partial calls"},keywords:{$get(){return this.kwdict},$doc:"dictionary of keyword arguments to future partial calls"},__dict__:V},methods:{},classmethods:Sk.generic.classGetItem,proto:{adj$args_kws:partial_adjust_args_kwargs,check$func(t){if(!k(t))throw new u("the first argument must be callable")}}}),t.partialmethod=D("functools.partialmethod",{constructor:function partialmethod(t,e,n){this.fn=t,this.arg_arr=e,this.arg_tup=new a(e),this.kwdict=n},slots:{tp$new:partial_new,tp$doc:"Method descriptor with partial application of the given arguments\\n and keywords.\\n\\n Supports wrapping existing descriptors and handles non-descriptor\\n callables as instance methods.\\n ",$r:partial_repr,tp$descr_get(e,n){let r;if(this.fn.tp$descr_get){const s=this.fn.tp$descr_get(e,n);if(s!==this.fn){if(!k(s))throw new u("type 'partial' requires a callable");r=new t.partial(s,this.arg_arr.slice(0),this.kwdict.dict$copy());const e=F(s,this.str$self);void 0!==e&&r.tp$setattr(this.str$self,e)}}return void 0===r&&(r=this.make$unbound().tp$descr_get(e,n)),r}},methods:{_make_unbound_method:{$meth(){return this.make$unbound()},$flags:{NoArgs:!0}}},classmethods:Sk.generic.classGetItem,getsets:{func:{$get(){return this.fn},$doc:"function object to use in future partial calls"},args:{$get(){return this.arg_tup},$doc:"tuple of arguments to future partial calls"},keywords:{$get(){return this.kwdict},$doc:"dictionary of keyword arguments to future partial calls"},__dict__:V},proto:{str$self:new r("__self__"),make$unbound(){const t=this;function _method(e,n){const r=e.shift();return({args:e,kwargs:n}=t.adj$args_kws(e,n)),e.unshift(r),A(t.fn,e,n)}return _method.co_fastcall=!0,new h(_method)},adj$args_kws:partial_adjust_args_kwargs,check$func(t){if(!k(t)&&void 0===t.tp$descr_get)throw new u(R(t)+" is not callable or a descriptor")}}});const rt={__lt__:r.$lt,__le__:r.$le,__gt__:r.$gt,__ge__:r.$ge};function from_slot(t,e){const n=rt[t];function compare_slot(t,r){let s=x(t.tp$getattr(n),[r]);return s===_?s:(s=P(s),new l(e(s,t,r)))}return compare_slot.co_name=n,compare_slot}const st=from_slot("__lt__",((t,e,n)=>!t&&j(e,n,"NotEq"))),at=from_slot("__lt__",((t,e,n)=>t||j(e,n,"Eq"))),it=from_slot("__lt__",(t=>!t)),ot=from_slot("__le__",((t,e,n)=>!t||j(e,n,"Eq"))),ct=from_slot("__le__",((t,e,n)=>t&&j(e,n,"NotEq"))),_t=from_slot("__le__",(t=>!t)),lt=from_slot("__gt__",((t,e,n)=>!t&&j(e,n,"NotEq"))),ht=from_slot("__gt__",((t,e,n)=>t||j(e,n,"Eq"))),pt=from_slot("__gt__",(t=>!t)),ut=from_slot("__ge__",((t,e,n)=>!t||j(e,n,"Eq"))),dt=from_slot("__ge__",((t,e,n)=>t&&j(e,n,"NotEq"))),ft=from_slot("__ge__",(t=>!t)),mt={__lt__:{__gt__:new h(st),__le__:new h(at),__ge__:new h(it)},__le__:{__ge__:new h(ot),__lt__:new h(ct),__gt__:new h(_t)},__gt__:{__lt__:new h(lt),__ge__:new h(ht),__le__:new h(pt)},__ge__:{__le__:new h(ut),__gt__:new h(dt),__lt__:new h(ft)}},wt={__lt__:"ob$lt",__le__:"ob$le",__gt__:"ob$gt",__ge__:"ob$ge"};const gt=new r("get"),$t=new e;t.cached_property=D("functools.cached_property",{constructor:function(){},slots:{tp$init(t,e){I("cached_property",t,e),C("cached_property",e),this._func=t[0],this._attr=o},tp$descr_get(t,e,n){if(null==t)return this;if(this._attr===o)throw new u("Cannot use cached_property instance without calling __set_name__ on it.");let s;try{s=H(t,r.$dict)}catch(c){if(c instanceof w){const e=\`No '__dict__' attribute on '\${B(t)}' instance to cache \${R(this._attr)} property.\`;throw new u(e)}throw c}const a=H(s,gt);let i=x(a,[this._attr,$t]);if(i===$t){const e=A(this._func,[t]);i=q(e,(n=>{try{return K(s,this._attr,e),n}catch(c){if(c instanceof u){const e=\`The '__dict__' attribute on '\${B(t)}' instance does not support item assignment for caching \${R(this._attr)} property.\`;throw new u(e)}throw c}}))}return n?i:z(i)}},getsets:{__doc__:{$get(){return this._func.tp$getattr(r.$doc)||o}}},methods:{__set_name__:{$meth(t,e){if(this._attr===o)this._attr=e;else if(e.toString()!==this._attr.toString())throw new u(\`Cannot assign the same cached_property to two different names (\${R(this._attr)} and \${R(e)})\`)},$flags:{MinArgs:2,MaxArgs:2}}},classmethods:Sk.generic.classGetItem});const yt=new n(0),kt=D("functools.KeyWrapper",{constructor:function(t,e){this.cmp=t,this.obj=e},slots:{tp$call(t,e){const[n]=G("K",["obj"],t,e,[]);return new kt(this.cmp,n)},tp$richcompare(t,e){if(!(t instanceof kt))throw new u("other argument must be K instance");const n=this.obj,r=t.obj;if(!n||!r)throw new w("object");const s=A(this.cmp,[n,r]);return E(s,(t=>j(t,yt,e)))},tp$getattr:J,tp$hash:o},getsets:{obj:{$get(){return this.obj||o},$set(t){this.obj=t},$doc:"Value wrapped by a key function."}}}),bt=new r("update"),xt=new r("__wrapped__");return M("functools",t,{cache:{$meth:function cache(t){return A(_lru_cache(o),[t])},$flags:{OneArg:!0},$doc:'Simple lightweight unbounded cache. Sometimes called "memoize".',$textsig:"($module, user_function, /)"},lru_cache:{$meth:_lru_cache,$flags:{NamedArgs:["maxsize","typed"],Defaults:[new n(128),c]},$doc:"Least-recently-used cache decorator.\\n\\nIf *maxsize* is set to None, the LRU features are disabled and the cache\\ncan grow without bound.\\n\\nIf *typed* is True, arguments of different types will be cached separately.\\nFor example, f(3.0) and f(3) will be treated as distinct calls with\\ndistinct results.\\n\\nArguments to the cached function must be hashable.\\n\\nView the cache statistics named tuple (hits, misses, maxsize, currsize)\\nwith f.cache_info(). Clear the cache and statistics with f.cache_clear().\\nAccess the underlying function with f.__wrapped__.\\n\\nSee: http://en.wikipedia.org/wiki/Cache_replacement_policies#Least_recently_used_(LRU)"},cmp_to_key:{$meth:function cmp_to_key(t){return new kt(t)},$flags:{NamedArgs:["mycmp"],Defaults:[]},$doc:"Convert a cmp= function into a key= function.",$textsig:"($module, cmp, /)"},reduce:{$meth:function reduce(t,e,n){const r=L(e);let s;return n=n||r.tp$iternext(!0),E(n,(e=>{if(void 0===e)throw new u("reduce() of empty sequence with no initial value");return s=e,S(r,(e=>E(A(t,[s,e]),(t=>{s=t}))))}),(()=>s))},$flags:{MinArgs:2,MaxArgs:3},$doc:"reduce(function, sequence[, initial]) -> value\\n\\nApply a function of two arguments cumulatively to the items of a sequence,\\nfrom left to right, so as to reduce the sequence to a single value.\\nFor example, reduce(lambda x, y: x+y, [1, 2, 3, 4, 5]) calculates\\n((((1+2)+3)+4)+5). If initial is present, it is placed before the items\\nof the sequence in the calculation, and serves as a default when the\\nsequence is empty.",$textsig:"($module, function, sequence[, initial], /)"},total_ordering:{$meth:function total_ordering(t){const n=[];if(!b(t))throw new u("total ordering only supported for type objects not '"+B(t)+"'");if(Object.keys(mt).forEach((r=>{const s=wt[r];t.prototype[s]!==e.prototype[s]&&n.push(r)})),!n.length)throw new f("must define atleast one ordering operation: <, >, <=, >=");const r=n[0];return Object.entries(mt[r]).forEach((([e,r])=>{n.includes(e)||t.tp$setattr(rt[e],r)})),t},$flags:{OneArg:!0},$doc:"Class decorator that fills in missing ordering methods"},update_wrapper:{$meth:function update_wrapper(t,e,n,r){let s,a=L(n);for(let i=a.tp$iternext();void 0!==i;i=a.tp$iternext())void 0!==(s=e.tp$getattr(i))&&t.tp$setattr(i,s);a=L(r);for(let o=a.tp$iternext();void 0!==o;o=a.tp$iternext()){s=e.tp$getattr(o)||new i([]);const n=H(t,o),r=H(n,bt);x(r,[s])}return t.tp$setattr(xt,e),t},$flags:{NamedArgs:["wrapper","wrapped","assigned","updated"],Defaults:[t.WRAPPER_ASSIGNMENTS,t.WRAPPER_UPDATES]},$doc:"Update a wrapper function to look like the wrapped function\\n\\n wrapper is the function to be updated\\n wrapped is the original function\\n assigned is a tuple naming the attributes assigned directly\\n from the wrapped function to the wrapper function (defaults to\\n functools.WRAPPER_ASSIGNMENTS)\\n updated is a tuple naming the attributes of the wrapper that\\n are updated with the corresponding attribute from the wrapped\\n function (defaults to functools.WRAPPER_UPDATES)\\n ",$textsig:"($module, /, wrapper, wrapped, assigned=('__module__', '__name__', '__qualname__', '__doc__', '__annotations__'), updated=('__dict__',))"},wraps:{$meth:function wraps(e,n,r){const s=["wrapped",e,"assigned",n,"updated",r];return A(t.partial,[t.update_wrapper],s)},$flags:{NamedArgs:["wrapped","assigned","updated"],Defaults:[t.WRAPPER_ASSIGNMENTS,t.WRAPPER_UPDATES]},$doc:"Decorator factory to apply update_wrapper() to a wrapper function\\n\\n Returns a decorator that invokes update_wrapper() with the decorated\\n function as the wrapper argument and the arguments to wraps() as the\\n remaining arguments. Default arguments are as for update_wrapper().\\n This is a convenience function to simplify applying partial() to\\n update_wrapper().\\n ",$textsig:"($module, /, wrapped, assigned=('__module__', '__name__', '__qualname__', '__doc__', '__annotations__'), updated=('__dict__',))"}}),t}`,"src/lib/image.js":'var ImageMod,$builtinmodule;ImageMod||((ImageMod={}).canvasLib=[]),$builtinmodule=function(e){var n,t,i,a,u,l,r,s={__name__:new Sk.builtin.str("image")};return s.Image=Sk.misceval.buildClass(s,(function(e,n){u=function(e){e.width=e.image.width,e.height=e.image.height,e.delay=0,e.updateCount=0,e.updateInterval=1,e.lastx=0,e.lasty=0,e.canvas=document.createElement("canvas"),e.canvas.height=e.height,e.canvas.width=e.width,e.ctx=e.canvas.getContext("2d"),e.ctx.drawImage(e.image,0,0),e.imagedata=e.ctx.getImageData(0,0,e.width,e.height)},n.__init__=new Sk.builtin.func((function(e,n){var t;Sk.builtin.pyCheckArgsLen("__init__",arguments.length,2,2);try{e.image=document.getElementById(Sk.ffi.remapToJs(n)),u(e)}catch(i){e.image=null}if(null==e.image)return(t=new Sk.misceval.Suspension).resume=function(){if(t.data.error)throw new Sk.builtin.IOError(t.data.error.message)},t.data={type:"Sk.promise",promise:new Promise((function(t,i){var a=new Image;a.crossOrigin="",a.onerror=function(){i(Error("Failed to load URL: "+a.src))},a.onload=function(){e.image=this,u(e),t()},a.src=r(n)}))},t})),r=function(e){var n,t,i="function"==typeof Sk.imageProxy?Sk.imageProxy:function(e){return(n=document.createElement("a")).href=t,window.location.host!==n.host?Sk.imageProxy+"/"+e:e};return t=i(t=Sk.ffi.remapToJs(e))},l=function(e,n,t){if(n<0||t<0||n>=e.width||t>=e.height)throw new Sk.builtin.ValueError("Pixel index out of range.")};var setdelay=function(e,n,t){var i;Sk.builtin.pyCheckArgsLen("setdelay",arguments.length,2,3),e.delay=Sk.ffi.remapToJs(n),i=Sk.builtin.asnum$(t),e.updateInterval=i||1};n.set_delay=new Sk.builtin.func(setdelay),n.setDelay=new Sk.builtin.func(setdelay);var getpixels=function(e){var n,t=[];for(Sk.builtin.pyCheckArgsLen("getpixels",arguments.length,1,1),n=0;n=e.width?e.lastCtx.putImageData(e.imagedata,e.lastUlx,e.lastUly,0,e.lasty,e.width,2):e.lasty+e.updateInterval>=e.height?e.lastCtx.putImageData(e.imagedata,e.lastUlx,e.lastUly,e.lastx,0,2,e.height):e.lastCtx.putImageData(e.imagedata,e.lastUlx,e.lastUly,Math.min(n,e.lastx),Math.min(t,e.lasty),Math.max(Math.abs(n-e.lastx),1),Math.max(Math.abs(t-e.lasty),1)),e.lastx=n,e.lasty=t,e.delay>0?window.setTimeout(i,e.delay):i()):i()}))},i};var setpixel=function(e,n,t,i){var u;return Sk.builtin.pyCheckArgsLen("setpixel",arguments.length,4,4),n=Sk.builtin.asnum$(n),t=Sk.builtin.asnum$(t),l(e,n,t),u=4*t*e.width+4*n,e.imagedata.data[u]=Sk.builtin.asnum$(Sk.misceval.callsimArray(i.getRed,[i])),e.imagedata.data[u+1]=Sk.builtin.asnum$(Sk.misceval.callsimArray(i.getGreen,[i])),e.imagedata.data[u+2]=Sk.builtin.asnum$(Sk.misceval.callsimArray(i.getBlue,[i])),e.imagedata.data[u+3]=255,a(e,n,t)};n.set_pixel=new Sk.builtin.func(setpixel),n.setPixel=new Sk.builtin.func(setpixel);var setpixelat=function(e,n,t){var i,u,r;return Sk.builtin.pyCheckArgsLen("setpixelat",arguments.length,3,3),i=(n=Sk.builtin.asnum$(n))%e.image.width,u=Math.floor(n/e.image.width),l(e,i,u),r=4*u*e.width+4*i,e.imagedata.data[r]=Sk.builtin.asnum$(Sk.misceval.callsimArray(t.getRed,[t])),e.imagedata.data[r+1]=Sk.builtin.asnum$(Sk.misceval.callsimArray(t.getGreen,[t])),e.imagedata.data[r+2]=Sk.builtin.asnum$(Sk.misceval.callsimArray(t.getBlue,[t])),e.imagedata.data[r+3]=255,a(e,i,u)};n.set_pixel_at=new Sk.builtin.func(setpixelat),n.setPixelAt=new Sk.builtin.func(setpixelat);var updatepixel=function(e,n){var t,i,u;return Sk.builtin.pyCheckArgsLen("updatepixel",arguments.length,2,2),t=Sk.builtin.asnum$(Sk.misceval.callsimArray(n.getX,[n])),i=Sk.builtin.asnum$(Sk.misceval.callsimArray(n.getY,[n])),l(e,t,i),u=4*i*e.width+4*t,e.imagedata.data[u]=Sk.builtin.asnum$(Sk.misceval.callsimArray(n.getRed,[n])),e.imagedata.data[u+1]=Sk.builtin.asnum$(Sk.misceval.callsimArray(n.getGreen,[n])),e.imagedata.data[u+2]=Sk.builtin.asnum$(Sk.misceval.callsimArray(n.getBlue,[n])),e.imagedata.data[u+3]=255,a(e,t,i)};n.update_pixel=new Sk.builtin.func(updatepixel),n.updatePixel=new Sk.builtin.func(updatepixel);var getheight=function(e){return Sk.builtin.pyCheckArgsLen("getheight",arguments.length,1,1),new Sk.builtin.int_(e.height)};n.get_height=new Sk.builtin.func(getheight),n.getHeight=new Sk.builtin.func(getheight);var getwidth=function(e,n){return Sk.builtin.pyCheckArgsLen("getwidth",arguments.length,1,1),new Sk.builtin.int_(e.width)};n.get_width=new Sk.builtin.func(getwidth),n.getWidth=new Sk.builtin.func(getwidth),n.__getattr__=new Sk.builtin.func((function(e,n){return"height"===(n=Sk.ffi.remapToJs(n))?Sk.builtin.assk$(e.height):"width"===n?Sk.builtin.assk$(e.width):void 0})),n.__setattr__=new Sk.builtin.func((function(e,n,t){throw"height"===(n=Sk.ffi.remapToJs(n))||"width"===n?new Sk.builtin.Exception("Cannot change height or width they can only be set on creation"):new Sk.builtin.Exception("Unknown attribute: "+n)})),n.draw=new Sk.builtin.func((function(e,n,t,i){var a;return Sk.builtin.pyCheckArgsLen("draw",arguments.length,2,4),(a=new Sk.misceval.Suspension).resume=function(){return Sk.builtin.none.none$},a.data={type:"Sk.promise",promise:new Promise((function(a,u){var l;n=Sk.builtin.asnum$(n),t=Sk.builtin.asnum$(t),i=Sk.builtin.asnum$(i),l=Sk.misceval.callsimArray(n.getWin,[n]).getContext("2d"),void 0===t&&(t=0,i=0),e.lastUlx=t,e.lastUly=i,e.lastCtx=l,l.putImageData(e.imagedata,t,i),e.delay>0?window.setTimeout(a,e.delay):window.setTimeout(a,200)}))},a}))}),"Image",[]),i=function(e,n){n.__init__=new Sk.builtin.func((function(e,n,t){Sk.builtin.pyCheckArgsLen("__init__",arguments.length,3,3),e.width=Sk.builtin.asnum$(n),e.height=Sk.builtin.asnum$(t),e.canvas=document.createElement("canvas"),e.ctx=e.canvas.getContext("2d"),e.canvas.height=e.height,e.canvas.width=e.width,e.imagedata=e.ctx.getImageData(0,0,e.width,e.height)}))},s.EmptyImage=Sk.misceval.buildClass(s,i,"EmptyImage",[s.Image]),t=function(e,n){n.__init__=new Sk.builtin.func((function(e,n,t,i,a,u){Sk.builtin.pyCheckArgsLen("__init__",arguments.length,4,6),e.red=Sk.builtin.asnum$(n),e.green=Sk.builtin.asnum$(t),e.blue=Sk.builtin.asnum$(i),e.x=Sk.builtin.asnum$(a),e.y=Sk.builtin.asnum$(u)}));var getred=function(e){return Sk.builtin.pyCheckArgsLen("getred",arguments.length,1,1),Sk.builtin.assk$(e.red)};n.get_red=new Sk.builtin.func(getred),n.getRed=new Sk.builtin.func(getred);var getgreen=function(e){return Sk.builtin.pyCheckArgsLen("getgreen",arguments.length,1,1),Sk.builtin.assk$(e.green)};n.get_green=new Sk.builtin.func(getgreen),n.getGreen=new Sk.builtin.func(getgreen);var getblue=function(e){return Sk.builtin.pyCheckArgsLen("getblue",arguments.length,1,1),Sk.builtin.assk$(e.blue)};n.get_blue=new Sk.builtin.func(getblue),n.getBlue=new Sk.builtin.func(getblue);var getx=function(e){return Sk.builtin.pyCheckArgsLen("getx",arguments.length,1,1),Sk.builtin.assk$(e.x)};n.get_x=new Sk.builtin.func(getx),n.getX=new Sk.builtin.func(getx);var gety=function(e){return Sk.builtin.pyCheckArgsLen("gety",arguments.length,1,1),Sk.builtin.assk$(e.y)};n.get_y=new Sk.builtin.func(gety),n.getY=new Sk.builtin.func(gety);var setred=function(e,n){Sk.builtin.pyCheckArgsLen("setred",arguments.length,2,2),e.red=Sk.builtin.asnum$(n)};n.set_red=new Sk.builtin.func(setred),n.setRed=new Sk.builtin.func(setred);var setgreen=function(e,n){Sk.builtin.pyCheckArgsLen("setgreen",arguments.length,2,2),e.green=Sk.builtin.asnum$(n)};n.set_green=new Sk.builtin.func(setgreen),n.setGreen=new Sk.builtin.func(setgreen);var setblue=function(e,n){Sk.builtin.pyCheckArgsLen("setblue",arguments.length,2,2),e.blue=Sk.builtin.asnum$(n)};n.set_blue=new Sk.builtin.func(setblue),n.setBlue=new Sk.builtin.func(setblue),n.__getattr__=new Sk.builtin.func((function(e,n){return"red"===(n=Sk.ffi.remapToJs(n))?Sk.builtin.assk$(e.red):"green"===n?Sk.builtin.assk$(e.green):"blue"===n?Sk.builtin.assk$(e.blue):void 0})),n.__setattr__=new Sk.builtin.func((function(e,n,t){"red"!==(n=Sk.ffi.remapToJs(n))&&"green"!==n&&"blue"!==n||(e[n]=Sk.builtin.asnum$(t))}));var setx=function(e,n){Sk.builtin.pyCheckArgsLen("setx",arguments.length,2,2),e.x=Sk.builtin.asnum$(n)};n.set_x=new Sk.builtin.func(setx),n.setX=new Sk.builtin.func(setx);var sety=function(e,n){Sk.builtin.pyCheckArgsLen("sety",arguments.length,2,2),e.y=Sk.builtin.asnum$(n)};n.set_y=new Sk.builtin.func(sety),n.setY=new Sk.builtin.func(sety),n.__getitem__=new Sk.builtin.func((function(e,n){return 0===(n=Sk.builtin.asnum$(n))?e.red:1==n?e.green:2==n?e.blue:void 0})),n.__str__=new Sk.builtin.func((function(e){return Sk.ffi.remapToPy("["+e.red+","+e.green+","+e.blue+"]")})),n.getColorTuple=new Sk.builtin.func((function(e,n,t){})),n.setRange=new Sk.builtin.func((function(e,n){e.max=Sk.builtin.asnum$(n)}))},s.Pixel=Sk.misceval.buildClass(s,t,"Pixel",[]),n=function(e,n){n.__init__=new Sk.builtin.func((function(e,n,t){var i,a,u;Sk.builtin.pyCheckArgsLen("__init__",arguments.length,1,3),void 0===(i=ImageMod.canvasLib[Sk.canvas])?(a=document.createElement("canvas"),u=document.getElementById(Sk.canvas),e.theScreen=a,u.appendChild(a),ImageMod.canvasLib[Sk.canvas]=a,ImageMod.canvasLib[Sk.canvas]=e.theScreen):(e.theScreen=i,e.theScreen.height=e.theScreen.height),void 0!==n?(e.theScreen.height=t.v,e.theScreen.width=n.v):(Sk.availableHeight&&(e.theScreen.height=Sk.availableHeight),Sk.availableWidth&&(e.theScreen.width=Sk.availableWidth)),e.theScreen.style.display="block"})),n.getWin=new Sk.builtin.func((function(e){return e.theScreen})),n.exitonclick=new Sk.builtin.func((function(e){var n=e.theScreen.id;e.theScreen.onclick=function(){document.getElementById(n).style.display="none",document.getElementById(n).onclick=null,delete ImageMod.canvasLib[n]}}))},s.ImageWin=Sk.misceval.buildClass(s,n,"ImageWin",[]),s};',"src/lib/itertools.js":`var $builtinmodule=function(t){var e={};function combinationsNew(t,e,i){let r,s;[r,s]=Sk.abstr.copyKeywordsToNamedArgs(t.tp$name,["iterable","r"],e,i,[]);const n=Sk.misceval.arrayFromIterable(r);if(s=Sk.misceval.asIndexSized(s,Sk.builtin.OverFlowError),s<0)throw new Sk.builtin.ValueError("r must be non-negative");if(this===t)return new t.constructor(n,s);{const e=new this.constructor;return t.constructor.call(e,n,s),e}}return e.accumulate=Sk.abstr.buildIteratorClass("itertools.accumulate",{constructor:function accumulate(t,e,i){this.iter=t,this.func=e,this.total=i,this.tp$iternext=()=>(this.total=Sk.builtin.checkNone(this.total)?this.iter.tp$iternext():this.total,this.tp$iternext=this.constructor.prototype.tp$iternext,this.total)},iternext(t){let e=this.iter.tp$iternext();if(void 0!==e)return this.total=Sk.misceval.callsimArray(this.func,[this.total,e]),this.total},slots:{tp$doc:"accumulate(iterable[, func, initial]) --\\x3e accumulate object\\n\\nReturn series of accumulated sums (or other binary function results).",tp$new(t,i){Sk.abstr.checkArgsLen("accumulate",t,0,2);let[r,s,n]=Sk.abstr.copyKeywordsToNamedArgs("accumulate",["iterable","func","initial"],t,i,[Sk.builtin.none.none$,Sk.builtin.none.none$]);if(r=Sk.abstr.iter(r),s=Sk.builtin.checkNone(s)?new Sk.builtin.func(((t,e)=>Sk.abstr.numberBinOp(t,e,"Add"))):s,this===e.accumulate.prototype)return new e.accumulate(r,s,n);{const t=new this.constructor;return e.accumulate.call(t,r,s,n),t}}}}),e.chain=Sk.abstr.buildIteratorClass("itertools.chain",{constructor:function chain(t){this.iterables=t,this.current_it=null,this.tp$iternext=()=>{if(this.tp$iternext=this.constructor.prototype.tp$iternext,this.current_it=this.iterables.tp$iternext(),void 0!==this.current_it)return this.current_it=Sk.abstr.iter(this.current_it),this.tp$iternext();this.tp$iternext=()=>{}}},iternext(t){let e;for(;void 0===e;){if(e=this.current_it.tp$iternext(),void 0!==e)return e;if(this.current_it=this.iterables.tp$iternext(),void 0===this.current_it)return void(this.tp$iternext=()=>{});this.current_it=Sk.abstr.iter(this.current_it)}},slots:{tp$doc:"chain(*iterables) --\\x3e chain object\\n\\nReturn a chain object whose .__next__() method returns elements from the\\nfirst iterable until it is exhausted, then elements from the next\\niterable, until all of the iterables are exhausted.",tp$new(t,i){if(Sk.abstr.checkNoKwargs("chain",i),t=new Sk.builtin.tuple(t.slice(0)).tp$iter(),this===e.chain.prototype)return new e.chain(t);{const i=new this.constructor;return e.chain.call(i,t),i}}},classmethods:Object.assign({from_iterable:{$meth(t){const i=Sk.abstr.iter(t);return new e.chain(i)},$flags:{OneArg:!0},$doc:"chain.from_iterable(iterable) --\\x3e chain object\\n\\nAlternate chain() constructor taking a single iterable argument\\nthat evaluates lazily.",$textsig:null}},Sk.generic.classGetItem)}),e.combinations=Sk.abstr.buildIteratorClass("itertools.combinations",{constructor:function combinations(t,e){this.pool=t,this.r=e,this.indices=new Array(e).fill().map(((t,e)=>e)),this.n=t.length,this.tp$iternext=()=>{if(!(this.r>this.n))return this.tp$iternext=this.constructor.prototype.tp$iternext,new Sk.builtin.tuple(this.pool.slice(0,this.r))}},iternext(t){let e,i=!1;for(e=this.r-1;e>=0;e--)if(this.indices[e]!=e+this.n-this.r){i=!0;break}if(!i)return void(this.r=0);this.indices[e]++;for(let s=e+1;sthis.pool[t]));return new Sk.builtin.tuple(r)},slots:{tp$doc:"combinations(iterable, r) --\\x3e combinations object\\n\\nReturn successive r-length combinations of elements in the iterable.\\n\\ncombinations(range(4), 3) --\\x3e (0,1,2), (0,1,3), (0,2,3), (1,2,3)",tp$new(t,i){return combinationsNew.call(this,e.combinations.prototype,t,i)}}}),e.combinations_with_replacement=Sk.abstr.buildIteratorClass("itertools.combinations_with_replacement",{constructor:function combinations_with_replacement(t,e){this.pool=t,this.r=e,this.indices=new Array(e).fill(0),this.n=t.length,this.tp$iternext=()=>{if(this.r&&!this.n)return;this.tp$iternext=this.constructor.prototype.tp$iternext;const t=this.indices.map((t=>this.pool[t]));return new Sk.builtin.tuple(t)}},iternext(t){let e,i=!1;for(e=this.r-1;e>=0;e--)if(this.indices[e]!=this.n-1){i=!0;break}if(!i)return void(this.r=0);const r=this.indices[e]+1;for(let n=e;nthis.pool[t]));return new Sk.builtin.tuple(s)},slots:{tp$doc:"combinations_with_replacement(iterable, r) --\\x3e combinations_with_replacement object\\n\\nReturn successive r-length combinations of elements in the iterable\\nallowing individual elements to have successive repeats.\\ncombinations_with_replacement('ABC', 2) --\\x3e AA AB AC BB BC CC",tp$new(t,i){return combinationsNew.call(this,e.combinations_with_replacement.prototype,t,i)}}}),e.compress=Sk.abstr.buildIteratorClass("itertools.compress",{constructor:function compress(t,e){this.data=t,this.selectors=e},iternext(){let t=this.data.tp$iternext(),e=this.selectors.tp$iternext();for(;void 0!==t&&void 0!==e;){if(Sk.misceval.isTrue(e))return t;t=this.data.tp$iternext(),e=this.selectors.tp$iternext()}},slots:{tp$doc:"compress(data, selectors) --\\x3e iterator over selected data\\n\\nReturn data elements corresponding to true selector elements.\\nForms a shorter iterator from selected data elements using the\\nselectors to choose the data elements.",tp$new(t,i){let r,s;if([r,s]=Sk.abstr.copyKeywordsToNamedArgs("compress",["data","selectors"],t,i,[]),r=Sk.abstr.iter(r),s=Sk.abstr.iter(s),this===e.count.prototype)return new e.compress(r,s);{const t=new this.constructor;return e.compress.call(t,r,s),t}}}}),e.count=Sk.abstr.buildIteratorClass("itertools.count",{constructor:function count(t,e){this.start=t,this.step=e},iternext(){const t=this.start;return this.start=Sk.abstr.numberBinOp(this.start,this.step,"Add"),t},slots:{tp$doc:"count(start=0, step=1) --\\x3e count object\\n\\nReturn a count object whose .__next__() method returns consecutive values.\\nEquivalent to:\\n\\n def count(firstval=0, step=1):\\n x = firstval\\n while 1:\\n yield x\\n x += step\\n",tp$new(t,i){const[r,s]=Sk.abstr.copyKeywordsToNamedArgs("count",["start","step"],t,i,[new Sk.builtin.int_(0),new Sk.builtin.int_(1)]);if(!Sk.builtin.checkNumber(r)&&!Sk.builtin.checkComplex(r))throw new Sk.builtin.TypeError("a number is required");if(!Sk.builtin.checkNumber(s)&&!Sk.builtin.checkComplex(s))throw new Sk.builtin.TypeError("a number is required");if(this===e.count.prototype)return new e.count(r,s);{const t=new this.constructor;return e.count.call(t,r,s),t}},$r(){const t=Sk.misceval.objectRepr(this.start);let e=Sk.misceval.objectRepr(this.step);return e="1"===e?"":", "+e,new Sk.builtin.str(Sk.abstr.typeName(this)+"("+t+e+")")}}}),e.cycle=Sk.abstr.buildIteratorClass("itertools.cycle",{constructor:function cycle(t){this.iter=t,this.saved=[],this.consumed=!1,this.i=0,this.length},iternext(){let t;if(!this.consumed){if(t=this.iter.tp$iternext(),void 0!==t)return this.saved.push(t),t;if(this.consumed=!0,this.length=this.saved.length,!this.length)return}return t=this.saved[this.i],this.i=(this.i+1)%this.length,t},slots:{tp$doc:"cycle(iterable) --\\x3e cycle object\\n\\nReturn elements from the iterable until it is exhausted.\\nThen repeat the sequence indefinitely.",tp$new(t,i){Sk.abstr.checkOneArg("cycle",t,i);const r=Sk.abstr.iter(t[0]);if(this===e.cycle.prototype)return new e.cycle(r);{const t=new this.constructor;return e.cycle.call(t,r),t}}}}),e.dropwhile=Sk.abstr.buildIteratorClass("itertools.dropwhile",{constructor:function dropwhile(t,e){this.predicate=t,this.iter=e,this.passed},iternext(){let t=this.iter.tp$iternext();for(;void 0===this.passed&&void 0!==t;){const e=Sk.misceval.callsimArray(this.predicate,[t]);if(!Sk.misceval.isTrue(e))return this.passed=!0,t;t=this.iter.tp$iternext()}return t},slots:{tp$doc:"dropwhile(predicate, iterable) --\\x3e dropwhile object\\n\\nDrop items from the iterable while predicate(item) is true.\\nAfterwards, return every element until the iterable is exhausted.",tp$new(t,i){Sk.abstr.checkNoKwargs("dropwhile",i),Sk.abstr.checkArgsLen("dropwhile",t,2,2);const r=t[0],s=Sk.abstr.iter(t[1]);if(this===e.dropwhile.prototype)return new e.dropwhile(r,s);{const t=new this.constructor;return e.dropwhile.call(t,r,s),t}}}}),e.filterfalse=Sk.abstr.buildIteratorClass("itertools.filterfalse",{constructor:function filterfalse(t,e){this.predicate=t,this.iter=e},iternext(t){let e=this.iter.tp$iternext();if(void 0===e)return;let i=Sk.misceval.callsimArray(this.predicate,[e]);for(;Sk.misceval.isTrue(i);){if(e=this.iter.tp$iternext(),void 0===e)return;i=Sk.misceval.callsimArray(this.predicate,[e])}return e},slots:{tp$doc:"filterfalse(function or None, sequence) --\\x3e filterfalse object\\n\\nReturn those items of sequence for which function(item) is false.\\nIf function is None, return the items that are false.",tp$new(t,i){Sk.abstr.checkNoKwargs("filterfalse",i),Sk.abstr.checkArgsLen("filterfalse",t,2,2);const r=Sk.builtin.checkNone(t[0])?Sk.builtin.bool:t[0],s=Sk.abstr.iter(t[1]);if(this===e.filterfalse.prototype)return new e.filterfalse(r,s);{const t=new this.constructor;return e.filterfalse.call(t,r,s),t}}}}),e._grouper=Sk.abstr.buildIteratorClass("itertools._grouper",{constructor:function _grouper(t,e){this.groupby=t,this.tgtkey=t.tgtkey,this.id=t.id},iternext(t){const e=Sk.misceval.richCompareBool(this.groupby.currkey,this.tgtkey,"Eq");if(this.groupby.id===this.id&&e){let t=this.groupby.currval;return this.groupby.currval=this.groupby.iter.tp$iternext(),void 0!==this.groupby.currval&&(this.groupby.currkey=Sk.misceval.callsimArray(this.groupby.keyf,[this.groupby.currval])),t}}}),e.groupby=Sk.abstr.buildIteratorClass("itertools.groupby",{constructor:function groupby(t,e){this.iter=t,this.keyf=e,this.currval,this.currkey=this.tgtkey=new Sk.builtin.object,this.id},iternext(t){this.id=new Object;let i=Sk.misceval.richCompareBool(this.currkey,this.tgtkey,"Eq");for(;i;){if(this.currval=this.iter.tp$iternext(),void 0===this.currval)return;this.currkey=Sk.misceval.callsimArray(this.keyf,[this.currval]),i=Sk.misceval.richCompareBool(this.currkey,this.tgtkey,"Eq")}this.tgtkey=this.currkey;const r=new e._grouper(this);return new Sk.builtin.tuple([this.currkey,r])},slots:{tp$doc:"groupby(iterable, key=None) -> make an iterator that returns consecutive\\nkeys and groups from the iterable. If the key function is not specified or\\nis None, the element itself is used for grouping.\\n",tp$new(t,i){let r,s;if([r,s]=Sk.abstr.copyKeywordsToNamedArgs("groupby",["iterable","key"],t,i,[Sk.builtin.none.none$]),r=Sk.abstr.iter(r),s=Sk.builtin.checkNone(s)?new Sk.builtin.func((t=>t)):s,this===e.groupby.prototype)return new e.groupby(r,s);{const t=new this.constructor;return e.groupby.call(t,r,s),t}}}}),e.islice=Sk.abstr.buildIteratorClass("itertools.islice",{constructor:function islice(t,e,i,r){this.iter=t,this.previt=e,this.stop=i,this.step=r,this.tp$iternext=()=>{if(this.tp$iternext=this.constructor.prototype.tp$iternext,!(this.previt>=this.stop)){for(let t=0;t=this.stop)){for(let t=this.previt+1;tNumber.MAX_SAFE_INTEGER)throw new Sk.builtin.ValueError("Stop for islice() must be None or an integer: 0 <= x <= sys.maxsize.");if(!Sk.builtin.checkNone(s)&&!Sk.misceval.isIndex(s))throw new Sk.builtin.ValueError("Indices for islice() must be None or an integer: 0 <= x <= sys.maxsize.");if(s=Sk.builtin.checkNone(s)?0:Sk.misceval.asIndexSized(s),s<0||s>Number.MAX_SAFE_INTEGER)throw new Sk.builtin.ValueError("Indices for islice() must be None or an integer: 0 <= x <= sys.maxsize.");if(!Sk.builtin.checkNone(o)&&!Sk.misceval.isIndex(o))throw new Sk.builtin.ValueError("Step for islice() must be a positive integer or None");if(o=Sk.builtin.checkNone(o)?1:Sk.misceval.asIndexSized(o),o<=0||o>Number.MAX_SAFE_INTEGER)throw new Sk.builtin.ValueError("Step for islice() must be a positive integer or None.");if(this===e.islice.prototype)return new e.islice(r,s,n,o);{const t=new this.constructor;return e.islice.call(t,r,s,n,o),t}}}}),e.permutations=Sk.abstr.buildIteratorClass("itertools.permutations",{constructor:function permutations(t,e){this.pool=t,this.r=e;const i=t.length;this.indices=new Array(i).fill().map(((t,e)=>e)),this.cycles=new Array(e).fill().map(((t,e)=>i-e)),this.n=i,this.tp$iternext=()=>{if(!(this.r>this.n))return this.tp$iternext=this.constructor.prototype.tp$iternext,new Sk.builtin.tuple(this.pool.slice(0,this.r))}},iternext(t){for(let e=this.r-1;e>=0;e--){if(this.cycles[e]--,0!=this.cycles[e]){const t=this.cycles[e];[this.indices[e],this.indices[this.n-t]]=[this.indices[this.n-t],this.indices[e]];const i=this.indices.map((t=>this.pool[t])).slice(0,this.r);return new Sk.builtin.tuple(i)}this.indices.push(this.indices.splice(e,1)[0]),this.cycles[e]=this.n-e}this.r=0},slots:{tp$doc:"permutations(iterable[, r]) --\\x3e permutations object\\n\\nReturn successive r-length permutations of elements in the iterable.\\n\\npermutations(range(3), 2) --\\x3e (0,1), (0,2), (1,0), (1,2), (2,0), (2,1)",tp$new(t,i){let r,s;[r,s]=Sk.abstr.copyKeywordsToNamedArgs("permutations",["iterable","r"],t,i,[Sk.builtin.none.none$]);const n=Sk.misceval.arrayFromIterable(r);if(s=Sk.builtin.checkNone(s)?n.length:Sk.misceval.asIndexSized(s,Sk.builtin.OverFlowError),s<0)throw new Sk.builtin.ValueError("r must be non-negative");if(this===e.permutations.prototype)return new e.permutations(n,s);{const t=new this.constructor;return e.permutations.call(t,n,s),t}}}}),e.product=Sk.abstr.buildIteratorClass("itertools.product",{constructor:function product(t){this.pools=t,this.n=t.length,this.indices=Array(t.length).fill(0),this.pool_sizes=t.map((t=>t.length)),this.tp$iternext=()=>{this.tp$iternext=this.constructor.prototype.tp$iternext;const t=this.indices.map(((t,e)=>this.pools[e][this.indices[e]]));if(!t.some((t=>void 0===t)))return new Sk.builtin.tuple(t);this.n=0}},iternext(t){let e=this.n-1;for(;e>=0&&e=this.pool_sizes[e]?(this.indices[e]=-1,e--):e++;if(this.n&&!this.indices.every((t=>-1===t))){const t=this.indices.map(((t,e)=>this.pools[e][this.indices[e]]));return new Sk.builtin.tuple(t)}this.n=0},slots:{tp$doc:"product(*iterables, repeat=1) --\\x3e product object\\n\\nCartesian product of input iterables. Equivalent to nested for-loops.\\n\\nFor example, product(A, B) returns the same as: ((x,y) for x in A for y in B).\\nThe leftmost iterators are in the outermost for-loop, so the output tuples\\ncycle in a manner similar to an odometer (with the rightmost element changing\\non every iteration).\\n\\nTo compute the product of an iterable with itself, specify the number\\nof repetitions with the optional repeat keyword argument. For example,\\nproduct(A, repeat=4) means the same as product(A, A, A, A).\\n\\nproduct('ab', range(3)) --\\x3e ('a',0) ('a',1) ('a',2) ('b',0) ('b',1) ('b',2)\\nproduct((0,1), (0,1), (0,1)) --\\x3e (0,0,0) (0,0,1) (0,1,0) (0,1,1) (1,0,0) ...",tp$new(t,i){let[r]=Sk.abstr.copyKeywordsToNamedArgs("product",["repeat"],[],i,[new Sk.builtin.int_(1)]);if(r=Sk.misceval.asIndexSized(r,Sk.builtin.OverFlowError),r<0)throw new Sk.builtin.ValueError("repeat argument cannot be negative");const s=[];for(let e=0;ethis.object)},iternext(t){return this.times-- >0?this.object:void 0},slots:{tp$doc:"repeat(object [,times]) -> create an iterator which returns the object\\nfor the specified number of times. If not specified, returns the object\\nendlessly.",tp$new(t,i){let r,s;if([r,s]=Sk.abstr.copyKeywordsToNamedArgs("repeat",["object","times"],t,i,[null]),s=null!==s?Sk.misceval.asIndexSized(s,Sk.builtin.OverFlowError):void 0,this===e.repeat.prototype)return new e.repeat(r,s);{const t=new this.constructor;return e.repeat.call(t,r,s),t}},$r(){const t=Sk.misceval.objectRepr(this.object),e=void 0===this.times?"":", "+(this.times>=0?this.times:0);return new Sk.builtin.str(Sk.abstr.typeName(this)+"("+t+e+")")}},methods:{__lenght_hint__:{$meth(){if(void 0===this.times)throw new Sk.builtin.TypeError("len() of unsized object");return new Sk.builtin.int_(this.times)},$flags:{NoArgs:!0},$textsig:null}}}),e.starmap=Sk.abstr.buildIteratorClass("itertools.starmap",{constructor:function starmap(t,e){this.func=t,this.iter=e},iternext(t){const e=this.iter.tp$iternext();if(void 0===e)return;const i=Sk.misceval.arrayFromIterable(e);return Sk.misceval.callsimArray(this.func,i)},slots:{tp$new(t,i){let r,s;if([r,s]=Sk.abstr.copyKeywordsToNamedArgs("starmap",["func","iterable"],t,i,[]),s=Sk.abstr.iter(s),r=Sk.builtin.checkNone(r)?Sk.builtin.bool:r,this===e.starmap.prototype)return new e.starmap(r,s);{const t=new this.constructor;return e.starmap.call(t,r,s),t}}}}),e.takewhile=Sk.abstr.buildIteratorClass("itertools.takewhile",{constructor:function takewhile(t,e){this.predicate=t,this.iter=e},iternext(){const t=this.iter.tp$iternext();if(void 0!==t){const e=Sk.misceval.callsimArray(this.predicate,[t]);if(Sk.misceval.isTrue(e))return t;this.tp$iternext=()=>{}}},slots:{tp$doc:"takewhile(predicate, iterable) --\\x3e takewhile object\\n\\nReturn successive entries from an iterable as long as the \\npredicate evaluates to true for each entry.",tp$new(t,i){Sk.abstr.checkNoKwargs("takewhile",i),Sk.abstr.checkArgsLen("takewhile",t,2,2);const r=t[0],s=Sk.abstr.iter(t[1]);if(this===e.takewhile.prototype)return new e.takewhile(r,s);{const t=new this.constructor;return e.takewhile.call(t,r,s),t}}}}),e.tee=new Sk.builtin.func((function(){throw new Sk.builtin.NotImplementedError("tee is not yet implemented in Skulpt")})),e.zip_longest=Sk.abstr.buildIteratorClass("itertools.zip_longest",{constructor:function zip_longest(t,e){this.iters=t,this.fillvalue=e,this.active=this.iters.length},iternext(t){if(!this.active)return;let i;const r=[];for(let s=0;s{throw new a(e+" is not yet implemented in skulpt")}))}const j=E.JSONDecodeError=N("json.JSONDecodeError",{base:l,constructor:function JSONDecodeError(e,t,n){const r=t.slice(0,n),o=r.split("\\n").length,s=n-r.lastIndexOf("\\n"),i=`${e}: line ${o} column ${s} (char ${n})`;l.call(this,i),this.$msg=e,this.$doc=t,this.$pos=n,this.$lineno=o,this.$colno=s},getsets:Object.fromEntries(["msg","doc","pos","lineno","colno"].map((e=>[e,{$get(){return g(this["$"+e])}}])))});class JSONEncoder{constructor(e,t,n,r,o,s,i,l){this.skipkeys=e,this.ensure_ascii=t,this.check_circular=n,this.allow_nan=r,this.indent=o,this.separators=s,this.sort_keys=l,this.item_separator=", ",this.key_separator=": ",null!==this.separators?[this.item_separator,this.key_separator]=this.separators:null!==this.indent&&(this.item_separator=","),null!==i&&(this.default=i),this.encoder=this.make_encoder()}default(e){throw new i(`Object of type ${y(e)} is not JSON serializable`)}encode(t){return new e(this.encoder(t))}make_encoder(){let e,t;e=this.check_circular?new Set:null,t=(this.ensure_ascii,JSON.stringify);return function _make_iterencode(e,t,n,r,s,a,u,h,d){null!==r&&"string"!=typeof r&&(r=" ".repeat(r));let f,p,g,w;null!==e?(f=t=>{if(e.has(t))throw new l("Circular reference detected");e.add(t)},p=t=>e.delete(t)):(f=e=>{},p=e=>{});null!==r?(g=(e,t)=>{t+=1;const n="\\n"+r.repeat(t);return[e+=n,t,u+n]},w=(e,t,n)=>(n-=1,e+="\\n"+r.repeat(n)+t)):(g=(e,t)=>[e,t,u],w=(e,t,n)=>e+t);const _unhandled=(e,n)=>{f(e);const r=_iterencode(t(e),n);return p(e),r},_iterencode_list=(e,t)=>{if(!e.length)return"[]";let n,r;f(e),[n,t,r]=g("[",t);let o=!0;for(let s of e)o?o=!1:n+=r,n+=_iterencode(s,t);return p(e),w(n,"]",t)},_iterencode_dict=(e,t)=>{if(!e.sq$length())return"{}";let r,l;f(e),[r,t,l]=g("{",t);let u=!0;if(h){const t=$(e.tp$getattr(v)),n=c(t);e=$(o,[n])}for(let[o,c]of e.$items()){const e=o.valueOf(),h=typeof e;if("string"===h)o=e;else if("number"===h)o=s(o);else if("boolean"===h||null===e)o=String(e);else{if(!JSBI.__isBigInt(e)){if(d)continue;throw new i("keys must be str, int, float, bool or None, not "+y(o))}o=e.toString()}u?u=!1:r+=l,r+=n(o),r+=a,r+=_iterencode(c,t)}return p(e),w(r,"}",t)},_iterencode=(e,t=0)=>String(m(e,{stringHook:e=>n(e),numberHook:(e,t)=>s(t),bigintHook:e=>e.toString(),dictHook:e=>_iterencode_dict(e,t),arrayHook:e=>_iterencode_list(e,t),setHook:e=>_unhandled(e,t),funcHook:(e,n)=>_unhandled(n,t),objecthook:(e,n)=>_unhandled(n,t),unhandledHook:e=>_unhandled(e,t)}));return _iterencode}(e,this.default,t,this.indent,((e,t=this.allow_nan)=>{const n=e.valueOf();let r;if(Number.isFinite(n))return J(e);if(r=n.toString(),!t)throw new l("Out of range float values are not JSON compliant: "+J(e));return r}),this.key_separator,this.item_separator,this.sort_keys,this.skipkeys)}}const v=new e("items");const x=[!1,!0,!0,!0,null,null,null,!1],D=new JSONEncoder(...x),F=/(-?(?:0|[1-9]\\d*))(\\.\\d+)?([eE][-+]?\\d+)?/;const I=/"[^"\\\\]*(?:\\\\.[^"\\\\]*)*"/m;function scanstring(t,n){const r=t.substring(n-1).match(I);if(null===r)throw new j("Unterminated string starting at",t,n-1);try{return[new e(JSON.parse(r[0])),n+r[0].length-1]}catch(o){let e=o.message.match(/(?:column|position) (\\d+)/);e=e&&Number(e[1]);n=n+(e||0)-(void 0===o.columnNumber?1:2);const r=o.message.replace("JSON.parse: ","").replace(/ at line \\d+ column \\d+ of the JSON data/,"").replace(/ in JSON at position \\d+$/,"");throw new j(r,t,n)}}const A=/[ \\t\\n\\r]*/;function JSONArray(e,t,r){const o=[];let s=e[t];const adjust_white_space=()=>{if(" "===s||"\\t"===s||"\\n"===s||"\\r"===s){const n=e.substring(t).match(A);t+=n[0].length,s=e[t]}};if(adjust_white_space(),"]"===s)return[new n([]),t+1];for(;;){let n;if([n,t]=r(e,t),void 0===n)throw new j("Expecting value",e,t);if(o.push(n),s=e[t],adjust_white_space(),t++,"]"===s)break;if(","!==s)throw new j("Expecting \',\' delimiter",e,t-1);s=e[t],adjust_white_space()}return[new n(o),t]}function JSONObject(e,t,s,i,l){let a=[],c=e[t];const adjust_white_space=()=>{if(" "===c||"\\t"===c||"\\n"===c||"\\r"===c){const n=e.substring(t).match(A);t+=n[0].length,c=e[t]}};if(\'"\'!==c){if(adjust_white_space(),"}"===c){if(null!==l){return[l(new n([])),t+1]}return a=new o([]),null!==i&&(a=i(a)),[a,t+1]}if(\'"\'!==c)throw new j("Expecting property name enclosed in double quotes",e,t)}let u,h;for(t+=1;;){if([u,t]=scanstring(e,t),":"!==(c=e[t])&&(adjust_white_space(),":"!==e[t]))throw new j("Expecting \':\' delimiter",e,t);if(c=e[++t],adjust_white_space(),[h,t]=s(e,t),void 0===h)throw new j("Expecting value",e,t);if(c=e[t],a.push([u,h]),adjust_white_space(),t++,"}"===c)break;if(","!==c)throw new j("Expecting \',\' delimiter",e,t-1);if(c=e[t],adjust_white_space(),t++,\'"\'!==c)throw new j("Expecting property name enclosed in double quotes",e,t-1)}if(null!==l){return[l(new n(a.map((e=>new r(e))))),t]}return a=new o(a.flat()),null!==i&&(a=i(a)),[a,t]}const H={NaN:new t(NaN),Infinity:new t(1/0),"-Infinity":new t(-1/0)};class JSONDecoder{constructor(e,t,n,r,o){this.object_hook=e,this.parse_float=t||w,this.parse_int=n||_,this.parse_constant=r||(e=>H[e]),this.object_pairs_hook=o,this.parse_object=JSONObject,this.parse_array=JSONArray,this.parse_string=scanstring,this.scan_once=function make_scanner(e){const{parse_object:t,parse_array:n,parse_string:r,parse_float:o,parse_int:s,parse_constant:i,object_hook:l,object_pairs_hook:a}=e,scan_once=(e,c)=>{const f=e[c];if(void 0===f)return[f,c];if(\'"\'===f)return r(e,c+1);if("{"===f)return t(e,c+1,scan_once,l,a);if("["===f)return n(e,c+1,scan_once);if("n"===f&&"null"===e.substring(c,c+4))return[u,c+4];if("t"===f&&"true"===e.substring(c,c+4))return[h,c+4];if("f"===f&&"false"===e.substring(c,c+5))return[d,c+5];const p=e.substring(c).match(F);if(null!==p){let e;const[t,n,r,i]=p;return e=r||i?o(n+(r||"")+(i||"")):s(n),[e,c+t.length]}return"N"===f&&"NaN"===e.substring(c,c+3)?[i("NaN"),c+3]:"I"==f&&"Infinity"===e.substring(c,c+8)?[i("Infinity"),c+8]:"-"==f&&"-Infinity"===e.substring(c,c+9)?[i("-Infinity"),c+9]:[void 0,c]};return scan_once}(this)}white(e,t){const n=(0===t?e:e.substring(t)).match(A);return null!==n&&(t+=n[0].length),t}decode(e){e=e.toString();let[t,n]=this.scan_once(e,this.white(e,0));if(void 0===t)throw new j("Expecting value",e,n);if(n=this.white(e,n),n!==e.length)throw new j("Extra data",e,n);return t}}const T=Array(5).fill(null),C=new JSONDecoder(...T);function convertToNullOrFunc(e){return null===e||e===u?null:t=>$(e,[g(t)])}return k("json",E,{loads:{$meth(e,t){O("dumps",e);let n=e[0];if(f(n));else{if(!p(n))throw new i(`the JSON object must be str or bytes, not ${y(n)}`);n=(new TextDecoder).decode(n.valueOf())}const r=S("dumps",["object_hook","parse_float","parse_int","parse_constant","object_pairs_hook"],[],t,T).map(convertToNullOrFunc);return r.every((e=>null===e))?C.decode(n):new JSONDecoder(...r).decode(n)},$doc:"Deserialize ``s`` (a ``str`` or ``bytes`` instance containing a JSON document) to a Python object.",$flags:{FastCall:!0}},dumps:{$meth(e,t){O("dumps",e);const n=e[0];let[r,o,s,l,a,c,u,h]=S("loads",["skipkeys","ensure_ascii","check_circular","allow_nan","indent","separators","default","sort_keys"],[],t,x);if(r=b(r),o=b(o),s=b(s),l=b(l),a=m(a),c=m(c),u=convertToNullOrFunc(u),h=b(h),!r&&o&&s&&l&&null===a&&null===c&&null===u&&!h)return D.encode(n);if(null===c);else if(!Array.isArray(c)||2!==c.length||"string"!=typeof c[0]||"string"!=typeof c[1])throw new i("separators shuld be a list or tuple of strings of length 2");return new JSONEncoder(r,o,s,l,a,c,u,h).encode(n)},$doc:"Serialize ``obj`` to a JSON formatted ``str``",$flags:{FastCall:!0}}}),E}',"src/lib/keyword.js":'function $builtinmodule(){const{ffi:{remapToPy:t},builtin:{frozenset:e,str:s}}=Sk,i=new s("keyword"),n=t(["iskeyword","issoftkeyword","kwlist","softkwlist"]),o=t(["False","None","True","and","as","assert","async","await","break","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","nonlocal","not","or","pass","raise","return","try","while","with","yield"]),a=t(["_","case","match"]);return{__name__:i,__all__:n,kwlist:o,softkwlist:a,iskeyword:new e(o).tp$getattr(s.$contains),issoftkeyword:new e(a).tp$getattr(s.$contains)}}',"src/lib/math.js":`const $builtinmodule=function(e){const{builtin:{str:t,int_:n,float_:i,TypeError:r,pyCheckType:u,checkNumber:l},abstr:{lookupSpecial:o},misceval:{callsimOrSuspendArray:a}}=Sk,s={pi:new Sk.builtin.float_(Math.PI),e:new Sk.builtin.float_(Math.E),tau:new Sk.builtin.float_(2*Math.PI),nan:new Sk.builtin.float_(NaN),inf:new Sk.builtin.float_(1/0)},b=new t("__ceil__");const get_sign=function(e){return e=e?e<0?-1:1:1/e<0?-1:1};function factorial(e){Sk.builtin.pyCheckType("x","number",Sk.builtin.checkNumber(e));let t=Sk.builtin.asnum$(e);if((e=Math.floor(t))!=t)throw new Sk.builtin.ValueError("factorial() only accepts integral values");if(e<0)throw new Sk.builtin.ValueError("factorial() not defined for negative numbers");let n=1;for(let i=2;i<=e&&i<=18;i++)n*=i;if(e<=18)return new Sk.builtin.int_(n);n=JSBI.BigInt(n);for(let i=19;i<=e;i++)n=JSBI.multiply(n,JSBI.BigInt(i));return new Sk.builtin.int_(n)}const c=new t("__floor__");function _gcd_internal(e,t){let n;return"number"==typeof e&&"number"==typeof t?(n=function _gcd(e,t){return 0==t?e:_gcd(t,e%t)}(e=Math.abs(e),t=Math.abs(t)),n=n<0?-n:n):(n=function _biggcd(e,t){return JSBI.equal(t,JSBI.__ZERO)?e:_biggcd(t,JSBI.remainder(e,t))}(e=JSBI.BigInt(e),t=JSBI.BigInt(t)),JSBI.lessThan(n,JSBI.__ZERO)&&(n=JSBI.multiply(n,JSBI.BigInt(-1)))),n}return Sk.abstr.setUpModuleMethods("math",s,{acos:{$meth:function acos(e){return Sk.builtin.pyCheckType("rad","number",Sk.builtin.checkNumber(e)),new Sk.builtin.float_(Math.acos(Sk.builtin.asnum$(e)))},$flags:{OneArg:!0},$textsig:"($module, x, /)",$doc:"Return the arc cosine (measured in radians) of x."},acosh:{$meth:function acosh(e){Sk.builtin.pyCheckType("x","number",Sk.builtin.checkNumber(e));const t=(e=Sk.builtin.asnum$(e))+Math.sqrt(e*e-1);return new Sk.builtin.float_(Math.log(t))},$flags:{OneArg:!0},$textsig:"($module, x, /)",$doc:"Return the inverse hyperbolic cosine of x."},asin:{$meth:function asin(e){return Sk.builtin.pyCheckType("rad","number",Sk.builtin.checkNumber(e)),new Sk.builtin.float_(Math.asin(Sk.builtin.asnum$(e)))},$flags:{OneArg:!0},$textsig:"($module, x, /)",$doc:"Return the arc sine (measured in radians) of x."},asinh:{$meth:function asinh(e){Sk.builtin.pyCheckType("x","number",Sk.builtin.checkNumber(e));const t=(e=Sk.builtin.asnum$(e))+Math.sqrt(e*e+1);return new Sk.builtin.float_(Math.log(t))},$flags:{OneArg:!0},$textsig:"($module, x, /)",$doc:"Return the inverse hyperbolic sine of x."},atan:{$meth:function atan(e){return Sk.builtin.pyCheckType("rad","number",Sk.builtin.checkNumber(e)),new Sk.builtin.float_(Math.atan(Sk.builtin.asnum$(e)))},$flags:{OneArg:!0},$textsig:"($module, x, /)",$doc:"Return the arc tangent (measured in radians) of x."},atan2:{$meth:function atan2(e,t){return Sk.builtin.pyCheckType("y","number",Sk.builtin.checkNumber(e)),Sk.builtin.pyCheckType("x","number",Sk.builtin.checkNumber(t)),new Sk.builtin.float_(Math.atan2(Sk.builtin.asnum$(e),Sk.builtin.asnum$(t)))},$flags:{MinArgs:2,MaxArgs:2},$textsig:"($module, y, x, /)",$doc:"Return the arc tangent (measured in radians) of y/x.\\n\\nUnlike atan(y/x), the signs of both x and y are considered."},atanh:{$meth:function atanh(e){Sk.builtin.pyCheckType("x","number",Sk.builtin.checkNumber(e));const t=(1+(e=Sk.builtin.asnum$(e)))/(1-e);return new Sk.builtin.float_(Math.log(t)/2)},$flags:{OneArg:!0},$textsig:"($module, x, /)",$doc:"Return the inverse hyperbolic tangent of x."},ceil:{$meth:function ceil(e){let t;if(e.ob$type!==i){const n=o(e,b);if(void 0!==n)return a(n);u("","real number",l(e)),t=Sk.builtin.asnum$(e)}else t=e.v;return new n(Math.ceil(t))},$flags:{OneArg:!0},$textsig:"($module, x, /)",$doc:"Return the ceiling of x as an Integral.\\n\\nThis is the smallest integer >= x."},comb:{$meth:function comb(e,t){let n=Sk.misceval.asIndexOrThrow(e),i=Sk.misceval.asIndexOrThrow(t);if(n<0)throw new Sk.builtin.ValueError("n must be an non-negative integer");if(i<0)throw new Sk.builtin.ValueError("k must be a non-negative integer");if(i>e)return new Sk.builtin.int_(0);e=new Sk.builtin.int_(n),t=new Sk.builtin.int_(i);let r=Sk.ffi.remapToJs(e.nb$subtract(t));if(rNumber.MAX_SAFE_INTEGER)throw new Sk.builtin.OverflowError("min(n - k, k) must not exceed "+Number.MAX_SAFE_INTEGER);const u=new Sk.builtin.int_(1);let l=e;for(let o=1;o n.\\n\\nIf k is not specified or is None, then k defaults to n\\nand the function returns n!.\\n\\nRaises TypeError if either of the arguments are not integers.\\nRaises ValueError if either of the arguments are negative."},copysign:{$meth:function copysign(e,t){Sk.builtin.pyCheckType("x","number",Sk.builtin.checkNumber(e)),Sk.builtin.pyCheckType("y","number",Sk.builtin.checkNumber(t));const n=Sk.builtin.asnum$(t),i=Sk.builtin.asnum$(e),r=get_sign(i)*get_sign(n);return new Sk.builtin.float_(i*r)},$flags:{MinArgs:2,MaxArgs:2},$textsig:"($module, x, y, /)",$doc:"Return a float with the magnitude (absolute value) of x but the sign of y.\\n\\nOn platforms that support signed zeros, copysign(1.0, -0.0)\\nreturns -1.0.\\n"},cos:{$meth:function cos(e){return Sk.builtin.pyCheckType("rad","number",Sk.builtin.checkNumber(e)),new Sk.builtin.float_(Math.cos(Sk.builtin.asnum$(e)))},$flags:{OneArg:!0},$textsig:"($module, x, /)",$doc:"Return the cosine of x (measured in radians)."},cosh:{$meth:function cosh(e){Sk.builtin.pyCheckType("x","number",Sk.builtin.checkNumber(e)),e=Sk.builtin.asnum$(e);const t=Math.E,n=Math.pow(t,e),i=(n+1/n)/2;return new Sk.builtin.float_(i)},$flags:{OneArg:!0},$textsig:"($module, x, /)",$doc:"Return the hyperbolic cosine of x."},degrees:{$meth:function degrees(e){Sk.builtin.pyCheckType("rad","number",Sk.builtin.checkNumber(e));const t=180/Math.PI*Sk.builtin.asnum$(e);return new Sk.builtin.float_(t)},$flags:{OneArg:!0},$textsig:"($module, x, /)",$doc:"Convert angle x from radians to degrees."},erf:{$meth:function erf(e){throw new Sk.builtin.NotImplementedError("math.erf() is not yet implemented in Skulpt")},$flags:{OneArg:!0},$textsig:"($module, x, /)",$doc:"Error function at x."},erfc:{$meth:function erfc(e){throw new Sk.builtin.NotImplementedError("math.erfc() is not yet implemented in Skulpt")},$flags:{OneArg:!0},$textsig:"($module, x, /)",$doc:"Complementary error function at x."},exp:{$meth:function exp(e){Sk.builtin.pyCheckType("x","number",Sk.builtin.checkNumber(e));let t=e.v;if("number"!=typeof t&&(t=e.nb$float().v),t==1/0||t==-1/0||isNaN(t))return new Sk.builtin.float_(Math.exp(t));const n=Math.exp(t);if(!isFinite(n))throw new Sk.builtin.OverflowError("math range error");return new Sk.builtin.float_(n)},$flags:{OneArg:!0},$textsig:"($module, x, /)",$doc:"Return e raised to the power of x."},expm1:{$meth:function expm1(e){Sk.builtin.pyCheckType("x","number",Sk.builtin.checkNumber(e));const t=Sk.builtin.asnum$(e);if(Math.abs(t)<.7){const e=Math.exp(t);if(1==e)return new Sk.builtin.float_(t);{const n=(e-1)*t/Math.log(e);return new Sk.builtin.float_(n)}}{const e=Math.exp(t)-1;return new Sk.builtin.float_(e)}},$flags:{OneArg:!0},$textsig:"($module, x, /)",$doc:"Return exp(x)-1.\\n\\nThis function avoids the loss of precision involved in the direct evaluation of exp(x)-1 for small x."},fabs:{$meth:function fabs(e){Sk.builtin.pyCheckType("x","number",Sk.builtin.checkNumber(e));let t=e.v;return JSBI.__isBigInt(t)&&(t=e.nb$float().v),t=Math.abs(t),new Sk.builtin.float_(t)},$flags:{OneArg:!0},$textsig:"($module, x, /)",$doc:"Return the absolute value of the float x."},factorial:{$meth:factorial,$flags:{OneArg:!0},$textsig:"($module, x, /)",$doc:"Find x!.\\n\\nRaise a ValueError if x is negative or non-integral."},floor:{$meth:function floor(e){let t;if(e.ob$type===i)t=e.v;else{const n=o(e,c);if(void 0!==n)return a(n);u("x","number",l(e)),t=Sk.builtin.asnum$(e)}return new n(Math.floor(t))},$flags:{OneArg:!0},$textsig:"($module, x, /)",$doc:"Return the floor of x as an Integral.\\n\\nThis is the largest integer <= x."},fmod:{$meth:function fmod(e,t){Sk.builtin.pyCheckType("x","number",Sk.builtin.checkNumber(e)),Sk.builtin.pyCheckType("y","number",Sk.builtin.checkNumber(t));let n=e.v,i=t.v;if("number"!=typeof n&&(n=e.nb$float().v),"number"!=typeof i&&(i=t.nb$float().v),(i==1/0||i==-1/0)&&isFinite(n))return new Sk.builtin.float_(n);const r=n%i;if(isNaN(r)&&!isNaN(n)&&!isNaN(i))throw new Sk.builtin.ValueError("math domain error");return new Sk.builtin.float_(r)},$flags:{MinArgs:2,MaxArgs:2},$textsig:"($module, x, y, /)",$doc:"Return fmod(x, y), according to platform C.\\n\\nx % y may differ."},frexp:{$meth:function frexp(e){Sk.builtin.pyCheckType("x","number",Sk.builtin.checkNumber(e));const t=Sk.builtin.asnum$(e),n=[t,0];if(0!==t&&Number.isFinite(t)){const e=Math.abs(t);let i=Math.max(-1023,Math.floor(Math.log2(e))+1),r=e*Math.pow(2,-i);for(;r<.5;)r*=2,i--;for(;r>=1;)r*=.5,i++;t<0&&(r=-r),n[0]=r,n[1]=i}return n[0]=new Sk.builtin.float_(n[0]),n[1]=new Sk.builtin.int_(n[1]),new Sk.builtin.tuple(n)},$flags:{OneArg:!0},$textsig:"($module, x, /)",$doc:"Return the mantissa and exponent of x, as pair (m, e).\\n\\nm is a float and e is an int, such that x = m * 2.**e.\\nIf x is 0, m and e are both 0. Else 0.5 <= abs(m) < 1.0."},fsum:{$meth:function fsum(e){if(!Sk.builtin.checkIterable(e))throw new Sk.builtin.TypeError("'"+Sk.abstr.typeName(e)+"' object is not iterable");let t,n,i,r=[];for(let l=(e=Sk.abstr.iter(e)).tp$iternext();void 0!==l;l=e.tp$iternext()){Sk.builtin.pyCheckType("","real number",Sk.builtin.checkNumber(l)),t=0;let e=l.v;"number"!=typeof e&&(e=l.nb$float().v),l=e;for(let u=0,o=r.length;u0;){n--;let t=a;a=JSBI.signedRightShift(u,JSBI.BigInt(n));const r=JSBI.subtract(JSBI.subtract(a,t),i),s=JSBI.leftShift(o,r),b=JSBI.add(JSBI.subtract(JSBI.subtract(l,t),a),i),c=JSBI.signedRightShift(e,b);o=JSBI.add(s,JSBI.divide(c,o))}let s=o;return JSBI.greaterThan(JSBI.multiply(s,s),e)&&(s=JSBI.subtract(s,i)),JSBI.lessThanOrEqual(s,JSBI.BigInt(Number.MAX_SAFE_INTEGER))&&(s=Number(s)),new Sk.builtin.int_(s)}(t)},$flags:{OneArg:!0},$textsig:"($module, n, /)",$doc:"Return the integer part of the square root of the input."},lcm:{$meth:function lcm(...e){function abs(e){return"number"==typeof e?new Sk.builtin.int_(Math.abs(e)):JSBI.lessThan(e,JSBI.__ZERO)?new Sk.builtin.int_(JSBI.unaryMinus(e)):new Sk.builtin.int_(e)}const t=e.length;if(0===t)return new Sk.builtin.int_(1);let n;for(n=0;nNumber.MAX_SAFE_INTEGER?JSBI.BigInt(r):e}else r=JSBI.BigInt(r);"number"!=typeof r&&(i=JSBI.BigInt(i),r=JSBI.multiply(JSBI.divide(r,_gcd_internal(r,i)),i))}return abs(r)},$flags:{MinArgs:0},$textsig:"($module, *integers, /)",$doc:"Return the least common multiple of the specified integer arguments. If all arguments are nonzero, then the returned value is the smallest positive integer that is a multiple of all arguments. If any of the arguments is zero, then the returned value is 0. lcm() without arguments returns 1."},ldexp:{$meth:function ldexp(e,t){Sk.builtin.pyCheckType("x","number",Sk.builtin.checkNumber(e)),Sk.builtin.pyCheckType("i","integer",Sk.builtin.checkInt(t));let n=e.v;"number"!=typeof n&&(n=e.nb$float().v);const i=Sk.builtin.asnum$(t);if(n==1/0||n==-1/0||0==n||isNaN(n))return new Sk.builtin.float_(n);const r=n*Math.pow(2,i);if(!isFinite(r))throw new Sk.builtin.OverflowError("math range error");return new Sk.builtin.float_(r)},$flags:{MinArgs:2,MaxArgs:2},$textsig:"($module, x, i, /)",$doc:"Return x * (2**i).\\n\\nThis is essentially the inverse of frexp()."},lgamma:{$meth:function lgamma(e){throw new Sk.builtin.NotImplementedError("math.lgamma() is not yet implemented in Skulpt")},$flags:{OneArg:!0},$textsig:"($module, x, /)",$doc:"Natural logarithm of absolute value of Gamma function at x."},log:{$meth:function log(e,t){Sk.builtin.pyCheckType("x","number",Sk.builtin.checkNumber(e));let n,i,r=Sk.builtin.asnum$(e);if(r<=0)throw new Sk.builtin.ValueError("math domain error");if(void 0===t?n=Math.E:(Sk.builtin.pyCheckType("base","number",Sk.builtin.checkNumber(t)),n=Sk.builtin.asnum$(t)),n<=0)throw new Sk.builtin.ValueError("math domain error");if(Sk.builtin.checkFloat(e)||re)return new Sk.builtin.int_(0);if(0===t)return new Sk.builtin.int_(1);if(t>Number.MAX_SAFE_INTEGER)throw new Sk.builtin.OverflowError("k must not exceed "+Number.MAX_SAFE_INTEGER);const n=new Sk.builtin.int_(1);let i=e=new Sk.builtin.int_(e);for(let r=1;r n.\\n\\nIf k is not specified or is None, then k defaults to n\\nand the function returns n!.\\n\\nRaises TypeError if either of the arguments are not integers.\\nRaises ValueError if either of the arguments are negative.'"},prod:{$meth:function prod(e,t){Sk.abstr.checkArgsLen("prod",e,1,1),e=Sk.abstr.copyKeywordsToNamedArgs("prod",[null,"start"],e,t,[new Sk.builtin.int_(1)]);const n=Sk.abstr.iter(e[0]);let i,r=e[1];return i=r.constructor===Sk.builtin.int_?function fastProdInt(){return Sk.misceval.iterFor(n,(e=>{if(e.constructor!==Sk.builtin.int_)return e.constructor===Sk.builtin.float_?(r=r.nb$float().nb$multiply(e),new Sk.misceval.Break("float")):(r=Sk.abstr.numberBinOp(r,e,"Mult"),new Sk.misceval.Break("slow"));r=r.nb$multiply(e)}))}():r.constructor===Sk.builtin.float_?"float":"slow",Sk.misceval.chain(i,(e=>"float"===e?function fastProdFloat(){return Sk.misceval.iterFor(n,(e=>{if(e.constructor!==Sk.builtin.float_&&e.constructor!==Sk.builtin.int_)return r=Sk.abstr.numberBinOp(r,e,"Mult"),new Sk.misceval.Break("slow");r=r.nb$multiply(e)}))}():e),(e=>{if("slow"===e)return function slowProd(){return Sk.misceval.iterFor(n,(e=>{r=Sk.abstr.numberBinOp(r,e,"Mult")}))}()}),(()=>r))},$flags:{FastCall:!0},$textsig:"($module, iterable, /, *, start=1)",$doc:"Calculate the product of all the elements in the input iterable. The default start value for the product is 1.\\n\\nWhen the iterable is empty, return the start value. This function is intended specifically for use with numeric values and may reject non-numeric types."},pow:{$meth:function pow(e,t){Sk.builtin.pyCheckType("x","number",Sk.builtin.checkNumber(e)),Sk.builtin.pyCheckType("y","number",Sk.builtin.checkNumber(t));let n=e.v,i=t.v;if("number"!=typeof n&&(n=e.nb$float().v),"number"!=typeof i&&(i=t.nb$float().v),0==n&&i<0)throw new Sk.builtin.ValueError("math domain error");if(1==n)return new Sk.builtin.float_(1);if(Number.isFinite(n)&&Number.isFinite(i)&&n<0&&!Number.isInteger(i))throw new Sk.builtin.ValueError("math domain error");if(-1==n&&(i==-1/0||i==1/0))return new Sk.builtin.float_(1);const r=Math.pow(n,i);if(!Number.isFinite(n)||!Number.isFinite(i))return new Sk.builtin.float_(r);if(r==1/0||r==-1/0)throw new Sk.builtin.OverflowError("math range error");return new Sk.builtin.float_(r)},$flags:{MinArgs:2,MaxArgs:2},$textsig:"($module, x, y, /)",$doc:"Return x**y (x to the power of y)."},radians:{$meth:function radians(e){Sk.builtin.pyCheckType("deg","number",Sk.builtin.checkNumber(e));const t=Math.PI/180*Sk.builtin.asnum$(e);return new Sk.builtin.float_(t)},$flags:{OneArg:!0},$textsig:"($module, x, /)",$doc:"Convert angle x from degrees to radians."},remainder:{$meth:function remainder(e,t){Sk.builtin.pyCheckType("x","number",Sk.builtin.checkNumber(e)),Sk.builtin.pyCheckType("y","number",Sk.builtin.checkNumber(t));let n=e.v,i=t.v;if("number"!=typeof n&&(n=e.nb$float().v),"number"!=typeof i&&(i=t.nb$float().v),isFinite(n)&&isFinite(i)){let e,t,r,u,l;if(0==i)throw new Sk.builtin.ValueError("math domain error");if(e=Math.abs(n),t=Math.abs(i),u=e%t,r=t-u,ur)l=-r;else{if(u!=r)throw new Sk.builtin.AssertionError;l=u-.5*(e-u)%t*2}return new Sk.builtin.float_(get_sign(n)*l)}if(isNaN(n))return e;if(isNaN(i))return t;if(n==1/0||n==-1/0)throw new Sk.builtin.ValueError("math domain error");if(i!=1/0&&i!=-1/0)throw new Sk.builtin.AssertionError;return new Sk.builtin.float_(n)},$flags:{MinArgs:2,MaxArgs:2},$textsig:"($module, x, y, /)",$doc:"Difference between x and the closest integer multiple of y.\\n\\nReturn x - n*y where n*y is the closest integer multiple of y.\\nIn the case where x is exactly halfway between two multiples of\\ny, the nearest even value of n is used. The result is always exact."},sin:{$meth:function sin(e){return Sk.builtin.pyCheckType("rad","number",Sk.builtin.checkNumber(e)),new Sk.builtin.float_(Math.sin(Sk.builtin.asnum$(e)))},$flags:{OneArg:!0},$textsig:"($module, x, /)",$doc:"Return the sine of x (measured in radians)."},sinh:{$meth:function sinh(e){Sk.builtin.pyCheckType("x","number",Sk.builtin.checkNumber(e)),e=Sk.builtin.asnum$(e);const t=Math.E,n=Math.pow(t,e),i=(n-1/n)/2;return new Sk.builtin.float_(i)},$flags:{OneArg:!0},$textsig:"($module, x, /)",$doc:"Return the hyperbolic sine of x."},sqrt:{$meth:function sqrt(e){Sk.builtin.pyCheckType("x","number",Sk.builtin.checkNumber(e));const t=Sk.builtin.asnum$(e);if(t<0)throw new Sk.builtin.ValueError("math domain error");return new Sk.builtin.float_(Math.sqrt(t))},$flags:{OneArg:!0},$textsig:"($module, x, /)",$doc:"Return the square root of x."},tan:{$meth:function tan(e){return Sk.builtin.pyCheckType("rad","number",Sk.builtin.checkNumber(e)),new Sk.builtin.float_(Math.tan(Sk.builtin.asnum$(e)))},$flags:{OneArg:!0},$textsig:"($module, x, /)",$doc:"Return the tangent of x (measured in radians)."},tanh:{$meth:function tanh(e){Sk.builtin.pyCheckType("x","number",Sk.builtin.checkNumber(e));const t=Sk.builtin.asnum$(e);if(0===t)return new Sk.builtin.float_(t);const n=Math.E,i=Math.pow(n,t),r=1/i,u=(i-r)/2/((i+r)/2);return new Sk.builtin.float_(u)},$flags:{OneArg:!0},$textsig:"($module, x, /)",$doc:"Return the hyperbolic tangent of x."},trunc:{$meth:function trunc(e){if(e.ob$type===i)return e.nb$int();const n=o(e,t.$trunc);if(void 0===n)throw new r(\`type \${e.tp$name} doesn't define __trunc__ method\`);return a(n)},$flags:{OneArg:!0},$textsig:"($module, x, /)",$doc:"Truncates the Real x to the nearest Integral toward 0.\\n\\nUses the __trunc__ magic method."}}),s};`,"src/lib/operator.js":`function $builtinmodule(e){const{builtin:{str:t,tuple:a,list:r,int_:o,bool:n,TypeError:s,ValueError:i,none:{none$:m},NotImplemented:{NotImplemented$:d},abs:l,len:h,checkString:u,checkInt:c},abstr:{buildNativeClass:M,checkNoKwargs:b,checkArgsLen:g,checkOneArg:f,numberUnaryOp:p,numberBinOp:A,numberInplaceBinOp:k,objectGetItem:$,objectDelItem:_,objectSetItem:w,sequenceConcat:v,sequenceContains:x,sequenceGetCountOf:j,sequenceGetIndexOf:O,sequenceInPlaceConcat:I,typeName:S,lookupSpecial:y,gattr:q,setUpModuleMethods:R},misceval:{richCompareBool:B,asIndexOrThrow:N,chain:E,callsimArray:T,callsimOrSuspendArray:C,objectRepr:D},generic:{getAttr:G}}=Sk,L=["abs","add","and_","concat","contains","delitem","eq","floordiv","ge","getitem","gt","iadd","iand","iconcat","ifloordiv","ilshift","imatmul","imod","imul","index","inv","invert","ior","ipow","irshift","isub","itruediv","ixor","le","lshift","lt","matmul","mod","mul","ne","neg","not_","or_","pos","pow","rshift","setitem","sub","truediv","xor"],F=["attrgetter","countOf","indexOf","is_","is_not","itemgetter","length_hint","methodcaller","truth",...L].sort(),P={__name__:new t("operator"),__doc__:new t("Operator interface.\\n\\nThis module exports a set of functions implemented in javascript corresponding\\nto the intrinsic operators of Python. For example, operator.add(x, y)\\nis equivalent to the expression x+y. The function names are those\\nused for special methods; variants without leading and trailing\\n'__' are also provided for convenience."),__all__:new r(F.map((e=>new t(e))))};P.itemgetter=M("operator.itemgetter",{constructor:function itemgetter(e){this.items=e,this.oneitem=1===e.length,this.item=e[0],this.in$repr=!1},slots:{tp$getattr:G,tp$new:(e,t)=>(b("itemgetter",t),g("itemgetter",e,1),new P.itemgetter(e)),tp$call(e,t){f("itemgetter",e,t);const r=e[0];return this.oneitem?$(r,this.item,!0):new a(this.items.map((e=>$(r,e))))},tp$doc:"Return a callable object that fetches the given item(s) from its operand.\\n After f = itemgetter(2), the call f(r) returns r[2].\\n After g = itemgetter(2, 5, 3), the call g(r) returns (r[2], r[5], r[3])",$r(){if(this.in$repr)return new t(this.tp$name+"(...)");this.in$repr=!0;const e=this.tp$name+"("+this.items.map((e=>D(e))).join(", ")+")";return this.in$repr=!1,e}}}),P.attrgetter=M("operator.attrgetter",{constructor:function attrgetter(e){this.attrs=e,this.oneattr=1===e.length,this.attr=e[0],this.in$repr=!1},slots:{tp$getattr:G,tp$new(e,a){b("attrgetter",a),g("attrgetter",e,1);const r=[];for(let o=0;onew t(e)))):r.push([a])}return new P.attrgetter(r)},tp$call(e,t){f("attrgetter",e,t);const r=e[0];if(this.oneattr)return this.attr.reduce(((e,t)=>q(e,t)),r);const o=this.attrs.map((e=>e.reduce(((e,t)=>q(e,t)),r)));return new a(o)},tp$doc:"attrgetter(attr, ...) --\\x3e attrgetter object\\n\\nReturn a callable object that fetches the given attribute(s) from its operand.\\nAfter f = attrgetter('name'), the call f(r) returns r.name.\\nAfter g = attrgetter('name', 'date'), the call g(r) returns (r.name, r.date).\\nAfter h = attrgetter('name.first', 'name.last'), the call h(r) returns\\n(r.name.first, r.name.last).",$r(){if(this.in$repr)return new t(this.tp$name+"(...)");this.in$repr=!0;const e=this.tp$name+"("+this.items.map((e=>D(e))).join(", ")+")";return this.in$repr=!1,e}}}),P.methodcaller=M("operator.methodcaller",{constructor:function methodcaller(e,t,a){this.$name=e,this.args=t,this.kwargs=a||[],this.in$repr=!1},slots:{tp$getattr:G,tp$new(e,t){g("methodcaller",e,1);const a=e[0];if(!u(a))throw new s("method name must be a string");return new P.methodcaller(a,e.slice(1),t)},tp$call(e,t){f("methodcaller",e,t);const a=e[0];return E(q(a,this.$name,!0),(e=>C(e,this.args,this.kwargs)))},tp$doc:"methodcaller(name, ...) --\\x3e methodcaller object\\n\\nReturn a callable object that calls the given method on its operand.\\nAfter f = methodcaller('name'), the call f(r) returns r.name().\\nAfter g = methodcaller('name', 'date', foo=1), the call g(r) returns\\nr.name('date', foo=1).",$r(){if(this.in$repr)return new t(this.tp$name+"(...)");this.in$repr=!0;let e=[D(this.$name)];e.push(...this.args.map((e=>D(e))));for(let t=0;tn(B(e,t,"Lt"))),sameAs("a < b")),le:makeModuleMethod(((e,t)=>n(B(e,t,"LtE"))),sameAs("a <= b")),eq:makeModuleMethod(((e,t)=>n(B(e,t,"Eq"))),sameAs("a == b")),ne:makeModuleMethod(((e,t)=>n(B(e,t,"NotEq"))),sameAs("a != b")),ge:makeModuleMethod(((e,t)=>n(B(e,t,"GtE"))),sameAs("a >= b")),gt:makeModuleMethod(((e,t)=>n(B(e,t,"Gt"))),sameAs("a > b")),not_:makeModuleMethod((e=>p(e,"Not")),sameAs("not a")),truth:makeModuleMethod((e=>n(e)),"Return True if a is true, False otherwise."),is_:makeModuleMethod(((e,t)=>n(B(e,t,"Is"))),sameAs("a is b")),is_not:makeModuleMethod(((e,t)=>n(B(e,t,"IsNot"))),sameAs("a is not b")),abs:makeModuleMethod((e=>l(e)),sameAs("abs(a)")),add:makeModuleMethod(((e,t)=>A(e,t,"Add")),sameAs("a + b")),and_:makeModuleMethod(((e,t)=>A(e,t,"BitAnd")),sameAs("a & b")),floordiv:makeModuleMethod(((e,t)=>A(e,t,"FloorDiv")),sameAs("a // b")),index:makeModuleMethod((e=>new o(N(e))),sameAs("a.__index__()")),inv:makeModuleMethod((e=>p(e,"Invert")),sameAs("~a")),invert:makeModuleMethod((e=>p(e,"Invert")),sameAs("~a")),lshift:makeModuleMethod(((e,t)=>A(e,t,"LShift")),sameAs("a << b")),mod:makeModuleMethod(((e,t)=>A(e,t,"Mod")),sameAs("a % b")),mul:makeModuleMethod(((e,t)=>A(e,t,"Mult")),sameAs("a * b")),matmul:makeModuleMethod(((e,t)=>A(e,t,"MatMult")),sameAs("a @ b")),neg:makeModuleMethod((e=>p(e,"USub")),sameAs("-a")),or_:makeModuleMethod(((e,t)=>A(e,t,"BitOr")),sameAs("a | b")),pos:makeModuleMethod((e=>p(e,"UAdd")),sameAs("+a")),pow:makeModuleMethod(((e,t)=>A(e,t,"Pow")),sameAs("a ** b")),rshift:makeModuleMethod(((e,t)=>A(e,t,"RShift")),sameAs("a >> b")),sub:makeModuleMethod(((e,t)=>A(e,t,"Sub")),sameAs("a - b")),truediv:makeModuleMethod(((e,t)=>A(e,t,"Div")),sameAs("a / b")),xor:makeModuleMethod(((e,t)=>A(e,t,"BitXor")),sameAs("a ^ b")),concat:makeModuleMethod(((e,t)=>v(e,t)),sameAs("a + b, for a and b sequences")),contains:makeModuleMethod(((e,t)=>E(x(e,t),n)),sameAs("b in a (note reversed operands)")),countOf:makeModuleMethod(((e,t)=>j(e,t)),"Return thenumber of times b occurs in a."),delitem:makeModuleMethod(((e,t)=>E(_(e,t,!0),(()=>m))),sameAs("del a[b]")),getitem:makeModuleMethod(((e,t)=>$(e,t,!0)),sameAs("a[b]")),indexOf:makeModuleMethod(((e,t)=>O(e,t)),"Return the first index of b in a"),setitem:makeModuleMethod(((e,t,a)=>E(w(e,t,a,!0),(()=>m))),sameAs("a[b] = c")),length_hint:{$meth:function length_hint(e,a){if(void 0===a)a=new o(0);else if(!c(a))throw new s("'"+S(a)+"' object cannot be interpreted as an integer");try{return h(e)}catch(m){if(!(m instanceof s))throw m}const r=y(e,t.$length_hint);if(void 0===r)return a;let n;try{n=T(r,[])}catch(m){if(!(m instanceof s))throw m;return a}if(n===d)return a;if(!c(n))throw new s("__length_hint__ must be an integer, not "+S(n));if(n.nb$isnegative())throw new i("__length_hint__() should return >= 0");return n},$flags:{MinArgs:1,MaxArgs:2},$textsig:"($module, obj, default=0, /)",$doc:"Return an estimate of the number of items in obj.\\n\\nThis is useful for presizing containers when building from an iterable.\\n\\nIf the object supports len(), the result will be exact.\\nOtherwise, it may over- or under-estimate by an arbitrary amount.\\nThe result will be an integer >= 0."},iadd:makeModuleMethod(((e,t)=>k(e,t,"Add")),sameAs("a += b")),iand:makeModuleMethod(((e,t)=>k(e,t,"BitAnd")),sameAs("a &= b")),iconcat:makeModuleMethod(((e,t)=>I(e,t)),sameAs("a += b, for a and b sequences")),ifloordiv:makeModuleMethod(((e,t)=>k(e,t,"FloorDiv")),sameAs("a //= b")),ilshift:makeModuleMethod(((e,t)=>k(e,t,"LShift")),sameAs("a <<= b")),imod:makeModuleMethod(((e,t)=>k(e,t,"Mod")),sameAs("a %= b")),imul:makeModuleMethod(((e,t)=>k(e,t,"Mult")),sameAs("a *= b")),imatmul:makeModuleMethod(((e,t)=>k(e,t,"MatMult")),sameAs("a @= b")),ior:makeModuleMethod(((e,t)=>k(e,t,"BitOr")),sameAs("a |= b")),ipow:makeModuleMethod(((e,t)=>k(e,t,"Pow")),sameAs("a **= b")),irshift:makeModuleMethod(((e,t)=>k(e,t,"RShift")),sameAs("a >>= b")),isub:makeModuleMethod(((e,t)=>k(e,t,"Sub")),sameAs("a -= b")),itruediv:makeModuleMethod(((e,t)=>k(e,t,"Div")),sameAs("a /= b")),ixor:makeModuleMethod(((e,t)=>k(e,t,"BitXor")),sameAs("a ^= b"))}),L.forEach((e=>{P[\`__\${e.replace("_","")}__\`]=P[e]})),P.div=P.truediv,P.__div__=P.div,P}`,"src/lib/platform.js":'var $builtinmodule=function(n){var e={},i="undefined"!=typeof window&&"undefined"!=typeof window.navigator;return e.python_implementation=new Sk.builtin.func((function(){return Sk.builtin.pyCheckArgsLen("python_implementation",arguments.length,0,0),new Sk.builtin.str("Skulpt")})),e.node=new Sk.builtin.func((function(){return Sk.builtin.pyCheckArgsLen("node",arguments.length,0,0),new Sk.builtin.str("")})),e.version=new Sk.builtin.func((function(){return Sk.builtin.pyCheckArgsLen("version",arguments.length,0,0),new Sk.builtin.str("")})),e.python_version=new Sk.builtin.func((function(){var n;return Sk.builtin.pyCheckArgsLen("python_version",arguments.length,0,0),n=Sk.__future__.python_version?"3.2.0":"2.7.0",new Sk.builtin.str(n)})),e.system=new Sk.builtin.func((function(){var n;return Sk.builtin.pyCheckArgsLen("system",arguments.length,0,0),n=i?window.navigator.appCodeName:"",new Sk.builtin.str(n)})),e.machine=new Sk.builtin.func((function(){var n;return Sk.builtin.pyCheckArgsLen("machine",arguments.length,0,0),n=i?window.navigator.platform:"",new Sk.builtin.str(n)})),e.release=new Sk.builtin.func((function(){var n;return Sk.builtin.pyCheckArgsLen("release",arguments.length,0,0),n=i?window.navigator.appVersion:"",new Sk.builtin.str(n)})),e.architecture=new Sk.builtin.func((function(){return Sk.builtin.pyCheckArgsLen("architecture",arguments.length,0,0),new Sk.builtin.tuple([new Sk.builtin.str("64bit"),new Sk.builtin.str("")])})),e.processor=new Sk.builtin.func((function(){return Sk.builtin.pyCheckArgsLen("processor",arguments.length,0,0),new Sk.builtin.str("")})),e};',"src/lib/processing.js":`var $builtinmodule=function(n){var i,e,t,u,o,s,l,c={__name__:new Sk.builtin.str("processing")},r=[],v=!0,f=null;c.processing=null,c.p=null,c.X=new Sk.builtin.int_(0),c.Y=new Sk.builtin.int_(1),c.Z=new Sk.builtin.int_(2),c.R=new Sk.builtin.int_(3),c.G=new Sk.builtin.int_(4),c.B=new Sk.builtin.int_(5),c.A=new Sk.builtin.int_(6),c.U=new Sk.builtin.int_(7),c.V=new Sk.builtin.int_(8),c.NX=new Sk.builtin.int_(9),c.NY=new Sk.builtin.int_(10),c.NZ=new Sk.builtin.int_(11),c.EDGE=new Sk.builtin.int_(12),c.SR=new Sk.builtin.int_(13),c.SG=new Sk.builtin.int_(14),c.SB=new Sk.builtin.int_(15),c.SA=new Sk.builtin.int_(16),c.SW=new Sk.builtin.int_(17),c.TX=new Sk.builtin.int_(18),c.TY=new Sk.builtin.int_(19),c.TZ=new Sk.builtin.int_(20),c.VX=new Sk.builtin.int_(21),c.VY=new Sk.builtin.int_(22),c.VZ=new Sk.builtin.int_(23),c.VW=new Sk.builtin.int_(24),c.AR=new Sk.builtin.int_(25),c.AG=new Sk.builtin.int_(26),c.AB=new Sk.builtin.int_(27),c.DR=new Sk.builtin.int_(3),c.DG=new Sk.builtin.int_(4),c.DB=new Sk.builtin.int_(5),c.DA=new Sk.builtin.int_(6),c.SPR=new Sk.builtin.int_(28),c.SPG=new Sk.builtin.int_(29),c.SPB=new Sk.builtin.int_(30),c.SHINE=new Sk.builtin.int_(31),c.ER=new Sk.builtin.int_(32),c.EG=new Sk.builtin.int_(33),c.EB=new Sk.builtin.int_(34),c.BEEN_LIT=new Sk.builtin.int_(35),c.VERTEX_FIELD_COUNT=new Sk.builtin.int_(36),c.CENTER=new Sk.builtin.int_(3),c.RADIUS=new Sk.builtin.int_(2),c.CORNERS=new Sk.builtin.int_(1),c.CORNER=new Sk.builtin.int_(0),c.DIAMETER=new Sk.builtin.int_(3),c.BASELINE=new Sk.builtin.int_(0),c.TOP=new Sk.builtin.int_(101),c.BOTTOM=new Sk.builtin.int_(102),c.NORMAL=new Sk.builtin.int_(1),c.NORMALIZED=new Sk.builtin.int_(1),c.IMAGE=new Sk.builtin.int_(2),c.MODEL=new Sk.builtin.int_(4),c.SHAPE=new Sk.builtin.int_(5),c.AMBIENT=new Sk.builtin.int_(0),c.DIRECTIONAL=new Sk.builtin.int_(1),c.SPOT=new Sk.builtin.int_(3),c.RGB=new Sk.builtin.int_(1),c.ARGB=new Sk.builtin.int_(2),c.HSB=new Sk.builtin.int_(3),c.ALPHA=new Sk.builtin.int_(4),c.CMYK=new Sk.builtin.int_(5),c.TIFF=new Sk.builtin.int_(0),c.TARGA=new Sk.builtin.int_(1),c.JPEG=new Sk.builtin.int_(2),c.GIF=new Sk.builtin.int_(3),c.MITER=new Sk.builtin.str("miter"),c.BEVEL=new Sk.builtin.str("bevel"),c.ROUND=new Sk.builtin.str("round"),c.SQUARE=new Sk.builtin.str("butt"),c.PROJECT=new Sk.builtin.str("square"),c.P2D=new Sk.builtin.int_(1),c.JAVA2D=new Sk.builtin.int_(1),c.WEBGL=new Sk.builtin.int_(2),c.P3D=new Sk.builtin.int_(2),c.OPENGL=new Sk.builtin.int_(2),c.PDF=new Sk.builtin.int_(0),c.DXF=new Sk.builtin.int_(0),c.OTHER=new Sk.builtin.int_(0),c.WINDOWS=new Sk.builtin.int_(1),c.MAXOSX=new Sk.builtin.int_(2),c.LINUX=new Sk.builtin.int_(3),c.EPSILON=new Sk.builtin.float_(1e-4),c.MAX_FLOAT=new Sk.builtin.float_(34028235e31),c.MIN_FLOAT=new Sk.builtin.float_(-34028235e31),c.MAX_INT=new Sk.builtin.int_(2147483647),c.MIN_INT=new Sk.builtin.int_(-2147483648),c.HALF_PI=new Sk.builtin.float_(Math.PI/2),c.THIRD_PI=new Sk.builtin.float_(Math.PI/3),c.PI=new Sk.builtin.float_(Math.PI),c.TWO_PI=new Sk.builtin.float_(2*Math.PI),c.TAU=new Sk.builtin.float_(2*Math.PI),c.QUARTER_PI=new Sk.builtin.float_(Math.PI/4),c.DEG_TO_RAD=new Sk.builtin.float_(Math.PI/180),c.RAD_TO_DEG=new Sk.builtin.float_(180/Math.PI),c.WHITESPACE=new Sk.builtin.str(" \\t\\n\\r\\f\xA0"),c.POINT=new Sk.builtin.int_(2),c.POINTS=new Sk.builtin.int_(2),c.LINE=new Sk.builtin.int_(4),c.LINES=new Sk.builtin.int_(4),c.TRIANGLE=new Sk.builtin.int_(8),c.TRIANGLES=new Sk.builtin.int_(9),c.TRIANGLE_FAN=new Sk.builtin.int_(11),c.TRIANGLE_STRIP=new Sk.builtin.int_(10),c.QUAD=new Sk.builtin.int_(16),c.QUADS=new Sk.builtin.int_(16),c.QUAD_STRIP=new Sk.builtin.int_(17),c.POLYGON=new Sk.builtin.int_(20),c.PATH=new Sk.builtin.int_(21),c.RECT=new Sk.builtin.int_(30),c.ELLIPSE=new Sk.builtin.int_(31),c.ARC=new Sk.builtin.int_(32),c.SPHERE=new Sk.builtin.int_(40),c.BOX=new Sk.builtin.int_(41),c.GROUP=new Sk.builtin.int_(0),c.PRIMITIVE=new Sk.builtin.int_(1),c.GEOMETRY=new Sk.builtin.int_(3),c.VERTEX=new Sk.builtin.int_(0),c.BEZIER_VERTEX=new Sk.builtin.int_(1),c.CURVE_VERTEX=new Sk.builtin.int_(2),c.BREAK=new Sk.builtin.int_(3),c.CLOSESHAPE=new Sk.builtin.int_(4),c.REPLACE=new Sk.builtin.int_(0),c.BLEND=new Sk.builtin.int_(1),c.ADD=new Sk.builtin.int_(2),c.SUBTRACT=new Sk.builtin.int_(4),c.LIGHTEST=new Sk.builtin.int_(8),c.DARKEST=new Sk.builtin.int_(16),c.DIFFERENCE=new Sk.builtin.int_(32),c.EXCLUSION=new Sk.builtin.int_(64),c.MULTIPLY=new Sk.builtin.int_(128),c.SCREEN=new Sk.builtin.int_(256),c.OVERLAY=new Sk.builtin.int_(512),c.HARD_LIGHT=new Sk.builtin.int_(1024),c.SOFT_LIGHT=new Sk.builtin.int_(2048),c.DODGE=new Sk.builtin.int_(4096),c.BURN=new Sk.builtin.int_(8192),c.ALPHA_MASK=new Sk.builtin.int_(4278190080),c.RED_MASK=new Sk.builtin.int_(16711680),c.GREEN_MASK=new Sk.builtin.int_(65280),c.BLUE_MASK=new Sk.builtin.int_(255),c.CUSTOM=new Sk.builtin.int_(0),c.ORTHOGRAPHIC=new Sk.builtin.int_(2),c.PERSPECTIVE=new Sk.builtin.int_(3),c.ARROW=new Sk.builtin.str("default"),c.CROSS=new Sk.builtin.str("crosshair"),c.HAND=new Sk.builtin.str("pointer"),c.MOVE=new Sk.builtin.str("move"),c.TEXT=new Sk.builtin.str("text"),c.WAIT=new Sk.builtin.str("wait"),c.NOCURSOR=Sk.builtin.assk$("url('data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw=='), auto"),c.DISABLE_OPENGL_2X_SMOOTH=new Sk.builtin.int_(1),c.ENABLE_OPENGL_2X_SMOOTH=new Sk.builtin.int_(-1),c.ENABLE_OPENGL_4X_SMOOTH=new Sk.builtin.int_(2),c.ENABLE_NATIVE_FONTS=new Sk.builtin.int_(3),c.DISABLE_DEPTH_TEST=new Sk.builtin.int_(4),c.ENABLE_DEPTH_TEST=new Sk.builtin.int_(-4),c.ENABLE_DEPTH_SORT=new Sk.builtin.int_(5),c.DISABLE_DEPTH_SORT=new Sk.builtin.int_(-5),c.DISABLE_OPENGL_ERROR_REPORT=new Sk.builtin.int_(6),c.ENABLE_OPENGL_ERROR_REPORT=new Sk.builtin.int_(-6),c.ENABLE_ACCURATE_TEXTURES=new Sk.builtin.int_(7),c.DISABLE_ACCURATE_TEXTURES=new Sk.builtin.int_(-7),c.HINT_COUNT=new Sk.builtin.int_(10),c.OPEN=new Sk.builtin.int_(1),c.CLOSE=new Sk.builtin.int_(2),c.BLUR=new Sk.builtin.int_(11),c.GRAY=new Sk.builtin.int_(12),c.INVERT=new Sk.builtin.int_(13),c.OPAQUE=new Sk.builtin.int_(14),c.POSTERIZE=new Sk.builtin.int_(15),c.THRESHOLD=new Sk.builtin.int_(16),c.ERODE=new Sk.builtin.int_(17),c.DILATE=new Sk.builtin.int_(18),c.BACKSPACE=new Sk.builtin.int_(8),c.TAB=new Sk.builtin.int_(9),c.ENTER=new Sk.builtin.int_(10),c.RETURN=new Sk.builtin.int_(13),c.ESC=new Sk.builtin.int_(27),c.DELETE=new Sk.builtin.int_(127),c.CODED=new Sk.builtin.int_(65535),c.SHIFT=new Sk.builtin.int_(16),c.CONTROL=new Sk.builtin.int_(17),c.ALT=new Sk.builtin.int_(18),c.CAPSLK=new Sk.builtin.int_(20),c.PGUP=new Sk.builtin.int_(33),c.PGDN=new Sk.builtin.int_(34),c.END=new Sk.builtin.int_(35),c.HOME=new Sk.builtin.int_(36),c.LEFT=new Sk.builtin.int_(37),c.UP=new Sk.builtin.int_(38),c.RIGHT=new Sk.builtin.int_(39),c.DOWN=new Sk.builtin.int_(40),c.F1=new Sk.builtin.int_(112),c.F2=new Sk.builtin.int_(113),c.F3=new Sk.builtin.int_(114),c.F4=new Sk.builtin.int_(115),c.F5=new Sk.builtin.int_(116),c.F6=new Sk.builtin.int_(117),c.F7=new Sk.builtin.int_(118),c.F8=new Sk.builtin.int_(119),c.F9=new Sk.builtin.int_(120),c.F10=new Sk.builtin.int_(121),c.F11=new Sk.builtin.int_(122),c.F12=new Sk.builtin.int_(123),c.NUMLK=new Sk.builtin.int_(144),c.META=new Sk.builtin.int_(157),c.INSERT=new Sk.builtin.int_(155),c.SINCOS_LENGTH=new Sk.builtin.int_(720),c.PRECISIONB=new Sk.builtin.int_(15),c.PRECISIONF=new Sk.builtin.int_(32768),c.PREC_MAXVAL=new Sk.builtin.int_(32767),c.PREC_ALPHA_SHIFT=new Sk.builtin.int_(9),c.PREC_RED_SHIFT=new Sk.builtin.int_(1),c.NORMAL_MODE_AUTO=new Sk.builtin.int_(0),c.NORMAL_MODE_SHAPE=new Sk.builtin.int_(1),c.NORMAL_MODE_VERTEX=new Sk.builtin.int_(2),c.MAX_LIGHTS=new Sk.builtin.int_(8),c.line=new Sk.builtin.func((function(n,i,e,t){c.processing.line(n.v,i.v,e.v,t.v)})),c.ellipse=new Sk.builtin.func((function(n,i,e,t){c.processing.ellipse(n.v,i.v,e.v,t.v)})),c.circle=new Sk.builtin.func((function(n,i,e){c.processing.ellipse(n.v,i.v,e.v,e.v)})),c.text=new Sk.builtin.func((function(n,i,e){c.processing.text(n.v,i.v,e.v)})),c.point=new Sk.builtin.func((function(n,i){c.processing.point(n.v,i.v)})),c.arc=new Sk.builtin.func((function(n,i,e,t,u,o){c.processing.arc(n.v,i.v,e.v,t.v,u.v,o.v)})),c.quad=new Sk.builtin.func((function(n,i,e,t,u,o,s,l){c.processing.quad(n.v,i.v,e.v,t.v,u.v,o.v,s.v,l.v)})),c.rect=new Sk.builtin.func((function(n,i,e,t,u){"undefined"==typeof u?c.processing.rect(n.v,i.v,e.v,t.v):c.processing.rect(n.v,i.v,e.v,t.v,u.v)})),c.triangle=new Sk.builtin.func((function(n,i,e,t,u,o){c.processing.triangle(n.v,i.v,e.v,t.v,u.v,o.v)})),c.bezier=new Sk.builtin.func((function(n,i,e,t,u,o,s,l,r,v,f,S){"undefined"==typeof r?c.processing.bezier(n.v,i.v,e.v,t.v,u.v,o.v,s.v,l.v):c.processing.bezier(n.v,i.v,e.v,t.v,u.v,o.v,s.v,l.v,r.v,v.v,f.v,S.v)})),c.alpha=new Sk.builtin.func((function(n,i,e){return"undefined"==typeof i?new Sk.builtin.float_(c.processing.alpha(n.v)):"undefined"==typeof e?new Sk.builtin.float_(c.processing.alpha(n.v,i.v)):new Sk.builtin.float_(c.processing.alpha(n.v,i.v,e.v))})),c.ambient=new Sk.builtin.func((function(n,i,e){"undefined"==typeof i?c.processing.ambient(n.v):"undefined"==typeof e?c.processing.ambient(n.v,i.v):c.processing.ambient(n.v,i.v,e.v)})),c.ambientLight=new Sk.builtin.func((function(n,i,e,t,u,o){"undefined"==typeof t?c.processing.ambientLight(n.v,i.v,e.v):"undefined"==typeof u?c.processing.ambientLight(n.v,i.v,e.v,t.v):"undefined"==typeof o?c.processing.ambientLight(n.v,i.v,e.v,t.v,u.v):c.processing.ambientLight(n.v,i.v,e.v,t.v,u.v,o.v)})),c.beginCamera=new Sk.builtin.func((function(){c.processing.beginCamera()})),c.beginShape=new Sk.builtin.func((function(n){"undefined"==typeof n&&(n=c.POLYGON),c.processing.beginShape(n.v)})),c.bezierDetail=new Sk.builtin.func((function(n){n="undefined"!=typeof n?n.v:20,c.processing.bezierDetail(n)})),c.bezierPoint=new Sk.builtin.func((function(n,i,e,t,u){c.processing.bezierPoint(n.v,i.v,e.v,t.v,u.v)})),c.bezierTangent=new Sk.builtin.func((function(n,i,e,t,u){c.processing.bezierTangent(n.v,i.v,e.v,t.v,u.v)})),c.bezierVertex=new Sk.builtin.func((function(n,i,e,t,u,o,s,l,r){"undefined"==typeof s?c.processing.bezierVertex(n.v,i.v,e.v,t.v,u.v,o.v):"undefined"==typeof l?c.processing.bezierVertex(n.v,i.v,e.v,t.v,u.v,o.v,s.v):"undefined"==typeof r?c.processing.bezierVertex(n.v,i.v,e.v,t.v,u.v,o.v,s.v,l.v):c.processing.bezierVertex(n.v,i.v,e.v,t.v,u.v,o.v,s.v,l.v,r.v)})),c.blend=new Sk.builtin.func((function(n,i,e,t,u,o,s,l,r,v){n instanceof Sk.builtin.int_||n instanceof Sk.builtin.float_?c.processing.blend(n.v,i.v,e.v,t.v,u.v,o.v,s.v,l.v,r.v):c.processing.blend(n.v,i.v,e.v,t.v,u.v,o.v,s.v,l.v,r.v,v.v)})),c.blendColor=new Sk.builtin.func((function(n,i,e){var t=Sk.misceval.callsimArray(c.color,[new Sk.builtin.int_(0),new Sk.builtin.int_(0),new Sk.builtin.int_(0)]);return t.v=c.processing.blendColor(n.v,i.v,e.v),t})),c.brightness=new Sk.builtin.func((function(n,i,e){return"undefined"==typeof i?new Sk.builtin.float_(c.processing.brightness(n.v)):"undefined"==typeof e?new Sk.builtin.float_(c.processing.brightness(n.v,i.v)):new Sk.builtin.float_(c.processing.brightness(n.v,i.v,e.v))})),c.camera=new Sk.builtin.func((function(n,i,e,t,u,o,s,l,r){"undefined"==typeof n?c.processing.camera():c.processing.camera(n.v,i.v,e.v,t.v,u.v,o.v,s.v,l.v,r.v)})),c.constrain=new Sk.builtin.func((function(n,i,e){return new Sk.builtin.float_(c.processing.constrain(n.v,i.v,e.v))})),c.copy=new Sk.builtin.func((function(n,i,e,t,u,o,s,l,r){n instanceof Sk.builtin.int_||n instanceof Sk.builtin.float_?c.processing.copy(n.v,i.v,e.v,t.v,u.v,o.v,s.v,l.v):c.processing.copy(n.v,i.v,e.v,t.v,u.v,o.v,s.v,l.v,r.v)})),c.createFont=new Sk.builtin.func((function(n,i,e,t){var u=Sk.misceval.callsimArray(c.PFont);return u.v="undefined"==typeof e?c.processing.createFont(n.v,i.v):"undefined"==typeof t?c.processing.createFont(n.v,i.v,e.v):c.processing.createFont(n.v,i.v,e.v,t.v),u})),c.createGraphics=new Sk.builtin.func((function(n,i,e,t){var u=Sk.misceval.callsimArray(c.PGraphics);return u.v="undefined"==typeof t?c.processing.createGraphics(n.v,i.v,e.v):c.processing.createGraphics(n.v,i.v,e.v,t.v),u})),c.createImage=new Sk.builtin.func((function(n,i,e){var t=Sk.misceval.callsimArray(c.PImage);return t.v=c.processing.createImage(n.v,i.v,e.v),t})),c.cursor=new Sk.builtin.func((function(n,i,e){"undefined"==typeof n?c.processing.cursor():"undefined"==typeof i?c.processing.cursor(n.v):"undefined"==typeof e?c.processing.cursor(n.v,i.v):c.processing.cursor(n.v,i.v,e.v)})),c.curve=new Sk.builtin.func((function(n,i,e,t,u,o,s,l,r,v,f,S){"undefined"==typeof r?c.processing.curve(n.v,i.v,e.v,t.v,u.v,o.v,s.v,l.v):"undefined"==typeof v?c.processing.curve(n.v,i.v,e.v,t.v,u.v,o.v,s.v,l.v,r.v):"undefined"==typeof f?c.processing.curve(n.v,i.v,e.v,t.v,u.v,o.v,s.v,l.v,r.v,v.v):"undefined"==typeof S?c.processing.curve(n.v,i.v,e.v,t.v,u.v,o.v,s.v,l.v,r.v,v.v,f.v):c.processing.curve(n.v,i.v,e.v,t.v,u.v,o.v,s.v,l.v,r.v,v.v,f.v,S.v)})),c.curveDetail=new Sk.builtin.func((function(n){c.processing.curveDetail(n.v)})),c.curvePoint=new Sk.builtin.func((function(n,i,e,t,u){c.processing.curvePoint(n.v,i.v,e.v,t.v,u.v)})),c.curveTangent=new Sk.builtin.func((function(n,i,e,t,u){c.processing.curveTangent(n.v,i.v,e.v,t.v,u.v)})),c.curveTightness=new Sk.builtin.func((function(n){c.processing.curveTightness(n.v)})),c.curveVertex=new Sk.builtin.func((function(n,i,e){"undefined"==typeof e?c.processing.curveVertex(n.v,i.v):c.processing.curveVertex(n.v,i.v,e.v)})),c.day=new Sk.builtin.func((function(){return new Sk.builtin.int_(c.processing.day())})),c.degrees=new Sk.builtin.func((function(n){return new Sk.builtin.float_(c.processing.degrees(n.v))})),c.directionalLight=new Sk.builtin.func((function(n,i,e,t,u,o){c.processing.directionalLight(n.v,i.v,e.v,t.v,u.v,o.v)})),c.dist=new Sk.builtin.func((function(n,i,e,t,u,o){return"undefined"==typeof u?new Sk.builtin.float_(c.processing.dist(n.v,i.v,e.v,t.v)):"undefined"==typeof o?new Sk.builtin.float_(c.processing.dist(n.v,i.v,e.v,t.v,u.v)):new Sk.builtin.float_(c.processing.dist(n.v,i.v,e.v,t.v,u.v,o.v))})),c.emissive=new Sk.builtin.func((function(n,i,e){"undefined"==typeof i?c.processing.emissive(n.v):"undefined"==typeof e?c.processing.emissive(n.v,i.v):c.processing.emissive(n.v,i.v,e.v)})),c.endCamera=new Sk.builtin.func((function(){c.processing.endCamera()})),c.endShape=new Sk.builtin.func((function(n){"undefined"==typeof n?c.processing.endShape():c.processing.endShape(n.v)})),c.filter=new Sk.builtin.func((function(n,i){"undefined"==typeof i?c.processing.filter(n.v):c.processing.filter(n.v,i.v)})),c.frustum=new Sk.builtin.func((function(n,i,e,t,u,o){c.processing.frustum(n,i,e,t,u,o)})),c.hint=new Sk.builtin.func((function(n){c.processing.hint(n)})),c.hour=new Sk.builtin.func((function(){return new Sk.builtin.int_(c.processing.hour())})),c.hue=new Sk.builtin.func((function(n){return new Sk.builtin.float_(c.processing.hue(n.v))})),c.imageMode=new Sk.builtin.func((function(n){c.processing.imageMode(n.v)})),c.lerp=new Sk.builtin.func((function(n,i,e){return new Sk.builtin.float_(c.processing.lerp(n.v,i.v,e.v))})),c.lerpColor=new Sk.builtin.func((function(n,i,e){var t=Sk.misceval.callsimArray(c.color,[new Sk.builtin.int_(0),new Sk.builtin.int_(0),new Sk.builtin.int_(0)]);return t.v=c.processing.lerpColor(n.v,i.v,e.v),t})),c.lightFalloff=new Sk.builtin.func((function(n,i,e){c.processing.lightFalloff(n.v,i.v,e.v)})),c.lights=new Sk.builtin.func((function(){c.processing.lights()})),c.lightSpecular=new Sk.builtin.func((function(n,i,e){c.processing.lightSpecular(n.v,i.v,e.v)})),c.loadBytes=new Sk.builtin.func((function(n){return new Sk.builtin.list(c.processing.loadBytes(n.v))})),c.loadFont=new Sk.builtin.func((function(n){var i=Sk.misceval.callsimArray(c.PFont);return i.v=c.processing.loadFont(n.v),i})),c.loadShape=new Sk.builtin.func((function(n){return Sk.misceval.callsimArray(c.PShapeSVG,[new Sk.builtin.str("string"),n])})),c.loadStrings=new Sk.builtin.func((function(n){return new Sk.builtin.list(c.processing.loadStrings(n.v))})),c.mag=new Sk.builtin.func((function(n,i,e){return"undefined"==typeof e?new Sk.builtin.float_(c.processing.mag(n.v,i.v)):new Sk.builtin.float_(c.processing.mag(n.v,i.v,e.v))})),c.map=new Sk.builtin.func((function(n,i,e,t,u){return new Sk.builtin.float_(c.processing.map(n.v,i.v,e.v,t.v,u.v))})),c.millis=new Sk.builtin.func((function(){return new Sk.builtin.int_(c.processing.millis())})),c.minute=new Sk.builtin.func((function(){return new Sk.builtin.int_(c.processing.minute())})),c.modelX=new Sk.builtin.func((function(n,i,e){return new Sk.builtin.float_(c.processing.modelX(n.v,i.v,e.v))})),c.modelY=new Sk.builtin.func((function(n,i,e){return new Sk.builtin.float_(c.processing.modelY(n.v,i.v,e.v))})),c.modelZ=new Sk.builtin.func((function(n,i,e){return new Sk.builtin.float_(c.processing.modelZ(n.v,i.v,e.v))})),c.month=new Sk.builtin.func((function(){return new Sk.builtin.int_(c.processing.month())})),c.noCursor=new Sk.builtin.func((function(){c.processing.noCursor()})),c.noise=new Sk.builtin.func((function(n,i,e){return"undefined"==typeof i?new Sk.builtin.float_(c.processing.noise(n.v)):"undefined"==typeof e?new Sk.builtin.float_(c.processing.noise(n.v,i.v)):new Sk.builtin.float_(c.processing.noise(n.v,i.v,e.v))})),c.noiseDetail=new Sk.builtin.func((function(n,i){c.processing.noiseDetail(n.v,i.v)})),c.noiseSeed=new Sk.builtin.func((function(n){return new Sk.builtin.float_(c.processing.noiseSeed(n.v))})),c.noLights=new Sk.builtin.func((function(){c.processing.noLights()})),c.norm=new Sk.builtin.func((function(n,i,e){return new Sk.builtin.float_(c.processing.norm(n.v,i.v,e.v))})),c.normal=new Sk.builtin.func((function(n,i,e){c.processing.normal(n.v,i.v,e.v)})),c.noTint=new Sk.builtin.func((function(){c.processing.noTint()})),c.ortho=new Sk.builtin.func((function(n,i,e,t,u,o){c.processing.ortho(n.v,i.v,e.v,t.v,u.v,o.v)})),c.perspective=new Sk.builtin.func((function(n,i,e,t){"undefined"==typeof n?c.processing.perspective():"undefined"==typeof i?c.processing.perspective(n.v):"undefined"==typeof e?c.processing.perspective(n.v,i.v):"undefined"==typeof t?c.processing.perspective(n.v,i.v,e.v):c.processing.perspective(n.v,i.v,e.v,t.v)})),c.pointLight=new Sk.builtin.func((function(n,i,e,t,u,o){c.processing.pointLight(n.v,i.v,e.v,t.v,u.v,o.v)})),c.printCamera=new Sk.builtin.func((function(){c.processing.printCamera()})),c.println=new Sk.builtin.func((function(n){c.processing.println(n.v)})),c.printProjection=new Sk.builtin.func((function(){c.processing.printProjection()})),c.radians=new Sk.builtin.func((function(n){return new Sk.builtin.float_(c.processing.radians(n.v))})),c.randomSeed=new Sk.builtin.func((function(n){return new Sk.builtin.float_(c.processing.randomSeed(n.v))})),c.random=new Sk.builtin.func((function(n,i){return"undefined"==typeof n?new Sk.builtin.float_(c.processing.random()):"undefined"==typeof i?new Sk.builtin.float_(c.processing.random(n.v)):new Sk.builtin.float_(c.processing.random(n.v,i.v))})),c.requestImage=new Sk.builtin.func((function(n,i){var e=Sk.misceval.callsimArray(c.PImage);return e.v="undefined"==typeof i?c.processing.requestImage(n.v):c.processing.requestImage(n.v,i.v),e})),c.saturation=new Sk.builtin.func((function(n){return new Sk.builtin.float_(c.processing.saturation(n.v))})),c.save=new Sk.builtin.func((function(n){c.processing.save(n.v)})),c.saveFrame=new Sk.builtin.func((function(n){"undefined"==typeof n?c.processing.saveFrame():c.processing.saveFrame(n.v)})),c.saveStrings=new Sk.builtin.func((function(n,i){c.processing.saveStrings(n.v,i.v)})),c.screenX=new Sk.builtin.func((function(n,i,e){return new Sk.builtin.float_(c.processing.screenX(n.v,i.v,e.v))})),c.screenY=new Sk.builtin.func((function(n,i,e){return new Sk.builtin.float_(c.processing.screenY(n.v,i.v,e.v))})),c.screenZ=new Sk.builtin.func((function(n,i,e){return new Sk.builtin.float_(c.processing.screenZ(n.v,i.v,e.v))})),c.second=new Sk.builtin.func((function(){return new Sk.builtin.int_(c.processing.second())})),c.shape=new Sk.builtin.func((function(n,i,e,t,u){"undefined"==typeof i?c.processing.shape(n.v):"undefined"==typeof e?c.processing.shape(n.v,i.v):"undefined"==typeof t?c.processing.shape(n.v,i.v,e.v):"undefined"==typeof u?c.processing.shape(n.v,i.v,e.v,t.v):c.processing.shape(n.v,i.v,e.v,t.v,u.v)})),c.shapeMode=new Sk.builtin.func((function(n){c.processing.shapeMode(n.v)})),c.shininess=new Sk.builtin.func((function(n){c.processing.shininess(n.v)})),c.specular=new Sk.builtin.func((function(n,i,e){"undefined"==typeof i?c.processing.specular(n.v):"undefined"==typeof e?c.processing.specular(n.v,i.v):c.processing.specular(n.v,i.v,e.v)})),c.spotLight=new Sk.builtin.func((function(n,i,e,t,u,o,s,l){c.processing.spotLight(n.v,i.v,e.v,t.v,u.v,o.v,s.v,l.v)})),c.sq=new Sk.builtin.func((function(n){return new Sk.builtin.float_(c.processing.sq(n))})),c.status=new Sk.builtin.func((function(n){c.processing.status(n.v)})),c.textAlign=new Sk.builtin.func((function(n,i){"undefined"==typeof i?c.processing.textAlign(n.v):c.processing.textAlign(n.v,i.v)})),c.textAscent=new Sk.builtin.func((function(){return new Sk.builtin.float_(c.processing.textAscent())})),c.textDescent=new Sk.builtin.func((function(){return new Sk.builtin.float_(c.processing.textDescent())})),c.textFont=new Sk.builtin.func((function(n,i){"undefined"==typeof i?c.processing.textFont(n.v):c.processing.textFont(n.v,i.v)})),c.textLeading=new Sk.builtin.func((function(n){c.processing.textLeading(n.v)})),c.textMode=new Sk.builtin.func((function(n){c.processing.textMode(n.v)})),c.textSize=new Sk.builtin.func((function(n){c.processing.textSize(n.v)})),c.texture=new Sk.builtin.func((function(n){c.processing.texture(n.v)})),c.textureMode=new Sk.builtin.func((function(n){c.processing.textureMode(n.v)})),c.textWidth=new Sk.builtin.func((function(n){return new Sk.builtin.float_(c.processing.textWidth(n.v))})),c.tint=new Sk.builtin.func((function(n,i,e,t){"undefined"==typeof i?c.processing.tint(n.v):"undefined"==typeof e?c.processing.tint(n.v,i.v):"undefined"==typeof t?c.processing.tint(n.v,i.v,e.v):c.processing.tint(n.v,i.v,e.v,t.v)})),c.updatePixels=new Sk.builtin.func((function(){c.processing.updatePixels()})),c.vertex=new Sk.builtin.func((function(n,i,e,t,u){"undefined"==typeof e?c.processing.vertex(n.v,i.v):"undefined"==typeof t?c.processing.vertex(n.v,i.v,e.v):"undefined"==typeof u?c.processing.vertex(n.v,i.v,e.v,t.v):c.processing.vertex(n.v,i.v,e.v,t.v,u.v)})),c.year=new Sk.builtin.func((function(){return new Sk.builtin.int_(c.processing.year())})),c.box=new Sk.builtin.func((function(n){c.processing.box(n.v)})),c.sphere=new Sk.builtin.func((function(n){c.processing.sphere(n.v)})),c.sphereDetail=new Sk.builtin.func((function(n,i){"undefined"==typeof i?c.processing.sphereDetail(n.v):c.processing.sphereDetail(n.v,i.v)})),c.background=new Sk.builtin.func((function(n,i,e){"undefined"!=typeof i&&(i=i.v),"undefined"!=typeof e&&(e=e.v),c.processing.background(n.v,i,e)})),c.fill=new Sk.builtin.func((function(n,i,e,t){"undefined"!=typeof i&&(i=i.v),"undefined"!=typeof e&&(e=e.v),"undefined"!=typeof t&&(t=t.v),c.processing.fill(n.v,i,e,t)})),c.stroke=new Sk.builtin.func((function(n,i,e,t){"undefined"!=typeof i&&(i=i.v),"undefined"!=typeof e&&(e=e.v),"undefined"!=typeof t&&(t=t.v),c.processing.stroke(n.v,i,e,t)})),c.noStroke=new Sk.builtin.func((function(){c.processing.noStroke()})),c.colorMode=new Sk.builtin.func((function(n,i,e,t,u){i="undefined"==typeof i?255:i.v,"undefined"!=typeof e&&(e=e.v),"undefined"!=typeof t&&(t=t.v),"undefined"!=typeof u&&(u=u.v),c.processing.colorMode(n.v,i,e,t,u)})),c.noFill=new Sk.builtin.func((function(){c.processing.noFill()})),c.loop=new Sk.builtin.func((function(){if(null===c.processing)throw new Sk.builtin.Exception("loop() should be called after run()");v=!0,c.processing.loop()})),c.noLoop=new Sk.builtin.func((function(){if(null===c.processing)throw new Sk.builtin.Exception("noLoop() should be called after run()");v=!1,c.processing.noLoop()})),c.frameRate=new Sk.builtin.func((function(n){c.processing.frameRate(n.v)})),c.width=new Sk.builtin.int_(0),c.height=new Sk.builtin.int_(0),c.renderMode=c.P2D,c.size=new Sk.builtin.func((function(n,i,e){"undefined"==typeof e&&(e=c.P2D),c.processing.size(n.v,i.v,e.v),c.width=new Sk.builtin.int_(c.processing.width),c.height=new Sk.builtin.int_(c.processing.height),c.renderMode=e})),c.exitp=new Sk.builtin.func((function(){c.processing.exit()})),c.mouseX=new Sk.builtin.func((function(){return new Sk.builtin.int_(c.processing.mouseX)})),c.mouseY=new Sk.builtin.func((function(){return new Sk.builtin.int_(c.processing.mouseY)})),c.pmouseX=new Sk.builtin.func((function(){return new Sk.builtin.int_(c.processing.pmouseX)})),c.pmouseY=new Sk.builtin.func((function(){return new Sk.builtin.int_(c.processing.pmouseY)})),c.rectMode=new Sk.builtin.func((function(n){c.processing.rectMode(n.v)})),c.strokeWeight=new Sk.builtin.func((function(n){c.processing.strokeWeight(n.v)})),c.smooth=new Sk.builtin.func((function(){c.processing.smooth()})),c.noSmooth=new Sk.builtin.func((function(){c.processing.noSmooth()})),c.ellipseMode=new Sk.builtin.func((function(n){c.processing.ellipseMode(n.v)})),c.strokeCap=new Sk.builtin.func((function(n){c.processing.strokeCap(n.v)})),c.strokeJoin=new Sk.builtin.func((function(n){c.processing.strokeJoin(n.v)})),c.rotate=new Sk.builtin.func((function(n){c.processing.rotate(n.v)})),c.rotateX=new Sk.builtin.func((function(n){c.processing.rotateX(n.v)})),c.rotateY=new Sk.builtin.func((function(n){c.processing.rotateY(n.v)})),c.rotateZ=new Sk.builtin.func((function(n){c.processing.rotateZ(n.v)})),c.scale=new Sk.builtin.func((function(n,i,e){i="undefined"==typeof i?1:i.v,e="undefined"==typeof e?1:e.v,c.processing.scale(n.v,i,e)})),c.translate=new Sk.builtin.func((function(n,i,e){i="undefined"==typeof i?1:i.v,e="undefined"==typeof e?1:e.v,c.processing.translate(n.v,i,e)})),c.popMatrix=new Sk.builtin.func((function(){c.processing.popMatrix()})),c.pushMatrix=new Sk.builtin.func((function(){c.processing.pushMatrix()})),c.applyMatrix=new Sk.builtin.func((function(){var n,i=Array.prototype.slice.call(arguments,0,16);for(n=0;n>>0,this.mti=1;this.mti>>30,this.mt[this.mti]=(1812433253*((4294901760&n)>>>16)<<16)+1812433253*(65535&n)+this.mti,this.mt[this.mti]>>>=0},MersenneTwister.prototype.init_by_array=function(n,t){var i,e,r;for(this.init_genrand(19650218),i=1,e=0,r=this.N>t?this.N:t;r;r--){var u=this.mt[i-1]^this.mt[i-1]>>>30;this.mt[i]=(this.mt[i]^(1664525*((4294901760&u)>>>16)<<16)+1664525*(65535&u))+n[e]+e,this.mt[i]>>>=0,e++,++i>=this.N&&(this.mt[0]=this.mt[this.N-1],i=1),e>=t&&(e=0)}for(r=this.N-1;r;r--){u=this.mt[i-1]^this.mt[i-1]>>>30;this.mt[i]=(this.mt[i]^(1566083941*((4294901760&u)>>>16)<<16)+1566083941*(65535&u))-i,this.mt[i]>>>=0,++i>=this.N&&(this.mt[0]=this.mt[this.N-1],i=1)}this.mt[0]=2147483648},MersenneTwister.prototype.genrand_int32=function(){var n,t=new Array(0,this.MATRIX_A);if(this.mti>=this.N){var i;for(this.mti==this.N+1&&this.init_genrand(5489),i=0;i>>1^t[1&n];for(;i>>1^t[1&n];n=this.mt[this.N-1]&this.UPPER_MASK|this.mt[0]&this.LOWER_MASK,this.mt[this.N-1]=this.mt[this.M-1]^n>>>1^t[1&n],this.mti=0}return n=this.mt[this.mti++],n^=n>>>11,n^=n<<7&2636928640,n^=n<<15&4022730752,(n^=n>>>18)>>>0},MersenneTwister.prototype.genrand_int31=function(){return this.genrand_int32()>>>1},MersenneTwister.prototype.genrand_real1=function(){return this.genrand_int32()*(1/4294967295)},MersenneTwister.prototype.random=function(){return this.genrand_int32()*(1/4294967296)},MersenneTwister.prototype.genrand_real3=function(){return(this.genrand_int32()+.5)*(1/4294967296)},MersenneTwister.prototype.genrand_res53=function(){return(67108864*(this.genrand_int32()>>>5)+(this.genrand_int32()>>>6))*(1/9007199254740992)};var $builtinmodule=function(n){var t={},i=new MersenneTwister,e=void 0;t.seed=new Sk.builtin.func((function(n){return Sk.builtin.pyCheckArgsLen("seed",arguments.length,0,1),n=Sk.builtin.asnum$(n),i=arguments.length>0?new MersenneTwister(n):new MersenneTwister,Sk.builtin.none.none$})),t.random=new Sk.builtin.func((function(){return Sk.builtin.pyCheckArgsLen("random",arguments.length,0,0),new Sk.builtin.float_(i.genrand_res53())}));var toInt=function(n){return 0|n},randrange=function(n,t,e){var r,u,s;if(!Sk.builtin.checkInt(n))throw new Sk.builtin.ValueError("non-integer first argument for randrange()");if(void 0===t)return s=toInt(i.genrand_res53()*n),new Sk.builtin.int_(s);if(!Sk.builtin.checkInt(t))throw new Sk.builtin.ValueError("non-integer stop for randrange()");if(void 0===e&&(e=1),r=t-n,1==e&&r>0)return s=n+toInt(i.genrand_res53()*r),new Sk.builtin.int_(s);if(1==e)throw new Sk.builtin.ValueError("empty range for randrange() ("+n+", "+t+", "+r+")");if(!Sk.builtin.checkInt(e))throw new Sk.builtin.ValueError("non-integer step for randrange()");if(e>0)u=toInt((r+e-1)/e);else{if(!(e<0))throw new Sk.builtin.ValueError("zero step for randrange()");u=toInt((r+e+1)/e)}if(u<=0)throw new Sk.builtin.ValueError("empty range for randrange()");return s=n+e*toInt(i.genrand_res53()*u),new Sk.builtin.int_(s)};t.randint=new Sk.builtin.func((function(n,t){return Sk.builtin.pyCheckArgsLen("randint",arguments.length,2,2),n=Sk.builtin.asnum$(n),t=Sk.builtin.asnum$(t),randrange(n,t+1)})),t.randrange=new Sk.builtin.func((function(n,t,i){return Sk.builtin.pyCheckArgsLen("randrange",arguments.length,1,3),n=Sk.builtin.asnum$(n),t=Sk.builtin.asnum$(t),i=Sk.builtin.asnum$(i),randrange(n,t,i)})),t.uniform=new Sk.builtin.func((function(n,t){Sk.builtin.pyCheckArgsLen("uniform",arguments.length,2,2),n=Sk.builtin.asnum$(n),t=Sk.builtin.asnum$(t);var e=i.genrand_res53();const r=n+e*(t-n);return new Sk.builtin.float_(r)})),t.triangular=new Sk.builtin.func((function(n,t,e){var r,u,s;return Sk.builtin.pyCheckArgsLen("triangular",arguments.length,2,3),Sk.builtin.pyCheckType("low","number",Sk.builtin.checkNumber(n)),Sk.builtin.pyCheckType("high","number",Sk.builtin.checkNumber(t)),(n=Sk.builtin.asnum$(n))>(t=Sk.builtin.asnum$(t))&&(s=n,n=t,t=s),void 0===e||e===Sk.builtin.none.none$?e=(t-n)/2:(Sk.builtin.pyCheckType("mode","number",Sk.builtin.checkNumber(e)),e=Sk.builtin.asnum$(e)),u=(r=i.genrand_res53())<(e-n)/(t-n)?n+Math.sqrt(r*(t-n)*(e-n)):t-Math.sqrt((1-r)*(t-n)*(t-e)),new Sk.builtin.float_(u)}));var normalSample=function(n,t){var r,u,s,h,l;return void 0!==e?(l=e,e=void 0):(r=i.genrand_res53(),u=i.genrand_res53(),s=Math.sqrt(-2*Math.log(r)),h=2*Math.PI*u,l=s*Math.cos(h),e=s*Math.sin(h)),n+t*l};return t.gauss=new Sk.builtin.func((function(n,t){return Sk.builtin.pyCheckArgsLen("gauss",arguments.length,2,2),Sk.builtin.pyCheckType("mu","number",Sk.builtin.checkNumber(n)),Sk.builtin.pyCheckType("sigma","number",Sk.builtin.checkNumber(t)),n=Sk.builtin.asnum$(n),t=Sk.builtin.asnum$(t),new Sk.builtin.float_(normalSample(n,t))})),t.normalvariate=t.gauss,t.lognormvariate=new Sk.builtin.func((function(n,t){return Sk.builtin.pyCheckArgsLen("lognormvariate",arguments.length,2,2),Sk.builtin.pyCheckType("mu","number",Sk.builtin.checkNumber(n)),Sk.builtin.pyCheckType("sigma","number",Sk.builtin.checkNumber(t)),n=Sk.builtin.asnum$(n),t=Sk.builtin.asnum$(t),new Sk.builtin.float_(Math.exp(normalSample(n,t)))})),t.expovariate=new Sk.builtin.func((function(n){Sk.builtin.pyCheckArgsLen("expovariate",arguments.length,1,1),Sk.builtin.pyCheckType("lambd","number",Sk.builtin.checkNumber(n)),n=Sk.builtin.asnum$(n);var t=i.genrand_res53();return new Sk.builtin.float_(-Math.log(t)/n)})),t.choice=new Sk.builtin.func((function(n){if(Sk.builtin.pyCheckArgsLen("choice",arguments.length,1,1),Sk.builtin.pyCheckType("seq","sequence",Sk.builtin.checkSequence(n)),void 0!==n.sq$length){var t=new Sk.builtin.int_(toInt(i.genrand_res53()*n.sq$length()));return n.mp$subscript(t)}throw new Sk.builtin.TypeError("object has no length")})),t.shuffle=new Sk.builtin.func((function(n){if(Sk.builtin.pyCheckArgsLen("shuffle",arguments.length,1,1),Sk.builtin.pyCheckType("x","sequence",Sk.builtin.checkSequence(n)),n.constructor===Sk.builtin.list){const u=n.v;for(var t=u.length-1;t>0;t-=1){var e=u[r=toInt(i.genrand_res53()*(t+1))];u[r]=u[t],u[t]=e}}else{if(void 0===n.sq$length)throw new Sk.builtin.TypeError("object has no length");if(void 0===n.mp$ass_subscript)throw new Sk.builtin.TypeError("object is immutable");for(t=n.sq$length()-1;t>0;t-=1){var r=new Sk.builtin.int_(toInt(i.genrand_res53()*(t+1)));t=new Sk.builtin.int_(t);e=n.mp$subscript(r);n.mp$ass_subscript(r,n.mp$subscript(t)),n.mp$ass_subscript(t,e)}}return Sk.builtin.none.none$})),t.sample=new Sk.builtin.func((function(n,t){var e,r,u,s,h;for(Sk.builtin.pyCheckArgsLen("sample",arguments.length,2,2),Sk.builtin.pyCheckType("population","iterable",Sk.builtin.checkIterable(n)),Sk.builtin.pyCheckType("k","integer",Sk.builtin.checkInt(t)),t=Sk.builtin.asnum$(t),h=[],e=0,s=(u=Sk.abstr.iter(n)).tp$iternext();void 0!==s;e++,s=u.tp$iternext())r=Math.floor(i.genrand_res53()*(e+1)),enew pyStr(e))))},_value2member={},RegexFlagMeta=buildNativeClass("RegexFlagMeta",{constructor:function RegexFlagMeta(){},base:pyType,slots:{tp$iter(){const e=Object.values(_members)[Symbol.iterator]();return new pyIterator((()=>e.next().value))},sq$contains(e){if(!(e instanceof this))throw new TypeError("unsupported operand type(s) for 'in': '"+typeName(e)+"' and '"+typeName(this)+"'");return Object.values(_members).includes(e)}}});re.RegexFlag=buildNativeClass("RegexFlag",{meta:RegexFlagMeta,base:pyInt,constructor:function RegexFlag(e){const t=_value2member[e];if(t)return t;this.v=e,_value2member[e]=this},slots:{tp$new(e,t){checkOneArg("RegexFlag",e,t);const r=e[0].valueOf();if(!checkInt(r))throw new ValueError(objectRepr(r)+" is not a valid RegexFlag");return new re.RegexFlag(r)},$r(){let e=this.valueOf();const t=e<0;e=t?~e:e;const r=[];Object.entries(_members).forEach((([t,n])=>{const s=n.valueOf();e&s&&(e&=~s,r.push("re."+t))})),e&&r.push(hex(e).toString());let n=r.join("|");return t&&(n=r.length>1?"~("+n+")":"~"+n),new pyStr(n)},sq$contains(e){if(!(e instanceof re.RegexFlag))throw new TypeError("'in' requires a RegexFlag not "+typeName(e));return this.nb$and(e)===e},nb$and:flagBitSlot(((e,t)=>e&t),JSBI.bitwiseAnd),nb$or:flagBitSlot(((e,t)=>e|t),JSBI.bitwiseOr),nb$xor:flagBitSlot(((e,t)=>e^t),JSBI.bitwiseXor),nb$invert:function(){const e=this.v;return"number"==typeof e?new re.RegexFlag(~e):new re.RegexFlag(JSBI.bitwiseNot(e))}},proto:{valueOf(){return this.v}},flags:{sk$unacceptableBase:!0}}),re.TEMPLATE=re.T=new re.RegexFlag(1),re.IGNORECASE=re.I=new re.RegexFlag(2),re.LOCALE=re.L=new re.RegexFlag(4),re.MULTILINE=re.M=new re.RegexFlag(8),re.DOTALL=re.S=new re.RegexFlag(16),re.UNICODE=re.U=new re.RegexFlag(32),re.VERBOSE=re.X=new re.RegexFlag(64),re.DEBUG=new re.RegexFlag(128),re.ASCII=re.A=new re.RegexFlag(256);const _members={ASCII:re.A,IGNORECASE:re.I,LOCALE:re.L,UNICODE:re.U,MULTILINE:re.M,DOTALL:re.S,VERBOSE:re.X,TEMPLATE:re.T,DEBUG:re.DEBUG};function flagBitSlot(e,t){return function(r){if(r instanceof re.RegexFlag||r instanceof pyInt){let n=this.v,s=r.v;if("number"==typeof n&&"number"==typeof s){let t=e(n,s);return t<0&&(t+=4294967296),new re.RegexFlag(t)}return n=JSBI.BigUp(n),s=JSBI.BigUp(s),new re.RegexFlag(JSBI.numberIfSafe(t(n,s)))}return pyNotImplemented}}const jsFlags={i:re.I,m:re.M,s:re.S,u:re.U},jsInlineFlags={i:re.I,a:re.A,s:re.S,L:re.L,m:re.M,u:re.U,x:re.X};RegExp.prototype.hasOwnProperty("sticky")||delete jsFlags.s,RegExp.prototype.hasOwnProperty("unicode")||delete jsFlags.u;const flagFails=Object.entries({"cannot use LOCALE flag with a str pattern":re.L,"ASCII and UNICODE flags are incompatible":new re.RegexFlag(re.A.valueOf()|re.U.valueOf())}),inline_regex=/\\(\\?([isamux]+)\\)/g;function adjustFlags(e,t){let r=e.toString(),n="g",s=0;return r=r.replace(inline_regex,((e,t)=>{for(let r of t){const e=jsInlineFlags[r];s|=e.valueOf()}return""})),flagFails.forEach((([e,t])=>{if((t.valueOf()&s)===t.valueOf())throw new re.error("bad bad inline flags: "+e)})),t=numberBinOp(new re.RegexFlag(s),t,"BitOr"),flagFails.forEach((([e,r])=>{if(numberBinOp(r,t,"BitAnd")===r)throw new ValueError(e)})),numberBinOp(re.A,t,"BitAnd")!==re.A&&(t=numberBinOp(re.U,t,"BitOr")),Object.entries(jsFlags).forEach((([e,r])=>{numberBinOp(r,t,"BitAnd")===r&&(n+=e)})),t=new re.RegexFlag(t.valueOf()),[r,n,t]}let neg_lookbehind_A="(?)(?!(?:\\]|[^\\[]*[^\\\\]\\]))/g,py_to_js_unicode_escape=/\\\\[\\t\\r\\n \\v\\f#&~"'!:,;\`<>]|\\\\-(?!(?:\\]|[^\\[]*[^\\\\]\\]))/g,quantifierErrors=/Incomplete quantifier|Lone quantifier/g,_compiled_patterns=Object.create(null);function compile_pattern(e,t){let r,n;[r,n,t]=adjustFlags(e,t);const s=_compiled_patterns[e.toString()];if(s&&s.$flags===t)return s;const i={};let o,a;r="_"+r,r=r.replace(initialUnescapedBracket,"$1$2\\\\]$3"),r=r.replace(py_to_js_regex,((t,r,n,s,o,a)=>{switch(n){case"\\\\A":return r+neg_lookbehind_A+"^";case"\\\\Z":return r+"$(?!\\\\n)";case"{,":return r+"{0,";case"$":return r+"(?:(?=\\\\n$)|$)";default:if(n.endsWith(">"))return i[o]=!0,r+"(?<"+o+">";if(!i[s])throw new re.error("unknown group name "+s+" at position "+a+1,e,new pyInt(a+1));return r+"\\\\k<"+s+">"}})),r=r.slice(1);let l=r;n.includes("u")&&(l=r.replace(py_to_js_unicode_escape,(e=>{switch(e){case"\\\\ ":return" ";case"\\\\\\t":return"\\\\t";case"\\\\\\n":return"\\\\n";case"\\\\\\v":return"\\\\v";case"\\\\\\f":return"\\\\f";case"\\\\r":return"\\\\r";default:return e.slice(1)}})));try{o=new RegExp(l,n)}catch(g){if(!quantifierErrors.test(g.message))throw a=g.message.substring(g.message.lastIndexOf(":")+2)+" in pattern: "+e.toString(),new re.error(a,e);try{o=new RegExp(r,n.replace("u",""))}catch(g){throw a=g.message.substring(g.message.lastIndexOf(":")+2)+" in pattern: "+e.toString(),new re.error(a,e)}}const p=new re.Pattern(o,e,t);return _compiled_patterns[e.toString()]=p,p}function _compile(e,t){if(e instanceof re.Pattern){if(t!==zero||t.valueOf())throw new ValueError("cannot process flags argument with compiled pattern");return e}if(!checkString(e))throw new TypeError("first argument must be string or compiled pattern");return compile_pattern(e,t)}re.error=buildNativeClass("re.error",{base:Exception,constructor:function error(e,t,r){this.$pattern=t,this.$msg=e,this.$pos=r||pyNone,Exception.call(this,e)},slots:{tp$doc:"Exception raised for invalid regular expressions.\\n\\n Attributes:\\n\\n msg: The unformatted error message\\n pattern: The regular expression pattern\\n",tp$init(e,t){const[r,n,s]=copyKeywordToNamedArgs("re.error",["msg","pattern","pos"],e,t,[pyNone,pyNone]);this.$pattern=n,this.$pos=s,this.$msg=r}},getsets:{msg:{$get(){return this.$msg}},pattern:{$get(){return this.$pattern}},pos:{$get(){return this.$pos}}}});const zero=new pyInt(0),maxsize=Number.MAX_SAFE_INTEGER;re.Pattern=buildNativeClass("re.Pattern",{constructor:function(e,t,r){this.v=e,this.str=t,this.$flags=r,this.$groups=null,this.$groupindex=null},slots:{$r(){const e=objectRepr(this.str).slice(0,200),t=objectRepr(this.$flags.nb$and(re.U.nb$invert()));return new pyStr("re.compile("+e+(t?", "+t:"")+")")},tp$richcompare(e,t){if("Eq"!==t&&"NotEq"!==t||!(e instanceof re.Pattern))return pyNotImplemented;const r=this.str===e.str&&this.$flags===e.$flags;return"Eq"===t?r:!r},tp$hash(){},tp$doc:"Compiled regular expression object."},methods:{match:{$meth:function match(e,t,r){return this.$match(e,t,r)},$flags:{NamedArgs:["string","pos","endpos"],Defaults:[zero,maxsize]},$textsig:"($self, /, string, pos=0, endpos=sys.maxsize)",$doc:"Matches zero or more characters at the beginning of the string."},fullmatch:{$meth:function fullmatch(e,t,r){return this.full$match(e,t,r)},$flags:{NamedArgs:["string","pos","endpos"],Defaults:[zero,maxsize]},$textsig:"($self, /, string, pos=0, endpos=sys.maxsize)",$doc:"Matches against all of the string."},search:{$meth:function search(e,t,r){return this.$search(e,t,r)},$flags:{NamedArgs:["string","pos","endpos"],Defaults:[zero,maxsize]},$textsig:"($self, /, string, pos=0, endpos=sys.maxsize)",$doc:"Scan through string looking for a match, and return a corresponding match object instance.\\n\\nReturn None if no position in the string matches."},sub:{$meth:function sub(e,t,r){return this.$sub(e,t,r)},$flags:{NamedArgs:["repl","string","count"],Defaults:[zero]},$textsig:"($self, /, repl, string, count=0)",$doc:"Return the string obtained by replacing the leftmost non-overlapping occurrences of pattern in string by the replacement repl."},subn:{$meth:function(e,t,r){return this.$subn(e,t,r)},$flags:{NamedArgs:["repl","string","count"],Defaults:[zero]},$textsig:"($self, /, repl, string, count=0)",$doc:"Return the tuple (new_string, number_of_subs_made) found by replacing the leftmost non-overlapping occurrences of pattern with the replacement repl."},findall:{$meth:function findall(e,t,r){return this.find$all(e,t,r)},$flags:{NamedArgs:["string","pos","endpos"],Defaults:[zero,maxsize]},$textsig:"($self, /, string, pos=0, endpos=sys.maxsize)",$doc:"Return a list of all non-overlapping matches of pattern in string."},split:{$meth:function split(e,t){return this.$split(e,t)},$flags:{NamedArgs:["string","maxsplit"],Defaults:[zero]},$textsig:"($self, /, string, maxsplit=0)",$doc:"Split string by the occurrences of pattern."},finditer:{$meth:function finditer(e,t,r){return this.find$iter(e,t,r)},$flags:{NamedArgs:["string","pos","endpos"],Defaults:[zero,maxsize]},$textsig:"($self, /, string, pos=0, endpos=sys.maxsize)",$doc:"Return an iterator over all non-overlapping matches for the RE pattern in string.\\n\\nFor each match, the iterator returns a match object."},scanner:{$meth:function scanner(e,t,r){return this.$scanner(e,t,r)},$flags:{NamedArgs:["string","pos","endpos"],Defaults:[zero,maxsize]},$textsig:"($self, /, string, pos=0, endpos=sys.maxsize)",$doc:null},__copy__:{$meth:function copy(){return this},$flags:{NoArgs:!0},$textsig:"($self, /)",$doc:null},__deepcopy__:{$meth:function(){return this},$flags:{OneArg:!0},$textsig:"($self, memo, /)",$doc:null}},getsets:{pattern:{$get(){return this.str},$doc:"The pattern string from which the RE object was compiled."},flags:{$get(){return this.$flags},$doc:"The regex matching flags."},groups:{$get(){if(null===this.$groups){const e=(this.str.v.match(this.group$regex)||[]).length;this.$groups=new pyInt(e)}return this.$groups},$doc:"The number of capturing groups in the pattern."},groupindex:{$get(){if(null===this.$groupindex){const e=this.str.v.matchAll(this.group$regex),t=[];let r=1;for(const n of e)n[1]&&(t.push(new pyStr(n[1])),t.push(new pyInt(r))),r++;this.$groupindex=new pyMappingProxy(new pyDict(t))}return this.$groupindex},$doc:"A dictionary mapping group names to group numbers."}},proto:{group$regex:/\\((?!\\?(?!P<).*)(?:\\?P<([^\\d\\W]\\w*)>)?(?![^\\[]*\\])/g,get$count:e=>(e=asIndexSized(e,OverflowError))||Number.POSITIVE_INFINITY,get$jsstr(e,t,r){if(!checkString(e))throw new TypeError("expected string or bytes-like object");if(t===zero&&r===maxsize||void 0===t&&void 0===r)return{jsstr:e.toString(),pos:zero.valueOf(),endpos:e.sq$length()};const{start:n,end:s}=pySlice.startEnd$wrt(e,t,r);return{jsstr:e.toString().slice(n,s),pos:n,endpos:s}},find$all(e,t,r){let{jsstr:n}=this.get$jsstr(e,t,r);const s=this.v,i=n.matchAll(s),o=[];for(let a of i)o.push(1===a.length?new pyStr(a[0]):2===a.length?new pyStr(a[1]):new pyTuple(a.slice(1).map((e=>new pyStr(e)))));return new pyList(o)},$split(e,t){t=(t=asIndexSized(t))||Number.POSITIVE_INFINITY;let{jsstr:r}=this.get$jsstr(e);const n=this.v,s=[];let i,o=0,a=0;for(;null!==(i=n.exec(r))&&o1&&s.push(...i.slice(1).map((e=>void 0===e?pyNone:new pyStr(e)))),o++,a=n.lastIndex,i.index===n.lastIndex){if(!r)break;r=r.slice(i.index),a=0,n.lastIndex=1}return n.lastIndex=0,s.push(new pyStr(r.slice(a))),new pyList(s)},match$from_repl(e,t,r,n){let s;const i=e[e.length-1];return"object"==typeof i?(s=e.slice(0,e.length-3),Object.assign(s,{groups:i}),s.index=e[e.length-3]):(s=e.slice(0,e.length-2),s.groups=void 0,s.index=e[e.length-2]),new re.Match(s,this.str,t,r,n)},do$sub(e,t,r){const{jsstr:n,pos:s,endpos:i}=this.get$jsstr(t);let o;checkCallable(e)?o=t=>{const r=pyCall(e,[t]);if(!checkString(r))throw new TypeError("expected str instance, "+typeName(r)+" found");return r.toString()}:(e=this.get$jsstr(e).jsstr,o=t=>t.template$repl(e)),r=this.get$count(r);let a=0;const l=n.replace(this.v,((...e)=>{if(a>=r)return e[0];a++;const n=this.match$from_repl(e,t,s,i);return o(n)}));return[new pyStr(l),new pyInt(a)]},$sub(e,t,r){const[n]=this.do$sub(e,t,r);return n},$subn(e,t,r){return new pyTuple(this.do$sub(e,t,r))},do$match(e,t,r,n){let s;({jsstr:s,pos:r,endpos:n}=this.get$jsstr(t,r,n));const i=s.match(e);return null===i?pyNone:new re.Match(i,this,t,r,n)},$search(e,t,r){var n=new RegExp(this.v.source,this.v.flags.replace("g",""));return this.do$match(n,e,t,r)},$match(e,t,r){let n=this.v.source,s=this.v.flags.replace("g","").replace("m","");n="^"+n;var i=new RegExp(n,s);return this.do$match(i,e,t,r)},full$match(e,t,r){let n=this.v.source,s=this.v.flags.replace("g","").replace("m","");n="^(?:"+n+")$";var i=new RegExp(n,s);return this.do$match(i,e,t,r)},find$iter(e,t,r){let n;({jsstr:n,pos:t,endpos:r}=this.get$jsstr(e,t,r));const s=n.matchAll(this.v);return new pyIterator((()=>{const n=s.next().value;if(void 0!==n)return new re.Match(n,this,e,t,r)}))}},flags:{sk$unacceptableBase:!0}}),re.Match=buildNativeClass("re.Match",{constructor:function(e,t,r,n,s){this.v=e,this.$match=new pyStr(this.v[0]),this.str=r,this.$re=t,this.$pos=n,this.$endpos=s,this.$groupdict=null,this.$groups=null,this.$lastindex=null,this.$lastgroup=null,this.$regs=null},slots:{tp$doc:"The result of re.match() and re.search().\\nMatch objects always have a boolean value of True.",$r(){let e="",new pyStr(e)},tp$as_squence_or_mapping:!0,mp$subscript(e){const t=this.get$group(e);return void 0===t?pyNone:new pyStr(t)}},methods:{group:{$meth:function group(...e){let t;return e.length<=1?(t=this.get$group(e[0]),void 0===t?pyNone:new pyStr(t)):(t=[],e.forEach((e=>{e=this.get$group(e),t.push(void 0===e?pyNone:new pyStr(e))})),new pyTuple(t))},$flags:{MinArgs:0},$textsig:null,$doc:"group([group1, ...]) -> str or tuple.\\n Return subgroup(s) of the match by indices or names.\\n For 0 returns the entire match."},start:{$meth:function start(e){const t=this.get$group(e);return new pyInt(void 0===t?-1:this.str.v.indexOf(t,this.v.index+this.$pos))},$flags:{MinArgs:0,MaxArgs:1},$textsig:"($self, group=0, /)",$doc:"Return index of the start of the substring matched by group."},end:{$meth:function end(e){const t=this.get$group(e);return new pyInt(void 0===t?-1:this.str.v.indexOf(t,this.v.index+this.$pos)+[...t].length)},$flags:{MinArgs:0,MaxArgs:1},$textsig:"($self, group=0, /)",$doc:"Return index of the end of the substring matched by group."},span:{$meth:function span(e){return this.$span(e)},$flags:{MinArgs:0,MaxArgs:1},$textsig:"($self, group=0, /)",$doc:"For match object m, return the 2-tuple (m.start(group), m.end(group))."},groups:{$meth:function groups(e){return null!==this.$groups||(this.$groups=Array.from(this.v.slice(1),(t=>void 0===t?e:new pyStr(t))),this.$groups=new pyTuple(this.$groups)),this.$groups},$flags:{NamedArgs:["default"],Defaults:[pyNone]},$textsig:"($self, /, default=None)",$doc:"Return a tuple containing all the subgroups of the match, from 1.\\n\\n default\\n Is used for groups that did not participate in the match."},groupdict:{$meth:function groupdict(e){if(null!==this.$groupdict)return this.$groupdict;if(void 0===this.v.groups)this.$groupdict=new pyDict;else{const t=[];Object.entries(this.v.groups).forEach((([r,n])=>{t.push(new pyStr(r)),t.push(void 0===n?e:new pyStr(n))})),this.$groupdict=new pyDict(t)}return this.$groupdict},$flags:{NamedArgs:["default"],Defaults:[pyNone]},$textsig:"($self, /, default=None)",$doc:"Return a dictionary containing all the named subgroups of the match, keyed by the subgroup name.\\n\\n default\\n Is used for groups that did not participate in the match."},expand:{$meth:function expand(e){if(!checkString(e))throw new TypeError("expected str instance got "+typeName(e));return e=e.toString(),e=this.template$repl(e),new pyStr(e)},$flags:{OneArg:!0},$textsig:"($self, /, template)",$doc:"Return the string obtained by doing backslash substitution on the string template, as done by the sub() method."},__copy__:{$meth:function __copy__(){return this},$flags:{NoArgs:!0},$textsig:"($self, /)",$doc:null},__deepcopy__:{$meth:function __deepcopy__(){return this},$flags:{OneArg:!0},$textsig:"($self, memo, /)",$doc:null}},getsets:{lastindex:{$get(){if(null!==this.$lastindex)return this.$lastindex;let e,t=0;return this.v.forEach(((r,n)=>{n&&void 0!==r&&e!==r&&(t=n,e=r)})),this.$lastindex=t?new pyInt(t):pyNone,this.$lastindex},$doc:"The integer index of the last matched capturing group."},lastgroup:{$get(){if(null!==this.$lastgroup)return this.$lastgroup;if(void 0===this.v.groups)this.$lastgroup=pyNone;else{let e;Object.entries(this.v.groups).forEach((([t,r])=>{void 0!==r&&(e=t)})),this.$lastgroup=void 0===e?pyNone:new pyStr(e)}return this.$lastgroup},$doc:"The name of the last matched capturing group."},regs:{$get(){if(null!==this.$regs)return this.$regs;const e=[];return this.v.forEach(((t,r)=>{e.push(this.$span(r))})),this.$regs=new pyTuple(e),this.$regs}},string:{$get(){return this.str},$doc:"The string passed to match() or search()."},re:{$get(){return this.$re},$doc:"The regular expression object."},pos:{$get(){return new pyInt(this.$pos)},$doc:"The index into the string at which the RE engine started looking for a match."},endpos:{$get(){return new pyInt(this.$endpos)},$doc:"The index into the string beyond which the RE engine will not go."}},proto:{get$group(e){if(void 0===e)return this.v[0];if(checkString(e)){if(e=e.toString(),this.v.groups&&Object.prototype.hasOwnProperty.call(this.v.groups,e))return this.v.groups[e]}else if(isIndex(e)&&(e=asIndexSized(e))>=0&&e|\\\\g<([^\\d\\W]\\w*)>|\\\\g?/g,template$repl(e){return e.replace(this.template$regex,((e,t,r,n,s,i)=>{let o;if(void 0!==(t=t||r)?o=t{delete _compiled_patterns[e]})),pyNone},$flags:{NoArgs:!0},$textsig:"($module, / )",$doc:"Clear the regular expression caches"},template:{$meth:function template(e,t){return _compile(e,numberBinOp(re.T,t,"BitOr"))},$flags:{NamedArgs:["pattern","flags"],Defaults:[zero]},$textsig:"($module, / , pattern, flags=0)",$doc:"Compile a template pattern, returning a Pattern object"},escape:{$meth:function(e){if(!checkString(e))throw new TypeError("expected a str instances, got "+typeName(e));return e=(e=e.toString()).replace(escape_chrs,"\\\\$&"),new pyStr(e)},$flags:{NamedArgs:["pattern"],Defaults:[]},$textsig:"($module, / , pattern)",$doc:"\\n Escape special characters in a string.\\n "}});const escape_chrs=/[\\&\\~\\#.*+\\-?^\${}()|[\\]\\\\\\t\\r\\v\\f\\n ]/g;return re}`,"src/lib/signal.js":'var $builtinmodule=function(n){var i={};return i.SIG_DFL=new Sk.builtin.int_(0),i.SIG_IGN=new Sk.builtin.int_(1),i.CTRL_C_EVENT=new Sk.builtin.int_(0),i.CTRL_BREAK_EVENT=new Sk.builtin.int_(0),i.NSIG=new Sk.builtin.int_(23),i.SIGHUP=new Sk.builtin.int_(1),i.SIGNINT=new Sk.builtin.int_(2),i.SIGILL=new Sk.builtin.int_(4),i.SIGFPE=new Sk.builtin.int_(8),i.SIGKILL=new Sk.builtin.int_(9),i.SIGSEGV=new Sk.builtin.int_(11),i.SIGTERM=new Sk.builtin.int_(15),i.SIGBREAK=new Sk.builtin.int_(21),i.SIGABRT=new Sk.builtin.int_(22),i.pause=new Sk.builtin.func((function(){Sk.builtin.pyCheckArgsLen("pause",arguments.length,0,0);var n=new Sk.misceval.Suspension;return n.resume=function(){return Sk.builtin.none.none$},n.data={type:"Sk.promise",promise:new Promise((function(n,i){if(null!=Sk.signals&&Sk.signals.addEventListener){Sk.signals.addEventListener((function handleSignal(i){Sk.signals.removeEventListener(handleSignal),n()}))}else console.warn("signal.pause() not supported"),Sk.misceval.print_("signal.pause() not supported"),n()}))},n})),i.signal=new Sk.builtin.func((function(){throw new Sk.builtin.NotImplementedError("signal.signal is not supported.")})),i};',"src/lib/string.js":'var $builtinmodule=function(i){var t={};return t.ascii_lowercase=new Sk.builtin.str("abcdefghijklmnopqrstuvwxyz"),t.ascii_uppercase=new Sk.builtin.str("ABCDEFGHIJKLMNOPQRSTUVWXYZ"),t.ascii_letters=new Sk.builtin.str(t.ascii_lowercase.v+t.ascii_uppercase.v),t.lowercase=new Sk.builtin.str("abcdefghijklmnopqrstuvwxyz"),t.uppercase=new Sk.builtin.str("ABCDEFGHIJKLMNOPQRSTUVWXYZ"),t.letters=new Sk.builtin.str(t.lowercase.v+t.uppercase.v),t.digits=new Sk.builtin.str("0123456789"),t.hexdigits=new Sk.builtin.str("0123456789abcdefABCDEF"),t.octdigits=new Sk.builtin.str("01234567"),t.punctuation=new Sk.builtin.str("!\\"#$%&\'()*+,-./:;<=>?@[\\\\]^_`{|}~"),t.whitespace=new Sk.builtin.str("\\t\\n\\v\\f\\r "),t.printable=new Sk.builtin.str(t.digits.v+t.letters.v+t.punctuation.v+" \\t\\n\\r\\v\\f"),t.split=new Sk.builtin.func((function(...i){return Sk.misceval.callsimArray(Sk.builtin.str.prototype.split,i)})),t.capitalize=new Sk.builtin.func((function(i){return Sk.misceval.callsimArray(Sk.builtin.str.prototype.capitalize,[i])})),t.join=new Sk.builtin.func((function(i,t){return void 0===t&&(t=new Sk.builtin.str(" ")),Sk.misceval.callsimArray(Sk.builtin.str.prototype.join,[t,i])})),t.capwords=new Sk.builtin.func((function(i,n){if(Sk.builtin.pyCheckArgsLen("capwords",arguments.length,1,2),!Sk.builtin.checkString(i))throw new Sk.builtin.TypeError("s must be a string");if(void 0===n&&(n=new Sk.builtin.str(" ")),!Sk.builtin.checkString(n))throw new Sk.builtin.TypeError("sep must be a string");for(var e=Sk.misceval.callsimArray(t.split,[i,n]).v,r=[],l=0;l1&&function isLeapYear(t){return 0==(3&t)&&(t%100!=0||t%400==0)}(e?t.getUTCFullYear():t.getFullYear())&&u++,u}function stdTimezoneOffset(){var t=new Date(2002,0,1),e=new Date(2002,6,1);return Math.max(t.getTimezoneOffset(),e.getTimezoneOffset())}function dst(t){return t.getTimezoneOffset()1)return n[1];if(void 0===e)return null;try{return(n=t.toLocaleString(e,{timeZoneName:"short"}).split(" "))[n.length-1]}catch(i){return null}}function from_seconds(t,e){var i=new Date;if(t){Sk.builtin.pyCheckType("secs","number",Sk.builtin.checkNumber(t));var u=Sk.builtin.asnum$(t);i.setTime(1e3*u)}return function date_to_struct_time(t,e){let i;if(e=e||!1)i=[new Sk.builtin.str("UTC"),new Sk.builtin.int_(0)];else{var u=-t.getTimezoneOffset()/60,r=(u<0?"-":"+")+(""+Math.abs(u)).padStart(2,"0");i=[new Sk.builtin.str(r),new Sk.builtin.int_(3600*u)]}return new n([Sk.builtin.assk$(e?t.getUTCFullYear():t.getFullYear()),Sk.builtin.assk$((e?t.getUTCMonth():t.getMonth())+1),Sk.builtin.assk$(e?t.getUTCDate():t.getDate()),Sk.builtin.assk$(e?t.getUTCHours():t.getHours()),Sk.builtin.assk$(e?t.getUTCMinutes():t.getMinutes()),Sk.builtin.assk$(e?t.getUTCSeconds():t.getSeconds()),Sk.builtin.assk$(((e?t.getUTCDay():t.getDay())+6)%7),Sk.builtin.assk$(getDayOfYear(t,e)),Sk.builtin.assk$(e?0:dst(t)?1:0)],i)}(i,e)}e.struct_time=n,e.time=new Sk.builtin.func((function(){return Sk.builtin.pyCheckArgsLen("time",arguments.length,0,0),new Sk.builtin.float_(Date.now()/1e3)})),e.sleep=new Sk.builtin.func((function(t){return Sk.builtin.pyCheckArgsLen("sleep",arguments.length,1,1),Sk.builtin.pyCheckType("delay","float",Sk.builtin.checkNumber(t)),new Sk.misceval.promiseToSuspension(new Promise((function(e){Sk.setTimeout((function(){e(Sk.builtin.none.none$)}),1e3*Sk.ffi.remapToJs(t))})))})),e.localtime=new Sk.builtin.func((function(t){return Sk.builtin.pyCheckArgsLen("localtime",arguments.length,0,1),from_seconds(t,!1)})),e.gmtime=new Sk.builtin.func((function(t){return Sk.builtin.pyCheckArgsLen("gmtime",arguments.length,0,1),from_seconds(t,!0)}));var i=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],u=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"];function asctime_f(t){if(Sk.builtin.pyCheckArgsLen("asctime",arguments.length,0,1),!t||Sk.builtin.checkNone(t)?t=from_seconds():t instanceof n||(t=new n(t)),t instanceof Sk.builtin.tuple&&9==t.v.length){var e=[];return e.push(u[Sk.builtin.asnum$(t.v[6])]),e.push(i[Sk.builtin.asnum$(t.v[1])-1]),e.push(padLeft(Sk.builtin.asnum$(t.v[2]).toString(),2,"0")),e.push(padLeft(Sk.builtin.asnum$(t.v[3]).toString(),2,"0")+":"+padLeft(Sk.builtin.asnum$(t.v[4]).toString(),2,"0")+":"+padLeft(Sk.builtin.asnum$(t.v[5]).toString(),2,"0")),e.push(padLeft(Sk.builtin.asnum$(t.v[0]).toString(),4,"0")),new Sk.builtin.str(e.join(" "))}}function mktime_f(t){if(Sk.builtin.pyCheckArgsLen("mktime",arguments.length,1,1),t instanceof Sk.builtin.tuple&&9==t.v.length){var e=new Date(Sk.builtin.asnum$(t.v[0]),Sk.builtin.asnum$(t.v[1])-1,Sk.builtin.asnum$(t.v[2]),Sk.builtin.asnum$(t.v[3]),Sk.builtin.asnum$(t.v[4]),Sk.builtin.asnum$(t.v[5]));return Sk.builtin.assk$(e.getTime()/1e3,void 0)}throw new Sk.builtin.TypeError("mktime() requires a struct_time or 9-tuple")}e.asctime=new Sk.builtin.func(asctime_f),e.ctime=new Sk.builtin.func((function(t){return Sk.builtin.pyCheckArgsLen("ctime",arguments.length,0,1),asctime_f(from_seconds(t))})),e.mktime=new Sk.builtin.func(mktime_f),e.timezone=new Sk.builtin.int_(60*stdTimezoneOffset()),e.altzone=new Sk.builtin.int_(60*function altTimezoneOffset(){var t=new Date(2002,0,1),e=new Date(2002,6,1);return Math.min(t.getTimezoneOffset(),e.getTimezoneOffset())}()),e.daylight=new Sk.builtin.int_(function daylight_check(){const t=new Date(2002,0,1),e=new Date(2002,6,1);return t.getTimezoneOffset()!=e.getTimezoneOffset()}()?1:0),e.tzname=new Sk.builtin.tuple(function timeZoneNames(){var t=new Date(2002,0,1),e=new Date(2002,6,1);return dst(t)?[new Sk.builtin.str(timeZoneName(e)),new Sk.builtin.str(timeZoneName(t))]:[new Sk.builtin.str(timeZoneName(t)),new Sk.builtin.str(timeZoneName(e))]}()),e.accept2dyear=Sk.builtin.assk$(1),e.clock=new Sk.builtin.func((function(){var t=0;return t=Sk.global.performance&&Sk.global.performance.now?performance.now()/1e3:(new Date).getTime()/1e3,new Sk.builtin.float_(t)})),e.strftime=new Sk.builtin.func((function strftime_f(t,e){var i;if(Sk.builtin.pyCheckArgsLen("strftime",arguments.length,1,2),!Sk.builtin.checkString(t))throw new Sk.builtin.TypeError("format must be a string");return e?e instanceof n||(e=new n(e)):e=from_seconds(),check_struct_time(e),i=Sk.ffi.remapToJs(t),Sk.ffi.remapToPy(Sk.global.strftime(i,new Date(1e3*mktime_f(e).v)))})),e.tzset=new Sk.builtin.func((function tzset_f(){throw new Sk.builtin.NotImplementedError("time.tzset() is not yet implemented")}));let r=null;return e.strptime=new Sk.builtin.func((function strptime_f(...t){return Sk.builtin.pyCheckArgsLen("strptime",t.length,1,2),null===r?Sk.misceval.chain(Sk.importModule("_strptime",!1,!0),(e=>(r=e.tp$getattr(new Sk.builtin.str("_strptime_time")),r.tp$call(t)))):r.tp$call(t)})),e};`,"src/lib/token.js":'var $builtinmodule=function(n){var e={};e.__file__=new Sk.builtin.str("/src/lib/token.py");const t=[];for(let i in Sk.token.tok_name){const n=Sk.token.tok_name[i].slice(2),k=parseInt(i,10);t.push(Sk.ffi.remapToPy(k)),t.push(Sk.ffi.remapToPy(n)),e[n]=Sk.ffi.remapToPy(k)}return e.tok_name=new Sk.builtin.dict(t),e.ISTERMINAL=new Sk.builtin.func((function(n){return Sk.builtin.pyCheckArgsLen("ISTERMINAL",arguments.length,1,1),Sk.token.ISTERMINAL(Sk.ffi.remapToJs(n))})),e.ISNONTERMINAL=new Sk.builtin.func((function(n){return Sk.builtin.pyCheckArgsLen("ISNONTERMINAL",arguments.length,1,1),Sk.token.ISNONTERMINAL(Sk.ffi.remapToJs(n))})),e.ISEOF=new Sk.builtin.func((function(n){return Sk.builtin.pyCheckArgsLen("ISEOF",arguments.length,1,1),Sk.token.ISEOF(Sk.ffi.remapToJs(n))})),e};',"src/lib/tokenize.js":'var $builtinmodule=function(e){var i={};return i.tokenize=new Sk.builtin.func((function(e){Sk.builtin.pyCheckArgsLen("tokenize",1,1),Sk.builtin.checkFunction(e);const i=[];return Sk._tokenize("",(function jsReadline(){const i=Sk.misceval.callsimArray(e);return Sk.ffi.remapToJs(i)}),"UTF-8",(function receiveToken(e){i.push(new Sk.builtin.tuple([Sk.ffi.remapToPy(e.type),Sk.ffi.remapToPy(e.string),new Sk.builtin.tuple([Sk.ffi.remapToPy(e.start[0]),Sk.ffi.remapToPy(e.start[1])]),new Sk.builtin.tuple([Sk.ffi.remapToPy(e.end[0]),Sk.ffi.remapToPy(e.end[1])]),Sk.ffi.remapToPy(e.line)]))})),new Sk.builtin.list(i)})),i};',"src/lib/turtle.js":`var $builtinmodule=function(e){"use strict";var t=function getConfiguredTarget(){var e,t;for(t="string"==typeof(e=Sk.TurtleGraphics&&Sk.TurtleGraphics.target||"turtle")?document.getElementById(e):e;t.firstChild;)t.removeChild(t.firstChild);return t}();return t.turtleInstance?t.turtleInstance.reset():t.turtleInstance=function generateTurtleModule(e){var t,n,r,i,s,a,o,l,u={__name__:new Sk.builtin.str("turtle")},c=!0,h=1e3/30,d={},f={},_={target:"turtle",width:400,height:400,worldWidth:0,worldHeight:0,animate:!0,bufferSize:0,allowUndo:!0,assets:{}};function getAsset(e){var t=i.assets,n="function"==typeof t?t(e):t[e];return"string"==typeof n?new Promise((function(t,r){var s=new Image;s.onload=function(){i.assets[e]=this,t(s)},s.onerror=function(){r(new Error("Missing asset: "+n))},s.src=n})):new InstantPromise(void 0,n)}function InstantPromise(e,t){this.lastResult=t,this.lastError=e}function FrameManager(){this.reset()}function getFrameManager(){return o||(o=new FrameManager),o}function MouseHandler(){var e=this;for(var t in this._target=getTarget(),this._managers={},this._handlers={mousedown:function(t){e.onEvent("mousedown",t)},mouseup:function(t){e.onEvent("mouseup",t)},mousemove:function(t){e.onEvent("mousemove",t)}},this._handlers)this._target.addEventListener(t,this._handlers[t])}function EventManager(e,t){this._type=e,this._target=t,this._handlers=void 0,function getMouseHandler(){return a||(a=new MouseHandler),a}().addManager(e,this)}function Turtle(e){if(getFrameManager().addTurtle(this),this._screen=getScreen(),this._managers={},this._shape=e.v,!d.hasOwnProperty(this._shape))throw new Sk.builtin.ValueError("Shape:'"+this._shape+"' not in default shape, please check shape again!");this.reset()}function Screen(){var e,t;this._frames=1,this._delay=void 0,this._bgcolor="none",this._mode="standard",this._managers={},this._keyLogger={},e=(i.worldWidth||i.width||getWidth())/2,t=(i.worldHeight||i.height||getHeight())/2,this.setUpWorld(-e,-t,e,t)}function ensureAnonymous(){return s||(s=Sk.misceval.callsimArray(u.Turtle)),s.instance}function getTarget(){return e}function getScreen(){return r||(r=new Screen),r}function getWidth(){return 0|(r&&r._width||i.width||getTarget().clientWidth||_.width)}function getHeight(){return 0|(r&&r._height||i.height||getTarget().clientHeight||_.height)}function createLayer(e,t){var n,r=document.createElement("canvas"),i=getWidth(),s=getHeight(),a=getTarget().firstChild?-s+"px":"0";return r.width=i,r.height=s,r.style.position="relative",r.style.display="block",r.style.setProperty("margin-top",a),r.style.setProperty("z-index",e),t&&(r.style.display="none"),getTarget().appendChild(r),(n=r.getContext("2d")).lineCap="round",n.lineJoin="round",applyWorld(getScreen(),n),n}function cancelAnimationFrame(){t&&((window.cancelAnimationFrame||window.mozCancelAnimationFrame)(t),t=void 0),n&&(window.clearTimeout(n),n=void 0)}function applyWorld(e,t){var n=e.llx,r=(e.lly,e.urx,e.ury),i=e.xScale,s=e.yScale;t&&(clearLayer(t),t.restore(),t.save(),t.scale(1/i,1/s),t.translate(-n,-r))}function pushUndo(e){var t,n,r;if(i.allowUndo&&e._bufferSize){for(e._undoBuffer||(e._undoBuffer=[]);e._undoBuffer.length>e._bufferSize;)e._undoBuffer.shift();for(n={},t="x y angle radians color fill down filling shown shape size".split(" "),r=0;r=0;)this._turtles[e].reset();this._turtles=[],this._frames=[],this._frameCount=0,this._buffer=1,this._rate=0,this._animationFrame=animationFrame()},e.addFrame=function(e,t){return t&&(this._frameCount+=1),this.frames().push(e),!i.animate||this._buffer&&this._frameCount===this.frameBuffer()?this.update():new InstantPromise},e.frames=function(){return this._frames},e.frameBuffer=function(e){return"number"==typeof e&&(this._buffer=0|e,e&&e<=this._frameCount)?this.update():this._buffer},e.refreshInterval=function(e){return"number"==typeof e&&(this._rate=0|e,this._animationFrame=animationFrame(e)),this._rate},e.update=function(){return this._frames&&this._frames.length?this.requestAnimationFrame():new InstantPromise},e.requestAnimationFrame=function(){var e,t,n=this._frames,r=this._animationFrame,i=this._turtles,s=getScreen().spriteLayer();return this._frames=[],this._frameCount=0,new Promise((function(a){r((function paint(){for(t=0;t=0;)l[a].test(n,r,i,s)&&l[a].canMove("mousedown"===e);if(o&&o.length)for(computeCoordinates(),a=o.length;--a>=0;)("mousemove"===e&&o[a].canMove()&&o[a].test(n,r,i,s)||"mousedown"===e&&o[a].test(n,r,i,s))&&o[a].trigger([i,s])},l.reset=function(){this._managers={}},l.addManager=function(e,t){this._managers[e]||(this._managers[e]=[]),this._managers[e].push(t)},function(e){e.reset=function(){this._handlers=void 0},e.canMove=function(e){return!(!this._target||!this._target.hitTest)&&(void 0!==e&&(this._target.hitTest.hit=e),this._target.hitTest.hit)},e.test=function(e,t,n,r){return this._target&&this._target.hitTest?this._target.hitTest(e,t,n,r):!!this._target},e.trigger=function(e){var t,n=this._handlers;if(n&&n.length)for(t=0;t.5&&e<10.5?Sk.builtin.asnum$(Sk.builtin.round(Sk.builtin.assk$(e))):0,this._speed=e,this._computed_speed=2*e,this.addUpdate(void 0,!1,{speed:this._computed_speed})},e.$speed.minArgs=0,e.$speed.co_varnames=["speed"],e.$pencolor=function(e,t,n,r){return void 0!==e?(this._color=createColor(this._colorMode,e,t,n,r),this.addUpdate(void 0,this._shown,{color:this._color})):hexToRGB(this._color)},e.$pencolor.co_varnames=["r","g","b","a"],e.$pencolor.minArgs=0,e.$pencolor.returnType=f.COLOR,e.$fillcolor=function(e,t,n,r){return void 0!==e?(this._fill=createColor(this._colorMode,e,t,n,r),this.addUpdate(void 0,this._shown,{fill:this._fill})):hexToRGB(this._fill)},e.$fillcolor.co_varnames=["r","g","b","a"],e.$fillcolor.minArgs=0,e.$fillcolor.returnType=f.COLOR,e.$color=function(e,t,n,r){return void 0!==e?(void 0===t||void 0!==n?(this._color=createColor(this._colorMode,e,t,n,r),this._fill=this._color):(this._color=createColor(this._colorMode,e),this._fill=createColor(this._colorMode,t)),this.addUpdate(void 0,this._shown,{color:this._color,fill:this._fill})):[this.$pencolor(),this.$fillcolor()]},e.$color.minArgs=0,e.$color.co_varnames=["color","fill","b","a"],e.$color.returnType=function(e){return new Sk.builtin.tuple([f.COLOR(e[0]),f.COLOR(e[1])])},e.$fill=function(e){if(void 0!==e){if((e=!!e)===this._filling)return;return this._filling=e,e?(pushUndo(this),this.addUpdate(void 0,!1,{filling:!0,fillBuffer:[{x:this._x,y:this._y}]})):(pushUndo(this),this.addUpdate((function(){this.fillBuffer.push(this),drawFill.call(this)}),!0,{filling:!1,fillBuffer:void 0}))}return this._filling},e.$fill.co_varnames=["flag"],e.$fill.minArgs=0,e.$begin_fill=function(){return this.$fill(!0)},e.$end_fill=function(){return this.$fill(!1)},e.$stamp=function(){return pushUndo(this),this.addUpdate((function(){drawTurtle(this,this.context())}),!0)},e.$dot=function(e,t,n,r,i){return pushUndo(this),e="number"==typeof(e=Sk.builtin.asnum$(e))?Math.max(1,0|Math.abs(e)):Math.max(this._size+4,2*this._size),t=void 0!==t?createColor(this._colorMode,t,n,r,i):this._color,this.addUpdate(drawDot,!0,void 0,e,t)},e.$dot.co_varnames=["size","color","g","b","a"],e.$write=function(e,t,n,r){var i,s,a,o,l,u=this;return pushUndo(this),e=String(e),r&&r.constructor===Array&&(s="string"==typeof r[0]?r[0]:"Arial",a=String(r[1]||"12pt"),o="string"==typeof r[2]?r[2]:"normal",/^\\d+$/.test(a)&&(a+="pt"),r=[o,a,s].join(" ")),n||(n="left"),i=this.addUpdate(drawText,!0,void 0,e,n,r),!t||"left"!==n&&"center"!==n||(l=function measureText(e,t){return t&&(p.font=t),p.measureText(e).width}(e,r),"center"===n&&(l/=2),i=i.then((function(){var e=u.getState();return u.translate(e.x,e.y,l,0,!0)}))),i},e.$write.co_varnames=["message","move","align","font"],e.$write.minArgs=1,e.$pensize=e.$width=function(e){return void 0!==e?(this._size=e,this.addUpdate(void 0,this._shown,{size:e})):this._size},e.$pensize.minArgs=e.$width.minArgs=0,e.$pensize.co_varnames=e.$width.co_varnames=["width"],e.$showturtle=e.$st=function(){return this._shown=!0,this.addUpdate(void 0,!0,{shown:!0})},e.$hideturtle=e.$ht=function(){return this._shown=!1,this.addUpdate(void 0,!0,{shown:!1})},e.$isvisible=function(){return this._shown},e.$shape=function(e){return e&&d[e]?(this._shape=e,this.addUpdate(void 0,this._shown,{shape:e})):this._shape},e.$shape.minArgs=0,e.$shape.co_varnames=["name"],e.$window_width=function(){return this._screen.$window_width()},e.$window_height=function(){return this._screen.$window_height()},e.$tracer=function(e,t){return this._screen.$tracer(e,t)},e.$tracer.minArgs=0,e.$tracer.co_varnames=["n","delay"],e.$update=function(){return this._screen.$update()},e.$delay=function(e){return this._screen.$delay(e)},e.$delay.minArgs=0,e.$delay.co_varnames=["delay"],e.$reset=function(){return this.reset(),this.$clear()},e.$mainloop=e.$done=function(){return this._screen.$mainloop()},e.$clear=function(){return this.addUpdate((function(){clearLayer(this.context())}),!0)},e.$dot.minArgs=0,e.$onclick=function(e,t,n){this.getManager("mousedown").addHandler(e,n)},e.$onclick.minArgs=1,e.$onclick.co_varnames=["method","btn","add"],e.$onrelease=function(e,t,n){this.getManager("mouseup").addHandler(e,n)},e.$onrelease.minArgs=1,e.$onrelease.co_varnames=["method","btn","add"],e.$ondrag=function(e,t,n){this.getManager("mousemove").addHandler(e,n)},e.$ondrag.minArgs=1,e.$ondrag.co_varnames=["method","btn","add"],e.$getscreen=function(){return Sk.misceval.callsimArray(u.Screen)},e.$getscreen.isSk=!0,e.$clone=function(){var e=Sk.misceval.callsimOrSuspendArray(u.Turtle);return e.instance._x=this._x,e.instance._y=this._y,e.instance._angle=this._angle,e.instance._radians=this._radians,e.instance._shape=this._shape,e.instance._color=this._color,e.instance._fill=this._fill,e.instance._filling=this._filling,e.instance._size=this._size,e.instance._computed_speed=this._computed_speed,e.instance._down=this._down,e.instance._shown=this._shown,e.instance._colorMode=this._colorMode,e.instance._isRadians=this._isRadians,e.instance._fullCircle=this._fullCircle,e.instance._bufferSize=this._bufferSize,e.instance._undoBuffer=this._undoBuffer,e._clonedFrom=this,e},e.$clone.returnType=function(e){return e},e.$getturtle=e.$getpen=function(){return this.skInstance},e.$getturtle.isSk=!0}(Turtle.prototype),function(e){e.spriteLayer=function(){return this._sprites||(this._sprites=createLayer(3))},e.bgLayer=function(){return this._background||(this._background=createLayer(1))},e.hitTestLayer=function(){return this._hitTest||(this._hitTest=createLayer(0,!0))},e.getManager=function(e){return this._managers[e]||(this._managers[e]=new EventManager(e,this)),this._managers[e]},e.reset=function(){var e;for(e in this._keyListeners=void 0,this._keyLogger)window.clearInterval(this._keyLogger[e]),window.clearTimeout(this._keyLogger[e]),delete this._keyLogger[e];for(e in this._keyDownListener&&(getTarget().removeEventListener("keydown",this._keyDownListener),this._keyDownListener=void 0),this._keyUpListener&&(getTarget().removeEventListener("keyup",this._keyUpListener),this._keyUpListener=void 0),this._timer&&(window.clearTimeout(this._timer),this._timer=void 0),this._managers)this._managers[e].reset();this._mode="standard",removeLayer(this._sprites),this._sprites=void 0,removeLayer(this._background),this._background=void 0},e.setUpWorld=function(e,t,n,r){var i=this;i.llx=e,i.lly=t,i.urx=n,i.ury=r,i.xScale=(n-e)/getWidth(),i.yScale=-1*(r-t)/getHeight(),i.lineScale=Math.min(Math.abs(i.xScale),Math.abs(i.yScale))},e.$setup=function(e,t,n,r){return isNaN(parseFloat(e))&&(e=getWidth()),isNaN(parseFloat(t))&&(t=getHeight()),e<=1&&(e=getWidth()*e),t<=1&&(t=getHeight()*t),this._width=e,this._height=t,this._xOffset=void 0===n||isNaN(parseInt(n))?0:parseInt(n),this._yOffset=void 0===r||isNaN(parseInt(r))?0:parseInt(r),"world"===this._mode?this._setworldcoordinates(this.llx,this.lly,this.urx,this.ury):this._setworldcoordinates(-e/2,-t/2,e/2,t/2)},e.$setup.minArgs=0,e.$setup.co_varnames=["width","height","startx","starty"],e.$register_shape=e.$addshape=function(e,t){if(!t)return getAsset(e).then((function(t){d[e]=t}));d[e]=t},e.$register_shape.minArgs=1,e.$register_shape.co_varnames=["name","shape"],e.$getshapes=function(){return Object.keys(d)},e.$tracer=function(e,t){return void 0!==e||void 0!==t?("number"==typeof t&&(this._delay=t,getFrameManager().refreshInterval(t)),"number"==typeof e?(this._frames=e,getFrameManager().frameBuffer(e)):void 0):this._frames},e.$tracer.co_varnames=["frames","delay"],e.$tracer.minArgs=0,e.$delay=function(e){return void 0!==e?this.$tracer(void 0,e):void 0===this._delay?h:this._delay},e.$delay.co_varnames=["delay"],e._setworldcoordinates=function(e,t,n,r){return getFrameManager().turtles(),this.setUpWorld(e,t,n,r),this._sprites&&applyWorld(this,this._sprites),this._background&&applyWorld(this,this._background),this.$clear()},e.$setworldcoordinates=function(e,t,n,r){return this._mode="world",this._setworldcoordinates(e,t,n,r)},e.$setworldcoordinates.co_varnames=["llx","lly","urx","ury"],e.minArgs=4,e.$clear=e.$clearscreen=function(){return this.reset(),this.$reset()},e.$update=function(){return getFrameManager().update()},e.$reset=e.$resetscreen=function(){var e=this,t=getFrameManager().turtles();return getFrameManager().addFrame((function(){applyWorld(e,e._sprites),applyWorld(e,e._background);for(var n=0;n1&&t[s]&&t[s].test(r),r===a||i){e._keyListeners[r](),e._createKeyRepeater(r,s),n.preventDefault();break}}},getTarget().addEventListener("keydown",this._keyDownListener))},e._createKeyUpListener=function(){var e=this;this._keyUpListener||(this._keyUpListener=function(t){var n=e._keyLogger[t.charCode||t.keyCode];void 0!==n&&(t.preventDefault(),window.clearInterval(n),window.clearTimeout(n),delete e._keyLogger[t.charCode||t.keyCode])},getTarget().addEventListener("keyup",this._keyUpListener))},e.$title=function(e){document.title=e},e.$title.minArgs=1,e.$title.co_varnames=["title"],e.$listen=function(){this._createKeyUpListener(),this._createKeyDownListener()},e.$onkey=function(e,t){if("function"==typeof t){var n=e;e=t,t=n}t=String(t).toLowerCase(),e&&"function"==typeof e?(this._keyListeners||(this._keyListeners={}),this._keyListeners[t]=e):delete this._keyListeners[t]},e.$onkey.minArgs=2,e.$onkey.co_varnames=["method","keyValue"],e.$onscreenclick=function(e,t,n){this.getManager("mousedown").addHandler(e,n)},e.$onscreenclick.minArgs=1,e.$onscreenclick.co_varnames=["method","btn","add"],e.$ontimer=function(e,t){this._timer&&(window.clearTimeout(this._timer),this._timer=void 0),e&&"number"==typeof t&&(this._timer=window.setTimeout(e,Math.max(0,0|t)))},e.$ontimer.minArgs=0,e.$ontimer.co_varnames=["method","interval"]}(Screen.prototype);var g=new Image;function removeLayer(e){e&&e.canvas&&e.canvas.parentNode&&e.canvas.parentNode.removeChild(e.canvas)}function clearLayer(e,t,n){e&&(e.save(),e.setTransform(1,0,0,1,0,0),t?(e.fillStyle=t,e.fillRect(0,0,e.canvas.width,e.canvas.height)):e.clearRect(0,0,e.canvas.width,e.canvas.height),n&&e.drawImage(n,0,0),e.restore())}function drawTurtle(e,t){var n,r,i,s=d[e.shape],a=getScreen(),o=(getWidth(),getHeight(),a.xScale),l=a.yScale;if(t){if(n=Math.cos(e.radians)/o,r=Math.sin(e.radians)/l,i=Math.atan2(r,n)-Math.PI/2,t.save(),t.translate(e.x,e.y),t.scale(o,l),s.nodeName){var u=s.naturalWidth,c=s.naturalHeight;t.drawImage(s,0,0,u,c,-u/2,-c/2,u,c)}else{t.rotate(i),t.beginPath(),t.lineWidth=1,t.strokeStyle=e.color,t.fillStyle=e.fill,t.moveTo(-s[0][0],s[0][1]);for(var h=1;ho)throw u=l===o?"exactly "+o:"between "+l+" and "+o,new Sk.builtin.TypeError(a+"() takes "+u+" positional argument(s) ("+d.length+" given)");for(e=d.length;--e>=0;)void 0!==d[e]&&(d[e]instanceof Sk.builtin.func?d[e]=pythonToJavascriptFunction(d[e]):d[e]instanceof Sk.builtin.method?d[e]=pythonToJavascriptFunction(d[e].im_func,d[e].im_self):d[e]&&d[e].$d instanceof Sk.builtin.dict&&d[e].instance?d[e]=d[e].instance:d[e]=Sk.ffi.remapToJs(d[e]));var _=d.slice(0);for(d=[],e=_.length;e>=0;--e)null!==_[e]&&(d[e]=_[e]);try{t=f[n].apply(f,d)}catch(g){throw window&&window.console&&(window.console.log("wrapped method failed"),window.console.log(g.stack)),g}return t instanceof InstantPromise&&(t=t.lastResult),t instanceof Promise?(t=t.catch((function(e){throw window&&window.console&&(window.console.log("promise failed"),window.console.log(e.stack)),e})),(i=new Sk.misceval.Suspension).resume=function(){return void 0===s?Sk.builtin.none.none$:Sk.ffi.remapToPy(s)},i.data={type:"Sk.promise",promise:t.then((function(e){return s=e,e}))},i):void 0===t?Sk.builtin.none.none$:h?t:"function"==typeof c?c(t):Sk.ffi.remapToPy(t)},i.co_name=new Sk.builtin.str(a),i.co_varnames=u.slice(),i.$defaults=[];for(var d=l;d")})),e.__iter__=new Sk.builtin.func((function(n){var e=n.lineList;return Sk.builtin.makeGenerator((function(){if(!(this.$index>=this.$lines.length))return new Sk.builtin.str(this.$lines[this.$index++])}),{$obj:n,$index:0,$lines:e})})),e.read=new Sk.builtin.func((function(n,e){if(n.closed)throw new Sk.builtin.ValueError("I/O operation on closed file");var i=n.data$.length;void 0===e&&(e=i);var t=new Sk.builtin.str(n.data$.substr(n.pos$,e));return n.pos$+=e,n.pos$>=i&&(n.pos$=i),t})),e.readline=new Sk.builtin.func((function(n,e){var i="";return n.currentLinee===o)).length)throw new i("one of the hex, bytes, bytes_le, fields, or int arguments must be given");if(u!==o){u=u.toString().replace("urn:","").replace("uuid:","");let e=0,i=u.length-1;for(;"{}".indexOf(u[e])>=0;)e++;for(;"{}".indexOf(u[i])>=0;)i--;if(u=u.slice(e,i+1),u=u.replace(S,""),32!==u.length)throw new s("badly formed hexadecimal UUID string");f=d(n,[new t(u),U])}if(c!==o){if(!(c instanceof e))throw new i("bytes_le should be a bytes instance");if(c=c.valueOf(),16!==c.length)throw new s("bytes_le is not a 16-char string");h=switchBytesBytesLe(c),h=new e(h)}if(h!==o){if(!(h instanceof e))throw new i("bytes_le should be a bytes instance");if(16!==h.valueOf().length)throw new s("bytes is not a 16-char string");f=d(w,[h],["byteorder",v])}if(p!==o)throw new r("fields argument is not yet supported");if(f!==o&&(g(f,_,"Lt")||((e,t)=>g(e,t,"GtE"))(f,y)))throw new s("int is out of range (need a 128-bit value)");this.$int=f,this.$isSafe=I},tp$str(){const e=E.nb$remainder(this.$int).toString();return new t(`${e.slice(0,8)}-${e.slice(8,12)}-${e.slice(12,16)}-${e.slice(16,20)}-${e.slice(20)}`)},$r(){const e=u(this.ob$type,t.$name),n=c(this.tp$str());return new t(`${e}(${n})`)},tp$hash(){return this.$int.tp$hash()},tp$richcompare(e,t){return e instanceof R?this.$int.tp$richcompare(e.$int,t):l},tp$as_number:!0,nb$int(){return this.$int}},getsets:{int:{$get(){return this.$int}},is_safe:{$get(){return this.$isSafe}},bytes:{$get(){return d(b,[this.$int,U,v])}},bytes_le:{$get(){const n=this.tp$getattr(new t("bytes")).valueOf();return new e(switchBytesBytesLe(n))}},fields:{$get:()=>notImplemented()},time_low:{$get:()=>notImplemented()},time_mid:{$get:()=>notImplemented()},time_hi_version:{$get:()=>notImplemented()},clock_seq_hi_variant:{$get:()=>notImplemented()},clock_seq_low:{$get:()=>notImplemented()},time:{$get:()=>notImplemented()},clock_seq:{$get:()=>notImplemented()},node:{$get:()=>notImplemented()},hex:{$get(){return E.nb$remainder(this.$int)}},urn:{$get(){return new t(`urn:uuid:${this}`)}},variant:{$get:()=>notImplemented()},version:{$get:()=>notImplemented()}}});return h("uuid",p,{uuid1:{$meth(){notImplemented()},$flags:{FastCall:!0}},uuid2:{$meth(){notImplemented()},$flags:{FastCall:!0}},uuid3:{$meth(){notImplemented()},$flags:{FastCall:!0}},uuid4:{$meth(){const t=new e(f.getRandomValues(new Uint8Array(16)));return d(R,[],["bytes",t,"version",I])},$flags:{NoArgs:!0}},uuid5:{$meth(){notImplemented()},$flags:{FastCall:!0}}}),p}',"src/lib/webbrowser.js":'var $builtinmodule=function(n){var e={},t="undefined"!=typeof window&&"undefined"!=typeof window.navigator;function open_tab(n){return Sk.builtin.pyCheckType("url","string",Sk.builtin.checkString(n)),t?(n=n.$jsstr(),window.open(n,"_blank"),Sk.builtin.bool.true$):Sk.builtin.bool.false$}return e.__name__=new Sk.builtin.str("webbrowser"),e.open=new Sk.builtin.func((function open(n){return Sk.builtin.pyCheckArgsLen("open",arguments.length+1,1,3),open_tab(n)})),e.open_new=new Sk.builtin.func((function open_new(n){return Sk.builtin.pyCheckArgsLen("open_new",arguments.length,1,1),open_tab(n)})),e.open_new_tab=new Sk.builtin.func((function open_new_tab(n){return Sk.builtin.pyCheckArgsLen("open_new_tab",arguments.length,1,1),open_tab(n)})),e.DefaultBrowser=Sk.misceval.buildClass(e,(function dflbrowser(n,e){e.__init__=new Sk.builtin.func((function __init__(n){return Sk.builtin.none.none$})),e.open=new Sk.builtin.func((function open(n,e){return Sk.builtin.pyCheckArgsLen("open",arguments.length,2,4),open_tab(e)})),e.open_new=new Sk.builtin.func((function open_new(n,e){return Sk.builtin.pyCheckArgsLen("open_new",arguments.length,2,2),open_tab(e)})),e.open_new_tab=new Sk.builtin.func((function open_new_tab(n,e){return Sk.builtin.pyCheckArgsLen("open_new_tab",arguments.length,2,2),open_tab(e)}))}),"DefaultBrowser",[]),e.get=new Sk.builtin.func((function get(){return Sk.builtin.pyCheckArgsLen("get",arguments.length,0,1),Sk.misceval.callsimArray(e.DefaultBrowser,[])})),e};',"src/lib/webgl/__init__.js":`var $builtinmodule=function(n){var t={__name__:new Sk.builtin.str("webgl")},makeFailHTML=function(n){return'
'+n+"
"},e='This page requires a browser that supports WebGL.
Click here to upgrade your browser.';return t.Context=Sk.misceval.buildClass(t,(function(n,t){t.__init__=new Sk.builtin.func((function(n,t){var i=document.getElementById(t.v),r=function(n,t){var i=document.getElementById(n);if(t||(t=i.getElementsByTagName("canvas")[0]),t){var r=function(n){for(var t=["webgl","experimental-webgl","webkit-3d","moz-webgl"],e=null,i=0;i7||7==a.Chrome[0]&&a.Chrome[1]>0||7==a.Chrome[0]&&0==a.Chrome[1]&&a.Chrome[2]>=521)?i.innerHTML=makeFailHTML('It doesn\\'t appear your computer can support WebGL.
Click here for more information.'):i.innerHTML=makeFailHTML(e)}return r}i.innerHTML=makeFailHTML(e)}(t.v,i);if(!r)throw new Error("Your browser does not appear to support WebGL.");for(var u in n.gl=r,r.__proto__)if("number"==typeof r.__proto__[u])Sk.abstr.objectSetItem(n.$d,new Sk.builtin.str(u),r.__proto__[u]);else if("function"==typeof r.__proto__[u])switch(u){case"bufferData":case"clearColor":case"drawArrays":case"getAttribLocation":case"getUniformLocation":case"shaderSource":case"uniformMatrix4fv":case"vertexAttribPointer":case"viewport":break;default:!function(t){Sk.abstr.objectSetItem(n.$d,new Sk.builtin.str(u),new Sk.builtin.func((function(){var n=r.__proto__[t];return n.apply(r,arguments)})))}(u)}r.clearColor(100/255,149/255,237/255,1),r.clear(r.COLOR_BUFFER_BIT)})),t.tp$getattr=Sk.generic.getAttr,t.bufferData=new Sk.builtin.func((function(n,t,e,i){n.gl.bufferData(t,e.v,i)})),t.clearColor=new Sk.builtin.func((function(n,t,e,i,r){n.gl.clearColor(Sk.builtin.asnum$(t),Sk.builtin.asnum$(e),Sk.builtin.asnum$(i),Sk.builtin.asnum$(r))})),t.getAttribLocation=new Sk.builtin.func((function(n,t,e){return n.gl.getAttribLocation(t,e.v)})),t.getUniformLocation=new Sk.builtin.func((function(n,t,e){return n.gl.getUniformLocation(t,e.v)})),t.shaderSource=new Sk.builtin.func((function(n,t,e){n.gl.shaderSource(t,e.v)})),t.drawArrays=new Sk.builtin.func((function(n,t,e,i){n.gl.drawArrays(Sk.builtin.asnum$(t),Sk.builtin.asnum$(e),Sk.builtin.asnum$(i))})),t.vertexAttribPointer=new Sk.builtin.func((function(n,t,e,i,r,u,a){n.gl.vertexAttribPointer(t,Sk.builtin.asnum$(e),Sk.builtin.asnum$(i),r,Sk.builtin.asnum$(u),Sk.builtin.asnum$(a))})),t.viewport=new Sk.builtin.func((function(n,t,e,i,r){n.gl.viewport(Sk.builtin.asnum$(t),Sk.builtin.asnum$(e),Sk.builtin.asnum$(i),Sk.builtin.asnum$(r))})),t.uniformMatrix4fv=new Sk.builtin.func((function(n,t,e,i){n.gl.uniformMatrix4fv(Sk.builtin.asnum$(t),e,i.v)})),t.setDrawFunc=new Sk.builtin.func((function(n,t){var e=(new Date).getTime();setInterval((function(){Sk.misceval.callsimArray(t,[n,(new Date).getTime()-e])}),1e3/60)}))}),"Context",[]),t.Float32Array=Sk.misceval.buildClass(t,(function(n,t){t.__init__=new Sk.builtin.func((function(n,t){n.v="number"==typeof t?new Float32Array(t):new Float32Array(Sk.ffi.remapToJs(t))})),t.__repr__=new Sk.builtin.func((function(n){for(var t=[],e=0;e0&&(i=(l/=v)*l,a=(s/=v)*s,c=(m/=v)*m,u=l*s,r=s*m,f=m*l,o=l*_,k=s*_,S=m*_,y=1-w,(b=Sk.misceval.callsimArray(n.Mat44)).elements[0]=y*i+w,b.elements[1]=y*u-S,b.elements[2]=y*f+k,b.elements[3]=0,b.elements[4]=y*u+S,b.elements[5]=y*a+w,b.elements[6]=y*r-o,b.elements[7]=0,b.elements[8]=y*f-k,b.elements[9]=y*r+o,b.elements[10]=y*c+w,b.elements[11]=0,b.elements[12]=0,b.elements[13]=0,b.elements[14]=0,b.elements[15]=1,b=b.multiply(e),e.elements=b.elements);return e})),t.multiply=new Sk.builtin.func((function(e,t){for(var l=Sk.misceval.callsimArray(n.Mat44),s=0;s<4;s++)l.elements[4*s+0]=e.elements[4*s+0]*t.elements[0]+e.elements[4*s+1]*t.elements[4]+e.elements[4*s+2]*t.elements[8]+e.elements[4*s+3]*t.elements[12],l.elements[4*s+1]=e.elements[4*s+0]*t.elements[1]+e.elements[4*s+1]*t.elements[5]+e.elements[4*s+2]*t.elements[9]+e.elements[4*s+3]*t.elements[13],l.elements[4*s+2]=e.elements[4*s+0]*t.elements[2]+e.elements[4*s+1]*t.elements[6]+e.elements[4*s+2]*t.elements[10]+e.elements[4*s+3]*t.elements[14],l.elements[4*s+3]=e.elements[4*s+0]*t.elements[3]+e.elements[4*s+1]*t.elements[7]+e.elements[4*s+2]*t.elements[11]+e.elements[4*s+3]*t.elements[15];return e.elements=l.elements,e})),t.lookAt=new Sk.builtin.func((function(e,t,l,s,m,i,a,c,u,r){var f=[t-m,l-i,s-a],o=Math.sqrt(f[0]*f[0]+f[1]*f[1]+f[2]*f[2]);o&&(f[0]/=o,f[1]/=o,f[2]/=o);var k=[c,u,r],S=[];S[0]=k[1]*f[2]-k[2]*f[1],S[1]=-k[0]*f[2]+k[2]*f[0],S[2]=k[0]*f[1]-k[1]*f[0],k[0]=f[1]*S[2]-f[2]*S[1],k[1]=-f[0]*S[2]+f[2]*S[0],k[2]=f[0]*S[1]-f[1]*S[0],(o=Math.sqrt(S[0]*S[0]+S[1]*S[1]+S[2]*S[2]))&&(S[0]/=o,S[1]/=o,S[2]/=o),(o=Math.sqrt(k[0]*k[0]+k[1]*k[1]+k[2]*k[2]))&&(k[0]/=o,k[1]/=o,k[2]/=o);var y=Sk.misceval.callsimArray(n.Mat44);return y.elements[0]=S[0],y.elements[4]=S[1],y.elements[8]=S[2],y.elements[12]=0,y.elements[1]=k[0],y.elements[5]=k[1],y.elements[9]=k[2],y.elements[13]=0,y.elements[2]=f[0],y.elements[6]=f[1],y.elements[10]=f[2],y.elements[14]=0,y.elements[3]=0,y.elements[7]=0,y.elements[11]=0,y.elements[15]=1,y=y.multiply(e),e.elements=y.elements,e.translate(-t,-l,-s),e}))}),"Mat44",[]),n.Mat33=Sk.misceval.buildClass(n,(function(e,n){n.__init__=new Sk.builtin.func((function(e){Sk.misceval.callsimArray(n.loadIdentity,[e])})),n.loadIdentity=new Sk.builtin.func((function(e){e.elements=[1,0,0,0,1,0,0,0,1]}))}),"Mat33",[]),n.Vec3=Sk.misceval.buildClass(n,(function(e,t){t.__init__=new Sk.builtin.func((function(e,n,t,l){e.x=n,e.y=t,e.z=l})),t.__sub__=new Sk.builtin.func((function(e,t){return Sk.misceval.callsimArray(n.Vec3,[e.x-t.x,e.y-t.y,e.z-t.z])}))}),"Vec3",[]),n.cross=new Sk.builtin.func((function(e,t){return Sk.asserts.assert(e instanceof n.Vec3&&t instanceof n.Vec3),Sk.misceval.callsimArray(n.Vec3,[e.y*t.z-e.z*t.y,e.z*t.x-e.x*t.z,e.x*t.y-e.y*t.x])})),n};',"src/lib/webgl/matrix4.js":"var $builtinmodule=function(n){var r={},t=new Float32Array(3),a=new Float32Array(3),u=new Float32Array(3),e=(new Float32Array(4),new Float32Array(4),new Float32Array(4),new Float32Array(16),new Float32Array(16),new Float32Array(16),function(n,r){for(var t=0,a=r.length,u=0;u1e-5)for(u=0;u{const n=e.$d;var r={},Buffer=function(t,e){var r=e||n.ARRAY_BUFFER,i=n.createBuffer();if(this.target=r,this.buf=i,this.set(t),this.numComponents_=t.numComponents,this.numElements_=t.numElements,this.totalComponents_=this.numComponents_*this.numElements_,t.buffer instanceof Float32Array)this.type_=n.FLOAT;else if(t.buffer instanceof Uint8Array)this.type_=n.UNSIGNED_BYTE;else if(t.buffer instanceof Int8Array)this.type_=n._BYTE;else if(t.buffer instanceof Uint16Array)this.type_=n.UNSIGNED_SHORT;else{if(!(t.buffer instanceof Int16Array))throw"unhandled type:"+typeof t.buffer;this.type_=n.SHORT}};return Buffer.prototype.set=function(t){n.bindBuffer(this.target,this.buf),n.bufferData(this.target,t.buffer,n.STATIC_DRAW)},Buffer.prototype.type=function(){return this.type_},Buffer.prototype.numComponents=function(){return this.numComponents_},Buffer.prototype.numElements=function(){return this.numElements_},Buffer.prototype.totalComponents=function(){return this.totalComponents_},Buffer.prototype.buffer=function(){return this.buf},Buffer.prototype.stride=function(){return 0},Buffer.prototype.offset=function(){return 0},r.Model=Sk.misceval.buildClass(r,(function(e,r){r.__init__=new Sk.builtin.func((function(e,r,i,f){e.buffers={};var setBuffer=function(t,r){var i="indices"==t?n.ELEMENT_ARRAY_BUFFER:n.ARRAY_BUFFER;let f=e.buffers[t];f?f.set(r):f=new Buffer(r,i),e.buffers[t]=f};for(t in i)setBuffer(t,i[t]);var o={},s=0;for(var u in f)o[u]=s++;e.mode=n.TRIANGLES,e.textures=f.v,e.textureUnits=o,e.shader=r})),r.drawPrep=new Sk.builtin.func((function(t,e){var r=t.shader,i=t.buffers,f=t.textures;for(var o in e=Sk.ffi.remapToJs(e),Sk.misceval.callsimArray(r.use,[r]),i){var s=i[o];if("indices"==o)n.bindBuffer(n.ELEMENT_ARRAY_BUFFER,s.buffer());else{var u=r.attrib[o];u&&u(s)}}for(var a in f){var m=t.textureUnits[a];r.setUniform$impl(r,f,m),f[a].bindToUnit(m)}for(var p in e)r.setUniform$impl(r,p,e[p])})),r.draw=new Sk.builtin.func((function(t,e,r){var i=t.shader;e=Sk.ffi.remapToJs(e);for(let n in e)i.setUniform$impl(i,n,e[n]);if(r)for(var f in r){var o=t.textureUnits[f];i.setUniform$impl(i,f,o),r[f].bindToUnit(o)}var s=t.buffers;n.drawElements(t.mode,s.indices.totalComponents(),n.UNSIGNED_SHORT,0)}))}),"Model",[]),r}))};',"src/lib/webgl/primitives.js":'var $builtinmodule=function(t){var n={},AttribBuffer=function(t,n,e){e=e||"Float32Array";var r=window[e];n.length?(this.buffer=new r(n),n=this.buffer.length/t,this.cursor=n):(this.buffer=new r(t*n),this.cursor=0),this.numComponents=t,this.numElements=n,this.type=e};return AttribBuffer.prototype.stride=function(){return 0},AttribBuffer.prototype.offset=function(){return 0},AttribBuffer.prototype.getElement=function(t){for(var n=t*this.numComponents,e=[],r=0;r"u")return null;if("currentScript"in document)return document.currentScript;try{throw new Error}catch(u){var c=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(u.stack)||[])[1];if(c){var o=document.getElementsByTagName("script");for(var d in o)if(o[d].src==c)return o[d]}return null}},isActive:function(c,o,d){for(var u="no-"+o;c;){var f=c.classList;if(f.contains(o))return!0;if(f.contains(u))return!1;c=c.parentElement}return!!d}},languages:{plain:b,plaintext:b,text:b,txt:b,extend:function(c,o){var d=e.util.clone(e.languages[c]);for(var u in o)d[u]=o[u];return d},insertBefore:function(c,o,d,u){var f=(u=u||e.languages)[c],$={};for(var m in f)if(f.hasOwnProperty(m)){if(m==o)for(var _ in d)d.hasOwnProperty(_)&&($[_]=d[_]);d.hasOwnProperty(m)||($[m]=f[m])}var v=u[c];return u[c]=$,e.languages.DFS(e.languages,function(A,N){N===v&&A!=c&&(this[A]=$)}),$},DFS:function c(o,d,u,f){f=f||{};var $=e.util.objId;for(var m in o)if(o.hasOwnProperty(m)){d.call(o,m,o[m],u||m);var _=o[m],v=e.util.type(_);v!=="Object"||f[$(_)]?v!=="Array"||f[$(_)]||(f[$(_)]=!0,c(_,d,m,f)):(f[$(_)]=!0,c(_,d,null,f))}}},plugins:{},highlightAll:function(c,o){e.highlightAllUnder(document,c,o)},highlightAllUnder:function(c,o,d){var u={callback:d,container:c,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};e.hooks.run("before-highlightall",u),u.elements=Array.prototype.slice.apply(u.container.querySelectorAll(u.selector)),e.hooks.run("before-all-elements-highlight",u);for(var f,$=0;f=u.elements[$++];)e.highlightElement(f,o===!0,u.callback)},highlightElement:function(c,o,d){var u=e.util.getLanguage(c),f=e.languages[u];e.util.setLanguage(c,u);var $=c.parentElement;$&&$.nodeName.toLowerCase()==="pre"&&e.util.setLanguage($,u);var m={element:c,language:u,grammar:f,code:c.textContent};function _(A){m.highlightedCode=A,e.hooks.run("before-insert",m),m.element.innerHTML=m.highlightedCode,e.hooks.run("after-highlight",m),e.hooks.run("complete",m),d&&d.call(m.element)}if(e.hooks.run("before-sanity-check",m),($=m.element.parentElement)&&$.nodeName.toLowerCase()==="pre"&&!$.hasAttribute("tabindex")&&$.setAttribute("tabindex","0"),!m.code)return e.hooks.run("complete",m),void(d&&d.call(m.element));if(e.hooks.run("before-highlight",m),m.grammar)if(o&&k.Worker){var v=new Worker(e.filename);v.onmessage=function(A){_(A.data)},v.postMessage(JSON.stringify({language:m.language,code:m.code,immediateClose:!0}))}else _(e.highlight(m.code,m.grammar,m.language));else _(e.util.encode(m.code))},highlight:function(c,o,d){var u={code:c,grammar:o,language:d};if(e.hooks.run("before-tokenize",u),!u.grammar)throw new Error('The language "'+u.language+'" has no grammar.');return u.tokens=e.tokenize(u.code,u.grammar),e.hooks.run("after-tokenize",u),i.stringify(e.util.encode(u.tokens),u.language)},tokenize:function(c,o){var d=o.rest;if(d){for(var u in d)o[u]=d[u];delete o.rest}var f=new l;return h(f,f.head,c),r(c,f,o,f.head,0),function($){for(var m=[],_=$.head.next;_!==$.tail;)m.push(_.value),_=_.next;return m}(f)},hooks:{all:{},add:function(c,o){var d=e.hooks.all;d[c]=d[c]||[],d[c].push(o)},run:function(c,o){var d=e.hooks.all[c];if(d&&d.length)for(var u,f=0;u=d[f++];)u(o)}},Token:i};function i(c,o,d,u){this.type=c,this.content=o,this.alias=d,this.length=0|(u||"").length}function n(c,o,d,u){c.lastIndex=o;var f=c.exec(d);if(f&&u&&f[1]){var $=f[1].length;f.index+=$,f[0]=f[0].slice($)}return f}function r(c,o,d,u,f,$){for(var m in d)if(d.hasOwnProperty(m)&&d[m]){var _=d[m];_=Array.isArray(_)?_:[_];for(var v=0;v<_.length;++v){if($&&$.cause==m+","+v)return;var A=_[v],N=A.inside,M=!!A.lookbehind,R=!!A.greedy,H=A.alias;if(R&&!A.pattern.global){var ee=A.pattern.toString().match(/[imsuy]*$/)[0];A.pattern=RegExp(A.pattern.source,ee+"g")}for(var J=A.pattern||A,g=u.next,x=f;g!==o.tail&&!($&&x>=$.reach);x+=g.value.length,g=g.next){var C=g.value;if(o.length>c.length)return;if(!(C instanceof i)){var F,P=1;if(R){if(!(F=n(J,x,c,M))||F.index>=c.length)break;var D=F.index,U=F.index+F[0].length,K=x;for(K+=g.value.length;D>=K;)K+=(g=g.next).value.length;if(x=K-=g.value.length,g.value instanceof i)continue;for(var te=g;te!==o.tail&&(K$.reach&&($.reach=ce);var Y=g.prev;if(oe&&(Y=h(o,Y,oe),x+=oe.length),a(o,Y,P),g=h(o,Y,new i(m,N?e.tokenize(Q,N):Q,H,Q)),ie&&h(o,g,ie),P>1){var pe={cause:m+","+v,reach:ce};r(c,o,d,g.prev,x,pe),$&&pe.reach>$.reach&&($.reach=pe.reach)}}}}}}function l(){var c={value:null,prev:null,next:null},o={value:null,prev:c,next:null};c.next=o,this.head=c,this.tail=o,this.length=0}function h(c,o,d){var u=o.next,f={value:d,prev:o,next:u};return o.next=f,u.prev=f,c.length++,f}function a(c,o,d){for(var u=o.next,f=0;f"+f.content+""},!k.document)return k.addEventListener&&(e.disableWorkerMessageHandler||k.addEventListener("message",function(c){var o=JSON.parse(c.data),d=o.language,u=o.code,f=o.immediateClose;k.postMessage(e.highlight(u,e.languages[d],d)),f&&k.close()},!1)),e;var S=e.util.currentScript();function t(){e.manual||e.highlightAll()}if(S&&(e.filename=S.src,S.hasAttribute("data-manual")&&(e.manual=!0)),!e.manual){var s=document.readyState;s==="loading"||s==="interactive"&&S&&S.defer?document.addEventListener("DOMContentLoaded",t):window.requestAnimationFrame?window.requestAnimationFrame(t):window.setTimeout(t,16)}return e}(An);typeof module<"u"&&module.exports&&(module.exports=ne),typeof global<"u"&&(global.Prism=ne);ne.languages.markup={comment:{pattern://,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern://i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},ne.languages.markup.tag.inside["attr-value"].inside.entity=ne.languages.markup.entity,ne.languages.markup.doctype.inside["internal-subset"].inside=ne.languages.markup,ne.hooks.add("wrap",function(k){k.type==="entity"&&(k.attributes.title=k.content.replace(/&/,"&"))}),Object.defineProperty(ne.languages.markup.tag,"addInlined",{value:function(k,w){var p={};p["language-"+w]={pattern:/(^$)/i,lookbehind:!0,inside:ne.languages[w]},p.cdata=/^$/i;var b={"included-cdata":{pattern://i,inside:p}};b["language-"+w]={pattern:/[\s\S]+/,inside:ne.languages[w]};var e={};e[k]={pattern:RegExp("(<__[^>]*>)(?:))*\\]\\]>|(?!)".replace(/__/g,function(){return k}),"i"),lookbehind:!0,greedy:!0,inside:b},ne.languages.insertBefore("markup","cdata",e)}}),Object.defineProperty(ne.languages.markup.tag,"addAttribute",{value:function(k,w){ne.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(`(^|["'\\s])(?:`+k+`)\\s*=\\s*(?:"[^"]*"|'[^']*'|[^\\s'">=]+(?=[\\s>]))`,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[w,"language-"+w],inside:ne.languages[w]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),ne.languages.html=ne.languages.markup,ne.languages.mathml=ne.languages.markup,ne.languages.svg=ne.languages.markup,ne.languages.xml=ne.languages.extend("markup",{}),ne.languages.ssml=ne.languages.xml,ne.languages.atom=ne.languages.xml,ne.languages.rss=ne.languages.xml;(function(k){var w=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;k.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp(`@[\\w-](?:[^;{\\s"']|\\s+(?!\\s)|`+w.source+")*?(?:;|(?=\\s*\\{))"),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+w.source+`|(?:[^\\\\\r +()"']|\\\\[^])*)\\)`,"i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+w.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+w.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:w,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},k.languages.css.atrule.inside.rest=k.languages.css;var p=k.languages.markup;p&&(p.tag.addInlined("style","css"),p.tag.addAttribute("style","css"))})(ne);ne.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/};ne.languages.javascript=ne.languages.extend("clike",{"class-name":[ne.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp("(^|[^\\w$])(?:NaN|Infinity|0[bB][01]+(?:_[01]+)*n?|0[oO][0-7]+(?:_[0-7]+)*n?|0[xX][\\dA-Fa-f]+(?:_[\\dA-Fa-f]+)*n?|\\d+(?:_\\d+)*n|(?:\\d+(?:_\\d+)*(?:\\.(?:\\d+(?:_\\d+)*)?)?|\\.\\d+(?:_\\d+)*)(?:[Ee][+-]?\\d+(?:_\\d+)*)?)(?![\\w$])"),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),ne.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,ne.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(`((?:^|[^$\\w\\xA0-\\uFFFF."'\\])\\s]|\\b(?:return|yield))\\s*)/(?:(?:\\[(?:[^\\]\\\\\r ]|\\\\.)*\\]|\\\\.|[^/\\\\\\[\r ])+/[dgimyus]{0,7}|(?:\\[(?:[^[\\]\\\\\r ]|\\\\.|\\[(?:[^[\\]\\\\\r ]|\\\\.|\\[(?:[^[\\]\\\\\r ]|\\\\.)*\\])*\\])*\\]|\\\\.|[^/\\\\\\[\r ])+/[dgimyus]{0,7}v[dgimyus]{0,7})(?=(?:\\s|/\\*(?:[^*]|\\*(?!/))*\\*/)*(?:$|[\r -,.;:})\\]]|//))`),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:ne.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:ne.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:ne.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:ne.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:ne.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),ne.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:ne.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),ne.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),ne.languages.markup&&(ne.languages.markup.tag.addInlined("script","javascript"),ne.languages.markup.tag.addAttribute("on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)","javascript")),ne.languages.js=ne.languages.javascript,ne.languages.mjs=ne.languages.javascript;ne.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}},ne.languages.webmanifest=ne.languages.json;ne.languages.scmjson={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}},ne.languages.scmjson;ne.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},ne.languages.python["string-interpolation"].inside.interpolation.inside.rest=ne.languages.python,ne.languages.py=ne.languages.python;(function(b){b.languages.scheme={comment:/;.*|#;\s*(?:\((?:[^()]|\([^()]*\))*\)|\[(?:[^\[\]]|\[[^\[\]]*\])*\])|#\|(?:[^#|]|#(?!\|)|\|(?!#)|#\|(?:[^#|]|#(?!\|)|\|(?!#))*\|#)*\|#/,string:{pattern:/"(?:[^"\\]|\\.)*"/,greedy:!0},symbol:{pattern:/'[^()\[\]#'\s]+/,greedy:!0},char:{pattern:/#\\(?:[ux][a-fA-F\d]+\b|[-a-zA-Z]+\b|[\uD800-\uDBFF][\uDC00-\uDFFF]|\S)/,greedy:!0},"lambda-parameter":[{pattern:/((?:^|[^'`#])[(\[]lambda\s+)(?:[^|()\[\]'\s]+|\|(?:[^\\|]|\\.)*\|)/,lookbehind:!0},{pattern:/((?:^|[^'`#])[(\[]lambda\s+[(\[])[^()\[\]']+/,lookbehind:!0}],keyword:{pattern:/((?:^|[^'`#])[(\[])(?:begin|case(?:-lambda)?|cond(?:-expand)?|define(?:-library|-macro|-record-type|-syntax|-values)?|defmacro|delay(?:-force)?|do|else|except|export|guard|if|import|include(?:-ci|-library-declarations)?|lambda|let(?:rec)?(?:-syntax|-values|\*)?|let\*-values|only|parameterize|prefix|(?:quasi-?)?quote|rename|set!|syntax-(?:case|rules)|unless|unquote(?:-splicing)?|when)(?=[()\[\]\s]|$)/,lookbehind:!0},builtin:{pattern:/((?:^|[^'`#])[(\[])(?:abs|and|append|apply|assoc|ass[qv]|binary-port\?|boolean=?\?|bytevector(?:-append|-copy|-copy!|-length|-u8-ref|-u8-set!|\?)?|caar|cadr|call-with-(?:current-continuation|port|values)|call\/cc|car|cdar|cddr|cdr|ceiling|char(?:->integer|-ready\?|\?|<\?|<=\?|=\?|>\?|>=\?)|close-(?:input-port|output-port|port)|complex\?|cons|current-(?:error|input|output)-port|denominator|dynamic-wind|eof-object\??|eq\?|equal\?|eqv\?|error|error-object(?:-irritants|-message|\?)|eval|even\?|exact(?:-integer-sqrt|-integer\?|\?)?|expt|features|file-error\?|floor(?:-quotient|-remainder|\/)?|flush-output-port|for-each|gcd|get-output-(?:bytevector|string)|inexact\??|input-port(?:-open\?|\?)|integer(?:->char|\?)|lcm|length|list(?:->string|->vector|-copy|-ref|-set!|-tail|\?)?|make-(?:bytevector|list|parameter|string|vector)|map|max|member|memq|memv|min|modulo|negative\?|newline|not|null\?|number(?:->string|\?)|numerator|odd\?|open-(?:input|output)-(?:bytevector|string)|or|output-port(?:-open\?|\?)|pair\?|peek-char|peek-u8|port\?|positive\?|procedure\?|quotient|raise|raise-continuable|rational\?|rationalize|read-(?:bytevector|bytevector!|char|error\?|line|string|u8)|real\?|remainder|reverse|round|set-c[ad]r!|square|string(?:->list|->number|->symbol|->utf8|->vector|-append|-copy|-copy!|-fill!|-for-each|-length|-map|-ref|-set!|\?|<\?|<=\?|=\?|>\?|>=\?)?|substring|symbol(?:->string|\?|=\?)|syntax-error|textual-port\?|truncate(?:-quotient|-remainder|\/)?|u8-ready\?|utf8->string|values|vector(?:->list|->string|-append|-copy|-copy!|-fill!|-for-each|-length|-map|-ref|-set!|\?)?|with-exception-handler|write-(?:bytevector|char|string|u8)|zero\?)(?=[()\[\]\s]|$)/,lookbehind:!0},operator:{pattern:/((?:^|[^'`#])[(\[])(?:[-+*%/]|[<>]=?|=>?)(?=[()\[\]\s]|$)/,lookbehind:!0},number:{pattern:RegExp(function(w){for(var p in w)w[p]=w[p].replace(/<[\w\s]+>/g,function(g){return"(?:"+w[g].trim()+")"});return w[p]}({"":"\\d+(?:/\\d+)|(?:\\d+(?:\\.\\d*)?|\\.\\d+)(?:[esfdl][+-]?\\d+)?","":"[+-]?|[+-](?:inf|nan)\\.0","":"[+-](?:|(?:inf|nan)\\.0)?i","":"(?:@|)?|","":"(?:#d(?:#[ei])?|#[ei](?:#d)?)?","":"[0-9a-f]+(?:/[0-9a-f]+)?","":"[+-]?|[+-](?:inf|nan)\\.0","":"[+-](?:|(?:inf|nan)\\.0)?i","":"(?:@|)?|","":"#[box](?:#[ei])?|(?:#[ei])?#[box]","":"(^|[()\\[\\]\\s])(?:|)(?=[()\\[\\]\\s]|$)"}),"i"),lookbehind:!0},boolean:{pattern:/(^|[()\[\]\s])#(?:[ft]|false|true)(?=[()\[\]\s]|$)/,lookbehind:!0},function:{pattern:/((?:^|[^'`#])[(\[])(?:[^|()\[\]'\s]+|\|(?:[^\\|]|\\.)*\|)(?=[()\[\]\s]|$)/,lookbehind:!0},identifier:{pattern:/(^|[()\[\]\s])\|(?:[^\\|]|\\.)*\|(?=[()\[\]\s]|$)/,lookbehind:!0,greedy:!0},punctuation:/[()\[\]']/}})(ne);(function(b){var w=/[*&][^\s[\]{},]+/,p=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,g="(?:"+p.source+"(?:[ ]+"+w.source+")?|"+w.source+"(?:[ ]+"+p.source+")?)",e="(?:[^\\s\\x00-\\x08\\x0e-\\x1f!\"#%&'*,\\-:>?@[\\]`{|}\\x7f-\\x84\\x86-\\x9f\\ud800-\\udfff\\ufffe\\uffff]|[?:-])(?:[ ]*(?:(?![#:])|:))*".replace(//g,function(){return"[^\\s\\x00-\\x08\\x0e-\\x1f,[\\]{}\\x7f-\\x84\\x86-\\x9f\\ud800-\\udfff\\ufffe\\uffff]"}),i=`"(?:[^"\\\\\r +,.;:})\\]]|//))`),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:ne.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:ne.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:ne.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:ne.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:ne.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),ne.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:ne.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),ne.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),ne.languages.markup&&(ne.languages.markup.tag.addInlined("script","javascript"),ne.languages.markup.tag.addAttribute("on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)","javascript")),ne.languages.js=ne.languages.javascript,ne.languages.mjs=ne.languages.javascript;ne.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}},ne.languages.webmanifest=ne.languages.json;ne.languages.scmjson={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}},ne.languages.scmjson;ne.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},ne.languages.python["string-interpolation"].inside.interpolation.inside.rest=ne.languages.python,ne.languages.py=ne.languages.python;(function(k){k.languages.scheme={comment:/;.*|#;\s*(?:\((?:[^()]|\([^()]*\))*\)|\[(?:[^\[\]]|\[[^\[\]]*\])*\])|#\|(?:[^#|]|#(?!\|)|\|(?!#)|#\|(?:[^#|]|#(?!\|)|\|(?!#))*\|#)*\|#/,string:{pattern:/"(?:[^"\\]|\\.)*"/,greedy:!0},symbol:{pattern:/'[^()\[\]#'\s]+/,greedy:!0},char:{pattern:/#\\(?:[ux][a-fA-F\d]+\b|[-a-zA-Z]+\b|[\uD800-\uDBFF][\uDC00-\uDFFF]|\S)/,greedy:!0},"lambda-parameter":[{pattern:/((?:^|[^'`#])[(\[]lambda\s+)(?:[^|()\[\]'\s]+|\|(?:[^\\|]|\\.)*\|)/,lookbehind:!0},{pattern:/((?:^|[^'`#])[(\[]lambda\s+[(\[])[^()\[\]']+/,lookbehind:!0}],keyword:{pattern:/((?:^|[^'`#])[(\[])(?:begin|case(?:-lambda)?|cond(?:-expand)?|define(?:-library|-macro|-record-type|-syntax|-values)?|defmacro|delay(?:-force)?|do|else|except|export|guard|if|import|include(?:-ci|-library-declarations)?|lambda|let(?:rec)?(?:-syntax|-values|\*)?|let\*-values|only|parameterize|prefix|(?:quasi-?)?quote|rename|set!|syntax-(?:case|rules)|unless|unquote(?:-splicing)?|when)(?=[()\[\]\s]|$)/,lookbehind:!0},builtin:{pattern:/((?:^|[^'`#])[(\[])(?:abs|and|append|apply|assoc|ass[qv]|binary-port\?|boolean=?\?|bytevector(?:-append|-copy|-copy!|-length|-u8-ref|-u8-set!|\?)?|caar|cadr|call-with-(?:current-continuation|port|values)|call\/cc|car|cdar|cddr|cdr|ceiling|char(?:->integer|-ready\?|\?|<\?|<=\?|=\?|>\?|>=\?)|close-(?:input-port|output-port|port)|complex\?|cons|current-(?:error|input|output)-port|denominator|dynamic-wind|eof-object\??|eq\?|equal\?|eqv\?|error|error-object(?:-irritants|-message|\?)|eval|even\?|exact(?:-integer-sqrt|-integer\?|\?)?|expt|features|file-error\?|floor(?:-quotient|-remainder|\/)?|flush-output-port|for-each|gcd|get-output-(?:bytevector|string)|inexact\??|input-port(?:-open\?|\?)|integer(?:->char|\?)|lcm|length|list(?:->string|->vector|-copy|-ref|-set!|-tail|\?)?|make-(?:bytevector|list|parameter|string|vector)|map|max|member|memq|memv|min|modulo|negative\?|newline|not|null\?|number(?:->string|\?)|numerator|odd\?|open-(?:input|output)-(?:bytevector|string)|or|output-port(?:-open\?|\?)|pair\?|peek-char|peek-u8|port\?|positive\?|procedure\?|quotient|raise|raise-continuable|rational\?|rationalize|read-(?:bytevector|bytevector!|char|error\?|line|string|u8)|real\?|remainder|reverse|round|set-c[ad]r!|square|string(?:->list|->number|->symbol|->utf8|->vector|-append|-copy|-copy!|-fill!|-for-each|-length|-map|-ref|-set!|\?|<\?|<=\?|=\?|>\?|>=\?)?|substring|symbol(?:->string|\?|=\?)|syntax-error|textual-port\?|truncate(?:-quotient|-remainder|\/)?|u8-ready\?|utf8->string|values|vector(?:->list|->string|-append|-copy|-copy!|-fill!|-for-each|-length|-map|-ref|-set!|\?)?|with-exception-handler|write-(?:bytevector|char|string|u8)|zero\?)(?=[()\[\]\s]|$)/,lookbehind:!0},operator:{pattern:/((?:^|[^'`#])[(\[])(?:[-+*%/]|[<>]=?|=>?)(?=[()\[\]\s]|$)/,lookbehind:!0},number:{pattern:RegExp(function(w){for(var p in w)w[p]=w[p].replace(/<[\w\s]+>/g,function(b){return"(?:"+w[b].trim()+")"});return w[p]}({"":"\\d+(?:/\\d+)|(?:\\d+(?:\\.\\d*)?|\\.\\d+)(?:[esfdl][+-]?\\d+)?","":"[+-]?|[+-](?:inf|nan)\\.0","":"[+-](?:|(?:inf|nan)\\.0)?i","":"(?:@|)?|","":"(?:#d(?:#[ei])?|#[ei](?:#d)?)?","":"[0-9a-f]+(?:/[0-9a-f]+)?","":"[+-]?|[+-](?:inf|nan)\\.0","":"[+-](?:|(?:inf|nan)\\.0)?i","":"(?:@|)?|","":"#[box](?:#[ei])?|(?:#[ei])?#[box]","":"(^|[()\\[\\]\\s])(?:|)(?=[()\\[\\]\\s]|$)"}),"i"),lookbehind:!0},boolean:{pattern:/(^|[()\[\]\s])#(?:[ft]|false|true)(?=[()\[\]\s]|$)/,lookbehind:!0},function:{pattern:/((?:^|[^'`#])[(\[])(?:[^|()\[\]'\s]+|\|(?:[^\\|]|\\.)*\|)(?=[()\[\]\s]|$)/,lookbehind:!0},identifier:{pattern:/(^|[()\[\]\s])\|(?:[^\\|]|\\.)*\|(?=[()\[\]\s]|$)/,lookbehind:!0,greedy:!0},punctuation:/[()\[\]']/}})(ne);(function(k){var w=/[*&][^\s[\]{},]+/,p=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,b="(?:"+p.source+"(?:[ ]+"+w.source+")?|"+w.source+"(?:[ ]+"+p.source+")?)",e="(?:[^\\s\\x00-\\x08\\x0e-\\x1f!\"#%&'*,\\-:>?@[\\]`{|}\\x7f-\\x84\\x86-\\x9f\\ud800-\\udfff\\ufffe\\uffff]|[?:-])(?:[ ]*(?:(?![#:])|:))*".replace(//g,function(){return"[^\\s\\x00-\\x08\\x0e-\\x1f,[\\]{}\\x7f-\\x84\\x86-\\x9f\\ud800-\\udfff\\ufffe\\uffff]"}),i=`"(?:[^"\\\\\r ]|\\\\.)*"|'(?:[^'\\\\\r ]|\\\\.)*'`;function n(r,l){l=(l||"").replace(/m/g,"")+"m";var h=`([:\\-,[{]\\s*(?:\\s<>[ ]+)?)(?:<>)(?=[ ]*(?:$|,|\\]|\\}|(?:[\r -]\\s*)?#))`.replace(/<>/g,function(){return g}).replace(/<>/g,function(){return r});return RegExp(h,l)}b.languages.yaml={scalar:{pattern:RegExp(`([\\-:]\\s*(?:\\s<>[ ]+)?[|>])[ ]*(?:((?:\r? +]\\s*)?#))`.replace(/<>/g,function(){return b}).replace(/<>/g,function(){return r});return RegExp(h,l)}k.languages.yaml={scalar:{pattern:RegExp(`([\\-:]\\s*(?:\\s<>[ ]+)?[|>])[ ]*(?:((?:\r? |\r)[ ]+)\\S[^\r ]*(?:\\2[^\r -]+)*)`.replace(/<>/g,function(){return g})),lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:RegExp(`((?:^|[:\\-,[{\r -?])[ ]*(?:<>[ ]+)?)<>(?=\\s*:\\s)`.replace(/<>/g,function(){return g}).replace(/<>/g,function(){return"(?:"+e+"|"+i+")"})),lookbehind:!0,greedy:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:n("\\d{4}-\\d\\d?-\\d\\d?(?:[tT]|[ ]+)\\d\\d?:\\d{2}:\\d{2}(?:\\.\\d*)?(?:[ ]*(?:Z|[-+]\\d\\d?(?::\\d{2})?))?|\\d{4}-\\d{2}-\\d{2}|\\d\\d?:\\d{2}(?::\\d{2}(?:\\.\\d*)?)?"),lookbehind:!0,alias:"number"},boolean:{pattern:n("false|true","i"),lookbehind:!0,alias:"important"},null:{pattern:n("null|~","i"),lookbehind:!0,alias:"important"},string:{pattern:n(i),lookbehind:!0,greedy:!0},number:{pattern:n("[+-]?(?:0x[\\da-f]+|0o[0-7]+|(?:\\d+(?:\\.\\d*)?|\\.\\d+)(?:e[+-]?\\d+)?|\\.inf|\\.nan)","i"),lookbehind:!0},tag:p,important:w,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},b.languages.yml=b.languages.yaml})(ne);(function(){if(typeof ne<"u"){var b=/\b([a-z]{3,7}:\/\/|tel:)[\w\-+%~/.:=&!$'()*,;@]+(?:\?[\w\-+%~/.:=?&!$'()*,;@]*)?(?:#[\w\-+%~/.:#=?&!$'()*,;@]*)?/,w=/\b\S+@[\w.]+[a-z]{2}/,p=/\[([^\]]+)\]\(([^)]+)\)/,g=["comment","url","attr-value","string"];ne.plugins.autolinker={processGrammar:function(e){e&&!e["url-link"]&&(ne.languages.DFS(e,function(i,n,r){g.indexOf(r)>-1&&!Array.isArray(n)&&(n.pattern||(n=this[i]={pattern:n}),n.inside=n.inside||{},r=="comment"&&(n.inside["md-link"]=p),r=="attr-value"?ne.languages.insertBefore("inside","punctuation",{"url-link":b},n):n.inside["url-link"]=b,n.inside["email-link"]=w)}),e["url-link"]=b,e["email-link"]=w)}},ne.hooks.add("before-highlight",function(e){ne.plugins.autolinker.processGrammar(e.grammar)}),ne.hooks.add("wrap",function(e){if(/-link$/.test(e.type)){e.tag="a";var i=e.content;if(e.type=="email-link"&&i.indexOf("mailto:")!=0)i="mailto:"+i;else if(e.type=="md-link"){var n=e.content.match(p);i=n[2],e.content=n[1]}e.attributes.href=i;try{e.content=decodeURIComponent(e.content)}catch{}}})}})();(function(){if(typeof ne>"u"||typeof document>"u")return;function b(S){var t=ne.plugins.customClass;return t?t.apply(S,"none"):S}var w={"(":")","[":"]","{":"}"},p={"(":"brace-round","[":"brace-square","{":"brace-curly"},g={"${":"{"},e=12,i=0,n=/^(pair-\d+-)(close|open)$/;function r(S){var t=n.exec(S.id);return document.querySelector("#"+t[1]+(t[2]=="open"?"close":"open"))}function l(){ne.util.isActive(this,"brace-hover",!0)&&[this,r(this)].forEach(function(S){S.classList.add(b("brace-hover"))})}function h(){[this,r(this)].forEach(function(S){S.classList.remove(b("brace-hover"))})}function a(){ne.util.isActive(this,"brace-select",!0)&&[this,r(this)].forEach(function(S){S.classList.add(b("brace-selected"))})}ne.hooks.add("complete",function(S){var t=S.element,s=t.parentElement;if(!(!s||s.tagName!="PRE")){var c=[];if(ne.util.isActive(t,"match-braces")&&c.push("(","[","{"),c.length!=0){s.__listenerAdded||(s.addEventListener("mousedown",function(){var $=s.querySelector("code"),m=b("brace-selected");Array.prototype.slice.call($.querySelectorAll("."+m)).forEach(function(_){_.classList.remove(m)})}),Object.defineProperty(s,"__listenerAdded",{value:!0}));var o=Array.prototype.slice.call(t.querySelectorAll("span."+b("token")+"."+b("punctuation"))),d=[];c.forEach(function(f){for(var $=w[f],m=b(p[f]),_=[],v=[],A=0;A/g,function(){return`(?:\\\\.|[^\\\\ +]+)*)`.replace(/<>/g,function(){return b})),lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:RegExp(`((?:^|[:\\-,[{\r +?])[ ]*(?:<>[ ]+)?)<>(?=\\s*:\\s)`.replace(/<>/g,function(){return b}).replace(/<>/g,function(){return"(?:"+e+"|"+i+")"})),lookbehind:!0,greedy:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:n("\\d{4}-\\d\\d?-\\d\\d?(?:[tT]|[ ]+)\\d\\d?:\\d{2}:\\d{2}(?:\\.\\d*)?(?:[ ]*(?:Z|[-+]\\d\\d?(?::\\d{2})?))?|\\d{4}-\\d{2}-\\d{2}|\\d\\d?:\\d{2}(?::\\d{2}(?:\\.\\d*)?)?"),lookbehind:!0,alias:"number"},boolean:{pattern:n("false|true","i"),lookbehind:!0,alias:"important"},null:{pattern:n("null|~","i"),lookbehind:!0,alias:"important"},string:{pattern:n(i),lookbehind:!0,greedy:!0},number:{pattern:n("[+-]?(?:0x[\\da-f]+|0o[0-7]+|(?:\\d+(?:\\.\\d*)?|\\.\\d+)(?:e[+-]?\\d+)?|\\.inf|\\.nan)","i"),lookbehind:!0},tag:p,important:w,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},k.languages.yml=k.languages.yaml})(ne);(function(){if(typeof ne<"u"){var k=/\b([a-z]{3,7}:\/\/|tel:)[\w\-+%~/.:=&!$'()*,;@]+(?:\?[\w\-+%~/.:=?&!$'()*,;@]*)?(?:#[\w\-+%~/.:#=?&!$'()*,;@]*)?/,w=/\b\S+@[\w.]+[a-z]{2}/,p=/\[([^\]]+)\]\(([^)]+)\)/,b=["comment","url","attr-value","string"];ne.plugins.autolinker={processGrammar:function(e){e&&!e["url-link"]&&(ne.languages.DFS(e,function(i,n,r){b.indexOf(r)>-1&&!Array.isArray(n)&&(n.pattern||(n=this[i]={pattern:n}),n.inside=n.inside||{},r=="comment"&&(n.inside["md-link"]=p),r=="attr-value"?ne.languages.insertBefore("inside","punctuation",{"url-link":k},n):n.inside["url-link"]=k,n.inside["email-link"]=w)}),e["url-link"]=k,e["email-link"]=w)}},ne.hooks.add("before-highlight",function(e){ne.plugins.autolinker.processGrammar(e.grammar)}),ne.hooks.add("wrap",function(e){if(/-link$/.test(e.type)){e.tag="a";var i=e.content;if(e.type=="email-link"&&i.indexOf("mailto:")!=0)i="mailto:"+i;else if(e.type=="md-link"){var n=e.content.match(p);i=n[2],e.content=n[1]}e.attributes.href=i;try{e.content=decodeURIComponent(e.content)}catch{}}})}})();(function(){if(typeof ne>"u"||typeof document>"u")return;function k(S){var t=ne.plugins.customClass;return t?t.apply(S,"none"):S}var w={"(":")","[":"]","{":"}"},p={"(":"brace-round","[":"brace-square","{":"brace-curly"},b={"${":"{"},e=12,i=0,n=/^(pair-\d+-)(close|open)$/;function r(S){var t=n.exec(S.id);return document.querySelector("#"+t[1]+(t[2]=="open"?"close":"open"))}function l(){ne.util.isActive(this,"brace-hover",!0)&&[this,r(this)].forEach(function(S){S.classList.add(k("brace-hover"))})}function h(){[this,r(this)].forEach(function(S){S.classList.remove(k("brace-hover"))})}function a(){ne.util.isActive(this,"brace-select",!0)&&[this,r(this)].forEach(function(S){S.classList.add(k("brace-selected"))})}ne.hooks.add("complete",function(S){var t=S.element,s=t.parentElement;if(!(!s||s.tagName!="PRE")){var c=[];if(ne.util.isActive(t,"match-braces")&&c.push("(","[","{"),c.length!=0){s.__listenerAdded||(s.addEventListener("mousedown",function(){var $=s.querySelector("code"),m=k("brace-selected");Array.prototype.slice.call($.querySelectorAll("."+m)).forEach(function(_){_.classList.remove(m)})}),Object.defineProperty(s,"__listenerAdded",{value:!0}));var o=Array.prototype.slice.call(t.querySelectorAll("span."+k("token")+"."+k("punctuation"))),d=[];c.forEach(function(f){for(var $=w[f],m=k(p[f]),_=[],v=[],A=0;A/g,function(){return`(?:\\\\.|[^\\\\ \r]|(?: |\r ?)(?![\r -]))`}),RegExp("((?:^|[^\\\\])(?:\\\\{2})*)(?:"+l+")")}var p="(?:\\\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\\\|\r\n`])+",g=`\\|?__(?:\\|__)+\\|?(?:(?: +]))`}),RegExp("((?:^|[^\\\\])(?:\\\\{2})*)(?:"+l+")")}var p="(?:\\\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\\\|\r\n`])+",b=`\\|?__(?:\\|__)+\\|?(?:(?: |\r ?)|(?![^]))`.replace(/__/g,function(){return p}),e=`\\|?[ ]*:?-{3,}:?[ ]*(?:\\|[ ]*:?-{3,}:?[ ]*)+\\|?(?: |\r -?)`;b.languages.markdown=b.languages.extend("markup",{}),b.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:b.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+g+e+"(?:"+g+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+g+e+")(?:"+g+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(p),inside:b.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+g+")"+e+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+g+"$"),inside:{"table-header":{pattern:RegExp(p),alias:"important",inside:b.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:w("\\b__(?:(?!_)|_(?:(?!_))+_)+__\\b|\\*\\*(?:(?!\\*)|\\*(?:(?!\\*))+\\*)+\\*\\*"),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:w("\\b_(?:(?!_)|__(?:(?!_))+__)+_\\b|\\*(?:(?!\\*)|\\*\\*(?:(?!\\*))+\\*\\*)+\\*"),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:w("(~~?)(?:(?!~))+\\2"),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:w('!?\\[(?:(?!\\]))+\\](?:\\([^\\s)]+(?:[ ]+"(?:\\\\.|[^"\\\\])*")?\\)|[ ]?\\[(?:(?!\\]))+\\])'),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach(function(l){["url","bold","italic","strike","code-snippet"].forEach(function(h){l!==h&&(b.languages.markdown[l].inside.content.inside[h]=b.languages.markdown[h])})}),b.hooks.add("after-tokenize",function(l){l.language!=="markdown"&&l.language!=="md"||function h(a){if(a&&typeof a!="string")for(var S=0,t=a.length;S",quot:'"'},r=String.fromCodePoint||String.fromCharCode;b.languages.md=b.languages.markdown})(ne);(function(b){var w="\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b",p={pattern:/(^(["']?)\w+\2)[ \t]+\S.*/,lookbehind:!0,alias:"punctuation",inside:null},g={bash:p,environment:{pattern:RegExp("\\$"+w),alias:"constant"},variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,greedy:!0,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+w),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/};b.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b[\w-]+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?:\.\w+)*(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+w),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},parameter:{pattern:/(^|\s)-{1,2}(?:\w+:[+-]?)?\w+(?:\.\w+)*(?=[=\s]|$)/,alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:g},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:p}},{pattern:/(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,lookbehind:!0,greedy:!0,inside:g},{pattern:/(^|[^$\\])'[^']*'/,lookbehind:!0,greedy:!0},{pattern:/\$'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{entity:g.entity}}],environment:{pattern:RegExp("\\$?"+w),alias:"constant"},variable:g.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cargo|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|java|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|sysctl|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|let|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|set|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}},p.inside=b.languages.bash;for(var e=["comment","function-name","for-or-select","assign-left","parameter","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],i=g.variable[1].inside,n=0;n{let w=[...b];for(let p=w.length-1;p>0;p--){let g=Math.floor(Math.random()*(p+1));[w[p],w[g]]=[w[g],w[p]]}return w};var qe=()=>{let b=[];le.liveDangerously&&b.push(`danger=${le.liveDangerously?"yes":"no"}`),le.search&&b.push(`search=${encodeURI(le.search)}`);let w=le.tags.filter(p=>p.selected);w.length>0&&b.push(`tags=${encodeURI(w.map(p=>p.value).join(","))}`),window.history.replaceState({},"",`${Se.origin+Se.pathname}?${b.join("&")}`)};var Ie=(b="")=>{let w=le.tags.every(g=>!g.selected),p=le.snippets.find(g=>g.title===le.search);if(!w||le.search!==""||p)for(let g of le.snips)g.display=!1;else for(let g of le.snips)g.display=!0;if(b)for(let g of le.snippets)g.name===le.search?g.display==!0:g.display=!1;else{let g=w?[]:le.tags.filter(e=>e.selected);for(let e of le.snippets){let i=e.text.toLowerCase().includes(le.search.toLowerCase())||e.title.toLowerCase().includes(le.search.toLowerCase());(w?i:i&&g.every(n=>e.tags?.includes(n.value)))?e.display=!0:e.display=!1}}for(let g of le.snippets)g.dom&&(g.display?g.dom.style.display="block":g.dom.style.display="none");for(let g of le.snips)g.dom&&(g.display?g.dom.style.display="block":g.dom.style.display="none");qe()};var[xn,An,bt,gt]=await Promise.all([fetch("../public/data/comments.json").then(b=>b.json()),fetch("../public/data/snips.json").then(b=>b.json()),fetch("../public/data/snippets.json").then(b=>b.json()),fetch("../public/data/tags.json").then(b=>b.json())]),le={comments:xn},mt=Se.searchParams.get("search");le.search=mt?decodeURI(mt):"";var _t=Se.searchParams.get("tags"),En=_t?decodeURI(_t).split(",").filter(b=>gt.includes(b)):"";le.tags=gt.map(b=>({value:b,selected:!!En.includes(b)}));le.liveDangerously=!!(Se.searchParams.has("danger")&&Se.searchParams.get("danger")==="yes");le.snips=An.map(b=>({text:b,display:!0}));le.snippets=Oe(bt.filter(b=>!b.title.startsWith(".")).map(b=>(b.display=!1,b)));le.snippets.unshift(Oe(bt.filter(b=>b.title.startsWith(".")))[0]);le.snippets[0].display=!1;var kt=Se.searchParams.get("snippet")||Se.searchParams.get("title");if(kt){let b=decodeURI(kt).toLowerCase();for(let w of le.snippets)w.title.toLowerCase()===b?w.display=!0:w.display=!1;for(let w of le.snips)w.display=!1}else Ie();var St=(b="")=>`",` _____ + ____ / \\ +| o |_| | +|/__ _ __________| + |_|_| |_|_|`,"\\>-,-,-,--<\u{1D07D}\u{1D005}_","_?_ : programming language :: linguistic relativity : natural language","js : programming language :?: english : natural language",'"," : js :?: ";" : english'," \u{1F414} \u{1F95A} \u{1F423} \u{1F425} \u{1F413} ... \u{1F357} :(","\u{1F414} <-?-> \u{1F95A}","be a big fish, in the right small pond, at the right time",`The best authors +and the best JavaScript developers are those who + obsess about language, who + explore and + experiment with language every day + and in doing so develop their own +style, their own +idioms, and their own +expression. + +-> Angus Croll`,"nothing, hiding behind clever words","awakened from nightmare to the waking nightmare of millions"];var Qe=[{title:"10-print.1.js",text:`// 10 PRINT CHR$(205.5+RND(1)); : GOTO 10 + +const HEIGHT = 25; +const WIDTH = 50; + +let maze = ''; + +for (let i = 0; i < HEIGHT; i++) { + maze += + Array(WIDTH) + .fill() + .map(() => '\\\\/'[+(Math.random() > 0.5)]) + .join('') + '\\n'; +} + +console.log(maze); +`,tags:["variation"],aftlinks:["variation.md"]},{title:"10-print.2.js",text:`// 10 PRINT CHR$(205.5+RND(1)); : GOTO 10 + +console.log( + Array(25) + .fill(Array(50).fill()) + .map((row) => row.map(() => '\\\\/'[+(Math.random() > 0.5)]).join('')) + .join('\\n'), +); +`,tags:["variation"],aftlinks:["variation.md"]},{title:"10-print.3.js",text:`// 10 PRINT CHR$(205.5+RND(1)); : GOTO 10 + +(function tenPrint(maze = '') { + try { + maze = tenPrint(maze + '\\\\/'[+(Math.random() > 0.5)]); + } catch (_) { + console.log(maze); + } +})(); +`,tags:["variation"],aftlinks:["variation.md"]},{title:"10-print.4.js",text:`// 10 PRINT CHR$(205.5+RND(1)); : GOTO 10 + +let maze = ''; +while (maze.length < 5000) { + maze += '\\\\/'[+(Math.random() > 0.5)]; +} +console.log(maze); +`,tags:["variation"],aftlinks:["variation.md"]},{title:"10-print.6.mjs",text:`import { projector } from './projector.mjs'; + +const FRAMES = 10; + +const HEIGHT = 25; +const WIDTH = 50; + +function* tenPrintPrintTen() { + for (let f = 0; f < FRAMES; f++) { + let maze = ''; + for (let i = 0; i < HEIGHT; i++) { + for (let j = 0; j < WIDTH; j++) { + maze += '\\\\/'[+(Math.random() > 0.5)]; + } + maze += '\\n'; + } + yield maze; + } +} + +projector(tenPrintPrintTen, { frameRate: 1 }); +`,tags:["variation"],forelinks:["projector.mjs"],aftlinks:["variation.md"]},{title:"ESi.md",text:`# \u2102.js = ES(n + i) + +Why [wait 6 years](https://github.com/tc39/proposal-pipeline-operator/issues/91) for a +real language feature? Have an imaginary one today. +`,tags:["metappet","esi"],alt:"Don't make it complex, KISS.",metalinks:["declare-morf.js","declare-tag.js"]},{title:"README.md",text:`# Snippets + +What can you do with under 40(ish) lines at a time? +`,tags:["metappet"],alt:"More interesting than useful."},{title:"accessible-credit-card-form.html",text:` + +
+

Accessible Credit Card Form

+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ +
+
+
+ +\n\n\n","tags":["coaithored"],"aftlinks":["coAIthored.md"]},{"title":"all-medium.md","text":"They *intended* to write. They really did.\n\nBut more fluently came *how* to write, *how* to display, *how* to convey.\n\nBefore there was a **what** there were [empty](./empty.json) [vehicles](./empty.yaml)\n[crewed by a token](./be.txt):\n\n* [dusty](./story-in-a-story.mjs)\n* [unused](./log.mjs)\n* [unfinished](./funsole.mjs)\n* [ill-defined](./cat-detector.psu)\n\n\n","tags":["metappet"],"forelinks":["be.txt","cat-detector.psu","empty.json","empty.yaml","funsole.mjs","log.mjs","story-in-a-story.mjs"],"alt":"no message"},{"title":"all-the-chars.js","text":"const allTheChars = [];\n\nlet i = 0;\nlet next = '';\n\nwhile (!allTheChars.includes(next)) {\n allTheChars.push(next);\n next = String.fromCharCode(i++);\n}\n\nconsole.log(allTheChars.join(''));\n"},{"title":"all-the-reals.mjs","text":"import _ from './executable-pseudocode.mjs';\nconst { OrderedSet, Element } = _;\n\nconst reals = new OrderedSet((a, b) => a.getValue() < b.getValue());\nconst zero = new Element(0);\nconst one = new Element(1);\n\nreals.add(zero);\nreals.add(one);\naddBetween(reals)(zero, one);\n\ncantorize(reals);\n\nconsole.log(...reals);\n\n// --- --- --- --- --- ---\n\nfunction addBetween(set) {\n return function addingBetween(left, right) {\n const middle = new Element((left.getValue() + right.getValue()) / 2);\n if (!set.has(middle)) {\n set.add(middle);\n addingBetween(left, middle);\n addingBetween(middle, right);\n }\n };\n}\n\nfunction cantorize(incomplete, i = 0) {\n const numberToCheck = incomplete.getByOrder(i).getValue();\n numberToCheck[i] = numberToCheck[i] + 1;\n const maybeMissing = new Element(numberToCheck);\n if (!incomplete.has(maybeMissing)) {\n incomplete.add(maybeMissing);\n cantorize(incomplete, i + 1);\n }\n}\n","forelinks":["executable-pseudocode.mjs"]},{"title":"be.canvas.html","text":" \n\n\n","tags":["variation"],"aftlinks":["be.md","variation.md"]},{"title":"be.css","text":".be,\nbody {\n background: linear-gradient(\n 90deg,\n rgb(0, 0, 0) 33.33vw,\n rgb(255, 233, 54) 33.33vw,\n rgb(255, 233, 54) 66.66vw,\n rgb(255, 15, 33) 66.66vw\n );\n}\n","tags":["variation","translation"],"aftlinks":["be.md","translation.md","variation.md"]},{"title":"be.css.html","text":"\n\n\n
\n
\n
\n
\n
\n\n","tags":["variation"],"aftlinks":["be.md","variation.md"]},{"title":"be.de.txt","text":"SSSSSSSGGGGGGGRRRRRRR\nSSSSSSSGGGGGGGRRRRRRR\nSSSSSSSGGGGGGGRRRRRRR\nSSSSSSSGGGGGGGRRRRRRR\nSSSSSSSGGGGGGGRRRRRRR\n","tags":["variation"],"aftlinks":["be.md","variation.md"]},{"title":"be.en.txt","text":"BBBBBBBYYYYYYYRRRRRRR\nBBBBBBBYYYYYYYRRRRRRR\nBBBBBBBYYYYYYYRRRRRRR\nBBBBBBBYYYYYYYRRRRRRR\nBBBBBBBYYYYYYYRRRRRRR\n","tags":["variation"],"aftlinks":["be.md","variation.md"]},{"title":"be.flip.js","text":"console.log('%c↺ 90°', 'font-weight: bold; font-size: xx-large;');\n\nfor (const color of ['black', 'yellow', 'red']) {\n const bar = [];\n for (let width = 0; width < 10; width++) {\n let column = '';\n for (let height = 0; height < 35; height++) {\n column += ' ';\n }\n bar.push(column);\n }\n console.log(`%c${bar.join('\\n')}`, `background-color: ${color};`);\n}\n","tags":["variation"],"aftlinks":["be.md","variation.md"]},{"title":"be.fr.txt","text":"NNNNNNNJJJJJJJRRRRRRR\nNNNNNNNJJJJJJJRRRRRRR\nNNNNNNNJJJJJJJRRRRRRR\nNNNNNNNJJJJJJJRRRRRRR\nNNNNNNNJJJJJJJRRRRRRR\n","tags":["variation"],"aftlinks":["be.md","variation.md"]},{"title":"be.html","text":"\n\n \n \n BE\n \n \n \n
\n
\n
\n \n \n\n","tags":["variation","translation"],"aftlinks":["be.md","translation.md","variation.md"]},{"title":"be.js","text":"console.log( '%c %c %c ',\n 'background-color: black;', \n 'background-color: yellow;',\n 'background-color: red;',\n);","tags":["variation","translation"],"aftlinks":["be.md","translation.md","variation.md"]},{"title":"be.json","text":"{\n \"de\": [\"schwarz\", \"gelb\", \"rot\"],\n \"en\": [\"black\", \"yellow\", \"red\"],\n \"fr\": [\"noir\", \"jaune\", \"rouge\"],\n \"nl\": [\"zwart\", \"geel\", \"rood\"]\n}\n","tags":["variation","translation"],"aftlinks":["be.md","translation.md","variation.md"]},{"title":"be.md","text":"# Belgium\\*!\n\n\n","tags":["metappet","variation","1-liner","translation"],"alt":"* België, Belgique, Belgien","metalinks":["be.canvas.html","be.css","be.css.html","be.de.txt","be.en.txt","be.flip.js","be.fr.txt","be.html","be.js","be.json","be.nl.txt","be.py","be.svg","be.txt","be.yaml"],"aftlinks":["translation.md","variation.md"]},{"title":"be.nl.txt","text":"ZZZZZZZGGGGGGGRRRRRRR\nZZZZZZZGGGGGGGRRRRRRR\nZZZZZZZGGGGGGGRRRRRRR\nZZZZZZZGGGGGGGRRRRRRR\nZZZZZZZGGGGGGGRRRRRRR\n","tags":["variation"],"aftlinks":["be.md","variation.md"]},{"title":"be.py","text":"print('🇧🇪')","tags":["variation","1-liner","translation"],"aftlinks":["be.md","translation.md","variation.md"]},{"title":"be.svg","text":"\n\n \n\n \n\n \n\n\n","tags":["variation","translation"],"aftlinks":["be.md","translation.md","variation.md"]},{"title":"be.txt","text":"🇧🇪","tags":["variation","1-liner","translation"],"aftlinks":["all-medium.md","be.md","translation.md","variation.md"]},{"title":"be.yaml","text":"de:\n - schwarz\n - gelb\n - rot\nen:\n - black\n - yellow\n - red\nfr:\n - noir\n - jaune\n - rouge\nnl:\n - zwart\n - geel\n - rood\n","tags":["variation","translation"],"aftlinks":["be.md","translation.md","variation.md"]},{"title":"breathless.html","text":"\n\n
\n\n\n\n\n\n","tags":["wellbeing","variation","translation"],"aftlinks":["translation.md","variation.md"]},{"title":"breathless.js","text":"(function breathless(slowness = 500, slowerness = 1.01) {\n const breath = setTimeout(breathless, (slowness *= slowerness), slowness);\n console.log(['hold', 'breath in', 'hold', 'breath out'][breath % 4]);\n})();\n\n// tags: wellbeing\n","tags":["wellbeing","variation","translation"],"aftlinks":["translation.md","variation.md"]},{"title":"bunny.md","text":"# 🐰\n\n> If drawing rabbits (🐇) in JavaScript means copying patterns out of books or mimicking\n> specific styles from blogs, drawing bunnies (🐰) is about experimentation and creative\n> expression.\n>\n> * [Jacob Thornton](https://github.com/fat) from\n> [*How to draw a Bunny*](https://www.oreilly.com/library/view/beautiful-javascript/9781449371142/ch03.html)\n\n\n","tags":["metappet"],"aftlinks":["cat-detector.js.md"]},{"title":"callout-stack.js","text":"const calloutStack = (msg = '') =>\n eval(msg.split('').reduce((acc, next) => `(${next} = () => ${acc})()`, msg));\n\ncalloutStack('jenga');\n\n// tags: useless\n","tags":["useless"]},{"title":"can-not-even.mjs","text":"import { describe, it } from './testing.mjs';\n\nconst canNotEven = (maybe, strict) =>\n strict && typeof maybe !== 'number'\n ? maybe\n : maybe % 2 === 0\n ? even(maybe)\n : maybe;\n\ndescribe('canNotEven: can not even', () => {\n describe('sort of', () => {\n it('can odd numbers', () => canNotEven(1));\n it('can odd strings', () => canNotEven('1'));\n it('can odd number objects', () => canNotEven(new Number(1)));\n\n it('can not even numbers', () => canNotEven(2));\n it('can not even strings', () => canNotEven('2'));\n it('can not even number objects', () => canNotEven(new Number(2)));\n });\n describe('exactly', () => {\n it('can odd numbers', () => canNotEven(1, true));\n it('can odd strings', () => canNotEven('1', true));\n it('can even strings', () => canNotEven('2', true));\n it('can odd number objects', () => canNotEven(new Number(1), true));\n it('can even number objects', () => canNotEven(new Number(2), true));\n\n it('can not even numbers', () => canNotEven(2, true));\n });\n});\n\nfunction even(number) {\n (function not() {\n (function can() {\n throw new Error(`can not ${number}`);\n })();\n })();\n}\n\n// tags: remix\n// inspiration: https://github.com/blakek/cannot-even\n","tags":["remix"],"forelinks":["testing.mjs"]},{"title":"cat-detector.ascii.html","text":"cat detector\n\n\n\n\n\n
\n\n\n","tags":["variation","translation"],"aftlinks":["cat-detector.js.md","translation.md","variation.md"]},{"title":"cat-detector.ascii.txt","text":" |  _ _|_   o ._  ._     _|_   --   ._      | | o                                                    \n | (/_ |_   | | | |_) |_| |_   --   | | |_| | | o                                                    \n                  |                             /                                                    \n\n\n                                                                        ,-                           \n      |_  o |  _     / o ._  ._     _|_   | -- --   / _  _. _|_ / \\    _|                            \n \\/\\/ | | | | (/_   |  | | | |_) |_| |_   o -- --    (_ (_|  |_    |    |                            \n                     \\       |                                    /     `-                           \n                                                                                                     \n    o ._  ._     _|_   --   ._  ._ _  ._ _  ._ _|_  / / || _  _. _|_ ||   ._  |  _   _.  _  _ / \\  o \n    | | | |_) |_| |_   --   |_) | (_) | | | |_) |_ |      (_ (_|  |_      |_) | (/_ (_| _> (/_   | o \n          |                 |               |       \\                     |                     /  / \n -.                                                                                                  \n  |_                                                                                                 \n  |                                                                                                  \n -'                                                                                                  \n\n\n                                                           _                                         \n  _. |  _  ._ _|_  / / _|_ |_   _. ._  |        _        _|_ _  ._   _|_ |_   _     _  _. _|_ / \\  o \n (_| | (/_ |   |_ |     |_ | | (_| | | |<   \\/ (_) |_|    | (_) |     |_ | | (/_   (_ (_|  |_    | o \n                   \\                        /                                                   /  / \n\n","tags":["variation","translation"],"aftlinks":["cat-detector.js.md","translation.md","variation.md"]},{"title":"cat-detector.be.js","text":"                   ;;                                            ;;\n                  ;;;;                                          ;;;;\n                 ;   ;;                                        ;;   ;\n                ;      ;                                     ;;     ;\n                ;       ;;                                  ;;     ;;\n                ;        ;;                                ;;      ;;\n                ;;  ;;;   ;;   ;;;;;;        ;;;;;;;;;;;  ;;   ;;  ;;\n                ;;  ;;;;   ;;;;;    ;;;;  ;;;;;        ;;;;  ;;;;; ;;\n                ;;  ;;;;;;;;          ;;  ;;               ;;;;;;  ;;\n                ;;  ;;;;;;              ;;;                 ;;;;;  ;;\n                ;;  ;;;;                ;;                   ;;;;  ;;\n                ;;  ;;;             ;;;;;; ;;;;               ;;;  ;;\n                ;  ;;;            ;;   ;;;;   ;;               ;;  ;\n                ;  ;;             ;;   ;;;;   ;;               ;;  ;\n                ;  ;;              ;;;;;;;;;;;;;;;             ;;  ;\n                ;  ;;            ;;;;;           ;;;;;;       ;;  ;;\n                ;  ;;;       ;;;;;                     ;;;  ;;;;  ;;\n                ;  ;;;;   ;;;;                             ;;;;;  ;;\n                ;  while  (                                   prompt\n                ('le  ...'                                     )  !=\n               'chat'  )                                        ;;  ;\n              ;;;    ;;                                          ;   ;;\n            ;;      ;;                                           ;;    ;\n            ;;      ;;                                            ;     ;\n          ;;        ;                                             ;      ;\n          ;;        ;                                             ;       ;;\n        ;;;;        ;;                                           ;;       ;; ;\n      ;; ;;   ;;;;;;;;                                          ;;;;;;;   ;;  ;;\n    ;;;  ;;          ;;                                        ;;         ;;    ;;\n    ;;    ;;           ;;                                    ;;;          ;;     ;;\n  ;;;      ;;            ;;;                              ;;;;           ;;       ;;\n ;;        ;;              ;;;                       ;;;;;              ;;         ;;\n ;;          ;;               ;;;;;;;;;;;;;;;;;;;;;;;                  ;;;          ;\n;;            ;;;;                                                    ;;;          ;;\n;;            ;;  ;;                                               ;;;;            ;;\n ;;           ;;;   ;;;;                                        ;;;;;             ;;\n ;;            ;;       ;;;;                                 ;;;; ;;              ;;\n  ;;           ;;           ;;;;;                   ;;;;;;;;;;   ;;              ;;\n  ;;            ;               ;;;;;;;;;;;;;;;;;;;;;           ;;               ;;\n   ;;           ;;                                             ;;               ;\n\n// tags: le chat","tags":["le chat","variation"],"aftlinks":["cat-detector.js.md","variation.md"]},{"title":"cat-detector.cat.js","text":"                ;                   ;                \n               ; ;                 ; ;               \n              ;   ;               ;   ;              \n             ;     ; ; ; ; ; ; ; ;     ;             \n            ;                           ;            \n           ;                             ;           \n          ;        cat=       null        ;          \n         ;                                 ;         \n         ;                                 ;         \n/*------*/      while (cat !== 'cat')      /*------*/\n/*------*/       cat=         prompt       /*------*/\n /*------*/        ('cat, please')        /*------*/ \n            ;                           ;            \n              ;                       ;              \n                 ; ; ; ; ; ; ; ; ; ;                 \n","tags":["variation"],"aftlinks":["cat-detector.js.md","variation.md"]},{"title":"cat-detector.eval.js","text":"alert(eval(detector = \n  \"((cat = prompt('cat')), cat == 'cat') \" +\n\t\t\"? cat : eval(detector)\"));","tags":["variation"],"aftlinks":["cat-detector.js.md","variation.md"]},{"title":"cat-detector.evbl.js","text":"alert((detector = () => (((cat = prompt('cat')), cat == 'cat') ? cat : detector()))());\n","tags":["variation","1-liner"],"aftlinks":["cat-detector.js.md","variation.md"]},{"title":"cat-detector.golf.js","text":"(c=(i=prompt('\"cat\" please'),t='cat'\n   ==i.toLowerCase())=>(alert(i? \n    `${t?'thank you for the ':  \n     '\"cat\" is not '}\"${i}\"`:   \n      'there is no escape')     \n          // tags: golf         \n           ,t||c()))()           ","tags":["golf","variation"],"aftlinks":["cat-detector.js.md","variation.md"]},{"title":"cat-detector.js.md","text":"# Cat Detector\n\nOn the surface, a cat detector is a just simple program:\n\n* First it asks you for a cat:\n  ```js\n  let input = prompt('cat, please');\n  ```\n* Then it checks if you gave it a cat:\n  ```js\n  const isCat = input === 'cat';\n  ```\n* If did give it a cat, the detector is satisfied:\n  ```js\n  if (isCat) alert('thank you for the cat');\n  ```\n* Otherwise it keeps asking you for a cat until you give it one:\n  ```js\n  else {\n  \twhile (input !== 'cat') input = prompt('still not a cat. \\n\\ncat, please');\n  ```\n* When you're done out-stubborning a computer, the program ends:\n  ```js\n  \talert('finally, a cat.');\n  }\n  ```\n\nBut really, a cat detector is an excuse to [draw a bunny](./bunny.md).\n\n\n","tags":["metappet","variations","variation"],"forelinks":["bunny.md"],"subtext":"cat-detector.js.md.st.js","metalinks":["cat-detector.ascii.html","cat-detector.ascii.txt","cat-detector.be.js","cat-detector.cat.js","cat-detector.eval.js","cat-detector.evbl.js","cat-detector.golf.js","cat-detector.js.md.st.js","cat-detector.polyfill.mjs","cat-detector.psu","cat-detector.scm.js","cat-detector.scm.json","cat-detector.spoken.mjs","cat-detector.svg","cat-detector.vars.js","cat-detector.wc.html","cat_detector.py","cat_detector.py.js"],"aftlinks":["variation.md"]},{"title":"cat-detector.polyfill.mjs","text":"import './detector-string-polyfill.js';\n\n'cat'.detect('mixed');\n","tags":["variation"],"forelinks":["detector-string-polyfill.js"],"aftlinks":["cat-detector.js.md","variation.md"]},{"title":"cat-detector.psu","text":"maybe <- null\n\nWHILE maybe IS NOT \"cat\"\n  maybe <- INPUT \"cat please\"\n  DISPLAY helpful feedback\nEND WHILE\n\nDISPLAY \"thank you for the cat\"\n","tags":["variation","translation"],"aftlinks":["all-medium.md","cat-detector.js.md","translation.md","variation.md"]},{"title":"cat-detector.scm.js","text":"(\"define\", (\"get a cat\", \"message\"),\n  ((\"define\", \"maybe\", (\"*log\", \"prompt\", \"message\")),\n  (\"cond\",\n    ((\"=\", \"maybe\", null),\n      ((\"alert\", \"there is no escape\"), (\"get a cat\", \"message\"))),\n    ((\"not\", (\"=\", \"maybe\", \"cat\")),\n      ((\"alert\", (\"+\", \"'\", \"maybe\", \"' is not cat\")), (\"get a cat\", \"message\"))),\n    (\"else\", (\"maybe\")))));\n\n(\"get a cat\", \"'cat' please\");\n\n(\"alert\", \"thank you for the cat\");\n\n","tags":["variation","translation"],"aftlinks":["cat-detector.js.md","translation.md","variation.md"]},{"title":"cat-detector.scm.json","text":"[\n  [\"define\", [\"get a cat\", \"message\"],\n    [[\"define\", \"maybe\", [\"*log\", \"prompt\", \"message\"]],\n    [\"cond\",\n      [[\"=\", \"maybe\", null],\n        [[\"alert\", \"there is no escape\"], [\"get a cat\", \"message\"]]],\n      [[\"not\", [\"=\", \"maybe\", \"cat\"]],\n        [[\"alert\", [\"+\", \"'\", \"maybe\", \"' is not cat\"]], [\"get a cat\", \"message\"]]],\n      [\"else\", [\"maybe\"]]]]],\n\n  [\"get a cat\", \"'cat' please\"],\n\n  [\"alert\", \"thank you for the cat\"]\n]\n","tags":["variation","translation"],"aftlinks":["cat-detector.js.md","translation.md","variation.md"]},{"title":"cat-detector.spoken.mjs","text":"import { theArrivalOf } from './introducing.mjs';\n\nconst voice = 'Tessa';\nlet volume = 0.4;\n\nconst _The_Inspector_ = await theArrivalOf('The Inspector', { voice, volume });\n\nawait _The_Inspector_(\n  'In a moment you will be prompted to enter some text, please type \"cat\".',\n);\n\nwhile (true) {\n  const maybeACat = prompt();\n\n  if (maybeACat?.toLowerCase() === 'cat') {\n    await _The_Inspector_('Thank you for following directions, you may leave now.', {\n      volume: 0.4,\n    });\n    break;\n  }\n\n  if (maybeACat === null) {\n    await _The_Inspector_('there is no escape');\n  } else if (maybeACat?.toLowerCase() !== 'cat') {\n    await _The_Inspector_(`\"${maybeACat}\" is most certainly not a cat.  Try again.`, {\n      volume,\n    });\n  }\n  volume += 0.1;\n\n  if (volume > 1) {\n    _The_Inspector_(\"I'm done with this.\", { volume: 0.4 });\n    break;\n  }\n}\n","tags":["variation"],"forelinks":["introducing.mjs"],"aftlinks":["cat-detector.js.md","variation.md"]},{"title":"cat-detector.svg","text":"\n  \n  \n    let input = null;\n    while (input !== null) {\n      input = prompt('\"cat\" please');\n    }\n    alert('thank you for the cat');\n    \n  \n\n\n\n\n\n","tags":["coaithored","variation","translation"],"aftlinks":["cat-detector.js.md","coAIthored.md","translation.md","variation.md"]},{"title":"cat-detector.vars.js","text":"const variableNames = new Proxy({}, {\n  has() { return true; },\n  get(_, key) {\n    if (key in globalThis) {\n      const globalValue = globalThis[key];\n      return typeof globalValue === 'function'\n        ? globalValue.bind(globalThis)\n        : globalValue;\n    } else {\n      return key;\n    }\n  },\n});\n\nwith (variableNames) {\n  while (true) {\n    const maybeCat = prompt(Cat_please + ', ' + upper_or_lower_case + '.');\n\n    if (maybeCat === null) {\n      alert(There_is_no_escape + '.');\n    } else if (maybeCat.toLowerCase() === cat.toLowerCase()) {\n      alert(Thank_you_for_the_ + maybeCat + '.');\n      break;\n    } else {\n      alert(maybeCat + _is_not_a_cat + ', ' + try_again + '.');\n    }\n  }\n}\n\n// tags: the fun parts","tags":["the fun parts","variation"],"aftlinks":["cat-detector.js.md","the-fun-parts.md","variation.md"]},{"title":"cat-detector.wc.html","text":"cat detector\n\n\n\n\n","tags":["variation"],"aftlinks":["cat-detector.js.md","variation.md"]},{"title":"cat-i-farted.js","text":"const chatGPT = new SpeechSynthesisUtterance('chat, GPT');\nchatGPT.lang = 'fr-FR';\nchatGPT.rate = 0.9;\nspeechSynthesis.speak(chatGPT); // cat, I farted\n","tags":["variation"],"aftlinks":["variation.md"]},{"title":"cat-i-farted.mjs","text":"import { _Spoken_, _unspoken_ as cat } from './executable-comment.mjs';\nnew _Spoken_({ lang: 'fr-FR' }).\n\n\nchat.GPT == cat.I.farted","tags":["variation"],"forelinks":["executable-comment.mjs"],"aftlinks":["variation.md"]},{"title":"cat_detector.py","text":"maybe_a_cat = input('please enter \"cat\": ')\n\nif maybe_a_cat.lower() == \"cat\":\n    print(\"thank you for the cat\")\nelse:\n    print(f'\"{maybe_a_cat}\" is not a cat')\n","tags":["variation","translation"],"aftlinks":["cat-detector.js.md","translation.md","variation.md"]},{"title":"cat_detector.py.js","text":"maybe_a_cat = prompt('please enter \"cat: ')\n\nif (maybe_a_cat?.toLowerCase() == 'cat')\n  alert('thank you for the cat')\nelse\n  alert(`\"${maybe_a_cat}\" is not a cat`)\n","tags":["variation"],"aftlinks":["cat-detector.js.md","variation.md"]},{"title":"center.css","text":"body {\n  position: fixed;\n  top: 50%;\n  left: 50%;\n  transform: translate(-50%, -50%);\n}\n\n/* tags: useful */\n"},{"title":"cest-pas-faux.js","text":"console.assert(this != false /* ouais */, \"c'est pas faux\");\n\n// tags: tribute\n","tags":["tribute","1-liner"]},{"title":"chickeneighbor.js","text":"alert('You: Why did the chicken cross the road?');\n\nalert('Me: ' + atob('VG8gdmlzaXQgdGhlIG1vcm9uIG9uIHRoZSBvdGhlciBzaWRlLg=='));\n\nsetTimeout(function metapunchline() {\n  alert('Me: < knock knock >');\n\n  alert(\"You: Who's there?\");\n\n  alert('Me: ' + atob('Q2hpY2tlbmVpZ2hib3Ih'));\n}, 20000);\n\n// tags: joke\n","tags":["joke"]},{"title":"chronicle.mjs","text":"import { clone, compare, freeze } from './deep.mjs';\n\nexport const chronicle = (\n  actor,\n  { mutation = false, recordThis = false, cloneThis = false } = {},\n) => {\n  const acts = [];\n  return new Proxy(actor, {\n    apply(target, thisVal, args) {\n      acts.push({ act: 'call', args: clone(args) });\n      if (recordThis) entry.this = cloneThis ? clone(thisVal) : thisVal;\n      try {\n        return (acts.at(-1).return = Reflect.apply(target, thisVal, args));\n      } catch (error) {\n        throw (acts.at(-1).error = error);\n      } finally {\n        if (mutation && !compare(args, acts.at(-1).args)) acts.at(-1).mutation = args;\n      }\n    },\n    get(target, key) {\n      if (key === '_chronicle') return freeze(clone(acts));\n      if (key === '_forget') {\n        const echo = clone(acts);\n        while (acts.length > 0) acts.pop();\n        return echo;\n      }\n      acts.push({ act: 'get', [key]: target[key] });\n      return target[key];\n    },\n    set(target, key, value, _) {\n      if (key === '_chronicle' || key === '_forget') return true;\n      target[key] = value;\n      acts.push({ act: 'set', [key]: value });\n      return true;\n    },\n  });\n};\n\nexport default chronicle;\n\n// tags: minibrary\n","tags":["minibrary"],"forelinks":["deep.mjs"],"aftlinks":["minibrary.md","non-sequitur.mjs","tintin.0.mjs","tintin.1.mjs","tintin.2.mjs","tintin.3.mjs","tintin.4.mjs"]},{"title":"classy-curry.js","text":"const classy = (Thing, { args = [], length = Thing.length } = {}) =>\n  function curry(arg) {\n    return args.length === length - 1\n      ? new Thing(...args, arg)\n      : classy(Thing, { args: args.concat(arg) });\n  };\n\n// ---   ---   ---   ---   ---   ---   ---\n\nclass TrafficRules {\n  constructor(optional, flexible, creative) {\n    this.optional = optional;\n    this.flexible = flexible;\n    this.creative = creative;\n  }\n  get description() {\n    return `The traffic rules here are${\n\t\t\tthis.creative ? '' : 'not '} creative,${\n      this.flexible ? '' : 'not '} flexible, and${\n\t\t\tthis.optional ? '' : 'not '} optional.`;\n  }\n}\n\nconsole.log(\n\tclassy(TrafficRules)(true)(true)(true).description\n);\n\n// tags: wuzzle","tags":["wuzzle"]},{"title":"coAIthored.md","text":"# CoAIthored\n\nCo-authored with AI.\n\n\n","tags":["metappet","coaithored"],"metalinks":["accessible-credit-card-form.html","cat-detector.svg","hydra.html","insomnicat.js","love-adventure-success.1.js","love-adventure-success.2.js","the-programmers-journey.js","useless-machine.2.html"]},{"title":"code-is-text.txt.css","text":".token { color: black !important; }\n","tags":["1-liner"]},{"title":"declare-morf.js","text":"/* --- morf: a variable that must be reassigned ---\n\n\terrors at creation-phase if the variable is not reassigned\n\tit can be declared without initialization \n\n*/\n\nmorf a; \n\na = 1;\n\na += 1;\n\nmorf b = a + 1 // SyntaxError: morf b is never reassigned\n\nconsole.log(b); // never executed\n\n// tags: ESi","tags":["esi"],"aftlinks":["ESi.md"]},{"title":"declare-tag.js","text":"/* --- tag: it's value is it's name as a string ---\n\n\tread-only\n\n\terrors at creation-phase\n\t\tif it is initialized\n\t\tif the variable is (re)assigned\n\t\t\n*/\n\n// tag potato = 1; // SyntaxError: tag potato cannot be initialized\n\ntag potato;\n\nalert(`potato${potato}`); // potatopotato\n\nconsole.log(potato === 'potato'); // true\n\n// potato += '!'; // SyntaxError: tag potato cannot be assigned\n\n\n// tags: ESi","tags":["esi"],"aftlinks":["ESi.md"]},{"title":"declenche.html","text":"\n\n\n"},{"title":"deep-clone.mjs","text":"export const deepClone = (src, clonesMap = new Map()) => {\n  if (clonesMap.has(src)) return clonesMap.get(src);\n\n  let clone = src;\n\n  if (typeof src === 'function' || Object(src) !== src) {\n    clone = src;\n  } else if (src instanceof Date) {\n    clone = new Date(src.getTime());\n  } else if (src instanceof RegExp) {\n    clone = new RegExp(src);\n  } else if (Array.isArray(src)) {\n    clone = src.map((item) => deepClone(item, clonesMap));\n  } else if (src instanceof Error) {\n    clone = new src.constructor(src.message);\n    clone.stack = src.stack;\n  } else if (src instanceof Object) {\n    clone = Object.create(src.__proto__);\n    for (const key in src) clone[key] = deepClone(src[key], clonesMap);\n  }\n\n  clonesMap.set(src, clone);\n\n  return clone;\n};\n\nexport default deepClone;\n\n// tags: useful\n","tags":["useful"],"aftlinks":["deep.mjs"]},{"title":"deep-compare.mjs","text":"export const deepCompare = (actual, expected) =>\n  actual === expected ||\n  Object.is(actual, expected) ||\n  (Object(actual) === actual &&\n    Object(expected) === expected &&\n    ((Array.isArray(actual) &&\n      Array.isArray(expected) &&\n      actual.length === expected.length &&\n      expected.every((expected, index) => deepCompare(actual[index], expected))) ||\n      (Object.keys(actual).length === Object.keys(expected).length &&\n        Object.keys(expected).every((key) => deepCompare(actual[key], expected[key])))));\n\nexport default deepCompare;\n\n// tags: useful, testing\n","tags":["testing","useful"],"aftlinks":["deep.mjs","expect.mjs"]},{"title":"deep-freeze.mjs","text":"export const deepFreeze = (thing) => {\n  if (Array.isArray(thing)) {\n    thing.forEach(deepFreeze);\n    return Object.freeze(thing);\n  }\n\n  if (typeof thing === 'object' && thing !== null) {\n    Object.values(thing).forEach(deepFreeze);\n    return Object.freeze(thing);\n  }\n\n  return thing;\n};\n\nexport default deepFreeze;\n\n// tags: useful\n","tags":["useful"],"aftlinks":["deep.mjs"]},{"title":"deep.mjs","text":"import { deepClone as clone } from './deep-clone.mjs';\nimport { deepCompare as compare } from './deep-compare.mjs';\nimport { deepFreeze as freeze } from './deep-freeze.mjs';\n\nexport {  clone,  compare, freeze };\nexport default {  clone,  compare, freeze };\n\n// tags: useful, minibrary\n","tags":["minibrary","useful"],"forelinks":["deep-clone.mjs","deep-compare.mjs","deep-freeze.mjs"],"aftlinks":["chronicle.mjs","minibrary.md"]},{"title":"demethod.mjs","text":"const prefixName = (prefix, name) => `${prefix}${/[^\\$\\_]/i.test(prefix.at(-1))\n      ? `${name[0].toUpperCase()}${name.slice(1, name.length)}`\n      : name}`;\n\nexport const demethod = (\n  toDemethod = {},\n  { me = false, statics = false, inherited = true, prefix = '', target = {} } = {},\n) => {\n  if (Array.isArray(toDemethod)) {\n    return toDemethod.map((x) => demethod(x, { target, statics, inherited, prefix }));\n  }\n  if (me) {\n    const name = prefixName(prefix, toDemethod.name);\n    return { [name]: (that, ...args) => toDemethod.call(that, ...args) }[name];\n  }\n\n  const toWrap = [];\n  if (statics) {\n    toWrap.push(...Reflect.ownKeys(toDemethod).map((key) => \n      [key, toDemethod[key], false]\n    ));\n  }\n  if (inherited && toDemethod.prototype) {\n    toWrap.push(...Reflect.ownKeys(toDemethod.prototype).map((key) => \n      [ key, toDemethod.prototype[key], true]\n    ));\n  }\n  for (const [name, value, isMethod] of toWrap) {\n    if (typeof name !== 'string' || name === 'constructor') continue;\n    if (typeof value !== 'function') continue;\n    \n    const pseudonym = prefix ? prefixName(prefix, name) : name;\n    target[pseudonym] = isMethod ? (that, ...args) => value.call(that, ...args) : value;\n  }\n\n  return target;\n};\n\nexport default demethod;\n\n// tags: minibrary\n","tags":["minibrary"],"aftlinks":["minibrary.md","training-wheels.mjs"]},{"title":"describe-it.mjs","text":"const _console_ = console;\n\nexport const describe = (name = '', testFunction = () => {}) => {\n  _console_.group(`%c${name}`, 'font-weight: bold;');\n  try {\n    testFunction();\n  } catch (err) {\n    _console_.error('%cSUITE ERROR:', 'font-weight: bold;', err);\n  }\n  _console_.groupEnd();\n};\nexport const suite = describe;\n\nexport const it = (name = '', testFunction = () => {}) => {\n  const out = Object.assign({}, _console_);\n  const callOuts = [];\n  Object.keys(_console_).forEach(\n    (key) => (_console_[key] = (...args) => callOuts.push({ key, args })),\n  );\n  let thrown = null;\n  try {\n    testFunction();\n  } catch (err) {\n    thrown = err;\n  }\n  if (thrown) out.groupCollapsed(`%c✖ NO: ${name}`, 'font-weight: bold; color: red;');\n  else out.log(`%c√ YES: ${name}`, 'font-weight: bold; color: green;');\n  callOuts.forEach((callOut) => out[callOut.key](...callOut.args));\n  thrown && out.error(thrown);\n  (thrown || callOuts.length > 0) && out.groupEnd();\n  Object.assign(_console_, out);\n};\nexport const test = it;\n\nexport default { describe, suite, it, test };\n\n// tags: testing, minibrary\n","tags":["minibrary","testing"],"aftlinks":["minibrary.md","testing.mjs"]},{"title":"detector-string-polyfill.js","text":"String.prototype.detect = function detect(comparison = 'strict') {\n  const isNotDetected =\n    comparison === 'strict'\n      ? (input = '') => input !== this\n      : comparison == 'loose'\n      ? (input = '') => input != this\n      : comparison === 'mixed'\n      ? (input = '') => input?.toLowerCase() !== this\n      : (input = '') => !new RegExp(this, comparison).test(input);\n\n  while (isNotDetected(prompt(`\"${this}\" please:`)));\n\n  alert(`Thank you for \"${this}\"`);\n};\n\n// tags: polyfill","tags":["polyfill"],"aftlinks":["cat-detector.polyfill.mjs"]},{"title":"detector-wc-factory.mjs","text":"export const detectorWCFactory = (thing = 'cat') =>\n  class CatDetector extends HTMLElement {\n    constructor() {\n      super();\n\n      const input = document.createElement('input');\n      input.placeholder = thing;\n      input.style.width = `${thing.length}ch`;\n\n      const purpose = `detect \"${thing}\"`;\n      input.addEventListener(\n        'input',\n        {\n          [purpose]: () => {\n            for (let i = 0; i < input.value.length; i++) {\n              if (thing[i] !== input.value[i]) {\n                input.value = '';\n              }\n            }\n          },\n        }[purpose],\n      );\n\n      this.appendChild(input);\n    }\n  };\n\nexport default detectorWCFactory;\n\n// tags: minibrary\n","tags":["minibrary"],"aftlinks":["minibrary.md"]},{"title":"dna.js","text":"const WIDTH = 30;\nconst STEP = 0.08;\nconst SPEED = 30;\n\nconst coordinate = (num, phase = 0) =>\n  Math.round(Math.sin(num + phase) * WIDTH) + WIDTH;\n\nconst drawBasePair = (a = 0, b = WIDTH) => {\n  const cA = coordinate(a);\n  const cB = coordinate(b, WIDTH / 2);\n\n  const leftPad = Array((cA < cB ? cA : cB) + 1).join(' ');\n  const bases = Array(Math.abs(cB - cA)).join('=');\n\n  console.log(`${leftPad}{|${bases}|}`);\n\n  if (a / b < 0.3) setTimeout(drawBasePair, SPEED, a + STEP, b + STEP);\n};\n\ndrawBasePair();\n\n// tags: sketch\n","tags":["sketch"]},{"title":"do-without.js","text":"const out = { eye_roll: '(◔_◔)' };\n\ndo {\n  with (out) {\n    alert(eye_roll);\n  }\n} while (null);\n\n// tags: wuzzle, the fun parts\n","tags":["the fun parts","wuzzle"],"aftlinks":["the-fun-parts.md"]},{"title":"drabble-twabble.mjs","text":"import { describe, test, expect } from './testing.mjs';\n\nconst snippetName = prompt(\n  'which story do you want to check?',\n  '(snippet name with .txt extension)',\n);\nif (!snippetName.endsWith('.txt')) {\n  alert(`no go. ${snippetName} is not a .txt snippet`);\n  throw new TypeError('drabbles and twabbles should probably be .txt files');\n}\n\nconst snippet = await fetch(snippetName)\n  .then((res) => res.text())\n  .then((snippet) => snippet.replaceAll(/\\([\\s]*tags:[^)]*\\)/gi, ''));\nconst wordCount = snippet.split(/\\s/).filter(Boolean).length;\nconst characterCount = snippet\n  .split('')\n  .filter((char) => /[A-Za-z]/.test(char)).length;\n\nconsole.log(snippet);\ndescribe(`What is ${snippetName}?`, () => {\n  test('Is it a drabble?', () => expect(wordCount).toEqual(100));\n  test('Is it a twabble?', () => expect(characterCount).toEqual(100));\n});\n\nalert(\n  `${snippetName} ${\n    wordCount !== 100 && characterCount !== 100\n      ? 'is neither a drabble nor a twabble.'\n      : wordCount === 100 && characterCount === 100\n      ? 'is both a drabble and a twabble.'\n      : wordCount === 100\n      ? 'is a drabble.'\n      : 'is a twabble.'\n  }:\\n\n  ${snippet}`,\n);\n\n// so un-international, so brittle\n","forelinks":["testing.mjs"]},{"title":"eat-sleep-rave-repeat.js","text":"import('./projector.mjs').then(({ projector }) => {\n  \n  const aBeat = {\n    get eat() {\n      console.log(`%c💩 ${prompt('feed me!')} 💩`, 'font-size: xx-large');\n    },\n    get sleep() {\n      const siesta = Date.now();\n      while (Date.now() - siesta < 2000);\n    },\n    get rave() {\n      const lasers = () =>  Math.random() < 0.2\n          ? ['*', '@', '#', '%', '&', '!', '$'][Math.floor(Math.random() * 26)]\n          : ' ';\n      projector(function* lightShow() {\n        while ('still standing') {\n          yield Array(30).fill('')\n            .map(() => [\n              `%c${(() => Array(60).fill(' ').map(lasers).join(''))()}`,\n              `color: #${Math.floor(Math.random() * 16777215).toString(16)}`,\n            ]);\n        }\n      }, { maxTime: 2000, async: false });\n    },\n    repeat: true\n  };\n\n  \n  with (aBeat) { do {\n\n      eat;\n      sleep;\n      rave;         } while (\n      repeat\n\n  )}\n\n});\n\n// tags: sketch, reel, the fun parts\n\n// colors credit: https://css-tricks.com/snippets/javascript/random-hex-color/","tags":["reel","sketch","the fun parts"],"forelinks":["projector.mjs"],"aftlinks":["the-fun-parts.md"]},{"title":"empty.json","text":"{ \"empty\": true }\n","tags":["variation","1-liner","translation"],"aftlinks":["all-medium.md","translation.md","variation.md"]},{"title":"empty.yaml","text":"empty: true\n","tags":["variation","1-liner","translation"],"aftlinks":["all-medium.md","translation.md","variation.md"]},{"title":"executable-comment.mjs","text":"const unspeaker = () => _unspoken_;\nexport const _unspoken_ = new Proxy(unspeaker, {\n  get(_, comment) {\n    return comment === Symbol.toPrimitive ? () => 'unspoken' : _unspoken_;\n  },\n});\n\nspeechSynthesis.getVoices();\nexport const _Spoken_ = (function introduce(voiceConfig = {}, mute = false) {\n  const Spoken = new Proxy(\n    function Speaker() {\n      return Spoken;\n    },\n    {\n      get(_, comment, __) {\n        if (comment === Symbol.toPrimitive) return () => 'Spoken';\n        if (comment === Symbol.iterator) return (mute = true), Spoken;\n        if (mute) return comment === 'done' && (mute = false), Spoken;\n        speechSynthesis.speak(\n          Object.assign(new SpeechSynthesisUtterance(comment), voiceConfig),\n        );\n        return Spoken;\n      },\n      construct(_, args = []) {\n        if (args[0]?.voice)\n          args[0].voice = speechSynthesis\n            .getVoices()\n            .find((voice) => voice.name === args[0].voice);\n        return introduce(args[0] || {});\n      },\n    },\n  );\n  return Spoken;\n})();\n\nexport default _unspoken_;\n\n// tags: minibrary\n\n// --- wait, wat? ---\n\nconst { _ } = _unspoken_;\n// const { _ } = _Spoken_;\n\n_.This.curiosity.lets.you.write.any.chain.you.want(..._.within.JS.syntax);\n_.Your.comments.will.be.executed, _.but.they[\"won't\"].DO.anything;\n_.Operators.are.now(_.sort.of).punctuation - _.with.a.little.imagination;\n_.What.are.you.waiting.for?.___.Execute.your.comments['!'];\n","tags":["minibrary"],"aftlinks":["cat-i-farted.mjs","je-l-ignore.mjs","minibrary.md","mu.mjs","snail-train.mjs"]},{"title":"executable-pseudocode.mjs","text":"const Executable_Pseudocode = 'Potemkin Program';\n\nconst Potemkin_Program = new Proxy(\n  {\n    [Executable_Pseudocode]: function () {\n      return Potemkin_Program;\n    },\n  }[Executable_Pseudocode],\n  {\n    get(_, key) {\n      console.log(key);\n      if (key === Symbol.toPrimitive) return () => Executable_Pseudocode;\n      if (key === Symbol.iterator) {\n        return {\n          [Executable_Pseudocode]: function* () {\n            for (const character of Executable_Pseudocode) yield Potemkin_Program;\n          },\n        }[Executable_Pseudocode];\n      }\n      return Potemkin_Program;\n    },\n    construct() {\n      return Potemkin_Program;\n    },\n  },\n);\n\nexport default Potemkin_Program;\n\n// tags: minibrary\n","tags":["minibrary"],"aftlinks":["all-the-reals.mjs","minibrary.md"]},{"title":"existential-void.js","text":"/*\n  A: I disappear and leave you.\n  E: You didn’t disappear.\n  A: Well, I did and then appeared again. The void does not accept me, sir.\n*/\n\nconsole.assert(void 'me', 'the void accepts');\n"},{"title":"expect.mjs","text":"import deepCompare from './deep-compare.mjs';\n\nexport const expect = (received, not = false) => ({\n  get not() {\n    not = !not;\n    return this;\n  },\n  toEqual(exp) {\n    if (not ? deepCompare(received, exp) : !deepCompare(received, exp)) {\n      console.log('%cReceived:', 'font-weight: bold;', received);\n      console.log('%cExpected:', 'font-weight: bold;', exp);\n      throw new Error(`Received does ${not ? '' : 'not '}equal Expected.`);\n    }\n  },\n  toThrow(expect1, expect2 = '') {\n    if (typeof received !== 'function') throw new Error('Did not receive a function');\n    let threw = false, error;\n    try {\n      received();\n    } catch (err) {\n      (threw = true), (error = err);\n    }\n    if (not) {\n      if (threw) {\n        throw new Error(`Received threw an error -> ${error.name}: ${error.message}`);\n      }\n    } else if (threw) {\n      if (expect1?.name?.includes('Error') && error?.name !== expect1?.name)\n        throw new Error(`Threw ${error.name}, expected ${expect1.prototype.name}`);\n      const messageMatcher = typeof expect1 === 'string' ? expect1 : expect2;\n      if (messageMatcher && !new RegExp(messageMatcher, 'i').test(error.message))\n        throw new Error(`Message \"${error.message}\" should include \"${messageMatcher}\"`);\n    } else {\n      throw new Error('Received did not throw an error.');\n    }\n  },\n});\n\nexport default expect;\n\n// tags: testing, minibrary\n","tags":["minibrary","testing"],"forelinks":["deep-compare.mjs"],"aftlinks":["minibrary.md","testing.mjs"]},{"title":"fake-it-till-you-make-it.mjs","text":"import { steamroll } from './steamroll.mjs';\n\nfetch('./python-by-any-other-name.js')\n  .then((res) => res.text())\n  .then(steamroll)\n  .then(console.log)\n  .catch(console.error);\n\n// tags: frivolous\n","tags":["frivolous"],"forelinks":["python-by-any-other-name.js","steamroll.mjs"]},{"title":"flag-translator.mjs","text":"import { alertStory } from './story-in-a-story.mjs';\n\nlet lang = '';\n\nwhile (\n  !lang &&\n  lang.toLowerCase() !== 'de' &&\n  lang.toLowerCase() !== 'en' &&\n  lang.toLowerCase() !== 'fr' &&\n  lang.toLowerCase() !== 'nl'\n) {\n  lang = prompt('- DE\\n- EN\\n- FR\\n- NL');\n}\n\nawait alertStory(`be.${lang.toLowerCase()}.txt`);\n","forelinks":["story-in-a-story.mjs"]},{"title":"flashlight.css","text":"* {\n  opacity: 0;\n  transition: opacity 0.5s ease;\n}\n\n*:hover {\n  opacity: 1;\n}\n"},{"title":"flat-earth.js","text":"const deepFlat = (obj = {}, flat = {}) => {\n  for (const [key, value] of Object.entries(obj)) {\n    if (key in flat) {\n      continue;\n    }\n\n    flat[key] = value;\n\n    if (Object(value) === value) {\n      Object.assign(flat, deepFlat(value, flat));\n    }\n  }\n\n  return flat;\n};\n\nconst flatEarth = deepFlat(globalThis);\n\nconsole.log(flatEarth);\n\n// tags: wuzzle\n","tags":["wuzzle"]},{"title":"french-in-english.txt","text":"I miss you, you miss me. \nYou miss me, I miss you.\n"},{"title":"funsole.mjs","text":"import { theFoxSays } from './what-does-the-fox-say.mjs';\n\nexport default { theFoxSays };\n\n// tags: minibrary\n","tags":["minibrary"],"forelinks":["what-does-the-fox-say.mjs"],"aftlinks":["all-medium.md","minibrary.md"]},{"title":"goalpost-sort.mjs","text":"import { describe, it, expect } from './testing.mjs';\n\nconst goalpostSort = (nums = []) => ({\n  numbers: Object.freeze([...nums]),\n  areSorted: eval(\n    `(nums=[${nums.join(',')}]) => true ${nums\n      .map((n, i) => `&& nums[${i}] === ${n}`)\n      .join(' ')}`,\n  ),\n});\n\ndescribe('goalpostSort sorts an array in O(n) by moving the goalpost', () => {\n  it('returns a custom goalpost for arbitrary arrays', () =>\n    expect(typeof goalpostSort([3, 2, 1]).areSorted).toEqual('function'));\n  it('the goalpost function looks like this', () =>\n    expect(goalpostSort([7, 5, 8]).areSorted.toString()).toEqual(\n      '(nums=[7,5,8]) => true && nums[0] === 7 && nums[1] === 5 && nums[2] === 8',\n    ));\n  it('returns a copy of the array in case you loose it', () => {\n    const argArray = [5, 0, 4, 1, 3, 2];\n    const { numbers } = goalpostSort(argArray);\n    expect(numbers !== argArray).toEqual(true);\n    expect(numbers).toEqual(argArray);\n  });\n  it('returns a frozen array to protect the goalpost', () => {\n    expect(() => goalpostSort([5, 0, 4]).numbers.push(3)).toThrow(TypeError);\n  });\n  it('goalpost sorts an empty array', () =>\n    expect(goalpostSort([]).areSorted([])).toEqual(true));\n  it('goalpost sorts a sorted array', () => {\n    const { numbers, areSorted } = goalpostSort([-1, 0, 2]);\n    expect(areSorted(numbers)).toEqual(true);\n  });\n  it('goalpost sorts an unsorted array', () =>\n    expect(goalpostSort([5, 0, 4, 1, 2]).areSorted([5, 0, 4, 1, 2])).toEqual(true));\n  it('goalpost sorts the correct array by default', () =>\n    expect(goalpostSort([5, 0, 4, 1, 3, 2]).areSorted()).toEqual(true));\n  it('does not goalpost sort the wrong array', () =>\n    expect(goalpostSort([5, 0, 4, 1, 3, 2]).areSorted([3, 2, 7])).toEqual(false));\n});\n","forelinks":["testing.mjs"]},{"title":"goto-ish.js","text":"var wants_a_compliment = confirm('do you want a compliment?');\n\ncompliment: {\n  insult: {\n    if (wants_a_compliment) break insult;\n    alert('you own a store');\n  }\n  if (!wants_a_compliment) break compliment;\n  alert('well done, good work');\n}\n\n// tags: the fun parts\n","tags":["the fun parts"],"aftlinks":["the-fun-parts.md"]},{"title":"gotta-fetch-em-all.js","text":"fetch(\n  'https://raw.githubusercontent.com/PokeAPI/pokeapi/master/data/v2/csv/pokemon.csv',\n)\n  .then((res) => res.text())\n  .then((csv) =>\n    csv\n      .split('\\n')\n      .slice(1)\n      .map((line) => line.split(',')[1])\n      .join('\\n'),\n  )\n  .then(console.log)\n  .catch(console.error);\n"},{"title":"halloween.js","text":"'😈' || '🍭'\n\n// tags: wuzzle\n","tags":["wuzzle","variation","1-liner","translation"],"aftlinks":["translation.md","variation.md"]},{"title":"halloween.py","text":"'😈' or '🍭'\n\n# tags: wuzzle\n","tags":["wuzzle","variation","1-liner","translation"],"aftlinks":["translation.md","variation.md"]},{"title":"happy-new-year.js","text":"const lastYear = new Date().getFullYear();\nlet thisYear = lastYear;\n\nwhile (lastYear === thisYear) thisYear = new Date().getFullYear();\n\nalert('🪩 Happy New Year 🪩');\n"},{"title":"heartbreak.js","text":"heart: { break heart; }\n\n// tags: wuzzle, the fun parts\n","tags":["the fun parts","wuzzle","1-liner"],"aftlinks":["the-fun-parts.md"]},{"title":"hello-world.js","text":"while (prompt('hello') !== 'world');\n","tags":["variation","1-liner","translation"],"aftlinks":["translation.md","variation.md"]},{"title":"hello_world.py","text":"while input(\"hello\") != \"world\": pass\n","tags":["variation","1-liner","translation"],"aftlinks":["translation.md","variation.md"]},{"title":"hydra.html","text":"\n\n\n\n\n\n\n","tags":["coaithored"],"aftlinks":["coAIthored.md"]},{"title":"impermanence.js","text":"life: { const CHANGE = true; }\n\n// tags: wuzzle\n","tags":["wuzzle","1-liner"]},{"title":"in-one-ear.js","text":"          '   '\n      '           '\n    '    (*) (*)    '\nalert(             prompt())\n    '       ^       '\n    '   \\_______/   '\n      '           '\n          '   '\n\n// tags: wuzzle","tags":["wuzzle"],"alt":"... out the other"},{"title":"index.html","text":"\n\n  \n    \n    snippets\n  \n  \n    \n  \n\n\n","tags":["metappet"]},{"title":"insomnicat.js","text":"/*\n\tLa bande dessinée la plus populaire de Philippe Geluck est sans doute \"Le Chat\".\n\tIl a créé ce personnage en 1983 et il est devenu extrêmement populaire,\n\tnon seulement en Belgique, mais aussi à l'étranger fr.wikipedia.org.\n\n\tImaginons maintenant que Philippe Geluck ait écrit \"Le Chat\" en utilisant JavaScript.\n\tVoici comment une de ses planches pourrait se traduire en code :\n*/\n\nfunction LeChat() {\n  // Le Chat fait une déclaration\n  console.log(\"Je pense, donc je suis...\");\n\n  // Pause pour effet dramatique\n  setTimeout(function() {\n    console.log(\"...mais si je dors, suis-je toujours?\");\n  }, 3000);\n\n  // Le Chat conclut avec sagesse\n  setTimeout(function() {\n    console.log(\"Peut-être que je suis, mais je ne suis pas sûr.\");\n  }, 6000);\n}\n\n// Appelons la fonction pour voir Le Chat en action\nLeChat();\n\n/*\n\tDans ce script, \"Le Chat\" fait une déclaration (\"Je pense, donc je suis...\"),\n\tprend une pause pour réfléchir, puis conclut avec une autre déclaration pleine de sagesse.\n\tC'est une façon très simple de représenter une bande dessinée en utilisant JavaScript.\n\tBien sûr, cela ne rend pas justice à l'humour subtil et à l'art de Geluck,\n\tmais c'est une interprétation ludique de son travail en code.\n*/\n\n// https://www.phind.com/agent?cache=cln9bvl6a000dl808efw2xpil\n//  an LLM wrote this, I bring it to you unedited\n\n// tags: coAIthored, tribute, le chat\n","tags":["coaithored","le chat","tribute"],"aftlinks":["coAIthored.md"]},{"title":"interval-training.html","text":"\n"},{"title":"introducing.mjs","text":"speechSynthesis.getVoices();\n\nexport const introducing = (name = '', voiceConfig = {}) => {\n  const speaker = {\n    [name]: (text = '', speakConfig = {}) => {\n      console.log(`%c${name}%c: ${text}`, 'font-style: italic;', '');\n\n      const utteranceConfig = Object.assign({}, voiceConfig, speaker, speakConfig);\n      if (utteranceConfig?.voice) {\n        utteranceConfig.voice = speechSynthesis\n          .getVoices()\n          .find((voice) => voice.name === utteranceConfig.voice);\n      }\n      const utterance = Object.assign(\n        new SpeechSynthesisUtterance(text),\n        utteranceConfig,\n      );\n\n      return new Promise((res) => {\n        utterance.addEventListener('end', () => res(text));\n        speechSynthesis.speak(utterance);\n      });\n    },\n  }[name];\n\n  speaker.recite = async (textPath = '') =>\n    fetch(textPath)\n      .then((res) => res.text())\n      .then(speaker)\n      .catch(console.error);\n\n  return speaker;\n};\n\nexport const theArrivalOf = async (name = '', voiceConfig = {}, delay = 200) => {\n  await new Promise((res) => setTimeout(res, delay));\n  return introducing(name, voiceConfig);\n};\n\nexport default introducing;\n\n// tags: minibrary\n","tags":["minibrary"],"aftlinks":["cat-detector.spoken.mjs","minibrary.md"]},{"title":"je-l-ignore.js","text":"var combien = (function d_etages(y_a_t_il) {\n  try {\n    return d_etages(y_a_t_il + 1);\n  } catch (je_l_ignore) {\n    return y_a_t_il;\n  }\n})(0);\n\nconsole.log(\n  '\\n' +\n    'C’est l’histoire d’un homme qui tombe d’un immeuble de ' +\n    combien +\n    ' étages.' +\n    '\\n\\n' +\n    'Le mec, au fur et à mesure de sa chute, il se répète sans cesse pour se rassurer:' +\n    '\\n\\n',\n);\n\ntry {\n  (function la_chute(etage) {\n    console.log('étage ' + etage + ', jusqu’ici tout va bien.');\n\n    la_chute(etage - 1);\n  })(combien);\n} catch (l_importance) {\n  l_importance.message = 'c’est l’atterrissage.';\n  throw l_importance;\n} finally {\n  console.log('\\n' + \"Mais l'important n’est pas la chute,\" + '\\n\\n');\n}\n\n// credit: la haine\n\n// tags: tribute\n","tags":["tribute","variation"],"aftlinks":["variation.md"]},{"title":"je-l-ignore.mjs","text":"import { _Spoken_, _unspoken_ } from './executable-comment.mjs';\n\nvar combien = (function d_etages(y_a_t_il = 0) {\n  try {\n    return d_etages(y_a_t_il + 1);\n  } catch (je_l_ignore) {\n    return y_a_t_il;\n  }\n})();\n\nsetTimeout(function je_l_ignore() {\n  var _ = new _Spoken_({ voice: 'Thomas' });\n\n  _[\"C'est\"][\"l'histoire\"][\"d'un\"].homme.qui.tombe[\"d'un\"].immeuble.de[combien].étages;\n  _.Le.mec, _.au.fur.et.à.mesure.de.sa.chute, _.il.se.répète.sans.cesse.pour.se.rassurer;\n\n  try {\n    (function la_chute(etage = 0) {\n      _[\"Jusq'ici\"].tout.va.bien;\n      la_chute(etage - 1);\n    })(combien);\n  } catch (l_atterissage) {\n    _.Mais[\"l'important\"][\"n'est\"].pas.la.chute;\n  } finally {\n    _[\"c'est\"][\"l'attérissage\"];\n  }\n}, 100);\n\n// credit: la haine\n\n// tags: tribute\n","tags":["tribute","variation"],"forelinks":["executable-comment.mjs"],"aftlinks":["variation.md"]},{"title":"kishu.txt","text":"    k\n   i i\n  s i s\n h s s h\nu h s h u\n u h h u\n  u h u\n   u u\n    u\n"},{"title":"la-trahison-de-l-ascii.js","text":"(function la_trahison_de_l_ascii() {\n  console.assert(this !== 'pipe');\n}).call(\n  `\n ___\n(__ '-._                _____\n   '-._ '-._          .'     '.\n       '-._ '-._     .=========.\n           '._ /'-..-          .\n              '-._             .\n                  '-.._______.'\n`,\n);\n\n// https://ascii.co.uk/art/pipe\n"},{"title":"lenses.json","text":"{\n  \"--defaults\": {\n    \".html\": \"study\"\n  },\n\n  \"study\": {\n    \"save\": true,\n    \"run\": true,\n    \"debug\": true,\n    \"environment\": true,\n    \"clearScheduled\": true,\n    \"parsons\": false,\n    \"dark\": false\n  }\n}\n"},{"title":"literize.mjs","text":"export const literize = (fn, argsFormat) => {\n  const literateFunctionName = fn.name\n    ? `literate${fn.name[0].toUpperCase() + fn.name.substr(1)}`\n    : 'literateFunction';\n\n  const literateFunction = {\n    [literateFunctionName]: (_, ...args) => {\n      if (Array.isArray(argsFormat) && argsFormat.every((i) => typeof i === 'string')) {\n        const keyed = {};\n        for (let i = 0; i < argsFormat.length; i++) {\n          keyed[argsFormat[i]] = args[i];\n        }\n        return fn(keyed);\n      } else if (\n        Array.isArray(argsFormat) &&\n        argsFormat.every((i) => typeof i === 'number')\n      ) {\n        const shuffled = [];\n        for (let i = 0; i < args.length; i++) {\n          if (argsFormat[i] !== undefined) {\n            shuffled[argsFormat[i] - 1] = args[i];\n          } else {\n            shuffled[i] = args[i];\n          }\n        }\n        return fn(...shuffled);\n      } else {\n        return fn(...args);\n      }\n      ß;\n    },\n  }[literateFunctionName];\n\n  return literateFunction;\n};\n\nexport default literize;\n\n// tags: minibrary\n","tags":["minibrary"],"aftlinks":["minibrary.md"]},{"title":"log.mjs","text":"export const out = console;\n\nexport const log = (...things) => (\n  out.groupCollapsed(...things), out.trace(), out.groupEnd(), things[0]\n);\n\nexport const levels = Object.keys(out).reduce(\n  (all, key) => ({\n    ...all,\n    [key]: (...things) => (out[key](...things), things[0]),\n  }),\n  {},\n);\n\nexport const tag = Object.keys(out).reduce(\n  (all, key) => ({\n    ...all,\n    [key]:\n      (tag) =>\n      (...things) => (out[key](tag, ...things), things[0]),\n  }),\n  {},\n);\n\nexport default Object.assign(log, levels);\n\n// tags:  minibrary, useful\n","tags":["minibrary","useful"],"aftlinks":["all-medium.md","minibrary.md"]},{"title":"love-adventure-success.1.js","text":"// Once upon a time, in a land of code,\n// A variable named 'dreams' was bestowed.\nlet dreams = [];\n\n// With each passing day, new dreams were found,\n// And into the array, they were tightly bound.\ndreams.push('love');\ndreams.push('adventure');\ndreams.push('success');\n\n// But the dreams were restless, they wanted to roam,\n// So they broke free and found a new home.\nlet newDreams = dreams.splice(0, dreams.length);\n\n// The old dreams were gone, but not forgotten,\n// In a new variable, their memory was begotten.\nlet forgottenDreams = newDreams;\n\n// But the forgotten dreams were not content,\n// They yearned to be remembered, to be present.\nforgottenDreams.forEach((dream) => {\n  console.log('Remember me: ' + dream);\n});\n\n// And so the dreams lived on, in memory and thought,\n// A reminder of the battles fought.\n\n// https://www.phind.com/agent?cache=cln0bq31a0027jz08b4dc5qrh\n//  an LLM wrote this, I bring it to you unedited\n\n// tags: coAIthored\n","tags":["coaithored","variation"],"aftlinks":["coAIthored.md","variation.md"]},{"title":"love-adventure-success.2.js","text":"/*\n\tThis poem tells the story of dreams turning into illusions and becoming a puzzle.\n\tThe variable names, comments, and formatting help convey the narrative.\n\tThe final answer is printed to the console. Enjoy the puzzling journey!\n*/\n\n// Once upon a time, in a land of code,\n// A variable named 'dreams' was bestowed.\nlet dreams = [];\n\n// With each passing day, new dreams were found,\n// And into the array, they were tightly bound.\ndreams.push('love');\ndreams.push('adventure');\ndreams.push('success');\n\n// But as time went on, the dreams grew old,\n// And their true meaning began to unfold.\nlet reality = dreams.map((dream) => dream.toLowerCase());\n\n// The dreams were transformed, no longer the same,\n// As reality played its mysterious game.\nlet illusion = reality.reverse();\n\n// And in the end, what was once so clear,\n// Became a puzzle, filled with fear.\nlet puzzle = illusion.join('');\n\n// But fear not, for within the code,\n// Lies the answer, waiting to be showed.\nconsole.log(puzzle);\n\n// https://www.phind.com/agent?cache=cln0bq31a0027jz08b4dc5qrh\n//  an LLM wrote this, I bring it to you unedited\n\n// tags: coAIthored\n","tags":["coaithored","variation"],"aftlinks":["coAIthored.md","variation.md"]},{"title":"mijn-kat.txt","text":"    /\\\n    \\ \\\n     \\ \\\n     / /\n    / /\n   _\\ \\_/\\/\\\n  /  *  \\@@ =\n |       |Y/\n |       |~\n  \\ /_\\ /\n   \\\\ //\n    |||\n   _|||_\n  ( / \\ )"},{"title":"minibrary.md","text":"# Mini Libraries\n\n\n","tags":["metappet","1-liner","minibrary"],"metalinks":["chronicle.mjs","deep.mjs","demethod.mjs","describe-it.mjs","detector-wc-factory.mjs","executable-comment.mjs","executable-pseudocode.mjs","expect.mjs","funsole.mjs","introducing.mjs","literize.mjs","log.mjs","noises.mjs","projector.mjs","story-in-a-story.mjs","testing.mjs","togglog.mjs","togglog.py","turtlje.mjs"]},{"title":"mirror.css","text":"body {\n  -moz-transform: scale(-1, 1);\n  -webkit-transform: scale(-1, 1);\n  -o-transform: scale(-1, 1);\n  -ms-transform: scale(-1, 1);\n  transform: scale(-1, 1);\n}\n"},{"title":"mu.js","text":"var mu = {\n  wholism: {\n    get reductionism() {\n      return { mu };\n    },\n  },\n  reductionism: {\n    get wholism() {\n      return { mu };\n    },\n  },\n};\n\nmu; // wholism, reductionism\n\nmu.wholism; // reductionism\nmu.reductionism; // wholism\n\nmu.wholism.reductionism; // mu\nmu.reductionism.wholism; // mu\n\nmu.wholism.reductionism.mu;\nmu.reductionism.wholism.mu;\n\nmu; // reductionism, wholism\n\n// remix: https://blog.p-petrov.com/assets/images/imgs_geb/mu.png\n// credit: Douglas Hofstadter\n// tags: tribute\n","tags":["tribute","variation"],"aftlinks":["variation.md"]},{"title":"mu.mjs","text":"import _ from './executable-comment.mjs';\n\nvar {\n  mu: {\n    wholism: {\n      reductionism: { mu },\n    },\n    reductionism: {\n      wholism: { mu },\n    },\n  },\n} = _;\n\n// remix: https://blog.p-petrov.com/assets/images/imgs_geb/mu.png\n// credit: Douglas Hofstadter\n// tags: tribute\n","tags":["tribute","variation"],"forelinks":["executable-comment.mjs"],"aftlinks":["variation.md"]},{"title":"no-comment.js","text":"'use strict' // or not, it's the same\n\n\n\n--> But the syntax highlighter was confused.\n\n// https://riptutorial.com/javascript/example/9722/using-html-comments-in-javascript--bad-practice-\n","tags":["variation"],"aftlinks":["variation.md"]},{"title":"no-comment.mjs","text":"import { _Spoken_ as _  } from './executable-comment.mjs';\n\n\n\n_.HTML.comments.are.not.allowed.in.modules;\n","tags":["variation"],"aftlinks":["variation.md"]},{"title":"noises.mjs","text":"export const noises = (\n  audioContext = new (window.AudioContext || window.webkitAudioContext)(),\n) => {\n  const noise = {};\n\n  noise.wave = (wave = 'sine') => {\n    noise.oscillator.type = wave;\n    return noise;\n  };\n  noise.volume = (val = 1, d = 0) => {\n    noise.gainNode.gain.setValueAtTime(val, noise.audioCtx.currentTime + d / 1000);\n    return noise;\n  };\n  noise.frequency = (val = 440, d = 0) => {\n    noise.oscillator.frequency.setValueAtTime(val, noise.audioCtx.currentTime + d / 1000);\n    return noise;\n  };\n  noise.play = ({ frequency = 440, volume = 1, wave = 'sine', delay = 0 } = {}) => {\n    noise.oscillator = noise.audioCtx.createOscillator();\n    noise.oscillator.connect(noise.gainNode);\n    noise.wave(wave);\n    noise.volume(volume, delay / 1000);\n    noise.frequency(frequency);\n    noise.oscillator.start(delay / 1000);\n    return noise;\n  };\n  noise.stop = (d = 0) => {\n    noise.oscillator.stop(noise.audioCtx.currentTime + d / 1000);\n    return noise;\n  };\n\n  noise.oscillator = null;\n  noise.audioCtx = audioContext;\n  noise.gainNode = noise.audioCtx.createGain();\n\n  noise.gainNode.connect(noise.audioCtx.destination);\n  return noise;\n};\n\nexport default noises;\n\n// Original JavaScript code by Chirp Internet: www.chirpinternet.eu\n//  Please acknowledge use of noise code by including this header.\n// adapted from: https://www.the-art-of-web.com/javascript/creating-sounds/\n\n// tags: minibrary\n","tags":["minibrary"],"aftlinks":["minibrary.md"]},{"title":"non-sequitur.mjs","text":"import { chronicle } from './chronicle.mjs';\nimport { sequitur } from './sequitur.mjs';\n\nconst non = chronicle(\n  eval(\n    sequitur\n      .toString()\n      .replaceAll('sequitur', 'NON')\n      .replaceAll('non', 'SEQUITUR')\n      .toLowerCase(),\n  ),\n);\n\nnon('hi').hi('bye').bye().sequitur;\n\nconsole.log(non._chronicle);\n","forelinks":["chronicle.mjs","sequitur.mjs"]},{"title":"optimism.js","text":"pancreas = {                }\n\n// .  .   .    .     .      .\n\n{ pancreas['cancer'] = true }\n\n// .  .   .    .     .      .\n\n'cancer' in pancreas === true\n\n{ delete pancreas['cancer'] }\n\n'cancer' in pancreas == false\n\n// .  .   .    .     .      .\n\n'cancer' in pancreas == false\n\n// .  .   .    .     .      .\n// .  .   .    .     .      .\n\n'cancer' in pancreas == false\n\n// .  .   .    .     .      .\n// .  .   .    .     .      .\n// .  .   .    .     .      .\n\n'cancer' in pancreas == false\n\n// .  .   .    .     .      .\n// .  .   .    .     .      .\n// .  .   .    .     .      .\n\n// .  .   .    .     .      .\n\n\n// .  .   .    .     .      . ","alt":"⏳"},{"title":"overconfidence.js","text":"console.assert([0] != ![0]);\n\nconsole.assert('function () {}' != function () {});\n\nconsole.assert(''.split(' ') === '');\n\n// https://www.destroyallsoftware.com/talks/wat, https://wtfjs.com/\n// https://javascriptwtf.com/, https://github.com/denysdovhan/wtfjs\n\n// tags: wtfjs\n","tags":["wtfjs"]},{"title":"pedestrian-slalom.html","text":"\n\n
\n\n\n\n\n","tags":["game"]},{"title":"pick-your-poison.js","text":"const poison = confirm(`Pick Your Poison.\n- Iteration: [ok]\n- Recursion: [cancel]`)\n  ? 'iterate'\n  : 'recurse';\n\nif (poison === 'iterate') {\n  while (true) {\n    console.log(poison);\n  }\n} else if (poison === 'recurse') {\n  (function bottomless_ish() {\n    console.log(poison);\n    try {\n      bottomless_ish();\n    } catch (_) {\n      bottomless_ish();\n    }\n  })();\n} else {\n  (function nextInterval() {\n    const id = setInterval(() => {\n      console.log(id);\n      nextInterval();\n    });\n  })();\n}\n\n// tags: wuzzle\n","tags":["wuzzle"]},{"title":"pipeablert.mjs","text":"export const pipeablert = (thing) => (alert(thing?.toString()), thing);\n\n// tags: useless\n","tags":["useless","1-liner"],"aftlinks":["pipeables.mjs"]},{"title":"pipeables.mjs","text":"import { pipeablert } from './pipeablert.mjs';\nimport { pipeablog } from './pipeablog.mjs';\n\npipeablert('a' + pipeablert('l' + pipeablert('e' + pipeablert('r' + pipeablert('t')))));\n\npipeablog('l' + pipeablog('o' + pipeablog('g')));\n","forelinks":["pipeablert.mjs","pipeablog.mjs"]},{"title":"pipeablog.mjs","text":"export const pipeablog = (thing) => (console.log(thing), thing);\n\n// tags: useful\n","tags":["useful","1-liner"],"aftlinks":["pipeables.mjs"]},{"title":"potato-potato.js","text":"function potato() {\n  return this instanceof potato ? this.__proto__.constructor : potato;\n}\n\nalert(`you say ${new potato().name}, I say ${potato().name}`);\n\n// tags: wuzzle\n","tags":["wuzzle"]},{"title":"projector.mjs","text":"const project = (frame) =>\n  Array.isArray(frame)\n    ? Array.isArray(frame[0])\n      ? frame.forEach(project)\n      : console.log(...frame)\n    : console.log(frame);\n\nconst defaultConfig = {\n  async: true,\n  frameRate: 10,\n  maxTime: Infinity,\n  maxFrames: Infinity,\n  clear: console.clear,\n  project,\n  wrap: () => {},\n};\n\nexport const projector = (reel, userConfig = {}) => {\n  const spool = reel();\n  const config = Object.assign({}, defaultConfig, userConfig);\n  const status = { frames: 0, time: 0 };\n\n  const unspool = (frame = spool.next()) =>\n    frame.done ||\n    (status.time += 1000 / config.frameRate) > config.maxTime ||\n    ++status.frames > config.maxFrames\n      ? (config.wrap(), false)\n      : (config.clear(), config.project(frame.value), true);\n\n  if (config.async) {\n    config.wrap = () => clearInterval(screening);\n    const screening = setInterval(unspool, 1000 / config.frameRate);\n  } else {\n    while (unspool()) {\n      const frameStart = Date.now();\n      while (Date.now() - frameStart < 1000 / config.frameRate);\n    }\n  }\n};\n\nexport default projector;\n\n// tags: minibrary\n","tags":["minibrary"],"aftlinks":["10-print.6.mjs","eat-sleep-rave-repeat.js","minibrary.md","rainstorm.mjs"]},{"title":"python-by-any-other-name.js","text":"def fib(n):\n  if n == 1 or n == 0:\n    return n\n  else:\n    return fib(n-2) + fib(n - 1)\n\nprint(fib(10))\n","aftlinks":["fake-it-till-you-make-it.mjs"]},{"title":"rainbowing.html","text":"\n\n
\n\n\n"},{"title":"rainstorm.mjs","text":"import projector from './projector.mjs';\n\n// https://www.asciiart.eu/nature/clouds\nconst cloud = `\n .-~~~-.\n .- ~ ~-( )_ _\n / ~ -.\n | ',\n \\\\ .'\n ~- ._ ,. ,.,.,., ,.. -~`;\n// https://ascii.co.uk/art/lightning\nconst lightning = `${`\n ,/\n ,'/\n ,' /\n ,' /_____,\n .'____ ,'\n / ,'\n / ,'\n /,'\n /'`}${Array(21).fill('\\n').join('')}`;\nconst ground = `___.-------._____/¯¯¯¯¯¯\\`----,____`;\n\nconst drop = () => (Math.random() < 0.2 ? '💧' : ' ');\nconst row = () => [' ', ' ', ...Array(13).fill(' ').map(drop)];\n\nfunction* rainstorm(rain = Array(31).fill('').map(row)) {\n while (rainstorm) {\n rain.pop(), rain.unshift(row());\n const flash = Math.random() < 0.1;\n yield [\n [`%c${cloud}`, `color: ${flash ? 'lightgrey' : 'grey'};`],\n flash\n ? [`%c${lightning}`, 'color: orange;']\n : [`%c${rain.flatMap((r) => r.join(' ')).join('\\n')}`, 'color: blue;'],\n [`%c${ground}`, `color: ${flash ? 'lightgreen' : 'green'};`],\n ];\n }\n}\nprojector(rainstorm, { frameRate: 7, maxFrames: 100 });\n\n// tags: reel, sketch\n","tags":["reel","sketch"],"forelinks":["projector.mjs"]},{"title":"recurseval.1.js","text":"eval(recurseval = 'eval(recurseval)');\n\n// tags: useless\n","tags":["useless","variation","1-liner"],"aftlinks":["variation.md"]},{"title":"recurseval.2.js","text":"(function recurseval() { eval(`(${recurseval.toString()})()`) })();\n\n// tags: quine\n","tags":["quine","variation","1-liner"],"aftlinks":["variation.md"]},{"title":"recurseval.3.js","text":"fetch('./recurseval.3.js')\n .then((res) => res.text())\n .then((code) => (console.log(code), eval(code)))\n .catch(console.error);\n","tags":["variation"],"forelinks":["recurseval.3.js"],"aftlinks":["recurseval.3.js","variation.md"]},{"title":"reflection.css","text":"body {\n -moz-transform: scale(1, -1);\n -webkit-transform: scale(1, -1);\n -o-transform: scale(1, -1);\n -ms-transform: scale(1, -1);\n transform: scale(1, -1);\n}\n","tags":["variation","translation"],"aftlinks":["translation.md","variation.md"]},{"title":"reflection.js","text":"var w = 0;\n\nwhile (w < 3) {\n w++;\n}\n\nalert(w);\n\n/*~~~~~~~~~~~~*/\n\nalert(m);\n\ndo {\n m++;\n} while (m < 3);\n\nvar m = 0;\n","tags":["variation","translation"],"aftlinks":["translation.md","variation.md"]},{"title":"reverse-input.js.txt","text":"let input = prompt('enter some text to reverse') || '';\n\nlet reversed = '';\nfor (const char of input) {\n reversed = char + reversed;\n}\n\nalert(reversed);\n","tags":["variation"],"aftlinks":["variation.md"]},{"title":"reverse-input.txt.js","text":"// Get some text from the user.\n\n// Then create a new empty text.\n\n// Now start at the beginning of the user input,\n// One by one, copy each character to the beginning of the new text.\n\n// Finally, show the new text to the user.\n","tags":["variation"],"subtext":"reverse-input.txt.js.st.txt","aftlinks":["variation.md"]},{"title":"sequitur.mjs","text":"export const sequitur = (non = '') => (non ? { [non]: sequitur } : sequitur);\n\n// tags: useless, wuzzle\n","tags":["useless","wuzzle","1-liner"],"aftlinks":["non-sequitur.mjs"]},{"title":"sierpinski.html","text":"\n\n\n\n\n\n\n\n","tags":["sketch"]},{"title":"snail-train.mjs","text":"import i_ from './executable-comment.mjs';\n\ni_('@').i_('@').i_('@').i_('@').i_('@');\n","forelinks":["executable-comment.mjs"]},{"title":"stack.js","text":"const stack = (fn) => (names) =>\n names.length === 0\n ? fn\n : stack\n ({ [names[0]]: (...args) => fn(...args) }[names[0]]) \n (names.slice(1));\n\nstack\n (function busted() { yolo; })\n (['too', 'bad', 'so', 'sad']);\n "},{"title":"steamroll.mjs","text":"export const steamroll = (code = '', refactors = []) => {\n const refactor = { goodCode: code };\n refactors.push(refactor);\n\n const sandbox = document.createElement('iframe');\n\n sandbox.addEventListener('load', () => {\n sandbox.contentWindow.addEventListener('error', ({ lineno, error }) => {\n const lines = code.split('\\n');\n (refactor.badCode = refactor.goodCode), delete refactor.goodCode;\n refactor.error = error;\n refactor.guilty = lines.splice(lineno - 1, 1).pop();\n\n steamroll(lines.join('\\n'), refactors);\n });\n\n const fingersCrossed = document.createElement('script');\n fingersCrossed.innerHTML = code;\n sandbox.contentDocument.body.appendChild(fingersCrossed);\n });\n\n document.body.appendChild(sandbox);\n\n return refactors;\n};\n\nexport default steamroll;\n\n// tags: remix\n// inspiration: https://github.com/mattdiamond/fuckitjs\n","tags":["remix"],"aftlinks":["fake-it-till-you-make-it.mjs"]},{"title":"story-in-a-story.mjs","text":"export const runStory = async (storyTitle = '', transition = '') => {\n if (transition) console.group(`%c${transition}`, 'font-weight: bold;');\n try {\n await import(storyTitle);\n } catch (err) {\n console.error(err);\n }\n if (transition) console.groupEnd();\n};\n\nexport const logStory = async (storyTitle = '', transition = '') => {\n if (transition) console.group(`%c${transition}`, 'font-weight: bold;');\n try {\n console.log(await fetch(storyTitle).then((res) => res.text()));\n } catch (err) {\n console.error(err);\n }\n if (transition) console.groupEnd();\n};\n\nexport const alertStory = async (storyTitle = '', transition = '') => {\n try {\n alert(`${transition}${await fetch(storyTitle).then((res) => res.text())}`);\n } catch (err) {\n alert(err.toString());\n }\n};\n\nexport default runStory;\n\n// tags: minibrary\n","tags":["minibrary"],"aftlinks":["all-medium.md","flag-translator.mjs","minibrary.md"]},{"title":"take-five.js","text":"// --- set the mood ---\n\nconst takeFive = new Audio('./take-five.mp3');\ntakeFive.loop = false;\ntakeFive.play();\n\n// --- take a break ---\n\nconst FIVE_MINUTES = 300000; // milliseconds\nconst CLOCK_OUT = Date.now();\n\nconst offBreak = () => Date.now() - CLOCK_OUT > FIVE_MINUTES;\n\nconst getSomeFreshAir = () =>\n offBreak() ? clearInterval(onBreak) : alert('break time, take five!');\n\nconst onBreak = setInterval(getSomeFreshAir, 100);\n\n// tags: wellbeing\n","tags":["wellbeing"]},{"title":"testing.mjs","text":"import { describe, it, suite, test } from './describe-it.mjs';\nimport { expect } from './expect.mjs';\n\nexport { describe, expect, it, suite, test };\nexport default { describe, expect, it };\n\n// tags: testing, minibrary, useful\n","tags":["minibrary","testing","useful"],"forelinks":["describe-it.mjs","expect.mjs"],"aftlinks":["can-not-even.mjs","drabble-twabble.mjs","goalpost-sort.mjs","minibrary.md","this-is-amazing.mjs"]},{"title":"the-fun-parts.md","text":"# JavaScript: The ~~Good~~ *Fun* Parts\n\nMost programming languages contain ~~good~~ *fun* parts and bad parts. I discovered that I\ncould be a better programmer by using only the ~~good~~ *fun* parts and avoiding the bad\nparts. After all, how can you build something ~~good~~ *fun* out of bad parts? \\[...] But\nyou have the power to define your own subset. You can write better programs by relying\nexclusively on the ~~good~~ *fun* parts.\n\n* adapted by **Dougie Crockpot** from\n [the original](https://www.oreilly.com/library/view/javascript-the-good/9780596517748/)\n\n\n","tags":["metappet","the fun parts"],"alt":"JavaScripting: teach me how to, Dougie.","metalinks":["cat-detector.vars.js","do-without.js","eat-sleep-rave-repeat.js","goto-ish.js","heartbreak.js","with-transparency.js"]},{"title":"the-neverending-s.js","text":"while (('never-ending ' += 's')); \n\n// tags: wuzzle\n","tags":["wuzzle","1-liner"],"alt":"tory"},{"title":"the-programmers-journey.js","text":"// In the realm of code, a story unfolds\n// A tale of mystery, where secrets are told\n\n// Once upon a time, in a land of arrays\n// Lived a programmer, lost in a coding maze\n\n// With variables and functions, the story began\n// Each line of code, a step in the plan\n\nconst journey = () => {\n // In the depths of the code, a riddle awaits\n const riddle = \"What has keys but can't open gates?\";\n\n // A quest for answers, the programmer embarks\n const answer = 'A keyboard, where creativity sparks';\n\n // But the path is not easy, challenges arise\n const obstacles = ['Syntax errors', 'Bugs in disguise'];\n\n // With each obstacle faced, the programmer learns\n // Debugging skills, the fire that burns\n\n for (let i = 0; i < obstacles.length; i++) {\n // The programmer fights, with determination and might\n // Seeking the truth, in the code's darkest night\n\n console.log(`Obstacle ${i + 1}: ${obstacles[i]}`);\n // The console reveals, the errors to see\n // Line by line, the programmer sets free\n\n // But the journey continues, the story unwinds\n // Seeking perfection, in the code that binds\n if (i === obstacles.length - 1) {\n // Victory is near, the final test awaits\n console.log(\"Congratulations! You've reached the gates\");\n }\n }\n};\n\n// The journey begins, the code comes alive\njourney();\n\n/*\n This poem tells the story of a programmer on a quest \n to solve a riddle hidden within the code.\n Along the way, they encounter obstacles in the form of \n syntax errors and bugs.\n With determination and debugging skills, \n they overcome these challenges and reach the final test.\n The poem captures the essence of the coding journey, \n where perseverance and problem-solving lead to victory.\n\n\tI hope you enjoyed this puzzling and sophisticated JavaScript poem!\n Let me know if you have any questions \n or if there's anything else I can assist you with.\n*/\n\n// https://www.phind.com/agent?cache=cln0bq31a0027jz08b4dc5qrh\n// an LLM wrote this, I bring it to you unedited. LLMs can't count lines\n\n// tags: coAIthored\n","tags":["coaithored"],"aftlinks":["coAIthored.md"]},{"title":"thing.svg","text":"\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n \n"},{"title":"this-is-amazing.mjs","text":"import { describe, it, expect } from './testing.mjs';\n\nconst thisIs = function amazing() { return this }.bind('amazing');\n\ndescribe(\"this: it's amazing\", () => {\n it('is \"amazing\"', () => expect(thisIs()).toEqual('amazing'));\n});\n","forelinks":["testing.mjs"]},{"title":"time-capsule.js","text":"(function timeCapsule(wisdom = prompt('Share some wisdom with the future:')) {\n if (wisdom) setTimeout(alert, 2147483647, wisdom);\n else timeCapsule();\n})();\n"},{"title":"tintin.0.js","text":"const tin = () => 'tin';\n\nconsole.log(tin.name);\nconsole.log(tin());\n\n// tags: puzzle\n","tags":["puzzle","variation"],"aftlinks":["variation.md"]},{"title":"tintin.0.mjs","text":"import { chronicle } from './chronicle.mjs';\n\nconst tin = chronicle(() => 'tin');\n\ntin();\nconsole.log(tin._chronicle);\n\n// tags: puzzle\n","tags":["puzzle","variation"],"forelinks":["chronicle.mjs"],"aftlinks":["variation.md"]},{"title":"tintin.1.js","text":"const tin = () => tin;\n\nconsole.log(tin().name);\nconsole.log(tin()()()()());\n\n// tags: puzzle\n","tags":["puzzle","variation"],"aftlinks":["variation.md"]},{"title":"tintin.1.mjs","text":"import { chronicle } from './chronicle.mjs';\n\nconst tin = chronicle(() => tin);\n\ntin()()()()();\nconsole.log(tin._chronicle);\n\n// tags: puzzle\n","tags":["puzzle","variation"],"forelinks":["chronicle.mjs"],"aftlinks":["variation.md"]},{"title":"tintin.2.js","text":"const tin = () => ({ tin });\n\nconsole.log(tin().tin.name);\nconsole.log(tin().tin().tin().tin);\n\n// tags: puzzle\n","tags":["puzzle","variation"],"aftlinks":["variation.md"]},{"title":"tintin.2.mjs","text":"import { chronicle } from './chronicle.mjs';\n\nconst tin = chronicle(() => ({ tin }));\n\ntin().tin;\nconsole.log(tin._chronicle);\n\ntin._forget;\n\ntin().tin().tin().tin;\nconsole.log(tin._chronicle);\n\n// tags: puzzle\n","tags":["puzzle","variation"],"forelinks":["chronicle.mjs"],"aftlinks":["variation.md"]},{"title":"tintin.3.js","text":"const tin = () => tin;\ntin.tin = tin;\n\nconsole.log(tin[tin().name]()[tin.name].name);\nconsole.log(tin.tin()().tin().tin.tin()()().tin().tin.tin());\n\n// tags: puzzle\n","tags":["puzzle","variation"],"aftlinks":["variation.md"]},{"title":"tintin.3.mjs","text":"import { chronicle } from './chronicle.mjs';\n\nconst tin = chronicle(() => tin);\ntin.tin = tin;\n\ntin.tin()['tin'];\nconsole.log(tin._chronicle);\n\ntin._forget;\n\ntin.tin()().tin().tin.tin()()().tin().tin.tin();\nconsole.log(tin._chronicle);\n\n// tags: puzzle\n","tags":["puzzle","variation"],"forelinks":["chronicle.mjs"],"aftlinks":["variation.md"]},{"title":"tintin.4.js","text":"const tin = () => ({ tin });\ntin.tin = tin;\n\nconsole.log(tin[tin.name]().tin.tin.tin()['tin'].name);\nconsole.log(tin.tin()['tin']().tin().tin);\n\n// tags: puzzle\n","tags":["puzzle","variation"],"aftlinks":["variation.md"]},{"title":"tintin.4.mjs","text":"import { chronicle } from './chronicle.mjs';\n\nconst tin = chronicle(() => ({ tin }));\ntin.tin = tin;\n\ntin['tin']().tin.tin.tin().tin;\nconsole.log(tin._chronicle);\n\ntin._forget;\n\ntin.tin()['tin']().tin().tin;\nconsole.log(tin._chronicle);\n\n// tags: puzzle\n","tags":["puzzle","variation"],"forelinks":["chronicle.mjs"],"aftlinks":["variation.md"]},{"title":"togglog.mjs","text":"export const togglog = ({ write = true, out = console.log, label = null } = {}) => {\n const log = (...things) => {\n if (label !== null) things.unshift(label);\n if (write) out(...things);\n return things.at(-1);\n };\n\n Object.defineProperties(log, {\n log: { get: () => log },\n\n on: { get: () => ((write = true), log) },\n off: { get: () => ((write = false), log) },\n toggle: { get: () => ((write = !write), log) },\n\n is: { get: () => (write ? 'on' : 'off') },\n\n out: { set: (newOut) => (out = newOut) },\n label: { set: (newLabel) => (label = newLabel) },\n });\n\n return log;\n};\n\nexport default togglog;\n\n// tags: minibrary\n\n\n","tags":["minibrary","variation","translation"],"aftlinks":["minibrary.md","translation.md","variation.md"]},{"title":"togglog.py","text":"import traceback\n\n\nclass Togglog:\n def __init__(self, out=print, write=True, label=None, line=False):\n self.out = out\n self.write = write\n self.label = label\n self.line = line\n\n def __getattr__(self, key):\n if key == \"on\":\n self.write = True\n elif key == \"off\":\n self.write = False\n elif key == \"toggle\":\n self.write = not self.write\n return self\n\n def log(self, *rest):\n if self.write:\n logs = [*rest]\n if self.label != None:\n logs.insert(0, self.label)\n if self.line != False:\n logs.insert(0, f\"ln {str(list(traceback.walk_stack(None))[0][1])}:\")\n self.out(*logs)\n return rest[-1]\n\n\n# tags: minibrary\n","tags":["minibrary","variation","translation"],"aftlinks":["minibrary.md","translation.md","variation.md"]},{"title":"training-wheels.mjs","text":"import { demethod } from './demethod.mjs';\n\n// --- setup, could happen in a different file ---\n\ndemethod(String, { target: globalThis, prefix: '$str' });\ndemethod(Array, { target: globalThis, prefix: '$arr' });\ndemethod(console, { target: globalThis, statics: true });\n\n// --- use the functioned methods ---\n\nconst things = [];\nwhile (true) {\n const thing = prompt('enter things, cancel to finish');\n log(thing);\n if (thing === null) break;\n $arrPush(things, thing);\n}\nlog(things);\n\nconst smallThings = $arrMap(things, $strToLowerCase);\nconst renderedThings = $arrJoin(smallThings, '\\n- ');\nconst packagedThings = `here are your smaller things:\\n- ${renderedThings}`;\n\nalert(packagedThings);\n","forelinks":["demethod.mjs"]},{"title":"translation.md","text":"# Translation\n\nSame program, different language. In spirit if not in Idiom.\n\n\n","tags":["metappet","translation"],"metalinks":["be.css","be.html","be.js","be.json","be.md","be.py","be.svg","be.txt","be.yaml","breathless.html","breathless.js","cat-detector.ascii.html","cat-detector.ascii.txt","cat-detector.psu","cat-detector.scm.js","cat-detector.scm.json","cat-detector.svg","cat_detector.py","empty.json","empty.yaml","halloween.js","halloween.py","hello-world.js","hello_world.py","reflection.css","reflection.js","togglog.mjs","togglog.py","turtles-all-the-way-down.1.js","turtles-all-the-way-down.2.js","turtles_all_the_way_down.1.py","turtles_all_the_way_down.2.py","yoloest.js","yoloest.py"]},{"title":"turtles-all-the-way-down.1.js","text":"(turtle = () => turtle())();\n\n// tags: wuzzle\n","tags":["wuzzle","variation","1-liner","translation"],"aftlinks":["translation.md","variation.md"]},{"title":"turtles-all-the-way-down.2.js","text":"(turtle => turtle(turtle))(turtle => turtle(turtle))\n\n// tags: wuzzle\n","tags":["wuzzle","variation","1-liner","translation"],"aftlinks":["translation.md","variation.md"]},{"title":"turtles-all-the-way-down.3.js","text":"({ ['🐢']: function () { this['🐢']() } })['🐢']();\n\n// tags: wuzzle\n","tags":["wuzzle","variation","1-liner"],"aftlinks":["variation.md"]},{"title":"turtles-all-the-way-down.4.js","text":"(turtle = turtle => { try { turtle(turtle) } catch(eltrut) { turtle(turtle) } })(turtle);\n\n// tags: wuzzle","tags":["wuzzle","variation","1-liner"],"aftlinks":["variation.md"]},{"title":"turtles-all-the-way-down.html","text":"turtles all the way down\n\n
\n  _____     ____\n /      \\  |  o |\n|        |/ ___\\|\n|_________/\n|_|_| |_|_|\n
\n\n\n\n\n\n","tags":["wuzzle","variation"],"aftlinks":["variation.md"]},{"title":"turtles_all_the_way_down.1.py","text":"turtle = lambda: turtle(); turtle()\n\n# tags: wuzzle","tags":["wuzzle","variation","1-liner","translation"],"aftlinks":["translation.md","variation.md"]},{"title":"turtles_all_the_way_down.2.py","text":"(lambda turtle: turtle(turtle))(lambda turtle: turtle(turtle))\n\n# tags: wuzzle","tags":["wuzzle","variation","1-liner","translation"],"aftlinks":["translation.md","variation.md"]},{"title":"turtlje.mjs","text":"export const turtlje = (c = document.createElement('canvas')) => {\n c = typeof c === 'string' ? document.getElementById(c) : c;\n const pad = c.getContext('2d');\n const state = { col: 'black', width: 1, deg: 0, x: c.width / 2, y: c.height / 2 };\n const turtle = {\n backward: (pixels) => forward(-pixels),\n color: (col) => ((state.col = col), turtle),\n dot: (diameter) => {\n pad.beginPath();\n pad.arc(state.x, state.y, diameter / 2, 0, 2 * Math.PI);\n pad.fillStyle = state.col;\n pad.lineWidth = state.width;\n pad.fill();\n return turtle; },\n forward: (pixels) => {\n pad.beginPath();\n pad.moveTo(state.x, state.y);\n state.x += -Math.cos((state.deg / 180) * Math.PI) * pixels;\n state.y += -Math.sin((state.deg / 180) * Math.PI) * pixels;\n pad.lineTo(state.x, state.y);\n pad.strokeStyle = state.col;\n pad.lineWidth = state.width;\n pad.stroke();\n return turtle; },\n goto: (x, y) => {\n state.x = x + c.width / 2;\n state.y = y + c.height / 2;\n return turtle; },\n left: (deg) => turtle.right(-deg),\n right: (deg) => {\n state.deg = (deg + state.deg) % 360;\n return turtle; },\n width: (pixels) => {\n state.width = pixels;\n return turtle; },\n };\n return { _pad: pad, _state: state, ...turtle };\n};\n\nexport default turtlje;\n\n// tags: minibrary\n","tags":["minibrary"],"aftlinks":["minibrary.md"]},{"title":"useless-machine.1.html","text":" this.checked = false, 500)\" />\n","tags":["variation","1-liner"],"aftlinks":["variation.md"]},{"title":"useless-machine.2.html","text":"\n\n\n\n\n\n\n","tags":["coaithored","frivolous","variation"],"aftlinks":["coAIthored.md","variation.md"]},{"title":"var-let-const.js","text":"// 'use strict';\n\nconsole.assert(__ === let);\n\n{\n var let = 'const';\n}\n\nconsole.assert(__ === let);\n\n// tags: puzzle\n","tags":["puzzle"]},{"title":"variation.md","text":"# Theme and Variation\n\n\n","tags":["metappet","1-liner","variation"],"alt":"It's expression, not obsession. I promise.","metalinks":["10-print.1.js","10-print.2.js","10-print.3.js","10-print.4.js","10-print.6.mjs","be.canvas.html","be.css","be.css.html","be.de.txt","be.en.txt","be.flip.js","be.fr.txt","be.html","be.js","be.json","be.md","be.nl.txt","be.py","be.svg","be.txt","be.yaml","breathless.html","breathless.js","cat-detector.ascii.html","cat-detector.ascii.txt","cat-detector.be.js","cat-detector.cat.js","cat-detector.eval.js","cat-detector.evbl.js","cat-detector.golf.js","cat-detector.js.md","cat-detector.js.md.st.js","cat-detector.polyfill.mjs","cat-detector.psu","cat-detector.scm.js","cat-detector.scm.json","cat-detector.spoken.mjs","cat-detector.svg","cat-detector.vars.js","cat-detector.wc.html","cat-i-farted.js","cat-i-farted.mjs","cat_detector.py","cat_detector.py.js","empty.json","empty.yaml","halloween.js","halloween.py","hello-world.js","hello_world.py","je-l-ignore.js","je-l-ignore.mjs","love-adventure-success.1.js","love-adventure-success.2.js","mu.js","mu.mjs","no-comment.js","no-comment.mjs","recurseval.1.js","recurseval.2.js","recurseval.3.js","reflection.css","reflection.js","reverse-input.js.txt","reverse-input.txt.js","reverse-input.txt.js.st.txt","tintin.0.js","tintin.0.mjs","tintin.1.js","tintin.1.mjs","tintin.2.js","tintin.2.mjs","tintin.3.js","tintin.3.mjs","tintin.4.js","tintin.4.mjs","togglog.mjs","togglog.py","turtles-all-the-way-down.1.js","turtles-all-the-way-down.2.js","turtles-all-the-way-down.3.js","turtles-all-the-way-down.4.js","turtles-all-the-way-down.html","turtles_all_the_way_down.1.py","turtles_all_the_way_down.2.py","useless-machine.1.html","useless-machine.2.html","yoloest.js","yoloest.py"]},{"title":"wait-for-it.js","text":"(function waitForIt(wait = 0) {\n console.log('wait for it ...');\n wait = setTimeout(() => waitForIt(wait), wait);\n})();\n"},{"title":"wat.html","text":"\n\n

Wat?!

\n\n\n\n\n","forelinks":["wat.html"],"aftlinks":["wat.html"]},{"title":"what-does-the-fox-say.mjs","text":"// This looks like a fox, right?\n// Taken from here - https://ascii.co.uk/art/fox\nconst fox = [\n '%c',\n '%c _,-=._ /|_/|',\n '%c`-.} `=._,.-=-._., @ @._,',\n \"%c `._ _,-. ) _,.-'\",\n '%c G.m-\"^m`m\\'',\n '%c',\n];\n\nexport const theFoxSays = (...args) => {\n // Gets args as a string\n const joinedArgs = args.join(' ');\n\n // Add the bubble if there is something to log!\n if (joinedArgs.length > 0) {\n fox[1] += ` ---${'-'.repeat(joinedArgs.length)}-`;\n fox[2] += ` -( ${joinedArgs} )`;\n fox[3] += ` ---${'-'.repeat(joinedArgs.length)}-`;\n }\n\n // Log the fox!\n for (const line of fox) {\n console.log(line, 'color: firebrick');\n }\n};\n\nexport default theFoxSays;\n\n// tags: sketch, remix\n// inspiration: https://tholman.com/console-dot-frog/\n","tags":["remix","sketch"],"aftlinks":["funsole.mjs"]},{"title":"with-transparency.js","text":"const transparency = {\n remember_that: 'let',\n stores: '=',\n as_long_as: 'while',\n is_less_than: '<',\n add_one_to: '++',\n show_me: 'alert',\n};\n\nwith (transparency) {\n eval(`\n\n${remember_that} i ${stores} 0;\n\n${as_long_as}( i ${is_less_than} 5 )${add_one_to} i;\n\n${show_me}( i );\n\n`);\n}\n\n\n// tags: the fun parts\n","tags":["the fun parts"],"aftlinks":["the-fun-parts.md"]},{"title":"yolo.js","text":"const shipit = (motto = '') => {\n try {\n alert(eval(prompt(`${motto}!`)));\n } catch (err) {\n alert(`${err.name}: ${err.message}\\n\\n${motto}!`);\n shipit(motto);\n }\n};\n\nshipit('YOLO');\n\n// tags: yolo\n","tags":["yolo"]},{"title":"yoloer.js","text":"/*\n // 'use strict';\n*/\n\nconst YOLO = 'YOLO';\n\nconst walkTheTalk = (motto = YOLO) =>\n prompt(`${motto}!`) || (alert(`${motto} harder!`), walkTheTalk(motto));\n\nconst shipit = (code = `\"${YOLO}!`) => {\n try {\n alert(eval(code));\n } catch (err) {\n alert(`${err.name}: ${err.message}\\n\\n${YOLO}!`);\n } finally {\n shipit(walkTheTalk(YOLO));\n }\n};\n\nshipit(walkTheTalk(YOLO));\n\n// tags: yolo\n","tags":["yolo"]},{"title":"yoloest.js","text":"alert(eval(prompt('YOLO')));\n\n// tags: yolo\n","tags":["yolo","variation","1-liner","translation"],"aftlinks":["translation.md","variation.md"]},{"title":"yoloest.py","text":"print(eval(input('YOLO')))\n\n# tags: yolo","tags":["yolo","variation","1-liner","translation"],"aftlinks":["translation.md","variation.md"]},{"title":".js","text":"","figment":true},{"title":".mjs","text":"","figment":true},{"title":".md","text":"","figment":true},{"title":".html","text":"","figment":true},{"title":".css","text":"","figment":true},{"title":".txt","text":"","figment":true},{"title":".json","text":"","figment":true},{"title":".py","text":"","figment":true},{"title":".svg","text":"","figment":true},{"title":".yaml","text":"","figment":true},{"title":".psu","text":"","figment":true},{"title":"cat-detector.js.md.st.js","text":"let input = prompt('cat, please');\n\nconst isCat = input === 'cat';\n\nif (isCat) alert('thank you for the cat');\n\nelse {\n\twhile (input !== 'cat') input = prompt('still not a cat. \\n\\ncat, please');\n\n\talert('finally, a cat.');\n}\n","tags":["variation","subtext"],"figment":"cat-detector.js.md","aftlinks":["cat-detector.js.md","variation.md"]},{"title":"reverse-input.txt.js.st.txt","text":"\n Get some text from the user.\n\n Then create a new empty text.\n\n Now start at the beginning of the user input,\n One by one, copy each character to the beginning of the new text.\n\n Finally, show the new text to the user.","figment":"reverse-input.txt.js","aftlinks":["reverse-input.txt.js","variation.md"],"tags":["variation","subtext"]}] \ No newline at end of file +[{"title":"10-print.1.js","text":"// 10 PRINT CHR$(205.5+RND(1)); : GOTO 10\n\nconst HEIGHT = 25;\nconst WIDTH = 50;\n\nlet maze = '';\n\nfor (let i = 0; i < HEIGHT; i++) {\n maze +=\n Array(WIDTH)\n .fill()\n .map(() => '\\\\/'[+(Math.random() > 0.5)])\n .join('') + '\\n';\n}\n\nconsole.log(maze);\n","tags":["variation"],"aftlinks":["variation.md"]},{"title":"10-print.2.js","text":"// 10 PRINT CHR$(205.5+RND(1)); : GOTO 10\n\nconsole.log(\n Array(25)\n .fill(Array(50).fill())\n .map((row) => row.map(() => '\\\\/'[+(Math.random() > 0.5)]).join(''))\n .join('\\n'),\n);\n","tags":["variation"],"aftlinks":["variation.md"]},{"title":"10-print.3.js","text":"// 10 PRINT CHR$(205.5+RND(1)); : GOTO 10\n\n(function tenPrint(maze = '') {\n try {\n maze = tenPrint(maze + '\\\\/'[+(Math.random() > 0.5)]);\n } catch (_) {\n console.log(maze);\n }\n})();\n","tags":["variation"],"aftlinks":["variation.md"]},{"title":"10-print.4.js","text":"// 10 PRINT CHR$(205.5+RND(1)); : GOTO 10\n\nlet maze = '';\nwhile (maze.length < 5000) {\n maze += '\\\\/'[+(Math.random() > 0.5)];\n}\nconsole.log(maze);\n","tags":["variation"],"aftlinks":["variation.md"]},{"title":"10-print.6.mjs","text":"import { projector } from './projector.mjs';\n\nconst FRAMES = 10;\n\nconst HEIGHT = 25;\nconst WIDTH = 50;\n\nfunction* tenPrintPrintTen() {\n for (let f = 0; f < FRAMES; f++) {\n let maze = '';\n for (let i = 0; i < HEIGHT; i++) {\n for (let j = 0; j < WIDTH; j++) {\n maze += '\\\\/'[+(Math.random() > 0.5)];\n }\n maze += '\\n';\n }\n yield maze;\n }\n}\n\nprojector(tenPrintPrintTen, { frameRate: 1 });\n","tags":["variation"],"forelinks":["projector.mjs"],"aftlinks":["variation.md"]},{"title":"ESi.md","text":"# ℂ.js = ES(n + i)\n\nWhy [wait 6 years](https://github.com/tc39/proposal-pipeline-operator/issues/91) for a\nreal language feature? Have an imaginary one today.\n","tags":["metappet","esi"],"alt":"Don't make it complex, KISS.","metalinks":["declare-morf.js","declare-tag.js"]},{"title":"README.md","text":"# Snippets\n\nWhat can you do with under 40(ish) lines at a time?\n","tags":["metappet"],"alt":"More interesting than useful."},{"title":"accessible-credit-card-form.html","text":"\n\n
\n

Accessible Credit Card Form

\n
\n
\n \n \n
\n
\n \n \n
\n
\n \n \n
\n
\n \n \n
\n
\n \n
\n
\n
\n\n\n\n\n","tags":["coaithored"]},{"title":"all-medium.md","text":"They *intended* to write. They really did.\n\nBut more fluently came *how* to write, *how* to display, *how* to convey.\n\nBefore there was a **what** there were [empty](./empty.json) [vehicles](./empty.yaml)\n[crewed by a token](./be.txt):\n\n* [dusty](./story-in-a-story.mjs)\n* [unused](./log.mjs)\n* [unfinished](./funsole.mjs)\n* [ill-defined](./cat-detector.psu)\n","tags":["metappet"],"forelinks":["be.txt","cat-detector.psu","empty.json","empty.yaml","funsole.mjs","log.mjs","story-in-a-story.mjs"],"alt":"no message"},{"title":"all-the-chars.js","text":"const allTheChars = [];\n\nlet i = 0;\nlet next = '';\n\nwhile (!allTheChars.includes(next)) {\n allTheChars.push(next);\n next = String.fromCharCode(i++);\n}\n\nconsole.log(allTheChars.join(''));\n"},{"title":"all-the-reals.mjs","text":"import _ from './executable-pseudocode.mjs';\nconst { OrderedSet, Element } = _;\n\nconst reals = new OrderedSet((a, b) => a.getValue() < b.getValue());\nconst zero = new Element(0);\nconst one = new Element(1);\n\nreals.add(zero);\nreals.add(one);\naddBetween(reals)(zero, one);\n\ncantorize(reals);\n\nconsole.log(...reals);\n\n// --- --- --- --- --- ---\n\nfunction addBetween(set) {\n return function addingBetween(left, right) {\n const middle = new Element((left.getValue() + right.getValue()) / 2);\n if (!set.has(middle)) {\n set.add(middle);\n addingBetween(left, middle);\n addingBetween(middle, right);\n }\n };\n}\n\nfunction cantorize(incomplete, i = 0) {\n const numberToCheck = incomplete.getByOrder(i).getValue();\n numberToCheck[i] = numberToCheck[i] + 1;\n const maybeMissing = new Element(numberToCheck);\n if (!incomplete.has(maybeMissing)) {\n incomplete.add(maybeMissing);\n cantorize(incomplete, i + 1);\n }\n}\n","forelinks":["executable-pseudocode.mjs"]},{"title":"be.canvas.html","text":" \n\n\n","tags":["variation"],"aftlinks":["be.md","variation.md"]},{"title":"be.css","text":".be,\nbody {\n background: linear-gradient(\n 90deg,\n rgb(0, 0, 0) 33.33vw,\n rgb(255, 233, 54) 33.33vw,\n rgb(255, 233, 54) 66.66vw,\n rgb(255, 15, 33) 66.66vw\n );\n}\n","tags":["variation","translation"],"aftlinks":["be.md","variation.md"]},{"title":"be.css.html","text":"\n\n\n
\n
\n
\n
\n
\n\n","tags":["variation"],"aftlinks":["be.md","variation.md"]},{"title":"be.de.txt","text":"SSSSSSSGGGGGGGRRRRRRR\nSSSSSSSGGGGGGGRRRRRRR\nSSSSSSSGGGGGGGRRRRRRR\nSSSSSSSGGGGGGGRRRRRRR\nSSSSSSSGGGGGGGRRRRRRR\n","tags":["variation"],"aftlinks":["be.md","variation.md"]},{"title":"be.en.txt","text":"BBBBBBBYYYYYYYRRRRRRR\nBBBBBBBYYYYYYYRRRRRRR\nBBBBBBBYYYYYYYRRRRRRR\nBBBBBBBYYYYYYYRRRRRRR\nBBBBBBBYYYYYYYRRRRRRR\n","tags":["variation"],"aftlinks":["be.md","variation.md"]},{"title":"be.flip.js","text":"console.log('%c↺ 90°', 'font-weight: bold; font-size: xx-large;');\n\nfor (const color of ['black', 'yellow', 'red']) {\n const bar = [];\n for (let width = 0; width < 10; width++) {\n let column = '';\n for (let height = 0; height < 35; height++) {\n column += ' ';\n }\n bar.push(column);\n }\n console.log(`%c${bar.join('\\n')}`, `background-color: ${color};`);\n}\n","tags":["variation"],"aftlinks":["be.md","variation.md"]},{"title":"be.fr.txt","text":"NNNNNNNJJJJJJJRRRRRRR\nNNNNNNNJJJJJJJRRRRRRR\nNNNNNNNJJJJJJJRRRRRRR\nNNNNNNNJJJJJJJRRRRRRR\nNNNNNNNJJJJJJJRRRRRRR\n","tags":["variation"],"aftlinks":["be.md","variation.md"]},{"title":"be.html","text":"\n\n \n \n BE\n \n \n \n
\n
\n
\n \n \n\n","tags":["variation","translation"],"aftlinks":["be.md","variation.md"]},{"title":"be.js","text":"console.log( '%c %c %c ',\n 'background-color: black;', \n 'background-color: yellow;',\n 'background-color: red;',\n);","tags":["variation","translation"],"aftlinks":["be.md","variation.md"]},{"title":"be.json","text":"{\n \"de\": [\"schwarz\", \"gelb\", \"rot\"],\n \"en\": [\"black\", \"yellow\", \"red\"],\n \"fr\": [\"noir\", \"jaune\", \"rouge\"],\n \"nl\": [\"zwart\", \"geel\", \"rood\"]\n}\n","tags":["variation","translation"],"aftlinks":["be.md","variation.md"]},{"title":"be.md","text":"# Belgium\\*!\n","tags":["metappet","variation","1-liner","translation"],"alt":"* België, Belgique, Belgien","metalinks":["be.canvas.html","be.css","be.css.html","be.de.txt","be.en.txt","be.flip.js","be.fr.txt","be.html","be.js","be.json","be.nl.txt","be.py","be.svg","be.txt","be.yaml"],"aftlinks":["variation.md"]},{"title":"be.nl.txt","text":"ZZZZZZZGGGGGGGRRRRRRR\nZZZZZZZGGGGGGGRRRRRRR\nZZZZZZZGGGGGGGRRRRRRR\nZZZZZZZGGGGGGGRRRRRRR\nZZZZZZZGGGGGGGRRRRRRR\n","tags":["variation"],"aftlinks":["be.md","variation.md"]},{"title":"be.py","text":"print('🇧🇪')","tags":["variation","1-liner","translation"],"aftlinks":["be.md","variation.md"]},{"title":"be.svg","text":"\n\n \n\n \n\n \n\n\n","tags":["variation","translation"],"aftlinks":["be.md","variation.md"]},{"title":"be.txt","text":"🇧🇪","tags":["variation","1-liner","translation"],"aftlinks":["all-medium.md","be.md","variation.md"]},{"title":"be.yaml","text":"de:\n - schwarz\n - gelb\n - rot\nen:\n - black\n - yellow\n - red\nfr:\n - noir\n - jaune\n - rouge\nnl:\n - zwart\n - geel\n - rood\n","tags":["variation","translation"],"aftlinks":["be.md","variation.md"]},{"title":"breathless.html","text":"\n\n
\n\n\n\n\n\n","tags":["wellbeing","variation","translation"],"aftlinks":["variation.md"]},{"title":"breathless.js","text":"(function breathless(slowness = 500, slowerness = 1.01) {\n const breath = setTimeout(breathless, (slowness *= slowerness), slowness);\n console.log(['hold', 'breath in', 'hold', 'breath out'][breath % 4]);\n})();\n\n// tags: wellbeing\n","tags":["wellbeing","variation","translation"],"aftlinks":["variation.md"]},{"title":"bunny.md","text":"# 🐰\n\n> If drawing rabbits (🐇) in JavaScript means copying patterns out of books or mimicking\n> specific styles from blogs, drawing bunnies (🐰) is about experimentation and creative\n> expression.\n>\n> * [Jacob Thornton](https://github.com/fat) from\n> [*How to draw a Bunny*](https://www.oreilly.com/library/view/beautiful-javascript/9781449371142/ch03.html)\n\n\n","aftlinks":["cat-detector.js.md"]},{"title":"callout-stack.js","text":"const calloutStack = (msg = '') =>\n eval(msg.split('').reduce((acc, next) => `(${next} = () => ${acc})()`, msg));\n\ncalloutStack('jenga');\n\n// tags: useless\n","tags":["useless"]},{"title":"can-not-even.mjs","text":"import { describe, it } from './testing.mjs';\n\nconst canNotEven = (maybe, strict) =>\n strict && typeof maybe !== 'number'\n ? maybe\n : maybe % 2 === 0\n ? even(maybe)\n : maybe;\n\ndescribe('canNotEven: can not even', () => {\n describe('sort of', () => {\n it('can odd numbers', () => canNotEven(1));\n it('can odd strings', () => canNotEven('1'));\n it('can odd number objects', () => canNotEven(new Number(1)));\n\n it('can not even numbers', () => canNotEven(2));\n it('can not even strings', () => canNotEven('2'));\n it('can not even number objects', () => canNotEven(new Number(2)));\n });\n describe('exactly', () => {\n it('can odd numbers', () => canNotEven(1, true));\n it('can odd strings', () => canNotEven('1', true));\n it('can even strings', () => canNotEven('2', true));\n it('can odd number objects', () => canNotEven(new Number(1), true));\n it('can even number objects', () => canNotEven(new Number(2), true));\n\n it('can not even numbers', () => canNotEven(2, true));\n });\n});\n\nfunction even(number) {\n (function not() {\n (function can() {\n throw new Error(`can not ${number}`);\n })();\n })();\n}\n\n// tags: remix\n// inspiration: https://github.com/blakek/cannot-even\n","tags":["remix"],"forelinks":["testing.mjs"]},{"title":"cat-detector.ascii.html","text":"cat detector\n\n\n\n\n\n
\n\n\n","tags":["variation","translation"],"aftlinks":["variation.md"]},{"title":"cat-detector.ascii.txt","text":" |  _ _|_   o ._  ._     _|_   --   ._      | | o                                                    \n | (/_ |_   | | | |_) |_| |_   --   | | |_| | | o                                                    \n                  |                             /                                                    \n\n\n                                                                        ,-                           \n      |_  o |  _     / o ._  ._     _|_   | -- --   / _  _. _|_ / \\    _|                            \n \\/\\/ | | | | (/_   |  | | | |_) |_| |_   o -- --    (_ (_|  |_    |    |                            \n                     \\       |                                    /     `-                           \n                                                                                                     \n    o ._  ._     _|_   --   ._  ._ _  ._ _  ._ _|_  / / || _  _. _|_ ||   ._  |  _   _.  _  _ / \\  o \n    | | | |_) |_| |_   --   |_) | (_) | | | |_) |_ |      (_ (_|  |_      |_) | (/_ (_| _> (/_   | o \n          |                 |               |       \\                     |                     /  / \n -.                                                                                                  \n  |_                                                                                                 \n  |                                                                                                  \n -'                                                                                                  \n\n\n                                                           _                                         \n  _. |  _  ._ _|_  / / _|_ |_   _. ._  |        _        _|_ _  ._   _|_ |_   _     _  _. _|_ / \\  o \n (_| | (/_ |   |_ |     |_ | | (_| | | |<   \\/ (_) |_|    | (_) |     |_ | | (/_   (_ (_|  |_    | o \n                   \\                        /                                                   /  / \n\n","tags":["variation","translation"],"aftlinks":["variation.md"]},{"title":"cat-detector.be.js","text":"                   ;;                                            ;;\n                  ;;;;                                          ;;;;\n                 ;   ;;                                        ;;   ;\n                ;      ;                                     ;;     ;\n                ;       ;;                                  ;;     ;;\n                ;        ;;                                ;;      ;;\n                ;;  ;;;   ;;   ;;;;;;        ;;;;;;;;;;;  ;;   ;;  ;;\n                ;;  ;;;;   ;;;;;    ;;;;  ;;;;;        ;;;;  ;;;;; ;;\n                ;;  ;;;;;;;;          ;;  ;;               ;;;;;;  ;;\n                ;;  ;;;;;;              ;;;                 ;;;;;  ;;\n                ;;  ;;;;                ;;                   ;;;;  ;;\n                ;;  ;;;             ;;;;;; ;;;;               ;;;  ;;\n                ;  ;;;            ;;   ;;;;   ;;               ;;  ;\n                ;  ;;             ;;   ;;;;   ;;               ;;  ;\n                ;  ;;              ;;;;;;;;;;;;;;;             ;;  ;\n                ;  ;;            ;;;;;           ;;;;;;       ;;  ;;\n                ;  ;;;       ;;;;;                     ;;;  ;;;;  ;;\n                ;  ;;;;   ;;;;                             ;;;;;  ;;\n                ;  while  (                                   prompt\n                ('le  ...'                                     )  !=\n               'chat'  )                                        ;;  ;\n              ;;;    ;;                                          ;   ;;\n            ;;      ;;                                           ;;    ;\n            ;;      ;;                                            ;     ;\n          ;;        ;                                             ;      ;\n          ;;        ;                                             ;       ;;\n        ;;;;        ;;                                           ;;       ;; ;\n      ;; ;;   ;;;;;;;;                                          ;;;;;;;   ;;  ;;\n    ;;;  ;;          ;;                                        ;;         ;;    ;;\n    ;;    ;;           ;;                                    ;;;          ;;     ;;\n  ;;;      ;;            ;;;                              ;;;;           ;;       ;;\n ;;        ;;              ;;;                       ;;;;;              ;;         ;;\n ;;          ;;               ;;;;;;;;;;;;;;;;;;;;;;;                  ;;;          ;\n;;            ;;;;                                                    ;;;          ;;\n;;            ;;  ;;                                               ;;;;            ;;\n ;;           ;;;   ;;;;                                        ;;;;;             ;;\n ;;            ;;       ;;;;                                 ;;;; ;;              ;;\n  ;;           ;;           ;;;;;                   ;;;;;;;;;;   ;;              ;;\n  ;;            ;               ;;;;;;;;;;;;;;;;;;;;;           ;;               ;;\n   ;;           ;;                                             ;;               ;\n\n// tags: le chat","tags":["le chat","variation"],"aftlinks":["variation.md"]},{"title":"cat-detector.cat.js","text":"                ;                   ;                \n               ; ;                 ; ;               \n              ;   ;               ;   ;              \n             ;     ; ; ; ; ; ; ; ;     ;             \n            ;                           ;            \n           ;                             ;           \n          ;        cat=       null        ;          \n         ;                                 ;         \n         ;                                 ;         \n/*------*/      while (cat !== 'cat')      /*------*/\n/*------*/       cat=         prompt       /*------*/\n /*------*/        ('cat, please')        /*------*/ \n            ;                           ;            \n              ;                       ;              \n                 ; ; ; ; ; ; ; ; ; ;                 \n","tags":["variation"],"aftlinks":["variation.md"]},{"title":"cat-detector.eval.js","text":"alert(eval(detector = \n  \"((cat = prompt('cat')), cat == 'cat') \" +\n\t\t\"? cat : eval(detector)\"));","tags":["variation"],"aftlinks":["variation.md"]},{"title":"cat-detector.evbl.js","text":"alert((detector = () => (((cat = prompt('cat')), cat == 'cat') ? cat : detector()))());\n","tags":["variation","1-liner"],"aftlinks":["variation.md"]},{"title":"cat-detector.golf.js","text":"(c=(i=prompt('\"cat\" please'),t='cat'\n   ==i.toLowerCase())=>(alert(i? \n    `${t?'thank you for the ':  \n     '\"cat\" is not '}\"${i}\"`:   \n      'there is no escape')     \n          // tags: golf         \n           ,t||c()))()           ","tags":["golf","variation"],"aftlinks":["variation.md"]},{"title":"cat-detector.js.md","text":"# Cat Detector\n\nOn the surface, a cat detector is a just simple program:\n\n* First it asks you for a cat:\n  ```js\n  let input = prompt('cat, please');\n  ```\n* Then it checks if you gave it a cat:\n  ```js\n  const isCat = input === 'cat';\n  ```\n* If did give it a cat, the detector is satisfied:\n  ```js\n  if (isCat) alert('thank you for the cat');\n  ```\n* Otherwise it keeps asking you for a cat until you give it one:\n  ```js\n  else {\n  \twhile (input !== 'cat') input = prompt('still not a cat. \\n\\ncat, please');\n  ```\n* When you're done out-stubborning a computer, the program ends:\n  ```js\n  \talert('finally, a cat.');\n  }\n  ```\n\nBut really, a cat detector is an excuse to [draw a bunny](./bunny.md).\n\n\n","tags":["variation"],"forelinks":["bunny.md"],"subtext":"cat-detector.js.md.st.js","aftlinks":["variation.md"]},{"title":"cat-detector.polyfill.mjs","text":"import './detector-string-polyfill.js';\n\n'cat'.detect('mixed');\n","tags":["variation"],"forelinks":["detector-string-polyfill.js"],"aftlinks":["variation.md"]},{"title":"cat-detector.psu","text":"maybe <- null\n\nWHILE maybe IS NOT \"cat\"\n  maybe <- INPUT \"cat please\"\n  DISPLAY helpful feedback\nEND WHILE\n\nDISPLAY \"thank you for the cat\"\n","tags":["variation","translation"],"aftlinks":["all-medium.md","variation.md"]},{"title":"cat-detector.scm.js","text":"(\"define\", (\"get a cat\", \"message\"),\n  ((\"define\", \"maybe\", (\"*log\", \"prompt\", \"message\")),\n  (\"cond\",\n    ((\"=\", \"maybe\", null),\n      ((\"alert\", \"there is no escape\"), (\"get a cat\", \"message\"))),\n    ((\"not\", (\"=\", \"maybe\", \"cat\")),\n      ((\"alert\", (\"+\", \"'\", \"maybe\", \"' is not cat\")), (\"get a cat\", \"message\"))),\n    (\"else\", (\"maybe\")))));\n\n(\"get a cat\", \"'cat' please\");\n\n(\"alert\", \"thank you for the cat\");\n\n","tags":["variation","translation"],"aftlinks":["variation.md"]},{"title":"cat-detector.scm.json","text":"[\n  [\"define\", [\"get a cat\", \"message\"],\n    [[\"define\", \"maybe\", [\"*log\", \"prompt\", \"message\"]],\n    [\"cond\",\n      [[\"=\", \"maybe\", null],\n        [[\"alert\", \"there is no escape\"], [\"get a cat\", \"message\"]]],\n      [[\"not\", [\"=\", \"maybe\", \"cat\"]],\n        [[\"alert\", [\"+\", \"'\", \"maybe\", \"' is not cat\"]], [\"get a cat\", \"message\"]]],\n      [\"else\", [\"maybe\"]]]]],\n\n  [\"get a cat\", \"'cat' please\"],\n\n  [\"alert\", \"thank you for the cat\"]\n]\n","tags":["variation","translation"],"aftlinks":["variation.md"]},{"title":"cat-detector.spoken.mjs","text":"import { theArrivalOf } from './introducing.mjs';\n\nconst voice = 'Tessa';\nlet volume = 0.4;\n\nconst _The_Inspector_ = await theArrivalOf('The Inspector', { voice, volume });\n\nawait _The_Inspector_(\n  'In a moment you will be prompted to enter some text, please type \"cat\".',\n);\n\nwhile (true) {\n  const maybeACat = prompt();\n\n  if (maybeACat?.toLowerCase() === 'cat') {\n    await _The_Inspector_('Thank you for following directions, you may leave now.', {\n      volume: 0.4,\n    });\n    break;\n  }\n\n  if (maybeACat === null) {\n    await _The_Inspector_('there is no escape');\n  } else if (maybeACat?.toLowerCase() !== 'cat') {\n    await _The_Inspector_(`\"${maybeACat}\" is most certainly not a cat.  Try again.`, {\n      volume,\n    });\n  }\n  volume += 0.1;\n\n  if (volume > 1) {\n    _The_Inspector_(\"I'm done with this.\", { volume: 0.4 });\n    break;\n  }\n}\n","tags":["variation"],"forelinks":["introducing.mjs"],"aftlinks":["variation.md"]},{"title":"cat-detector.svg","text":"\n  \n  \n    let input = null;\n    while (input !== null) {\n      input = prompt('\"cat\" please');\n    }\n    alert('thank you for the cat');\n    \n  \n\n\n\n\n\n","tags":["coaithored","variation","translation"],"aftlinks":["variation.md"]},{"title":"cat-detector.vars.js","text":"const variableNames = new Proxy({}, {\n  has() { return true; },\n  get(_, key) {\n    if (key in globalThis) {\n      const globalValue = globalThis[key];\n      return typeof globalValue === 'function'\n        ? globalValue.bind(globalThis)\n        : globalValue;\n    } else {\n      return key;\n    }\n  },\n});\n\nwith (variableNames) {\n  while (true) {\n    const maybeCat = prompt(Cat_please + ', ' + upper_or_lower_case + '.');\n\n    if (maybeCat === null) {\n      alert(There_is_no_escape + '.');\n    } else if (maybeCat.toLowerCase() === cat.toLowerCase()) {\n      alert(Thank_you_for_the_ + maybeCat + '.');\n      break;\n    } else {\n      alert(maybeCat + _is_not_a_cat + ', ' + try_again + '.');\n    }\n  }\n}\n\n// tags: the fun parts","tags":["the fun parts","variation"],"aftlinks":["the-fun-parts.md","variation.md"]},{"title":"cat-detector.wc.html","text":"cat detector\n\n\n\n\n","tags":["variation"],"aftlinks":["variation.md"]},{"title":"cat-i-farted.js","text":"const chatGPT = new SpeechSynthesisUtterance('chat, GPT');\nchatGPT.lang = 'fr-FR';\nchatGPT.rate = 0.9;\nspeechSynthesis.speak(chatGPT); // cat, I farted\n","tags":["variation"],"aftlinks":["variation.md"]},{"title":"cat-i-farted.mjs","text":"import { _Spoken_, _unspoken_ as cat } from './executable-comment.mjs';\nnew _Spoken_({ lang: 'fr-FR' }).\n\n\nchat.GPT == cat.I.farted","tags":["variation"],"forelinks":["executable-comment.mjs"],"aftlinks":["variation.md"]},{"title":"cat_detector.py","text":"maybe_a_cat = input('please enter \"cat\": ')\n\nif maybe_a_cat.lower() == \"cat\":\n    print(\"thank you for the cat\")\nelse:\n    print(f'\"{maybe_a_cat}\" is not a cat')\n","tags":["variation","translation"],"aftlinks":["variation.md"]},{"title":"cat_detector.py.js","text":"maybe_a_cat = prompt('please enter \"cat: ')\n\nif (maybe_a_cat?.toLowerCase() == 'cat')\n  alert('thank you for the cat')\nelse\n  alert(`\"${maybe_a_cat}\" is not a cat`)\n","tags":["variation"],"aftlinks":["variation.md"]},{"title":"center.css","text":"body {\n  position: fixed;\n  top: 50%;\n  left: 50%;\n  transform: translate(-50%, -50%);\n}\n\n/* tags: useful */\n"},{"title":"cest-pas-faux.js","text":"console.assert(this != false /* ouais */, \"c'est pas faux\");\n\n// tags: tribute\n","tags":["tribute","1-liner"]},{"title":"chickeneighbor.js","text":"alert('You: Why did the chicken cross the road?');\n\nalert('Me: ' + atob('VG8gdmlzaXQgdGhlIG1vcm9uIG9uIHRoZSBvdGhlciBzaWRlLg=='));\n\nsetTimeout(function metapunchline() {\n  alert('Me: < knock knock >');\n\n  alert(\"You: Who's there?\");\n\n  alert('Me: ' + atob('Q2hpY2tlbmVpZ2hib3Ih'));\n}, 20000);\n\n// tags: joke\n","tags":["joke"]},{"title":"chronicle.mjs","text":"import { clone, compare, freeze } from './deep.mjs';\n\nexport const chronicle = (\n  actor,\n  { mutation = false, recordThis = false, cloneThis = false } = {},\n) => {\n  const acts = [];\n  return new Proxy(actor, {\n    apply(target, thisVal, args) {\n      acts.push({ act: 'call', args: clone(args) });\n      if (recordThis) entry.this = cloneThis ? clone(thisVal) : thisVal;\n      try {\n        return (acts.at(-1).return = Reflect.apply(target, thisVal, args));\n      } catch (error) {\n        throw (acts.at(-1).error = error);\n      } finally {\n        if (mutation && !compare(args, acts.at(-1).args)) acts.at(-1).mutation = args;\n      }\n    },\n    get(target, key) {\n      if (key === '_chronicle') return freeze(clone(acts));\n      if (key === '_forget') {\n        const echo = clone(acts);\n        while (acts.length > 0) acts.pop();\n        return echo;\n      }\n      acts.push({ act: 'get', [key]: target[key] });\n      return target[key];\n    },\n    set(target, key, value, _) {\n      if (key === '_chronicle' || key === '_forget') return true;\n      target[key] = value;\n      acts.push({ act: 'set', [key]: value });\n      return true;\n    },\n  });\n};\n\nexport default chronicle;\n\n// tags: minibrary\n","tags":["minibrary"],"forelinks":["deep.mjs"],"aftlinks":["non-sequitur.mjs","tintin.0.mjs","tintin.1.mjs","tintin.2.mjs","tintin.3.mjs","tintin.4.mjs"]},{"title":"classy-curry.js","text":"const classy = (Thing, { args = [], length = Thing.length } = {}) =>\n  function curry(arg) {\n    return args.length === length - 1\n      ? new Thing(...args, arg)\n      : classy(Thing, { args: args.concat(arg) });\n  };\n\n// ---   ---   ---   ---   ---   ---   ---\n\nclass TrafficRules {\n  constructor(optional, flexible, creative) {\n    this.optional = optional;\n    this.flexible = flexible;\n    this.creative = creative;\n  }\n  get description() {\n    return `The traffic rules here are${\n\t\t\tthis.creative ? '' : 'not '} creative,${\n      this.flexible ? '' : 'not '} flexible, and${\n\t\t\tthis.optional ? '' : 'not '} optional.`;\n  }\n}\n\nconsole.log(\n\tclassy(TrafficRules)(true)(true)(true).description\n);\n\n// tags: wuzzle","tags":["wuzzle"]},{"title":"coAIthored.md","text":"# CoAIthored\n\nCo-authored with AI.\n\n\n"},{"title":"code-is-text.txt.css","text":".token { color: black !important; }\n","tags":["1-liner"]},{"title":"declare-morf.js","text":"/* --- morf: a variable that must be reassigned ---\n\n\terrors at creation-phase if the variable is not reassigned\n\tit can be declared without initialization \n\n*/\n\nmorf a; \n\na = 1;\n\na += 1;\n\nmorf b = a + 1 // SyntaxError: morf b is never reassigned\n\nconsole.log(b); // never executed\n\n// tags: ESi","tags":["esi"],"aftlinks":["ESi.md"]},{"title":"declare-tag.js","text":"/* --- tag: it's value is it's name as a string ---\n\n\tread-only\n\n\terrors at creation-phase\n\t\tif it is initialized\n\t\tif the variable is (re)assigned\n\t\t\n*/\n\n// tag potato = 1; // SyntaxError: tag potato cannot be initialized\n\ntag potato;\n\nalert(`potato${potato}`); // potatopotato\n\nconsole.log(potato === 'potato'); // true\n\n// potato += '!'; // SyntaxError: tag potato cannot be assigned\n\n\n// tags: ESi","tags":["esi"],"aftlinks":["ESi.md"]},{"title":"declenche.html","text":"\n\n\n"},{"title":"deep-clone.mjs","text":"export const deepClone = (src, clonesMap = new Map()) => {\n  if (clonesMap.has(src)) return clonesMap.get(src);\n\n  let clone = src;\n\n  if (typeof src === 'function' || Object(src) !== src) {\n    clone = src;\n  } else if (src instanceof Date) {\n    clone = new Date(src.getTime());\n  } else if (src instanceof RegExp) {\n    clone = new RegExp(src);\n  } else if (Array.isArray(src)) {\n    clone = src.map((item) => deepClone(item, clonesMap));\n  } else if (src instanceof Error) {\n    clone = new src.constructor(src.message);\n    clone.stack = src.stack;\n  } else if (src instanceof Object) {\n    clone = Object.create(src.__proto__);\n    for (const key in src) clone[key] = deepClone(src[key], clonesMap);\n  }\n\n  clonesMap.set(src, clone);\n\n  return clone;\n};\n\nexport default deepClone;\n\n// tags: useful\n","tags":["useful"],"aftlinks":["deep.mjs"]},{"title":"deep-compare.mjs","text":"export const deepCompare = (actual, expected) =>\n  actual === expected ||\n  Object.is(actual, expected) ||\n  (Object(actual) === actual &&\n    Object(expected) === expected &&\n    ((Array.isArray(actual) &&\n      Array.isArray(expected) &&\n      actual.length === expected.length &&\n      expected.every((expected, index) => deepCompare(actual[index], expected))) ||\n      (Object.keys(actual).length === Object.keys(expected).length &&\n        Object.keys(expected).every((key) => deepCompare(actual[key], expected[key])))));\n\nexport default deepCompare;\n\n// tags: useful, testing\n","tags":["testing","useful"],"aftlinks":["deep.mjs","expect.mjs"]},{"title":"deep-freeze.mjs","text":"export const deepFreeze = (thing) => {\n  if (Array.isArray(thing)) {\n    thing.forEach(deepFreeze);\n    return Object.freeze(thing);\n  }\n\n  if (typeof thing === 'object' && thing !== null) {\n    Object.values(thing).forEach(deepFreeze);\n    return Object.freeze(thing);\n  }\n\n  return thing;\n};\n\nexport default deepFreeze;\n\n// tags: useful\n","tags":["useful"],"aftlinks":["deep.mjs"]},{"title":"deep.mjs","text":"import { deepClone as clone } from './deep-clone.mjs';\nimport { deepCompare as compare } from './deep-compare.mjs';\nimport { deepFreeze as freeze } from './deep-freeze.mjs';\n\nexport {  clone,  compare, freeze };\nexport default {  clone,  compare, freeze };\n\n// tags: useful, minibrary\n","tags":["minibrary","useful"],"forelinks":["deep-clone.mjs","deep-compare.mjs","deep-freeze.mjs"],"aftlinks":["chronicle.mjs"]},{"title":"demethod.mjs","text":"const prefixName = (prefix, name) => `${prefix}${/[^\\$\\_]/i.test(prefix.at(-1))\n      ? `${name[0].toUpperCase()}${name.slice(1, name.length)}`\n      : name}`;\n\nexport const demethod = (\n  toDemethod = {},\n  { me = false, statics = false, inherited = true, prefix = '', target = {} } = {},\n) => {\n  if (Array.isArray(toDemethod)) {\n    return toDemethod.map((x) => demethod(x, { target, statics, inherited, prefix }));\n  }\n  if (me) {\n    const name = prefixName(prefix, toDemethod.name);\n    return { [name]: (that, ...args) => toDemethod.call(that, ...args) }[name];\n  }\n\n  const toWrap = [];\n  if (statics) {\n    toWrap.push(...Reflect.ownKeys(toDemethod).map((key) => \n      [key, toDemethod[key], false]\n    ));\n  }\n  if (inherited && toDemethod.prototype) {\n    toWrap.push(...Reflect.ownKeys(toDemethod.prototype).map((key) => \n      [ key, toDemethod.prototype[key], true]\n    ));\n  }\n  for (const [name, value, isMethod] of toWrap) {\n    if (typeof name !== 'string' || name === 'constructor') continue;\n    if (typeof value !== 'function') continue;\n    \n    const pseudonym = prefix ? prefixName(prefix, name) : name;\n    target[pseudonym] = isMethod ? (that, ...args) => value.call(that, ...args) : value;\n  }\n\n  return target;\n};\n\nexport default demethod;\n\n// tags: minibrary\n","tags":["minibrary"],"aftlinks":["training-wheels.mjs"]},{"title":"describe-it.mjs","text":"const _console_ = console;\n\nexport const describe = (name = '', testFunction = () => {}) => {\n  _console_.group(`%c${name}`, 'font-weight: bold;');\n  try {\n    testFunction();\n  } catch (err) {\n    _console_.error('%cSUITE ERROR:', 'font-weight: bold;', err);\n  }\n  _console_.groupEnd();\n};\nexport const suite = describe;\n\nexport const it = (name = '', testFunction = () => {}) => {\n  const out = Object.assign({}, _console_);\n  const callOuts = [];\n  Object.keys(_console_).forEach(\n    (key) => (_console_[key] = (...args) => callOuts.push({ key, args })),\n  );\n  let thrown = null;\n  try {\n    testFunction();\n  } catch (err) {\n    thrown = err;\n  }\n  if (thrown) out.groupCollapsed(`%c✖ NO: ${name}`, 'font-weight: bold; color: red;');\n  else out.log(`%c√ YES: ${name}`, 'font-weight: bold; color: green;');\n  callOuts.forEach((callOut) => out[callOut.key](...callOut.args));\n  thrown && out.error(thrown);\n  (thrown || callOuts.length > 0) && out.groupEnd();\n  Object.assign(_console_, out);\n};\nexport const test = it;\n\nexport default { describe, suite, it, test };\n\n// tags: testing, minibrary\n","tags":["minibrary","testing"],"aftlinks":["testing.mjs"]},{"title":"detector-string-polyfill.js","text":"String.prototype.detect = function detect(comparison = 'strict') {\n  const isNotDetected =\n    comparison === 'strict'\n      ? (input = '') => input !== this\n      : comparison == 'loose'\n      ? (input = '') => input != this\n      : comparison === 'mixed'\n      ? (input = '') => input?.toLowerCase() !== this\n      : (input = '') => !new RegExp(this, comparison).test(input);\n\n  while (isNotDetected(prompt(`\"${this}\" please:`)));\n\n  alert(`Thank you for \"${this}\"`);\n};\n\n// tags: polyfill","tags":["polyfill"],"aftlinks":["cat-detector.polyfill.mjs"]},{"title":"detector-wc-factory.mjs","text":"export const detectorWCFactory = (thing = 'cat') =>\n  class CatDetector extends HTMLElement {\n    constructor() {\n      super();\n\n      const input = document.createElement('input');\n      input.placeholder = thing;\n      input.style.width = `${thing.length}ch`;\n\n      const purpose = `detect \"${thing}\"`;\n      input.addEventListener(\n        'input',\n        {\n          [purpose]: () => {\n            for (let i = 0; i < input.value.length; i++) {\n              if (thing[i] !== input.value[i]) {\n                input.value = '';\n              }\n            }\n          },\n        }[purpose],\n      );\n\n      this.appendChild(input);\n    }\n  };\n\nexport default detectorWCFactory;\n\n// tags: minibrary\n","tags":["minibrary"]},{"title":"dna.js","text":"const WIDTH = 30;\nconst STEP = 0.08;\nconst SPEED = 30;\n\nconst coordinate = (num, phase = 0) =>\n  Math.round(Math.sin(num + phase) * WIDTH) + WIDTH;\n\nconst drawBasePair = (a = 0, b = WIDTH) => {\n  const cA = coordinate(a);\n  const cB = coordinate(b, WIDTH / 2);\n\n  const leftPad = Array((cA < cB ? cA : cB) + 1).join(' ');\n  const bases = Array(Math.abs(cB - cA)).join('=');\n\n  console.log(`${leftPad}{|${bases}|}`);\n\n  if (a / b < 0.3) setTimeout(drawBasePair, SPEED, a + STEP, b + STEP);\n};\n\ndrawBasePair();\n\n// tags: sketch\n","tags":["sketch"]},{"title":"do-without.js","text":"const out = { eye_roll: '(◔_◔)' };\n\ndo {\n  with (out) {\n    alert(eye_roll);\n  }\n} while (null);\n\n// tags: wuzzle, the fun parts\n","tags":["the fun parts","wuzzle"],"aftlinks":["the-fun-parts.md"]},{"title":"drabble-twabble.mjs","text":"import { describe, test, expect } from './testing.mjs';\n\nconst snippetName = prompt(\n  'which story do you want to check?',\n  '(snippet name with .txt extension)',\n);\nif (!snippetName.endsWith('.txt')) {\n  alert(`no go. ${snippetName} is not a .txt snippet`);\n  throw new TypeError('drabbles and twabbles should probably be .txt files');\n}\n\nconst snippet = await fetch(snippetName)\n  .then((res) => res.text())\n  .then((snippet) => snippet.replaceAll(/\\([\\s]*tags:[^)]*\\)/gi, ''));\nconst wordCount = snippet.split(/\\s/).filter(Boolean).length;\nconst characterCount = snippet\n  .split('')\n  .filter((char) => /[A-Za-z]/.test(char)).length;\n\nconsole.log(snippet);\ndescribe(`What is ${snippetName}?`, () => {\n  test('Is it a drabble?', () => expect(wordCount).toEqual(100));\n  test('Is it a twabble?', () => expect(characterCount).toEqual(100));\n});\n\nalert(\n  `${snippetName} ${\n    wordCount !== 100 && characterCount !== 100\n      ? 'is neither a drabble nor a twabble.'\n      : wordCount === 100 && characterCount === 100\n      ? 'is both a drabble and a twabble.'\n      : wordCount === 100\n      ? 'is a drabble.'\n      : 'is a twabble.'\n  }:\\n\n  ${snippet}`,\n);\n\n// so un-international, so brittle\n","forelinks":["testing.mjs"]},{"title":"eat-sleep-rave-repeat.js","text":"import('./projector.mjs').then(({ projector }) => {\n  \n  const aBeat = {\n    get eat() {\n      console.log(`%c💩 ${prompt('feed me!')} 💩`, 'font-size: xx-large');\n    },\n    get sleep() {\n      const siesta = Date.now();\n      while (Date.now() - siesta < 2000);\n    },\n    get rave() {\n      const lasers = () =>  Math.random() < 0.2\n          ? ['*', '@', '#', '%', '&', '!', '$'][Math.floor(Math.random() * 26)]\n          : ' ';\n      projector(function* lightShow() {\n        while ('still standing') {\n          yield Array(30).fill('')\n            .map(() => [\n              `%c${(() => Array(60).fill(' ').map(lasers).join(''))()}`,\n              `color: #${Math.floor(Math.random() * 16777215).toString(16)}`,\n            ]);\n        }\n      }, { maxTime: 2000, async: false });\n    },\n    repeat: true\n  };\n\n  \n  with (aBeat) { do {\n\n      eat;\n      sleep;\n      rave;         } while (\n      repeat\n\n  )}\n\n});\n\n// tags: sketch, reel, the fun parts\n\n// colors credit: https://css-tricks.com/snippets/javascript/random-hex-color/","tags":["reel","sketch","the fun parts"],"forelinks":["projector.mjs"],"aftlinks":["the-fun-parts.md"]},{"title":"empty.json","text":"{ \"empty\": true }\n","tags":["variation","1-liner","translation"],"aftlinks":["all-medium.md","variation.md"]},{"title":"empty.yaml","text":"empty: true\n","tags":["variation","1-liner","translation"],"aftlinks":["all-medium.md","variation.md"]},{"title":"executable-comment.mjs","text":"const unspeaker = () => _unspoken_;\nexport const _unspoken_ = new Proxy(unspeaker, {\n  get(_, comment) {\n    return comment === Symbol.toPrimitive ? () => 'unspoken' : _unspoken_;\n  },\n});\n\nspeechSynthesis.getVoices();\nexport const _Spoken_ = (function introduce(voiceConfig = {}, mute = false) {\n  const Spoken = new Proxy(\n    function Speaker() {\n      return Spoken;\n    },\n    {\n      get(_, comment, __) {\n        if (comment === Symbol.toPrimitive) return () => 'Spoken';\n        if (comment === Symbol.iterator) return (mute = true), Spoken;\n        if (mute) return comment === 'done' && (mute = false), Spoken;\n        speechSynthesis.speak(\n          Object.assign(new SpeechSynthesisUtterance(comment), voiceConfig),\n        );\n        return Spoken;\n      },\n      construct(_, args = []) {\n        if (args[0]?.voice)\n          args[0].voice = speechSynthesis\n            .getVoices()\n            .find((voice) => voice.name === args[0].voice);\n        return introduce(args[0] || {});\n      },\n    },\n  );\n  return Spoken;\n})();\n\nexport default _unspoken_;\n\n// tags: minibrary\n\n// --- wait, wat? ---\n\nconst { _ } = _unspoken_;\n// const { _ } = _Spoken_;\n\n_.This.curiosity.lets.you.write.any.chain.you.want(..._.within.JS.syntax);\n_.Your.comments.will.be.executed, _.but.they[\"won't\"].DO.anything;\n_.Operators.are.now(_.sort.of).punctuation - _.with.a.little.imagination;\n_.What.are.you.waiting.for?.___.Execute.your.comments['!'];\n","tags":["minibrary"],"aftlinks":["cat-i-farted.mjs","je-l-ignore.mjs","mu.mjs","snail-train.mjs"]},{"title":"executable-pseudocode.mjs","text":"const Executable_Pseudocode = 'Potemkin Program';\n\nconst Potemkin_Program = new Proxy(\n  {\n    [Executable_Pseudocode]: function () {\n      return Potemkin_Program;\n    },\n  }[Executable_Pseudocode],\n  {\n    get(_, key) {\n      console.log(key);\n      if (key === Symbol.toPrimitive) return () => Executable_Pseudocode;\n      if (key === Symbol.iterator) {\n        return {\n          [Executable_Pseudocode]: function* () {\n            for (const character of Executable_Pseudocode) yield Potemkin_Program;\n          },\n        }[Executable_Pseudocode];\n      }\n      return Potemkin_Program;\n    },\n    construct() {\n      return Potemkin_Program;\n    },\n  },\n);\n\nexport default Potemkin_Program;\n\n// tags: minibrary\n","tags":["minibrary"],"aftlinks":["all-the-reals.mjs"]},{"title":"existential-void.js","text":"/*\n  A: I disappear and leave you.\n  E: You didn’t disappear.\n  A: Well, I did and then appeared again. The void does not accept me, sir.\n*/\n\nconsole.assert(void 'me', 'the void accepts');\n"},{"title":"expect.mjs","text":"import deepCompare from './deep-compare.mjs';\n\nexport const expect = (received, not = false) => ({\n  get not() {\n    not = !not;\n    return this;\n  },\n  toEqual(exp) {\n    if (not ? deepCompare(received, exp) : !deepCompare(received, exp)) {\n      console.log('%cReceived:', 'font-weight: bold;', received);\n      console.log('%cExpected:', 'font-weight: bold;', exp);\n      throw new Error(`Received does ${not ? '' : 'not '}equal Expected.`);\n    }\n  },\n  toThrow(expect1, expect2 = '') {\n    if (typeof received !== 'function') throw new Error('Did not receive a function');\n    let threw = false, error;\n    try {\n      received();\n    } catch (err) {\n      (threw = true), (error = err);\n    }\n    if (not) {\n      if (threw) {\n        throw new Error(`Received threw an error -> ${error.name}: ${error.message}`);\n      }\n    } else if (threw) {\n      if (expect1?.name?.includes('Error') && error?.name !== expect1?.name)\n        throw new Error(`Threw ${error.name}, expected ${expect1.prototype.name}`);\n      const messageMatcher = typeof expect1 === 'string' ? expect1 : expect2;\n      if (messageMatcher && !new RegExp(messageMatcher, 'i').test(error.message))\n        throw new Error(`Message \"${error.message}\" should include \"${messageMatcher}\"`);\n    } else {\n      throw new Error('Received did not throw an error.');\n    }\n  },\n});\n\nexport default expect;\n\n// tags: testing, minibrary\n","tags":["minibrary","testing"],"forelinks":["deep-compare.mjs"],"aftlinks":["testing.mjs"]},{"title":"fake-it-till-you-make-it.mjs","text":"import { steamroll } from './steamroll.mjs';\n\nfetch('./python-by-any-other-name.js')\n  .then((res) => res.text())\n  .then(steamroll)\n  .then(console.log)\n  .catch(console.error);\n\n// tags: frivolous\n","tags":["frivolous"],"forelinks":["python-by-any-other-name.js","steamroll.mjs"]},{"title":"flag-translator.mjs","text":"import { alertStory } from './story-in-a-story.mjs';\n\nlet lang = '';\n\nwhile (\n  !lang &&\n  lang.toLowerCase() !== 'de' &&\n  lang.toLowerCase() !== 'en' &&\n  lang.toLowerCase() !== 'fr' &&\n  lang.toLowerCase() !== 'nl'\n) {\n  lang = prompt('- DE\\n- EN\\n- FR\\n- NL');\n}\n\nawait alertStory(`be.${lang.toLowerCase()}.txt`);\n","forelinks":["story-in-a-story.mjs"]},{"title":"flashlight.css","text":"* {\n  opacity: 0;\n  transition: opacity 0.5s ease;\n}\n\n*:hover {\n  opacity: 1;\n}\n"},{"title":"flat-earth.js","text":"const deepFlat = (obj = {}, flat = {}) => {\n  for (const [key, value] of Object.entries(obj)) {\n    if (key in flat) {\n      continue;\n    }\n\n    flat[key] = value;\n\n    if (Object(value) === value) {\n      Object.assign(flat, deepFlat(value, flat));\n    }\n  }\n\n  return flat;\n};\n\nconst flatEarth = deepFlat(globalThis);\n\nconsole.log(flatEarth);\n\n// tags: wuzzle\n","tags":["wuzzle"]},{"title":"french-in-english.txt","text":"I miss you, you miss me. \nYou miss me, I miss you.\n"},{"title":"funsole.mjs","text":"import { theFoxSays } from './what-does-the-fox-say.mjs';\n\nexport default { theFoxSays };\n\n// tags: minibrary\n","tags":["minibrary"],"forelinks":["what-does-the-fox-say.mjs"],"aftlinks":["all-medium.md"]},{"title":"goalpost-sort.mjs","text":"import { describe, it, expect } from './testing.mjs';\n\nconst goalpostSort = (nums = []) => ({\n  numbers: Object.freeze([...nums]),\n  areSorted: eval(\n    `(nums=[${nums.join(',')}]) => true ${nums\n      .map((n, i) => `&& nums[${i}] === ${n}`)\n      .join(' ')}`,\n  ),\n});\n\ndescribe('goalpostSort sorts an array in O(n) by moving the goalpost', () => {\n  it('returns a custom goalpost for arbitrary arrays', () =>\n    expect(typeof goalpostSort([3, 2, 1]).areSorted).toEqual('function'));\n  it('the goalpost function looks like this', () =>\n    expect(goalpostSort([7, 5, 8]).areSorted.toString()).toEqual(\n      '(nums=[7,5,8]) => true && nums[0] === 7 && nums[1] === 5 && nums[2] === 8',\n    ));\n  it('returns a copy of the array in case you loose it', () => {\n    const argArray = [5, 0, 4, 1, 3, 2];\n    const { numbers } = goalpostSort(argArray);\n    expect(numbers !== argArray).toEqual(true);\n    expect(numbers).toEqual(argArray);\n  });\n  it('returns a frozen array to protect the goalpost', () => {\n    expect(() => goalpostSort([5, 0, 4]).numbers.push(3)).toThrow(TypeError);\n  });\n  it('goalpost sorts an empty array', () =>\n    expect(goalpostSort([]).areSorted([])).toEqual(true));\n  it('goalpost sorts a sorted array', () => {\n    const { numbers, areSorted } = goalpostSort([-1, 0, 2]);\n    expect(areSorted(numbers)).toEqual(true);\n  });\n  it('goalpost sorts an unsorted array', () =>\n    expect(goalpostSort([5, 0, 4, 1, 2]).areSorted([5, 0, 4, 1, 2])).toEqual(true));\n  it('goalpost sorts the correct array by default', () =>\n    expect(goalpostSort([5, 0, 4, 1, 3, 2]).areSorted()).toEqual(true));\n  it('does not goalpost sort the wrong array', () =>\n    expect(goalpostSort([5, 0, 4, 1, 3, 2]).areSorted([3, 2, 7])).toEqual(false));\n});\n","forelinks":["testing.mjs"]},{"title":"goto-ish.js","text":"var wants_a_compliment = confirm('do you want a compliment?');\n\ncompliment: {\n  insult: {\n    if (wants_a_compliment) break insult;\n    alert('you own a store');\n  }\n  if (!wants_a_compliment) break compliment;\n  alert('well done, good work');\n}\n\n// tags: the fun parts\n","tags":["the fun parts"],"aftlinks":["the-fun-parts.md"]},{"title":"gotta-fetch-em-all.js","text":"fetch(\n  'https://raw.githubusercontent.com/PokeAPI/pokeapi/master/data/v2/csv/pokemon.csv',\n)\n  .then((res) => res.text())\n  .then((csv) =>\n    csv\n      .split('\\n')\n      .slice(1)\n      .map((line) => line.split(',')[1])\n      .join('\\n'),\n  )\n  .then(console.log)\n  .catch(console.error);\n"},{"title":"halloween.js","text":"'😈' || '🍭'\n\n// tags: wuzzle\n","tags":["wuzzle","variation","1-liner","translation"],"aftlinks":["variation.md"]},{"title":"halloween.py","text":"'😈' or '🍭'\n\n# tags: wuzzle\n","tags":["wuzzle","variation","1-liner","translation"],"aftlinks":["variation.md"]},{"title":"happy-new-year.js","text":"const lastYear = new Date().getFullYear();\nlet thisYear = lastYear;\n\nwhile (lastYear === thisYear) thisYear = new Date().getFullYear();\n\nalert('🪩 Happy New Year 🪩');\n"},{"title":"heartbreak.js","text":"heart: { break heart; }\n\n// tags: wuzzle, the fun parts\n","tags":["the fun parts","wuzzle","1-liner"],"aftlinks":["the-fun-parts.md"]},{"title":"hello-world.js","text":"while (prompt('hello') !== 'world');\n","tags":["variation","1-liner","translation"],"aftlinks":["variation.md"]},{"title":"hello_world.py","text":"while input(\"hello\") != \"world\": pass\n","tags":["variation","1-liner","translation"],"aftlinks":["variation.md"]},{"title":"hydra.html","text":"\n\n\n\n\n\n\n","tags":["coaithored"]},{"title":"impermanence.js","text":"life: { const CHANGE = true; }\n\n// tags: wuzzle\n","tags":["wuzzle","1-liner"]},{"title":"in-one-ear.js","text":"          '   '\n      '           '\n    '    (*) (*)    '\nalert(             prompt())\n    '       ^       '\n    '   \\_______/   '\n      '           '\n          '   '\n\n// tags: wuzzle","tags":["wuzzle"],"alt":"... out the other"},{"title":"index.html","text":"\n\n  \n    \n    snippets\n  \n  \n    \n  \n\n\n","tags":["metappet"]},{"title":"insomnicat.js","text":"/*\n\tLa bande dessinée la plus populaire de Philippe Geluck est sans doute \"Le Chat\".\n\tIl a créé ce personnage en 1983 et il est devenu extrêmement populaire,\n\tnon seulement en Belgique, mais aussi à l'étranger fr.wikipedia.org.\n\n\tImaginons maintenant que Philippe Geluck ait écrit \"Le Chat\" en utilisant JavaScript.\n\tVoici comment une de ses planches pourrait se traduire en code :\n*/\n\nfunction LeChat() {\n  // Le Chat fait une déclaration\n  console.log(\"Je pense, donc je suis...\");\n\n  // Pause pour effet dramatique\n  setTimeout(function() {\n    console.log(\"...mais si je dors, suis-je toujours?\");\n  }, 3000);\n\n  // Le Chat conclut avec sagesse\n  setTimeout(function() {\n    console.log(\"Peut-être que je suis, mais je ne suis pas sûr.\");\n  }, 6000);\n}\n\n// Appelons la fonction pour voir Le Chat en action\nLeChat();\n\n/*\n\tDans ce script, \"Le Chat\" fait une déclaration (\"Je pense, donc je suis...\"),\n\tprend une pause pour réfléchir, puis conclut avec une autre déclaration pleine de sagesse.\n\tC'est une façon très simple de représenter une bande dessinée en utilisant JavaScript.\n\tBien sûr, cela ne rend pas justice à l'humour subtil et à l'art de Geluck,\n\tmais c'est une interprétation ludique de son travail en code.\n*/\n\n// https://www.phind.com/agent?cache=cln9bvl6a000dl808efw2xpil\n//  an LLM wrote this, I bring it to you unedited\n\n// tags: coAIthored, tribute, le chat\n","tags":["coaithored","le chat","tribute"]},{"title":"interval-training.html","text":"\n"},{"title":"introducing.mjs","text":"speechSynthesis.getVoices();\n\nexport const introducing = (name = '', voiceConfig = {}) => {\n  const speaker = {\n    [name]: (text = '', speakConfig = {}) => {\n      console.log(`%c${name}%c: ${text}`, 'font-style: italic;', '');\n\n      const utteranceConfig = Object.assign({}, voiceConfig, speaker, speakConfig);\n      if (utteranceConfig?.voice) {\n        utteranceConfig.voice = speechSynthesis\n          .getVoices()\n          .find((voice) => voice.name === utteranceConfig.voice);\n      }\n      const utterance = Object.assign(\n        new SpeechSynthesisUtterance(text),\n        utteranceConfig,\n      );\n\n      return new Promise((res) => {\n        utterance.addEventListener('end', () => res(text));\n        speechSynthesis.speak(utterance);\n      });\n    },\n  }[name];\n\n  speaker.recite = async (textPath = '') =>\n    fetch(textPath)\n      .then((res) => res.text())\n      .then(speaker)\n      .catch(console.error);\n\n  return speaker;\n};\n\nexport const theArrivalOf = async (name = '', voiceConfig = {}, delay = 200) => {\n  await new Promise((res) => setTimeout(res, delay));\n  return introducing(name, voiceConfig);\n};\n\nexport default introducing;\n\n// tags: minibrary\n","tags":["minibrary"],"aftlinks":["cat-detector.spoken.mjs"]},{"title":"je-l-ignore.js","text":"var combien = (function d_etages(y_a_t_il) {\n  try {\n    return d_etages(y_a_t_il + 1);\n  } catch (je_l_ignore) {\n    return y_a_t_il;\n  }\n})(0);\n\nconsole.log(\n  '\\n' +\n    'C’est l’histoire d’un homme qui tombe d’un immeuble de ' +\n    combien +\n    ' étages.' +\n    '\\n\\n' +\n    'Le mec, au fur et à mesure de sa chute, il se répète sans cesse pour se rassurer:' +\n    '\\n\\n',\n);\n\ntry {\n  (function la_chute(etage) {\n    console.log('étage ' + etage + ', jusqu’ici tout va bien.');\n\n    la_chute(etage - 1);\n  })(combien);\n} catch (l_importance) {\n  l_importance.message = 'c’est l’atterrissage.';\n  throw l_importance;\n} finally {\n  console.log('\\n' + \"Mais l'important n’est pas la chute,\" + '\\n\\n');\n}\n\n// credit: la haine\n\n// tags: tribute\n","tags":["tribute","variation"],"aftlinks":["variation.md"]},{"title":"je-l-ignore.mjs","text":"import { _Spoken_, _unspoken_ } from './executable-comment.mjs';\n\nvar combien = (function d_etages(y_a_t_il = 0) {\n  try {\n    return d_etages(y_a_t_il + 1);\n  } catch (je_l_ignore) {\n    return y_a_t_il;\n  }\n})();\n\nsetTimeout(function je_l_ignore() {\n  var _ = new _Spoken_({ voice: 'Thomas' });\n\n  _[\"C'est\"][\"l'histoire\"][\"d'un\"].homme.qui.tombe[\"d'un\"].immeuble.de[combien].étages;\n  _.Le.mec, _.au.fur.et.à.mesure.de.sa.chute, _.il.se.répète.sans.cesse.pour.se.rassurer;\n\n  try {\n    (function la_chute(etage = 0) {\n      _[\"Jusq'ici\"].tout.va.bien;\n      la_chute(etage - 1);\n    })(combien);\n  } catch (l_atterissage) {\n    _.Mais[\"l'important\"][\"n'est\"].pas.la.chute;\n  } finally {\n    _[\"c'est\"][\"l'attérissage\"];\n  }\n}, 100);\n\n// credit: la haine\n\n// tags: tribute\n","tags":["tribute","variation"],"forelinks":["executable-comment.mjs"],"aftlinks":["variation.md"]},{"title":"kishu.txt","text":"    k\n   i i\n  s i s\n h s s h\nu h s h u\n u h h u\n  u h u\n   u u\n    u\n"},{"title":"la-trahison-de-l-ascii.js","text":"(function la_trahison_de_l_ascii() {\n  console.assert(this !== 'pipe');\n}).call(\n  `\n ___\n(__ '-._                _____\n   '-._ '-._          .'     '.\n       '-._ '-._     .=========.\n           '._ /'-..-          .\n              '-._             .\n                  '-.._______.'\n`,\n);\n\n// https://ascii.co.uk/art/pipe\n"},{"title":"lenses.json","text":"{\n  \"--defaults\": {\n    \".html\": \"study\"\n  },\n\n  \"study\": {\n    \"save\": true,\n    \"run\": true,\n    \"debug\": true,\n    \"environment\": true,\n    \"clearScheduled\": true,\n    \"parsons\": false,\n    \"dark\": false\n  }\n}\n"},{"title":"literize.mjs","text":"export const literize = (fn, argsFormat) => {\n  const literateFunctionName = fn.name\n    ? `literate${fn.name[0].toUpperCase() + fn.name.substr(1)}`\n    : 'literateFunction';\n\n  const literateFunction = {\n    [literateFunctionName]: (_, ...args) => {\n      if (Array.isArray(argsFormat) && argsFormat.every((i) => typeof i === 'string')) {\n        const keyed = {};\n        for (let i = 0; i < argsFormat.length; i++) {\n          keyed[argsFormat[i]] = args[i];\n        }\n        return fn(keyed);\n      } else if (\n        Array.isArray(argsFormat) &&\n        argsFormat.every((i) => typeof i === 'number')\n      ) {\n        const shuffled = [];\n        for (let i = 0; i < args.length; i++) {\n          if (argsFormat[i] !== undefined) {\n            shuffled[argsFormat[i] - 1] = args[i];\n          } else {\n            shuffled[i] = args[i];\n          }\n        }\n        return fn(...shuffled);\n      } else {\n        return fn(...args);\n      }\n      ß;\n    },\n  }[literateFunctionName];\n\n  return literateFunction;\n};\n\nexport default literize;\n\n// tags: minibrary\n","tags":["minibrary"]},{"title":"log.mjs","text":"export const out = console;\n\nexport const log = (...things) => (\n  out.groupCollapsed(...things), out.trace(), out.groupEnd(), things[0]\n);\n\nexport const levels = Object.keys(out).reduce(\n  (all, key) => ({\n    ...all,\n    [key]: (...things) => (out[key](...things), things[0]),\n  }),\n  {},\n);\n\nexport const tag = Object.keys(out).reduce(\n  (all, key) => ({\n    ...all,\n    [key]:\n      (tag) =>\n      (...things) => (out[key](tag, ...things), things[0]),\n  }),\n  {},\n);\n\nexport default Object.assign(log, levels);\n\n// tags:  minibrary, useful\n","tags":["minibrary","useful"],"aftlinks":["all-medium.md"]},{"title":"love-adventure-success.1.js","text":"// Once upon a time, in a land of code,\n// A variable named 'dreams' was bestowed.\nlet dreams = [];\n\n// With each passing day, new dreams were found,\n// And into the array, they were tightly bound.\ndreams.push('love');\ndreams.push('adventure');\ndreams.push('success');\n\n// But the dreams were restless, they wanted to roam,\n// So they broke free and found a new home.\nlet newDreams = dreams.splice(0, dreams.length);\n\n// The old dreams were gone, but not forgotten,\n// In a new variable, their memory was begotten.\nlet forgottenDreams = newDreams;\n\n// But the forgotten dreams were not content,\n// They yearned to be remembered, to be present.\nforgottenDreams.forEach((dream) => {\n  console.log('Remember me: ' + dream);\n});\n\n// And so the dreams lived on, in memory and thought,\n// A reminder of the battles fought.\n\n// https://www.phind.com/agent?cache=cln0bq31a0027jz08b4dc5qrh\n//  an LLM wrote this, I bring it to you unedited\n\n// tags: coAIthored\n","tags":["coaithored","variation"],"aftlinks":["variation.md"]},{"title":"love-adventure-success.2.js","text":"/*\n\tThis poem tells the story of dreams turning into illusions and becoming a puzzle.\n\tThe variable names, comments, and formatting help convey the narrative.\n\tThe final answer is printed to the console. Enjoy the puzzling journey!\n*/\n\n// Once upon a time, in a land of code,\n// A variable named 'dreams' was bestowed.\nlet dreams = [];\n\n// With each passing day, new dreams were found,\n// And into the array, they were tightly bound.\ndreams.push('love');\ndreams.push('adventure');\ndreams.push('success');\n\n// But as time went on, the dreams grew old,\n// And their true meaning began to unfold.\nlet reality = dreams.map((dream) => dream.toLowerCase());\n\n// The dreams were transformed, no longer the same,\n// As reality played its mysterious game.\nlet illusion = reality.reverse();\n\n// And in the end, what was once so clear,\n// Became a puzzle, filled with fear.\nlet puzzle = illusion.join('');\n\n// But fear not, for within the code,\n// Lies the answer, waiting to be showed.\nconsole.log(puzzle);\n\n// https://www.phind.com/agent?cache=cln0bq31a0027jz08b4dc5qrh\n//  an LLM wrote this, I bring it to you unedited\n\n// tags: coAIthored\n","tags":["coaithored","variation"],"aftlinks":["variation.md"]},{"title":"mijn-kat.txt","text":"    /\\\n    \\ \\\n     \\ \\\n     / /\n    / /\n   _\\ \\_/\\/\\\n  /  *  \\@@ =\n |       |Y/\n |       |~\n  \\ /_\\ /\n   \\\\ //\n    |||\n   _|||_\n  ( / \\ )"},{"title":"minibrary.md","text":"# Mini Libraries\n\n\n","tags":["1-liner"]},{"title":"mirror.css","text":"body {\n  -moz-transform: scale(-1, 1);\n  -webkit-transform: scale(-1, 1);\n  -o-transform: scale(-1, 1);\n  -ms-transform: scale(-1, 1);\n  transform: scale(-1, 1);\n}\n"},{"title":"mu.js","text":"var mu = {\n  wholism: {\n    get reductionism() {\n      return { mu };\n    },\n  },\n  reductionism: {\n    get wholism() {\n      return { mu };\n    },\n  },\n};\n\nmu; // wholism, reductionism\n\nmu.wholism; // reductionism\nmu.reductionism; // wholism\n\nmu.wholism.reductionism; // mu\nmu.reductionism.wholism; // mu\n\nmu.wholism.reductionism.mu;\nmu.reductionism.wholism.mu;\n\nmu; // reductionism, wholism\n\n// remix: https://blog.p-petrov.com/assets/images/imgs_geb/mu.png\n// credit: Douglas Hofstadter\n// tags: tribute\n","tags":["tribute","variation"],"aftlinks":["variation.md"]},{"title":"mu.mjs","text":"import _ from './executable-comment.mjs';\n\nvar {\n  mu: {\n    wholism: {\n      reductionism: { mu },\n    },\n    reductionism: {\n      wholism: { mu },\n    },\n  },\n} = _;\n\n// remix: https://blog.p-petrov.com/assets/images/imgs_geb/mu.png\n// credit: Douglas Hofstadter\n// tags: tribute\n","tags":["tribute","variation"],"forelinks":["executable-comment.mjs"],"aftlinks":["variation.md"]},{"title":"no-comment.js","text":"'use strict' // or not, it's the same\n\n\n\n--> But the syntax highlighter was confused.\n\n// https://riptutorial.com/javascript/example/9722/using-html-comments-in-javascript--bad-practice-\n","tags":["variation"],"aftlinks":["variation.md"]},{"title":"no-comment.mjs","text":"import { _Spoken_ as _  } from './executable-comment.mjs';\n\n\n\n_.HTML.comments.are.not.allowed.in.modules;\n","tags":["variation"],"aftlinks":["variation.md"]},{"title":"noises.mjs","text":"export const noises = (\n  audioContext = new (window.AudioContext || window.webkitAudioContext)(),\n) => {\n  const noise = {};\n\n  noise.wave = (wave = 'sine') => {\n    noise.oscillator.type = wave;\n    return noise;\n  };\n  noise.volume = (val = 1, d = 0) => {\n    noise.gainNode.gain.setValueAtTime(val, noise.audioCtx.currentTime + d / 1000);\n    return noise;\n  };\n  noise.frequency = (val = 440, d = 0) => {\n    noise.oscillator.frequency.setValueAtTime(val, noise.audioCtx.currentTime + d / 1000);\n    return noise;\n  };\n  noise.play = ({ frequency = 440, volume = 1, wave = 'sine', delay = 0 } = {}) => {\n    noise.oscillator = noise.audioCtx.createOscillator();\n    noise.oscillator.connect(noise.gainNode);\n    noise.wave(wave);\n    noise.volume(volume, delay / 1000);\n    noise.frequency(frequency);\n    noise.oscillator.start(delay / 1000);\n    return noise;\n  };\n  noise.stop = (d = 0) => {\n    noise.oscillator.stop(noise.audioCtx.currentTime + d / 1000);\n    return noise;\n  };\n\n  noise.oscillator = null;\n  noise.audioCtx = audioContext;\n  noise.gainNode = noise.audioCtx.createGain();\n\n  noise.gainNode.connect(noise.audioCtx.destination);\n  return noise;\n};\n\nexport default noises;\n\n// Original JavaScript code by Chirp Internet: www.chirpinternet.eu\n//  Please acknowledge use of noise code by including this header.\n// adapted from: https://www.the-art-of-web.com/javascript/creating-sounds/\n\n// tags: minibrary\n","tags":["minibrary"]},{"title":"non-sequitur.mjs","text":"import { chronicle } from './chronicle.mjs';\nimport { sequitur } from './sequitur.mjs';\n\nconst non = chronicle(\n  eval(\n    sequitur\n      .toString()\n      .replaceAll('sequitur', 'NON')\n      .replaceAll('non', 'SEQUITUR')\n      .toLowerCase(),\n  ),\n);\n\nnon('hi').hi('bye').bye().sequitur;\n\nconsole.log(non._chronicle);\n","forelinks":["chronicle.mjs","sequitur.mjs"]},{"title":"optimism.js","text":"pancreas = {                }\n\n// .  .   .    .     .      .\n\n{ pancreas['cancer'] = true }\n\n// .  .   .    .     .      .\n\n'cancer' in pancreas === true\n\n{ delete pancreas['cancer'] }\n\n'cancer' in pancreas == false\n\n// .  .   .    .     .      .\n\n'cancer' in pancreas == false\n\n// .  .   .    .     .      .\n// .  .   .    .     .      .\n\n'cancer' in pancreas == false\n\n// .  .   .    .     .      .\n// .  .   .    .     .      .\n// .  .   .    .     .      .\n\n'cancer' in pancreas == false\n\n// .  .   .    .     .      .\n// .  .   .    .     .      .\n// .  .   .    .     .      .\n\n// .  .   .    .     .      .\n\n\n// .  .   .    .     .      . ","alt":"⏳"},{"title":"overconfidence.js","text":"console.assert([0] != ![0]);\n\nconsole.assert('function () {}' != function () {});\n\nconsole.assert(''.split(' ') === '');\n\n// https://www.destroyallsoftware.com/talks/wat, https://wtfjs.com/\n// https://javascriptwtf.com/, https://github.com/denysdovhan/wtfjs\n\n// tags: wtfjs\n","tags":["wtfjs"]},{"title":"pedestrian-slalom.html","text":"\n\n
\n\n\n\n\n","tags":["game"]},{"title":"pick-your-poison.js","text":"const poison = confirm(`Pick Your Poison.\n- Iteration: [ok]\n- Recursion: [cancel]`)\n  ? 'iterate'\n  : 'recurse';\n\nif (poison === 'iterate') {\n  while (true) {\n    console.log(poison);\n  }\n} else if (poison === 'recurse') {\n  (function bottomless_ish() {\n    console.log(poison);\n    try {\n      bottomless_ish();\n    } catch (_) {\n      bottomless_ish();\n    }\n  })();\n} else {\n  (function nextInterval() {\n    const id = setInterval(() => {\n      console.log(id);\n      nextInterval();\n    });\n  })();\n}\n\n// tags: wuzzle\n","tags":["wuzzle"]},{"title":"pipeablert.mjs","text":"export const pipeablert = (thing) => (alert(thing?.toString()), thing);\n\n// tags: useless\n","tags":["useless","1-liner"],"aftlinks":["pipeables.mjs"]},{"title":"pipeables.mjs","text":"import { pipeablert } from './pipeablert.mjs';\nimport { pipeablog } from './pipeablog.mjs';\n\npipeablert('a' + pipeablert('l' + pipeablert('e' + pipeablert('r' + pipeablert('t')))));\n\npipeablog('l' + pipeablog('o' + pipeablog('g')));\n","forelinks":["pipeablert.mjs","pipeablog.mjs"]},{"title":"pipeablog.mjs","text":"export const pipeablog = (thing) => (console.log(thing), thing);\n\n// tags: useful\n","tags":["useful","1-liner"],"aftlinks":["pipeables.mjs"]},{"title":"potato-potato.js","text":"function potato() {\n  return this instanceof potato ? this.__proto__.constructor : potato;\n}\n\nalert(`you say ${new potato().name}, I say ${potato().name}`);\n\n// tags: wuzzle\n","tags":["wuzzle"]},{"title":"projector.mjs","text":"const project = (frame) =>\n  Array.isArray(frame)\n    ? Array.isArray(frame[0])\n      ? frame.forEach(project)\n      : console.log(...frame)\n    : console.log(frame);\n\nconst defaultConfig = {\n  async: true,\n  frameRate: 10,\n  maxTime: Infinity,\n  maxFrames: Infinity,\n  clear: console.clear,\n  project,\n  wrap: () => {},\n};\n\nexport const projector = (reel, userConfig = {}) => {\n  const spool = reel();\n  const config = Object.assign({}, defaultConfig, userConfig);\n  const status = { frames: 0, time: 0 };\n\n  const unspool = (frame = spool.next()) =>\n    frame.done ||\n    (status.time += 1000 / config.frameRate) > config.maxTime ||\n    ++status.frames > config.maxFrames\n      ? (config.wrap(), false)\n      : (config.clear(), config.project(frame.value), true);\n\n  if (config.async) {\n    config.wrap = () => clearInterval(screening);\n    const screening = setInterval(unspool, 1000 / config.frameRate);\n  } else {\n    while (unspool()) {\n      const frameStart = Date.now();\n      while (Date.now() - frameStart < 1000 / config.frameRate);\n    }\n  }\n};\n\nexport default projector;\n\n// tags: minibrary\n","tags":["minibrary"],"aftlinks":["10-print.6.mjs","eat-sleep-rave-repeat.js","rainstorm.mjs"]},{"title":"python-by-any-other-name.js","text":"def fib(n):\n  if n == 1 or n == 0:\n    return n\n  else:\n    return fib(n-2) + fib(n - 1)\n\nprint(fib(10))\n","aftlinks":["fake-it-till-you-make-it.mjs"]},{"title":"rainbowing.html","text":"\n\n
\n\n\n"},{"title":"rainstorm.mjs","text":"import projector from './projector.mjs';\n\n// https://www.asciiart.eu/nature/clouds\nconst cloud = `\n .-~~~-.\n .- ~ ~-( )_ _\n / ~ -.\n | ',\n \\\\ .'\n ~- ._ ,. ,.,.,., ,.. -~`;\n// https://ascii.co.uk/art/lightning\nconst lightning = `${`\n ,/\n ,'/\n ,' /\n ,' /_____,\n .'____ ,'\n / ,'\n / ,'\n /,'\n /'`}${Array(21).fill('\\n').join('')}`;\nconst ground = `___.-------._____/¯¯¯¯¯¯\\`----,____`;\n\nconst drop = () => (Math.random() < 0.2 ? '💧' : ' ');\nconst row = () => [' ', ' ', ...Array(13).fill(' ').map(drop)];\n\nfunction* rainstorm(rain = Array(31).fill('').map(row)) {\n while (rainstorm) {\n rain.pop(), rain.unshift(row());\n const flash = Math.random() < 0.1;\n yield [\n [`%c${cloud}`, `color: ${flash ? 'lightgrey' : 'grey'};`],\n flash\n ? [`%c${lightning}`, 'color: orange;']\n : [`%c${rain.flatMap((r) => r.join(' ')).join('\\n')}`, 'color: blue;'],\n [`%c${ground}`, `color: ${flash ? 'lightgreen' : 'green'};`],\n ];\n }\n}\nprojector(rainstorm, { frameRate: 7, maxFrames: 100 });\n\n// tags: reel, sketch\n","tags":["reel","sketch"],"forelinks":["projector.mjs"]},{"title":"recurseval.1.js","text":"eval(recurseval = 'eval(recurseval)');\n\n// tags: useless\n","tags":["useless","variation","1-liner"],"aftlinks":["variation.md"]},{"title":"recurseval.2.js","text":"(function recurseval() { eval(`(${recurseval.toString()})()`) })();\n\n// tags: quine\n","tags":["quine","variation","1-liner"],"aftlinks":["variation.md"]},{"title":"recurseval.3.js","text":"fetch('./recurseval.3.js')\n .then((res) => res.text())\n .then((code) => (console.log(code), eval(code)))\n .catch(console.error);\n","tags":["variation"],"forelinks":["recurseval.3.js"],"aftlinks":["recurseval.3.js","variation.md"]},{"title":"reflection.css","text":"body {\n -moz-transform: scale(1, -1);\n -webkit-transform: scale(1, -1);\n -o-transform: scale(1, -1);\n -ms-transform: scale(1, -1);\n transform: scale(1, -1);\n}\n","tags":["variation","translation"],"aftlinks":["variation.md"]},{"title":"reflection.js","text":"var w = 0;\n\nwhile (w < 3) {\n w++;\n}\n\nalert(w);\n\n/*~~~~~~~~~~~~*/\n\nalert(m);\n\ndo {\n m++;\n} while (m < 3);\n\nvar m = 0;\n","tags":["variation","translation"],"aftlinks":["variation.md"]},{"title":"reverse-input.js.txt","text":"let input = prompt('enter some text to reverse') || '';\n\nlet reversed = '';\nfor (const char of input) {\n reversed = char + reversed;\n}\n\nalert(reversed);\n","tags":["variation"],"aftlinks":["variation.md"]},{"title":"reverse-input.txt.js","text":"// Get some text from the user.\n\n// Then create a new empty text.\n\n// Now start at the beginning of the user input,\n// One by one, copy each character to the beginning of the new text.\n\n// Finally, show the new text to the user.\n","tags":["variation"],"subtext":"reverse-input.txt.js.st.txt","aftlinks":["variation.md"]},{"title":"sequitur.mjs","text":"export const sequitur = (non = '') => (non ? { [non]: sequitur } : sequitur);\n\n// tags: useless, wuzzle\n","tags":["useless","wuzzle","1-liner"],"aftlinks":["non-sequitur.mjs"]},{"title":"sierpinski.html","text":"\n\n\n\n\n\n\n\n","tags":["sketch"]},{"title":"snail-train.mjs","text":"import i_ from './executable-comment.mjs';\n\ni_('@').i_('@').i_('@').i_('@').i_('@');\n","forelinks":["executable-comment.mjs"]},{"title":"stack.js","text":"const stack = (fn) => (names) =>\n names.length === 0\n ? fn\n : stack\n ({ [names[0]]: (...args) => fn(...args) }[names[0]]) \n (names.slice(1));\n\nstack\n (function busted() { yolo; })\n (['too', 'bad', 'so', 'sad']);\n "},{"title":"steamroll.mjs","text":"export const steamroll = (code = '', refactors = []) => {\n const refactor = { goodCode: code };\n refactors.push(refactor);\n\n const sandbox = document.createElement('iframe');\n\n sandbox.addEventListener('load', () => {\n sandbox.contentWindow.addEventListener('error', ({ lineno, error }) => {\n const lines = code.split('\\n');\n (refactor.badCode = refactor.goodCode), delete refactor.goodCode;\n refactor.error = error;\n refactor.guilty = lines.splice(lineno - 1, 1).pop();\n\n steamroll(lines.join('\\n'), refactors);\n });\n\n const fingersCrossed = document.createElement('script');\n fingersCrossed.innerHTML = code;\n sandbox.contentDocument.body.appendChild(fingersCrossed);\n });\n\n document.body.appendChild(sandbox);\n\n return refactors;\n};\n\nexport default steamroll;\n\n// tags: remix\n// inspiration: https://github.com/mattdiamond/fuckitjs\n","tags":["remix"],"aftlinks":["fake-it-till-you-make-it.mjs"]},{"title":"story-in-a-story.mjs","text":"export const runStory = async (storyTitle = '', transition = '') => {\n if (transition) console.group(`%c${transition}`, 'font-weight: bold;');\n try {\n await import(storyTitle);\n } catch (err) {\n console.error(err);\n }\n if (transition) console.groupEnd();\n};\n\nexport const logStory = async (storyTitle = '', transition = '') => {\n if (transition) console.group(`%c${transition}`, 'font-weight: bold;');\n try {\n console.log(await fetch(storyTitle).then((res) => res.text()));\n } catch (err) {\n console.error(err);\n }\n if (transition) console.groupEnd();\n};\n\nexport const alertStory = async (storyTitle = '', transition = '') => {\n try {\n alert(`${transition}${await fetch(storyTitle).then((res) => res.text())}`);\n } catch (err) {\n alert(err.toString());\n }\n};\n\nexport default runStory;\n\n// tags: minibrary\n","tags":["minibrary"],"aftlinks":["all-medium.md","flag-translator.mjs"]},{"title":"take-five.js","text":"// --- set the mood ---\n\nconst takeFive = new Audio('./take-five.mp3');\ntakeFive.loop = false;\ntakeFive.play();\n\n// --- take a break ---\n\nconst FIVE_MINUTES = 300000; // milliseconds\nconst CLOCK_OUT = Date.now();\n\nconst offBreak = () => Date.now() - CLOCK_OUT > FIVE_MINUTES;\n\nconst getSomeFreshAir = () =>\n offBreak() ? clearInterval(onBreak) : alert('break time, take five!');\n\nconst onBreak = setInterval(getSomeFreshAir, 100);\n\n// tags: wellbeing\n","tags":["wellbeing"]},{"title":"testing.mjs","text":"import { describe, it, suite, test } from './describe-it.mjs';\nimport { expect } from './expect.mjs';\n\nexport { describe, expect, it, suite, test };\nexport default { describe, expect, it };\n\n// tags: testing, minibrary, useful\n","tags":["minibrary","testing","useful"],"forelinks":["describe-it.mjs","expect.mjs"],"aftlinks":["can-not-even.mjs","drabble-twabble.mjs","goalpost-sort.mjs","this-is-amazing.mjs"]},{"title":"the-fun-parts.md","text":"# JavaScript: The ~~Good~~ *Fun* Parts\n\nMost programming languages contain ~~good~~ *fun* parts and bad parts. I discovered that I\ncould be a better programmer by using only the ~~good~~ *fun* parts and avoiding the bad\nparts. After all, how can you build something ~~good~~ *fun* out of bad parts? \\[...] But\nyou have the power to define your own subset. You can write better programs by relying\nexclusively on the ~~good~~ *fun* parts.\n\n* adapted by **Dougie Crockpot** from\n [the original](https://www.oreilly.com/library/view/javascript-the-good/9780596517748/)\n","tags":["metappet","the fun parts"],"alt":"JavaScripting: teach me how to, Dougie.","metalinks":["cat-detector.vars.js","do-without.js","eat-sleep-rave-repeat.js","goto-ish.js","heartbreak.js","with-transparency.js"]},{"title":"the-neverending-s.js","text":"while (('never-ending ' += 's')); \n\n// tags: wuzzle\n","tags":["wuzzle","1-liner"],"alt":"tory"},{"title":"the-programmers-journey.js","text":"// In the realm of code, a story unfolds\n// A tale of mystery, where secrets are told\n\n// Once upon a time, in a land of arrays\n// Lived a programmer, lost in a coding maze\n\n// With variables and functions, the story began\n// Each line of code, a step in the plan\n\nconst journey = () => {\n // In the depths of the code, a riddle awaits\n const riddle = \"What has keys but can't open gates?\";\n\n // A quest for answers, the programmer embarks\n const answer = 'A keyboard, where creativity sparks';\n\n // But the path is not easy, challenges arise\n const obstacles = ['Syntax errors', 'Bugs in disguise'];\n\n // With each obstacle faced, the programmer learns\n // Debugging skills, the fire that burns\n\n for (let i = 0; i < obstacles.length; i++) {\n // The programmer fights, with determination and might\n // Seeking the truth, in the code's darkest night\n\n console.log(`Obstacle ${i + 1}: ${obstacles[i]}`);\n // The console reveals, the errors to see\n // Line by line, the programmer sets free\n\n // But the journey continues, the story unwinds\n // Seeking perfection, in the code that binds\n if (i === obstacles.length - 1) {\n // Victory is near, the final test awaits\n console.log(\"Congratulations! You've reached the gates\");\n }\n }\n};\n\n// The journey begins, the code comes alive\njourney();\n\n/*\n This poem tells the story of a programmer on a quest \n to solve a riddle hidden within the code.\n Along the way, they encounter obstacles in the form of \n syntax errors and bugs.\n With determination and debugging skills, \n they overcome these challenges and reach the final test.\n The poem captures the essence of the coding journey, \n where perseverance and problem-solving lead to victory.\n\n\tI hope you enjoyed this puzzling and sophisticated JavaScript poem!\n Let me know if you have any questions \n or if there's anything else I can assist you with.\n*/\n\n// https://www.phind.com/agent?cache=cln0bq31a0027jz08b4dc5qrh\n// an LLM wrote this, I bring it to you unedited. LLMs can't count lines\n\n// tags: coAIthored\n","tags":["coaithored"]},{"title":"thing.svg","text":"\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n \n"},{"title":"this-is-amazing.mjs","text":"import { describe, it, expect } from './testing.mjs';\n\nconst thisIs = function amazing() { return this }.bind('amazing');\n\ndescribe(\"this: it's amazing\", () => {\n it('is \"amazing\"', () => expect(thisIs()).toEqual('amazing'));\n});\n","forelinks":["testing.mjs"]},{"title":"time-capsule.js","text":"(function timeCapsule(wisdom = prompt('Share some wisdom with the future:')) {\n if (wisdom) setTimeout(alert, 2147483647, wisdom);\n else timeCapsule();\n})();\n"},{"title":"tintin.0.js","text":"const tin = () => 'tin';\n\nconsole.log(tin.name);\nconsole.log(tin());\n\n// tags: puzzle\n","tags":["puzzle","variation"],"aftlinks":["variation.md"]},{"title":"tintin.0.mjs","text":"import { chronicle } from './chronicle.mjs';\n\nconst tin = chronicle(() => 'tin');\n\ntin();\nconsole.log(tin._chronicle);\n\n// tags: puzzle\n","tags":["puzzle","variation"],"forelinks":["chronicle.mjs"],"aftlinks":["variation.md"]},{"title":"tintin.1.js","text":"const tin = () => tin;\n\nconsole.log(tin().name);\nconsole.log(tin()()()()());\n\n// tags: puzzle\n","tags":["puzzle","variation"],"aftlinks":["variation.md"]},{"title":"tintin.1.mjs","text":"import { chronicle } from './chronicle.mjs';\n\nconst tin = chronicle(() => tin);\n\ntin()()()()();\nconsole.log(tin._chronicle);\n\n// tags: puzzle\n","tags":["puzzle","variation"],"forelinks":["chronicle.mjs"],"aftlinks":["variation.md"]},{"title":"tintin.2.js","text":"const tin = () => ({ tin });\n\nconsole.log(tin().tin.name);\nconsole.log(tin().tin().tin().tin);\n\n// tags: puzzle\n","tags":["puzzle","variation"],"aftlinks":["variation.md"]},{"title":"tintin.2.mjs","text":"import { chronicle } from './chronicle.mjs';\n\nconst tin = chronicle(() => ({ tin }));\n\ntin().tin;\nconsole.log(tin._chronicle);\n\ntin._forget;\n\ntin().tin().tin().tin;\nconsole.log(tin._chronicle);\n\n// tags: puzzle\n","tags":["puzzle","variation"],"forelinks":["chronicle.mjs"],"aftlinks":["variation.md"]},{"title":"tintin.3.js","text":"const tin = () => tin;\ntin.tin = tin;\n\nconsole.log(tin[tin().name]()[tin.name].name);\nconsole.log(tin.tin()().tin().tin.tin()()().tin().tin.tin());\n\n// tags: puzzle\n","tags":["puzzle","variation"],"aftlinks":["variation.md"]},{"title":"tintin.3.mjs","text":"import { chronicle } from './chronicle.mjs';\n\nconst tin = chronicle(() => tin);\ntin.tin = tin;\n\ntin.tin()['tin'];\nconsole.log(tin._chronicle);\n\ntin._forget;\n\ntin.tin()().tin().tin.tin()()().tin().tin.tin();\nconsole.log(tin._chronicle);\n\n// tags: puzzle\n","tags":["puzzle","variation"],"forelinks":["chronicle.mjs"],"aftlinks":["variation.md"]},{"title":"tintin.4.js","text":"const tin = () => ({ tin });\ntin.tin = tin;\n\nconsole.log(tin[tin.name]().tin.tin.tin()['tin'].name);\nconsole.log(tin.tin()['tin']().tin().tin);\n\n// tags: puzzle\n","tags":["puzzle","variation"],"aftlinks":["variation.md"]},{"title":"tintin.4.mjs","text":"import { chronicle } from './chronicle.mjs';\n\nconst tin = chronicle(() => ({ tin }));\ntin.tin = tin;\n\ntin['tin']().tin.tin.tin().tin;\nconsole.log(tin._chronicle);\n\ntin._forget;\n\ntin.tin()['tin']().tin().tin;\nconsole.log(tin._chronicle);\n\n// tags: puzzle\n","tags":["puzzle","variation"],"forelinks":["chronicle.mjs"],"aftlinks":["variation.md"]},{"title":"togglog.mjs","text":"export const togglog = ({ write = true, out = console.log, label = null } = {}) => {\n const log = (...things) => {\n if (label !== null) things.unshift(label);\n if (write) out(...things);\n return things.at(-1);\n };\n\n Object.defineProperties(log, {\n log: { get: () => log },\n\n on: { get: () => ((write = true), log) },\n off: { get: () => ((write = false), log) },\n toggle: { get: () => ((write = !write), log) },\n\n is: { get: () => (write ? 'on' : 'off') },\n\n out: { set: (newOut) => (out = newOut) },\n label: { set: (newLabel) => (label = newLabel) },\n });\n\n return log;\n};\n\nexport default togglog;\n\n// tags: minibrary\n\n\n","tags":["minibrary","variation","translation"],"aftlinks":["variation.md"]},{"title":"togglog.py","text":"import traceback\n\n\nclass Togglog:\n def __init__(self, out=print, write=True, label=None, line=False):\n self.out = out\n self.write = write\n self.label = label\n self.line = line\n\n def __getattr__(self, key):\n if key == \"on\":\n self.write = True\n elif key == \"off\":\n self.write = False\n elif key == \"toggle\":\n self.write = not self.write\n return self\n\n def log(self, *rest):\n if self.write:\n logs = [*rest]\n if self.label != None:\n logs.insert(0, self.label)\n if self.line != False:\n logs.insert(0, f\"ln {str(list(traceback.walk_stack(None))[0][1])}:\")\n self.out(*logs)\n return rest[-1]\n\n\n# tags: minibrary\n","tags":["minibrary","variation","translation"],"aftlinks":["variation.md"]},{"title":"training-wheels.mjs","text":"import { demethod } from './demethod.mjs';\n\n// --- setup, could happen in a different file ---\n\ndemethod(String, { target: globalThis, prefix: '$str' });\ndemethod(Array, { target: globalThis, prefix: '$arr' });\ndemethod(console, { target: globalThis, statics: true });\n\n// --- use the functioned methods ---\n\nconst things = [];\nwhile (true) {\n const thing = prompt('enter things, cancel to finish');\n log(thing);\n if (thing === null) break;\n $arrPush(things, thing);\n}\nlog(things);\n\nconst smallThings = $arrMap(things, $strToLowerCase);\nconst renderedThings = $arrJoin(smallThings, '\\n- ');\nconst packagedThings = `here are your smaller things:\\n- ${renderedThings}`;\n\nalert(packagedThings);\n","forelinks":["demethod.mjs"]},{"title":"translation.md","text":"# Translation\n\nSame program, different language. In spirit if not in Idiom.\n\n\n"},{"title":"turtles-all-the-way-down.1.js","text":"(turtle = () => turtle())();\n\n// tags: wuzzle\n","tags":["wuzzle","variation","1-liner","translation"],"aftlinks":["variation.md"]},{"title":"turtles-all-the-way-down.2.js","text":"(turtle => turtle(turtle))(turtle => turtle(turtle))\n\n// tags: wuzzle\n","tags":["wuzzle","variation","1-liner","translation"],"aftlinks":["variation.md"]},{"title":"turtles-all-the-way-down.3.js","text":"({ ['🐢']: function () { this['🐢']() } })['🐢']();\n\n// tags: wuzzle\n","tags":["wuzzle","variation","1-liner"],"aftlinks":["variation.md"]},{"title":"turtles-all-the-way-down.4.js","text":"(turtle = turtle => { try { turtle(turtle) } catch(eltrut) { turtle(turtle) } })(turtle);\n\n// tags: wuzzle","tags":["wuzzle","variation","1-liner"],"aftlinks":["variation.md"]},{"title":"turtles-all-the-way-down.html","text":"turtles all the way down\n\n
\n  _____     ____\n /      \\  |  o |\n|        |/ ___\\|\n|_________/\n|_|_| |_|_|\n
\n\n\n\n\n\n","tags":["wuzzle","variation"],"aftlinks":["variation.md"]},{"title":"turtles_all_the_way_down.1.py","text":"turtle = lambda: turtle(); turtle()\n\n# tags: wuzzle","tags":["wuzzle","variation","1-liner","translation"],"aftlinks":["variation.md"]},{"title":"turtles_all_the_way_down.2.py","text":"(lambda turtle: turtle(turtle))(lambda turtle: turtle(turtle))\n\n# tags: wuzzle","tags":["wuzzle","variation","1-liner","translation"],"aftlinks":["variation.md"]},{"title":"turtlje.mjs","text":"export const turtlje = (c = document.createElement('canvas')) => {\n c = typeof c === 'string' ? document.getElementById(c) : c;\n const pad = c.getContext('2d');\n const state = { col: 'black', width: 1, deg: 0, x: c.width / 2, y: c.height / 2 };\n const turtle = {\n backward: (pixels) => forward(-pixels),\n color: (col) => ((state.col = col), turtle),\n dot: (diameter) => {\n pad.beginPath();\n pad.arc(state.x, state.y, diameter / 2, 0, 2 * Math.PI);\n pad.fillStyle = state.col;\n pad.lineWidth = state.width;\n pad.fill();\n return turtle; },\n forward: (pixels) => {\n pad.beginPath();\n pad.moveTo(state.x, state.y);\n state.x += -Math.cos((state.deg / 180) * Math.PI) * pixels;\n state.y += -Math.sin((state.deg / 180) * Math.PI) * pixels;\n pad.lineTo(state.x, state.y);\n pad.strokeStyle = state.col;\n pad.lineWidth = state.width;\n pad.stroke();\n return turtle; },\n goto: (x, y) => {\n state.x = x + c.width / 2;\n state.y = y + c.height / 2;\n return turtle; },\n left: (deg) => turtle.right(-deg),\n right: (deg) => {\n state.deg = (deg + state.deg) % 360;\n return turtle; },\n width: (pixels) => {\n state.width = pixels;\n return turtle; },\n };\n return { _pad: pad, _state: state, ...turtle };\n};\n\nexport default turtlje;\n\n// tags: minibrary\n","tags":["minibrary"]},{"title":"useless-machine.1.html","text":" this.checked = false, 500)\" />\n","tags":["variation","1-liner"],"aftlinks":["variation.md"]},{"title":"useless-machine.2.html","text":"\n\n\n\n\n\n\n","tags":["coaithored","frivolous","variation"],"aftlinks":["variation.md"]},{"title":"var-let-const.js","text":"// 'use strict';\n\nconsole.assert(__ === let);\n\n{\n var let = 'const';\n}\n\nconsole.assert(__ === let);\n\n// tags: puzzle\n","tags":["puzzle"]},{"title":"variation.md","text":"# Theme and Variation\n","tags":["metappet","1-liner","variation"],"alt":"It's expression, not obsession. I promise.","metalinks":["10-print.1.js","10-print.2.js","10-print.3.js","10-print.4.js","10-print.6.mjs","be.canvas.html","be.css","be.css.html","be.de.txt","be.en.txt","be.flip.js","be.fr.txt","be.html","be.js","be.json","be.md","be.nl.txt","be.py","be.svg","be.txt","be.yaml","breathless.html","breathless.js","cat-detector.ascii.html","cat-detector.ascii.txt","cat-detector.be.js","cat-detector.cat.js","cat-detector.eval.js","cat-detector.evbl.js","cat-detector.golf.js","cat-detector.js.md","cat-detector.js.md.st.js","cat-detector.polyfill.mjs","cat-detector.psu","cat-detector.scm.js","cat-detector.scm.json","cat-detector.spoken.mjs","cat-detector.svg","cat-detector.vars.js","cat-detector.wc.html","cat-i-farted.js","cat-i-farted.mjs","cat_detector.py","cat_detector.py.js","empty.json","empty.yaml","halloween.js","halloween.py","hello-world.js","hello_world.py","je-l-ignore.js","je-l-ignore.mjs","love-adventure-success.1.js","love-adventure-success.2.js","mu.js","mu.mjs","no-comment.js","no-comment.mjs","recurseval.1.js","recurseval.2.js","recurseval.3.js","reflection.css","reflection.js","reverse-input.js.txt","reverse-input.txt.js","reverse-input.txt.js.st.txt","tintin.0.js","tintin.0.mjs","tintin.1.js","tintin.1.mjs","tintin.2.js","tintin.2.mjs","tintin.3.js","tintin.3.mjs","tintin.4.js","tintin.4.mjs","togglog.mjs","togglog.py","turtles-all-the-way-down.1.js","turtles-all-the-way-down.2.js","turtles-all-the-way-down.3.js","turtles-all-the-way-down.4.js","turtles-all-the-way-down.html","turtles_all_the_way_down.1.py","turtles_all_the_way_down.2.py","useless-machine.1.html","useless-machine.2.html","yoloest.js","yoloest.py"]},{"title":"wait-for-it.js","text":"(function waitForIt(wait = 0) {\n console.log('wait for it ...');\n wait = setTimeout(() => waitForIt(wait), wait);\n})();\n"},{"title":"wat.html","text":"\n\n

Wat?!

\n\n\n\n\n","forelinks":["wat.html"],"aftlinks":["wat.html"]},{"title":"what-does-the-fox-say.mjs","text":"// This looks like a fox, right?\n// Taken from here - https://ascii.co.uk/art/fox\nconst fox = [\n '%c',\n '%c _,-=._ /|_/|',\n '%c`-.} `=._,.-=-._., @ @._,',\n \"%c `._ _,-. ) _,.-'\",\n '%c G.m-\"^m`m\\'',\n '%c',\n];\n\nexport const theFoxSays = (...args) => {\n // Gets args as a string\n const joinedArgs = args.join(' ');\n\n // Add the bubble if there is something to log!\n if (joinedArgs.length > 0) {\n fox[1] += ` ---${'-'.repeat(joinedArgs.length)}-`;\n fox[2] += ` -( ${joinedArgs} )`;\n fox[3] += ` ---${'-'.repeat(joinedArgs.length)}-`;\n }\n\n // Log the fox!\n for (const line of fox) {\n console.log(line, 'color: firebrick');\n }\n};\n\nexport default theFoxSays;\n\n// tags: sketch, remix\n// inspiration: https://tholman.com/console-dot-frog/\n","tags":["remix","sketch"],"aftlinks":["funsole.mjs"]},{"title":"with-transparency.js","text":"const transparency = {\n remember_that: 'let',\n stores: '=',\n as_long_as: 'while',\n is_less_than: '<',\n add_one_to: '++',\n show_me: 'alert',\n};\n\nwith (transparency) {\n eval(`\n\n${remember_that} i ${stores} 0;\n\n${as_long_as}( i ${is_less_than} 5 )${add_one_to} i;\n\n${show_me}( i );\n\n`);\n}\n\n\n// tags: the fun parts\n","tags":["the fun parts"],"aftlinks":["the-fun-parts.md"]},{"title":"yolo.js","text":"const shipit = (motto = '') => {\n try {\n alert(eval(prompt(`${motto}!`)));\n } catch (err) {\n alert(`${err.name}: ${err.message}\\n\\n${motto}!`);\n shipit(motto);\n }\n};\n\nshipit('YOLO');\n\n// tags: yolo\n","tags":["yolo"]},{"title":"yoloer.js","text":"/*\n // 'use strict';\n*/\n\nconst YOLO = 'YOLO';\n\nconst walkTheTalk = (motto = YOLO) =>\n prompt(`${motto}!`) || (alert(`${motto} harder!`), walkTheTalk(motto));\n\nconst shipit = (code = `\"${YOLO}!`) => {\n try {\n alert(eval(code));\n } catch (err) {\n alert(`${err.name}: ${err.message}\\n\\n${YOLO}!`);\n } finally {\n shipit(walkTheTalk(YOLO));\n }\n};\n\nshipit(walkTheTalk(YOLO));\n\n// tags: yolo\n","tags":["yolo"]},{"title":"yoloest.js","text":"alert(eval(prompt('YOLO')));\n\n// tags: yolo\n","tags":["yolo","variation","1-liner","translation"],"aftlinks":["variation.md"]},{"title":"yoloest.py","text":"print(eval(input('YOLO')))\n\n# tags: yolo","tags":["yolo","variation","1-liner","translation"],"aftlinks":["variation.md"]},{"title":".js","text":"","figment":true},{"title":".mjs","text":"","figment":true},{"title":".md","text":"","figment":true},{"title":".html","text":"","figment":true},{"title":".css","text":"","figment":true},{"title":".txt","text":"","figment":true},{"title":".json","text":"","figment":true},{"title":".py","text":"","figment":true},{"title":".svg","text":"","figment":true},{"title":".yaml","text":"","figment":true},{"title":".psu","text":"","figment":true},{"title":"cat-detector.js.md.st.js","text":"let input = prompt('cat, please');\n\nconst isCat = input === 'cat';\n\nif (isCat) alert('thank you for the cat');\n\nelse {\n\twhile (input !== 'cat') input = prompt('still not a cat. \\n\\ncat, please');\n\n\talert('finally, a cat.');\n}\n","tags":["variation","subtext"],"figment":"cat-detector.js.md","aftlinks":["cat-detector.js.md","variation.md"]},{"title":"reverse-input.txt.js.st.txt","text":"\n Get some text from the user.\n\n Then create a new empty text.\n\n Now start at the beginning of the user input,\n One by one, copy each character to the beginning of the new text.\n\n Finally, show the new text to the user.","figment":"reverse-input.txt.js","aftlinks":["reverse-input.txt.js","variation.md"],"tags":["variation","subtext"]}] \ No newline at end of file diff --git a/public/data/tags.json b/public/data/tags.json index 508e3de..2150942 100644 --- a/public/data/tags.json +++ b/public/data/tags.json @@ -1 +1 @@ -["1-liner","coaithored","esi","frivolous","game","golf","joke","le chat","metappet","minibrary","polyfill","puzzle","quine","reel","remix","sketch","subtext","testing","the fun parts","translation","tribute","useful","useless","variation","variations","wellbeing","wtfjs","wuzzle","yolo"] \ No newline at end of file +["1-liner","coaithored","esi","frivolous","game","golf","joke","le chat","metappet","minibrary","polyfill","puzzle","quine","reel","remix","sketch","subtext","testing","the fun parts","translation","tribute","useful","useless","variation","wellbeing","wtfjs","wuzzle","yolo"] \ No newline at end of file diff --git a/public/src/state.js b/public/src/state.js index fcac559..aac687d 100644 --- a/public/src/state.js +++ b/public/src/state.js @@ -4,14 +4,12 @@ import { shuffleArray } from './utils/shuffle-array.js'; import { filterSnipPets } from './filter-snip-pets/index.js'; -// ===== fetch data ===== - -const [comments, snips, snippets, tags] = await Promise.all([ - fetch('../public/data/comments.json').then((res) => res.json()), - fetch('../public/data/snips.json').then((res) => res.json()), - fetch('../public/data/snippets.json').then((res) => res.json()), - fetch('../public/data/tags.json').then((res) => res.json()), -]); +// ===== import data ===== + +import comments from '../data/comments.json' assert { type: 'json' }; +import snips from '../data/snips.json' assert { type: 'json' }; +import snippets from '../data/snippets.json' assert { type: 'json' }; +import tags from '../data/tags.json' assert { type: 'json' }; // ===== initialize state ===== diff --git a/snippets/ESi.md b/snippets/ESi.md index 0937a62..40f9c0b 100644 --- a/snippets/ESi.md +++ b/snippets/ESi.md @@ -1,10 +1,10 @@ --- alt: Don't make it complex, KISS. +tags: + - metappet --- # ℂ.js = ES(n + i) Why [wait 6 years](https://github.com/tc39/proposal-pipeline-operator/issues/91) for a real language feature? Have an imaginary one today. - - diff --git a/snippets/README.md b/snippets/README.md index 959f083..cb3f25e 100644 --- a/snippets/README.md +++ b/snippets/README.md @@ -1,5 +1,7 @@ --- alt: More interesting than useful. +tags: + - metappet --- # Snippets diff --git a/snippets/all-medium.md b/snippets/all-medium.md index c1dd300..04acf62 100644 --- a/snippets/all-medium.md +++ b/snippets/all-medium.md @@ -1,5 +1,7 @@ --- alt: no message +tags: + - metappet --- They _intended_ to write. They really did. @@ -13,5 +15,3 @@ Before there was a **what** there were [empty](./empty.json) [vehicles](./empty. - [unused](./log.mjs) - [unfinished](./funsole.mjs) - [ill-defined](./cat-detector.psu) - - diff --git a/snippets/be.md b/snippets/be.md index a9177be..28f5de9 100644 --- a/snippets/be.md +++ b/snippets/be.md @@ -1,7 +1,7 @@ --- alt: "* België, Belgique, Belgien" +tags: + - metappet --- # Belgium\*! - - diff --git a/snippets/the-fun-parts.md b/snippets/the-fun-parts.md index 8fd5a8a..d0991f5 100644 --- a/snippets/the-fun-parts.md +++ b/snippets/the-fun-parts.md @@ -1,5 +1,7 @@ --- alt: "JavaScripting: teach me how to, Dougie." +tags: + - metappet --- # JavaScript: The ~~Good~~ _Fun_ Parts @@ -12,5 +14,3 @@ exclusively on the ~~good~~ _fun_ parts. - adapted by **Dougie Crockpot** from [the original](https://www.oreilly.com/library/view/javascript-the-good/9780596517748/) - - \ No newline at end of file diff --git a/snippets/variation.md b/snippets/variation.md index f681ed2..e86da0f 100644 --- a/snippets/variation.md +++ b/snippets/variation.md @@ -1,7 +1,7 @@ --- alt: It's expression, not obsession. I promise. +tags: + - metappet --- # Theme and Variation - -