text: var Jn=Object.create,hi=Object.defineProperty,Zn=Object.getPrototypeOf,ea=Object.prototype.hasOwnProperty,ta=Object.getOwnPropertyNames,ia=Object.getOwnPropertyDescriptor;var ra=i=>hi(i,"__esModule",{value:!0});var sa=(i,s)=>()=>(s||i((s={exports:{}}).exports,s),s.exports);var na=(i,s,a)=>{if(s&&typeof s=="object"||typeof s=="function")for(let u of ta(s))!ea.call(i,u)&&u!=="default"&&hi(i,u,{get:()=>s[u],enumerable:!(a=ia(s,u))||a.enumerable});return i},aa=i=>na(ra(hi(i!=null?Jn(Zn(i)):{},"default",i&&i.__esModule&&"default"in i?{get:()=>i.default,enumerable:!0}:{value:i,enumerable:!0})),i);var Ls=sa((Ft,Ps)=>{(function(i,s){typeof Ft=="object"&&typeof Ps!="undefined"?s(Ft):typeof define=="function"&&define.amd?define(["exports"],s):(i=i||self,s(i.unofficial_observablehq_compiler={}))})(Ft,function(i){"use strict";var s={3:"abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",5:"class enum extends super const export import",6:"enum",strict:"implements interface let package private protected public static yield",strictBind:"eval arguments"},a="break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this",u={5:a,"5module":a+" export import",6:a+" const class extends export import super"},h=/^in(stanceof)?$/,d="\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08C7\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\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-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\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\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\u9FFC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7BF\uA7C2-\uA7CA\uA7F5-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\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\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC",p="\u200C\u200D\xB7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\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\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECD\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF\u1AC0\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA620-\uA629\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA8FF-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F",x=new RegExp("["+d+"]"),E=new RegExp("["+d+p+"]");d=p=null;var w=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,157,310,10,21,11,7,153,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,349,41,7,1,79,28,11,0,9,21,107,20,28,22,13,52,76,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,85,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,159,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,230,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,35,56,264,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,328,18,190,0,80,921,103,110,18,195,2749,1070,4050,582,8634,568,8,30,114,29,19,47,17,3,32,20,6,18,689,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,1237,43,8,8952,286,50,2,18,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,2357,44,11,6,17,0,370,43,1301,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42717,35,4148,12,221,3,5761,15,7472,3104,541,1507,4938],O=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,370,1,154,10,176,2,54,14,32,9,16,3,46,10,54,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,161,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,406,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,330,3,19306,9,135,4,60,6,26,9,1014,0,2,54,8,3,82,0,12,1,19628,1,5319,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,262,6,10,9,419,13,1495,6,110,6,6,9,4759,9,787719,239];function N(e,t){for(var r=65536,n=0;n<t.length;n+=2){if(r+=t[n],r>e)return!1;if(r+=t[n+1],r>=e)return!0}}function D(e,t){return e<65?e===36:e<91?!0:e<97?e===95:e<123?!0:e<=65535?e>=170&&x.test(String.fromCharCode(e)):t===!1?!1:N(e,w)}function P(e,t){return e<48?e===36:e<58?!0:e<65?!1:e<91?!0:e<97?e===95:e<123?!0:e<=65535?e>=170&&E.test(String.fromCharCode(e)):t===!1?!1:N(e,w)||N(e,O)}var A=function(t,r){r===void 0&&(r={}),this.label=t,this.keyword=r.keyword,this.beforeExpr=!!r.beforeExpr,this.startsExpr=!!r.startsExpr,this.isLoop=!!r.isLoop,this.isAssign=!!r.isAssign,this.prefix=!!r.prefix,this.postfix=!!r.postfix,this.binop=r.binop||null,this.updateContext=null};function M(e,t){return new A(e,{beforeExpr:!0,binop:t})}var v={beforeExpr:!0},C={startsExpr:!0},_={};function I(e,t){return t===void 0&&(t={}),t.keyword=e,_[e]=new A(e,t)}var l={num:new A("num",C),regexp:new A("regexp",C),string:new A("string",C),name:new A("name",C),eof:new A("eof"),bracketL:new A("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new A("]"),braceL:new A("{",{beforeExpr:!0,startsExpr:!0}),braceR:new A("}"),parenL:new A("(",{beforeExpr:!0,startsExpr:!0}),parenR:new A(")"),comma:new A(",",v),semi:new A(";",v),colon:new A(":",v),dot:new A("."),question:new A("?",v),questionDot:new A("?."),arrow:new A("=>",v),template:new A("template"),invalidTemplate:new A("invalidTemplate"),ellipsis:new A("...",v),backQuote:new A("`",C),dollarBraceL:new A("${",{beforeExpr:!0,startsExpr:!0}),eq:new A("=",{beforeExpr:!0,isAssign:!0}),assign:new A("_=",{beforeExpr:!0,isAssign:!0}),incDec:new A("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new A("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:M("||",1),logicalAND:M("&&",2),bitwiseOR:M("|",3),bitwiseXOR:M("^",4),bitwiseAND:M("&",5),equality:M("==/!=/===/!==",6),relational:M("</>/<=/>=",7),bitShift:M("<</>>/>>>",8),plusMin:new A("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:M("%",10),star:M("*",10),slash:M("/",10),starstar:new A("**",{beforeExpr:!0}),coalesce:M("??",1),_break:I("break"),_case:I("case",v),_catch:I("catch"),_continue:I("continue"),_debugger:I("debugger"),_default:I("default",v),_do:I("do",{isLoop:!0,beforeExpr:!0}),_else:I("else",v),_finally:I("finally"),_for:I("for",{isLoop:!0}),_function:I("function",C),_if:I("if"),_return:I("return",v),_switch:I("switch"),_throw:I("throw",v),_try:I("try"),_var:I("var"),_const:I("const"),_while:I("while",{isLoop:!0}),_with:I("with"),_new:I("new",{beforeExpr:!0,startsExpr:!0}),_this:I("this",C),_super:I("super",C),_class:I("class",C),_extends:I("extends",v),_export:I("export"),_import:I("import",C),_null:I("null",C),_true:I("true",C),_false:I("false",C),_in:I("in",{beforeExpr:!0,binop:7}),_instanceof:I("instanceof",{beforeExpr:!0,binop:7}),_typeof:I("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:I("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:I("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},$=/\r\n?|\n|\u2028|\u2029/,pe=new RegExp($.source,"g");function W(e,t){return e===10||e===13||!t&&(e===8232||e===8233)}var ie=/[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/,q=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,vt=Object.prototype,He=vt.hasOwnProperty,zt=vt.toString;function gt(e,t){return He.call(e,t)}var Wi=Array.isArray||function(e){return zt.call(e)==="[object Array]"};function Ie(e){return new RegExp("^(?:"+e.replace(/ /g,"|")+")$")}var ze=function(t,r){this.line=t,this.column=r};ze.prototype.offset=function(t){return new ze(this.line,this.column+t)};var yt=function(t,r,n){this.start=r,this.end=n,t.sourceFile!==null&&(this.source=t.sourceFile)};function _t(e,t){for(var r=1,n=0;;){pe.lastIndex=n;var o=pe.exec(e);if(o&&o.index<t)++r,n=o.index+o[0].length;else return new ze(r,t-n)}}var Yt={ecmaVersion:10,sourceType:"script",onInsertedSemicolon:null,onTrailingComma:null,allowReserved:null,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowAwaitOutsideFunction:!1,allowHashBang:!1,locations:!1,onToken:null,onComment:null,ranges:!1,program:null,sourceFile:null,directSourceFile:null,preserveParens:!1};function ln(e){var t={};for(var r in Yt)t[r]=e&&gt(e,r)?e[r]:Yt[r];if(t.ecmaVersion>=2015&&(t.ecmaVersion-=2009),t.allowReserved==null&&(t.allowReserved=t.ecmaVersion<5),Wi(t.onToken)){var n=t.onToken;t.onToken=function(o){return n.push(o)}}return Wi(t.onComment)&&(t.onComment=cn(t,t.onComment)),t}function cn(e,t){return function(r,n,o,c,f,m){var b={type:r?"Block":"Line",value:n,start:o,end:c};e.locations&&(b.loc=new yt(this,f,m)),e.ranges&&(b.range=[o,c]),t.push(b)}}var Ye=1,Qe=2,Qt=Ye|Qe,Gi=4,Hi=8,zi=16,Yi=32,Qi=64,Ki=128;function Kt(e,t){return Qe|(e?Gi:0)|(t?Hi:0)}var Xi=0,Xt=1,de=2,Ji=3,Zi=4,er=5,H=function(t,r,n){this.options=t=ln(t),this.sourceFile=t.sourceFile,this.keywords=Ie(u[t.ecmaVersion>=6?6:t.sourceType==="module"?"5module":5]);var o="";if(t.allowReserved!==!0){for(var c=t.ecmaVersion;!(o=s[c]);c--);t.sourceType==="module"&&(o+=" await")}this.reservedWords=Ie(o);var f=(o?o+" ":"")+s.strict;this.reservedWordsStrict=Ie(f),this.reservedWordsStrictBind=Ie(f+" "+s.strictBind),this.input=String(r),this.containsEsc=!1,n?(this.pos=n,this.lineStart=this.input.lastIndexOf(`
  `,n-1)+1,this.curLine=this.input.slice(0,this.lineStart).split($).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=l.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=this.initialContext(),this.exprAllowed=!0,this.inModule=t.sourceType==="module",this.strict=this.inModule||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.yieldPos=this.awaitPos=this.awaitIdentPos=0,this.labels=[],this.undefinedExports={},this.pos===0&&t.allowHashBang&&this.input.slice(0,2)==="#!"&&this.skipLineComment(2),this.scopeStack=[],this.enterScope(Ye),this.regexpState=null},Ne={inFunction:{configurable:!0},inGenerator:{configurable:!0},inAsync:{configurable:!0},allowSuper:{configurable:!0},allowDirectSuper:{configurable:!0},treatFunctionsAsVar:{configurable:!0}};H.prototype.parse=function(){var t=this.options.program||this.startNode();return this.nextToken(),this.parseTopLevel(t)},Ne.inFunction.get=function(){return(this.currentVarScope().flags&Qe)>0},Ne.inGenerator.get=function(){return(this.currentVarScope().flags&Hi)>0},Ne.inAsync.get=function(){return(this.currentVarScope().flags&Gi)>0},Ne.allowSuper.get=function(){return(this.currentThisScope().flags&Qi)>0},Ne.allowDirectSuper.get=function(){return(this.currentThisScope().flags&Ki)>0},Ne.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())},H.prototype.inNonArrowFunction=function(){return(this.currentThisScope().flags&Qe)>0},H.extend=function(){for(var t=[],r=arguments.length;r--;)t[r]=arguments[r];for(var n=this,o=0;o<t.length;o++)n=t[o](n);return n},H.parse=function(t,r){return new this(r,t).parse()},H.parseExpressionAt=function(t,r,n){var o=new this(n,t,r);return o.nextToken(),o.parseExpression()},H.tokenizer=function(t,r){return new this(r,t)},Object.defineProperties(H.prototype,Ne);var re=H.prototype,hn=/^(?:'((?:\\.|[^'\\])*?)'|"((?:\\.|[^"\\])*?)")/;re.strictDirective=function(e){for(;;){q.lastIndex=e,e+=q.exec(this.input)[0].length;var t=hn.exec(this.input.slice(e));if(!t)return!1;if((t[1]||t[2])==="use strict"){q.lastIndex=e+t[0].length;var r=q.exec(this.input),n=r.index+r[0].length,o=this.input.charAt(n);return o===";"||o==="}"||$.test(r[0])&&!(/[(`.[+\-/*%<>=,?^&]/.test(o)||o==="!"&&this.input.charAt(n+1)==="=")}e+=t[0].length,q.lastIndex=e,e+=q.exec(this.input)[0].length,this.input[e]===";"&&e++}},re.eat=function(e){return this.type===e?(this.next(),!0):!1},re.isContextual=function(e){return this.type===l.name&&this.value===e&&!this.containsEsc},re.eatContextual=function(e){return this.isContextual(e)?(this.next(),!0):!1},re.expectContextual=function(e){this.eatContextual(e)||this.unexpected()},re.canInsertSemicolon=function(){return this.type===l.eof||this.type===l.braceR||$.test(this.input.slice(this.lastTokEnd,this.start))},re.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0},re.semicolon=function(){!this.eat(l.semi)&&!this.insertSemicolon()&&this.unexpected()},re.afterTrailingComma=function(e,t){if(this.type===e)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),t||this.next(),!0},re.expect=function(e){this.eat(e)||this.unexpected()},re.unexpected=function(e){this.raise(e??this.start,"Unexpected token")};function wt(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1}re.checkPatternErrors=function(e,t){if(!!e){e.trailingComma>-1&&this.raiseRecoverable(e.trailingComma,"Comma is not permitted after the rest element");var r=t?e.parenthesizedAssign:e.parenthesizedBind;r>-1&&this.raiseRecoverable(r,"Parenthesized pattern")}},re.checkExpressionErrors=function(e,t){if(!e)return!1;var r=e.shorthandAssign,n=e.doubleProto;if(!t)return r>=0||n>=0;r>=0&&this.raise(r,"Shorthand property assignments are valid only in destructuring patterns"),n>=0&&this.raiseRecoverable(n,"Redefinition of __proto__ property")},re.checkYieldAwaitInDefaultParams=function(){this.yieldPos&&(!this.awaitPos||this.yieldPos<this.awaitPos)&&this.raise(this.yieldPos,"Yield expression cannot be a default value"),this.awaitPos&&this.raise(this.awaitPos,"Await expression cannot be a default value")},re.isSimpleAssignTarget=function(e){return e.type==="ParenthesizedExpression"?this.isSimpleAssignTarget(e.expression):e.type==="Identifier"||e.type==="MemberExpression"};var V=H.prototype;V.parseTopLevel=function(e){var t={};for(e.body||(e.body=[]);this.type!==l.eof;){var r=this.parseStatement(null,!0,t);e.body.push(r)}if(this.inModule)for(var n=0,o=Object.keys(this.undefinedExports);n<o.length;n+=1){var c=o[n];this.raiseRecoverable(this.undefinedExports[c].start,"Export '"+c+"' is not defined")}return this.adaptDirectivePrologue(e.body),this.next(),e.sourceType=this.options.sourceType,this.finishNode(e,"Program")};var Jt={kind:"loop"},fn={kind:"switch"};V.isLet=function(e){if(this.options.ecmaVersion<6||!this.isContextual("let"))return!1;q.lastIndex=this.pos;var t=q.exec(this.input),r=this.pos+t[0].length,n=this.input.charCodeAt(r);if(n===91)return!0;if(e)return!1;if(n===123)return!0;if(D(n,!0)){for(var o=r+1;P(this.input.charCodeAt(o),!0);)++o;var c=this.input.slice(r,o);if(!h.test(c))return!0}return!1},V.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual("async"))return!1;q.lastIndex=this.pos;var e=q.exec(this.input),t=this.pos+e[0].length;return!$.test(this.input.slice(this.pos,t))&&this.input.slice(t,t+8)==="function"&&(t+8===this.input.length||!P(this.input.charAt(t+8)))},V.parseStatement=function(e,t,r){var n=this.type,o=this.startNode(),c;switch(this.isLet(e)&&(n=l._var,c="let"),n){case l._break:case l._continue:return this.parseBreakContinueStatement(o,n.keyword);case l._debugger:return this.parseDebuggerStatement(o);case l._do:return this.parseDoStatement(o);case l._for:return this.parseForStatement(o);case l._function:return e&&(this.strict||e!=="if"&&e!=="label")&&this.options.ecmaVersion>=6&&this.unexpected(),this.parseFunctionStatement(o,!1,!e);case l._class:return e&&this.unexpected(),this.parseClass(o,!0);case l._if:return this.parseIfStatement(o);case l._return:return this.parseReturnStatement(o);case l._switch:return this.parseSwitchStatement(o);case l._throw:return this.parseThrowStatement(o);case l._try:return this.parseTryStatement(o);case l._const:case l._var:return c=c||this.value,e&&c!=="var"&&this.unexpected(),this.parseVarStatement(o,c);case l._while:return this.parseWhileStatement(o);case l._with:return this.parseWithStatement(o);case l.braceL:return this.parseBlock(!0,o);case l.semi:return this.parseEmptyStatement(o);case l._export:case l._import:if(this.options.ecmaVersion>10&&n===l._import){q.lastIndex=this.pos;var f=q.exec(this.input),m=this.pos+f[0].length,b=this.input.charCodeAt(m);if(b===40||b===46)return this.parseExpressionStatement(o,this.parseExpression())}return this.options.allowImportExportEverywhere||(t||this.raise(this.start,"'import' and 'export' may only appear at the top level"),this.inModule||this.raise(this.start,"'import' and 'export' may appear only with 'sourceType: module'")),n===l._import?this.parseImport(o):this.parseExport(o,r);default:if(this.isAsyncFunction())return e&&this.unexpected(),this.next(),this.parseFunctionStatement(o,!0,!e);var g=this.value,k=this.parseExpression();return n===l.name&&k.type==="Identifier"&&this.eat(l.colon)?this.parseLabeledStatement(o,g,k,e):this.parseExpressionStatement(o,k)}},V.parseBreakContinueStatement=function(e,t){var r=t==="break";this.next(),this.eat(l.semi)||this.insertSemicolon()?e.label=null:this.type!==l.name?this.unexpected():(e.label=this.parseIdent(),this.semicolon());for(var n=0;n<this.labels.length;++n){var o=this.labels[n];if((e.label==null||o.name===e.label.name)&&(o.kind!=null&&(r||o.kind==="loop")||e.label&&r))break}return n===this.labels.length&&this.raise(e.start,"Unsyntactic "+t),this.finishNode(e,r?"BreakStatement":"ContinueStatement")},V.parseDebuggerStatement=function(e){return this.next(),this.semicolon(),this.finishNode(e,"DebuggerStatement")},V.parseDoStatement=function(e){return this.next(),this.labels.push(Jt),e.body=this.parseStatement("do"),this.labels.pop(),this.expect(l._while),e.test=this.parseParenExpression(),this.options.ecmaVersion>=6?this.eat(l.semi):this.semicolon(),this.finishNode(e,"DoWhileStatement")},V.parseForStatement=function(e){this.next();var t=this.options.ecmaVersion>=9&&(this.inAsync||!this.inFunction&&this.options.allowAwaitOutsideFunction)&&this.eatContextual("await")?this.lastTokStart:-1;if(this.labels.push(Jt),this.enterScope(0),this.expect(l.parenL),this.type===l.semi)return t>-1&&this.unexpected(t),this.parseFor(e,null);var r=this.isLet();if(this.type===l._var||this.type===l._const||r){var n=this.startNode(),o=r?"let":this.value;return this.next(),this.parseVar(n,!0,o),this.finishNode(n,"VariableDeclaration"),(this.type===l._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&n.declarations.length===1?(this.options.ecmaVersion>=9&&(this.type===l._in?t>-1&&this.unexpected(t):e.await=t>-1),this.parseForIn(e,n)):(t>-1&&this.unexpected(t),this.parseFor(e,n))}var c=new wt,f=this.parseExpression(!0,c);return this.type===l._in||this.options.ecmaVersion>=6&&this.isContextual("of")?(this.options.ecmaVersion>=9&&(this.type===l._in?t>-1&&this.unexpected(t):e.await=t>-1),this.toAssignable(f,!1,c),this.checkLVal(f),this.parseForIn(e,f)):(this.checkExpressionErrors(c,!0),t>-1&&this.unexpected(t),this.parseFor(e,f))},V.parseFunctionStatement=function(e,t,r){return this.next(),this.parseFunction(e,Ke|(r?0:Zt),!1,t)},V.parseIfStatement=function(e){return this.next(),e.test=this.parseParenExpression(),e.consequent=this.parseStatement("if"),e.alternate=this.eat(l._else)?this.parseStatement("if"):null,this.finishNode(e,"IfStatement")},V.parseReturnStatement=function(e){return!this.inFunction&&!this.options.allowReturnOutsideFunction&&this.raise(this.start,"'return' outside of function"),this.next(),this.eat(l.semi)||this.insertSemicolon()?e.argument=null:(e.argument=this.parseExpression(),this.semicolon()),this.finishNode(e,"ReturnStatement")},V.parseSwitchStatement=function(e){this.next(),e.discriminant=this.parseParenExpression(),e.cases=[],this.expect(l.braceL),this.labels.push(fn),this.enterScope(0);for(var t,r=!1;this.type!==l.braceR;)if(this.type===l._case||this.type===l._default){var n=this.type===l._case;t&&this.finishNode(t,"SwitchCase"),e.cases.push(t=this.startNode()),t.consequent=[],this.next(),n?t.test=this.parseExpression():(r&&this.raiseRecoverable(this.lastTokStart,"Multiple default clauses"),r=!0,t.test=null),this.expect(l.colon)}else t||this.unexpected(),t.consequent.push(this.parseStatement(null));return this.exitScope(),t&&this.finishNode(t,"SwitchCase"),this.next(),this.labels.pop(),this.finishNode(e,"SwitchStatement")},V.parseThrowStatement=function(e){return this.next(),$.test(this.input.slice(this.lastTokEnd,this.start))&&this.raise(this.lastTokEnd,"Illegal newline after throw"),e.argument=this.parseExpression(),this.semicolon(),this.finishNode(e,"ThrowStatement")};var pn=[];V.parseTryStatement=function(e){if(this.next(),e.block=this.parseBlock(),e.handler=null,this.type===l._catch){var t=this.startNode();if(this.next(),this.eat(l.parenL)){t.param=this.parseBindingAtom();var r=t.param.type==="Identifier";this.enterScope(r?Yi:0),this.checkLVal(t.param,r?Zi:de),this.expect(l.parenR)}else this.options.ecmaVersion<10&&this.unexpected(),t.param=null,this.enterScope(0);t.body=this.parseBlock(!1),this.exitScope(),e.handler=this.finishNode(t,"CatchClause")}return e.finalizer=this.eat(l._finally)?this.parseBlock():null,!e.handler&&!e.finalizer&&this.raise(e.start,"Missing catch or finally clause"),this.finishNode(e,"TryStatement")},V.parseVarStatement=function(e,t){return this.next(),this.parseVar(e,!1,t),this.semicolon(),this.finishNode(e,"VariableDeclaration")},V.parseWhileStatement=function(e){return this.next(),e.test=this.parseParenExpression(),this.labels.push(Jt),e.body=this.parseStatement("while"),this.labels.pop(),this.finishNode(e,"WhileStatement")},V.parseWithStatement=function(e){return this.strict&&this.raise(this.start,"'with' in strict mode"),this.next(),e.object=this.parseParenExpression(),e.body=this.parseStatement("with"),this.finishNode(e,"WithStatement")},V.parseEmptyStatement=function(e){return this.next(),this.finishNode(e,"EmptyStatement")},V.parseLabeledStatement=function(e,t,r,n){for(var o=0,c=this.labels;o<c.length;o+=1){var f=c[o];f.name===t&&this.raise(r.start,"Label '"+t+"' is already declared")}for(var m=this.type.isLoop?"loop":this.type===l._switch?"switch":null,b=this.labels.length-1;b>=0;b--){var g=this.labels[b];if(g.statementStart===e.start)g.statementStart=this.start,g.kind=m;else break}return this.labels.push({name:t,kind:m,statementStart:this.start}),e.body=this.parseStatement(n?n.indexOf("label")===-1?n+"label":n:"label"),this.labels.pop(),e.label=r,this.finishNode(e,"LabeledStatement")},V.parseExpressionStatement=function(e,t){return e.expression=t,this.semicolon(),this.finishNode(e,"ExpressionStatement")},V.parseBlock=function(e,t,r){for(e===void 0&&(e=!0),t===void 0&&(t=this.startNode()),t.body=[],this.expect(l.braceL),e&&this.enterScope(0);this.type!==l.braceR;){var n=this.parseStatement(null);t.body.push(n)}return r&&(this.strict=!1),this.next(),e&&this.exitScope(),this.finishNode(t,"BlockStatement")},V.parseFor=function(e,t){return e.init=t,this.expect(l.semi),e.test=this.type===l.semi?null:this.parseExpression(),this.expect(l.semi),e.update=this.type===l.parenR?null:this.parseExpression(),this.expect(l.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,"ForStatement")},V.parseForIn=function(e,t){var r=this.type===l._in;return this.next(),t.type==="VariableDeclaration"&&t.declarations[0].init!=null&&(!r||this.options.ecmaVersion<8||this.strict||t.kind!=="var"||t.declarations[0].id.type!=="Identifier")?this.raise(t.start,(r?"for-in":"for-of")+" loop variable declaration may not have an initializer"):t.type==="AssignmentPattern"&&this.raise(t.start,"Invalid left-hand side in for-loop"),e.left=t,e.right=r?this.parseExpression():this.parseMaybeAssign(),this.expect(l.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,r?"ForInStatement":"ForOfStatement")},V.parseVar=function(e,t,r){for(e.declarations=[],e.kind=r;;){var n=this.startNode();if(this.parseVarId(n,r),this.eat(l.eq)?n.init=this.parseMaybeAssign(t):r==="const"&&!(this.type===l._in||this.options.ecmaVersion>=6&&this.isContextual("of"))?this.unexpected():n.id.type!=="Identifier"&&!(t&&(this.type===l._in||this.isContextual("of")))?this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value"):n.init=null,e.declarations.push(this.finishNode(n,"VariableDeclarator")),!this.eat(l.comma))break}return e},V.parseVarId=function(e,t){e.id=this.parseBindingAtom(),this.checkLVal(e.id,t==="var"?Xt:de,!1)};var Ke=1,Zt=2,tr=4;V.parseFunction=function(e,t,r,n){this.initFunction(e),(this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!n)&&(this.type===l.star&&t&Zt&&this.unexpected(),e.generator=this.eat(l.star)),this.options.ecmaVersion>=8&&(e.async=!!n),t&Ke&&(e.id=t&tr&&this.type!==l.name?null:this.parseIdent(),e.id&&!(t&Zt)&&this.checkLVal(e.id,this.strict||e.generator||e.async?this.treatFunctionsAsVar?Xt:de:Ji));var o=this.yieldPos,c=this.awaitPos,f=this.awaitIdentPos;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(Kt(e.async,e.generator)),t&Ke||(e.id=this.type===l.name?this.parseIdent():null),this.parseFunctionParams(e),this.parseFunctionBody(e,r,!1),this.yieldPos=o,this.awaitPos=c,this.awaitIdentPos=f,this.finishNode(e,t&Ke?"FunctionDeclaration":"FunctionExpression")},V.parseFunctionParams=function(e){this.expect(l.parenL),e.params=this.parseBindingList(l.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()},V.parseClass=function(e,t){this.next();var r=this.strict;this.strict=!0,this.parseClassId(e,t),this.parseClassSuper(e);var n=this.startNode(),o=!1;for(n.body=[],this.expect(l.braceL);this.type!==l.braceR;){var c=this.parseClassElement(e.superClass!==null);c&&(n.body.push(c),c.type==="MethodDefinition"&&c.kind==="constructor"&&(o&&this.raise(c.start,"Duplicate constructor in the same class"),o=!0))}return this.strict=r,this.next(),e.body=this.finishNode(n,"ClassBody"),this.finishNode(e,t?"ClassDeclaration":"ClassExpression")},V.parseClassElement=function(e){var t=this;if(this.eat(l.semi))return null;var r=this.startNode(),n=function(b,g){g===void 0&&(g=!1);var k=t.start,R=t.startLoc;return t.eatContextual(b)?t.type!==l.parenL&&(!g||!t.canInsertSemicolon())?!0:(r.key&&t.unexpected(),r.computed=!1,r.key=t.startNodeAt(k,R),r.key.name=b,t.finishNode(r.key,"Identifier"),!1):!1};r.kind="method",r.static=n("static");var o=this.eat(l.star),c=!1;o||(this.options.ecmaVersion>=8&&n("async",!0)?(c=!0,o=this.options.ecmaVersion>=9&&this.eat(l.star)):n("get")?r.kind="get":n("set")&&(r.kind="set")),r.key||this.parsePropertyName(r);var f=r.key,m=!1;return!r.computed&&!r.static&&(f.type==="Identifier"&&f.name==="constructor"||f.type==="Literal"&&f.value==="constructor")?(r.kind!=="method"&&this.raise(f.start,"Constructor can't have get/set modifier"),o&&this.raise(f.start,"Constructor can't be a generator"),c&&this.raise(f.start,"Constructor can't be an async method"),r.kind="constructor",m=e):r.static&&f.type==="Identifier"&&f.name==="prototype"&&this.raise(f.start,"Classes may not have a static property named prototype"),this.parseClassMethod(r,o,c,m),r.kind==="get"&&r.value.params.length!==0&&this.raiseRecoverable(r.value.start,"getter should have no params"),r.kind==="set"&&r.value.params.length!==1&&this.raiseRecoverable(r.value.start,"setter should have exactly one param"),r.kind==="set"&&r.value.params[0].type==="RestElement"&&this.raiseRecoverable(r.value.params[0].start,"Setter cannot use rest params"),r},V.parseClassMethod=function(e,t,r,n){return e.value=this.parseMethod(t,r,n),this.finishNode(e,"MethodDefinition")},V.parseClassId=function(e,t){this.type===l.name?(e.id=this.parseIdent(),t&&this.checkLVal(e.id,de,!1)):(t===!0&&this.unexpected(),e.id=null)},V.parseClassSuper=function(e){e.superClass=this.eat(l._extends)?this.parseExprSubscripts():null},V.parseExport=function(e,t){if(this.next(),this.eat(l.star))return this.options.ecmaVersion>=11&&(this.eatContextual("as")?(e.exported=this.parseIdent(!0),this.checkExport(t,e.exported.name,this.lastTokStart)):e.exported=null),this.expectContextual("from"),this.type!==l.string&&this.unexpected(),e.source=this.parseExprAtom(),this.semicolon(),this.finishNode(e,"ExportAllDeclaration");if(this.eat(l._default)){this.checkExport(t,"default",this.lastTokStart);var r;if(this.type===l._function||(r=this.isAsyncFunction())){var n=this.startNode();this.next(),r&&this.next(),e.declaration=this.parseFunction(n,Ke|tr,!1,r)}else if(this.type===l._class){var o=this.startNode();e.declaration=this.parseClass(o,"nullableID")}else e.declaration=this.parseMaybeAssign(),this.semicolon();return this.finishNode(e,"ExportDefaultDeclaration")}if(this.shouldParseExportStatement())e.declaration=this.parseStatement(null),e.declaration.type==="VariableDeclaration"?this.checkVariableExport(t,e.declaration.declarations):this.checkExport(t,e.declaration.id.name,e.declaration.id.start),e.specifiers=[],e.source=null;else{if(e.declaration=null,e.specifiers=this.parseExportSpecifiers(t),this.eatContextual("from"))this.type!==l.string&&this.unexpected(),e.source=this.parseExprAtom();else{for(var c=0,f=e.specifiers;c<f.length;c+=1){var m=f[c];this.checkUnreserved(m.local),this.checkLocalExport(m.local)}e.source=null}this.semicolon()}return this.finishNode(e,"ExportNamedDeclaration")},V.checkExport=function(e,t,r){!e||(gt(e,t)&&this.raiseRecoverable(r,"Duplicate export '"+t+"'"),e[t]=!0)},V.checkPatternExport=function(e,t){var r=t.type;if(r==="Identifier")this.checkExport(e,t.name,t.start);else if(r==="ObjectPattern")for(var n=0,o=t.properties;n<o.length;n+=1){var c=o[n];this.checkPatternExport(e,c)}else if(r==="ArrayPattern")for(var f=0,m=t.elements;f<m.length;f+=1){var b=m[f];b&&this.checkPatternExport(e,b)}else r==="Property"?this.checkPatternExport(e,t.value):r==="AssignmentPattern"?this.checkPatternExport(e,t.left):r==="RestElement"?this.checkPatternExport(e,t.argument):r==="ParenthesizedExpression"&&this.checkPatternExport(e,t.expression)},V.checkVariableExport=function(e,t){if(!!e)for(var r=0,n=t;r<n.length;r+=1){var o=n[r];this.checkPatternExport(e,o.id)}},V.shouldParseExportStatement=function(){return this.type.keyword==="var"||this.type.keyword==="const"||this.type.keyword==="class"||this.type.keyword==="function"||this.isLet()||this.isAsyncFunction()},V.parseExportSpecifiers=function(e){var t=[],r=!0;for(this.expect(l.braceL);!this.eat(l.braceR);){if(r)r=!1;else if(this.expect(l.comma),this.afterTrailingComma(l.braceR))break;var n=this.startNode();n.local=this.parseIdent(!0),n.exported=this.eatContextual("as")?this.parseIdent(!0):n.local,this.checkExport(e,n.exported.name,n.exported.start),t.push(this.finishNode(n,"ExportSpecifier"))}return t},V.parseImport=function(e){return this.next(),this.type===l.string?(e.specifiers=pn,e.source=this.parseExprAtom()):(e.specifiers=this.parseImportSpecifiers(),this.expectContextual("from"),e.source=this.type===l.string?this.parseExprAtom():this.unexpected()),this.semicolon(),this.finishNode(e,"ImportDeclaration")},V.parseImportSpecifiers=function(){var e=[],t=!0;if(this.type===l.name){var r=this.startNode();if(r.local=this.parseIdent(),this.checkLVal(r.local,de),e.push(this.finishNode(r,"ImportDefaultSpecifier")),!this.eat(l.comma))return e}if(this.type===l.star){var n=this.startNode();return this.next(),this.expectContextual("as"),n.local=this.parseIdent(),this.checkLVal(n.local,de),e.push(this.finishNode(n,"ImportNamespaceSpecifier")),e}for(this.expect(l.braceL);!this.eat(l.braceR);){if(t)t=!1;else if(this.expect(l.comma),this.afterTrailingComma(l.braceR))break;var o=this.startNode();o.imported=this.parseIdent(!0),this.eatContextual("as")?o.local=this.parseIdent():(this.checkUnreserved(o.imported),o.local=o.imported),this.checkLVal(o.local,de),e.push(this.finishNode(o,"ImportSpecifier"))}return e},V.adaptDirectivePrologue=function(e){for(var t=0;t<e.length&&this.isDirectiveCandidate(e[t]);++t)e[t].directive=e[t].expression.raw.slice(1,-1)},V.isDirectiveCandidate=function(e){return e.type==="ExpressionStatement"&&e.expression.type==="Literal"&&typeof e.expression.value=="string"&&(this.input[e.start]==='"'||this.input[e.start]==="'")};var me=H.prototype;me.toAssignable=function(e,t,r){if(this.options.ecmaVersion>=6&&e)switch(e.type){case"Identifier":this.inAsync&&e.name==="await"&&this.raise(e.start,"Cannot use 'await' as identifier inside an async function");break;case"ObjectPattern":case"ArrayPattern":case"RestElement":break;case"ObjectExpression":e.type="ObjectPattern",r&&this.checkPatternErrors(r,!0);for(var n=0,o=e.properties;n<o.length;n+=1){var c=o[n];this.toAssignable(c,t),c.type==="RestElement"&&(c.argument.type==="ArrayPattern"||c.argument.type==="ObjectPattern")&&this.raise(c.argument.start,"Unexpected token")}break;case"Property":e.kind!=="init"&&this.raise(e.key.start,"Object pattern can't contain getter or setter"),this.toAssignable(e.value,t);break;case"ArrayExpression":e.type="ArrayPattern",r&&this.checkPatternErrors(r,!0),this.toAssignableList(e.elements,t);break;case"SpreadElement":e.type="RestElement",this.toAssignable(e.argument,t),e.argument.type==="AssignmentPattern"&&this.raise(e.argument.start,"Rest elements cannot have a default value");break;case"AssignmentExpression":e.operator!=="="&&this.raise(e.left.end,"Only '=' operator can be used for specifying default value."),e.type="AssignmentPattern",delete e.operator,this.toAssignable(e.left,t);case"AssignmentPattern":break;case"ParenthesizedExpression":this.toAssignable(e.expression,t,r);break;case"ChainExpression":this.raiseRecoverable(e.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":if(!t)break;default:this.raise(e.start,"Assigning to rvalue")}else r&&this.checkPatternErrors(r,!0);return e},me.toAssignableList=function(e,t){for(var r=e.length,n=0;n<r;n++){var o=e[n];o&&this.toAssignable(o,t)}if(r){var c=e[r-1];this.options.ecmaVersion===6&&t&&c&&c.type==="RestElement"&&c.argument.type!=="Identifier"&&this.unexpected(c.argument.start)}return e},me.parseSpread=function(e){var t=this.startNode();return this.next(),t.argument=this.parseMaybeAssign(!1,e),this.finishNode(t,"SpreadElement")},me.parseRestBinding=function(){var e=this.startNode();return this.next(),this.options.ecmaVersion===6&&this.type!==l.name&&this.unexpected(),e.argument=this.parseBindingAtom(),this.finishNode(e,"RestElement")},me.parseBindingAtom=function(){if(this.options.ecmaVersion>=6)switch(this.type){case l.bracketL:var e=this.startNode();return this.next(),e.elements=this.parseBindingList(l.bracketR,!0,!0),this.finishNode(e,"ArrayPattern");case l.braceL:return this.parseObj(!0)}return this.parseIdent()},me.parseBindingList=function(e,t,r){for(var n=[],o=!0;!this.eat(e);)if(o?o=!1:this.expect(l.comma),t&&this.type===l.comma)n.push(null);else{if(r&&this.afterTrailingComma(e))break;if(this.type===l.ellipsis){var c=this.parseRestBinding();this.parseBindingListItem(c),n.push(c),this.type===l.comma&&this.raise(this.start,"Comma is not permitted after the rest element"),this.expect(e);break}else{var f=this.parseMaybeDefault(this.start,this.startLoc);this.parseBindingListItem(f),n.push(f)}}return n},me.parseBindingListItem=function(e){return e},me.parseMaybeDefault=function(e,t,r){if(r=r||this.parseBindingAtom(),this.options.ecmaVersion<6||!this.eat(l.eq))return r;var n=this.startNodeAt(e,t);return n.left=r,n.right=this.parseMaybeAssign(),this.finishNode(n,"AssignmentPattern")},me.checkLVal=function(e,t,r){switch(t===void 0&&(t=Xi),e.type){case"Identifier":t===de&&e.name==="let"&&this.raiseRecoverable(e.start,"let is disallowed as a lexically bound name"),this.strict&&this.reservedWordsStrictBind.test(e.name)&&this.raiseRecoverable(e.start,(t?"Binding ":"Assigning to ")+e.name+" in strict mode"),r&&(gt(r,e.name)&&this.raiseRecoverable(e.start,"Argument name clash"),r[e.name]=!0),t!==Xi&&t!==er&&this.declareName(e.name,t,e.start);break;case"ChainExpression":this.raiseRecoverable(e.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":t&&this.raiseRecoverable(e.start,"Binding member expression");break;case"ObjectPattern":for(var n=0,o=e.properties;n<o.length;n+=1){var c=o[n];this.checkLVal(c,t,r)}break;case"Property":this.checkLVal(e.value,t,r);break;case"ArrayPattern":for(var f=0,m=e.elements;f<m.length;f+=1){var b=m[f];b&&this.checkLVal(b,t,r)}break;case"AssignmentPattern":this.checkLVal(e.left,t,r);break;case"RestElement":this.checkLVal(e.argument,t,r);break;case"ParenthesizedExpression":this.checkLVal(e.expression,t,r);break;default:this.raise(e.start,(t?"Binding":"Assigning to")+" rvalue")}};var F=H.prototype;F.checkPropClash=function(e,t,r){if(!(this.options.ecmaVersion>=9&&e.type==="SpreadElement")&&!(this.options.ecmaVersion>=6&&(e.computed||e.method||e.shorthand))){var n=e.key,o;switch(n.type){case"Identifier":o=n.name;break;case"Literal":o=String(n.value);break;default:return}var c=e.kind;if(this.options.ecmaVersion>=6){o==="__proto__"&&c==="init"&&(t.proto&&(r?r.doubleProto<0&&(r.doubleProto=n.start):this.raiseRecoverable(n.start,"Redefinition of __proto__ property")),t.proto=!0);return}o="$"+o;var f=t[o];if(f){var m;c==="init"?m=this.strict&&f.init||f.get||f.set:m=f.init||f[c],m&&this.raiseRecoverable(n.start,"Redefinition of property")}else f=t[o]={init:!1,get:!1,set:!1};f[c]=!0}},F.parseExpression=function(e,t){var r=this.start,n=this.startLoc,o=this.parseMaybeAssign(e,t);if(this.type===l.comma){var c=this.startNodeAt(r,n);for(c.expressions=[o];this.eat(l.comma);)c.expressions.push(this.parseMaybeAssign(e,t));return this.finishNode(c,"SequenceExpression")}return o},F.parseMaybeAssign=function(e,t,r){if(this.isContextual("yield")){if(this.inGenerator)return this.parseYield(e);this.exprAllowed=!1}var n=!1,o=-1,c=-1;t?(o=t.parenthesizedAssign,c=t.trailingComma,t.parenthesizedAssign=t.trailingComma=-1):(t=new wt,n=!0);var f=this.start,m=this.startLoc;(this.type===l.parenL||this.type===l.name)&&(this.potentialArrowAt=this.start);var b=this.parseMaybeConditional(e,t);if(r&&(b=r.call(this,b,f,m)),this.type.isAssign){var g=this.startNodeAt(f,m);return g.operator=this.value,g.left=this.type===l.eq?this.toAssignable(b,!1,t):b,n||(t.parenthesizedAssign=t.trailingComma=t.doubleProto=-1),t.shorthandAssign>=g.left.start&&(t.shorthandAssign=-1),this.checkLVal(b),this.next(),g.right=this.parseMaybeAssign(e),this.finishNode(g,"AssignmentExpression")}else n&&this.checkExpressionErrors(t,!0);return o>-1&&(t.parenthesizedAssign=o),c>-1&&(t.trailingComma=c),b},F.parseMaybeConditional=function(e,t){var r=this.start,n=this.startLoc,o=this.parseExprOps(e,t);if(this.checkExpressionErrors(t))return o;if(this.eat(l.question)){var c=this.startNodeAt(r,n);return c.test=o,c.consequent=this.parseMaybeAssign(),this.expect(l.colon),c.alternate=this.parseMaybeAssign(e),this.finishNode(c,"ConditionalExpression")}return o},F.parseExprOps=function(e,t){var r=this.start,n=this.startLoc,o=this.parseMaybeUnary(t,!1);return this.checkExpressionErrors(t)||o.start===r&&o.type==="ArrowFunctionExpression"?o:this.parseExprOp(o,r,n,-1,e)},F.parseExprOp=function(e,t,r,n,o){var c=this.type.binop;if(c!=null&&(!o||this.type!==l._in)&&c>n){var f=this.type===l.logicalOR||this.type===l.logicalAND,m=this.type===l.coalesce;m&&(c=l.logicalAND.binop);var b=this.value;this.next();var g=this.start,k=this.startLoc,R=this.parseExprOp(this.parseMaybeUnary(null,!1),g,k,c,o),Y=this.buildBinary(t,r,e,R,b,f||m);return(f&&this.type===l.coalesce||m&&(this.type===l.logicalOR||this.type===l.logicalAND))&&this.raiseRecoverable(this.start,"Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses"),this.parseExprOp(Y,t,r,n,o)}return e},F.buildBinary=function(e,t,r,n,o,c){var f=this.startNodeAt(e,t);return f.left=r,f.operator=o,f.right=n,this.finishNode(f,c?"LogicalExpression":"BinaryExpression")},F.parseMaybeUnary=function(e,t){var r=this.start,n=this.startLoc,o;if(this.isContextual("await")&&(this.inAsync||!this.inFunction&&this.options.allowAwaitOutsideFunction))o=this.parseAwait(),t=!0;else if(this.type.prefix){var c=this.startNode(),f=this.type===l.incDec;c.operator=this.value,c.prefix=!0,this.next(),c.argument=this.parseMaybeUnary(null,!0),this.checkExpressionErrors(e,!0),f?this.checkLVal(c.argument):this.strict&&c.operator==="delete"&&c.argument.type==="Identifier"?this.raiseRecoverable(c.start,"Deleting local variable in strict mode"):t=!0,o=this.finishNode(c,f?"UpdateExpression":"UnaryExpression")}else{if(o=this.parseExprSubscripts(e),this.checkExpressionErrors(e))return o;for(;this.type.postfix&&!this.canInsertSemicolon();){var m=this.startNodeAt(r,n);m.operator=this.value,m.prefix=!1,m.argument=o,this.checkLVal(o),this.next(),o=this.finishNode(m,"UpdateExpression")}}return!t&&this.eat(l.starstar)?this.buildBinary(r,n,o,this.parseMaybeUnary(null,!1),"**",!1):o},F.parseExprSubscripts=function(e){var t=this.start,r=this.startLoc,n=this.parseExprAtom(e);if(n.type==="ArrowFunctionExpression"&&this.input.slice(this.lastTokStart,this.lastTokEnd)!==")")return n;var o=this.parseSubscripts(n,t,r);return e&&o.type==="MemberExpression"&&(e.parenthesizedAssign>=o.start&&(e.parenthesizedAssign=-1),e.parenthesizedBind>=o.start&&(e.parenthesizedBind=-1)),o},F.parseSubscripts=function(e,t,r,n){for(var o=this.options.ecmaVersion>=8&&e.type==="Identifier"&&e.name==="async"&&this.lastTokEnd===e.end&&!this.canInsertSemicolon()&&e.end-e.start==5&&this.potentialArrowAt===e.start,c=!1;;){var f=this.parseSubscript(e,t,r,n,o,c);if(f.optional&&(c=!0),f===e||f.type==="ArrowFunctionExpression"){if(c){var m=this.startNodeAt(t,r);m.expression=f,f=this.finishNode(m,"ChainExpression")}return f}e=f}},F.parseSubscript=function(e,t,r,n,o,c){var f=this.options.ecmaVersion>=11,m=f&&this.eat(l.questionDot);n&&m&&this.raise(this.lastTokStart,"Optional chaining cannot appear in the callee of new expressions");var b=this.eat(l.bracketL);if(b||m&&this.type!==l.parenL&&this.type!==l.backQuote||this.eat(l.dot)){var g=this.startNodeAt(t,r);g.object=e,g.property=b?this.parseExpression():this.parseIdent(this.options.allowReserved!=="never"),g.computed=!!b,b&&this.expect(l.bracketR),f&&(g.optional=m),e=this.finishNode(g,"MemberExpression")}else if(!n&&this.eat(l.parenL)){var k=new wt,R=this.yieldPos,Y=this.awaitPos,J=this.awaitIdentPos;this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0;var K=this.parseExprList(l.parenR,this.options.ecmaVersion>=8,!1,k);if(o&&!m&&!this.canInsertSemicolon()&&this.eat(l.arrow))return this.checkPatternErrors(k,!1),this.checkYieldAwaitInDefaultParams(),this.awaitIdentPos>0&&this.raise(this.awaitIdentPos,"Cannot use 'await' as identifier inside an async function"),this.yieldPos=R,this.awaitPos=Y,this.awaitIdentPos=J,this.parseArrowExpression(this.startNodeAt(t,r),K,!0);this.checkExpressionErrors(k,!0),this.yieldPos=R||this.yieldPos,this.awaitPos=Y||this.awaitPos,this.awaitIdentPos=J||this.awaitIdentPos;var G=this.startNodeAt(t,r);G.callee=e,G.arguments=K,f&&(G.optional=m),e=this.finishNode(G,"CallExpression")}else if(this.type===l.backQuote){(m||c)&&this.raise(this.start,"Optional chaining cannot appear in the tag of tagged template expressions");var Q=this.startNodeAt(t,r);Q.tag=e,Q.quasi=this.parseTemplate({isTagged:!0}),e=this.finishNode(Q,"TaggedTemplateExpression")}return e},F.parseExprAtom=function(e){this.type===l.slash&&this.readRegexp();var t,r=this.potentialArrowAt===this.start;switch(this.type){case l._super:return this.allowSuper||this.raise(this.start,"'super' keyword outside a method"),t=this.startNode(),this.next(),this.type===l.parenL&&!this.allowDirectSuper&&this.raise(t.start,"super() call outside constructor of a subclass"),this.type!==l.dot&&this.type!==l.bracketL&&this.type!==l.parenL&&this.unexpected(),this.finishNode(t,"Super");case l._this:return t=this.startNode(),this.next(),this.finishNode(t,"ThisExpression");case l.name:var n=this.start,o=this.startLoc,c=this.containsEsc,f=this.parseIdent(!1);if(this.options.ecmaVersion>=8&&!c&&f.name==="async"&&!this.canInsertSemicolon()&&this.eat(l._function))return this.parseFunction(this.startNodeAt(n,o),0,!1,!0);if(r&&!this.canInsertSemicolon()){if(this.eat(l.arrow))return this.parseArrowExpression(this.startNodeAt(n,o),[f],!1);if(this.options.ecmaVersion>=8&&f.name==="async"&&this.type===l.name&&!c)return f=this.parseIdent(!1),(this.canInsertSemicolon()||!this.eat(l.arrow))&&this.unexpected(),this.parseArrowExpression(this.startNodeAt(n,o),[f],!0)}return f;case l.regexp:var m=this.value;return t=this.parseLiteral(m.value),t.regex={pattern:m.pattern,flags:m.flags},t;case l.num:case l.string:return this.parseLiteral(this.value);case l._null:case l._true:case l._false:return t=this.startNode(),t.value=this.type===l._null?null:this.type===l._true,t.raw=this.type.keyword,this.next(),this.finishNode(t,"Literal");case l.parenL:var b=this.start,g=this.parseParenAndDistinguishExpression(r);return e&&(e.parenthesizedAssign<0&&!this.isSimpleAssignTarget(g)&&(e.parenthesizedAssign=b),e.parenthesizedBind<0&&(e.parenthesizedBind=b)),g;case l.bracketL:return t=this.startNode(),this.next(),t.elements=this.parseExprList(l.bracketR,!0,!0,e),this.finishNode(t,"ArrayExpression");case l.braceL:return this.parseObj(!1,e);case l._function:return t=this.startNode(),this.next(),this.parseFunction(t,0);case l._class:return this.parseClass(this.startNode(),!1);case l._new:return this.parseNew();case l.backQuote:return this.parseTemplate();case l._import:return this.options.ecmaVersion>=11?this.parseExprImport():this.unexpected();default:this.unexpected()}},F.parseExprImport=function(){var e=this.startNode();this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword import");var t=this.parseIdent(!0);switch(this.type){case l.parenL:return this.parseDynamicImport(e);case l.dot:return e.meta=t,this.parseImportMeta(e);default:this.unexpected()}},F.parseDynamicImport=function(e){if(this.next(),e.source=this.parseMaybeAssign(),!this.eat(l.parenR)){var t=this.start;this.eat(l.comma)&&this.eat(l.parenR)?this.raiseRecoverable(t,"Trailing comma is not allowed in import()"):this.unexpected(t)}return this.finishNode(e,"ImportExpression")},F.parseImportMeta=function(e){this.next();var t=this.containsEsc;return e.property=this.parseIdent(!0),e.property.name!=="meta"&&this.raiseRecoverable(e.property.start,"The only valid meta property for import is 'import.meta'"),t&&this.raiseRecoverable(e.start,"'import.meta' must not contain escaped characters"),this.options.sourceType!=="module"&&this.raiseRecoverable(e.start,"Cannot use 'import.meta' outside a module"),this.finishNode(e,"MetaProperty")},F.parseLiteral=function(e){var t=this.startNode();return t.value=e,t.raw=this.input.slice(this.start,this.end),t.raw.charCodeAt(t.raw.length-1)===110&&(t.bigint=t.raw.slice(0,-1).replace(/_/g,"")),this.next(),this.finishNode(t,"Literal")},F.parseParenExpression=function(){this.expect(l.parenL);var e=this.parseExpression();return this.expect(l.parenR),e},F.parseParenAndDistinguishExpression=function(e){var t=this.start,r=this.startLoc,n,o=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var c=this.start,f=this.startLoc,m=[],b=!0,g=!1,k=new wt,R=this.yieldPos,Y=this.awaitPos,J;for(this.yieldPos=0,this.awaitPos=0;this.type!==l.parenR;)if(b?b=!1:this.expect(l.comma),o&&this.afterTrailingComma(l.parenR,!0)){g=!0;break}else if(this.type===l.ellipsis){J=this.start,m.push(this.parseParenItem(this.parseRestBinding())),this.type===l.comma&&this.raise(this.start,"Comma is not permitted after the rest element");break}else m.push(this.parseMaybeAssign(!1,k,this.parseParenItem));var K=this.start,G=this.startLoc;if(this.expect(l.parenR),e&&!this.canInsertSemicolon()&&this.eat(l.arrow))return this.checkPatternErrors(k,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=R,this.awaitPos=Y,this.parseParenArrowList(t,r,m);(!m.length||g)&&this.unexpected(this.lastTokStart),J&&this.unexpected(J),this.checkExpressionErrors(k,!0),this.yieldPos=R||this.yieldPos,this.awaitPos=Y||this.awaitPos,m.length>1?(n=this.startNodeAt(c,f),n.expressions=m,this.finishNodeAt(n,"SequenceExpression",K,G)):n=m[0]}else n=this.parseParenExpression();if(this.options.preserveParens){var Q=this.startNodeAt(t,r);return Q.expression=n,this.finishNode(Q,"ParenthesizedExpression")}else return n},F.parseParenItem=function(e){return e},F.parseParenArrowList=function(e,t,r){return this.parseArrowExpression(this.startNodeAt(e,t),r)};var dn=[];F.parseNew=function(){this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword new");var e=this.startNode(),t=this.parseIdent(!0);if(this.options.ecmaVersion>=6&&this.eat(l.dot)){e.meta=t;var r=this.containsEsc;return e.property=this.parseIdent(!0),e.property.name!=="target"&&this.raiseRecoverable(e.property.start,"The only valid meta property for new is 'new.target'"),r&&this.raiseRecoverable(e.start,"'new.target' must not contain escaped characters"),this.inNonArrowFunction()||this.raiseRecoverable(e.start,"'new.target' can only be used in functions"),this.finishNode(e,"MetaProperty")}var n=this.start,o=this.startLoc,c=this.type===l._import;return e.callee=this.parseSubscripts(this.parseExprAtom(),n,o,!0),c&&e.callee.type==="ImportExpression"&&this.raise(n,"Cannot use new with import()"),this.eat(l.parenL)?e.arguments=this.parseExprList(l.parenR,this.options.ecmaVersion>=8,!1):e.arguments=dn,this.finishNode(e,"NewExpression")},F.parseTemplateElement=function(e){var t=e.isTagged,r=this.startNode();return this.type===l.invalidTemplate?(t||this.raiseRecoverable(this.start,"Bad escape sequence in untagged template literal"),r.value={raw:this.value,cooked:null}):r.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,`
  `),cooked:this.value},this.next(),r.tail=this.type===l.backQuote,this.finishNode(r,"TemplateElement")},F.parseTemplate=function(e){e===void 0&&(e={});var t=e.isTagged;t===void 0&&(t=!1);var r=this.startNode();this.next(),r.expressions=[];var n=this.parseTemplateElement({isTagged:t});for(r.quasis=[n];!n.tail;)this.type===l.eof&&this.raise(this.pos,"Unterminated template literal"),this.expect(l.dollarBraceL),r.expressions.push(this.parseExpression()),this.expect(l.braceR),r.quasis.push(n=this.parseTemplateElement({isTagged:t}));return this.next(),this.finishNode(r,"TemplateLiteral")},F.isAsyncProp=function(e){return!e.computed&&e.key.type==="Identifier"&&e.key.name==="async"&&(this.type===l.name||this.type===l.num||this.type===l.string||this.type===l.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===l.star)&&!$.test(this.input.slice(this.lastTokEnd,this.start))},F.parseObj=function(e,t){var r=this.startNode(),n=!0,o={};for(r.properties=[],this.next();!this.eat(l.braceR);){if(n)n=!1;else if(this.expect(l.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma(l.braceR))break;var c=this.parseProperty(e,t);e||this.checkPropClash(c,o,t),r.properties.push(c)}return this.finishNode(r,e?"ObjectPattern":"ObjectExpression")},F.parseProperty=function(e,t){var r=this.startNode(),n,o,c,f;if(this.options.ecmaVersion>=9&&this.eat(l.ellipsis))return e?(r.argument=this.parseIdent(!1),this.type===l.comma&&this.raise(this.start,"Comma is not permitted after the rest element"),this.finishNode(r,"RestElement")):(this.type===l.parenL&&t&&(t.parenthesizedAssign<0&&(t.parenthesizedAssign=this.start),t.parenthesizedBind<0&&(t.parenthesizedBind=this.start)),r.argument=this.parseMaybeAssign(!1,t),this.type===l.comma&&t&&t.trailingComma<0&&(t.trailingComma=this.start),this.finishNode(r,"SpreadElement"));this.options.ecmaVersion>=6&&(r.method=!1,r.shorthand=!1,(e||t)&&(c=this.start,f=this.startLoc),e||(n=this.eat(l.star)));var m=this.containsEsc;return this.parsePropertyName(r),!e&&!m&&this.options.ecmaVersion>=8&&!n&&this.isAsyncProp(r)?(o=!0,n=this.options.ecmaVersion>=9&&this.eat(l.star),this.parsePropertyName(r,t)):o=!1,this.parsePropertyValue(r,e,n,o,c,f,t,m),this.finishNode(r,"Property")},F.parsePropertyValue=function(e,t,r,n,o,c,f,m){if((r||n)&&this.type===l.colon&&this.unexpected(),this.eat(l.colon))e.value=t?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,f),e.kind="init";else if(this.options.ecmaVersion>=6&&this.type===l.parenL)t&&this.unexpected(),e.kind="init",e.method=!0,e.value=this.parseMethod(r,n);else if(!t&&!m&&this.options.ecmaVersion>=5&&!e.computed&&e.key.type==="Identifier"&&(e.key.name==="get"||e.key.name==="set")&&this.type!==l.comma&&this.type!==l.braceR&&this.type!==l.eq){(r||n)&&this.unexpected(),e.kind=e.key.name,this.parsePropertyName(e),e.value=this.parseMethod(!1);var b=e.kind==="get"?0:1;if(e.value.params.length!==b){var g=e.value.start;e.kind==="get"?this.raiseRecoverable(g,"getter should have no params"):this.raiseRecoverable(g,"setter should have exactly one param")}else e.kind==="set"&&e.value.params[0].type==="RestElement"&&this.raiseRecoverable(e.value.params[0].start,"Setter cannot use rest params")}else this.options.ecmaVersion>=6&&!e.computed&&e.key.type==="Identifier"?((r||n)&&this.unexpected(),this.checkUnreserved(e.key),e.key.name==="await"&&!this.awaitIdentPos&&(this.awaitIdentPos=o),e.kind="init",t?e.value=this.parseMaybeDefault(o,c,e.key):this.type===l.eq&&f?(f.shorthandAssign<0&&(f.shorthandAssign=this.start),e.value=this.parseMaybeDefault(o,c,e.key)):e.value=e.key,e.shorthand=!0):this.unexpected()},F.parsePropertyName=function(e){if(this.options.ecmaVersion>=6){if(this.eat(l.bracketL))return e.computed=!0,e.key=this.parseMaybeAssign(),this.expect(l.bracketR),e.key;e.computed=!1}return e.key=this.type===l.num||this.type===l.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never")},F.initFunction=function(e){e.id=null,this.options.ecmaVersion>=6&&(e.generator=e.expression=!1),this.options.ecmaVersion>=8&&(e.async=!1)},F.parseMethod=function(e,t,r){var n=this.startNode(),o=this.yieldPos,c=this.awaitPos,f=this.awaitIdentPos;return this.initFunction(n),this.options.ecmaVersion>=6&&(n.generator=e),this.options.ecmaVersion>=8&&(n.async=!!t),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(Kt(t,n.generator)|Qi|(r?Ki:0)),this.expect(l.parenL),n.params=this.parseBindingList(l.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(n,!1,!0),this.yieldPos=o,this.awaitPos=c,this.awaitIdentPos=f,this.finishNode(n,"FunctionExpression")},F.parseArrowExpression=function(e,t,r){var n=this.yieldPos,o=this.awaitPos,c=this.awaitIdentPos;return this.enterScope(Kt(r,!1)|zi),this.initFunction(e),this.options.ecmaVersion>=8&&(e.async=!!r),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,e.params=this.toAssignableList(t,!0),this.parseFunctionBody(e,!0,!1),this.yieldPos=n,this.awaitPos=o,this.awaitIdentPos=c,this.finishNode(e,"ArrowFunctionExpression")},F.parseFunctionBody=function(e,t,r){var n=t&&this.type!==l.braceL,o=this.strict,c=!1;if(n)e.body=this.parseMaybeAssign(),e.expression=!0,this.checkParams(e,!1);else{var f=this.options.ecmaVersion>=7&&!this.isSimpleParamList(e.params);(!o||f)&&(c=this.strictDirective(this.end),c&&f&&this.raiseRecoverable(e.start,"Illegal 'use strict' directive in function with non-simple parameter list"));var m=this.labels;this.labels=[],c&&(this.strict=!0),this.checkParams(e,!o&&!c&&!t&&!r&&this.isSimpleParamList(e.params)),this.strict&&e.id&&this.checkLVal(e.id,er),e.body=this.parseBlock(!1,void 0,c&&!o),e.expression=!1,this.adaptDirectivePrologue(e.body.body),this.labels=m}this.exitScope()},F.isSimpleParamList=function(e){for(var t=0,r=e;t<r.length;t+=1){var n=r[t];if(n.type!=="Identifier")return!1}return!0},F.checkParams=function(e,t){for(var r={},n=0,o=e.params;n<o.length;n+=1){var c=o[n];this.checkLVal(c,Xt,t?null:r)}},F.parseExprList=function(e,t,r,n){for(var o=[],c=!0;!this.eat(e);){if(c)c=!1;else if(this.expect(l.comma),t&&this.afterTrailingComma(e))break;var f=void 0;r&&this.type===l.comma?f=null:this.type===l.ellipsis?(f=this.parseSpread(n),n&&this.type===l.comma&&n.trailingComma<0&&(n.trailingComma=this.start)):f=this.parseMaybeAssign(!1,n),o.push(f)}return o},F.checkUnreserved=function(e){var t=e.start,r=e.end,n=e.name;if(this.inGenerator&&n==="yield"&&this.raiseRecoverable(t,"Cannot use 'yield' as identifier inside a generator"),this.inAsync&&n==="await"&&this.raiseRecoverable(t,"Cannot use 'await' as identifier inside an async function"),this.keywords.test(n)&&this.raise(t,"Unexpected keyword '"+n+"'"),!(this.options.ecmaVersion<6&&this.input.slice(t,r).indexOf("\\")!==-1)){var o=this.strict?this.reservedWordsStrict:this.reservedWords;o.test(n)&&(!this.inAsync&&n==="await"&&this.raiseRecoverable(t,"Cannot use keyword 'await' outside an async function"),this.raiseRecoverable(t,"The keyword '"+n+"' is reserved"))}},F.parseIdent=function(e,t){var r=this.startNode();return this.type===l.name?r.name=this.value:this.type.keyword?(r.name=this.type.keyword,(r.name==="class"||r.name==="function")&&(this.lastTokEnd!==this.lastTokStart+1||this.input.charCodeAt(this.lastTokStart)!==46)&&this.context.pop()):this.unexpected(),this.next(!!e),this.finishNode(r,"Identifier"),e||(this.checkUnreserved(r),r.name==="await"&&!this.awaitIdentPos&&(this.awaitIdentPos=r.start)),r},F.parseYield=function(e){this.yieldPos||(this.yieldPos=this.start);var t=this.startNode();return this.next(),this.type===l.semi||this.canInsertSemicolon()||this.type!==l.star&&!this.type.startsExpr?(t.delegate=!1,t.argument=null):(t.delegate=this.eat(l.star),t.argument=this.parseMaybeAssign(e)),this.finishNode(t,"YieldExpression")},F.parseAwait=function(){this.awaitPos||(this.awaitPos=this.start);var e=this.startNode();return this.next(),e.argument=this.parseMaybeUnary(null,!1),this.finishNode(e,"AwaitExpression")};var Et=H.prototype;Et.raise=function(e,t){var r=_t(this.input,e);t+=" ("+r.line+":"+r.column+")";var n=new SyntaxError(t);throw n.pos=e,n.loc=r,n.raisedAt=this.pos,n},Et.raiseRecoverable=Et.raise,Et.curPosition=function(){if(this.options.locations)return new ze(this.curLine,this.pos-this.lineStart)};var ye=H.prototype,mn=function(t){this.flags=t,this.var=[],this.lexical=[],this.functions=[]};ye.enterScope=function(e){this.scopeStack.push(new mn(e))},ye.exitScope=function(){this.scopeStack.pop()},ye.treatFunctionsAsVarInScope=function(e){return e.flags&Qe||!this.inModule&&e.flags&Ye},ye.declareName=function(e,t,r){var n=!1;if(t===de){var o=this.currentScope();n=o.lexical.indexOf(e)>-1||o.functions.indexOf(e)>-1||o.var.indexOf(e)>-1,o.lexical.push(e),this.inModule&&o.flags&Ye&&delete this.undefinedExports[e]}else if(t===Zi){var c=this.currentScope();c.lexical.push(e)}else if(t===Ji){var f=this.currentScope();this.treatFunctionsAsVar?n=f.lexical.indexOf(e)>-1:n=f.lexical.indexOf(e)>-1||f.var.indexOf(e)>-1,f.functions.push(e)}else for(var m=this.scopeStack.length-1;m>=0;--m){var b=this.scopeStack[m];if(b.lexical.indexOf(e)>-1&&!(b.flags&Yi&&b.lexical[0]===e)||!this.treatFunctionsAsVarInScope(b)&&b.functions.indexOf(e)>-1){n=!0;break}if(b.var.push(e),this.inModule&&b.flags&Ye&&delete this.undefinedExports[e],b.flags&Qt)break}n&&this.raiseRecoverable(r,"Identifier '"+e+"' has already been declared")},ye.checkLocalExport=function(e){this.scopeStack[0].lexical.indexOf(e.name)===-1&&this.scopeStack[0].var.indexOf(e.name)===-1&&(this.undefinedExports[e.name]=e)},ye.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]},ye.currentVarScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(t.flags&Qt)return t}},ye.currentThisScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(t.flags&Qt&&!(t.flags&zi))return t}};var ei=function(t,r,n){this.type="",this.start=r,this.end=0,t.options.locations&&(this.loc=new yt(t,n)),t.options.directSourceFile&&(this.sourceFile=t.options.directSourceFile),t.options.ranges&&(this.range=[r,0])},St=H.prototype;St.startNode=function(){return new ei(this,this.start,this.startLoc)},St.startNodeAt=function(e,t){return new ei(this,e,t)};function ir(e,t,r,n){return e.type=t,e.end=r,this.options.locations&&(e.loc.end=n),this.options.ranges&&(e.range[1]=r),e}St.finishNode=function(e,t){return ir.call(this,e,t,this.lastTokEnd,this.lastTokEndLoc)},St.finishNodeAt=function(e,t,r,n){return ir.call(this,e,t,r,n)};var oe=function(t,r,n,o,c){this.token=t,this.isExpr=!!r,this.preserveSpace=!!n,this.override=o,this.generator=!!c},z={b_stat:new oe("{",!1),b_expr:new oe("{",!0),b_tmpl:new oe("${",!1),p_stat:new oe("(",!1),p_expr:new oe("(",!0),q_tmpl:new oe("`",!0,!0,function(e){return e.tryReadTemplateToken()}),f_stat:new oe("function",!1),f_expr:new oe("function",!0),f_expr_gen:new oe("function",!0,!1,null,!0),f_gen:new oe("function",!1,!1,null,!0)},Ct=H.prototype;Ct.initialContext=function(){return[z.b_stat]},Ct.braceIsBlock=function(e){var t=this.curContext();return t===z.f_expr||t===z.f_stat?!0:e===l.colon&&(t===z.b_stat||t===z.b_expr)?!t.isExpr:e===l._return||e===l.name&&this.exprAllowed?$.test(this.input.slice(this.lastTokEnd,this.start)):e===l._else||e===l.semi||e===l.eof||e===l.parenR||e===l.arrow?!0:e===l.braceL?t===z.b_stat:e===l._var||e===l._const||e===l.name?!1:!this.exprAllowed},Ct.inGeneratorContext=function(){for(var e=this.context.length-1;e>=1;e--){var t=this.context[e];if(t.token==="function")return t.generator}return!1},Ct.updateContext=function(e){var t,r=this.type;r.keyword&&e===l.dot?this.exprAllowed=!1:(t=r.updateContext)?t.call(this,e):this.exprAllowed=r.beforeExpr},l.parenR.updateContext=l.braceR.updateContext=function(){if(this.context.length===1){this.exprAllowed=!0;return}var e=this.context.pop();e===z.b_stat&&this.curContext().token==="function"&&(e=this.context.pop()),this.exprAllowed=!e.isExpr},l.braceL.updateContext=function(e){this.context.push(this.braceIsBlock(e)?z.b_stat:z.b_expr),this.exprAllowed=!0},l.dollarBraceL.updateContext=function(){this.context.push(z.b_tmpl),this.exprAllowed=!0},l.parenL.updateContext=function(e){var t=e===l._if||e===l._for||e===l._with||e===l._while;this.context.push(t?z.p_stat:z.p_expr),this.exprAllowed=!0},l.incDec.updateContext=function(){},l._function.updateContext=l._class.updateContext=function(e){e.beforeExpr&&e!==l.semi&&e!==l._else&&!(e===l._return&&$.test(this.input.slice(this.lastTokEnd,this.start)))&&!((e===l.colon||e===l.braceL)&&this.curContext()===z.b_stat)?this.context.push(z.f_expr):this.context.push(z.f_stat),this.exprAllowed=!1},l.backQuote.updateContext=function(){this.curContext()===z.q_tmpl?this.context.pop():this.context.push(z.q_tmpl),this.exprAllowed=!1},l.star.updateContext=function(e){if(e===l._function){var t=this.context.length-1;this.context[t]===z.f_expr?this.context[t]=z.f_expr_gen:this.context[t]=z.f_gen}this.exprAllowed=!0},l.name.updateContext=function(e){var t=!1;this.options.ecmaVersion>=6&&e!==l.dot&&(this.value==="of"&&!this.exprAllowed||this.value==="yield"&&this.inGeneratorContext())&&(t=!0),this.exprAllowed=t};var rr="ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS",sr=rr+" Extended_Pictographic",xn=sr,bn={9:rr,10:sr,11:xn},nr="Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu",ar="Adlam Adlm Ahom Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb",or=ar+" Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd",vn=or+" Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho",gn={9:ar,10:or,11:vn},ur={};function ti(e){var t=ur[e]={binary:Ie(bn[e]+" "+nr),nonBinary:{General_Category:Ie(nr),Script:Ie(gn[e])}};t.nonBinary.Script_Extensions=t.nonBinary.Script,t.nonBinary.gc=t.nonBinary.General_Category,t.nonBinary.sc=t.nonBinary.Script,t.nonBinary.scx=t.nonBinary.Script_Extensions}ti(9),ti(10),ti(11);var T=H.prototype,xe=function(t){this.parser=t,this.validFlags="gim"+(t.options.ecmaVersion>=6?"uy":"")+(t.options.ecmaVersion>=9?"s":""),this.unicodeProperties=ur[t.options.ecmaVersion>=11?11:t.options.ecmaVersion],this.source="",this.flags="",this.start=0,this.switchU=!1,this.switchN=!1,this.pos=0,this.lastIntValue=0,this.lastStringValue="",this.lastAssertionIsQuantifiable=!1,this.numCapturingParens=0,this.maxBackReference=0,this.groupNames=[],this.backReferenceNames=[]};xe.prototype.reset=function(t,r,n){var o=n.indexOf("u")!==-1;this.start=t|0,this.source=r+"",this.flags=n,this.switchU=o&&this.parser.options.ecmaVersion>=6,this.switchN=o&&this.parser.options.ecmaVersion>=9},xe.prototype.raise=function(t){this.parser.raiseRecoverable(this.start,"Invalid regular expression: /"+this.source+"/: "+t)},xe.prototype.at=function(t,r){r===void 0&&(r=!1);var n=this.source,o=n.length;if(t>=o)return-1;var c=n.charCodeAt(t);if(!(r||this.switchU)||c<=55295||c>=57344||t+1>=o)return c;var f=n.charCodeAt(t+1);return f>=56320&&f<=57343?(c<<10)+f-56613888:c},xe.prototype.nextIndex=function(t,r){r===void 0&&(r=!1);var n=this.source,o=n.length;if(t>=o)return o;var c=n.charCodeAt(t),f;return!(r||this.switchU)||c<=55295||c>=57344||t+1>=o||(f=n.charCodeAt(t+1))<56320||f>57343?t+1:t+2},xe.prototype.current=function(t){return t===void 0&&(t=!1),this.at(this.pos,t)},xe.prototype.lookahead=function(t){return t===void 0&&(t=!1),this.at(this.nextIndex(this.pos,t),t)},xe.prototype.advance=function(t){t===void 0&&(t=!1),this.pos=this.nextIndex(this.pos,t)},xe.prototype.eat=function(t,r){return r===void 0&&(r=!1),this.current(r)===t?(this.advance(r),!0):!1};function kt(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10)+55296,(e&1023)+56320))}T.validateRegExpFlags=function(e){for(var t=e.validFlags,r=e.flags,n=0;n<r.length;n++){var o=r.charAt(n);t.indexOf(o)===-1&&this.raise(e.start,"Invalid regular expression flag"),r.indexOf(o,n+1)>-1&&this.raise(e.start,"Duplicate regular expression flag")}},T.validateRegExpPattern=function(e){this.regexp_pattern(e),!e.switchN&&this.options.ecmaVersion>=9&&e.groupNames.length>0&&(e.switchN=!0,this.regexp_pattern(e))},T.regexp_pattern=function(e){e.pos=0,e.lastIntValue=0,e.lastStringValue="",e.lastAssertionIsQuantifiable=!1,e.numCapturingParens=0,e.maxBackReference=0,e.groupNames.length=0,e.backReferenceNames.length=0,this.regexp_disjunction(e),e.pos!==e.source.length&&(e.eat(41)&&e.raise("Unmatched ')'"),(e.eat(93)||e.eat(125))&&e.raise("Lone quantifier brackets")),e.maxBackReference>e.numCapturingParens&&e.raise("Invalid escape");for(var t=0,r=e.backReferenceNames;t<r.length;t+=1){var n=r[t];e.groupNames.indexOf(n)===-1&&e.raise("Invalid named capture referenced")}},T.regexp_disjunction=function(e){for(this.regexp_alternative(e);e.eat(124);)this.regexp_alternative(e);this.regexp_eatQuantifier(e,!0)&&e.raise("Nothing to repeat"),e.eat(123)&&e.raise("Lone quantifier brackets")},T.regexp_alternative=function(e){for(;e.pos<e.source.length&&this.regexp_eatTerm(e););},T.regexp_eatTerm=function(e){return this.regexp_eatAssertion(e)?(e.lastAssertionIsQuantifiable&&this.regexp_eatQuantifier(e)&&e.switchU&&e.raise("Invalid quantifier"),!0):(e.switchU?this.regexp_eatAtom(e):this.regexp_eatExtendedAtom(e))?(this.regexp_eatQuantifier(e),!0):!1},T.regexp_eatAssertion=function(e){var t=e.pos;if(e.lastAssertionIsQuantifiable=!1,e.eat(94)||e.eat(36))return!0;if(e.eat(92)){if(e.eat(66)||e.eat(98))return!0;e.pos=t}if(e.eat(40)&&e.eat(63)){var r=!1;if(this.options.ecmaVersion>=9&&(r=e.eat(60)),e.eat(61)||e.eat(33))return this.regexp_disjunction(e),e.eat(41)||e.raise("Unterminated group"),e.lastAssertionIsQuantifiable=!r,!0}return e.pos=t,!1},T.regexp_eatQuantifier=function(e,t){return t===void 0&&(t=!1),this.regexp_eatQuantifierPrefix(e,t)?(e.eat(63),!0):!1},T.regexp_eatQuantifierPrefix=function(e,t){return e.eat(42)||e.eat(43)||e.eat(63)||this.regexp_eatBracedQuantifier(e,t)},T.regexp_eatBracedQuantifier=function(e,t){var r=e.pos;if(e.eat(123)){var n=0,o=-1;if(this.regexp_eatDecimalDigits(e)&&(n=e.lastIntValue,e.eat(44)&&this.regexp_eatDecimalDigits(e)&&(o=e.lastIntValue),e.eat(125)))return o!==-1&&o<n&&!t&&e.raise("numbers out of order in {} quantifier"),!0;e.switchU&&!t&&e.raise("Incomplete quantifier"),e.pos=r}return!1},T.regexp_eatAtom=function(e){return this.regexp_eatPatternCharacters(e)||e.eat(46)||this.regexp_eatReverseSolidusAtomEscape(e)||this.regexp_eatCharacterClass(e)||this.regexp_eatUncapturingGroup(e)||this.regexp_eatCapturingGroup(e)},T.regexp_eatReverseSolidusAtomEscape=function(e){var t=e.pos;if(e.eat(92)){if(this.regexp_eatAtomEscape(e))return!0;e.pos=t}return!1},T.regexp_eatUncapturingGroup=function(e){var t=e.pos;if(e.eat(40)){if(e.eat(63)&&e.eat(58)){if(this.regexp_disjunction(e),e.eat(41))return!0;e.raise("Unterminated group")}e.pos=t}return!1},T.regexp_eatCapturingGroup=function(e){if(e.eat(40)){if(this.options.ecmaVersion>=9?this.regexp_groupSpecifier(e):e.current()===63&&e.raise("Invalid group"),this.regexp_disjunction(e),e.eat(41))return e.numCapturingParens+=1,!0;e.raise("Unterminated group")}return!1},T.regexp_eatExtendedAtom=function(e){return e.eat(46)||this.regexp_eatReverseSolidusAtomEscape(e)||this.regexp_eatCharacterClass(e)||this.regexp_eatUncapturingGroup(e)||this.regexp_eatCapturingGroup(e)||this.regexp_eatInvalidBracedQuantifier(e)||this.regexp_eatExtendedPatternCharacter(e)},T.regexp_eatInvalidBracedQuantifier=function(e){return this.regexp_eatBracedQuantifier(e,!0)&&e.raise("Nothing to repeat"),!1},T.regexp_eatSyntaxCharacter=function(e){var t=e.current();return lr(t)?(e.lastIntValue=t,e.advance(),!0):!1};function lr(e){return e===36||e>=40&&e<=43||e===46||e===63||e>=91&&e<=94||e>=123&&e<=125}T.regexp_eatPatternCharacters=function(e){for(var t=e.pos,r=0;(r=e.current())!==-1&&!lr(r);)e.advance();return e.pos!==t},T.regexp_eatExtendedPatternCharacter=function(e){var t=e.current();return t!==-1&&t!==36&&!(t>=40&&t<=43)&&t!==46&&t!==63&&t!==91&&t!==94&&t!==124?(e.advance(),!0):!1},T.regexp_groupSpecifier=function(e){if(e.eat(63)){if(this.regexp_eatGroupName(e)){e.groupNames.indexOf(e.lastStringValue)!==-1&&e.raise("Duplicate capture group name"),e.groupNames.push(e.lastStringValue);return}e.raise("Invalid group")}},T.regexp_eatGroupName=function(e){if(e.lastStringValue="",e.eat(60)){if(this.regexp_eatRegExpIdentifierName(e)&&e.eat(62))return!0;e.raise("Invalid capture group name")}return!1},T.regexp_eatRegExpIdentifierName=function(e){if(e.lastStringValue="",this.regexp_eatRegExpIdentifierStart(e)){for(e.lastStringValue+=kt(e.lastIntValue);this.regexp_eatRegExpIdentifierPart(e);)e.lastStringValue+=kt(e.lastIntValue);return!0}return!1},T.regexp_eatRegExpIdentifierStart=function(e){var t=e.pos,r=this.options.ecmaVersion>=11,n=e.current(r);return e.advance(r),n===92&&this.regexp_eatRegExpUnicodeEscapeSequence(e,r)&&(n=e.lastIntValue),yn(n)?(e.lastIntValue=n,!0):(e.pos=t,!1)};function yn(e){return D(e,!0)||e===36||e===95}T.regexp_eatRegExpIdentifierPart=function(e){var t=e.pos,r=this.options.ecmaVersion>=11,n=e.current(r);return e.advance(r),n===92&&this.regexp_eatRegExpUnicodeEscapeSequence(e,r)&&(n=e.lastIntValue),_n(n)?(e.lastIntValue=n,!0):(e.pos=t,!1)};function _n(e){return P(e,!0)||e===36||e===95||e===8204||e===8205}T.regexp_eatAtomEscape=function(e){return this.regexp_eatBackReference(e)||this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)||e.switchN&&this.regexp_eatKGroupName(e)?!0:(e.switchU&&(e.current()===99&&e.raise("Invalid unicode escape"),e.raise("Invalid escape")),!1)},T.regexp_eatBackReference=function(e){var t=e.pos;if(this.regexp_eatDecimalEscape(e)){var r=e.lastIntValue;if(e.switchU)return r>e.maxBackReference&&(e.maxBackReference=r),!0;if(r<=e.numCapturingParens)return!0;e.pos=t}return!1},T.regexp_eatKGroupName=function(e){if(e.eat(107)){if(this.regexp_eatGroupName(e))return e.backReferenceNames.push(e.lastStringValue),!0;e.raise("Invalid named reference")}return!1},T.regexp_eatCharacterEscape=function(e){return this.regexp_eatControlEscape(e)||this.regexp_eatCControlLetter(e)||this.regexp_eatZero(e)||this.regexp_eatHexEscapeSequence(e)||this.regexp_eatRegExpUnicodeEscapeSequence(e,!1)||!e.switchU&&this.regexp_eatLegacyOctalEscapeSequence(e)||this.regexp_eatIdentityEscape(e)},T.regexp_eatCControlLetter=function(e){var t=e.pos;if(e.eat(99)){if(this.regexp_eatControlLetter(e))return!0;e.pos=t}return!1},T.regexp_eatZero=function(e){return e.current()===48&&!At(e.lookahead())?(e.lastIntValue=0,e.advance(),!0):!1},T.regexp_eatControlEscape=function(e){var t=e.current();return t===116?(e.lastIntValue=9,e.advance(),!0):t===110?(e.lastIntValue=10,e.advance(),!0):t===118?(e.lastIntValue=11,e.advance(),!0):t===102?(e.lastIntValue=12,e.advance(),!0):t===114?(e.lastIntValue=13,e.advance(),!0):!1},T.regexp_eatControlLetter=function(e){var t=e.current();return cr(t)?(e.lastIntValue=t%32,e.advance(),!0):!1};function cr(e){return e>=65&&e<=90||e>=97&&e<=122}T.regexp_eatRegExpUnicodeEscapeSequence=function(e,t){t===void 0&&(t=!1);var r=e.pos,n=t||e.switchU;if(e.eat(117)){if(this.regexp_eatFixedHexDigits(e,4)){var o=e.lastIntValue;if(n&&o>=55296&&o<=56319){var c=e.pos;if(e.eat(92)&&e.eat(117)&&this.regexp_eatFixedHexDigits(e,4)){var f=e.lastIntValue;if(f>=56320&&f<=57343)return e.lastIntValue=(o-55296)*1024+(f-56320)+65536,!0}e.pos=c,e.lastIntValue=o}return!0}if(n&&e.eat(123)&&this.regexp_eatHexDigits(e)&&e.eat(125)&&wn(e.lastIntValue))return!0;n&&e.raise("Invalid unicode escape"),e.pos=r}return!1};function wn(e){return e>=0&&e<=1114111}T.regexp_eatIdentityEscape=function(e){if(e.switchU)return this.regexp_eatSyntaxCharacter(e)?!0:e.eat(47)?(e.lastIntValue=47,!0):!1;var t=e.current();return t!==99&&(!e.switchN||t!==107)?(e.lastIntValue=t,e.advance(),!0):!1},T.regexp_eatDecimalEscape=function(e){e.lastIntValue=0;var t=e.current();if(t>=49&&t<=57){do e.lastIntValue=10*e.lastIntValue+(t-48),e.advance();while((t=e.current())>=48&&t<=57);return!0}return!1},T.regexp_eatCharacterClassEscape=function(e){var t=e.current();if(En(t))return e.lastIntValue=-1,e.advance(),!0;if(e.switchU&&this.options.ecmaVersion>=9&&(t===80||t===112)){if(e.lastIntValue=-1,e.advance(),e.eat(123)&&this.regexp_eatUnicodePropertyValueExpression(e)&&e.eat(125))return!0;e.raise("Invalid property name")}return!1};function En(e){return e===100||e===68||e===115||e===83||e===119||e===87}T.regexp_eatUnicodePropertyValueExpression=function(e){var t=e.pos;if(this.regexp_eatUnicodePropertyName(e)&&e.eat(61)){var r=e.lastStringValue;if(this.regexp_eatUnicodePropertyValue(e)){var n=e.lastStringValue;return this.regexp_validateUnicodePropertyNameAndValue(e,r,n),!0}}if(e.pos=t,this.regexp_eatLoneUnicodePropertyNameOrValue(e)){var o=e.lastStringValue;return this.regexp_validateUnicodePropertyNameOrValue(e,o),!0}return!1},T.regexp_validateUnicodePropertyNameAndValue=function(e,t,r){gt(e.unicodeProperties.nonBinary,t)||e.raise("Invalid property name"),e.unicodeProperties.nonBinary[t].test(r)||e.raise("Invalid property value")},T.regexp_validateUnicodePropertyNameOrValue=function(e,t){e.unicodeProperties.binary.test(t)||e.raise("Invalid property name")},T.regexp_eatUnicodePropertyName=function(e){var t=0;for(e.lastStringValue="";hr(t=e.current());)e.lastStringValue+=kt(t),e.advance();return e.lastStringValue!==""};function hr(e){return cr(e)||e===95}T.regexp_eatUnicodePropertyValue=function(e){var t=0;for(e.lastStringValue="";Sn(t=e.current());)e.lastStringValue+=kt(t),e.advance();return e.lastStringValue!==""};function Sn(e){return hr(e)||At(e)}T.regexp_eatLoneUnicodePropertyNameOrValue=function(e){return this.regexp_eatUnicodePropertyValue(e)},T.regexp_eatCharacterClass=function(e){if(e.eat(91)){if(e.eat(94),this.regexp_classRanges(e),e.eat(93))return!0;e.raise("Unterminated character class")}return!1},T.regexp_classRanges=function(e){for(;this.regexp_eatClassAtom(e);){var t=e.lastIntValue;if(e.eat(45)&&this.regexp_eatClassAtom(e)){var r=e.lastIntValue;e.switchU&&(t===-1||r===-1)&&e.raise("Invalid character class"),t!==-1&&r!==-1&&t>r&&e.raise("Range out of order in character class")}}},T.regexp_eatClassAtom=function(e){var t=e.pos;if(e.eat(92)){if(this.regexp_eatClassEscape(e))return!0;if(e.switchU){var r=e.current();(r===99||dr(r))&&e.raise("Invalid class escape"),e.raise("Invalid escape")}e.pos=t}var n=e.current();return n!==93?(e.lastIntValue=n,e.advance(),!0):!1},T.regexp_eatClassEscape=function(e){var t=e.pos;if(e.eat(98))return e.lastIntValue=8,!0;if(e.switchU&&e.eat(45))return e.lastIntValue=45,!0;if(!e.switchU&&e.eat(99)){if(this.regexp_eatClassControlLetter(e))return!0;e.pos=t}return this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)},T.regexp_eatClassControlLetter=function(e){var t=e.current();return At(t)||t===95?(e.lastIntValue=t%32,e.advance(),!0):!1},T.regexp_eatHexEscapeSequence=function(e){var t=e.pos;if(e.eat(120)){if(this.regexp_eatFixedHexDigits(e,2))return!0;e.switchU&&e.raise("Invalid escape"),e.pos=t}return!1},T.regexp_eatDecimalDigits=function(e){var t=e.pos,r=0;for(e.lastIntValue=0;At(r=e.current());)e.lastIntValue=10*e.lastIntValue+(r-48),e.advance();return e.pos!==t};function At(e){return e>=48&&e<=57}T.regexp_eatHexDigits=function(e){var t=e.pos,r=0;for(e.lastIntValue=0;fr(r=e.current());)e.lastIntValue=16*e.lastIntValue+pr(r),e.advance();return e.pos!==t};function fr(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}function pr(e){return e>=65&&e<=70?10+(e-65):e>=97&&e<=102?10+(e-97):e-48}T.regexp_eatLegacyOctalEscapeSequence=function(e){if(this.regexp_eatOctalDigit(e)){var t=e.lastIntValue;if(this.regexp_eatOctalDigit(e)){var r=e.lastIntValue;t<=3&&this.regexp_eatOctalDigit(e)?e.lastIntValue=t*64+r*8+e.lastIntValue:e.lastIntValue=t*8+r}else e.lastIntValue=t;return!0}return!1},T.regexp_eatOctalDigit=function(e){var t=e.current();return dr(t)?(e.lastIntValue=t-48,e.advance(),!0):(e.lastIntValue=0,!1)};function dr(e){return e>=48&&e<=55}T.regexp_eatFixedHexDigits=function(e,t){var r=e.pos;e.lastIntValue=0;for(var n=0;n<t;++n){var o=e.current();if(!fr(o))return e.pos=r,!1;e.lastIntValue=16*e.lastIntValue+pr(o),e.advance()}return!0};var ii=function(t){this.type=t.type,this.value=t.value,this.start=t.start,this.end=t.end,t.options.locations&&(this.loc=new yt(t,t.startLoc,t.endLoc)),t.options.ranges&&(this.range=[t.start,t.end])},j=H.prototype;j.next=function(e){!e&&this.type.keyword&&this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword "+this.type.keyword),this.options.onToken&&this.options.onToken(new ii(this)),this.lastTokEnd=this.end,this.lastTokStart=this.start,this.lastTokEndLoc=this.endLoc,this.lastTokStartLoc=this.startLoc,this.nextToken()},j.getToken=function(){return this.next(),new ii(this)},typeof Symbol!="undefined"&&(j[Symbol.iterator]=function(){var e=this;return{next:function(){var t=e.getToken();return{done:t.type===l.eof,value:t}}}}),j.curContext=function(){return this.context[this.context.length-1]},j.nextToken=function(){var e=this.curContext();if((!e||!e.preserveSpace)&&this.skipSpace(),this.start=this.pos,this.options.locations&&(this.startLoc=this.curPosition()),this.pos>=this.input.length)return this.finishToken(l.eof);if(e.override)return e.override(this);this.readToken(this.fullCharCodeAtPos())},j.readToken=function(e){return D(e,this.options.ecmaVersion>=6)||e===92?this.readWord():this.getTokenFromCode(e)},j.fullCharCodeAtPos=function(){var e=this.input.charCodeAt(this.pos);if(e<=55295||e>=57344)return e;var t=this.input.charCodeAt(this.pos+1);return(e<<10)+t-56613888},j.skipBlockComment=function(){var e=this.options.onComment&&this.curPosition(),t=this.pos,r=this.input.indexOf("*/",this.pos+=2);if(r===-1&&this.raise(this.pos-2,"Unterminated comment"),this.pos=r+2,this.options.locations){pe.lastIndex=t;for(var n;(n=pe.exec(this.input))&&n.index<this.pos;)++this.curLine,this.lineStart=n.index+n[0].length}this.options.onComment&&this.options.onComment(!0,this.input.slice(t+2,r),t,this.pos,e,this.curPosition())},j.skipLineComment=function(e){for(var t=this.pos,r=this.options.onComment&&this.curPosition(),n=this.input.charCodeAt(this.pos+=e);this.pos<this.input.length&&!W(n);)n=this.input.charCodeAt(++this.pos);this.options.onComment&&this.options.onComment(!1,this.input.slice(t+e,this.pos),t,this.pos,r,this.curPosition())},j.skipSpace=function(){e:for(;this.pos<this.input.length;){var e=this.input.charCodeAt(this.pos);switch(e){case 32:case 160:++this.pos;break;case 13:this.input.charCodeAt(this.pos+1)===10&&++this.pos;case 10:case 8232:case 8233:++this.pos,this.options.locations&&(++this.curLine,this.lineStart=this.pos);break;case 47:switch(this.input.charCodeAt(this.pos+1)){case 42:this.skipBlockComment();break;case 47:this.skipLineComment(2);break;default:break e}break;default:if(e>8&&e<14||e>=5760&&ie.test(String.fromCharCode(e)))++this.pos;else break e}}},j.finishToken=function(e,t){this.end=this.pos,this.options.locations&&(this.endLoc=this.curPosition());var r=this.type;this.type=e,this.value=t,this.updateContext(r)},j.readToken_dot=function(){var e=this.input.charCodeAt(this.pos+1);if(e>=48&&e<=57)return this.readNumber(!0);var t=this.input.charCodeAt(this.pos+2);return this.options.ecmaVersion>=6&&e===46&&t===46?(this.pos+=3,this.finishToken(l.ellipsis)):(++this.pos,this.finishToken(l.dot))},j.readToken_slash=function(){var e=this.input.charCodeAt(this.pos+1);return this.exprAllowed?(++this.pos,this.readRegexp()):e===61?this.finishOp(l.assign,2):this.finishOp(l.slash,1)},j.readToken_mult_modulo_exp=function(e){var t=this.input.charCodeAt(this.pos+1),r=1,n=e===42?l.star:l.modulo;return this.options.ecmaVersion>=7&&e===42&&t===42&&(++r,n=l.starstar,t=this.input.charCodeAt(this.pos+2)),t===61?this.finishOp(l.assign,r+1):this.finishOp(n,r)},j.readToken_pipe_amp=function(e){var t=this.input.charCodeAt(this.pos+1);if(t===e){if(this.options.ecmaVersion>=12){var r=this.input.charCodeAt(this.pos+2);if(r===61)return this.finishOp(l.assign,3)}return this.finishOp(e===124?l.logicalOR:l.logicalAND,2)}return t===61?this.finishOp(l.assign,2):this.finishOp(e===124?l.bitwiseOR:l.bitwiseAND,1)},j.readToken_caret=function(){var e=this.input.charCodeAt(this.pos+1);return e===61?this.finishOp(l.assign,2):this.finishOp(l.bitwiseXOR,1)},j.readToken_plus_min=function(e){var t=this.input.charCodeAt(this.pos+1);return t===e?t===45&&!this.inModule&&this.input.charCodeAt(this.pos+2)===62&&(this.lastTokEnd===0||$.test(this.input.slice(this.lastTokEnd,this.pos)))?(this.skipLineComment(3),this.skipSpace(),this.nextToken()):this.finishOp(l.incDec,2):t===61?this.finishOp(l.assign,2):this.finishOp(l.plusMin,1)},j.readToken_lt_gt=function(e){var t=this.input.charCodeAt(this.pos+1),r=1;return t===e?(r=e===62&&this.input.charCodeAt(this.pos+2)===62?3:2,this.input.charCodeAt(this.pos+r)===61?this.finishOp(l.assign,r+1):this.finishOp(l.bitShift,r)):t===33&&e===60&&!this.inModule&&this.input.charCodeAt(this.pos+2)===45&&this.input.charCodeAt(this.pos+3)===45?(this.skipLineComment(4),this.skipSpace(),this.nextToken()):(t===61&&(r=2),this.finishOp(l.relational,r))},j.readToken_eq_excl=function(e){var t=this.input.charCodeAt(this.pos+1);return t===61?this.finishOp(l.equality,this.input.charCodeAt(this.pos+2)===61?3:2):e===61&&t===62&&this.options.ecmaVersion>=6?(this.pos+=2,this.finishToken(l.arrow)):this.finishOp(e===61?l.eq:l.prefix,1)},j.readToken_question=function(){var e=this.options.ecmaVersion;if(e>=11){var t=this.input.charCodeAt(this.pos+1);if(t===46){var r=this.input.charCodeAt(this.pos+2);if(r<48||r>57)return this.finishOp(l.questionDot,2)}if(t===63){if(e>=12){var n=this.input.charCodeAt(this.pos+2);if(n===61)return this.finishOp(l.assign,3)}return this.finishOp(l.coalesce,2)}}return this.finishOp(l.question,1)},j.getTokenFromCode=function(e){switch(e){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(l.parenL);case 41:return++this.pos,this.finishToken(l.parenR);case 59:return++this.pos,this.finishToken(l.semi);case 44:return++this.pos,this.finishToken(l.comma);case 91:return++this.pos,this.finishToken(l.bracketL);case 93:return++this.pos,this.finishToken(l.bracketR);case 123:return++this.pos,this.finishToken(l.braceL);case 125:return++this.pos,this.finishToken(l.braceR);case 58:return++this.pos,this.finishToken(l.colon);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(l.backQuote);case 48:var t=this.input.charCodeAt(this.pos+1);if(t===120||t===88)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(t===111||t===79)return this.readRadixNumber(8);if(t===98||t===66)return this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(!1);case 34:case 39:return this.readString(e);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(e);case 124:case 38:return this.readToken_pipe_amp(e);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(e);case 60:case 62:return this.readToken_lt_gt(e);case 61:case 33:return this.readToken_eq_excl(e);case 63:return this.readToken_question();case 126:return this.finishOp(l.prefix,1)}this.raise(this.pos,"Unexpected character '"+ri(e)+"'")},j.finishOp=function(e,t){var r=this.input.slice(this.pos,this.pos+t);return this.pos+=t,this.finishToken(e,r)},j.readRegexp=function(){for(var e,t,r=this.pos;;){this.pos>=this.input.length&&this.raise(r,"Unterminated regular expression");var n=this.input.charAt(this.pos);if($.test(n)&&this.raise(r,"Unterminated regular expression"),e)e=!1;else{if(n==="[")t=!0;else if(n==="]"&&t)t=!1;else if(n==="/"&&!t)break;e=n==="\\"}++this.pos}var o=this.input.slice(r,this.pos);++this.pos;var c=this.pos,f=this.readWord1();this.containsEsc&&this.unexpected(c);var m=this.regexpState||(this.regexpState=new xe(this));m.reset(r,o,f),this.validateRegExpFlags(m),this.validateRegExpPattern(m);var b=null;try{b=new RegExp(o,f)}catch(g){}return this.finishToken(l.regexp,{pattern:o,flags:f,value:b})},j.readInt=function(e,t,r){for(var n=this.options.ecmaVersion>=12&&t===void 0,o=r&&this.input.charCodeAt(this.pos)===48,c=this.pos,f=0,m=0,b=0,g=t??Infinity;b<g;++b,++this.pos){var k=this.input.charCodeAt(this.pos),R=void 0;if(n&&k===95){o&&this.raiseRecoverable(this.pos,"Numeric separator is not allowed in legacy octal numeric literals"),m===95&&this.raiseRecoverable(this.pos,"Numeric separator must be exactly one underscore"),b===0&&this.raiseRecoverable(this.pos,"Numeric separator is not allowed at the first of digits"),m=k;continue}if(k>=97?R=k-97+10:k>=65?R=k-65+10:k>=48&&k<=57?R=k-48:R=Infinity,R>=e)break;m=k,f=f*e+R}return n&&m===95&&this.raiseRecoverable(this.pos-1,"Numeric separator is not allowed at the last of digits"),this.pos===c||t!=null&&this.pos-c!==t?null:f};function Cn(e,t){return t?parseInt(e,8):parseFloat(e.replace(/_/g,""))}function mr(e){return typeof BigInt!="function"?null:BigInt(e.replace(/_/g,""))}j.readRadixNumber=function(e){var t=this.pos;this.pos+=2;var r=this.readInt(e);return r==null&&this.raise(this.start+2,"Expected number in radix "+e),this.options.ecmaVersion>=11&&this.input.charCodeAt(this.pos)===110?(r=mr(this.input.slice(t,this.pos)),++this.pos):D(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(l.num,r)},j.readNumber=function(e){var t=this.pos;!e&&this.readInt(10,void 0,!0)===null&&this.raise(t,"Invalid number");var r=this.pos-t>=2&&this.input.charCodeAt(t)===48;r&&this.strict&&this.raise(t,"Invalid number");var n=this.input.charCodeAt(this.pos);if(!r&&!e&&this.options.ecmaVersion>=11&&n===110){var o=mr(this.input.slice(t,this.pos));return++this.pos,D(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(l.num,o)}r&&/[89]/.test(this.input.slice(t,this.pos))&&(r=!1),n===46&&!r&&(++this.pos,this.readInt(10),n=this.input.charCodeAt(this.pos)),(n===69||n===101)&&!r&&(n=this.input.charCodeAt(++this.pos),(n===43||n===45)&&++this.pos,this.readInt(10)===null&&this.raise(t,"Invalid number")),D(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number");var c=Cn(this.input.slice(t,this.pos),r);return this.finishToken(l.num,c)},j.readCodePoint=function(){var e=this.input.charCodeAt(this.pos),t;if(e===123){this.options.ecmaVersion<6&&this.unexpected();var r=++this.pos;t=this.readHexChar(this.input.indexOf("}",this.pos)-this.pos),++this.pos,t>1114111&&this.invalidStringToken(r,"Code point out of bounds")}else t=this.readHexChar(4);return t};function ri(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10)+55296,(e&1023)+56320))}j.readString=function(e){for(var t="",r=++this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");var n=this.input.charCodeAt(this.pos);if(n===e)break;n===92?(t+=this.input.slice(r,this.pos),t+=this.readEscapedChar(!1),r=this.pos):(W(n,this.options.ecmaVersion>=10)&&this.raise(this.start,"Unterminated string constant"),++this.pos)}return t+=this.input.slice(r,this.pos++),this.finishToken(l.string,t)};var xr={};j.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(e){if(e===xr)this.readInvalidTemplateToken();else throw e}this.inTemplateElement=!1},j.invalidStringToken=function(e,t){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw xr;this.raise(e,t)},j.readTmplToken=function(){for(var e="",t=this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated template");var r=this.input.charCodeAt(this.pos);if(r===96||r===36&&this.input.charCodeAt(this.pos+1)===123)return this.pos===this.start&&(this.type===l.template||this.type===l.invalidTemplate)?r===36?(this.pos+=2,this.finishToken(l.dollarBraceL)):(++this.pos,this.finishToken(l.backQuote)):(e+=this.input.slice(t,this.pos),this.finishToken(l.template,e));if(r===92)e+=this.input.slice(t,this.pos),e+=this.readEscapedChar(!0),t=this.pos;else if(W(r)){switch(e+=this.input.slice(t,this.pos),++this.pos,r){case 13:this.input.charCodeAt(this.pos)===10&&++this.pos;case 10:e+=`
  `;break;default:e+=String.fromCharCode(r);break}this.options.locations&&(++this.curLine,this.lineStart=this.pos),t=this.pos}else++this.pos}},j.readInvalidTemplateToken=function(){for(;this.pos<this.input.length;this.pos++)switch(this.input[this.pos]){case"\\":++this.pos;break;case"$":if(this.input[this.pos+1]!=="{")break;case"`":return this.finishToken(l.invalidTemplate,this.input.slice(this.start,this.pos))}this.raise(this.start,"Unterminated template")},j.readEscapedChar=function(e){var t=this.input.charCodeAt(++this.pos);switch(++this.pos,t){case 110:return`
  `;case 114:return"\r";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return ri(this.readCodePoint());case 116:return"	";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:this.input.charCodeAt(this.pos)===10&&++this.pos;case 10:return this.options.locations&&(this.lineStart=this.pos,++this.curLine),"";case 56:case 57:if(e){var r=this.pos-1;return this.invalidStringToken(r,"Invalid escape sequence in template string"),null}default:if(t>=48&&t<=55){var n=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],o=parseInt(n,8);return o>255&&(n=n.slice(0,-1),o=parseInt(n,8)),this.pos+=n.length-1,t=this.input.charCodeAt(this.pos),(n!=="0"||t===56||t===57)&&(this.strict||e)&&this.invalidStringToken(this.pos-1-n.length,e?"Octal literal in template string":"Octal literal in strict mode"),String.fromCharCode(o)}return W(t)?"":String.fromCharCode(t)}},j.readHexChar=function(e){var t=this.pos,r=this.readInt(16,e);return r===null&&this.invalidStringToken(t,"Bad character escape sequence"),r},j.readWord1=function(){this.containsEsc=!1;for(var e="",t=!0,r=this.pos,n=this.options.ecmaVersion>=6;this.pos<this.input.length;){var o=this.fullCharCodeAtPos();if(P(o,n))this.pos+=o<=65535?1:2;else if(o===92){this.containsEsc=!0,e+=this.input.slice(r,this.pos);var c=this.pos;this.input.charCodeAt(++this.pos)!==117&&this.invalidStringToken(this.pos,"Expecting Unicode escape sequence \\uXXXX"),++this.pos;var f=this.readCodePoint();(t?D:P)(f,n)||this.invalidStringToken(c,"Invalid Unicode escape"),e+=ri(f),r=this.pos}else break;t=!1}return e+this.input.slice(r,this.pos)},j.readWord=function(){var e=this.readWord1(),t=l.name;return this.keywords.test(e)&&(t=_[e]),this.finishToken(t,e)};var kn="7.4.1";H.acorn={Parser:H,version:kn,defaultOptions:Yt,Position:ze,SourceLocation:yt,getLineInfo:_t,Node:ei,TokenType:A,tokTypes:l,keywordTypes:_,TokContext:oe,tokContexts:z,isIdentifierChar:P,isIdentifierStart:D,Token:ii,isNewLine:W,lineBreak:$,lineBreakG:pe,nonASCIIwhitespace:ie};var br=new Set(["Array","ArrayBuffer","atob","AudioContext","Blob","Boolean","BigInt","btoa","clearInterval","clearTimeout","console","crypto","CustomEvent","DataView","Date","decodeURI","decodeURIComponent","devicePixelRatio","document","encodeURI","encodeURIComponent","Error","escape","eval","fetch","File","FileList","FileReader","Float32Array","Float64Array","Function","Headers","Image","ImageData","Infinity","Int16Array","Int32Array","Int8Array","Intl","isFinite","isNaN","JSON","Map","Math","NaN","Number","navigator","Object","parseFloat","parseInt","performance","Path2D","Promise","Proxy","RangeError","ReferenceError","Reflect","RegExp","cancelAnimationFrame","requestAnimationFrame","Set","setInterval","setTimeout","String","Symbol","SyntaxError","TextDecoder","TextEncoder","this","TypeError","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray","undefined","unescape","URIError","URL","WeakMap","WeakSet","WebSocket","Worker","window"]);function si(e,t,r,n,o){r||(r=y),function c(f,m,b){var g=b||f.type,k=t[g];r[g](f,m,c),k&&k(f,m)}(e,n,o)}function Tt(e,t,r,n){var o=[];r||(r=y),function c(f,m,b){var g=b||f.type,k=t[g],R=f!==o[o.length-1];R&&o.push(f),r[g](f,m,c),k&&k(f,m||o,o),R&&o.pop()}(e,n)}var An=Object.create||function(e){function t(){}return t.prototype=e,new t};function Tn(e,t){var r=An(t||y);for(var n in e)r[n]=e[n];return r}function ni(e,t,r){r(e,t)}function Pe(e,t,r){}var y={};y.Program=y.BlockStatement=function(e,t,r){for(var n=0,o=e.body;n<o.length;n+=1){var c=o[n];r(c,t,"Statement")}},y.Statement=ni,y.EmptyStatement=Pe,y.ExpressionStatement=y.ParenthesizedExpression=function(e,t,r){return r(e.expression,t,"Expression")},y.IfStatement=function(e,t,r){r(e.test,t,"Expression"),r(e.consequent,t,"Statement"),e.alternate&&r(e.alternate,t,"Statement")},y.LabeledStatement=function(e,t,r){return r(e.body,t,"Statement")},y.BreakStatement=y.ContinueStatement=Pe,y.WithStatement=function(e,t,r){r(e.object,t,"Expression"),r(e.body,t,"Statement")},y.SwitchStatement=function(e,t,r){r(e.discriminant,t,"Expression");for(var n=0,o=e.cases;n<o.length;n+=1){var c=o[n];c.test&&r(c.test,t,"Expression");for(var f=0,m=c.consequent;f<m.length;f+=1){var b=m[f];r(b,t,"Statement")}}},y.SwitchCase=function(e,t,r){e.test&&r(e.test,t,"Expression");for(var n=0,o=e.consequent;n<o.length;n+=1){var c=o[n];r(c,t,"Statement")}},y.ReturnStatement=y.YieldExpression=y.AwaitExpression=function(e,t,r){e.argument&&r(e.argument,t,"Expression")},y.ThrowStatement=y.SpreadElement=function(e,t,r){return r(e.argument,t,"Expression")},y.TryStatement=function(e,t,r){r(e.block,t,"Statement"),e.handler&&r(e.handler,t),e.finalizer&&r(e.finalizer,t,"Statement")},y.CatchClause=function(e,t,r){e.param&&r(e.param,t,"Pattern"),r(e.body,t,"Statement")},y.WhileStatement=y.DoWhileStatement=function(e,t,r){r(e.test,t,"Expression"),r(e.body,t,"Statement")},y.ForStatement=function(e,t,r){e.init&&r(e.init,t,"ForInit"),e.test&&r(e.test,t,"Expression"),e.update&&r(e.update,t,"Expression"),r(e.body,t,"Statement")},y.ForInStatement=y.ForOfStatement=function(e,t,r){r(e.left,t,"ForInit"),r(e.right,t,"Expression"),r(e.body,t,"Statement")},y.ForInit=function(e,t,r){e.type==="VariableDeclaration"?r(e,t):r(e,t,"Expression")},y.DebuggerStatement=Pe,y.FunctionDeclaration=function(e,t,r){return r(e,t,"Function")},y.VariableDeclaration=function(e,t,r){for(var n=0,o=e.declarations;n<o.length;n+=1){var c=o[n];r(c,t)}},y.VariableDeclarator=function(e,t,r){r(e.id,t,"Pattern"),e.init&&r(e.init,t,"Expression")},y.Function=function(e,t,r){e.id&&r(e.id,t,"Pattern");for(var n=0,o=e.params;n<o.length;n+=1){var c=o[n];r(c,t,"Pattern")}r(e.body,t,e.expression?"Expression":"Statement")},y.Pattern=function(e,t,r){e.type==="Identifier"?r(e,t,"VariablePattern"):e.type==="MemberExpression"?r(e,t,"MemberPattern"):r(e,t)},y.VariablePattern=Pe,y.MemberPattern=ni,y.RestElement=function(e,t,r){return r(e.argument,t,"Pattern")},y.ArrayPattern=function(e,t,r){for(var n=0,o=e.elements;n<o.length;n+=1){var c=o[n];c&&r(c,t,"Pattern")}},y.ObjectPattern=function(e,t,r){for(var n=0,o=e.properties;n<o.length;n+=1){var c=o[n];c.type==="Property"?(c.computed&&r(c.key,t,"Expression"),r(c.value,t,"Pattern")):c.type==="RestElement"&&r(c.argument,t,"Pattern")}},y.Expression=ni,y.ThisExpression=y.Super=y.MetaProperty=Pe,y.ArrayExpression=function(e,t,r){for(var n=0,o=e.elements;n<o.length;n+=1){var c=o[n];c&&r(c,t,"Expression")}},y.ObjectExpression=function(e,t,r){for(var n=0,o=e.properties;n<o.length;n+=1){var c=o[n];r(c,t)}},y.FunctionExpression=y.ArrowFunctionExpression=y.FunctionDeclaration,y.SequenceExpression=function(e,t,r){for(var n=0,o=e.expressions;n<o.length;n+=1){var c=o[n];r(c,t,"Expression")}},y.TemplateLiteral=function(e,t,r){for(var n=0,o=e.quasis;n<o.length;n+=1){var c=o[n];r(c,t)}for(var f=0,m=e.expressions;f<m.length;f+=1){var b=m[f];r(b,t,"Expression")}},y.TemplateElement=Pe,y.UnaryExpression=y.UpdateExpression=function(e,t,r){r(e.argument,t,"Expression")},y.BinaryExpression=y.LogicalExpression=function(e,t,r){r(e.left,t,"Expression"),r(e.right,t,"Expression")},y.AssignmentExpression=y.AssignmentPattern=function(e,t,r){r(e.left,t,"Pattern"),r(e.right,t,"Expression")},y.ConditionalExpression=function(e,t,r){r(e.test,t,"Expression"),r(e.consequent,t,"Expression"),r(e.alternate,t,"Expression")},y.NewExpression=y.CallExpression=function(e,t,r){if(r(e.callee,t,"Expression"),e.arguments)for(var n=0,o=e.arguments;n<o.length;n+=1){var c=o[n];r(c,t,"Expression")}},y.MemberExpression=function(e,t,r){r(e.object,t,"Expression"),e.computed&&r(e.property,t,"Expression")},y.ExportNamedDeclaration=y.ExportDefaultDeclaration=function(e,t,r){e.declaration&&r(e.declaration,t,e.type==="ExportNamedDeclaration"||e.declaration.id?"Statement":"Expression"),e.source&&r(e.source,t,"Expression")},y.ExportAllDeclaration=function(e,t,r){r(e.source,t,"Expression")},y.ImportDeclaration=function(e,t,r){for(var n=0,o=e.specifiers;n<o.length;n+=1){var c=o[n];r(c,t)}r(e.source,t,"Expression")},y.ImportExpression=function(e,t,r){r(e.source,t,"Expression")},y.ImportSpecifier=y.ImportDefaultSpecifier=y.ImportNamespaceSpecifier=y.Identifier=y.Literal=Pe,y.TaggedTemplateExpression=function(e,t,r){r(e.tag,t,"Expression"),r(e.quasi,t,"Expression")},y.ClassDeclaration=y.ClassExpression=function(e,t,r){return r(e,t,"Class")},y.Class=function(e,t,r){e.id&&r(e.id,t,"Pattern"),e.superClass&&r(e.superClass,t,"Expression"),r(e.body,t)},y.ClassBody=function(e,t,r){for(var n=0,o=e.body;n<o.length;n+=1){var c=o[n];r(c,t)}},y.MethodDefinition=y.Property=function(e,t,r){e.computed&&r(e.key,t,"Expression"),r(e.value,t,"Expression")};var _e=Tn({Import(){},ViewExpression(e,t,r){r(e.id,t,"Identifier")},MutableExpression(e,t,r){r(e.id,t,"Identifier")}});function It(e){return e.type==="FunctionExpression"||e.type==="FunctionDeclaration"||e.type==="ArrowFunctionExpression"||e.type==="Program"}function In(e){return e.type==="BlockStatement"||e.type==="ForInStatement"||e.type==="ForOfStatement"||e.type==="ForStatement"||It(e)}function Nn(e){return e.type==="FunctionExpression"||e.type==="FunctionDeclaration"}function Pn(e,t){let r={type:"Program",body:[e.body]},n=new Map,o=new Set(t),c=[];function f(S,L){let B=n.get(S);return B?B.has(L):!1}function m(S,L){let B=n.get(S);B?B.add(L.name):n.set(S,new Set([L.name]))}function b(S){S.id&&m(S,S.id)}function g(S){S.params.forEach(L=>R(L,S)),S.id&&m(S,S.id)}function k(S){S.param&&R(S.param,S)}function R(S,L){switch(S.type){case"Identifier":m(L,S);break;case"ObjectPattern":S.properties.forEach(B=>R(B,L));break;case"ArrayPattern":S.elements.forEach(B=>B&&R(B,L));break;case"Property":R(S.value,L);break;case"RestElement":R(S.argument,L);break;case"AssignmentPattern":R(S.left,L);break;default:throw new Error("Unrecognized pattern type: "+S.type)}}function Y(S){m(r,S.local)}Tt(r,{VariableDeclaration:(S,L)=>{let B=null;for(let U=L.length-1;U>=0&&B===null;--U)(S.kind==="var"?It(L[U]):In(L[U]))&&(B=L[U]);S.declarations.forEach(U=>R(U.id,B))},FunctionDeclaration:(S,L)=>{let B=null;for(let U=L.length-2;U>=0&&B===null;--U)It(L[U])&&(B=L[U]);m(B,S.id),g(S)},Function:g,ClassDeclaration:(S,L)=>{let B=null;for(let U=L.length-2;U>=0&&B===null;U--)It(L[U])&&(B=L[U]);m(B,S.id)},Class:b,CatchClause:k,ImportDefaultSpecifier:Y,ImportSpecifier:Y,ImportNamespaceSpecifier:Y},_e);function J(S,L){let B=S.name;if(B!=="undefined"){for(let U=L.length-2;U>=0;--U){if(B==="arguments"&&Nn(L[U])||f(L[U],B))return;L[U].type==="ViewExpression"&&(S=L[U],B=`viewof ${S.id.name}`),L[U].type==="MutableExpression"&&(S=L[U],B=`mutable ${S.id.name}`)}if(!o.has(B)){if(B==="arguments")throw Object.assign(new SyntaxError("arguments is not allowed"),{node:S});c.push(S)}}}Tt(r,{VariablePattern:J,Identifier:J},_e);function K(S,L){switch(S.type){case"Identifier":case"VariablePattern":{B(S,L);break}case"ArrayPattern":case"ObjectPattern":{Tt(S,{Identifier:B,VariablePattern:B},_e);break}}function B(U,Nr){for(let Xn of L)if(f(Xn,U.name))return;if(Nr[Nr.length-2].type!=="MutableExpression")throw Object.assign(new SyntaxError(`Assignment to constant variable ${U.name}`),{node:U})}}function G(S,L){K(S.argument,L)}function Q(S,L){K(S.left,L)}return Tt(r,{AssignmentExpression:Q,UpdateExpression:G,ForOfStatement:Q,ForInStatement:Q},_e),c}function ai(e,t){let r={type:"Program",body:[e.body]},n=new Map,{references:o}=e;return si(r,{CallExpression:c=>{let{callee:f,arguments:m}=c;if(f.type!=="Identifier"||f.name!==t||o.indexOf(f)<0)return;if(m.length!==1||!(m[0].type==="Literal"&&/^['"]/.test(m[0].raw)||m[0].type==="TemplateLiteral"&&m[0].expressions.length===0))throw Object.assign(new SyntaxError(`${t} requires a single literal string argument`),{node:c});let[b]=m,g=b.type==="Literal"?b.value:b.quasis[0].value.cooked,k={start:b.start,end:b.end};n.has(g)?n.get(g).push(k):n.set(g,[k])}},_e),n}let oi=2,Ln=4,On=8,ui=Symbol("start"),vr=Symbol("modifier"),gr=Symbol("function"),yr=Symbol("name");function li(e,{globals:t}={}){let r=Xe.parse(e);return wr(r,e,t),Er(r),r}function Mn(e){let t=ui,r;try{for(let n of H.tokenizer(e,{ecmaVersion:11})){switch(t){case ui:case vr:{if(n.type===l.name){if(t===ui&&(n.value==="viewof"||n.value==="mutable"||n.value==="async")){t=vr;continue}t=yr,r=n;continue}if(n.type===l._function||n.type===l._class){t=gr;continue}break}case yr:{if(n.type===l.eq)return r.value;break}case gr:{if(n.type===l.star)continue;if(n.type===l.name&&n.end<e.length)return n.value;break}}return}}catch(n){return}}class Xe extends H{constructor(t,...r){super(Object.assign({ecmaVersion:12},t),...r)}enterScope(t){return t&oi&&++this.O_function,super.enterScope(t)}exitScope(){return this.currentScope().flags&oi&&--this.O_function,super.exitScope()}parseForIn(t,r){return this.O_function===1&&t.await&&(this.O_async=!0),super.parseForIn(t,r)}parseAwait(){return this.O_function===1&&(this.O_async=!0),super.parseAwait()}parseYield(t){return this.O_function===1&&(this.O_generator=!0),super.parseYield(t)}parseImport(t){return this.next(),t.specifiers=this.parseImportSpecifiers(),this.type===l._with&&(this.next(),t.injections=this.parseImportSpecifiers()),this.expectContextual("from"),t.source=this.type===l.string?this.parseExprAtom():this.unexpected(),this.finishNode(t,"ImportDeclaration")}parseImportSpecifiers(){let t=[],r=new Set,n=!0;for(this.expect(l.braceL);!this.eat(l.braceR);){if(n)n=!1;else if(this.expect(l.comma),this.afterTrailingComma(l.braceR))break;let o=this.startNode();o.view=this.eatContextual("viewof"),o.mutable=o.view?!1:this.eatContextual("mutable"),o.imported=this.parseIdent(),this.checkUnreserved(o.imported),this.checkLocal(o.imported),this.eatContextual("as")?(o.local=this.parseIdent(),this.checkUnreserved(o.local),this.checkLocal(o.local)):o.local=o.imported,this.checkLVal(o.local,"let"),r.has(o.local.name)&&this.raise(o.local.start,`Identifier '${o.local.name}' has already been declared`),r.add(o.local.name),t.push(this.finishNode(o,"ImportSpecifier"))}return t}parseExprAtom(t){return this.parseMaybeKeywordExpression("viewof","ViewExpression")||this.parseMaybeKeywordExpression("mutable","MutableExpression")||super.parseExprAtom(t)}parseCell(t,r){let n=new Xe({},this.input,this.start),o=n.getToken(),c=null,f=null;return this.O_function=0,this.O_async=!1,this.O_generator=!1,this.strict=!0,this.enterScope(oi|Ln|On),o.type===l._import&&n.getToken().type!==l.parenL?c=this.parseImport(this.startNode()):o.type!==l.eof&&o.type!==l.semi&&(o.type===l.name&&((o.value==="viewof"||o.value==="mutable")&&(o=n.getToken(),o.type!==l.name&&n.unexpected()),o=n.getToken(),o.type===l.eq&&(f=this.parseMaybeKeywordExpression("viewof","ViewExpression")||this.parseMaybeKeywordExpression("mutable","MutableExpression")||this.parseIdent(),o=n.getToken(),this.expect(l.eq))),o.type===l.braceL?c=this.parseBlock():(c=this.parseExpression(),f===null&&(c.type==="FunctionExpression"||c.type==="ClassExpression")&&(f=c.id))),this.semicolon(),r&&this.expect(l.eof),f&&this.checkLocal(f),t.id=f,t.async=this.O_async,t.generator=this.O_generator,t.body=c,this.exitScope(),this.finishNode(t,"Cell")}parseTopLevel(t){return this.parseCell(t,!0)}toAssignable(t,r,n){return t.type==="MutableExpression"?t:super.toAssignable(t,r,n)}checkLocal(t){let r=t.id||t;(br.has(r.name)||r.name==="arguments")&&this.raise(r.start,`Identifier '${r.name}' is reserved`)}checkUnreserved(t){return(t.name==="viewof"||t.name==="mutable")&&this.raise(t.start,`Unexpected keyword '${t.name}'`),super.checkUnreserved(t)}checkLVal(t,r,n){return super.checkLVal(t.type==="MutableExpression"?t.id:t,r,n)}unexpected(t){this.raise(t??this.start,this.type===l.eof?"Unexpected end of input":"Unexpected token")}parseMaybeKeywordExpression(t,r){if(this.isContextual(t)){let n=this.startNode();return this.next(),n.id=this.parseIdent(),this.finishNode(n,r)}}}function ci(e,{globals:t}={}){let r=_r.parse(e);for(let n of r.cells)wr(n,e,t),Er(n,e);return r}class _r extends Xe{parseTopLevel(t){for(t.cells||(t.cells=[]);this.type!==l.eof;){let r=this.parseCell(this.startNode());r.input=this.input,t.cells.push(r)}return this.next(),this.finishNode(t,"Program")}}function wr(e,t,r=br){if(e.body&&e.body.type!=="ImportDeclaration")try{e.references=Pn(e,r)}catch(n){if(n.node){let o=_t(t,n.node.start);n.message+=` (${o.line}:${o.column})`,n.pos=n.node.start,n.loc=o,delete n.node}throw n}return e}function Er(e,t){if(e.body&&e.body.type!=="ImportDeclaration")try{e.fileAttachments=ai(e,"FileAttachment"),e.databaseClients=ai(e,"DatabaseClient"),e.secrets=ai(e,"Secret")}catch(r){if(r.node){let n=_t(t,r.node.start);r.message+=` (${n.line}:${n.column})`,r.pos=r.node.start,r.loc=n,delete r.node}throw r}else e.fileAttachments=new Map,e.databaseClients=new Map,e.secrets=new Map;return e}var Rn=Object.freeze({__proto__:null,parseCell:li,peekId:Mn,CellParser:Xe,parseModule:ci,ModuleParser:_r,walk:_e});let Sr=e=>{let t=e,r;return(r=/\.js(\?|$)/i.exec(t))&&(t=t.slice(0,r.index)),(r=/^[0-9a-f]{16}$/i.test(t))&&(t=`d/${t}`),(r=/^https:\/\/(api\.|beta\.|)observablehq\.com\//i.exec(t))&&(t=t.slice(r[0].length)),t};function Cr(e){let t=[];if(e.body.specifiers)for(let c of e.body.specifiers)c.view?t.push({name:"viewof "+c.imported.name,alias:"viewof "+c.local.name}):c.mutable&&t.push({name:"mutable "+c.imported.name,alias:"mutable "+c.local.name}),t.push({name:c.imported.name,alias:c.local.name});let r=e.body.injections!==void 0,n=[];if(r)for(let c of e.body.injections)c.view?n.push({name:"viewof "+c.imported.name,alias:"viewof "+c.local.name}):c.mutable&&n.push({name:"mutable "+c.imported.name,alias:"mutable "+c.local.name}),n.push({name:c.imported.name,alias:c.local.name});let o=`import {${t.map(c=>`${c.name} as ${c.alias}`).join(", ")}} ${r?`with {${n.map(c=>`${c.name} as ${c.alias}`).join(", ")}} `:""}from "${e.body.source.value}"`;return{specifiers:t,hasInjections:r,injections:n,importString:o}}function kr(e){let t=null;e.id&&e.id.name?t=e.id.name:e.id&&e.id.id&&e.id.id.name&&(t=e.id.id.name);let r=e.input.substring(e.body.start,e.body.end),n=(e.references||[]).map(m=>m.type==="ViewExpression"?"viewof "+m.id.name:m.type==="MutableExpression"?"mutable "+m.id.name:m.name),o=0,c=0,f=(e.references||[]).map(m=>{if(m.type==="ViewExpression"){let b="$"+o;return o++,si(e.body,{ViewExpression(g){let k=g.start-e.body.start,R=g.end-e.body.start;r=r.slice(0,k+c)+b+r.slice(R+c),c+=b.length-(R-k)}},_e),b}else if(m.type==="MutableExpression"){let b="$"+o,g=b+".value";return o++,si(e.body,{MutableExpression(k){let R=k.start-e.body.start,Y=k.end-e.body.start;r=r.slice(0,R+c)+g+r.slice(Y+c),c+=g.length-(Y-R)}},_e),b}else return m.name});return{cellName:t,references:Array.from(new Set(f)),bodyText:r,cellReferences:Array.from(new Set(n))}}function Ar(e){if(e.body&&e.body.specifiers)return e.body.specifiers.map(t=>`${t.view?"viewof ":t.mutable?"mutable ":""}${t.local.name}`);if(e.id&&e.id.type&&e.id){if(e.id.type==="ViewExpression")return[`viewof ${e.id.id.name}`];if(e.id.type==="MutableExpression")return[`mutable ${e.id.id.name}`];if(e.id.name)return[e.id.name]}return[]}function Vn(e){return e.references?e.references.map(t=>t.name?t.name:t.type==="ViewExpression"?`viewof ${t.id.name}`:t.type==="MutableExpression"?`mutable ${t.id.name}`:null):e.body&&e.body.injections?e.body.injections.map(t=>`${t.view?"viewof ":t.mutable?"mutable ":""}${t.imported.name}`):[]}function Fn(e){let t=[];for(let r of e.cells){let n=Ar(r),o=Vn(r);if(!(!n||!n.length))for(let c of n)t.push([c,o]),c.startsWith("viewof ")&&t.push([c.substring("viewof ".length),[c]])}return new Map(t)}function Tr(e,t){let r=Fn(e),n=new Set,o=t.slice();for(;o.length;){let c=o.pop();if(n.add(c),!r.has(c))continue;let f=r.get(c);for(let m of f)n.has(m)||o.push(m)}return{cells:e.cells.filter(c=>Ar(c).filter(f=>n.has(f)).length)}}function Dn(e,t){let r=new Map,n="",o=0;for(let{body:c}of e.cells){if(c.type!=="ImportDeclaration"||r.has(c.source.value))continue;let f=`define${++o}`,m=c.specifiers.map(g=>`${g.view?"viewof ":g.mutable?"mutable ":""}${g.imported.name}`),b=t(c.source.value,m);r.set(c.source.value,{defineName:f,fromPath:b}),n+=`import ${f} from "${b}";
  `}return n.length&&(n+=`
  `),{importSrc:n,importMap:r}}function Bn(e,t,r=!1){let n;if(r){let o=[];for(let c of e.cells)if(c.fileAttachments.size!==0)for(let f of c.fileAttachments.keys())o.push([f,t(f)]);o.length&&(n=`[${o.map(([c,f])=>`[${JSON.stringify(c)}, ${f}]`).join(",")}]`)}else{let o=[];for(let c of e.cells)if(c.fileAttachments.size!==0)for(let f of c.fileAttachments.keys())o.push([f,t(f)]);o.length&&(n=JSON.stringify(o))}return n?`  const fileAttachments = new Map(${n});
    main.builtin("FileAttachment", runtime.fileAttachments(name => fileAttachments.get(name)));`:""}function jn(e,t,r){let{defineImportMarkdown:n,observeViewofValues:o,observeMutableValues:c}=r,f=0;return e.cells.map(m=>{let b="";if(m.body.type==="ImportDeclaration"){let{specifiers:g,hasInjections:k,injections:R,importString:Y}=Cr(m);n&&(b+=`  main.variable(observer()).define(
      null,
      ["md"],
      md => md\`~~~javascript
  ${Y}
  ~~~\`
    );
  `);let J=`child${++f}`;b+=`  const ${J} = runtime.module(${t.get(m.body.source.value).defineName})${k?`.derive(${JSON.stringify(R)}, main)`:""};
  ${g.map(K=>`  main.import("${K.name}", "${K.alias}", ${J});`).join(`
  `)}`}else{let{cellName:g,references:k,bodyText:R,cellReferences:Y}=kr(m),J=g?`"${g}"`:"",K=k.join(","),G="";m.body.type!=="BlockStatement"?G=`{return(
  ${R}
  )}`:G=`
  `+R+`
  `;let Q=Y.length?JSON.stringify(Y)+", ":"",S="";if(m.generator&&m.async?S=`async function*(${K})${G}`:m.async?S=`async function(${K})${G}`:m.generator?S=`function*(${K})${G}`:S=`function(${K})${G}`,m.id&&m.id.type==="ViewExpression"){let L=`"viewof ${g}"`;b+=`  main.variable(observer(${L})).define(${L}, ${Q}${S});
    main.variable(${o?`observer("${g}")`:"null"}).define("${g}", ["Generators", ${L}], (G, _) => G.input(_));`}else if(m.id&&m.id.type==="MutableExpression"){let L=`"initial ${g}"`,B=`"mutable ${g}"`;b+=`  main.define(${L}, ${Q}${S});
    main.variable(observer(${B})).define(${B}, ["Mutable", ${L}], (M, _) => new M(_));
    main.variable(${c?`observer("${g}")`:"null"}).define("${g}", [${B}], _ => _.generator);`}else b+=`  main.variable(observer(${J})).define(${g?J+", ":""}${Q}${S});`}return b}).join(`
  `)}function Ir(e,t={}){let{resolveImportPath:r,resolveFileAttachments:n,defineImportMarkdown:o,observeViewofValues:c,observeMutableValues:f,UNSAFE_allowJavascriptFileAttachments:m}=t,{importSrc:b,importMap:g}=Dn(e,r);return`${b}export default function define(runtime, observer) {
    const main = runtime.module();
  ${Bn(e,n,m)}
  ${jn(e,g,{defineImportMarkdown:o,observeViewofValues:c,observeMutableValues:f})||""}
    return main;
  }`}function Un(e){return`https://api.observablehq.com/${Sr(e)}.js?v=3`}function qn(e){return e}class $n{constructor(t={}){let{resolveFileAttachments:r=qn,resolveImportPath:n=Un,defineImportMarkdown:o=!0,observeViewofValues:c=!0,observeMutableValues:f=!0,UNSAFE_allowJavascriptFileAttachments:m=!1}=t;this.resolveFileAttachments=r,this.resolveImportPath=n,this.defineImportMarkdown=o,this.observeViewofValues=c,this.observeMutableValues=f,this.UNSAFE_allowJavascriptFileAttachments=m}module(t,r={}){let n=typeof t=="string"?ci(t):t;return r.treeShake&&(n=Tr(n,r.treeShake)),Ir(n,{resolveImportPath:this.resolveImportPath,resolveFileAttachments:this.resolveFileAttachments,defineImportMarkdown:this.defineImportMarkdown,observeViewofValues:this.observeViewofValues,observeMutableValues:this.observeMutableValues,UNSAFE_allowJavascriptFileAttachments:this.UNSAFE_allowJavascriptFileAttachments})}notebook(t){let r=t.nodes.map(({value:n})=>{let o=li(n);return o.input=n,o});return Ir({cells:r},{resolveImportPath:this.resolveImportPath,resolveFileAttachments:this.resolveFileAttachments,defineImportMarkdown:this.defineImportMarkdown,observeViewofValues:this.observeViewofValues,observeMutableValues:this.observeMutableValues})}}let Wn=Object.getPrototypeOf(async function(){}).constructor,Gn=Object.getPrototypeOf(function*(){}).constructor,Hn=Object.getPrototypeOf(async function*(){}).constructor;function zn(e){let{cellName:t,references:r,bodyText:n,cellReferences:o}=kr(e),c;e.body.type!=="BlockStatement"?e.async?c=`return (async function(){ return (${n});})()`:c=`return (function(){ return (${n});})()`:c=n;let f;return e.generator&&e.async?f=new Hn(...r,c):e.async?f=new Wn(...r,c):e.generator?f=new Gn(...r,c):f=new Function(...r,c),{cellName:t,cellFunction:f,cellReferences:o}}function Yn(e){return import(`https://api.observablehq.com/${Sr(e)}.js?v=3`).then(r=>r.default)}function Qn(e){return e}class Kn{constructor(t={}){let{module:r=null,observer:n=null,resolveImportPath:o=Yn,resolveFileAttachments:c=Qn,defineImportMarkdown:f=!0,observeViewofValues:m=!0,observeMutableValues:b=!0}=t;this.defaultModule=r,this.defaultObserver=n,this.resolveImportPath=o,this.resolveFileAttachments=c,this.defineImportMarkdown=f,this.observeViewofValues=m,this.observeMutableValues=b}async module(t,r,n){if(r=r||this.defaultModule,n=n||this.defaultObserver,!r)throw Error("No module provided.");if(!n)throw Error("No observer provided.");let o=ci(t),c=[];for(let f of o.cells)f.input=t,c.push(this.cell(f,r,n));return Promise.all(c)}async cell(t,r,n){if(r=r||this.defaultModule,n=n||this.defaultObserver,!r)throw Error("No module provided.");if(!n)throw Error("No observer provided.");let o;if(typeof t=="string"?(o=li(t),o.input=t):o=t,o.body.type==="ImportDeclaration"){let c=o.body.source.value,f=o.body.specifiers.map(G=>`${G.view?"viewof ":G.mutable?"mutable ":""}${G.imported.name}`),m=await this.resolveImportPath(c,f),b,g,{specifiers:k,hasInjections:R,injections:Y,importString:J}=Cr(o),K=r._runtime.module(m);if(this.defineImportMarkdown&&(b=r.variable(n()).define(null,["md"],G=>G`~~~javascript
    ${J}
    ~~~`)),R){let G=K.derive(Y,r);g=k.map(({name:Q,alias:S})=>r.import(Q,S,G))}else g=k.map(({name:G,alias:Q})=>r.import(G,Q,K));return b?[b,...g]:g}else{let{cellName:c,cellFunction:f,cellReferences:m}=zn(o);if(o.id&&o.id.type==="ViewExpression"){let b=`viewof ${c}`;return[r.variable(n(b)).define(b,m,f.bind(this)),r.variable(this.observeViewofValues?n(c):null).define(c,["Generators",b],(g,k)=>g.input(k))]}else if(o.id&&o.id.type==="MutableExpression"){let b=`initial ${c}`,g=`mutable ${c}`;return[r.variable(null).define(b,m,f),r.variable(n(g)).define(g,["Mutable",b],(k,R)=>new k(R)),r.variable(this.observeMutableValues?n(c):null).define(c,[g],k=>k.generator)]}else return[r.variable(n(c)).define(c,m,f.bind(this))]}}}i.Compiler=$n,i.Interpreter=Kn,i.parser=Rn,i.treeShakeModule=Tr,Object.defineProperty(i,"__esModule",{value:!0})})});function we(i,s,a){a=a||{};var u=i.ownerDocument,h=u.defaultView.CustomEvent;typeof h=="function"?h=new h(s,{detail:a}):(h=u.createEvent("Event"),h.initEvent(s,!1,!1),h.detail=a),i.dispatchEvent(h)}function Nt(i){return Array.isArray(i)||i instanceof Int8Array||i instanceof Int16Array||i instanceof Int32Array||i instanceof Uint8Array||i instanceof Uint8ClampedArray||i instanceof Uint16Array||i instanceof Uint32Array||i instanceof Float32Array||i instanceof Float64Array}function Pt(i){return i===(i|0)+""}function Z(i){let s=document.createElement("span");return s.className="observablehq--cellname",s.textContent=`${i} = `,s}var oa=Symbol.prototype.toString;function le(i){return oa.call(i)}var{getOwnPropertySymbols:ua,prototype:{hasOwnProperty:la}}=Object,{toStringTag:ca}=Symbol,fi={},Le=ua;function Ue(i,s){return la.call(i,s)}function Je(i){return i[ca]||i.constructor&&i.constructor.name||"Object"}function ne(i,s){try{let a=i[s];return a&&a.constructor,a}catch(a){return fi}}var ha=[{symbol:"@@__IMMUTABLE_INDEXED__@@",name:"Indexed",modifier:!0},{symbol:"@@__IMMUTABLE_KEYED__@@",name:"Keyed",modifier:!0},{symbol:"@@__IMMUTABLE_LIST__@@",name:"List",arrayish:!0},{symbol:"@@__IMMUTABLE_MAP__@@",name:"Map"},{symbol:"@@__IMMUTABLE_ORDERED__@@",name:"Ordered",modifier:!0,prefix:!0},{symbol:"@@__IMMUTABLE_RECORD__@@",name:"Record"},{symbol:"@@__IMMUTABLE_SET__@@",name:"Set",arrayish:!0,setish:!0},{symbol:"@@__IMMUTABLE_STACK__@@",name:"Stack",arrayish:!0}];function Lt(i){try{let s=ha.filter(({symbol:p})=>i[p]===!0);if(!s.length)return;let a=s.find(p=>!p.modifier),u=a.name==="Map"&&s.find(p=>p.modifier&&p.prefix),h=s.some(p=>p.arrayish),d=s.some(p=>p.setish);return{name:`${u?u.name:""}${a.name}`,symbols:s,arrayish:h&&!d,setish:d}}catch(s){return null}}var{getPrototypeOf:pi,getOwnPropertyDescriptors:fa}=Object,Pr=pi({});function et(i,s,a,u){let h=Nt(i),d,p,x,E;i instanceof Map?i instanceof i.constructor?(d=`Map(${i.size})`,p=pa):(d="Map()",p=Ze):i instanceof Set?i instanceof i.constructor?(d=`Set(${i.size})`,p=da):(d="Set()",p=Ze):h?(d=`${i.constructor.name}(${i.length})`,p=xa):(E=Lt(i))?(d=`Immutable.${E.name}${E.name==="Record"?"":`(${i.size})`}`,h=E.arrayish,p=E.arrayish?ba:E.setish?ma:ga):u?(d=Je(i),p=va):(d=Je(i),p=Ze);let w=document.createElement("span");w.className="observablehq--expanded",a&&w.appendChild(Z(a));let O=w.appendChild(document.createElement("a"));O.innerHTML=`<svg width=8 height=8 class='observablehq--caret'>
      <path d='M4 7L0 1h8z' fill='currentColor' />
    </svg>`,O.appendChild(document.createTextNode(`${d}${h?" [":" {"}`)),O.addEventListener("mouseup",function(N){N.stopPropagation(),Oe(w,qe(i,null,a,u))}),p=p(i);for(let N=0;!(x=p.next()).done&&N<20;++N)w.appendChild(x.value);if(!x.done){let N=w.appendChild(document.createElement("a"));N.className="observablehq--field",N.style.display="block",N.appendChild(document.createTextNode("  \u2026 more")),N.addEventListener("mouseup",function(D){D.stopPropagation(),w.insertBefore(x.value,w.lastChild.previousSibling);for(let P=0;!(x=p.next()).done&&P<19;++P)w.insertBefore(x.value,w.lastChild.previousSibling);x.done&&w.removeChild(w.lastChild.previousSibling),we(w,"load")})}return w.appendChild(document.createTextNode(h?"]":"}")),w}function*pa(i){for(let[s,a]of i)yield ya(s,a);yield*Ze(i)}function*da(i){for(let s of i)yield Lr(s);yield*Ze(i)}function*ma(i){for(let s of i)yield Lr(s)}function*xa(i){for(let s=0,a=i.length;s<a;++s)s in i&&(yield be(s,ne(i,s),"observablehq--index"));for(let s in i)!Pt(s)&&Ue(i,s)&&(yield be(s,ne(i,s),"observablehq--key"));for(let s of Le(i))yield be(le(s),ne(i,s),"observablehq--symbol")}function*ba(i){let s=0;for(let a=i.size;s<a;++s)yield be(s,i.get(s),!0)}function*va(i){for(let a in fa(i))yield be(a,ne(i,a),"observablehq--key");for(let a of Le(i))yield be(le(a),ne(i,a),"observablehq--symbol");let s=pi(i);s&&s!==Pr&&(yield Or(s))}function*Ze(i){for(let a in i)Ue(i,a)&&(yield be(a,ne(i,a),"observablehq--key"));for(let a of Le(i))yield be(le(a),ne(i,a),"observablehq--symbol");let s=pi(i);s&&s!==Pr&&(yield Or(s))}function*ga(i){for(let[s,a]of i)yield be(s,a,"observablehq--key")}function Or(i){let s=document.createElement("div"),a=s.appendChild(document.createElement("span"));return s.className="observablehq--field",a.className="observablehq--prototype-key",a.textContent="  <prototype>",s.appendChild(document.createTextNode(": ")),s.appendChild(X(i,void 0,void 0,void 0,!0)),s}function be(i,s,a){let u=document.createElement("div"),h=u.appendChild(document.createElement("span"));return u.className="observablehq--field",h.className=a,h.textContent=`  ${i}`,u.appendChild(document.createTextNode(": ")),u.appendChild(X(s)),u}function ya(i,s){let a=document.createElement("div");return a.className="observablehq--field",a.appendChild(document.createTextNode("  ")),a.appendChild(X(i)),a.appendChild(document.createTextNode(" => ")),a.appendChild(X(s)),a}function Lr(i){let s=document.createElement("div");return s.className="observablehq--field",s.appendChild(document.createTextNode("  ")),s.appendChild(X(i)),s}function Mr(i){let s=window.getSelection();return s.type==="Range"&&(s.containsNode(i,!0)||s.anchorNode.isSelfOrDescendant(i)||s.focusNode.isSelfOrDescendant(i))}function qe(i,s,a,u){let h=Nt(i),d,p,x,E;if(i instanceof Map?i instanceof i.constructor?(d=`Map(${i.size})`,p=_a):(d="Map()",p=tt):i instanceof Set?i instanceof i.constructor?(d=`Set(${i.size})`,p=wa):(d="Set()",p=tt):h?(d=`${i.constructor.name}(${i.length})`,p=Ca):(E=Lt(i))?(d=`Immutable.${E.name}${E.name==="Record"?"":`(${i.size})`}`,h=E.arrayish,p=E.arrayish?Sa:E.setish?Ea:ka):(d=Je(i),p=tt),s){let N=document.createElement("span");return N.className="observablehq--shallow",a&&N.appendChild(Z(a)),N.appendChild(document.createTextNode(d)),N.addEventListener("mouseup",function(D){Mr(N)||(D.stopPropagation(),Oe(N,qe(i)))}),N}let w=document.createElement("span");w.className="observablehq--collapsed",a&&w.appendChild(Z(a));let O=w.appendChild(document.createElement("a"));O.innerHTML=`<svg width=8 height=8 class='observablehq--caret'>
      <path d='M7 4L1 8V0z' fill='currentColor' />
    </svg>`,O.appendChild(document.createTextNode(`${d}${h?" [":" {"}`)),w.addEventListener("mouseup",function(N){Mr(w)||(N.stopPropagation(),Oe(w,et(i,null,a,u)))},!0),p=p(i);for(let N=0;!(x=p.next()).done&&N<20;++N)N>0&&w.appendChild(document.createTextNode(", ")),w.appendChild(x.value);return x.done||w.appendChild(document.createTextNode(", \u2026")),w.appendChild(document.createTextNode(h?"]":"}")),w}function*_a(i){for(let[s,a]of i)yield Aa(s,a);yield*tt(i)}function*wa(i){for(let s of i)yield X(s,!0);yield*tt(i)}function*Ea(i){for(let s of i)yield X(s,!0)}function*Sa(i){let s=-1,a=0;for(let u=i.size;a<u;++a)a>s+1&&(yield Ot(a-s-1)),yield X(i.get(a),!0),s=a;a>s+1&&(yield Ot(a-s-1))}function*Ca(i){let s=-1,a=0;for(let u=i.length;a<u;++a)a in i&&(a>s+1&&(yield Ot(a-s-1)),yield X(ne(i,a),!0),s=a);a>s+1&&(yield Ot(a-s-1));for(let u in i)!Pt(u)&&Ue(i,u)&&(yield it(u,ne(i,u),"observablehq--key"));for(let u of Le(i))yield it(le(u),ne(i,u),"observablehq--symbol")}function*tt(i){for(let s in i)Ue(i,s)&&(yield it(s,ne(i,s),"observablehq--key"));for(let s of Le(i))yield it(le(s),ne(i,s),"observablehq--symbol")}function*ka(i){for(let[s,a]of i)yield it(s,a,"observablehq--key")}function Ot(i){let s=document.createElement("span");return s.className="observablehq--empty",s.textContent=i===1?"empty":`empty \xD7 ${i}`,s}function it(i,s,a){let u=document.createDocumentFragment(),h=u.appendChild(document.createElement("span"));return h.className=a,h.textContent=i,u.appendChild(document.createTextNode(": ")),u.appendChild(X(s,!0)),u}function Aa(i,s){let a=document.createDocumentFragment();return a.appendChild(X(i,!0)),a.appendChild(document.createTextNode(" => ")),a.appendChild(X(s,!0)),a}function ae(i,s){var a=i+"",u=a.length;return u<s?new Array(s-u+1).join(0)+a:a}function Ta(i){return i.getUTCMilliseconds()===0&&i.getUTCSeconds()===0&&i.getUTCMinutes()===0&&i.getUTCHours()===0}function Rr(i){return i<0?"-"+ae(-i,6):i>9999?"+"+ae(i,6):ae(i,4)}function di(i){return isNaN(i)?"Invalid Date":Ta(i)?Rr(i.getUTCFullYear())+"-"+ae(i.getUTCMonth()+1,2)+"-"+ae(i.getUTCDate(),2):Rr(i.getFullYear())+"-"+ae(i.getMonth()+1,2)+"-"+ae(i.getDate(),2)+"T"+ae(i.getHours(),2)+":"+ae(i.getMinutes(),2)+(i.getMilliseconds()?":"+ae(i.getSeconds(),2)+"."+ae(i.getMilliseconds(),3):i.getSeconds()?":"+ae(i.getSeconds(),2):"")}var Ia=Error.prototype.toString;function mi(i){return i.stack||Ia.call(i)}var Na=RegExp.prototype.toString;function xi(i){return Na.call(i)}var bi=20;function vi(i,s,a,u){if(s===!1){if(Fr(i,/["\n]/g)<=Fr(i,/`|\${/g)){let w=document.createElement("span");u&&w.appendChild(Z(u));let O=w.appendChild(document.createElement("span"));return O.className="observablehq--string",O.textContent=JSON.stringify(i),w}let p=i.split(`
  `);if(p.length>bi&&!a){let w=document.createElement("div");u&&w.appendChild(Z(u));let O=w.appendChild(document.createElement("span"));O.className="observablehq--string",O.textContent="`"+Vr(p.slice(0,bi).join(`
  `));let N=w.appendChild(document.createElement("span")),D=p.length-bi;return N.textContent=`Show ${D} truncated line${D>1?"s":""}`,N.className="observablehq--string-expand",N.addEventListener("mouseup",function(P){P.stopPropagation(),Oe(w,X(i,s,!0,u))}),w}let x=document.createElement("span");u&&x.appendChild(Z(u));let E=x.appendChild(document.createElement("span"));return E.className=`observablehq--string${a?" observablehq--expanded":""}`,E.textContent="`"+Vr(i)+"`",x}let h=document.createElement("span");u&&h.appendChild(Z(u));let d=h.appendChild(document.createElement("span"));return d.className="observablehq--string",d.textContent=JSON.stringify(i.length>100?`${i.slice(0,50)}\u2026${i.slice(-49)}`:i),h}function Vr(i){return i.replace(/[\\`\x00-\x09\x0b-\x19]|\${/g,Pa)}function Pa(i){var s=i.charCodeAt(0);switch(s){case 8:return"\\b";case 9:return"\\t";case 11:return"\\v";case 12:return"\\f";case 13:return"\\r"}return s<16?"\\x0"+s.toString(16):s<32?"\\x"+s.toString(16):"\\"+i}function Fr(i,s){for(var a=0;s.exec(i);)++a;return a}var La=Function.prototype.toString,Oa={prefix:"async \u0192"},Ma={prefix:"async \u0192*"},Dr={prefix:"class"},Ra={prefix:"\u0192"},Va={prefix:"\u0192*"};function gi(i,s){var a,u,h=La.call(i);switch(i.constructor&&i.constructor.name){case"AsyncFunction":a=Oa;break;case"AsyncGeneratorFunction":a=Ma;break;case"GeneratorFunction":a=Va;break;default:a=/^class\b/.test(h)?Dr:Ra;break}return a===Dr?rt(a,"",s):(u=/^(?:async\s*)?(\w+)\s*=>/.exec(h))?rt(a,"("+u[1]+")",s):(u=/^(?:async\s*)?\(\s*(\w+(?:\s*,\s*\w+)*)?\s*\)/.exec(h))?rt(a,u[1]?"("+u[1].replace(/\s*,\s*/g,", ")+")":"()",s):(u=/^(?:async\s*)?function(?:\s*\*)?(?:\s*\w+)?\s*\(\s*(\w+(?:\s*,\s*\w+)*)?\s*\)/.exec(h))?rt(a,u[1]?"("+u[1].replace(/\s*,\s*/g,", ")+")":"()",s):rt(a,"(\u2026)",s)}function rt(i,s,a){var u=document.createElement("span");u.className="observablehq--function",a&&u.appendChild(Z(a));var h=u.appendChild(document.createElement("span"));return h.className="observablehq--keyword",h.textContent=i.prefix,u.appendChild(document.createTextNode(s)),u}var{prototype:{toString:Fa}}=Object;function X(i,s,a,u,h){let d=typeof i;switch(d){case"boolean":case"undefined":{i+="";break}case"number":{i=i===0&&1/i<0?"-0":i+"";break}case"bigint":{i=i+"n";break}case"symbol":{i=le(i,u);break}case"function":return gi(i,u);case"string":return vi(i,s,a,u);default:{if(i===null){d=null,i="null";break}if(i instanceof Date){d="date",i=di(i,u);break}if(i===fi){d="forbidden",i="[forbidden]";break}switch(Fa.call(i)){case"[object RegExp]":{d="regexp",i=xi(i,u);break}case"[object Error]":case"[object DOMException]":{d="error",i=mi(i,u);break}default:return(a?et:qe)(i,s,u,h)}break}}let p=document.createElement("span");u&&p.appendChild(Z(u));let x=p.appendChild(document.createElement("span"));return x.className=`observablehq--${d}`,x.textContent=i,p}function Oe(i,s){i.classList.contains("observablehq--inspect")&&s.classList.add("observablehq--inspect"),i.parentNode.replaceChild(s,i),we(s,"load")}var Da=/\s+\(\d+:\d+\)$/m,Me=class{constructor(s){if(!s)throw new Error("invalid node");this._node=s,s.classList.add("observablehq")}pending(){let{_node:s}=this;s.classList.remove("observablehq--error"),s.classList.add("observablehq--running")}fulfilled(s,a){let{_node:u}=this;if((!(s instanceof Element||s instanceof Text)||s.parentNode&&s.parentNode!==u)&&(s=X(s,!1,u.firstChild&&u.firstChild.classList&&u.firstChild.classList.contains("observablehq--expanded"),a),s.classList.add("observablehq--inspect")),u.classList.remove("observablehq--running","observablehq--error"),u.firstChild!==s)if(u.firstChild){for(;u.lastChild!==u.firstChild;)u.removeChild(u.lastChild);u.replaceChild(s,u.firstChild)}else u.appendChild(s);we(u,"update")}rejected(s,a){let{_node:u}=this;for(u.classList.remove("observablehq--running"),u.classList.add("observablehq--error");u.lastChild;)u.removeChild(u.lastChild);var h=document.createElement("div");h.className="observablehq--inspect",a&&h.appendChild(Z(a)),h.appendChild(document.createTextNode((s+"").replace(Da,""))),u.appendChild(h),we(u,"error",{error:s})}};Me.into=function(i){if(typeof i=="string"&&(i=document.querySelector(i),i==null))throw new Error("container not found");return function(){return new Me(i.appendChild(document.createElement("div")))}};var Mt=new Map,st=[],yi=st.map,Ba=st.some,ja=st.hasOwnProperty,Ee="https://cdn.jsdelivr.net/npm/",Ua=/^((?:@[^/@]+\/)?[^/@]+)(?:@([^/]+))?(?:\/(.*))?$/,qa=/^\d+\.\d+\.\d+(-[\w-.+]+)?$/,Br=/\.[^/]*$/,$a=["unpkg","jsdelivr","browser","main"],Re=class extends Error{constructor(s){super(s)}};Re.prototype.name=Re.name;function Wa(i){for(let s of $a){let a=i[s];if(typeof a=="string")return Br.test(a)?a:`${a}.js`}}function jr(i){let s=Ua.exec(i);return s&&{name:s[1],version:s[2],path:s[3]}}function Ur(i){let s=`${Ee}${i.name}${i.version?`@${i.version}`:""}/package.json`,a=Mt.get(s);return a||Mt.set(s,a=fetch(s).then(u=>{if(!u.ok)throw new Re("unable to load package.json");return u.redirected&&!Mt.has(u.url)&&Mt.set(u.url,a),u.json()})),a}async function Ga(i,s){if(i.startsWith(Ee)&&(i=i.substring(Ee.length)),/^(\w+:)|\/\//i.test(i))return i;if(/^[.]{0,2}\//i.test(i))return new URL(i,s??location).href;if(!i.length||/^[\s._]/.test(i)||/\s$/.test(i))throw new Re("illegal name");let a=jr(i);if(!a)return`${Ee}${i}`;if(!a.version&&s!=null&&s.startsWith(Ee)){let h=await Ur(jr(s.substring(Ee.length)));a.version=h.dependencies&&h.dependencies[a.name]||h.peerDependencies&&h.peerDependencies[a.name]}if(a.path&&!Br.test(a.path)&&(a.path+=".js"),a.path&&a.version&&qa.test(a.version))return`${Ee}${a.name}@${a.version}/${a.path}`;let u=await Ur(a);return`${Ee}${u.name}@${u.version}/${a.path||Wa(u)||"index.js"}`}var $e=Rt(Ga);function Rt(i){let s=new Map,a=h(null);function u(x){if(typeof x!="string")return x;let E=s.get(x);return E||s.set(x,E=new Promise((w,O)=>{let N=document.createElement("script");N.onload=()=>{try{w(st.pop()(h(x)))}catch(D){O(new Re("invalid module"))}N.remove()},N.onerror=()=>{O(new Re("unable to load module")),N.remove()},N.async=!0,N.src=x,window.define=qr,document.head.appendChild(N)})),E}function h(x){return E=>Promise.resolve(i(E,x)).then(u)}function d(x){return Rt((E,w)=>E in x&&(E=x[E],w=null,typeof E!="string")?E:i(E,w))}function p(x){return arguments.length>1?Promise.all(yi.call(arguments,a)).then(Ha):a(x)}return p.alias=d,p.resolve=i,p}function Ha(i){let s={};for(let a of i)for(let u in a)ja.call(a,u)&&(a[u]==null?Object.defineProperty(s,u,{get:za(a,u)}):s[u]=a[u]);return s}function za(i,s){return()=>i[s]}function Ya(i){return i=i+"",i==="exports"||i==="module"}function qr(i,s,a){let u=arguments.length;u<2?(a=i,s=[]):u<3&&(a=s,s=typeof i=="string"?[]:i),st.push(Ba.call(s,Ya)?h=>{let d={},p={exports:d};return Promise.all(yi.call(s,x=>(x=x+"",x==="exports"?d:x==="module"?p:h(x)))).then(x=>(a.apply(null,x),p.exports))}:h=>Promise.all(yi.call(s,h)).then(d=>typeof a=="function"?a.apply(null,d):a))}qr.amd={};async function nt(i){let s=await fetch(await i.url());if(!s.ok)throw new Error(`Unable to load file: ${i.name}`);return s}async function $r(i,s,{array:a=!1,typed:u=!1}={}){let[h,d]=await Promise.all([i.text(),$e("d3-dsv@2.0.0/dist/d3-dsv.min.js")]);return(s==="	"?a?d.tsvParseRows:d.tsvParse:a?d.csvParseRows:d.csvParse)(h,u&&d.autoType)}var _i=class{constructor(s,a){Object.defineProperties(this,{_url:{value:s},name:{value:a,enumerable:!0}})}async url(){return await this._url+""}async blob(){return(await nt(this)).blob()}async arrayBuffer(){return(await nt(this)).arrayBuffer()}async text(){return(await nt(this)).text()}async json(){return(await nt(this)).json()}async stream(){return(await nt(this)).body}async csv(s){return $r(this,",",s)}async tsv(s){return $r(this,"	",s)}async image(){let s=await this.url();return new Promise((a,u)=>{let h=new Image;new URL(s,document.baseURI).origin!==new URL(location).origin&&(h.crossOrigin="anonymous"),h.onload=()=>a(h),h.onerror=()=>u(new Error(`Unable to load file: ${this.name}`)),h.src=s})}};function Wr(i){throw new Error(`File not found: ${i}`)}function We(i){return Object.assign(s=>{let a=i(s+="");if(a==null)throw new Error(`File not found: ${s}`);return new _i(a,s)},{prototype:_i.prototype})}function Gr(i,s){var a=document.createElement("canvas");return a.width=i,a.height=s,a}function Hr(i,s,a){a==null&&(a=devicePixelRatio);var u=document.createElement("canvas");u.width=i*a,u.height=s*a,u.style.width=i+"px";var h=u.getContext("2d");return h.scale(a,a),h}function zr(i,s="untitled",a="Save"){let u=document.createElement("a"),h=u.appendChild(document.createElement("button"));h.textContent=a,u.download=s;async function d(){await new Promise(requestAnimationFrame),URL.revokeObjectURL(u.href),u.removeAttribute("href"),h.textContent=a,h.disabled=!1}return u.onclick=async p=>{if(h.disabled=!0,u.href)return d();h.textContent="Saving\u2026";try{let x=await(typeof i=="function"?i():i);h.textContent="Download",u.href=URL.createObjectURL(x)}catch(x){h.textContent=a}if(p.eventPhase)return d();h.disabled=!1},u}var Vt={math:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Yr(i,s){var a=i+="",u=a.indexOf(":"),h;u>=0&&(a=i.slice(0,u))!=="xmlns"&&(i=i.slice(u+1));var d=Vt.hasOwnProperty(a)?document.createElementNS(Vt[a],i):document.createElement(i);if(s)for(var p in s)a=p,u=a.indexOf(":"),h=s[p],u>=0&&(a=p.slice(0,u))!=="xmlns"&&(p=p.slice(u+1)),Vt.hasOwnProperty(a)?d.setAttributeNS(Vt[a],p,h):d.setAttribute(p,h);return d}function Qr(i){var s=document.createElement("input");return i!=null&&(s.type=i),s}function Kr(i,s,a){arguments.length===1&&(s=i,i=null);var u=document.createElement("input");return u.min=i=i==null?0:+i,u.max=s=s==null?1:+s,u.step=a==null?"any":a=+a,u.type="range",u}function Xr(i){var s=document.createElement("select");return Array.prototype.forEach.call(i,function(a){var u=document.createElement("option");u.value=u.textContent=a,s.appendChild(u)}),s}function Jr(i,s){var a=document.createElementNS("http://www.w3.org/2000/svg","svg");return a.setAttribute("viewBox",[0,0,i,s]),a.setAttribute("width",i),a.setAttribute("height",s),a}function Zr(i){return document.createTextNode(i)}var Qa=0;function ts(i){return new es("O-"+(i==null?"":i+"-")+ ++Qa)}function es(i){this.id=i,this.href=new URL(`#${i}`,location)+""}es.prototype.toString=function(){return"url("+this.href+")"};var is={canvas:Gr,context2d:Hr,download:zr,element:Yr,input:Qr,range:Kr,select:Xr,svg:Jr,text:Zr,uid:ts};function rs(i){return new Promise(function(s,a){var u=new FileReader;u.onload=function(){s(u.result)},u.onerror=a,u.readAsArrayBuffer(i)})}function ss(i){return new Promise(function(s,a){var u=new FileReader;u.onload=function(){s(u.result)},u.onerror=a,u.readAsText(i)})}function ns(i){return new Promise(function(s,a){var u=new FileReader;u.onload=function(){s(u.result)},u.onerror=a,u.readAsDataURL(i)})}var as={buffer:rs,text:ss,url:ns};function Ve(){return this}function at(i,s){let a=!1;if(typeof s!="function")throw new Error("dispose is not a function");return{[Symbol.iterator]:Ve,next:()=>a?{done:!0}:(a=!0,{done:!1,value:i}),return:()=>(a=!0,s(i),{done:!0}),throw:()=>({done:a=!0})}}function*os(i,s){for(var a,u=-1;!(a=i.next()).done;)s(a.value,++u)&&(yield a.value)}function Se(i){let s=!1,a,u,h=i(d);if(h!=null&&typeof h!="function")throw new Error(typeof h.then=="function"?"async initializers are not supported":"initializer returned something, but not a dispose function");function d(x){return u?(u(x),u=null):s=!0,a=x}function p(){return{done:!1,value:s?(s=!1,Promise.resolve(a)):new Promise(x=>u=x)}}return{[Symbol.iterator]:Ve,throw:()=>({done:!0}),return:()=>(h!=null&&h(),{done:!0}),next:p}}function ls(i){return Se(function(s){var a=Ka(i),u=us(i);function h(){s(us(i))}return i.addEventListener(a,h),u!==void 0&&s(u),function(){i.removeEventListener(a,h)}})}function us(i){switch(i.type){case"range":case"number":return i.valueAsNumber;case"date":return i.valueAsDate;case"checkbox":return i.checked;case"file":return i.multiple?i.files:i.files[0];case"select-multiple":return Array.from(i.selectedOptions,s=>s.value);default:return i.value}}function Ka(i){switch(i.type){case"button":case"submit":case"checkbox":return"click";case"file":return"change";default:return"input"}}function*cs(i,s){for(var a,u=-1;!(a=i.next()).done;)yield s(a.value,++u)}function hs(i){let s,a=[],u=i(h);if(u!=null&&typeof u!="function")throw new Error(typeof u.then=="function"?"async initializers are not supported":"initializer returned something, but not a dispose function");function h(p){return a.push(p),s&&(s(a.shift()),s=null),p}function d(){return{done:!1,value:a.length?Promise.resolve(a.shift()):new Promise(p=>s=p)}}return{[Symbol.iterator]:Ve,throw:()=>({done:!0}),return:()=>(u!=null&&u(),{done:!0}),next:d}}function*fs(i,s,a){i=+i,s=+s,a=(h=arguments.length)<2?(s=i,i=0,1):h<3?1:+a;for(var u=-1,h=Math.max(0,Math.ceil((s-i)/a))|0;++u<h;)yield i+u*a}function ps(i,s){if(!(!isFinite(s=+s)||s<0||s!==s|0)){for(var a,u=-1;!(a=i.next()).done;)if(++u===s)return a.value}}function wi(i){let s=URL.createObjectURL(new Blob([i],{type:"text/javascript"})),a=new Worker(s);return at(a,()=>{a.terminate(),URL.revokeObjectURL(s)})}var ds={disposable:at,filter:os,input:ls,map:cs,observe:Se,queue:hs,range:fs,valueAt:ps,worker:wi};function Fe(i,s){return function(a){var u=a[0],h=[],d,p=null,x,E,w,O,N,D,P,A=-1;for(O=1,N=arguments.length;O<N;++O){if(d=arguments[O],d instanceof Node)h[++A]=d,u+="<!--o:"+A+"-->";else if(Array.isArray(d)){for(D=0,P=d.length;D<P;++D)x=d[D],x instanceof Node?(p===null&&(h[++A]=p=document.createDocumentFragment(),u+="<!--o:"+A+"-->"),p.appendChild(x)):(p=null,u+=x);p=null}else u+=d;u+=a[O]}if(p=i(u),++A>0){for(E=new Array(A),w=document.createTreeWalker(p,NodeFilter.SHOW_COMMENT,null,!1);w.nextNode();)x=w.currentNode,/^o:/.test(x.nodeValue)&&(E[+x.nodeValue.slice(2)]=x);for(O=0;O<A;++O)(x=E[O])&&x.parentNode.replaceChild(h[O],x)}return p.childNodes.length===1?p.removeChild(p.firstChild):p.nodeType===11?((x=s()).appendChild(p),x):p}}var ms=Fe(function(i){var s=document.createElement("template");return s.innerHTML=i.trim(),document.importNode(s.content,!0)},function(){return document.createElement("span")});var Ei="https://cdn.jsdelivr.net/npm/@observablehq/highlight.js@2.0.0/";function xs(i){return function(){return i("marked@0.3.12/marked.min.js").then(function(s){return Fe(function(a){var u=document.createElement("div");u.innerHTML=s(a,{langPrefix:""}).trim();var h=u.querySelectorAll("pre code[class]");return h.length>0&&i(Ei+"highlight.min.js").then(function(d){h.forEach(function(p){function x(){d.highlightBlock(p),p.parentNode.classList.add("observablehq--md-pre")}d.getLanguage(p.className)?x():i(Ei+"async-languages/index.js").then(E=>{if(E.has(p.className))return i(Ei+"async-languages/"+E.get(p.className)).then(w=>{d.registerLanguage(p.className,w)})}).then(x,x)})}),u},function(){return document.createElement("div")})})}}function Si(i){let s;Object.defineProperties(this,{generator:{value:Se(a=>void(s=a))},value:{get:()=>i,set:a=>s(i=a)}}),i!==void 0&&s(i)}function*bs(){for(;;)yield Date.now()}function vs(i,s){return new Promise(function(a){setTimeout(function(){a(s)},i)})}var Ci=new Map;function Xa(i,s){var a=new Promise(function(u){Ci.delete(s);var h=s-i;if(!(h>0))throw new Error("invalid time");if(h>2147483647)throw new Error("too long to wait");setTimeout(u,h)});return Ci.set(s,a),a}function ot(i,s){var a;return(a=Ci.get(i=+i))?a.then(()=>s):(a=Date.now())>=i?Promise.resolve(s):Xa(a,i).then(()=>s)}function gs(i,s){return ot(Math.ceil((Date.now()+1)/i)*i,s)}var ys={delay:vs,tick:gs,when:ot};function ki(i,s){if(/^(\w+:)|\/\//i.test(i))return i;if(/^[.]{0,2}\//i.test(i))return new URL(i,s??location).href;if(!i.length||/^[\s._]/.test(i)||/\s$/.test(i))throw new Error("illegal name");return"https://unpkg.com/"+i}function _s(i){return i==null?$e:Rt(i)}var ws=Fe(function(i){var s=document.createElementNS("http://www.w3.org/2000/svg","g");return s.innerHTML=i.trim(),s},function(){return document.createElementNS("http://www.w3.org/2000/svg","g")});var Ja=String.raw;function Za(i){return new Promise(function(s,a){var u=document.createElement("link");u.rel="stylesheet",u.href=i,u.onerror=a,u.onload=s,document.head.appendChild(u)})}function Es(i){return function(){return Promise.all([i("@observablehq/katex@0.11.1/dist/katex.min.js"),i.resolve("@observablehq/katex@0.11.1/dist/katex.min.css").then(Za)]).then(function(s){var a=s[0],u=h();function h(d){return function(){var p=document.createElement("div");return a.render(Ja.apply(String,arguments),p,d),p.removeChild(p.firstChild)}}return u.options=h,u.block=h({displayMode:!0}),u})}}function Ai(i){return async()=>{let[s,a,u]=await Promise.all(["vega@5.20.2/build/vega.min.js","vega-lite@5.1.0/build/vega-lite.min.js","vega-lite-api@5.0.0/build/vega-lite-api.min.js"].map(h=>i(h)));return u.register(s,a)}}function Ss(){return Se(function(i){var s=i(document.body.clientWidth);function a(){var u=document.body.clientWidth;u!==s&&i(s=u)}return window.addEventListener("resize",a),function(){window.removeEventListener("resize",a)}})}var Ce=Object.assign(function(s){let a=_s(s);Object.defineProperties(this,eo({DOM:()=>is,FileAttachment:()=>Wr,Files:()=>as,Generators:()=>ds,Inputs:()=>a("@observablehq/inputs@0.8.0/dist/inputs.umd.min.js"),Mutable:()=>Si,Plot:()=>a("@observablehq/plot@0.1.0/dist/plot.umd.min.js"),Promises:()=>ys,_:()=>a("lodash@4.17.21/lodash.min.js"),d3:()=>a("d3@6.7.0/dist/d3.min.js"),htl:()=>a("htl@0.2.5/dist/htl.min.js"),html:()=>ms,md:xs(a),now:bs,require:()=>a,resolve:()=>ki,svg:()=>ws,tex:Es(a),vl:Ai(a),width:Ss}))},{resolve:$e.resolve});function eo(i){return Object.fromEntries(Object.entries(i).map(to))}function to([i,s]){return[i,{value:s,writable:!0,enumerable:!0}]}function te(i,s){this.message=i+"",this.input=s}te.prototype=Object.create(Error.prototype);te.prototype.name="RuntimeError";te.prototype.constructor=te;function Ti(i){return i&&typeof i.next=="function"&&typeof i.return=="function"}function Ii(i,s,a){if(typeof s=="function"&&(a=s,s=null),typeof a!="function")throw new Error("invalid observer");s==null&&(s=new Ce);let{modules:u,id:h}=i,d=new Map,p=new ve(s),x=E(h);function E(w){let O=d.get(w);return O||d.set(w,O=p.module()),O}for(let w of u){let O=E(w.id),N=0;for(let D of w.variables)D.from?O.import(D.remote,D.name,E(D.from)):O===x?O.variable(a(D,N,w.variables)).define(D.name,D.inputs,D.value):O.define(D.name,D.inputs,D.value),++N}return p}var Cs=Array.prototype,ks=Cs.map,As=Cs.forEach;function ut(i){return function(){return i}}function lt(i){return i}function Ts(i){return function(){throw i}}function ue(){}var ct=1,ht=2,ft=3,De={};function ce(i,s,a){a||(a=De),Object.defineProperties(this,{_observer:{value:a,writable:!0},_definition:{value:Ni,writable:!0},_duplicate:{value:void 0,writable:!0},_duplicates:{value:void 0,writable:!0},_indegree:{value:NaN,writable:!0},_inputs:{value:[],writable:!0},_invalidate:{value:ue,writable:!0},_module:{value:s},_name:{value:null,writable:!0},_outputs:{value:new Set,writable:!0},_promise:{value:Promise.resolve(void 0),writable:!0},_reachable:{value:a!==De,writable:!0},_rejector:{value:io(this)},_type:{value:i},_value:{value:void 0,writable:!0},_version:{value:0,writable:!0}})}Object.defineProperties(ce.prototype,{_pending:{value:ao,writable:!0,configurable:!0},_fulfilled:{value:oo,writable:!0,configurable:!0},_rejected:{value:uo,writable:!0,configurable:!0},define:{value:ro,writable:!0,configurable:!0},delete:{value:no,writable:!0,configurable:!0},import:{value:so,writable:!0,configurable:!0}});function lo(i){i._module._runtime._dirty.add(i),i._outputs.add(this)}function co(i){i._module._runtime._dirty.add(i),i._outputs.delete(this)}function Ni(){throw Ni}function io(i){return function(s){throw s===Ni?new te(i._name+" is not defined",i._name):s instanceof Error&&s.message?new te(s.message,i._name):new te(i._name+" could not be resolved",i._name)}}function Is(i){return function(){throw new te(i+" is defined more than once")}}function ro(i,s,a){switch(arguments.length){case 1:{a=i,i=s=null;break}case 2:{a=s,typeof i=="string"?s=null:(s=i,i=null);break}}return Pi.call(this,i==null?null:i+"",s==null?[]:ks.call(s,this._module._resolve,this._module),typeof a=="function"?a:ut(a))}function Pi(i,s,a){var u=this._module._scope,h=this._module._runtime;if(this._inputs.forEach(co,this),s.forEach(lo,this),this._inputs=s,this._definition=a,this._value=void 0,a===ue?h._variables.delete(this):h._variables.add(this),i!==this._name||u.get(i)!==this){var d,p;if(this._name)if(this._outputs.size)u.delete(this._name),p=this._module._resolve(this._name),p._outputs=this._outputs,this._outputs=new Set,p._outputs.forEach(function(x){x._inputs[x._inputs.indexOf(this)]=p},this),p._outputs.forEach(h._updates.add,h._updates),h._dirty.add(p).add(this),u.set(this._name,p);else if((p=u.get(this._name))===this)u.delete(this._name);else if(p._type===ft)p._duplicates.delete(this),this._duplicate=void 0,p._duplicates.size===1&&(p=p._duplicates.keys().next().value,d=u.get(this._name),p._outputs=d._outputs,d._outputs=new Set,p._outputs.forEach(function(x){x._inputs[x._inputs.indexOf(d)]=p}),p._definition=p._duplicate,p._duplicate=void 0,h._dirty.add(d).add(p),h._updates.add(p),u.set(this._name,p));else throw new Error;if(this._outputs.size)throw new Error;i&&((p=u.get(i))?p._type===ft?(this._definition=Is(i),this._duplicate=a,p._duplicates.add(this)):p._type===ht?(this._outputs=p._outputs,p._outputs=new Set,this._outputs.forEach(function(x){x._inputs[x._inputs.indexOf(p)]=this},this),h._dirty.add(p).add(this),u.set(i,this)):(p._duplicate=p._definition,this._duplicate=a,d=new ce(ft,this._module),d._name=i,d._definition=this._definition=p._definition=Is(i),d._outputs=p._outputs,p._outputs=new Set,d._outputs.forEach(function(x){x._inputs[x._inputs.indexOf(p)]=d}),d._duplicates=new Set([this,p]),h._dirty.add(p).add(d),h._updates.add(p).add(d),u.set(i,d)):u.set(i,this)),this._name=i}return h._updates.add(this),h._compute(),this}function so(i,s,a){return arguments.length<3&&(a=s,s=i),Pi.call(this,s+"",[a._resolve(i+"")],lt)}function no(){return Pi.call(this,null,[],ue)}function ao(){this._observer.pending&&this._observer.pending()}function oo(i){this._observer.fulfilled&&this._observer.fulfilled(i,this._name)}function uo(i){this._observer.rejected&&this._observer.rejected(i,this._name)}function Be(i,s=[]){Object.defineProperties(this,{_runtime:{value:i},_scope:{value:new Map},_builtins:{value:new Map([["invalidation",Li],["visibility",Oi],...s])},_source:{value:null,writable:!0}})}Object.defineProperties(Be.prototype,{_copy:{value:vo,writable:!0,configurable:!0},_resolve:{value:go,writable:!0,configurable:!0},redefine:{value:ho,writable:!0,configurable:!0},define:{value:fo,writable:!0,configurable:!0},derive:{value:bo,writable:!0,configurable:!0},import:{value:po,writable:!0,configurable:!0},value:{value:xo,writable:!0,configurable:!0},variable:{value:mo,writable:!0,configurable:!0},builtin:{value:yo,writable:!0,configurable:!0}});function ho(i){var s=this._scope.get(i);if(!s)throw new te(i+" is not defined");if(s._type===ft)throw new te(i+" is defined more than once");return s.define.apply(s,arguments)}function fo(){var i=new ce(ct,this);return i.define.apply(i,arguments)}function po(){var i=new ce(ct,this);return i.import.apply(i,arguments)}function mo(i){return new ce(ct,this,i)}async function xo(i){var s=this._scope.get(i);if(!s)throw new te(i+" is not defined");return s._observer===De&&(s._observer=!0,this._runtime._dirty.add(s)),await this._runtime._compute(),s._promise}function bo(i,s){var a=new Be(this._runtime,this._builtins);return a._source=this,As.call(i,function(u){typeof u!="object"&&(u={name:u+""}),u.alias==null&&(u.alias=u.name),a.import(u.name,u.alias,s)}),Promise.resolve().then(()=>{let u=new Set([this]);for(let h of u)for(let d of h._scope.values())if(d._definition===lt){let p=d._inputs[0]._module,x=p._source||p;if(x===this){console.warn("circular module definition; ignoring");return}u.add(x)}this._copy(a,new Map)}),a}function vo(i,s){i._source=this,s.set(this,i);for(let[d,p]of this._scope){var a=i._scope.get(d);if(!(a&&a._type===ct))if(p._definition===lt){var u=p._inputs[0],h=u._module;i.import(u._name,d,s.get(h)||(h._source?h._copy(new Be(i._runtime,i._builtins),s):h))}else i.define(d,p._inputs.map(_o),p._definition)}return i}function go(i){var s=this._scope.get(i),a;if(!s)if(s=new ce(ht,this),this._builtins.has(i))s.define(i,ut(this._builtins.get(i)));else if(this._runtime._builtin._scope.has(i))s.import(i,this._runtime._builtin);else{try{a=this._runtime._global(i)}catch(u){return s.define(i,Ts(u))}a===void 0?this._scope.set(s._name=i,s):s.define(i,ut(a))}return s}function yo(i,s){this._builtins.set(i,s)}function _o(i){return i._name}var wo=typeof requestAnimationFrame=="function"?requestAnimationFrame:setImmediate,Li={},Oi={};function ve(i=new Ce,s=Eo){var a=this.module();if(Object.defineProperties(this,{_dirty:{value:new Set},_updates:{value:new Set},_computing:{value:null,writable:!0},_init:{value:null,writable:!0},_modules:{value:new Map},_variables:{value:new Set},_disposed:{value:!1,writable:!0},_builtin:{value:a},_global:{value:s}}),i)for(var u in i)new ce(ht,a).define(u,[],i[u])}Object.defineProperties(ve,{load:{value:Ii,writable:!0,configurable:!0}});Object.defineProperties(ve.prototype,{_compute:{value:ko,writable:!0,configurable:!0},_computeSoon:{value:Ao,writable:!0,configurable:!0},_computeNow:{value:To,writable:!0,configurable:!0},dispose:{value:So,writable:!0,configurable:!0},module:{value:Co,writable:!0,configurable:!0},fileAttachments:{value:We,writable:!0,configurable:!0}});function So(){this._computing=Promise.resolve(),this._disposed=!0,this._variables.forEach(i=>{i._invalidate(),i._version=NaN})}function Co(i,s=ue){let a;if(i===void 0)return(a=this._init)?(this._init=null,a):new Be(this);if(a=this._modules.get(i),a)return a;this._init=a=new Be(this),this._modules.set(i,a);try{i(this,s)}finally{this._init=null}return a}function ko(){return this._computing||(this._computing=this._computeSoon())}function Ao(){var i=this;return new Promise(function(s){wo(function(){s(),i._disposed||i._computeNow()})})}function To(){var i=[],s,a;s=new Set(this._dirty),s.forEach(function(h){h._inputs.forEach(s.add,s);let d=Mo(h);d>h._reachable?this._updates.add(h):d<h._reachable&&h._invalidate(),h._reachable=d},this),s=new Set(this._updates),s.forEach(function(h){h._reachable?(h._indegree=0,h._outputs.forEach(s.add,s)):(h._indegree=NaN,s.delete(h))}),this._computing=null,this._updates.clear(),this._dirty.clear(),s.forEach(function(h){h._outputs.forEach(No)});do{for(s.forEach(function(h){h._indegree===0&&i.push(h)});a=i.pop();)Lo(a),a._outputs.forEach(u),s.delete(a);s.forEach(function(h){Io(h)&&(Oo(h,new te("circular definition")),h._outputs.forEach(Po),s.delete(h))})}while(s.size);function u(h){--h._indegree==0&&i.push(h)}}function Io(i){let s=new Set(i._inputs);for(let a of s){if(a===i)return!0;a._inputs.forEach(s.add,s)}return!1}function No(i){++i._indegree}function Po(i){--i._indegree}function Ro(i){return i._promise.catch(i._rejector)}function Mi(i){return new Promise(function(s){i._invalidate=s})}function Vo(i,s){let a=typeof IntersectionObserver=="function"&&s._observer&&s._observer._node,u=!a,h=ue,d=ue,p,x;return a&&(x=new IntersectionObserver(([E])=>(u=E.isIntersecting)&&(p=null,h())),x.observe(a),i.then(()=>(x.disconnect(),x=null,d()))),function(E){return u?Promise.resolve(E):x?(p||(p=new Promise((w,O)=>(h=w,d=O))),p.then(()=>E)):Promise.reject()}}function Lo(i){i._invalidate(),i._invalidate=ue,i._pending();var s=i._value,a=++i._version,u=null,h=i._promise=Promise.all(i._inputs.map(Ro)).then(function(d){if(i._version===a){for(var p=0,x=d.length;p<x;++p)switch(d[p]){case Li:{d[p]=u=Mi(i);break}case Oi:{u||(u=Mi(i)),d[p]=Vo(u,i);break}}return i._definition.apply(s,d)}}).then(function(d){return Ti(d)?i._version!==a?void d.return():((u||Mi(i)).then(Do(d)),Fo(i,a,h,d)):d});h.then(function(d){i._version===a&&(i._value=d,i._fulfilled(d))},function(d){i._version===a&&(i._value=void 0,i._rejected(d))})}function Fo(i,s,a,u){function h(){var d=new Promise(function(p){p(u.next())}).then(function(p){return p.done?void 0:Promise.resolve(p.value).then(function(x){if(i._version===s)return Ns(i,x,d).then(h),i._fulfilled(x),x})});d.catch(function(p){i._version===s&&(Ns(i,void 0,d),i._rejected(p))})}return new Promise(function(d){d(u.next())}).then(function(d){if(!d.done)return a.then(h),d.value})}function Ns(i,s,a){var u=i._module._runtime;return i._value=s,i._promise=a,i._outputs.forEach(u._updates.add,u._updates),u._compute()}function Oo(i,s){i._invalidate(),i._invalidate=ue,i._pending(),++i._version,i._indegree=NaN,(i._promise=Promise.reject(s)).catch(ue),i._value=void 0,i._rejected(s)}function Do(i){return function(){i.return()}}function Mo(i){if(i._observer!==De)return!0;var s=new Set(i._outputs);for(let a of s){if(a._observer!==De)return!0;a._outputs.forEach(s.add,s)}return!1}function Eo(i){return window[i]}var Ht=aa(Ls());function Os(i){let s=document.createElement("template");return s.innerHTML=i,document.importNode(s.content,!0)}function Ms(i){let s=document.createElementNS("http://www.w3.org/2000/svg","g");return s.innerHTML=i,s}var pt=Object.assign(Dt(Os,i=>{if(i.firstChild===null)return null;if(i.firstChild===i.lastChild)return i.removeChild(i.firstChild);let s=document.createElement("span");return s.appendChild(i),s}),{fragment:Dt(Os,i=>i)}),Rs=Object.assign(Dt(Ms,i=>i.firstChild===null?null:i.firstChild===i.lastChild?i.removeChild(i.firstChild):i),{fragment:Dt(Ms,i=>{let s=document.createDocumentFragment();for(;i.firstChild;)s.appendChild(i.firstChild);return s})}),Bo=9,jo=10,Uo=12,qo=13,$o=32,Wo=65,Go=90,Ho=97,zo=122,Bt=60,se=62,ke=47,he=45,Ri=33,Vi=61,Vs=34,Fs=39,Yo=63,ee=1,Ds=2,Bs=3,Fi=4,jt=5,Ae=6,Di=7,Ut=8,qt=9,Bi=10,ji=11,$t=12,Ui=13,dt=14,js=15,Us=16,ge=17,qs=18,$s=19,Ws=20,Gs=21,qi=22,mt=23,Hs=24,zs=25,fe=26,Ys=27,Qs=28,Ks=29,Qo=128,Xs=1,Ko=8,Xo=1,Js="http://www.w3.org/2000/svg",je="http://www.w3.org/1999/xlink",Zs="http://www.w3.org/XML/1998/namespace",en="http://www.w3.org/2000/xmlns/",tn=new Map(["attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map(i=>[i.toLowerCase(),i])),Wt=new Map([["xlink:actuate",je],["xlink:arcrole",je],["xlink:href",je],["xlink:role",je],["xlink:show",je],["xlink:title",je],["xlink:type",je],["xml:lang",Zs],["xml:space",Zs],["xmlns",en],["xmlns:xlink",en]]);function Dt(i,s){return function({raw:a}){let u=ee,h="",d,p,x,E,w=0;for(let P=0,A=arguments.length;P<A;++P){let M=a[P];if(P>0){let v=arguments[P];switch(u){case fe:{if(v!=null){let C=v+"";if(rn(p))h+=C.replace(/[<]/g,Ge);else{if(new RegExp(`</${p}[\\s>/]`,"i").test(h.slice(-p.length-2)+C))throw new Error("unsafe raw text");h+=C}}break}case ee:{v==null||(v instanceof Node||typeof v!="string"&&v[Symbol.iterator]||/(?:^|>)$/.test(a[P-1])&&/^(?:<|$)/.test(M)?(h+="<!--::"+P+"-->",w|=Qo):h+=(v+"").replace(/[<&]/g,Ge));break}case qt:{u=$t;let C;if(/^[\s>]/.test(M)){if(v==null||v===!1){h=h.slice(0,x-a[P-1].length);break}if(v===!0||(C=v+"")===""){h+="''";break}if(a[P-1].slice(x,E)==="style"&&$i(v)||typeof v=="function"){h+="::"+P,w|=Xs;break}}if(C===void 0&&(C=v+""),C==="")throw new Error("unsafe unquoted empty string");h+=C.replace(/^['"]|[\s>&]/g,Ge);break}case $t:{h+=(v+"").replace(/[\s>&]/g,Ge);break}case ji:{h+=(v+"").replace(/['&]/g,Ge);break}case Bi:{h+=(v+"").replace(/["&]/g,Ge);break}case Ae:{if($i(v)){h+="::"+P+"=''",w|=Xs;break}throw new Error("invalid binding")}case ge:break;default:throw new Error("invalid binding")}}for(let v=0,C=M.length;v<C;++v){let _=M.charCodeAt(v);switch(u){case ee:{_===Bt&&(u=Ds);break}case Ds:{_===Ri?u=zs:_===ke?u=Bs:Gt(_)?(d=v,p=void 0,u=Fi,--v):_===Yo?(u=jt,--v):(u=ee,--v);break}case Bs:{Gt(_)?(u=Fi,--v):_===se?u=ee:(u=jt,--v);break}case Fi:{Te(_)?(u=Ae,p=bt(M,d,v)):_===ke?u=dt:_===se&&(p=bt(M,d,v),u=xt(p)?fe:ee);break}case Ae:{Te(_)||(_===ke||_===se?(u=Di,--v):_===Vi?(u=Ut,x=v+1,E=void 0):(u=Ut,--v,x=v+1,E=void 0));break}case Ut:{Te(_)||_===ke||_===se?(u=Di,--v,E=v):_===Vi&&(u=qt,E=v);break}case Di:{Te(_)||(_===ke?u=dt:_===Vi?u=qt:_===se?u=xt(p)?fe:ee:(u=Ut,--v,x=v+1,E=void 0));break}case qt:{Te(_)||(_===Vs?u=Bi:_===Fs?u=ji:_===se?u=xt(p)?fe:ee:(u=$t,--v));break}case Bi:{_===Vs&&(u=Ui);break}case ji:{_===Fs&&(u=Ui);break}case $t:{Te(_)?u=Ae:_===se&&(u=xt(p)?fe:ee);break}case Ui:{Te(_)?u=Ae:_===ke?u=dt:_===se?u=xt(p)?fe:ee:(u=Ae,--v);break}case dt:{_===se?u=ee:(u=Ae,--v);break}case jt:{_===se&&(u=ee);break}case js:{_===he?u=Us:_===se?u=ee:(u=ge,--v);break}case Us:{_===he?u=mt:_===se?u=ee:(u=ge,--v);break}case ge:{_===Bt?u=qs:_===he&&(u=qi);break}case qs:{_===Ri?u=$s:_!==Bt&&(u=ge,--v);break}case $s:{_===he?u=Ws:(u=ge,--v);break}case Ws:{_===he?u=Gs:(u=mt,--v);break}case Gs:{u=mt,--v;break}case qi:{_===he?u=mt:(u=ge,--v);break}case mt:{_===se?u=ee:_===Ri?u=Hs:_!==he&&(u=ge,--v);break}case Hs:{_===he?u=qi:_===se?u=ee:(u=ge,--v);break}case zs:{_===he&&M.charCodeAt(v+1)===he?(u=js,++v):(u=jt,--v);break}case fe:{_===Bt&&(u=Ys);break}case Ys:{_===ke?u=Qs:(u=fe,--v);break}case Qs:{Gt(_)?(d=v,u=Ks,--v):(u=fe,--v);break}case Ks:{Te(_)&&p===bt(M,d,v)?u=Ae:_===ke&&p===bt(M,d,v)?u=dt:_===se&&p===bt(M,d,v)?u=ee:Gt(_)||(u=fe,--v);break}default:{u=void 0;break}}}h+=M}let O=i(h),N=document.createTreeWalker(O,w,null,!1),D=[];for(;N.nextNode();){let P=N.currentNode;switch(P.nodeType){case Xo:{let A=P.attributes;for(let M=0,v=A.length;M<v;++M){let{name:C,value:_}=A[M];if(/^::/.test(C)){let I=arguments[+C.slice(2)];sn(P,C),--M,--v;for(let l in I){let $=I[l];$==null||$===!1||(typeof $=="function"?P[l]=$:l==="style"&&$i($)?nn(P[l],$):Jo(P,l,$===!0?"":$))}}else if(/^::/.test(_)){let I=arguments[+_.slice(2)];sn(P,C),--M,--v,typeof I=="function"?P[C]=I:nn(P[C],I)}}break}case Ko:{if(/^::/.test(P.data)){let A=P.parentNode,M=arguments[+P.data.slice(2)];if(M instanceof Node)A.insertBefore(M,P);else if(typeof M!="string"&&M[Symbol.iterator])if(M instanceof NodeList||M instanceof HTMLCollection)for(let v=M.length-1,C=P;v>=0;--v)C=A.insertBefore(M[v],C);else for(let v of M)v!=null&&A.insertBefore(v instanceof Node?v:document.createTextNode(v),P);else A.insertBefore(document.createTextNode(M),P);D.push(P)}break}}}for(let P of D)P.parentNode.removeChild(P);return s(O)}}function Ge(i){return`&#${i.charCodeAt(0).toString()};`}function Gt(i){return Wo<=i&&i<=Go||Ho<=i&&i<=zo}function Te(i){return i===Bo||i===jo||i===Uo||i===$o||i===qo}function $i(i){return i&&i.toString===Object.prototype.toString}function xt(i){return i==="script"||i==="style"||rn(i)}function rn(i){return i==="textarea"||i==="title"}function bt(i,s,a){return i.slice(s,a).toLowerCase()}function Jo(i,s,a){if(i.namespaceURI===Js&&(s=s.toLowerCase(),s=tn.get(s)||s,Wt.has(s))){i.setAttributeNS(Wt.get(s),s,a);return}i.setAttribute(s,a)}function sn(i,s){if(i.namespaceURI===Js&&(s=s.toLowerCase(),s=tn.get(s)||s,Wt.has(s))){i.removeAttributeNS(Wt.get(s),s);return}i.removeAttribute(s)}function nn(i,s){for(let a in s){let u=s[a];a.startsWith("--")?i.setProperty(a,u):i[a]=u}}function an(){window.DATAFLOW_STDLIB||(window.DATAFLOW_STDLIB={constants:{},dependency:{}}),window.DATAFLOW_STDLIB.constants||(window.DATAFLOW_STDLIB.constants={}),window.DATAFLOW_STDLIB.dependency||(window.DATAFLOW_STDLIB.dependency={});let i=new Ce,s=Object.assign(i,{html:()=>pt,svg:()=>Rs},window.DATAFLOW_STDLIB.constants);for(let[a,u]of Object.entries(window.DATAFLOW_STDLIB.dependency))for(let[h,d]of Object.entries(u)){let p=s[a];Object.defineProperty(s,h,{writable:!0,enumerable:!0,value:typeof p=="function"?d(p()):p.then(x=>d(x))})}return s}async function Zo(i,s){return import(`/api/import?name=${encodeURIComponent(i)}&${s.map(a=>`cell=${encodeURIComponent(a)}`).join("&")}`).then(a=>a.default)}function eu(i){return fetch(`/api/secrets/${i}`).then(s=>{if(!s.ok)throw s.status===403?Error("Secret access not allowed. Enable with --allow-secrets."):s.status===404?Error(`Secret name "${i}" not found. Pass in with ---secret ${i}:value.`):Error(`An unknown error occurred when fetching Secret "${i}": status code ${s.status}`);return s.text()})}function on(i){return()=>i.fileAttachments(s=>`/api/file-attachments?name=${encodeURIComponent(s)}`)}function un(i,s){let a=We(u=>`/api/file-attachments?name=${encodeURIComponent(u)}`);return()=>function(u){return i.Generators().observe(h=>{h(a(u));function d(p){let{names:x}=p.detail;x.includes(u)&&h(a(u))}return s.addEventListener("update",d),()=>{s.removeEventListener("update",d)}})}}function tu(i,s){return()=>i.Generators().observe(a=>{let u=s.clientWidth;a(u);let h=new ResizeObserver(d=>{let x=d[0].contentRect.width;u!==x&&a(u=x)});return h.observe(s),()=>h.disconnect()})}function iu(){let i=pt`<canvas width="100" height="100"></canvas>`,s=i.getContext("2d");s.fillStyle="white",s.arc(50,50,50,0,Math.PI*2),s.fill(),s.fillStyle="black",s.font="700 72px Monospace",s.textAlign="center",s.textBaseline="middle",s.fillText("df",50,50);let a=document.createElement("link");a.rel="icon",a.href=i.toDataURL(),document.querySelector("head").appendChild(a)}function ru(){iu();let i=new Map,s=document.querySelector("#dataflow-container"),a=document.querySelector(".dataflow-error-syntax"),u=new Map,h=new EventTarget,d=Me.into(s),p=an(),x=new ve(p),E=x.module(),w=new Ht.Interpreter({resolveImportPath:Zo,observeViewofValues:!1,observeMutableValues:!1});E.define("FileAttachment",on(x)),E.define("LiveFileAttachment",un(p,h)),E.define("Secret",()=>eu),E.define("width",[],tu(p,s));function O(v,C){if(!v||!v.FileAttachments)return;let _=!1;for(let[I,l]of Object.entries(v.FileAttachments))if(!C.has(I)||C.get(I)!==l){_=!0;break}for(let[I,l]of C)if(!v.FileAttachments[I]){_=!0;break}if(_){console.debug("DATAFLOW","re-defining file attachments"),C.clear();for(let[I,l]of Object.entries(v.FileAttachments))C.set(I,l);E.redefine("FileAttachment",on(x)),E.redefine("LiveFileAttachment",un(p,h))}}async function N(v){let{header:C,source:_}=v,I;for(O(C,u);a.firstChild;)a.removeChild(a.firstChild);try{I=Ht.parser.parseModule(_),a.classList.add("hidden")}catch(W){console.error(W),a.classList.remove("hidden");let ie=_.split(`
  `);a.appendChild(pt`<div style="padding: .5rem;">
          <div style="font-weight: 700; font-size: 1.2rem;">${W.name}</div>
          <div style="margin: 1rem 0;">${W.message}</div>
          <div style="background-color: rgba(220, 38, 38, .5);">
            <span
              style="margin-right: .5rem; background-color: rgba(220, 38, 38, .6);"
            >
              ${W.loc.line}
            </span>
            <code>${ie[W.loc.line-1]}</code>
          </div>
        </div>`);return}let l=new Map,$=new Set;for(let W of I.cells){let ie=W.input.substring(W.start,W.end);l.set(ie,l.has(ie)?l.get(ie)+1:0);let q=`${ie}${l.get(ie)}`;if($.add(q),i.has(q))continue;let vt=await w.cell(W,E,d).catch(He=>(console.error("Error loading notebook ",He,W),[E.variable(d()).define(null,["html"],zt=>zt`<div style="border: 1px solid maroon;">
                    <b>big oof import didn't work buddy</b>
                    <pre>${W.input.substring(W.start,W.end)}</pre>
                    <details style="display: inline-block;">
                      <summary style="display: inline-block;">show error</summary>
                      <div>
                        ${He.message}
                        <pre>${He.stack}</pre>
                      </div>
                    </details>
                  </div>`)]));i.set(q,vt)}for(let[W,ie]of i.entries())$.has(W)||(i.delete(W),ie.map(q=>{q._observer._node&&q._observer._node.remove(),q.delete()}));let pe=s.firstChild;for(let W of $){let ie=i.get(W);if(!!ie)for(let q of ie)!q._observer._node||(pe!==q._observer._node&&q._observer._node.parentElement.insertBefore(q._observer._node,pe),pe=q._observer._node.nextSibling)}}async function D(v){let{names:C}=v;h.dispatchEvent(new CustomEvent("update",{detail:{names:C}}))}async function P(v){let C=JSON.parse(v.data);switch(console.debug("DATAFLOW","received message",C.type,C,{event:v}),C.type){case"update":N(C.data);break;case"live-fa":D(C.data);break;default:console.error("DATAFLOW","Unknown type ",C.type,C.data,v);break}}let A=document.querySelector(".dataflow-footer-status");function M(){let v=window.location.protocol.startsWith("https")?"wss://":"ws://",C=new WebSocket(`${v}${window.location.host}`,"echo-protocol");C.addEventListener("open",function(_){console.debug("DATAFLOW","Socket opened"),A.textContent="\u2705 Socket connected!"}),C.addEventListener("close",function(_){console.debug("DATAFLOW","Socket is closed. Reconnecting...."),A.textContent="\u231B Connection closed, attempting to reconnect...",setTimeout(M,500)}),C.addEventListener("message",P)}M()}ru();
  