From 53828ef810c9b59f5b3e839f6a4ae3edc54b4b17 Mon Sep 17 00:00:00 2001 From: zojize Date: Fri, 17 Apr 2026 18:50:03 -0500 Subject: [PATCH 01/13] feat!: separate statement/expression tables + shallow depth default - Add ExpressionStatement:0 as explicit statement candidate - Filter raw expressions from statement context (statement-only tables) - Each statement type gets ~1/32 probability instead of ~1/256 - Cap SwitchStatement at 2 cases (was 15), ForStatement to 3 variants - Default maxExprDepth changed to 1 (leaf-only expressions) - Add hasExportDefault guard, name dedup for vars/imports - Output now resembles a real JS module: imports, declarations, exports BREAKING CHANGE: new encoding format due to candidate pool changes Co-Authored-By: Claude Opus 4.6 (1M context) --- packages/core/src/context.ts | 55 +++++++++++-------- packages/core/src/decode.ts | 15 +++-- packages/core/src/encode.ts | 17 ++++-- .../test/__snapshots__/roundtrip.test.ts.snap | 16 +++--- packages/core/test/roundtrip.test.ts | 11 ++-- packages/core/test/tables.test.ts | 19 +++++-- 6 files changed, 81 insertions(+), 52 deletions(-) diff --git a/packages/core/src/context.ts b/packages/core/src/context.ts index 1431ecc..e058f08 100644 --- a/packages/core/src/context.ts +++ b/packages/core/src/context.ts @@ -35,8 +35,11 @@ export interface ScopeEntry { type: ScopeType } -/** Max expression nesting depth before forcing leaf-only candidates. */ -export const MAX_EXPR_DEPTH = Infinity // default — override via createCodec for browser use +/** Max expression nesting depth before forcing leaf-only candidates. + * Default 1 — leaf-only expressions produce many short statements, making + * output resemble a real JS module with imports, declarations, and exports. + * Override via createCodec for deeper expression trees. */ +export const MAX_EXPR_DEPTH = 1 export type ScopeBucket = 'top-level' | 'function-body' | 'loop-body' | 'block-body' @@ -66,6 +69,7 @@ export interface EncodingContext { blockDepth: number scopeBucket: ScopeBucket prevStmtKey: string + hasExportDefault: boolean } export function initialContext(): EncodingContext { @@ -81,6 +85,7 @@ export function initialContext(): EncodingContext { blockDepth: 0, scopeBucket: 'top-level', prevStmtKey: '', + hasExportDefault: false, } } @@ -338,10 +343,11 @@ function buildAllCandidates(): Candidate[] { // ── Statement candidates (only available in statement context) ── - // ExpressionStatement is NOT a candidate — expression candidates in statement context - // are wrapped in ExpressionStatement automatically by the encoder's default case. - // Having ExpressionStatement:0 as a separate candidate creates ambiguity in the decoder - // (can't distinguish "expression selected directly" from "ExpressionStatement selected + inner expr"). + // ExpressionStatement: when selected, the encoder calls buildExpr for a separate + // expression-level table lookup. Expressions are excluded from the statement table + // so there's no ambiguity — ExpressionStatement:0 is the only way to get an expression + // in statement context. + c.push({ key: 'ExpressionStatement:0', nodeType: 'ExpressionStatement', variant: 0, children: ['expr'], weight: lookupWeight('ExpressionStatement:0'), isStatement: true }) // VariableDeclaration: var/let/const (weight 2) c.push({ key: 'VariableDeclaration:0', nodeType: 'VariableDeclaration', variant: 0, children: ['expr'], weight: lookupWeight('VariableDeclaration:0'), isStatement: true }) // var @@ -355,18 +361,13 @@ function buildAllCandidates(): Candidate[] { // WhileStatement (weight 1) c.push({ key: 'WhileStatement:0', nodeType: 'WhileStatement', variant: 0, children: ['expr', 'block'], weight: lookupWeight('WhileStatement:0'), isStatement: true }) - // ForStatement × 8 null combos (weight 0.8) - for (let v = 0; v < 8; v++) { - const ch: SlotKind[] = [] - if (v & 1) - ch.push('expr') - if (v & 2) - ch.push('expr') - if (v & 4) - ch.push('expr') - ch.push('block') - c.push({ key: `ForStatement:${v}`, nodeType: 'ForStatement', variant: v, children: ch, weight: lookupWeight(`ForStatement:${v}`), isStatement: true }) - } + // ForStatement — only the 3 most common variants to limit bit cost + // variant 7: for(init;test;update) — the standard form + c.push({ key: 'ForStatement:7', nodeType: 'ForStatement', variant: 7, children: ['expr', 'expr', 'expr', 'block'], weight: lookupWeight('ForStatement:7'), isStatement: true }) + // variant 3: for(init;test;) — no update + c.push({ key: 'ForStatement:3', nodeType: 'ForStatement', variant: 3, children: ['expr', 'expr', 'block'], weight: lookupWeight('ForStatement:3'), isStatement: true }) + // variant 6: for(;test;update) — no init + c.push({ key: 'ForStatement:6', nodeType: 'ForStatement', variant: 6, children: ['expr', 'expr', 'block'], weight: lookupWeight('ForStatement:6'), isStatement: true }) // DoWhileStatement (weight 0.8) c.push({ key: 'DoWhileStatement:0', nodeType: 'DoWhileStatement', variant: 0, children: ['expr', 'block'], weight: lookupWeight('DoWhileStatement:0'), isStatement: true }) @@ -377,8 +378,9 @@ function buildAllCandidates(): Candidate[] { // TryStatement (weight 0.5) c.push({ key: 'TryStatement:0', nodeType: 'TryStatement', variant: 0, children: ['block', 'block'], weight: lookupWeight('TryStatement:0'), isStatement: true }) - // SwitchStatement × case counts 0-15 (weight varies) - for (let n = 0; n <= 15; n++) { + // SwitchStatement × case counts 0-2 (capped — higher counts consume too many bits + // and dominate the output when selected from a bijective table) + for (let n = 0; n <= 2; n++) { const ch: SlotKind[] = ['expr'] for (let j = 0; j < n; j++) { ch.push('expr', 'block') @@ -475,9 +477,12 @@ export function filterCandidates(ctx: EncodingContext): Candidate[] { if (ctx.expressionOnly && c.isStatement) return false - // Statement context: BOTH statements and expressions are available. - // Expressions are implicitly wrapped in ExpressionStatement by the encoder. - // The decoder identifies them from the ExpressionStatement's inner expression. + // Statement context: only statements (including ExpressionStatement:0). + // Raw expression candidates are excluded — they're selected via a separate + // expression table when ExpressionStatement:0 is chosen. This gives statements + // proper probability (~1/30) instead of being drowned by ~200 expression candidates. + if (!ctx.expressionOnly && !c.isStatement) + return false // Top-level-only candidates: imports and exports are legal only at program root if ( @@ -489,6 +494,10 @@ export function filterCandidates(ctx: EncodingContext): Candidate[] { return false } + // Only one export default per module + if (c.nodeType === 'ExportDefaultDeclaration' && ctx.hasExportDefault) + return false + // Context-gated entries if (c.nodeType === 'ReturnStatement' && !ctx.inFunction) return false diff --git a/packages/core/src/decode.ts b/packages/core/src/decode.ts index 2aa8e3c..1037d16 100644 --- a/packages/core/src/decode.ts +++ b/packages/core/src/decode.ts @@ -260,12 +260,15 @@ export function decode(jsSource: string, options?: DecodeOptions): Uint8Array { // Directive is a leaf — no children to push (treated as StringLiteral:0, a leaf expression) break case 'ExpressionStatement': - // Expression was directly selected as a candidate in statement context - pushExprChildren((node as t.ExpressionStatement).expression, 0) + // ExpressionStatement:0 was selected from statement table; the inner + // expression is processed via the expression table (separate lookup) + work.push({ kind: 'expr', node: (node as t.ExpressionStatement).expression, depth: 0 }) break case 'VariableDeclaration': { const n = node as t.VariableDeclaration - const name = nameFromHash(hash, ctx.scope.length) + let name = nameFromHash(hash, ctx.scope.length) + while (ctx.scope.includes(name)) + name = `${name}${ctx.scope.length}` ctx.scope.push(name) work.push({ kind: 'var-decl', name, initNode: n.declarations[0].init!, depth: 0 }) break @@ -373,6 +376,7 @@ export function decode(jsSource: string, options?: DecodeOptions): Uint8Array { break } case 'ExportDefaultDeclaration': { + ctx.hasExportDefault = true const n = node as t.ExportDefaultDeclaration work.push({ kind: 'expr', node: n.declaration as t.Node, depth: 0 }) break @@ -450,9 +454,10 @@ export function decode(jsSource: string, options?: DecodeOptions): Uint8Array { const table = buildTable(candidates, hash) const bits = bitWidth(table.length) const rev = buildReverseTable(table) - // ExpressionStatement: always use the inner expression's key + // ExpressionStatement: use 'ExpressionStatement:0' for statement table lookup, + // then process the inner expression separately via the expression table const key = item.node.type === 'ExpressionStatement' - ? exprKey((item.node as t.ExpressionStatement).expression) + ? 'ExpressionStatement:0' : stmtKey(item.node) const value = rev.get(key) if (value !== undefined) { diff --git a/packages/core/src/encode.ts b/packages/core/src/encode.ts index 74e7345..766a461 100644 --- a/packages/core/src/encode.ts +++ b/packages/core/src/encode.ts @@ -315,7 +315,9 @@ export function encode(message: Uint8Array, options?: EncodeOptions): string { switch (c.nodeType) { case 'VariableDeclaration': { const kind = VAR_KINDS[c.variant] - const name = nameFromHash(hash, ctx.scope.length) + let name = nameFromHash(hash, ctx.scope.length) + while (ctx.scope.includes(name)) + name = `${name}${ctx.scope.length}` ctx.scope.push(name) const { node: init, candidate: initC } = buildExpr(0) const inferredType = initC ? inferTypeFromKey(initC.key) : 'any' @@ -387,7 +389,9 @@ export function encode(message: Uint8Array, options?: EncodeOptions): string { } if (c.variant === 1) { // default - const local = cosmeticImportedName(hash, 1) + let local = cosmeticImportedName(hash, 1) + while (ctx.scope.includes(local)) + local = `${local}${ctx.scope.length}` ctx.scope.push(local) ctx.typedScope.push({ name: local, type: 'any' }) return t.importDeclaration( @@ -399,7 +403,9 @@ export function encode(message: Uint8Array, options?: EncodeOptions): string { const count = c.variant - 1 const specifiers: t.ImportSpecifier[] = [] for (let i = 0; i < count; i++) { - const local = cosmeticImportedName(hash, 10 + i) + let local = cosmeticImportedName(hash, 10 + i) + while (ctx.scope.includes(local)) + local = `${local}${ctx.scope.length}` ctx.scope.push(local) ctx.typedScope.push({ name: local, type: 'any' }) specifiers.push(t.importSpecifier(t.identifier(local), t.identifier(local))) @@ -407,6 +413,7 @@ export function encode(message: Uint8Array, options?: EncodeOptions): string { return t.importDeclaration(specifiers, t.stringLiteral(pkg)) } case 'ExportDefaultDeclaration': { + ctx.hasExportDefault = true const { node: inner } = buildExpr(0) return t.exportDefaultDeclaration(inner) } @@ -452,7 +459,9 @@ export function encode(message: Uint8Array, options?: EncodeOptions): string { } return t.emptyStatement() } - default: return t.expressionStatement(buildExprNode(c, 0)) + case 'ExpressionStatement': + return t.expressionStatement(buildExpr(0).node) + default: return t.emptyStatement() } } diff --git a/packages/core/test/__snapshots__/roundtrip.test.ts.snap b/packages/core/test/__snapshots__/roundtrip.test.ts.snap index 0102962..9f4f74c 100644 --- a/packages/core/test/__snapshots__/roundtrip.test.ts.snap +++ b/packages/core/test/__snapshots__/roundtrip.test.ts.snap @@ -1,17 +1,17 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html -exports[`snapshots > all printable ASCII 1`] = `"switch((((({[((function translate(_wae,_xsa,_urm,_vii,_siu,_tzq,_qzc,_rqy,_opk,_phg,_mgs,_nyo,_qnc,_rfy,_oek,_pwg,_mvs,_nno,_kma,_lew,_idi,_jue){return (_nno<<=[(_oek&=(-(((((6,(((_nno=[((((((((--(_qnc))+((function values(_vei,_umm,_xna,_wve,_rly,_quc,_tuq,_sdu,_nto,_mbs,_pcg){return (({[(({[((function argumentCallback(_dln,_cur){return [\`ix\${((_yyy,_zqu,_aiq,_bzm,_kbc)=>((({[(((((function path(_vyb,_uhf,_xit,_wqx,_jwx,_ieb,_lfp,_knt,_noh,_mwl,_pxz,_ofd,_hbf,_gkj,_jlx,_itb){return (_rqy>>=(((function values(_ics,_jto,_gta,_hkw,_eki,_fbe,_caq,_dsm,_ary,_bju,_uww,_vos,_cpq,_dhm,_agy,_byu,_yxg,_zpc,_woo,_xfk,_ufw){return ((function ordinal(_uqo,_vil,_shw){return (((~(((({[((((((function formatRelative(_udw,_vvs){return (((function _chalk(_eni,_fee,_cdq,_dvm,_auy,_bmu,_ylg,_zdc,_wco,_xuk,_utw,_vks,_yag,_zsc,_wro,_xjk,_uiw,_vzs){return ((_wks,_xbo,_uba,_vsw,_sri,_tje,_qiq,_ram,_ozy,_pru,_mqg,_nic,_qxq,_rpm,_ooy,_pgu,_mfg,_nxc,_kwo,_lnk,_inw,_jes,_gde)=>\`u\${(_yag*=((new (((_shm,_tzi,_qyu,_rqq,_gei,_hwe,_evq,_fnm,_kxs,_loo,_ioa,_jfw,_ekq,_fcm,_cby,_dtu,_ica,_juw)=>void (((((_dqv,_cyz,_bhd,_aph,_ptz,_obd,_njh,_msl,_lap,_kjt,_jrx,_iab,_rnr,_qvv,_pez,_omd,_nuh,_mdl,_llp,_kut,_zxl,_ygp)=>[(_lap=((((_jfw||=((()=>(((new [(_gfn=>((_upt=>((((_cup,_dml,_alx,_bdt,_ycf,_zub,_wtn,_xlj,_ukv,_vbr,_sbd,_tsz,_qsl,_rjh,_oit,_pap,_mzb,_nrx,_gez,_hwv,_evh,_fnd,_cmp)=>[((\`am\${[new \`qjd\${({[(new (({[([[(((({[(((function e(_zdo,_yls,_bmg,_auk){return \`b\${((_viq,_uqu,_tyy,_shc,_rpg,_qyk,_pgo,_oos,_nxw,_mfa,_loe,_kwi,_jfm,_inq,_hvu,_gey,_fmc,_evg,_ddk,_cmo,_bus)=>(((_nuo,_mds,_pdg,_omk,_jce)=>(function o(_pdv,_olz,_nud,_mch){return false;})))?.(_tsz,"RC",_oos,_cmp,false,true,102,null,_vii,false,null,null))}bpxs\${"_"}vlj\${_msl}w\${"path"}jdkq\${127}wc\${false}tz\${null}jxdw\${null}noo\${false}reqy\${80}fg\${"f"}vqw\${null}od\`;}))(123,_byu,_dvm,true,false,102,false,_ioa,28,27,_zxl,10,false,null,_vbr,52))]:"w",[false]:null,[true]:_pwg}))!="119"))(37,_rqy),true,0,null,null,62,")",false,null,0.01,31,65536,_udw,"95",false,null,_hkw,_cup,false,"18.4",65,null,25,false,28,_nuh,_jfw,_vvs,null],_aiq,false,_ylg,true]\`smxe\${_pez}w\${"object"}zu\${_rly}in\${null}zlvr\${_tzi}xyt\${null}p\`)]:_lfp,17:null,40:"$",[false]:22,95:_sbd,"95":_upt,[null]:"object",_dln:_qxq,[false]:128,[null]:24,[null]:_dtu,"137":55296,_kwo:_zqu,_lfp:_xlj}))(_dsm,_mzb,"./_lib/convertToFP.js",_ufw,"A B",_sbd,false,true))]:26,_zdc:null,[null]:null,_oit:null,_pap:_bdt,9:null,_loo:true,[null]:18,[null]:"16.5"})}fx\${43}n\${"132"}zhzn\${127}i\${45}xt\${_mqg}oo\`(14,_loo,null,_sbd,"A B",false,_xuk,null,_lap),73,_sri,512,"8D",null,null,null,2,_qiq](22,_ycf,false,57,"a","./convert",_mzb,"module",_qzc,_wqx)}caw\${"x"}bgrb\${null}plg\`,_noh,null,false,"left",2048,true,42,_qvv,_cby,false,"end",_bju,_nic,true,"17.1",14,true,"DD/MM/YYYY","D MMMM YYYY","D MMMM YYYY",false,_dqv,20,false,_jlx,null,40,"../moment"),false,false,null,"M",_ram,false,7,_mzb,null,"keyword",false,"(",_dvm,_xit,_rjh,_ukv,_sri,false,37),true,_cby,null,null,_ptz,_lfp,"L",_nno,"|",null,_zub,_pru,true,_eki,90])).expression,_eki,63,"L",_kxs,null,_qiq,_bmu,_jlx,"pD",false,_fcm,_qxq,_kjt,25,0.01,true,9,54,"135",null,_nno,true)))(_cpq,null,_yxg,_qxq,_wco,59,_siu,123,_kma)),"8",null,_cyz,_qyu,"5",17,_pgu,true,44,73](_jto,"A",_tzi,_aiq,false,true,57,_idi,93,false))?.(null,false,_mgs,_wco,true,null,_mfg,"r",_ics,"2",_vks))?.(_jto,_fnm,"D",_jfw,23,null,false,_dqv,"i32",125,12,_dqv,true,"./convert"),_ram,"A B",52,_zdc,null)))))[null])._)),"33",true,54,_xuk,"$",_utw,_udw,4,false,_udw,21,49,_tje,73,false,61]),"D MMMM YYYY","18.3",null,true,null,25,_rqq,true,true,8,false,false,"utf8",true,_yyy,"133",42,95)))))("146",false,"$",_kma,false,_caq))(61,_wqx,"symbol","input","p",_jlx,false,14,_byu,_shw,"Identifier","140","146",true)))}hxut\${"u"}r\${_knt}yl\${_vyb}cubv\${null}qz\${"12"}nj\${null}jss\${"123"}zbzv\`);}))>>>"7D");}))<_mvs))??_vyb))]:null,123:_mvs,"end":null}))?.(false,_kma,43,false,_uww,"128","return",_cpq,null,90,false,"96"))))?.(true,_vos,null,true,null))/true);}))("8",47,_xit,_nto,200,47,null,_jlx,_yyy,21,null,false);}))?.(_vyb,36,"d",null,null,null,true,6,"boolean",_mbs,true)));}))/_opk),null,null,_nno,48,_kbc,false,_nno,"D MMMM YYYY HH:mm",73,null,null,false,_wve,61,_yyy,_siu,0.00539,0.00539,49,125,null,_aiq))]:_urm,_qnc:null,[true]:_xsa,_kma:null,47:"15.2-15.3","125":null,"79":_qnc,"production":true,[false]:_wve,25:_wae,6:47,_yyy:null,[true]:_rly,_opk:null,_jue:"145",_sdu:_xna,_rfy:_mgs,_umm:"^",_mvs:false,43:true}))+true))}vx\${null}zo\`,_wae,_lew,_xna,null,"key",15,null,_vei,0.00539,"_",false,null,_idi,29,_oek,false,_nyo,_tuq,_pcg,"_","class",1000,null,_mvs,"4.2-4.3",false];}))]:_vii,[null]:false,"J D E F A B 5C":_mbs,_tuq:_sdu,[false]:true}))]:_xna,39:"0",_opk:true,"17.4":true,[false]:null,_quc:"pD"}),_tuq,null,_rfy,20,_sdu,_tzq,_quc,_xsa,_nyo,53,52,_pcg,null,_rqy,"type","boolean",_pwg,_umm,_sdu,false,_rfy);}))))-false))?.("body","wide",true,"./placeholder",null,_xsa,_oek,null,29,16,_nyo,"33",null,"116",_xsa,null,9,true))^true))?.(null,null,"true","120",_qnc,"146",46),_wae,null,true,"array",_pwg,_mgs,_nyo,_siu,"115",_jue,"DD/MM/YYYY",null,_nno,4,"15.4","]",_nno,null,_vii]))?.("120"),null,48,null,101,"115",null,null,30,null,9,_vii,null,false,_mgs,101,_kma),_phg,_kma,null,500,null,5,true,false,_wae,true,false,"136","UC","!",null,"float","children","utf8",false,_urm,_vii,_tzq,100,_mvs,"wide"))(true,"g"))("15.4",_wae,false))))),_qzc,true,"D A",_kma,65536,null,null,"120","134",_idi,1024,_nyo,"115",true,"P",31,_qnc,_jue]);}))]:"26.2",[true]:null,63:73,0.00539:false,47:false,125:"8D",57:37,"data":false}))< all printable ASCII 1`] = `"import select from "node:fs";var _quq=((_rap,_qjt,_prx,_oab,_nif,_mrj,_lzn,_khr,_jqv,_iyz,_hhd,_gph,_fxl,_egp,_dot,_cxx,_bfb,_aof,_zwj,_yen)=>_dot(6));export var _ejx=({[(((_wov,_xgr)=>select))]:(--(_quq)),[((_quq++))]:(("96",null,select,_quq,_quq,null,select,"module","92",_quq,false,"140","122",true,116,_quq,false,null)),[(null("_",select,"path",127,false,null,null,false))]:((80,"f",null,60,null,null)),[("@"\`q\${select}wc\${_quq}tz\${null}jxdw\${select}noo\${null}reqy\${_quq}fg\`)]:(false?.(92,"115",select,null,_quq,_quq,true,false,102,false,_quq,28,27,_quq,10)),[((false,null,select,52,"w",false,null,true))]:(((_ofu,_pxq,_mwc,_noy,_sye,_tpa,_qpm,_rgi,_wqo)=>_quq)),[(("119",37,_quq,true,0,null,null,62,")",false,null,0.01,31,65536,select,"95",false))]:(null?.(_quq,_quq,false,"18.4",65,null,25,false,28,_quq,select,_quq,null,_quq,false,select,true,_quq)),[(({"object":select,[null]:select}))]:[null,null,90,null,20,_quq,null,1000,false,_quq,_quq,null,false,false,30,select,17,null,40,"$",false,22,95,_quq,"95",select,null,"object",_quq,select,false],[(new 128(null,24,null,select,"137",55296,select,select,select,select,_quq,_quq,"./_lib/convertToFP.js",select))]:(((_fho,_eps)=>"A B")),[((_quq,false,true,26,_quq))]:(null(null,null,_quq,null,select,select,9,null,select,true,null,18,null)),[(({"16.5":43,"132":127,45:select,[true]:null}))]:\`n\${_quq}zhzn\${"get"}i\`});var _cxa=(function translate(_ogk,_pyg,_mxs,_npo){return (function _chalk(_wnv,_xfr,_ywn,_zoj,_svl,_tmh,_ued,_vwz,_odb,_pux,_qmt,_rdp,_qbt,_rsp,_skl,_tbh){return "i";});});throw ((_sch,_tud,_qtp,_rll,_gad,_hrz,_eql,_fih,_ksn,_ljj,_ijv,_jar,_efl)=>((_xio,_wqs,_vyw,_uha,_lfk,_kno,_jws,_iew)=>0.00416));import{unescape,arrRemove,LineSegments,Sphere}from "uint8array-extras";throw [\`po\${14}njta\${select}wd\${null}k\${_cxa}k\`,-("8D"),(function unescape(_hlc,_gug,_fck,_eko,_lem,_kmq,_juu,_idy,_pww,_oea,_nne){return null;}),null(2,_ejx,22,_quq,false,57,"a","./convert",_quq,"module",LineSegments),[_cxa,"x",null,unescape,52,true,0.00539,"function",_cxa,false,"17.0",unescape,null,false,"left",2048,true,42,_ejx,arrRemove,false],~("end"),arrRemove?.(_cxa,true,"17.1",14,true,"DD/MM/YYYY","D MMMM YYYY","D MMMM YYYY",false,arrRemove),(unescape*=LineSegments),void ("}"),new false(40,"../moment",false,false,null,"M",_cxa),(false,7),[_quq,null,"keyword",false,"(",arrRemove,LineSegments,LineSegments,arrRemove,unescape,false,37,true,arrRemove,null,null],({arrRemove:LineSegments,"L":arrRemove,"|":null,_ejx:_quq,[true]:unescape,90:6,unescape:_quq,unescape:"\\"",select:_quq,select:"pD",[false]:select,_quq:_cxa,25:0.01,[true]:9,54:"135",[null]:Sphere,[true]:select,[null]:unescape,unescape:LineSegments,59:unescape,123:LineSegments,"8":null,unescape:Sphere,"5":17,unescape:true,44:73,select:"A",_quq:LineSegments,[false]:true,57:_ejx,93:false}),(function __export(_iqq,_jhm,_kzi,_lqe,_wnl,_xeh,_ywd,_znz,_afv,_bxr,_con,_dgj,_ocr,_pun,_qlj,_rdf,_sub,_tmx,_uet,_vvp,_gsx,_hjt,_ibp){return false;}),(function __(_cbx,_dst,_ekp,_fbl,_oec,_pvy,_qnu,_req,_kls,_ldo){return "}";}),(function w(_khj,_lyf,_mqb,_nhx,_ozu,_pqq,_qim,_rai,_sre,_tja,_uaw,_vss,_wjo,_xbk,_ytg,_zkc,_acy,_btu){return true;}),null(unescape,"r",LineSegments,"2",_cxa,arrRemove,_ejx,"D",LineSegments,23,null,false,Sphere,"i32",125),this,({12:_cxa,[true]:"./convert",unescape:"A B",52:_quq}),-(null),new null(null,"33",true,54,arrRemove,"$",LineSegments,select,4,false,_quq,21,49,_cxa,73),false\`cgdk\${61}d\${"D MMMM YYYY"}a\${"18.3"}y\`,fn,(function _typeof(_oaq){return false;}),new false("utf8",true,arrRemove,"133",42,95)];debugger;throw ({[(("146",false,"$",_quq))]:(((_dfl,_cop,_fpd,_exh,_rdh,_qll,_tmz,_sud,_vvr,_udv,_xej,_wmn,_jsn,_iar,_lbf,_kjj,_nkx)=>false)),[(((_ofg,_pxc,_qoy,_rgu,_aik,_bzg,_crc,_djy,_wqa,_xhw,_yzs,_zqo,_ccc,_duy)=>_ejx))]:(({61:Sphere,"symbol":"input","p":_quq,[false]:14,select:Sphere,"Identifier":"140","146":true,"u":_quq,select:null,"12":null,"123":256,[null]:"0",54:Sphere,select:null,unescape:97})),[(("8",255,arrRemove,null,false,_ejx,null,null,null,"9D AE","7D",select,select,null,123,select,"end",null,false,_ejx,43,false,_ejx))]:((arrRemove*=_quq)),[[true,62,90,false,"96",true,_cxa,null,true,null,true,"8",47,arrRemove,select,200,47,null,LineSegments,select,21,null]]:((function replace(_dud,_cdh,_bll,_atp,_zct,_ykx,_xtb,_wbf,_vkj){return select;})),[(({80:arrRemove,[null]:null,[null]:null,[true]:6,"boolean":Sphere,[true]:select,[null]:null,_quq:48,Sphere:false}))]:(({_quq:"D MMMM YYYY HH:mm",73:null,[null]:false,_quq:61,_cxa:unescape,0.00539:0.00539,49:125,[null]:arrRemove,_ejx:unescape,[null]:true,_quq:_ejx,[null]:47,"15.2-15.3":"125",[null]:"79",unescape:"production",[true]:false,_quq:25,select:6,47:_cxa,[null]:true,_ejx:select,[null]:arrRemove,"145":arrRemove,select:arrRemove,_ejx:Sphere})),[(new "^"(select,false,43,true,true))]:((_cxa++)),[(({LineSegments:"id",[null]:null,arrRemove:unescape,[true]:40,[null]:null,"key":15,[null]:_ejx,0.00539:"_",[false]:null,arrRemove:29,_cxa:false,arrRemove:_quq,_quq:"_","class":1000,[null]:unescape,"4.2-4.3":false}))]:(/rpun/gisy),[(((_akd,_bbz,_ybl,_zsh,_ecn,_fuj,_ctv,_dkr,_iux,_jmt,_glf,_hdb,_gwe,_hoa)=>"style"))]:(({_ejx:53,select:null,"0":Sphere,[true]:"17.4",[true]:false,[null]:select,"pD":_ejx,[null]:unescape,20:_quq,_quq:select,arrRemove:unescape,53:52,select:null})),[(/ll/dimsu)]:[LineSegments,false,unescape,false,"body","wide",true]});import{LinearSRGBColorSpace}from "estraverse";import{Matrix3}from "parse5-htmlparser2-tree-adapter";import "gulp-bump";import{util,localize}from "node:worker_threads";debugger;import{parse,ClampToEdgeWrapping,popScheduler}from "levn";import AST_Class from "fetch-blob/from.js";import "estraverse";import{render_effect,addRegexToken,Object3D}from "d3-drag";["./placeholder"(null,unescape,Object3D,null,29,16),[_quq,"33",null,"116",_cxa,null,9,true,true,null,null,"true","120"],\`a\${Sphere}kz\${"146"}jh\${46}kjmw\${_cxa}fp\${null}rjz\${true}rr\${"array"}bku\${Matrix3}idpk\${Sphere}tsvf\${LinearSRGBColorSpace}j\`];import{ramp,WebGLRenderTarget}from "gulp-tag-version";export default /zbex/dsy;import{Line,AST_Number,isArrayLike}from "node:stream/promises";export var _jpb=\`iszf\${(Matrix3--)}yij\${[unescape,null,500]}j\${new null(5,true,false,util,true)}fgs\${\`fgnm\${false}tg\${"136"}zkbt\${"UC"}j\${"!"}c\`}mexd\${(LinearSRGBColorSpace-"wide")}pwjt\${[true,"g","15.4",parse,false,select,true,"D A",parse,65536,null,null,"120","134",LinearSRGBColorSpace,1024,Matrix3,"115",true,"P",31,AST_Number,_cxa,"26.2",AST_Number,null,63,73,0.00539,addRegexToken,47]}ty\${[false,125,popScheduler,arrRemove,37,"data",false,false,null,null,null,"134",popScheduler,Object3D,false,21,false,"^",6,15,AST_Class,false,isArrayLike,6,ClampToEdgeWrapping,localize,_quq]}pyki\${(ClampToEdgeWrapping--)}gcoe\${((_hod,_gxh,_jxv,_igz)=>false)}hwhp\${new arrRemove(null,"17.4",null,null)}au\${AST_Number}t\`;"`; -exports[`snapshots > binary: deadbeef 1`] = `"switch((((({[((function c(_vku,_usy,_xtm,_wcq,_rsk,_qao,_tbc,_sjg,_jnq,_iwu,_pjs,_kfm,_pys){return (_pys&&=true);}))]:\`eood\${(("17.4","key",0,null,"S",200),true,true,null,null,true,50,"H",false,null,false,null,false,13,"18",92,"none",true,20,"M","p")}zei\${"17.0"}m\${null}ukk\`,[null]:true,[false]:null,[null]:"92",[null]:null,59:false,"{":false,"..":23}))<<11))){case true:case "HH:mm":case false:case false:case false:}"`; +exports[`snapshots > binary: deadbeef 1`] = `"import select from "node:fs";var _quq=((_rap,_qjt,_prx,_oab,_nif,_mrj,_lzn,_khr,_jqv,_iyz,_hhd,_gph,_fxl,_egp,_dot,_cxx,_bfb,_aof,_zwj,_yen)=>92("17.4"));export const _zad=[("key",0,null,"S",_quq,true,select),(null&&null),(select&&=23),[_quq,"126",null,null,false,null,false,13,"18",select,select],true,20,select,"p","17.0",null,null,select];"`; -exports[`snapshots > hello, world! 1`] = `"switch((((({[((function clone(_vku,_usy,_xtm,_wcq,_rsk,_qao,_tbc,_sjg,_jnq,_iwu,_pjs,_kfm,_pys){return new \`bx\${(({[((function next(_nne,_mvi){return (\`xaw\${[]}vtd\${\`shij\${((_btg,_ack,_zko,_yss,_fmq,_euu,_dcy,_clc,_jea,_ime,_hvi,_gdm,_hgi,_gom,_fxq,_efu,_lys,_kgw,_jpa,_ixe)=>new ((err,(class{}),17,_zko,null,_efu,"17.3",_yss,"children",null))(36,null,_efu))}lab\${73}n\${true}eogg\${"../moment"}mpuk\${_qao}bs\${true}jy\${"style"}lz\${_usy}t\${false}ig\${null}yxm\${_vku}ttt\${false}aek\${null}u\${_rsk}jk\${26}hp\`}eh\${"7D"}yzlr\${512}f\${_pys}tbze\${"value"}qsr\${_jnq}emv\`%"=");}))]:"HH:mm"}))(27,100,"120",_iwu,_sjg)}exu\${null}v\${false}p\${_rsk}ytbc\`(_jnq,false,false,_vku,"123",true,false);}))]:500,90:null,0:"18",[null]:null,[false]:null,256:null,[null]:65536,[null]:null}))< hello, world! 1`] = `"import select from "node:fs";var _quq=((_rap,_qjt,_prx,_oab,_nif,_mrj,_lzn,_khr,_jqv,_iyz,_hhd,_gph,_fxl,_egp,_dot,_cxx,_bfb,_aof,_zwj,_yen)=>_yen(65));export const _zad=80;var _wmh=[false,null,null,select,"17.3",_quq,"children",null,36,null,_quq,73,true,"../moment",_zad,true,"style",_quq]\`shij\${(false,null,select,false,null,_quq)}lab\${((_tac,_sjg,_rrk,_qao,_fdg,_emk,_duo,_ccs,_blw,_ata,_zce,_yki,_hxy,_ggc,_fog)=>26)}n\`;export var _bpx=((null&&_zad))?.(({select:select,[null]:true,"119":false,[null]:21,_wmh:14,select:_zad,[false]:_zad,"d":_zad,[true]:select,58:_zad,_quq:_quq,select:true,_quq:"127","meta":select,[true]:"error",[null]:"16.2","18.4":65536,_quq:0.00539,_wmh:null,select:true,_wmh:true,[false]:"=","HH:mm":27}),100("120",_wmh,select,null,false,_wmh,"../moment"),\`iomn\${_zad}u\${false}o\${select}kovw\${select}pktl\${null}e\${select}rkbb\${"/"}dymj\${9}ito\${true}ncm\${_zad}kfoq\${select}sz\${_quq}hdty\`,64,[_quq,false,58,null,128,true,"123",true,39,true,_quq,93,"..",33,_zad,true,true,29,_wmh,"140",54,true,63,_zad],_quq?.(_wmh,select,61,_wmh,"17.3",91,_zad,null,true,null,_zad,_zad,false),"15.4");"`; -exports[`snapshots > json-like 1`] = `"switch((((({[(({[(({[[([\`uowd\${((_khn,_lzj,_mrf)=>(function f(_mra,_njw,_oas,_pso,_aow,_bgs,_cxo,_dpk,_egg,_fyc,_gqy,_hhu,_yue,_zla,_adw,_bvs,_cmo,_dek,_evg){return ((_mms,_ndo,_kca,_luw,_qec,_rwy,_ovk)=>((_icl,_jth,_gtt,_hkp,_ekb,_fbx,_caj,_dsf,_arr,_bjn,_yiz,_zav,_cpj,_dhf,_agr,_byn,_yxz,_zpv,_woh,_xfd,_ufp,_vwl)=>void (((_luw**=(((_cct,_dtp)=>(new ((function o(_crs,_djo,_aia,_baw,_yzi,_zqe,_wqq){return ({[(((_fte,_eci,_hcw,_gla,_rwj,_qfn,_tfb,_sof,_nez,_mmc,_pnr,_ovv,_zhd,_yph,_bqv,_ayz,_vpt,_uxx,_xyl,_wgp,_hrx,_gab,_jbp)=>(function s(_syy,_tqu,_qpg,_rhc,_gvu,_hnq){return [({[(-((({[((null,"79",_gqy,_dpk,"139","b",127,null,44,null,_yph,"y",null,"HH:mm:ss","138",_tfb,116,_xyl,null,_yph,null,true))]:_bjn,":":9,[null]:_tfb,[true]:false,_mra:_gla,_ufp:2,[false]:_mms,[true]:_byn,":":"in","data":"<",[null]:55296,_dhf:_gvu,_cct:"18.0",_gla:null,_pnr:false,_fbx:"7D",[null]:_mra,255:"float","18.0":_zpv,_oas:_hcw,63:null,[false]:"#",56:false,_fbx:null,_crs:",",[null]:27,96:null,[false]:true,[true]:null,[null]:"m",_djo:"5"}))))]:false,45:"D A","16.0":54,"D A":null,45:_yph,"__esModule":"w",[null]:_woh,"96":47,[null]:null,"]":null,[false]:_kca,[null]:"r",12:null,[false]:_rhc,_lzj:96,[true]:null,[null]:null,123:_byn,_caj:true,[null]:false}),13,_vpt,null,true,false,_aia,23,null,_cpj,_gab,"end","./_lib/convertToFP.js",false,null,null,"__esModule",_yxz,null,null,56320,8,_lzj,12]\`sbv\${_bvs}b\`;})))]:512,_dhf:null,[true]:true,12:"18.1",[null]:false,"b":4,_yxz:_yiz,[null]:null,_bgs:null,[null]:false});}))())\`tuv\${3}p\${40}usqo\${_fyc}n\${_dpk}fjcm\${_ovk}z\${true}tag\`)))))));}))}a\${"<"}sl\${null}jqpr\${"_"}aa\${"J D E F A B 5C"}jzqx\${true}hst\${true}fw\${"142"}ns\${12}xpa\${null}jk\${false}rizw\`],null,"125","12"),")",null,null,"null",127,"2",0.5,null,false,false,null]]:null,[false]:null,"18.3":null,[null]:null,"s":true,[false]:"y","]":false,[false]:0.00416,31:false,0.00416:null,"/":null,"^":null,[null]:"children","135":true,6:true,[null]:15,[null]:30,[null]:"key",[true]:false,96:56}))]:null,"#":null,"RC":9,"119":39,[false]:"136",[false]:true,"none":"16",[null]:"138",[false]:false,[null]:true,[false]:false,[true]:false,[true]:"125","145":"16.1",125:21,[true]:26,41:30,"svg":25,[true]:26,"16.0":"134","16.0":17,[false]:6,57:5,[false]:"18.4",20:null,65535:true,"17.0":null,[null]:"./convert",[false]:false,33:500}))]:null,38:30,[false]:false,37:2,42:false,"26.4":true,"f":"wide",[null]:41}))< json-like 1`] = `"import select from "node:fs";var _quq=((_rap,_qjt,_prx,_oab,_nif,_mrj,_lzn,_khr,_jqv,_iyz,_hhd,_gph,_fxl,_egp,_dot,_cxx,_bfb,_aof,_zwj,_yen)=>true(25));import{createOperatorSubscriber}from "robust-predicates";import "node:readline";export const _kvq=new (null("79",_quq))(((_zaq,_yiu,_xry,_wzc,_nxm,_mfq,_lou,_kwy,_rpw,_qya,_pge,_ooi,_fms,_evw,_dda,_cme,_jfc,_ing,_hvk,_geo,_xcy)=>createOperatorSubscriber),((_obx,_pst,_qkp,_rcl,_aeb,_bvx,_cnt,_dep,_wlr)=>"139"),("b"&&127));export let _czu=([null,44,null,_kvq,"y",null,"HH:mm:ss","138",select,116,createOperatorSubscriber,null,_kvq,null,true,createOperatorSubscriber,":",9,null,createOperatorSubscriber,true,false,_kvq,createOperatorSubscriber,select,2,false],(_kvq<>>=56),(createOperatorSubscriber+="17.5"),({_kvq:_quq,",":null,27:96,[null]:false,[true]:true,[null]:null,"m":createOperatorSubscriber,"5":false,45:"D A","16.0":54,"D A":null,45:_kvq,"__esModule":"w",[null]:createOperatorSubscriber,"96":47,[null]:null,"]":null,[false]:_quq,[null]:"r",12:null,[false]:_quq,_quq:96,[true]:null,[null]:null,123:_kvq,createOperatorSubscriber:true}),({[null]:false,13:createOperatorSubscriber,[null]:true,[false]:_kvq,23:null,_quq:_quq,"end":"./_lib/convertToFP.js",[false]:null,[null]:"__esModule",_quq:null,[null]:56320,8:select,12:select}),(function isFunction(_pzv,_oiz,_nqd,_mzh,_tsf,_saj,_rjn,_qrr,_xkp,_wst,_vbx,_ujb){return _kvq;}),({select:null,512:createOperatorSubscriber,[null]:true,[true]:12,"18.1":null,[false]:"b",4:_quq,_kvq:null,[null]:select,[null]:null,[false]:3,40:createOperatorSubscriber,_kvq:_kvq,[true]:false,[false]:_quq,[null]:48,select:32,_quq:select,[true]:createOperatorSubscriber,"left":127,_kvq:"_",_quq:true,[true]:"142",select:null,[false]:null,40:58,select:"{",_kvq:null,[false]:_quq,24:null}),new _kvq(_kvq,false,false,_quq,_quq,createOperatorSubscriber,false,"./convert","|",false,"2",null,false,"125"),1000,\`ljr\${"./_lib/convertToFP.js"}lbv\${_kvq}uu\${null}afv\${"null"}b\${127}evc\${"2"}ecqi\${0.5}jiu\${null}zbfr\${false}hxj\${_kvq}j\${null}omev\${null}eta\`,new _kvq(30,_quq,createOperatorSubscriber,true,"124",null),(select<<=27),((_gnm,_hfi,_iwe,_joa,_cvc,_dmy,_eeu,_fvq,_ycs,_zuo,_amk,_bdg,_uki,_vce,_wta,_xlw,_qsy,_rju,_sbq,_ttm,_mao)=>"#"),_quq,true,null,"119",_kvq,false,createOperatorSubscriber,_quq);"`; -exports[`snapshots > sentence 1`] = `"switch((((({[(({[[((_vjw,_ura,_tze,_sii,_zbg,_yjk,_xso,_was,_dtq,_ccu,_bky,_asc,_hla,_gue,_fci,_elm)=>(function parse(_gio,_hzk,_ezw,_fqs,_sls,_tco,_qba,_rtw,_osi,_pke){return (function f(_wtm,_xli,_uku,_vcq,_iwq,_jom,_gny,_heu,_eeg,_fvc,_cvo,_dmk,_kqi,_lie,_ihq,_jzm,_gyy,_hpu,_epg,_fgc,_sbc,_tsy,_qsk){return (function format(_xgy,_woc,_zpq,_yxu,_jjc,_irg,_lsu,_kay,_fqs,_ezw){return new ((\`ae\`,\`v\${new (new ((({[[(_was^=\`hc\${((_szf,_tqb,_uix,_vat,_wrp,_xjl,_yah,_zsd,_ajz,_bbv,_ctr,_dkn,_ylh,_zdd,_avz,_bmv,_cer,_dvn,_enj)=>[(_gue,false,_xli,_kqi,"meta",null,true,null,_zbg,null,"J D E F A B 5C","wide",39,_yxu,_ccu,_osi,_fci,_ezw,null,28,15,_dvn,0,_tsy,"15.4",63,_hzk,_ezw,_gyy),_ajz,_wrp,"16.1","none",_ihq,_ezw,54,null,"#",_xgy,false,_zpq,null,"123",_was,false,_irg,null,_vat])}z\${"/"}a\${_xli}d\${null}zxa\${123}pqqe\${_tze}i\${false}bai\${null}bz\${_gio}uz\${_osi}s\${_woc}qjng\${false}aa\${"9D AE"}ebc\`),52,38,null,2,"-",0.00416,false,"body",false,null,31,true,_irg,_jzm,73,_hpu,_fci,95,false,null,_tsy,null,"<",false,_tze]]:33,62:"/",[null]:46,17:true,[null]:null,49:true,_gue:"null",256:_pke,"\`":true,[true]:40,_gny:null,_yjk:"number",[null]:_gio,[null]:false}),"wide",62,_eeg,_ezw,true,true,_fvc,"'",27,"g",_bky,24,false,_iwq,"16.2",_gny,_ezw,"MemberExpression",_gny))(_rtw,_pke,_zbg,true))(_heu,7,null,false)}xqce\${_lie}wa\${7}uuc\${false}mw\${true}h\${false}mbx\${10}zxv\${"1"}bkgi\${"142"}ahls\`(_woc,31,null,"127",_lsu,true,_woc,"]",_xli,true,null,_fgc,43,100,9,false,true),96,null,_jzm,"J D E F A B 5C","name",null,_xli,_ezw))(true,"default",_hla,36,null,_gny,_osi,null,_xgy,4,_asc,_pke);});});})),false,false,"object",true,null,null,"142",null,102,false,"16",null,false,"18.0",null,null,true,null]]:"object",1024:null,"meta":null,[false]:false,32:false,[true]:"value","130":null,[true]:true,1:false,"end":null,"26.3":22,[false]:false,37:"HH:mm",[false]:null,[true]:true,11:null,[true]:"name",[true]:55296,1024:30,"123":true,"../moment":10,[false]:"128","div":62,[null]:"class",[null]:91,"S":null,"26.1":null,"float":18,[true]:null,90:false}))]:null,"8":null,[true]:"key",[null]:512,"none":80,"#":true,[false]:58,[false]:"16.1"}))<<102))){case "#":case null:case true:case "J D E F A B 5C":case null:}"`; +exports[`snapshots > sentence 1`] = `"import select from "node:fs";var _quq=((_rap,_qjt,_prx,_oab,_nif,_mrj,_lzn,_khr,_jqv,_iyz,_hhd,_gph,_fxl,_egp,_dot,_cxx,_bfb,_aof,_zwj,_yen)=>_egp(70));import{createOperatorSubscriber}from "robust-predicates";var _wuk=({[(({80:true}))]:[],[["16.0",null]]:((select--)),[(select?.(false,createOperatorSubscriber,true,null,_quq,null,"J D E F A B 5C","wide",39,_quq,select,select,createOperatorSubscriber,select,null,28))]:(new 15(_quq,0,createOperatorSubscriber,"15.4",63,createOperatorSubscriber,_quq,select,_quq,select,"16.1")),[(({"none":_quq,_quq:54,[null]:"#",_quq:false,select:null,"123":_quq,[false]:select,[null]:createOperatorSubscriber,"/":_quq,[null]:123,_quq:false,[null]:select,select:createOperatorSubscriber,[false]:"9D AE",createOperatorSubscriber:true,"18.0":createOperatorSubscriber,"18.2":null,[null]:_quq,[null]:true,[true]:select,"meta":select,select:createOperatorSubscriber,[null]:23,[null]:42}))]:\`bm\${_quq}pao\${"#"}ipr\${_quq}w\${_quq}dm\${256}cin\${true}op\`,[((createOperatorSubscriber+="production"))]:(("130">_quq)),[((_quq-=false))]:((function buildFormatLongFn(_clp,_ddl,_acx,_but,_qil,_rah,_ozs,_pro,_ubv,_vsr,_ssd,_tjz,_oot,_pgp,_mfb,_nxx,_sgd,_tyz){return createOperatorSubscriber;})),[[null,"<",false,_quq,33,62,"/",null,46,17,true,null,null,49,true,createOperatorSubscriber,"null",256,select,"\`",true,true,40,createOperatorSubscriber,null,createOperatorSubscriber,"number",null]]:((select&=_quq)),[((_quq++))]:((_quq,true,select,select,null,true,true,_quq,"'",27,"g",createOperatorSubscriber,24,false,createOperatorSubscriber,"16.2",createOperatorSubscriber,_quq)),[\`a\${"MemberExpression"}ajxt\${select}g\${createOperatorSubscriber}dos\${_quq}zyl\${select}qd\${true}avbx\${_quq}cel\`]:(((_ayl,_bph,_yot,_zgp,_eqv,_fhr,_chd,_dyz,_iif,_jab,_gzn,_hrj,_map)=>_quq)),[true]:true,"A":true,"4.2-4.3":false,"^":_quq});"`; -exports[`snapshots > short: "hi" 1`] = `"switch((((({[((function each(_vku,_usy,_xtm,_wcq,_rsk,_qao,_tbc,_sjg,_jnq,_iwu,_pjs,_kfm,_pys){return \`qkn\${[false,6,_usy,_pjs,14,"5","d",26,125,_rsk,"null",true,_pys,_rsk,"79","26.4",127,_vku,null,_usy,_kfm,false,"null",5,"26.2",null,null,_iwu,true,_xtm]\`jmdz\${null}f\${null}cyrd\${true}l\`}c\${"131"}wpt\${false}coc\${null}mjbz\${10}tgh\${21}wqy\${"17.2"}bfd\${_qao}h\${_jnq}hw\${true}ucab\${null}yud\${_sjg}aq\`;}))]:125,"[":65535,28:true,"class":false,97:65536,"133":false,[null]:null,[null]:"S"}))<<31))){case 95:case false:case false:case "?":case 65536:}"`; +exports[`snapshots > short: "hi" 1`] = `"import select from "node:fs";var _quq=((_rap,_qjt,_prx,_oab,_nif,_mrj,_lzn,_khr,_jqv,_iyz,_hhd,_gph,_fxl,_egp,_dot,_cxx,_bfb,_aof,_zwj,_yen)=>"]"(null));export const _zad=({[((6&&_quq))]:((function findKey(_hge,_gpi){return select;}))});"`; -exports[`snapshots > single byte 0x42 1`] = `"switch((((({[((function map(_vku,_usy,_xtm,_wcq,_rsk,_qao,_tbc,_sjg,_jnq,_iwu,_pjs,_kfm,_pys){return [(_sjg<<"object"),26,125];}))]:"function",[false]:true,[true]:false,34:"26.1",[null]:"p",11:125,44:true,".":1}))< single byte 0x42 1`] = `"import select from "node:fs";var _quq=((_rap,_qjt,_prx,_oab,_nif,_mrj,_lzn,_khr,_jqv,_iyz,_hhd,_gph,_fxl,_egp,_dot,_cxx,_bfb,_aof,_zwj,_yen)=>null(_hhd));export const _zad=("object"?.(26,125,"function",false,true,true,_quq))(_quq,_quq,_quq,select);"`; -exports[`snapshots > url 1`] = `"switch((((({[(({[(({[(({[((function findIndex(_umr,_ven){return [(function _chalk(_mig,_nzc,_kyo,_lqk,_qaq,_rrm,_ory,_piu,_usa,_vkw,_sji){return \`kru\${(\`ymfs\${\`ee\${this}m\${(_nzc<<=(({[[[[((((function _typeof(_wrc,_xjy,_ybu,_zsq,_akm,_bbi){return (function l(_qhk,_rzg,_kmi,_pqo,_idq,_jum,_guy,_hlu,_elg,_fcc,_cbo){return ({[((_rrm=(new [true,_nzc,true,null,"symbol",null,null,28](_pqo,54,"(",9,"set",_fcc,"137",34,_ory,_fcc,"default"))))]:true,[false]:"115","26.3":_bbi,_qaq:92,4:"full",_bbi:_elg,[null]:_ven,[true]:null,_sji:null,[null]:_kyo,"w":null,"#":_rzg,_kyo:0.01,_ybu:_xjy,[true]:255,[null]:true,[null]:1000,_idq:null,"boolean":42,_vkw:_ybu,"!":true,"17.2":null,[null]:_kmi,[false]:_cbo,"./placeholder":_qaq,[null]:64});});}),30,true,"Object",_sji,18,50,43,_rrm,_lqk,null,true,true,true,"left",false,"in",false,_nzc,null,_qaq,_ven,19,_sji,null,_rrm,_sji,53),"[",_ory),false,_umr,true,_umr,_ory,_vkw,_vkw,"KB",_qaq,_vkw,_umr,null,500,null,false,true,_qaq,null,null),null,false]],10,"9D AE",null,null,16,_usa,9,null,"16.0",36,_sji,true,64,_piu,_ven,15,null]]:_rrm,[false]:_umr,[null]:"137"})))}kge\${true}uud\${18}tsx\${"134"}plcc\`}lwz\${_qaq}bckq\${_rrm}tbny\${null}cvqe\${125}i\${33}t\${_nzc}gyi\${_ory}eniw\${10000}uhp\${"129"}olfz\${"26.3"}k\${null}lam\${null}tjuh\${true}wpp\`-_vkw)}gb\${"MemberExpression"}jf\${19}i\${_lqk}qy\${_ory}ib\${_usa}f\${_rrm}lc\${_umr}bcmu\${10000}qihl\${_sji}rldp\`;}),null,_ven,null,_umr,true,_ven,true,"146",null,_ven,null,_umr,null,_umr,"16.1",_ven,_umr,_umr,_ven,_umr,_umr,_ven,null,0];}))]:20,"float":", ","18.5-18.7":true,"error":false}))]:0,[null]:"body",[null]:true,73:"f",19:"26.4",[true]:false,[null]:null,[false]:18,"26.4":33,"4.2-4.3":"\\\\","D":"value",[null]:65,26:80,[true]:null,[null]:"?"}))]:true,"any":null,"\\\\":null,[null]:null,[false]:true,[true]:20,[null]:true,93:"return",127:true,"|":"error",[null]:31,1:255,[true]:3,"function":93,[true]:1,55:"?","D A":"object",[null]:"134","L":"33",48:91,"right":false,[null]:false,[null]:95,"140":false,42:":",[null]:"18.0",12:null,[true]:"18.4","D MMMM YYYY":"'",32:null}))]:"95",[true]:0.00416,"18.2":null,"HH:mm:ss":", ",[null]:null,[false]:null,[null]:43,[true]:"data"}))< url 1`] = `"import select from "node:fs";var _quq=((_rap,_qjt,_prx,_oab,_nif,_mrj,_lzn,_khr,_jqv,_iyz,_hhd,_gph,_fxl,_egp,_dot,_cxx,_bfb,_aof,_zwj,_yen)=>_aof(true));import{createOperatorSubscriber}from "robust-predicates";import{FileLoader,Observable}from "#compiler/builders";export default ((function l(_nno,_mvs,_ldw,_kma,_bkk,_aso,_zbs,_yjw,_fcu,_eky,_dtc,_cbg,_tzq,_shu){return "__esModule";}))[(FileLoader&&=FileLoader)];export const _pok=(function has(_fpn,_exr,_hyf,_ggj,_bxd,_afh,_dgv){return [_hyf,"symbol",null,null,28,_afh,54,"(",9,"set",_afh,"137",34,_ggj,_afh,"default",true];});(((function F(_txs,_sfw,_vgk,_uoo,_hun,_gcr,_jdg,_ilj,_lmy,_kuc,_nvq,_meu,_zjt){return null;}))||(+("115")));import{assertString,_curry1,EMPTY,convertToFP}from "uint8array-extras";;export var _tyv=new (("26.3",EMPTY,assertString,92,4,"full",EMPTY,_curry1,null,_quq,true,null))((_curry1&=FileLoader),({[null]:Observable,"w":null,"#":select,Observable:0.01,_pok:Observable,[true]:255,[null]:true,[null]:1000,FileLoader:null,"boolean":42,_quq:_pok,"!":true,"17.2":null,[null]:_quq,[false]:convertToFP,"./placeholder":assertString}),\`q\${null}i\${64}h\${30}h\${true}fzs\${"Object"}coe\${assertString}n\`,(EMPTY<<=false),"in"(false,FileLoader,null,convertToFP,convertToFP,19),({select:null,createOperatorSubscriber:Observable,53:"[",select:false,Observable:true}),((_huz,_gdd,_flh,_etl,_lmj,_kvn,_jdr,_imv,_pft,_onx,_nwb,_mef,_txd,_sfh,_rol,_qwp,_xpn,_wyr)=>Observable),[createOperatorSubscriber,_pok,_curry1,"KB",Observable,assertString,EMPTY,null,500],\`gnt\${null}dhmt\${false}v\`,--(_pok));"`; diff --git a/packages/core/test/roundtrip.test.ts b/packages/core/test/roundtrip.test.ts index f0b5944..b730c9e 100644 --- a/packages/core/test/roundtrip.test.ts +++ b/packages/core/test/roundtrip.test.ts @@ -211,13 +211,10 @@ describe('data lives in AST structure, not literal values', () => { // bigint values, template strings, labels, var names, catch params), // regenerate JS from the mutated AST, and verify decode still works. + let nameIdx = 0 function randomizeName(): string { - // _ prefix guarantees it's never a JS keyword - const chars = 'abcdefghijklmnopqrstuvwxyz' - const len = 1 + Math.floor(Math.random() * 5) - let s = '_' - for (let i = 0; i < len; i++) s += chars[Math.floor(Math.random() * chars.length)] - return s + // Unique names to avoid duplicate declarations + return `_r${nameIdx++}` } let nameCounter = 0 @@ -305,7 +302,7 @@ describe('encode output validity', () => { ] for (const msg of msgs) { const js = encode(msg) - expect(() => parse(js)).not.toThrow() + expect(() => parse(js, { sourceType: 'module' })).not.toThrow() } }) diff --git a/packages/core/test/tables.test.ts b/packages/core/test/tables.test.ts index abb0fbf..1daa4ef 100644 --- a/packages/core/test/tables.test.ts +++ b/packages/core/test/tables.test.ts @@ -12,10 +12,10 @@ describe('dynamic table generation', () => { const ctx = initialContext() const candidates = filterCandidates(ctx) const table = buildTable(candidates, 0) - // Table size is 2^bitWidth(uniqueCount) const bits = bitWidth(table.length) expect(table.length).toBe(1 << bits) - expect(table.length).toBeGreaterThanOrEqual(128) + // Statement-only table: ~30-50 candidates → 16 or 32 entries + expect(table.length).toBeGreaterThanOrEqual(16) }) it('reverse table maps candidate keys back to indices', () => { @@ -41,7 +41,7 @@ describe('dynamic table generation', () => { if (t1[i].key !== t2[i].key) diffs++ } - expect(diffs).toBeGreaterThan(50) + expect(diffs).toBeGreaterThan(5) }) it('expression-only context excludes statements', () => { @@ -51,11 +51,19 @@ describe('dynamic table generation', () => { expect(hasStatement).toBe(false) }) + it('statement context excludes raw expressions', () => { + const ctx = initialContext() + const candidates = filterCandidates(ctx) + const hasRawExpr = candidates.some(c => !c.isStatement) + expect(hasRawExpr).toBe(false) + // But ExpressionStatement:0 IS available as a statement candidate + expect(candidates.some(c => c.key === 'ExpressionStatement:0')).toBe(true) + }) + it('context-gated entries only appear in correct context', () => { const base = filterCandidates(initialContext()) expect(base.some(c => c.nodeType === 'ReturnStatement')).toBe(false) expect(base.some(c => c.nodeType === 'BreakStatement')).toBe(false) - expect(base.some(c => c.nodeType === 'AwaitExpression')).toBe(false) const inFn = filterCandidates({ ...initialContext(), inFunction: true }) expect(inFn.some(c => c.nodeType === 'ReturnStatement')).toBe(true) @@ -64,7 +72,8 @@ describe('dynamic table generation', () => { expect(inLoop.some(c => c.nodeType === 'BreakStatement')).toBe(true) expect(inLoop.some(c => c.nodeType === 'ContinueStatement')).toBe(true) - const inAsync = filterCandidates({ ...initialContext(), inAsync: true }) + // AwaitExpression is expression-only, not available in statement context + const inAsync = filterCandidates({ ...initialContext(), inAsync: true, expressionOnly: true }) expect(inAsync.some(c => c.nodeType === 'AwaitExpression')).toBe(true) }) }) From 80c21bf35835cecbde879b73d18723efcf077e53 Mon Sep 17 00:00:00 2001 From: zojize Date: Fri, 17 Apr 2026 18:58:40 -0500 Subject: [PATCH 02/13] feat: trim expensive expression variants, vary package names per seed - Cap call/new/array/object/template counts to 0-4 (was 0-31) - Cap Arrow/FunctionExpression params to 0-3 (was 0-23) - Cap Sequence/TaggedTemplate counts - cosmeticPackageName uses cosmetic RNG (varies per seed) - Dedup exported function names vs import names Output now resembles real minified JS modules with varied imports. Co-Authored-By: Claude Opus 4.6 (1M context) --- packages/core/src/context.ts | 34 +++++++++---------- packages/core/src/encode.ts | 12 ++++--- .../test/__snapshots__/roundtrip.test.ts.snap | 16 ++++----- 3 files changed, 33 insertions(+), 29 deletions(-) diff --git a/packages/core/src/context.ts b/packages/core/src/context.ts index e058f08..a1b02a2 100644 --- a/packages/core/src/context.ts +++ b/packages/core/src/context.ts @@ -277,18 +277,18 @@ function buildAllCandidates(): Candidate[] { // Conditional (weight 0.8, 3 children) c.push({ key: 'ConditionalExpression:0', nodeType: 'ConditionalExpression', variant: 0, children: ['expr', 'expr', 'expr'], weight: lookupWeight('ConditionalExpression:0'), isStatement: false }) - // Call/New expression — arg count as variant (type-gated: only when scope has callable/constructable) - for (let n = 0; n < 19; n++) { + // Call/New expression — arg count 0-4 (covers most real-world calls) + for (let n = 0; n <= 4; n++) { const ch: SlotKind[] = ['expr', ...Array.from({ length: n }).fill('expr')] c.push({ key: `CallExpression:${n}`, nodeType: 'CallExpression', variant: n, children: ch, weight: lookupWeight(`CallExpression:${n}`), isStatement: false }) } - for (let n = 0; n < 16; n++) { + for (let n = 0; n <= 3; n++) { const ch: SlotKind[] = ['expr', ...Array.from({ length: n }).fill('expr')] c.push({ key: `NewExpression:${n}`, nodeType: 'NewExpression', variant: n, children: ch, weight: lookupWeight(`NewExpression:${n}`), isStatement: false }) } - // OptionalCallExpression — type-gated: expr?.(args) throws if expr is non-null non-callable - for (let n = 0; n < 19; n++) { + // OptionalCallExpression — arg count 0-3 + for (let n = 0; n <= 3; n++) { const ch: SlotKind[] = ['expr', ...Array.from({ length: n }).fill('expr')] c.push({ key: `OptionalCallExpression:${n}`, nodeType: 'OptionalCallExpression', variant: n, children: ch, weight: lookupWeight(`OptionalCallExpression:${n}`), isStatement: false }) } @@ -300,11 +300,11 @@ function buildAllCandidates(): Candidate[] { c.push({ key: 'OptionalMemberExpression:0', nodeType: 'OptionalMemberExpression', variant: 0, children: ['expr'], weight: lookupWeight('OptionalMemberExpression:0'), isStatement: false }) c.push({ key: 'OptionalMemberExpression:1', nodeType: 'OptionalMemberExpression', variant: 1, children: ['expr', 'expr'], weight: lookupWeight('OptionalMemberExpression:1'), isStatement: false }) - // Array/Object — element/prop count (extended to 0-31 for more unique candidates) - for (let n = 0; n < 32; n++) { + // Array/Object — element/prop count 0-4 (covers most real-world literals) + for (let n = 0; n <= 4; n++) { c.push({ key: `ArrayExpression:${n}`, nodeType: 'ArrayExpression', variant: n, children: Array.from({ length: n }).fill('expr'), weight: lookupWeight(`ArrayExpression:${n}`), isStatement: false }) } - for (let n = 0; n < 32; n++) { + for (let n = 0; n <= 4; n++) { const ch: SlotKind[] = [] for (let j = 0; j < n; j++) { ch.push('expr', 'expr') @@ -312,25 +312,25 @@ function buildAllCandidates(): Candidate[] { c.push({ key: `ObjectExpression:${n}`, nodeType: 'ObjectExpression', variant: n, children: ch, weight: lookupWeight(`ObjectExpression:${n}`), isStatement: false }) } - // Sequence expression (count 2-29, extended range) - for (let n = 2; n <= 29; n++) { + // Sequence expression — count 2-4 (rare in real code, small variants only) + for (let n = 2; n <= 4; n++) { c.push({ key: `SequenceExpression:${n - 2}`, nodeType: 'SequenceExpression', variant: n - 2, children: Array.from({ length: n }).fill('expr'), weight: lookupWeight(`SequenceExpression:${n - 2}`), isStatement: false }) } - // Template literals (extended to 0-16) - for (let n = 0; n < 17; n++) { + // Template literals — 0-3 interpolations + for (let n = 0; n <= 3; n++) { c.push({ key: `TemplateLiteral:${n}`, nodeType: 'TemplateLiteral', variant: n, children: Array.from({ length: n }).fill('expr'), weight: lookupWeight(`TemplateLiteral:${n}`), isStatement: false }) } - // TaggedTemplateExpression (type-gated: tag must be callable) - for (let n = 0; n < 8; n++) { + // TaggedTemplateExpression — 0-2 interpolations + for (let n = 0; n <= 2; n++) { c.push({ key: `TaggedTemplateExpression:${n}`, nodeType: 'TaggedTemplateExpression', variant: n, children: ['expr', ...Array.from({ length: n }).fill('expr')], weight: lookupWeight(`TaggedTemplateExpression:${n}`), isStatement: false }) } - // Arrow/Function expression — param count (extended to 0-23) - for (let n = 0; n < 24; n++) { + // Arrow/Function expression — param count 0-3 (covers most functions) + for (let n = 0; n <= 3; n++) { c.push({ key: `ArrowFunctionExpression:${n}`, nodeType: 'ArrowFunctionExpression', variant: n, children: ['expr'], weight: lookupWeight(`ArrowFunctionExpression:${n}`), isStatement: false }) } - for (let n = 0; n < 24; n++) { + for (let n = 0; n <= 3; n++) { c.push({ key: `FunctionExpression:${n}`, nodeType: 'FunctionExpression', variant: n, children: ['expr'], weight: lookupWeight(`FunctionExpression:${n}`), isStatement: false }) } diff --git a/packages/core/src/encode.ts b/packages/core/src/encode.ts index 766a461..9cd012b 100644 --- a/packages/core/src/encode.ts +++ b/packages/core/src/encode.ts @@ -115,12 +115,14 @@ export function encode(message: Uint8Array, options?: EncodeOptions): string { function cosmeticFuncName(): string { return CORPUS_FUNC_NAMES[rng() % CORPUS_FUNC_NAMES.length] } - function cosmeticPackageName(h: number): string { + function cosmeticPackageName(): string { if (PACKAGE_NAMES.length === 0) return 'pkg' - return PACKAGE_NAMES[h % PACKAGE_NAMES.length] + return PACKAGE_NAMES[rng() % PACKAGE_NAMES.length] } function cosmeticImportedName(h: number, offset: number): string { + // Uses hash so imports are deterministic from structural position + // (same structural spot → same name, allowing consistent references) if (IMPORTED_NAMES.length === 0) return nameFromHash(h, offset) const mixed = mixHash(h, offset) @@ -382,7 +384,7 @@ export function encode(message: Uint8Array, options?: EncodeOptions): string { case 'BreakStatement': return t.breakStatement() case 'ContinueStatement': return t.continueStatement() case 'ImportDeclaration': { - const pkg = cosmeticPackageName(hash) + const pkg = cosmeticPackageName() if (c.variant === 0) { // side-effect return t.importDeclaration([], t.stringLiteral(pkg)) @@ -432,7 +434,9 @@ export function encode(message: Uint8Array, options?: EncodeOptions): string { // variants 10..13: function with param count 0..3 if (c.variant >= 10 && c.variant <= 13) { const paramCount = c.variant - 10 - const fnName = cosmeticFuncName() + let fnName = cosmeticFuncName() + while (ctx.scope.includes(fnName)) + fnName = `${fnName}${ctx.scope.length}` const paramNames = Array.from({ length: paramCount }, (_, i) => nameFromHash(hash, 900 + i)) // Enter function scope const savedScope = [...ctx.scope] diff --git a/packages/core/test/__snapshots__/roundtrip.test.ts.snap b/packages/core/test/__snapshots__/roundtrip.test.ts.snap index 9f4f74c..8a8ee86 100644 --- a/packages/core/test/__snapshots__/roundtrip.test.ts.snap +++ b/packages/core/test/__snapshots__/roundtrip.test.ts.snap @@ -1,17 +1,17 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html -exports[`snapshots > all printable ASCII 1`] = `"import select from "node:fs";var _quq=((_rap,_qjt,_prx,_oab,_nif,_mrj,_lzn,_khr,_jqv,_iyz,_hhd,_gph,_fxl,_egp,_dot,_cxx,_bfb,_aof,_zwj,_yen)=>_dot(6));export var _ejx=({[(((_wov,_xgr)=>select))]:(--(_quq)),[((_quq++))]:(("96",null,select,_quq,_quq,null,select,"module","92",_quq,false,"140","122",true,116,_quq,false,null)),[(null("_",select,"path",127,false,null,null,false))]:((80,"f",null,60,null,null)),[("@"\`q\${select}wc\${_quq}tz\${null}jxdw\${select}noo\${null}reqy\${_quq}fg\`)]:(false?.(92,"115",select,null,_quq,_quq,true,false,102,false,_quq,28,27,_quq,10)),[((false,null,select,52,"w",false,null,true))]:(((_ofu,_pxq,_mwc,_noy,_sye,_tpa,_qpm,_rgi,_wqo)=>_quq)),[(("119",37,_quq,true,0,null,null,62,")",false,null,0.01,31,65536,select,"95",false))]:(null?.(_quq,_quq,false,"18.4",65,null,25,false,28,_quq,select,_quq,null,_quq,false,select,true,_quq)),[(({"object":select,[null]:select}))]:[null,null,90,null,20,_quq,null,1000,false,_quq,_quq,null,false,false,30,select,17,null,40,"$",false,22,95,_quq,"95",select,null,"object",_quq,select,false],[(new 128(null,24,null,select,"137",55296,select,select,select,select,_quq,_quq,"./_lib/convertToFP.js",select))]:(((_fho,_eps)=>"A B")),[((_quq,false,true,26,_quq))]:(null(null,null,_quq,null,select,select,9,null,select,true,null,18,null)),[(({"16.5":43,"132":127,45:select,[true]:null}))]:\`n\${_quq}zhzn\${"get"}i\`});var _cxa=(function translate(_ogk,_pyg,_mxs,_npo){return (function _chalk(_wnv,_xfr,_ywn,_zoj,_svl,_tmh,_ued,_vwz,_odb,_pux,_qmt,_rdp,_qbt,_rsp,_skl,_tbh){return "i";});});throw ((_sch,_tud,_qtp,_rll,_gad,_hrz,_eql,_fih,_ksn,_ljj,_ijv,_jar,_efl)=>((_xio,_wqs,_vyw,_uha,_lfk,_kno,_jws,_iew)=>0.00416));import{unescape,arrRemove,LineSegments,Sphere}from "uint8array-extras";throw [\`po\${14}njta\${select}wd\${null}k\${_cxa}k\`,-("8D"),(function unescape(_hlc,_gug,_fck,_eko,_lem,_kmq,_juu,_idy,_pww,_oea,_nne){return null;}),null(2,_ejx,22,_quq,false,57,"a","./convert",_quq,"module",LineSegments),[_cxa,"x",null,unescape,52,true,0.00539,"function",_cxa,false,"17.0",unescape,null,false,"left",2048,true,42,_ejx,arrRemove,false],~("end"),arrRemove?.(_cxa,true,"17.1",14,true,"DD/MM/YYYY","D MMMM YYYY","D MMMM YYYY",false,arrRemove),(unescape*=LineSegments),void ("}"),new false(40,"../moment",false,false,null,"M",_cxa),(false,7),[_quq,null,"keyword",false,"(",arrRemove,LineSegments,LineSegments,arrRemove,unescape,false,37,true,arrRemove,null,null],({arrRemove:LineSegments,"L":arrRemove,"|":null,_ejx:_quq,[true]:unescape,90:6,unescape:_quq,unescape:"\\"",select:_quq,select:"pD",[false]:select,_quq:_cxa,25:0.01,[true]:9,54:"135",[null]:Sphere,[true]:select,[null]:unescape,unescape:LineSegments,59:unescape,123:LineSegments,"8":null,unescape:Sphere,"5":17,unescape:true,44:73,select:"A",_quq:LineSegments,[false]:true,57:_ejx,93:false}),(function __export(_iqq,_jhm,_kzi,_lqe,_wnl,_xeh,_ywd,_znz,_afv,_bxr,_con,_dgj,_ocr,_pun,_qlj,_rdf,_sub,_tmx,_uet,_vvp,_gsx,_hjt,_ibp){return false;}),(function __(_cbx,_dst,_ekp,_fbl,_oec,_pvy,_qnu,_req,_kls,_ldo){return "}";}),(function w(_khj,_lyf,_mqb,_nhx,_ozu,_pqq,_qim,_rai,_sre,_tja,_uaw,_vss,_wjo,_xbk,_ytg,_zkc,_acy,_btu){return true;}),null(unescape,"r",LineSegments,"2",_cxa,arrRemove,_ejx,"D",LineSegments,23,null,false,Sphere,"i32",125),this,({12:_cxa,[true]:"./convert",unescape:"A B",52:_quq}),-(null),new null(null,"33",true,54,arrRemove,"$",LineSegments,select,4,false,_quq,21,49,_cxa,73),false\`cgdk\${61}d\${"D MMMM YYYY"}a\${"18.3"}y\`,fn,(function _typeof(_oaq){return false;}),new false("utf8",true,arrRemove,"133",42,95)];debugger;throw ({[(("146",false,"$",_quq))]:(((_dfl,_cop,_fpd,_exh,_rdh,_qll,_tmz,_sud,_vvr,_udv,_xej,_wmn,_jsn,_iar,_lbf,_kjj,_nkx)=>false)),[(((_ofg,_pxc,_qoy,_rgu,_aik,_bzg,_crc,_djy,_wqa,_xhw,_yzs,_zqo,_ccc,_duy)=>_ejx))]:(({61:Sphere,"symbol":"input","p":_quq,[false]:14,select:Sphere,"Identifier":"140","146":true,"u":_quq,select:null,"12":null,"123":256,[null]:"0",54:Sphere,select:null,unescape:97})),[(("8",255,arrRemove,null,false,_ejx,null,null,null,"9D AE","7D",select,select,null,123,select,"end",null,false,_ejx,43,false,_ejx))]:((arrRemove*=_quq)),[[true,62,90,false,"96",true,_cxa,null,true,null,true,"8",47,arrRemove,select,200,47,null,LineSegments,select,21,null]]:((function replace(_dud,_cdh,_bll,_atp,_zct,_ykx,_xtb,_wbf,_vkj){return select;})),[(({80:arrRemove,[null]:null,[null]:null,[true]:6,"boolean":Sphere,[true]:select,[null]:null,_quq:48,Sphere:false}))]:(({_quq:"D MMMM YYYY HH:mm",73:null,[null]:false,_quq:61,_cxa:unescape,0.00539:0.00539,49:125,[null]:arrRemove,_ejx:unescape,[null]:true,_quq:_ejx,[null]:47,"15.2-15.3":"125",[null]:"79",unescape:"production",[true]:false,_quq:25,select:6,47:_cxa,[null]:true,_ejx:select,[null]:arrRemove,"145":arrRemove,select:arrRemove,_ejx:Sphere})),[(new "^"(select,false,43,true,true))]:((_cxa++)),[(({LineSegments:"id",[null]:null,arrRemove:unescape,[true]:40,[null]:null,"key":15,[null]:_ejx,0.00539:"_",[false]:null,arrRemove:29,_cxa:false,arrRemove:_quq,_quq:"_","class":1000,[null]:unescape,"4.2-4.3":false}))]:(/rpun/gisy),[(((_akd,_bbz,_ybl,_zsh,_ecn,_fuj,_ctv,_dkr,_iux,_jmt,_glf,_hdb,_gwe,_hoa)=>"style"))]:(({_ejx:53,select:null,"0":Sphere,[true]:"17.4",[true]:false,[null]:select,"pD":_ejx,[null]:unescape,20:_quq,_quq:select,arrRemove:unescape,53:52,select:null})),[(/ll/dimsu)]:[LineSegments,false,unescape,false,"body","wide",true]});import{LinearSRGBColorSpace}from "estraverse";import{Matrix3}from "parse5-htmlparser2-tree-adapter";import "gulp-bump";import{util,localize}from "node:worker_threads";debugger;import{parse,ClampToEdgeWrapping,popScheduler}from "levn";import AST_Class from "fetch-blob/from.js";import "estraverse";import{render_effect,addRegexToken,Object3D}from "d3-drag";["./placeholder"(null,unescape,Object3D,null,29,16),[_quq,"33",null,"116",_cxa,null,9,true,true,null,null,"true","120"],\`a\${Sphere}kz\${"146"}jh\${46}kjmw\${_cxa}fp\${null}rjz\${true}rr\${"array"}bku\${Matrix3}idpk\${Sphere}tsvf\${LinearSRGBColorSpace}j\`];import{ramp,WebGLRenderTarget}from "gulp-tag-version";export default /zbex/dsy;import{Line,AST_Number,isArrayLike}from "node:stream/promises";export var _jpb=\`iszf\${(Matrix3--)}yij\${[unescape,null,500]}j\${new null(5,true,false,util,true)}fgs\${\`fgnm\${false}tg\${"136"}zkbt\${"UC"}j\${"!"}c\`}mexd\${(LinearSRGBColorSpace-"wide")}pwjt\${[true,"g","15.4",parse,false,select,true,"D A",parse,65536,null,null,"120","134",LinearSRGBColorSpace,1024,Matrix3,"115",true,"P",31,AST_Number,_cxa,"26.2",AST_Number,null,63,73,0.00539,addRegexToken,47]}ty\${[false,125,popScheduler,arrRemove,37,"data",false,false,null,null,null,"134",popScheduler,Object3D,false,21,false,"^",6,15,AST_Class,false,isArrayLike,6,ClampToEdgeWrapping,localize,_quq]}pyki\${(ClampToEdgeWrapping--)}gcoe\${((_hod,_gxh,_jxv,_igz)=>false)}hwhp\${new arrRemove(null,"17.4",null,null)}au\${AST_Number}t\`;"`; +exports[`snapshots > all printable ASCII 1`] = `"import select from "cacheable-request";var _quq=((select++))((6||select),this,\`puel\${null}xt\${"8"}mkhg\`);var _ter=[];(_ter=("RC"[_quq]));let _cte=((~(_quq))*((false).code));import{DoubleSide,sin,get_rune}from "strip-ansi";export default (_ter+=\`po\${116}tnfb\`);import{createOperatorSubscriber,innerFrom}from "d3-drag";export const _dlm=(function processRelativeTime(){return (sin|=true);});let _wow=((_iqb,_jix,_kzt)=>/cl/);var _wwc=({[[65536]]:((function wrap(_pde){return _dlm;})),[((null%"@"))]:44,[((DoubleSide/=createOperatorSubscriber))]:((null||select))});throw ({[((null|_wwc))]:"127",[(false(true,_wwc))]:((()=>null))});throw (_cte++);export var _snn=(((null--(_inb));let _sdi=[false,["18",true]];import{buildMatchPatternFn,_curry3}from "@webassemblyjs/utf8";const _fsr=((null&&_wow))((null==92));export let _rgo=true;/od/isu;import{AST_Array,dayjs,LineBasicMaterial}from "@webassemblyjs/helper-wasm-section";export var _fqz=8;import AST_Sequence from "whatwg-encoding";export var _hcm=[void (102)];var _vou=(\`vyl\`*(({})));export var _tsn=(((innerFrom--))>[_inb]);import{NodeMaterial}from "d3-timer";export let _tgq=(new buildMatchPatternFn(10))(false?.(null,LineBasicMaterial,52),("w"==false),(DoubleSide=true),[NodeMaterial,"119"]);import "parse5";import{If,normalizeDates,renderGroup,normalView}from "rw";export var _nrg=!(((normalView>>>=null)));export var _sjv=(If&=((true,_tgq,null)));debugger;import{ShaderMaterial}from "crypto";debugger;debugger;export var _lfw=((null).setLastError)((select++),(class extends false{}),(null-0.01));import "@webassemblyjs/ieee754";var _pzt=([true]&((null-get_rune)));import Vector4 from "axobject-query";import{renderGroup40,normalView41,If42}from "cross-spawn";import{_has}from "keyv";import{toDate,timer,RendererUtils}from "node:zlib";import{vec4}from "node:http";import{max,noop,NoBlending,__extends}from "@webassemblyjs/leb128";throw (_has>>=((__extends=_ter)));import{BufferAttribute,NodeUpdateType}from "cheerio-select";import{_dispatchable}from "levn";export var _sph=(null!=((function n(){return 65;})));import "buffer";var _vuy=((25>false))[(class extends 28{})];import{isArrayLike}from "rollup-plugin-node-resolve";import set from "http-cache-semantics";export var _zis=((_has(_sdi,null,AST_Array))^((false<_dlm)));const _oyw=(((function F(_sxc,_toy,_ugu){return _tsn;}))?(new _quq(normalView,normalizeDates)):((_vuy+null)));;;export let _rsj=(-(null)).dispose;import{b}from "esrap";const _bmk=(_fce=>(_cte++));"`; -exports[`snapshots > binary: deadbeef 1`] = `"import select from "node:fs";var _quq=((_rap,_qjt,_prx,_oab,_nif,_mrj,_lzn,_khr,_jqv,_iyz,_hhd,_gph,_fxl,_egp,_dot,_cxx,_bfb,_aof,_zwj,_yen)=>92("17.4"));export const _zad=[("key",0,null,"S",_quq,true,select),(null&&null),(select&&=23),[_quq,"126",null,null,false,null,false,13,"18",select,select],true,20,select,"p","17.0",null,null,select];"`; +exports[`snapshots > binary: deadbeef 1`] = `"import select from "parse5";var _quq=((select++))(typeof ("17.4"),this,(select++));;import timer from "node:timers/promises";let _sey=((/c/ims)==(select(null,null,true,50)));"`; -exports[`snapshots > hello, world! 1`] = `"import select from "node:fs";var _quq=((_rap,_qjt,_prx,_oab,_nif,_mrj,_lzn,_khr,_jqv,_iyz,_hhd,_gph,_fxl,_egp,_dot,_cxx,_bfb,_aof,_zwj,_yen)=>_yen(65));export const _zad=80;var _wmh=[false,null,null,select,"17.3",_quq,"children",null,36,null,_quq,73,true,"../moment",_zad,true,"style",_quq]\`shij\${(false,null,select,false,null,_quq)}lab\${((_tac,_sjg,_rrk,_qao,_fdg,_emk,_duo,_ccs,_blw,_ata,_zce,_yki,_hxy,_ggc,_fog)=>26)}n\`;export var _bpx=((null&&_zad))?.(({select:select,[null]:true,"119":false,[null]:21,_wmh:14,select:_zad,[false]:_zad,"d":_zad,[true]:select,58:_zad,_quq:_quq,select:true,_quq:"127","meta":select,[true]:"error",[null]:"16.2","18.4":65536,_quq:0.00539,_wmh:null,select:true,_wmh:true,[false]:"=","HH:mm":27}),100("120",_wmh,select,null,false,_wmh,"../moment"),\`iomn\${_zad}u\${false}o\${select}kovw\${select}pktl\${null}e\${select}rkbb\${"/"}dymj\${9}ito\${true}ncm\${_zad}kfoq\${select}sz\${_quq}hdty\`,64,[_quq,false,58,null,128,true,"123",true,39,true,_quq,93,"..",33,_zad,true,true,29,_wmh,"140",54,true,63,_zad],_quq?.(_wmh,select,61,_wmh,"17.3",91,_zad,null,true,null,_zad,_zad,false),"15.4");"`; +exports[`snapshots > hello, world! 1`] = `"import select from "iconv-lite";var _quq=((select++))(typeof (65),(17+select),(()=>null));import{_curry2,from}from "#client/constants";import{AST_Node,get_rune,sin,DoubleSide}from "brace-expansion";import{innerFrom}from "clsx";export default \`uivg\${--(DoubleSide)}m\${(_quq=="children")}oq\`;debugger;throw +(((_quq--)));var _jqk=A;var _gzo=null?.((select&&=true),("style").setLastError,false);"`; -exports[`snapshots > json-like 1`] = `"import select from "node:fs";var _quq=((_rap,_qjt,_prx,_oab,_nif,_mrj,_lzn,_khr,_jqv,_iyz,_hhd,_gph,_fxl,_egp,_dot,_cxx,_bfb,_aof,_zwj,_yen)=>true(25));import{createOperatorSubscriber}from "robust-predicates";import "node:readline";export const _kvq=new (null("79",_quq))(((_zaq,_yiu,_xry,_wzc,_nxm,_mfq,_lou,_kwy,_rpw,_qya,_pge,_ooi,_fms,_evw,_dda,_cme,_jfc,_ing,_hvk,_geo,_xcy)=>createOperatorSubscriber),((_obx,_pst,_qkp,_rcl,_aeb,_bvx,_cnt,_dep,_wlr)=>"139"),("b"&&127));export let _czu=([null,44,null,_kvq,"y",null,"HH:mm:ss","138",select,116,createOperatorSubscriber,null,_kvq,null,true,createOperatorSubscriber,":",9,null,createOperatorSubscriber,true,false,_kvq,createOperatorSubscriber,select,2,false],(_kvq<>>=56),(createOperatorSubscriber+="17.5"),({_kvq:_quq,",":null,27:96,[null]:false,[true]:true,[null]:null,"m":createOperatorSubscriber,"5":false,45:"D A","16.0":54,"D A":null,45:_kvq,"__esModule":"w",[null]:createOperatorSubscriber,"96":47,[null]:null,"]":null,[false]:_quq,[null]:"r",12:null,[false]:_quq,_quq:96,[true]:null,[null]:null,123:_kvq,createOperatorSubscriber:true}),({[null]:false,13:createOperatorSubscriber,[null]:true,[false]:_kvq,23:null,_quq:_quq,"end":"./_lib/convertToFP.js",[false]:null,[null]:"__esModule",_quq:null,[null]:56320,8:select,12:select}),(function isFunction(_pzv,_oiz,_nqd,_mzh,_tsf,_saj,_rjn,_qrr,_xkp,_wst,_vbx,_ujb){return _kvq;}),({select:null,512:createOperatorSubscriber,[null]:true,[true]:12,"18.1":null,[false]:"b",4:_quq,_kvq:null,[null]:select,[null]:null,[false]:3,40:createOperatorSubscriber,_kvq:_kvq,[true]:false,[false]:_quq,[null]:48,select:32,_quq:select,[true]:createOperatorSubscriber,"left":127,_kvq:"_",_quq:true,[true]:"142",select:null,[false]:null,40:58,select:"{",_kvq:null,[false]:_quq,24:null}),new _kvq(_kvq,false,false,_quq,_quq,createOperatorSubscriber,false,"./convert","|",false,"2",null,false,"125"),1000,\`ljr\${"./_lib/convertToFP.js"}lbv\${_kvq}uu\${null}afv\${"null"}b\${127}evc\${"2"}ecqi\${0.5}jiu\${null}zbfr\${false}hxj\${_kvq}j\${null}omev\${null}eta\`,new _kvq(30,_quq,createOperatorSubscriber,true,"124",null),(select<<=27),((_gnm,_hfi,_iwe,_joa,_cvc,_dmy,_eeu,_fvq,_ycs,_zuo,_amk,_bdg,_uki,_vce,_wta,_xlw,_qsy,_rju,_sbq,_ttm,_mao)=>"#"),_quq,true,null,"119",_kvq,false,createOperatorSubscriber,_quq);"`; +exports[`snapshots > json-like 1`] = `"import select from "entities";var _quq=((select++))(typeof (25),(_rmh=>null),(select&=256));let _fvt=(select&=((_quq||"139")));import{sin}from "gulp-mocha";export default (((_quq+=127))==((function parse(_oat,_prp){return 44;})));;import isArray from "@emnapi/wasi-threads";import{get,constructFrom,Euler}from "parse5";import{__spreadArray,utils,util,localize}from "d3-timer";const _ipe=(null*["y"]);import{fileURLToPath,popScheduler,ClampToEdgeWrapping,parse}from "buffer";throw \`qo\${("HH:mm:ss"&&"138")}xcdh\`;var _ycw=new ((_quq--))(({[null]:true}),(get<<":"));new ((9*null))((()=>select),true[false],/pk/gsy);import{sin18,DoubleSide}from "rolldown/experimental";export const _bwe=_fvt;"`; -exports[`snapshots > sentence 1`] = `"import select from "node:fs";var _quq=((_rap,_qjt,_prx,_oab,_nif,_mrj,_lzn,_khr,_jqv,_iyz,_hhd,_gph,_fxl,_egp,_dot,_cxx,_bfb,_aof,_zwj,_yen)=>_egp(70));import{createOperatorSubscriber}from "robust-predicates";var _wuk=({[(({80:true}))]:[],[["16.0",null]]:((select--)),[(select?.(false,createOperatorSubscriber,true,null,_quq,null,"J D E F A B 5C","wide",39,_quq,select,select,createOperatorSubscriber,select,null,28))]:(new 15(_quq,0,createOperatorSubscriber,"15.4",63,createOperatorSubscriber,_quq,select,_quq,select,"16.1")),[(({"none":_quq,_quq:54,[null]:"#",_quq:false,select:null,"123":_quq,[false]:select,[null]:createOperatorSubscriber,"/":_quq,[null]:123,_quq:false,[null]:select,select:createOperatorSubscriber,[false]:"9D AE",createOperatorSubscriber:true,"18.0":createOperatorSubscriber,"18.2":null,[null]:_quq,[null]:true,[true]:select,"meta":select,select:createOperatorSubscriber,[null]:23,[null]:42}))]:\`bm\${_quq}pao\${"#"}ipr\${_quq}w\${_quq}dm\${256}cin\${true}op\`,[((createOperatorSubscriber+="production"))]:(("130">_quq)),[((_quq-=false))]:((function buildFormatLongFn(_clp,_ddl,_acx,_but,_qil,_rah,_ozs,_pro,_ubv,_vsr,_ssd,_tjz,_oot,_pgp,_mfb,_nxx,_sgd,_tyz){return createOperatorSubscriber;})),[[null,"<",false,_quq,33,62,"/",null,46,17,true,null,null,49,true,createOperatorSubscriber,"null",256,select,"\`",true,true,40,createOperatorSubscriber,null,createOperatorSubscriber,"number",null]]:((select&=_quq)),[((_quq++))]:((_quq,true,select,select,null,true,true,_quq,"'",27,"g",createOperatorSubscriber,24,false,createOperatorSubscriber,"16.2",createOperatorSubscriber,_quq)),[\`a\${"MemberExpression"}ajxt\${select}g\${createOperatorSubscriber}dos\${_quq}zyl\${select}qd\${true}avbx\${_quq}cel\`]:(((_ayl,_bph,_yot,_zgp,_eqv,_fhr,_chd,_dyz,_iif,_jab,_gzn,_hrj,_map)=>_quq)),[true]:true,"A":true,"4.2-4.3":false,"^":_quq});"`; +exports[`snapshots > sentence 1`] = `"import select from "child_process";var _quq=((select++))(typeof (70),(80>true),["16.0",null]);import DoubleSide from "cross-spawn";export default !(((select%false)));debugger;const _emf=((!(DoubleSide))&(typeof (true)));import{error}from "entities/decode";import Vector4 from "get-stream";export const _zbn=(()=>({14:"J D E F A B 5C","wide":39,error:_emf}));debugger;switch(((_zbn>>=((DoubleSide/=select))))){}export let _pvp=_emf;import{AST_Conditional,formatRelative,vec2}from "node:timers/promises";import smoothstep from "three/webgpu";import addFormatToken from "data-uri-to-buffer";export var _tgw=line;import{SRGBColorSpace,RGBAFormat}from "d3-dispatch";debugger;(vec2*=55296);"`; -exports[`snapshots > short: "hi" 1`] = `"import select from "node:fs";var _quq=((_rap,_qjt,_prx,_oab,_nif,_mrj,_lzn,_khr,_jqv,_iyz,_hhd,_gph,_fxl,_egp,_dot,_cxx,_bfb,_aof,_zwj,_yen)=>"]"(null));export const _zad=({[((6&&_quq))]:((function findKey(_hge,_gpi){return select;}))});"`; +exports[`snapshots > short: "hi" 1`] = `"import select from "@webassemblyjs/wasm-opt";var _quq=((select++))(typeof (null),6(),false);import "https://cdn.jsdelivr.net/npm/mp4box@0.5.3/+esm";const _mwl=(_quq*select);"`; -exports[`snapshots > single byte 0x42 1`] = `"import select from "node:fs";var _quq=((_rap,_qjt,_prx,_oab,_nif,_mrj,_lzn,_khr,_jqv,_iyz,_hhd,_gph,_fxl,_egp,_dot,_cxx,_bfb,_aof,_zwj,_yen)=>null(_hhd));export const _zad=("object"?.(26,125,"function",false,true,true,_quq))(_quq,_quq,_quq,select);"`; +exports[`snapshots > single byte 0x42 1`] = `"import select from "d3-time";var _quq=((select++))(typeof (null),(select|=select),[]);export const _cbq=select;"`; -exports[`snapshots > url 1`] = `"import select from "node:fs";var _quq=((_rap,_qjt,_prx,_oab,_nif,_mrj,_lzn,_khr,_jqv,_iyz,_hhd,_gph,_fxl,_egp,_dot,_cxx,_bfb,_aof,_zwj,_yen)=>_aof(true));import{createOperatorSubscriber}from "robust-predicates";import{FileLoader,Observable}from "#compiler/builders";export default ((function l(_nno,_mvs,_ldw,_kma,_bkk,_aso,_zbs,_yjw,_fcu,_eky,_dtc,_cbg,_tzq,_shu){return "__esModule";}))[(FileLoader&&=FileLoader)];export const _pok=(function has(_fpn,_exr,_hyf,_ggj,_bxd,_afh,_dgv){return [_hyf,"symbol",null,null,28,_afh,54,"(",9,"set",_afh,"137",34,_ggj,_afh,"default",true];});(((function F(_txs,_sfw,_vgk,_uoo,_hun,_gcr,_jdg,_ilj,_lmy,_kuc,_nvq,_meu,_zjt){return null;}))||(+("115")));import{assertString,_curry1,EMPTY,convertToFP}from "uint8array-extras";;export var _tyv=new (("26.3",EMPTY,assertString,92,4,"full",EMPTY,_curry1,null,_quq,true,null))((_curry1&=FileLoader),({[null]:Observable,"w":null,"#":select,Observable:0.01,_pok:Observable,[true]:255,[null]:true,[null]:1000,FileLoader:null,"boolean":42,_quq:_pok,"!":true,"17.2":null,[null]:_quq,[false]:convertToFP,"./placeholder":assertString}),\`q\${null}i\${64}h\${30}h\${true}fzs\${"Object"}coe\${assertString}n\`,(EMPTY<<=false),"in"(false,FileLoader,null,convertToFP,convertToFP,19),({select:null,createOperatorSubscriber:Observable,53:"[",select:false,Observable:true}),((_huz,_gdd,_flh,_etl,_lmj,_kvn,_jdr,_imv,_pft,_onx,_nwb,_mef,_txd,_sfh,_rol,_qwp,_xpn,_wyr)=>Observable),[createOperatorSubscriber,_pok,_curry1,"KB",Observable,assertString,EMPTY,null,500],\`gnt\${null}dhmt\${false}v\`,--(_pok));"`; +exports[`snapshots > url 1`] = `"import select from "fs";var _quq=((select++))(typeof (true),(13 Date: Fri, 17 Apr 2026 19:06:09 -0500 Subject: [PATCH 03/13] =?UTF-8?q?fix(playground):=20update=20depth=20place?= =?UTF-8?q?holder=20from=20=E2=88=9E=20to=201?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reflects new default maxExprDepth=1. Co-Authored-By: Claude Opus 4.6 (1M context) --- playground/src/Playground.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/playground/src/Playground.tsx b/playground/src/Playground.tsx index 1cda4e4..7ce5f0a 100644 --- a/playground/src/Playground.tsx +++ b/playground/src/Playground.tsx @@ -222,7 +222,7 @@ export function Playground() { dirRef.current = 'encode' } }} - placeholder="∞" + placeholder="1" />