nv-basic-bw 1.0.32 → 1.0.33

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,10 +1,10 @@
1
- var nvbasicbw=(()=>{var h=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var S=h((_d,gr)=>{var vo=Symbol("empty"),Me=Symbol("unknown"),lr=()=>typeof process<"u"&&process.versions!=null&&process.versions.node!=null,or=/^[\-\+]?[0-9]+$/,ar=/^\+?[0-9]+$/,ko=/^[\-\+]?0[bB][0-1]+$/,xo=/^[\-\+]?0[oO][0-7]+$/,cr=/^[\-\+]?0[xX][0-9a-fA-F]+$/,So=e=>or.test(e)||cr.test(e),rr={"0b":2,"0o":8,"0x":16,2:"0b",8:"0o",16:"0x"},To=/^[\-\+]?[0-9]+n$/,Eo=/^[\-\+]?0[bB][0-1]+n$/,Co=/^[\-\+]?0[oO][0-7]+n$/,qo=/^[\-\+]?0[xX][0-9a-fA-F]+n$/,ur=e=>To.test(e)||Eo.test(e)||Co.test(e)||qo.test(e),fe={Integer:6,Float:7,BigInt:8,PosInfinity:9,NegInfinity:10,NaN:11,6:"Integer",7:"Float",8:"BigInt",9:"PosInfinity",10:"NegInfinity",11:"NaN"},_r=(e,t=!1)=>{let r={value:void 0,type:void 0};return e==="+Infinity"||e==="Infinity"?(r.value=1/0,r.type=fe.PosInfinity):e==="-Infinity"?(r.value=-1/0,r.type=fe.NegInfinity):(e==="NaN"||e==="+NaN"||e==="-NaN")&&(r.value=NaN,r.type=fe.NaN),t?r:r.value},Ao=e=>{let t,r,n;e[0]==="+"||e[0]==="-"?(t=e[0],r=rr[e.slice(1,3).join("").toLowerCase()],n=e.slice(3).join("").toLowerCase()):(t="+",r=rr[e.slice(0,2).join("").toLowerCase()],n=e.slice(2).join("").toLowerCase());let i=parseInt(n,r);return t==="+"?+i:-i},fr=e=>{let t=Array.from(e);if(or.test(e))return parseInt(e);if(ko.test(e)||xo.test(e)||cr.test(e))return Ao(t)},No=e=>{let t=e.be.sign+e.be.bd+e.be.dot+e.be.ad,r=e.ae.sign+e.ae.bd+e.ae.dot+e.ae.ad,n;if(!(t==="+"||t==="-"||r==="+"||r==="-")){if(r!=="")if(e.ae.dot==="."){let i=parseFloat(t),l=parseFloat(r);n=i*10**l}else n=parseFloat(t+"e"+r);else n=parseFloat(t);return n}},Io=(e,t)=>e.length===0||t==="."||t==="-."||t==="+."||t==="+"||t==="-",Oo=()=>({be:{sign:"",bd:"",dot:"",ad:""},ae:{sign:"",bd:"",dot:"",ad:""},state:"init"}),nr=(e,t,r,n)=>((e[r]==="-"||e[r]==="+")&&(t[n].sign=e[r],r=r+1),[e,r]),jo=(e,t,r,n)=>{if(t.state=n+"bd",e[r]===".")t[n].bd="0",t[n].dot=".",t.state=n+"ad";else if(ar.test(e[r]))t[n].bd=e[r];else return[!0,r];return[!1,r+1]},ir=(e,t,r,n)=>{let i;for(i=r;i<e.length;i++)if(e[i]==="."){if(t[n].dot===".")return[!0,i];t[n].dot=".",t.state=n+"ad"}else{if(e[i]==="e"||e[i]==="E")return n==="ae"?[!0,i]:(t.state="aebd",[!1,i+1]);if(ar.test(e[i]))t.state===n+"bd"?t[n].bd=t[n].bd+e[i]:t[n].ad=t[n].ad+e[i];else return[!0,i]}return[!1,i+1]},hr=e=>{let t=Oo(),r=Array.from(e);if(Io(r,e))return;let n=0,i=!1;if([r,n]=nr(r,t,n,"be"),[i,n]=jo(r,t,n,"be"),!i&&([i,n]=ir(r,t,n,"be"),!i&&([r,n]=nr(r,t,n,"ae"),[i,n]=ir(r,t,n,"ae"),!i)))return No(t)},dr=(e,t=!1)=>{let r={value:void 0,type:void 0};if(ur(e))r.value=BigInt(e.substr(0,e.length-1)),r.type=fe.BigInt;else{let n=fr(e);n!==void 0?(r.value=n,r.type=fe.Integer):(n=hr(e),n!==void 0?(r.value=n,r.type=fe.Float):(n=_r(e,t=!0),n.value!==void 0&&(r=n)))}return t?r:r.value},Do=(e,t=!0)=>{if(typeof e=="string")return e;if(e===void 0)return"undefined";if(e===null)return"null";if(typeof e=="number")return e.toString();if(typeof e=="bigint")return e.toString()+"n";if(typeof e=="symbol")return e.description;if(lr()&&e[Symbol.for("nodejs.util.inspect.custom")])return e[Symbol.for("nodejs.util.inspect.custom")]();{let r=function(n){if(typeof n.toString=="function")return n.toString()};try{return t?s=JSON.stringify(e):s=JSON.stringify(e,null,4),typeof s=="string"?s:r(e)}catch{return r(e)}}},Fe={UndefinedLiteral:0,NullLiteral:1,FalseLiteral:3,TrueLiteral:4,StringLiteral:12},Ro={only_value:!0,with_value:!0,with_type:!1,unknown_as_string:!1};function pr(e,t={only_value:!0,with_value:!0,with_type:!1,unknown_as_string:!1}){let r=JSON.parse(JSON.stringify(Ro));Object.assign(r,t);let{only_value:n,with_value:i,with_type:l,unknown_as_string:o}=r,a={value:Me,type:Me};if(e==="undefined")a.value=void 0,a.type=Fe.UndefinedLiteral;else if(e==="null")a.value=null,a.type=Fe.NullLiteral;else if(e==="false")a.value=!1,a.type=Fe.FalseLiteral;else if(e==="true")a.value=!0,a.type=Fe.TrueLiteral;else{let c=dr(e,!0);c.type===void 0?o?(a.value=e,a.type=Fe.StringLiteral):(a.value=e,a.type=Me):(a.value=c.value,a.type=c.type)}return n?a.value:(l||delete a.type,i||delete a.value,a)}pr.unknown=Me;var Lo={UndefinedLiteral:0,NullLiteral:1,BooleanLiteral:{_self:2,FalseLiteral:3,TrueLiteral:4},NumericLiteral:{_self:5,Integer:6,Float:7,BigInt:8,PosInfinity:9,NegInfinity:10,NaN:11},StringLiteral:12,ArrayExpression:{_self:13,element:14},ObjectExpression:{_self:15,property:16},_Ref:17,CommentLine:{_self:18,tt:19,k:20,bv:21,av:22},CommentBlock:{_self:23,tt:24,k:25,bv:26,av:27}};gr.exports={TYPE_DICT:Lo,isNode:lr,empty:vo,unknown:Me,is_bigint_str:ur,is_jsint_str:So,NUM_TYPE_DICT:fe,parse_abnormal_num:_r,parse_int:fr,parse_float:hr,parse_num:dr,parse0:pr,to_str:Do}});var wr=h((fd,yr)=>{var Ye={backSpace:8,tab:9,lineFeed:10,lineTab:11,formFeed:12,carriageReturn:13,shiftOut:14,space:32,exclamationMark:33,quotationMark:34,numberSign:35,dollarSign:36,percentSign:37,ampersand:38,apostrophe:39,leftParenthesis:40,rightParenthesis:41,asterisk:42,plusSign:43,comma:44,dash:45,dot:46,slash:47,digit0:48,digit1:49,digit2:50,digit3:51,digit4:52,digit5:53,digit6:54,digit7:55,digit8:56,digit9:57,colon:58,semicolon:59,lessThan:60,equalsTo:61,greaterThan:62,questionMark:63,atSign:64,uppercaseA:65,uppercaseB:66,uppercaseC:67,uppercaseD:68,uppercaseE:69,uppercaseF:70,uppercaseG:71,uppercaseH:72,uppercaseI:73,uppercaseJ:74,uppercaseK:75,uppercaseL:76,uppercaseM:77,uppercaseN:78,uppercaseO:79,uppercaseP:80,uppercaseQ:81,uppercaseR:82,uppercaseS:83,uppercaseT:84,uppercaseU:85,uppercaseV:86,uppercaseW:87,uppercaseX:88,uppercaseY:89,uppercaseZ:90,leftSquareBracket:91,backslash:92,rightSquareBracket:93,caret:94,underscore:95,graveAccent:96,lowercaseA:97,lowercaseB:98,lowercaseC:99,lowercaseD:100,lowercaseE:101,lowercaseF:102,lowercaseG:103,lowercaseH:104,lowercaseI:105,lowercaseJ:106,lowercaseK:107,lowercaseL:108,lowercaseM:109,lowercaseN:110,lowercaseO:111,lowercaseP:112,lowercaseQ:113,lowercaseR:114,lowercaseS:115,lowercaseT:116,lowercaseU:117,lowercaseV:118,lowercaseW:119,lowercaseX:120,lowercaseY:121,lowercaseZ:122,leftCurlyBrace:123,verticalBar:124,rightCurlyBrace:125,tilde:126,nonBreakingSpace:160,oghamSpaceMark:5760,enQuad:8192,emQuad:8193,enSpace:8194,emSpace:8195,threePerEmSpace:8196,fourPerEmSpace:8197,sixPerEmSpace:8198,figureSpace:8199,punctuationSpace:8200,thinSpace:8201,hairSpace:8202,lineSeparator:8232,paragraphSeparator:8233,narrowNoBreakSpace:8239,mediumMathematicalSpace:8287,ideographicSpace:12288,zeroWidthNoBreakSpace:65279};function Po(e){let t=Object.entries(e),r=new Map;return t.forEach(n=>r.set(n[1],n[0])),r}var Pt=Po(Ye);function Wo(e){let t=Object.entries(e);return t=t.map(r=>[r[0],String.fromCharCode(r[1])]),Object.fromEntries(t)}var Bo=Wo(Ye),mr=e=>55296<=e&&e<=56319,Fo=e=>56320<=e&&e<=57343,Mo=(e,t)=>(e-55296)*1024+(t-56320)+65536,br=e=>e<=65535,Yo=e=>!br(e),Ho=e=>{if(e<=65535)return[e,null];{e=e-65536;let t=[null,null];return t[0]=(e>>10)+55296,t[1]=e%1024+56320,t}},Uo=(e,t)=>mr(e)?t+2:t+1;yr.exports={CODE_DICT:Ye,CH_DICT:Bo,CODE_NAME_MP:Pt,cd2ch:e=>String.fromCharCode(e),ch2cd:e=>e.codePointAt(0),cd2n:e=>Pt.get(e),n2cd:e=>String.fromCharCode(Ye[e]),n2ch:e=>Ye[e],ch2n:e=>Pt.get(e.codePointAt(0)),is_high_code:mr,is_low_code:Fo,get_code_point_from_high_low:Mo,get_high_low_from_code_point:Ho,is_length1_code_point:br,is_length2_code_point:Yo,_next_code_index:Uo}});var xe=h((hd,T)=>{var{CODE_DICT:p,CH_DICT:y}=wr(),$r=/\r\n?|[\n\u2028\u2029]/;T.exports.line_break_regexp=$r;T.exports.line_break_regexp_g=new RegExp($r.source,"g");function vr(e){switch(e){case p.lineFeed:case p.carriageReturn:case p.lineSeparator:case p.paragraphSeparator:return!0;default:return!1}}function kr(e){switch(e){case y.lineFeed:case y.carriageReturn:case y.lineSeparator:case y.paragraphSeparator:return!0;default:return!1}}var Wt=[p.lineFeed,p.carriageReturn,p.lineSeparator,p.paragraphSeparator],xr=Wt.map(e=>String.fromCharCode(e));T.exports.NL_CODE_ARR=Wt;T.exports.NL_CH_ARR=xr;T.exports.is_nl_code=vr;T.exports.is_nl=kr;T.exports.skip_white_space_regexp=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g;function Sr(e){switch(e){case 9:case 11:case 12:case p.space:case p.nonBreakingSpace:case p.oghamSpaceMark:case 8192:case 8193:case 8194:case 8195:case 8196:case 8197:case 8198:case 8199:case 8200:case 8201:case 8202:case 8239:case 8287:case 12288:case 65279:return!0;default:return!1}}T.exports.is_non_nl_ws_code=Sr;function Tr(e){switch(e){case y.tab:case y.lineTab:case y.formFeed:case y.space:case y.nonBreakingSpace:case y.oghamSpaceMark:case y.enQuad:case y.emQuad:case y.enSpace:case y.emSpace:case y.threePerEmSpace:case y.fourPerEmSpace:case y.sixPerEmSpace:case y.figureSpace:case y.punctuationSpace:case y.thinSpace:case y.hairSpace:case y.narrowNoBreakSpace:case y.mediumMathematicalSpace:case y.ideographicSpace:case y.zeroWidthNoBreakSpace:return!0;default:return!1}}T.exports.is_non_nl_ws=Tr;var Bt=[p.tab,p.lineTab,p.formFeed,p.space,p.nonBreakingSpace,p.oghamSpaceMark,p.enQuad,p.emQuad,p.enSpace,p.emSpace,p.threePerEmSpace,p.fourPerEmSpace,p.sixPerEmSpace,p.figureSpace,p.punctuationSpace,p.thinSpace,p.hairSpace,p.narrowNoBreakSpace,p.mediumMathematicalSpace,p.ideographicSpace,p.zeroWidthNoBreakSpace];T.exports.NON_NL_WS_CODE_ARR=Bt;var Er=Bt.map(e=>String.fromCharCode(e));T.exports.NON_NL_WS_CH_ARR=Er;function Go(e){return Sr(e)||vr(e)}function ke(e){return Tr(e)||kr(e)}T.exports.is_ws_code=Go;T.exports.is_ws=ke;T.exports.WS_CHCODE_ARR=Wt.concat(Bt);T.exports.WS_CH_ARR=xr.concat(Er);var ee={init:0,executing:1,succ:2,eof:3};T.exports.STATE_DICT=ee;function Vo(e,t=new Set){let r={g:e,rslt:"",state:ee.init},n=r.g.next().value;if(n===void 0)return r.state=ee.eof,r;for(;n!==void 0&&(ke(n)||t.has(n));)n=r.g.next().value;for(;n!==void 0&&!ke(n)&&!t.has(n);)r.rslt=r.rslt+n,n=r.g.next().value;return n===void 0?r.state=ee.eof:(ke(n)||t.has(n))&&(r.state=ee.succ),r}function zo(e,t=0,r=new Set){let n={arr:e,pos:t,rslt:"",state:ee.init};for(let l=n.pos;l<e.length;l++){let o=e[l];if(ke(o)||r.has(o))n.pos=n.pos+1;else break}let i=n.pos;for(let l=n.pos;l<e.length;l++){let o=e[l];if(!ke(o)&&!r.has(o))n.pos=n.pos+1;else break}return n.pos===e.length?n.state=ee.eof:n.state=ee.succ,n.rslt=e.slice(i,n.pos).join(""),n}T.exports.from_generator=Vo;T.exports.from_charr=zo});var te=h((dd,Or)=>{var{WS_CH_ARR:Cr,NON_NL_WS_CH_ARR:Xo,NL_CH_ARR:Jo}=xe();function Ko(e){return Array.from(e).length}var Qo="\u200C",qr="\u200D",Zo=()=>typeof process<"u"&&process.versions!=null&&process.versions.node!=null;function Ft(e,t,...r){let n=function(){return t(this,...r)};Zo()?e.prototype[Symbol.for("nodejs.util.inspect.custom")]=n:e.prototype.repr=n}var W={tmpl_quote:new Error("tmpl_quote: ` cant be deleted"),reserved:new Error(" [/,*,#,&,`,\\,] and whitespaces are reserved"),inuse:new Error("in using"),char:new Error("must be a char"),pair:new Error("left block must be different with right"),cant_be_empty:new Error("can NOT be empty")},at=Symbol("get_pair_lmp"),ea=Symbol("add_pair_reserved"),He=class{#t;#e=new Map;#s=new Map;constructor(t){this.#t=t}get[at](){return this.#e}get size(){return this.#e.size}[ea](t,r){if(t===r)throw W.pair;this.#e.set(t,r),this.#s.set(r,t)}add(t,r){if(this.#t.validate(t),this.#t.validate(r),t===r)throw W.pair;this.#e.set(t,r),this.#s.set(r,t)}ldelete(t){if(this.size<2)throw W.cant_be_empty;{let r=this.#e.get(t);this.#e.delete(t),this.#s.delete(r)}}rdelete(t){if(this.size<2)throw W.cant_be_empty;{let r=this.#s.get(t);this.#s.delete(t),this.#e.delete(r)}}lhas(t){return this.#e.has(t)}rhas(t){return this.#s.has(t)}has(t){return this.lhas(t)||this.rhas(t)}getl(t){return this.#s.get(t)}getr(t){return this.#e.get(t)}[Symbol.iterator](){return this.#e[Symbol.iterator]()}};function ta(e){return new Map(e[at])}Ft(He,ta);var Ar=Symbol("get_single_set"),Nr=Symbol("add_single_reserved"),Se=class{#t;#e=new Set;constructor(t){this.#t=t}get[Ar](){return this.#e}[Nr](t){this.#e.add(t)}add(t){this.#t.validate(t),this.#e.add(t)}delete(t){if(this.size<2)throw W.cant_be_empty;if(t==="`")throw W.tmpl_quote;this.#e.delete(t)}has(t){return this.#e.has(t)}[Symbol.iterator](){return this.#e[Symbol.iterator]()}};function sa(e){return new Set(e[Ar])}Ft(Se,sa);var ct=class{#t;#e;#s;#r;#n;#i=!1;constructor(){this.#t=new He(this),this.#t.add("[","]"),this.#t.add("(",")"),this.#t.add("<",">"),this.#t.add("\uFF08","\uFF09"),this.#t.add("\u2018","\u2019"),this.#e=new He(this),this.#e.add("{","}"),this.#e.add("\u3010","\u3011"),this.#e.add("\u300A","\u300B"),this.#e.add("\u201C","\u201D"),this.#s=new Se(this),this.#s.add('"'),this.#s.add("'"),this.#s.add("\xB7"),this.#s[Nr]("`"),this.#r=new Se(this),this.#r.add(","),this.#r.add("\uFF0C"),this.#r.add(";"),this.#r.add("\uFF1B"),this.#r.add("\u3002"),this.#r.add("\u3001"),this.#n=new Se(this),this.#n.add(":"),this.#n.add("\uFF1A"),this.#n.add("="),this.#i=!0}get reserved(){return["/","*","#","&","`","\\"].concat(Cr)}get inuse(){let t=new Set;if(this.#i){for(let r of this.#s)t.add(r);for(let r of this.#r)t.add(r);for(let r of this.#n)t.add(r);for(let r of this.#t[at])t.add(r);for(let r of this.#e[at])t.add(r)}return t}validate(t){if(typeof t!="string"||Ko(t)!==1)throw W.char;if(this.reserved.includes(t))throw W.reserved;if(Array.from(this.inuse).flat().includes(t))throw W.inuse;return t}get esc(){return"\\"}get slash(){return"/"}get line_comment(){return"//"}get asterisk(){return"*"}get blk_comments(){return["/*","*/"]}get hash(){return"#"}get ref(){return"&"}get tmpl_quote(){return"`"}get nl(){return Jo}get non_nl_ws(){return Xo}get ws(){return Cr}get array_blks(){return this.#t}get fst_ary_blks(){return Array.from(this.#t)[0]}get obj_blks(){return this.#e}get fst_obj_blks(){return Array.from(this.#e)[0]}get quotes(){return this.#s}get fst_quote(){return Array.from(this.#s)[0]}get commas(){return this.#r}get fst_comma(){return Array.from(this.#r)[0]}get colons(){return this.#n}get fst_colon(){return Array.from(this.#n)[0]}},ut=class{constructor(t){this.reserved=t.reserved}get[Symbol.toStringTag](){return"reserved"}};Object.defineProperty(ut,"name",{value:qr});var _t=class{constructor(t){this.esc=t.esc,this.hash=t.hash,this.ref=t.ref,this.tmpl_quote=t.tmpl_quote,this.slash=t.slash,this.asterisk=t.asterisk,this.line_comment=t.line_comment,this.blk_comments=t.blk_comments,this.nl=t.nl,this.non_nl_ws=t.non_nl_ws}get[Symbol.toStringTag](){return"fixed"}};Object.defineProperty(_t,"name",{value:qr});var ft=class{constructor(t){this.obj_blks=t.obj_blks,this.array_blks=t.array_blks,this.quotes=t.quotes,this.commas=t.commas,this.colons=t.colons}get[Symbol.toStringTag](){return"configurable-if-not-reserved"}};Object.defineProperty(ft,"name",{value:Qo});function ra(e){return[new _t(e),new ft(e),new ut(e)]}Ft(ct,ra);var Ir=new ct;Ir.ERROR_DICT=W;Or.exports=Ir});var Dr=h((pd,jr)=>{function*na(e){for(let t of e)yield t;e=null}jr.exports.sync_gen_from_str=na});var I=h((gd,Pr)=>{var Rr={bk:{_self:0,eof:{_self:1,lc:2,blkc:3,hash:{_self:4,naked:5,quote:6},ref:{_self:7,naked:8,quote:9}}},k:{_self:10,eof:{_self:11,lc:12,blkc:13,hash:{_self:14,naked:15,quote:16},ref:{_self:17,naked:18,quote:19}}},ak:{_self:20,eof:{_self:21,lc:22,blkc:23,hash:{_self:24,naked:25,quote:26},ref:{_self:27,naked:28,quote:29}}},bv:{_self:30,eof:{_self:31,lc:32,blkc:33,hash:{_self:34,naked:35,quote:36},ref:{_self:37,naked:38,quote:39}}},v:{_self:40,eof:{_self:41,lc:42,blkc:43,hash:{_self:44,naked:45,quote:46},ref:{_self:47,naked:48,quote:49}}},av:{_self:50,eof:{_self:51,lc:52,blkc:53,hash:{_self:54,naked:55,quote:56},ref:{_self:57,naked:58,quote:59}}}};function N(e){return e instanceof Object?e._self:e}function ia(e){return e+1}function la(e){return e+2}function oa(e){return e+3}function aa(e){return e+6}function ca(e){return e+5}function ua(e){return e+9}function _a(e){return e+8}function Lr(e){return e%10!==0}var fa={backslash:0,lcmt:1,blkcmt:2,quote:3,naked:4},ha={handling:0,handled:1};function da(e,t,r){let n=Rr;return e.$has_yield_sign()||Lr(r)||t===N(n.av)&&r===N(n.bv)||t===N(n.av)&&r===N(n.bk)||t===N(n.av)&&r===N(n.k)||t===N(n.av)&&r===N(n.v)||t===N(n.av)&&r===N(n.ak)||t===N(n.v)&&r===N(n.bv)||t===N(n.v)&&r===N(n.bk)}Pr.exports={STATE_DICT:Rr,gtv:N,get_main_eofv_with_code:ia,get_lcmt_eofv_with_code:la,get_blkcmt_eofv_with_code:oa,get_hash_quote_eofv_with_code:aa,get_hash_naked_eofv_with_code:ca,get_ref_quote_eofv_with_code:ua,get_ref_naked_eofv_with_code:_a,LEFTED_TYPE:fa,AVND_CACHE_STATE_DICT:ha,is_eofv:Lr,is_should_yield:da}});var Xt=h((md,Xr)=>{var{is_nl:Fr}=xe(),Mr=(e,t,r=" ",n=!1)=>{let i=e.length;return i<=t?r.repeat(t-i)+e:n?e.substr(i-t):e},ht=(e,t,r,n="0",i=!1)=>{let l=e.toString(t);return Mr(l,r,n,i)},pa=/^[0-7]$/,ga=/^[0-9a-fA-F]$/,he=e=>pa.test(e),V=e=>ga.test(e),dt={b:"\b",f:"\f",n:`
2
- `,r:"\r",t:" ",v:"\v"},Yr={"\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\v":"\\v","\\":"\\\\"};function ma(e){return Yr[e]}function Hr(e){return dt[e]}function ba(e){if(e.length>1)return;let t=e.charCodeAt(0);if(t>=0&&t<=255)return"\\x"+ht(t,16,2)}function ya(e){e=Array.from(e);let t=e[0],r=e[1];if(V(t)&&V(r)){let n=parseInt("0x"+t+r);return String.fromCharCode(n)}}function wa(e){if(e.length>1)return;let t=e.charCodeAt(0);if(t>=0&&t<=255)return"\\u"+ht(t,16,4)}function $a(e){e=Array.from(e);let t=e[0],r=e[1],n=e[2],i=e[3];if(V(t)&&V(r)&&V(n)&&V(i)){let l=parseInt("0x"+t+r+n+i);return String.fromCharCode(l)}}function va(e){if(e.length>1)return;let t=e.charCodeAt(0);if(t>=0&&t<=255)return"\\"+ht(t,8,3)}function ka(e){let t="";e=Array.from(e);let r=e[0];if(he(r)){t=t+r;let n=e[1];if(he(n)){t=t+n;let l=e[2];he(l)&&(t=t+l)}let i=parseInt(t,8);return String.fromCharCode(i)}}var g={init:0,executing:1,succ:2,eof:3,backslash:4,x:5,u:6,o:7};function*xa(e){let t=Array.from(e);for(let r of t)yield r}function*Wr(e,t){yield*t,yield*e}function Ur(e,t,r,n,i=!1){if(typeof t=="string"){let o=t;t=a=>a===o}if(typeof(r==="string")&&r.length>0){let o=xa(r);e=Wr(e,o)}else e=Wr(e,r);let l={state:g.init,end:t,esc:n,g:e,curr:"",ch:e.next().value,offset:0};return l.ch!==void 0&&(l.offset=l.offset+1),i&&(l.rslt=""),l}function Mt(e){return e.ch===void 0||e.end(e.ch)&&e.state!==g.backslash||e.state===g.x||e.state===g.u||e.state===g.o}function Yt(e,t=!1){return e.ch===e.esc?(e.state=g.backslash,e.curr=""):(e.state=g.executing,t&&(e.rslt=e.rslt+e.ch),e.curr=e.ch),e.ch=e.g.next().value,e.ch!==void 0&&(e.offset=e.offset+1),e}function Br(e,t,r,n,i,l,o){return o===!0?n===Gr?(e.state=g.x,e.ch="\\x"+t.join(""),e):n===Vr?(e.state=g.u,e.ch="\\u"+t.join(""),e):(n===zr&&(e.state=g.o,e.ch="\\"+t.join("")),e):i?(e.curr=t.join(""),l&&(e.rslt=e.rslt+e.curr),e.state=g.executing,e.ch=r,e):(e.curr=n(t),l&&(e.rslt=e.rslt+e.curr),e.state=g.executing,e.ch=r,e)}function Sa(e,t,r,n,i){return e.curr=n(t),i&&(e.rslt=e.rslt+e.curr),e.state=g.executing,e.ch=e.g.next().value,e.ch!==void 0&&(e.offset=e.offset+1),e}function pt(e,t,r,n,i=!0,l=!1,o=void 0,a=!1){let c;if(o!==void 0?c=o:(c=e.g.next().value,c!==void 0&&(e.offset=e.offset+1)),c===void 0)return e;let u=0,_=[],f;if(l?f=!0:f=r(c),f)u=u+1,_.push(c);else return e.state=g.executing,e.ch=c,e;for(;u<t;){if(c=e.g.next().value,c===void 0)return Br(e,_,c,n,i,a,tail=!0);if(e.offset=e.offset+1,f=r(c),f)u=u+1,_.push(c);else return Br(e,_,c,n,i,a,tail=!1)}return Sa(e,_,c,n,a)}function Gr(e){let t=parseInt("0x"+e[0]+e[1]);return String.fromCharCode(t)}function Vr(e){let t=parseInt("0x"+e[0]+e[1]+e[2]+e[3]);return String.fromCharCode(t)}function zr(e){let t=parseInt(e.join(""),8);return String.fromCharCode(t)}function Ht(e,t=!1){return e.curr=Hr(e.ch),t&&(e.rslt=e.rslt+e.curr),e.state=g.executing,e.ch=e.g.next().value,e.ch!==void 0&&(e.offset=e.offset+1),e}function Ut(e,t=!1){return pt(e,2,V,Gr,!0,!1,void 0,t)}function Gt(e,t=!1){return pt(e,4,V,Vr,!0,!1,void 0,t)}function Vt(e,t=!1){return pt(e,3,he,zr,!1,!0,e.ch,t)}function zt(e,t=!1){return e.curr=e.ch,t&&(e.rslt=e.rslt+e.ch),e.state=g.executing,e.ch=e.g.next().value,e.ch!==void 0&&(e.offset=e.offset+1),e}function Ta(e,t=i=>i==='"',r="",n="\\"){let i=Ur(e,t,r,n,!0);for(i.state=g.executing;!Mt(i);)i.state===g.executing?Yt(i,!0):i.state===g.backslash&&(Fr(i.ch)?(i.ch=i.g.next().value,i.ch!==void 0&&(i.offset=i.offset+1),i.state=g.executing):i.ch in dt?Ht(i,!0):i.ch==="x"?Ut(i,!0):i.ch==="u"?Gt(i,!0):he(i.ch)?Vt(i,!0):zt(i,!0));return typeof i.ch=="string"&&i.end(i.ch)?(i.state=g.succ,i.ch=""):i.state===g.backslash?i.ch=i.esc:i.ch===void 0&&(i.state=g.eof,i.ch=""),i}function*Ea(e){let t=e;for(t.state=g.executing;!Mt(t);)t.state===g.executing?(Yt(t,!1),t.curr!==""&&(yield t.curr)):t.state===g.backslash&&(Fr(t.ch)?(t.state=g.executing,t.ch=t.g.next().value,t.ch!==void 0&&(t.offset=t.offset+1)):t.ch in dt?(Ht(t,!1),t.curr!==""&&(yield t.curr)):t.ch==="x"?(Ut(t,!1),t.curr!==""&&(yield t.curr)):t.ch==="u"?(Gt(t,!1),t.curr!==""&&(yield t.curr)):he(t.ch)?(Vt(t,!1),t.curr!==""&&(yield t.curr)):(zt(t,!1),t.curr!==""&&(yield t.curr)));return typeof t.ch=="string"&&t.end(t.ch)?(t.state=g.succ,t.ch=""):t.state===g.backslash?(t.ch=t.esc,yield t.curr):t.ch===void 0&&(t.state=g.eof,t.ch=""),t}Xr.exports={CHAR_UNESC_DICT:dt,CHAR_ESC_DICT:Yr,escc:ma,unescc:Hr,escx:ba,unescx:ya,escu:wa,unescu:$a,esco:va,unesco:ka,STATE_DICT:g,from_generator:Ta,init:Ur,handle_executing:Yt,is_terminated:Mt,handle_escc:Ht,esc_handle_engine:pt,handle_escx:Ut,handle_escu:Gt,handle_esco:Vt,handle_esc_other:zt,gen:Ea,prepend:Mr,prepend_num:ht,is_odigit_ch:he,is_hdigit_ch:V}});var nn=h((bd,rn)=>{var{is_nl:Ca}=xe(),Te=Xt(),Jr={line_comment:0,blk_comment:1},se={init:0,executing:1,succ:2,eof:3,asterisk:4};function Kr(e){return{state:se.init,g:e,rslt:"",ch:"",offset:0}}function Qr(e,t){return e.state=se.eof,e.rslt=e.rslt+t.rslt,e.ch="",e}function Zr(e,t){return e.state=se.succ,e.rslt=e.rslt+t.rslt,e.ch="",e}function en(e,t){return e.state=se.executing,e.rslt=e.rslt+t.rslt,e.ch=t.ch,e}function tn(e,t=""){let r=Kr(e);r.state=se.executing;let n=Te.from_generator(r.g,Ca,t);return r.offset=n.offset+r.offset,r.g=n.g,n.state===Te.STATE_DICT.eof?Qr(r,n):n.state===Te.STATE_DICT.succ?Zr(r,n):en(r,n)}function sn(e,t=""){let r=Kr(e);r.state=se.executing;let n;for(;;){if(n=Te.from_generator(r.g,"*",t),r.offset=r.offset+n.offset,r.g=n.g,n.state===Te.STATE_DICT.eof)return Qr(r,n);if(n.state===Te.STATE_DICT.succ){let i=r.g.next().value;if(i!==void 0&&(r.offset=r.offset+1),i==="/")return Zr(r,n);if(i!==void 0)r.rslt=r.rslt+n.rslt+"*",t=i,r.offset=r.offset-1;else return r.rslt=r.rslt+n.rslt,r.ch="*",r.state=se.asterisk,r}else return en(r,n)}return r}function qa(e,t,r=""){return t===Jr.line_comment?tn(e,r):sn(e,r)}rn.exports={TYPE_DICT:Jr,STATE_DICT:se,lc_from_generator:tn,blk_from_generator:sn,from_generator:qa}});var Jt=h((yd,ln)=>{function Aa(e){if(globalThis.document===void 0){let i=globalThis.require("fs").readFileSync(e).toString();return JSON.parse(i)}else return}function Na(e,t){if(globalThis.document===void 0){let n=globalThis.require("fs"),i=JSON.stringify(t);n.writeFileSync(e,i)}else return}function Ia(e){return parseInt(e).toString()===e}ln.exports={rjson:Aa,wjson:Na,is_int_str:Ia}});var Kt=h((wd,on)=>{var Oa=()=>Math.random()*9007199254740992;function ja(e,t){return Array.from({length:t-e}).map((r,n)=>n+e)}function Da(e,t){return t.filter((r,n)=>e.includes(n))}function Ra(e){return Object.entries(e).length===0}function La(e){return Object.entries(e).map(n=>n[1])}function Pa(e){return Object.entries(e).map(n=>n[0])}function Wa(e){return Object.entries(e).length}function Ba(e,t){for(let r in e)t(r,e[r]);return e}function Fa(e,t){for(let r in e)e[r]=t(r,e[r]);return e}function Ma(e,t){for(let r in t)e[r]=t[r];return e}function Ya(e,t){for(let r in t)!(r in e)&&(e[r]=t[r]);return e}function Ha(e,t,r){return r=r.filter(n=>n[e]!==t),r}function Ua(e,t,r){return r.findIndex(i=>i[e]===t)}function Ga(e){return JSON.parse(JSON.stringify(e))}function Va(e,t){for(let r=0;r<e.length;r++){lyr=e[r];for(let n=0;n<lyr.length;n++)e[r][n]=t(e[r][n],r,n)}return e}function za(e){let t=e[0]!=="_",r=e[0]!=="$";return t&&r}on.exports={gen_guid:Oa,range:ja,seqs_slct:Da,dict_length:Wa,is_empty_dict:Ra,dict_values:La,dict_keys:Pa,dict_map:Fa,dict_foreach:Ba,dict_plus:Ma,dict_update:Ya,dtb_kv_rm:Ha,dtb_kv_get_seq:Ua,dcp:Ga,mat_map:Va,is_cu_property:za}});var us=h(($d,On)=>{var v=Kt();function es(e){if(v.is_empty_dict(e))return 0;{let t=v.dict_keys(e);return Math.max(...t)+1}}function Ue(e){return e!=null}function cn(e,t){return e._id=e._id+t,e._tree=e._tree+t,Ue(e._fstch)&&(e._fstch=e._fstch+t),Ue(e._lsib)&&(e._lsib=e._lsib+t),Ue(e._rsib)&&(e._rsib=e._rsib+t),Ue(e._parent)&&(e._parent=e._parent+t),e}function de(e,t){let r=es(e);for(let n in t){let i=cn(t[n],r);t[i._id]=i,delete t[n]}return t}function Xa(e=0){let t=e;return{_id:t,_fstch:null,_lsib:null,_rsib:null,_parent:null,_tree:t}}function Ja(e,t=0){return{_id:es(e)+t,_fstch:null,_lsib:void 0,_rsib:void 0,_parent:void 0,_tree:void 0}}function un(e){return e._tree!==void 0}function re(e){let t=e._tree!==void 0,r=e._tree===e._id;return t&&r}function ts(e){return e._lsib===null}function ss(e){return e._rsib===null}function B(e){return e._fstch===null}function _n(e,t){if(re(e))return!0;{let n=x(e,t);return M(n,t).length===1}}function Xe(e){return re(e)||!un(e)}function gt(e,t,r){if(!Xe(t))return console.log("only root or uninited could be prepend"),e;let n=B(e);if(t._tree=e._tree,t._lsib=null,n)t._rsib=null,t._parent=e._id;else{let i=r[e._fstch];i._lsib=void 0,t._rsib=i._id,t._parent=void 0}return e._fstch=t._id,r[t._id]=t,e}function rs(e,t,r){if(!Xe(t))return console.log("only root or uninited could be append"),e;let n=B(e);if(t._tree=e._tree,t._rsib=null,n)e._fstch=t._id,t._lsib=null;else{let i=ge(e,r);i._parent=void 0,i._rsib=t._id,t._lsib=void 0}return t._parent=e._id,r[t._id]=t,e}function ns(e,t,r){if(!Xe(t))return console.log("only root or uninited could be add"),e;if(re(e))return console.log("cant addrsib to root"),e;let n=ss(e);return t._tree=e._tree,n?(t._parent=e._parent,e._parent=void 0,t._rsib=null):(t._rsib=e._rsib,t._parent=void 0),e._rsib=t._id,t._lsib=void 0,r[t._id]=t,e}function fn(e,t,r){if(!Xe(t))return console.log("only root or uninited could be add"),e;if(re(e))return console.log("cant addlsib to root"),e;let n=ts(e);if(t._tree=e._tree,n){let i=x(e,r);e._lsib=void 0,t._lsib=null,i._fstch=t._id}else{let i=F(e,r);i._rsib=t._id,t._lsib=void 0}return t._rsib=e._id,t._parent=void 0,r[t._id]=t,e}function hn(e,t,r,n){let i=M(t,n),l=i.length;if(l===0)return gt(t,r,n);if(e<=l&&e>=0){if(e===0)return gt(t,r,n);if(e===l)return rs(t,r,n);{let a=i[e-1];return ns(a,r,n)}}else return console.log("not in range!!"),t}function Ee(e,t){for(let r in t)t[r]._tree=e._tree}function Ka(e,t,r){r=de(t,r);let n=v.dict_keys(r)[0],i=ie(r[n],r);return e=gt(e,i,t),Ee(e,r),v.dict_plus(t,r),e}function Qa(e,t,r){r=de(t,r);let n=v.dict_keys(r)[0],i=ie(r[n],r);return e=rs(e,i,t),Ee(e,r),v.dict_plus(t,r),e}function Za(e,t,r){r=de(t,r);let n=v.dict_keys(r)[0],i=ie(r[n],r);return e=ns(e,i,t),Ee(e,r),v.dict_plus(t,r),e}function ec(e,t,r){r=de(t,r);let n=v.dict_keys(r)[0],i=ie(r[n],r);return e=fn(e,i,t),Ee(e,r),v.dict_plus(t,r),e}function tc(e,t,r,n){n=de(r,n);let i=v.dict_keys(n)[0],l=ie(n[i],n);return t=hn(e,t,l,r),Ee(t,n),v.dict_plus(r,n),t}function Ge(e,t){let r=Y(e,t),n=r[0]._id;return r.forEach(i=>{i._tree=n}),r}function Ve(e,t){let r={};return e.map(n=>{let i=n._id;r[i]=n,delete t[i]}),r}function dn(e){return e._fstch=null,e}function ze(e){return e._lsib=null,e._rsib=null,e._parent=null,e}function Ce(e,t){if(re(e))return[e,t];if(_n(e,t)){let n=t[e._parent];dn(n);let i=Ge(e,t),l=Ve(i,t);return ze(e),[e,l]}else if(ts(e)){let n=L(e,t);n._lsib=null;let i=x(e,t);i._fstch=e._rsib;let l=Ge(e,t),o=Ve(l,t);return ze(e),[e,o]}else if(ss(e)){let n=F(e,t);n._rsib=e._rsib,n._parent=e._parent;let i=Ge(e,t),l=Ve(i,t);return ze(e),[e,l]}else{let n=F(e,t);n._rsib=e._rsib;let i=Ge(e,t),l=Ve(i,t);return ze(e),[e,l]}}function sc(e,t){let r=pe(e,t);return r===null?[e,t]:Ce(r,t)}function rc(e,t){let r=ge(e,t);return r===null?[e,t]:Ce(r,t)}function nc(e,t,r){let n=pn(e,t,r);return n===null?[t,r]:Ce(n,r)}function ic(e,t,...r){let n=gn(e,t,...whiches);for(let i=0;i<n.length;i++)Ce(n[i],t);return[e,t]}function lc(e,t){let r=M(e,t);for(let n=0;n<r.length;n++)Ce(r[n],t);return t}function pe(e,t){return e._fstch===null?null:t[e._fstch]}function M(e,t){let r=[],n=pe(e,t);for(;n!==null;)r.push(n),n=L(n,t);return r}function ge(e,t){let r=M(e,t);return r.length===0?null:r[r.length-1]}function pn(e,t,r){let n=M(t,r);return n.length===0||e>n.length-1||e<0?null:n[e]}function gn(e,t,...r){let n=M(e,t),i=[];if(n.length!==0)for(let l=0;l<r.length;l++){let o=r[l];o>n.length-1||o<0||i.push(n[o])}return i}function mn(e,t,r=!1){let n=e,i=L(e,t);for(;i!==null;)n=i,i=L(i,t);return r||n._id!==e._id?n:null}function oc(e,t){let r=ne(e,t,!0),n=v.dtb_kv_get_seq("_id",e._id,r),i=[];if(r.length!==0)for(let l=0;l<r.length;l++)l<n&&i.push(r[l]);return i}function ac(e,t){let r=ne(e,t,!0),n=v.dtb_kv_get_seq("_id",e._id,r),i=[];if(r.length!==0)for(let l=0;l<r.length;l++)l>n&&i.push(r[l]);return i}function ne(e,t,r=!1){let n=x(e,t),i;return n!==null?i=M(n,t):i=[e],r||(i=v.dtb_kv_rm("_id",e._id,i)),i}function cc(e,t,r=!1){let n=ne(e,t,!0);return r?n[0]:n[0]._id===e._id?null:n[0]}function uc(e,t,r){let n=ne(t,r,!0),i=n.length;return e<=i-1&&e>=0?n[e]:null}function _c(e,t,...r){let n=ne(e,t,!0),i=[];if(n.length!==0)for(let l=0;l<r.length;l++){let o=r[l];o>n.length-1||o<0||i.push(n[o])}return i}function fc(e,t){let r=ne(e,t,!0);return v.dtb_kv_get_seq("_id",e._id,r)}function F(e,t){let r=ne(e,t,!0),n=v.dtb_kv_get_seq("_id",e._id,r);return n===0?null:r[n-1]}function L(e,t){return e._rsib===null?null:t[e._rsib]}function C(e,t){return mt(e,t,!0).length-1}function bn(e,t){let r=C(e,t),i=Y(e,t).map(o=>C(o,t));return Math.max(...i)-r+1}function hc(e,t){return B(e)?null:C(e,t)+1}function dc(e,t){if(B(e))return null;{let n=C(e,t),l=Y(e,t).map(a=>C(a,t));return Math.max(...l)}}function pc(e,t,r){let n=C(t,r);return bn(t,r)<=e?null:n+e}function yn(e,t){let r=ie(e,t),n=Y(r,t),i=C(e,t);return n.filter(o=>C(o,t)===i)}function Qt(e,t){let r=yn(e,t);return v.dtb_kv_get_seq("_id",e._id,r)}function gc(e,t){return Y(e,t).length}function ie(e,t){let r=e,n=x(e,t);for(;n!==null;)r=n,n=x(n,t);return r}function x(e,t){let r;if(re(e))r=null;else{let n=mn(e,t,!0);r=t[n._parent]}return r}function mt(e,t,r=!1){let n=[],i=x(e,t);for(;i!==null;)n.push(i),i=x(i,t);return r&&n.unshift(e),n}function mc(e,t,r){let n=mt(t,r,!0),i=n.length;return e<i&&e>=0?n[e]:null}function bc(e,t,...r){let n=mt(e,t,!0),i=[];if(n.length!==0)for(let l=0;l<r.length;l++){let o=r[l];o>n.length-1||o<0||i.push(n[o])}return i}function wn(e,t){let r=x(e,t);for(;r!==null;){let n=L(r,t);if(n!==null)return n;r=x(r,t)}return null}function $n(e,t){let r=pe(e,t);if(r!==null)return r;{let n=L(e,t);return n!==null?n:wn(e,t)}}function vn(e,t){let r=e,n=ge(e,t);for(;n!==null;)r=n,n=ge(n,t);return r}function yc(e,t){if(re(e))return null;if(B(e)){let n=F(e,t);return n!==null?n:x(e,t)}else{let n=F(e,t);return n!==null?B(n)?n:vn(n,t):x(e,t)}}function Y(e,t){let r=C(e,t),n=[];for(;e!==null&&(n.push(e),e=$n(e,t),!(e!==null&&C(e,t)<=r)););return n}function is(e,t){let r=e,n=pe(e,t);for(;n!==null;)r=n,n=pe(n,t);return r}function kn(e,t){let r=L(e,t);return r===null?x(e,t):is(r,t)}function xn(e,t){let r=x(e,t);for(;r!==null;){let n=F(r,t);if(n!==null)return n;r=x(r,t)}return null}function wc(e,t){if(B(e)){let n=F(e,t);return n===null?xn(e,t):n}else return ge(e,t)}function Sn(e,t){let r=[],n=is(e,t);for(;n!==null&&(r.push(n),n._id!==e._id);)n=kn(n,t);return r}function Zt(e){v.dict_foreach(e,(t,r)=>{e[t]._$visited=!1})}function Tn(e,t){let r=e._$visited;if(B(e))if(r){let i=L(e,t);return i===null?x(e,t):i}else return e._$visited=!0,e;else if(r){let i=L(e,t);return i===null?x(e,t):i}else return e._$visited=!0,pe(e,t)}function $c(e,t,r){if(B(t)){if(e)return t;{let i=F(t,r);return i===null?x(t,r):i}}else{if(e)return ge(t,r);{let i=F(t,r);return i===null?x(t,r):i}}}function En(e,t){return t._$visited&&e===t._id}function Cn(e,t,r=!1,n=!0){let i=[];Zt(t);let l=e._id;for(;!En(l,e);)r?i.push(v.dcp(e)):i.push(e),e=Tn(e,t);return r?i.push(v.dcp(e)):i.push(e),n&&Zt(t),i}function vc(e,t){let r={};r._depth=C(e,t),r._breadth=Qt(e,t);let n=x(e,t);return r._pbreadth=n===null?null:Qt(n,t),r._id=e._id,r}function an(e){let t={};return t.ele={},t.nd=e,t.ele._id=e._id,t.ele._children=[],t}function ls(e,t){let r=[],n=e[0],i=[an(n)];for(i[0].ele._pbreadth=null;i.length>0;){let l=[];for(let a=0;a<i.length;a++){i[a].ele._breadth=a,i[a].ele._depth=r.length;let c=M(i[a].nd,t);c=c.map(u=>an(u)),c.forEach((u,_)=>{u.ele._pbreadth=i[a].ele._breadth,i[a].ele._children.push([r.length+1,l.length+_])}),l=l.concat(c)}let o=i.map(a=>a.ele);r.push(o),i=l}return r}function qn(e,t){return Sn(e[0],t)}function An(e,t,r=!1,n=!0){return Cn(e[0],t,r,n)}function kc(e,t){let r=os(e,t);return ls(r,t)}function os(e,t){let r=e[e.length-1];return Y(r,t)}function xc(e,t,r=!1,n=!0){let i=os(e,t);return An(i,t,r,n)}function Sc(e,t){let r=as(e,t);return ls(r,t)}function as(e,t){let r=e[0];return Y(r,t)}function Tc(e,t){let r=as(e,t);return qn(r,t)}function cs(e,t,r=!1){let n=Y(e,t);return r||n.splice(0,1),n}function Ec(e,t){return M(e,t)}function Cc(e,t){let r=cs(e,t,!1),n=sdfs.map(l=>C(l,t)),i=Math.max(...n);return r=r.filter(l=>C(l,t)===i),r}function Nn(e,t,r){let n=C(t,r),i=cs(t,r,!1),l=sdfs.map(o=>C(o,r));return i=i.filter(o=>C(o,r)===n+e),i}function qc(e,t,...r){let n=r.map(i=>Nn(i,e,t));return n=Array.prototype.concat(...n),n}function In(e){let t=v.dict_keys(e)[0],r=e[t];return ie(r,e)}function Ac(e){let t=In(e);return Y(t,e)}On.exports={calc_next_id:es,update_nodes_ids:de,creat_root:Xa,creat_nd:Ja,is_inited:un,is_root:re,is_fstch:ts,is_lstch:ss,is_leaf:B,is_lonely:_n,is_id:Ue,is_connectable:Xe,prepend_child:gt,append_child:rs,insert_child:hn,add_rsib:ns,add_lsib:fn,get_fstch:pe,get_rsib:L,get_children:M,get_lstch:ge,get_which_child:pn,get_some_children:gn,get_fstsib:cc,get_lstsib:mn,get_preceding_sibs:oc,get_following_sibs:ac,get_sibs:ne,get_which_sib:uc,get_some_sibs:_c,get_sibseq:fc,get_lsib:F,get_rsib:L,get_lyr:yn,get_breadth:Qt,get_count:gc,get_depth:C,get_height:bn,get_fst_lyr_des_depth:hc,get_lst_lyr_des_depth:dc,get_which_lyr_des_depth:pc,get_root:ie,get_parent:x,get_ances:mt,get_which_ance:mc,get_some_ances:bc,get_rsib_of_fst_ance_having_rsib:wn,get_sdfs_next:$n,get_drmost_des:vn,get_sdfs_prev:yc,get_sdfs:Y,get_lsib_of_fst_ance_having_lsib:xn,get_dlmost_des:is,get_edfs_next:kn,get_edfs_prev:wc,get_edfs:Sn,clear_$visited:Zt,get_sedfs_next:Tn,is_sedfs_traverse_finished:En,get_sedfs_prev:$c,get_sedfs:Cn,get_deses:cs,get_fst_lyr_deses:Ec,get_lst_lyr_deses:Cc,get_which_lyr_deses:Nn,get_some_lyrs_deses:qc,nd2ele:vc,sdfs2mat:ls,sdfs2edfs:qn,sdfs2sedfs:An,edfs2mat:kc,edfs2sdfs:os,edfs2sedfs:xc,sedfs2mat:Sc,sedfs2sdfs:as,sedfs2edfs:Tc,update_disconnected_nodes:Ge,update_orig_nodes:Ve,leafize:dn,rootize:ze,disconnect:Ce,rm_fstch:sc,rm_lstch:rc,rm_which:nc,rm_some:ic,rm_all:lc,update_treeid:Ee,update_one_nodeid:cn,update_nodes_ids:de,prepend_child_tree:Ka,append_child_tree:Qa,add_rsib_tree:Za,add_lsib_tree:ec,insert_child_tree:tc,get_root_via_tree:In,tree2sdfs:Ac}});var Pn=h((vd,Ln)=>{function jn(e="E"){class t extends Event{#t;constructor(n,i){super(n),this.#t=i}get data(){return this.#t}set data(n){this.#t=n}}return t}var Dn=jn();function Rn(e="ET"){class t extends EventTarget{#t=new Map;addEventListener(n,i){super.addEventListener(n,i),this.#t.set(n,i)}ls(){return this.#t}removeEventListener(n){super.removeEventListener(n),this.#t.delete(n)}dispatch(n,i){let l=new Dn(n,i);return this.dispatchEvent(l),l}}return t}var Nc=Rn();Ln.exports={creat_event_cls:jn,E:Dn,creat_event_target_cls:Rn,ET:Nc}});var pi=h((kd,di)=>{var Qn=Jt(),Ke=Kt(),me=us(),{ET:Wn}=Pn(),Ic=["_fstch","_lsib","_rsib","_parent","_tree"];function Zn(e){return e._tree!==void 0}function _s(e){return e._tree===e}function Oc(e){return e._lsib===null}function jc(e){return e._rsib===null}function Dc(e){return e._fstch===null}function Rc(e){return e.$sibs(!0).length===1}function xt(e){return _s(e)||!Zn(e)}function Bn(e){let t=e._fstch,r=t;for(;t!==null;)r=t,t=t._rsib;return r}function Fn(e,t){let r=0,n=t._fstch;for(;;){if(r===e)return n;if(n===null)return n;n=n._rsib,r=r+1}}function Mn(e,...t){let r=[],n=0,i=e._fstch;for(;;){if(t.includes(n))r.push(i);else if(i===null)return r;i=i._rsib,n=n+1}}function fs(e){let t=[],r=0,n=e._fstch;for(;;){if(n===null)return t;t.push(n),n=n._rsib,r=r+1}}function Lc(e){let t=0,r=e._fstch;for(;;){if(r===null)return t;r=r._rsib,t=t+1}}function ei(e,t=!1){let r=e._rsib,n=e;for(;r!==null;)n=r,r=r._rsib;return t||n!==e?n:null}function St(e,t=!1){let r=hs(e);if(r===null)return t?e:null;{let n=r._fstch;return t||n!==e?n:null}}function Pc(e){let t=St(e,!1);if(t===null)return null;{let r=t;for(;;){if(r._rsib===e)return r;r=r._rsib}}}function gs(e){let t=[],n=St(e,!0);for(;n!==null;){if(n===e)return t;t.push(n),n=n._rsib}}function ti(e){let t=[],r=e._rsib;for(;r!==null;)t.push(r),r=r._rsib;return t}function si(e,t=!1){let r=gs(e),n=ti(e),i=[e],l;return t?l=r.concat(i,n):l=r.concat(n),l}function Wc(e,t){let r=St(t,!0),n=0;for(;;){if(r===null)return null;if(n==e)return r;r=r._rsib,n=n+1}}function Bc(e,...t){return si(e,!0).filter((i,l)=>t.includes(l))}function Yn(e){return gs(e).length}function Fc(e,t=!1){return e.$sibs(t).length}function hs(e){return ei(e,!0)._parent}function Mc(e){let t=e,r=e;for(;t!==null;)r=t,t=t.$parent();return r}function Yc(e,t){let r=0,n=t;for(;n!==null;){if(r===e)return n;n=n.$parent(),r=r+1}return null}function vt(e,t=!1){let r=[],n=e;for(t&&r.push(n),n=n.$parent();n!==null;)r.push(n),n=n.$parent();return r}function Hc(e,...t){return vt(e,!0).filter((i,l)=>t.includes(l))}function Uc(e,t=!1){return vt(e,t).length}function Gc(e){let t=e.$parent();return t===null?null:t.$lsib()}function Vc(e){let t=e.$parent();return t===null?null:t.$rsib()}function zc(e){let t=e.$luncle();return e.$is_fstch()?t===null?null:t.$lstch():null}function Xc(e){let t=e.$runcle();return e.$is_lstch()?t===null?null:t.$fstch():null}function Jc(e){let r=e.$root().$sdfs(),n=e.$depth();return r.filter(l=>l.$depth()===n)}function Kc(e){let t=e.$parent();return t===null?null:t.$breadth()}function Qc(e){return e.$lyr().indexOf(e)}function Zc(e){let t=e.$sdfs();return t=t.filter(r=>r.$is_leaf()),t.length}function eu(e){let r=e.$root().$edfs(),n;if(e.$is_leaf())n=r.indexOf(e);else{let i=e.$dlmost_des();n=r.indexOf(i)}return r=r.slice(0,n+1),offset=r.filter(i=>i.$is_leaf()).length-1,offset}function Hn(e,t=!1){let r=ni(e),n=ye(e),i=n.indexOf(r);return t?n.slice(0,i+1):n.slice(1,i+1)}function tu(e){let t=e.$deses(!1),r=t.map(i=>i.$depth()),n=Math.max(...r);return t=t.filter(i=>i.$depth()===n),t}function su(e,t){let r=t.$depth(),n=t.$deses(!1),i=n.map(l=>l.$depth());return n=n.filter(l=>l.$depth()===r+e),n}function ru(e,...t){let r=e.$depth(),n=t.map(o=>o+r),i=e.$deses(!1),l=i.map(o=>o.$depth());return i=i.filter(o=>n.includes(o.$depth())),i}function ds(e,t){if(!xt(t))return console.log("only root or uninited could be prepend"),t;let r=e.$is_leaf();if(t._tree=e._tree,t._lsib=null,r)t._rsib=null,t._parent=e;else{let n=e._fstch;n._lsib=void 0,t._rsib=n,t._parent=void 0}return e._fstch=t,t}function ps(e,t){if(!xt(t))return console.log("only root or uninited could be append"),t;let r=e.$is_leaf();if(t._tree=e._tree,t._rsib=null,r)e._fstch=t,t._lsib=null;else{let n=e.$lstch();n._parent=void 0,n._rsib=t,t._lsib=void 0}return t._parent=e,t}function ri(e,t){if(!xt(t))return console.log("only root or uninited could be add"),t;if(e.$is_root())return console.log("cant addrsib to root"),e;let r=e.$is_lstch();return t._tree=e._tree,r?(t._parent=e._parent,e._parent=void 0,t._rsib=null):(t._rsib=e._rsib,t._parent=void 0),e._rsib=t,t._lsib=void 0,t}function nu(e,t){if(!xt(t))return console.log("only root or uninited could be add"),t;if(e.$is_root())return console.log("cant addlsib to root"),e;let r=e.$is_fstch();if(t._tree=e._tree,r){let n=e.$parent();e._lsib=void 0,t._lsib=null,n._fstch=t}else{let n=e.$lsib();n._rsib=t,t._lsib=void 0}return t._rsib=e,t._parent=void 0,t}function Un(e,t,r){let n=fs(t),i=n.length;if(i===0)r=ds(t,r);else if(!(e<=i&&e>=0))console.log("not in range!!");else if(e===0)r=ds(t,r);else if(e===i)r=ps(t,r);else{let o=n[e-1];r=ri(o,r)}return r}function iu(e){let t=e.$parent();for(;t!==null;){let r=t.$rsib();if(r!==null)return r;t=t.$parent()}return null}function lu(e){let t=e.$fstch();if(t!==null)return t;{let r=e.$rsib();return r!==null?r:e.$rsib_of_fst_ance_having_rsib()}}function ni(e){let t=e,r=e.$lstch();for(;r!==null;)t=r,r=r.$lstch();return t}function ou(e){if(e.$is_root())return null;if(e.$is_leaf()){let r=e.$lsib();return r!==null?r:e.$parent()}else{let r=e.$lsib();return r!==null?r.$is_leaf()?r:r.$drmost_des():e.$parent()}}function ye(e){let t=e.$depth();if(e===null)return[];{let r=[e];for(e=e.$sdfs_next();e!==null&&e.$depth()>t;)r.push(e),e=e.$sdfs_next();return r}}function au(e){let t=e,r=e.$fstch();for(;r!==null;)t=r,r=r.$fstch();return t}function cu(e){let t=e.$rsib();return t===null?e.$parent():t.$dlmost_des()}function uu(e){let t=e.$parent();for(;t!==null;){let r=t.$lsib();if(r!==null)return r;t=t.$parent()}return null}function _u(e){if(e.$is_leaf()){let r=e.$lsib();return r===null?e.$lsib_of_fst_ance_having_lsib():r}else return e.$lstch()}function fu(e){let t=[],r=e.$dlmost_des();for(;r!==null&&(t.push(r),r!==e);)r=r.$edfs_next();return t}function ii(e){let t=e.$visited;if(e.$is_leaf())if(t){let n=e.$rsib();return n===null?e.$parent():n}else return e.$visited=!0,e;else if(t){let n=e.$rsib();return n===null?e.$parent():n}else return e.$visited=!0,e.$fstch()}function hu(e,t){if(t.$is_leaf()){if(e)return t;{let n=t.$lsib();return n===null?t.$parent():n}}else{if(e)return t.$lstch();{let n=t.$lsib();return n===null?t.$parent():n}}}function du(e){e.$sdfs().forEach(r=>{delete r.$visited})}function pu(e,t){return t.$visited&&e===t}function Gn(e){du(e);let t=[],r=new Set,n=e;for(;!pu(n,e);)r.has(e)?e.$close_at=t.length:(e.$open_at=t.length,r.add(e)),t.push(e),e=ii(e);return n.$close_at=t.length,t.push(n),t.forEach(i=>{delete i.$visited}),t}function gu(e){return e._fstch=null,e}function bt(e){return e._lsib=null,e._rsib=null,e._parent=null,e}function yt(e){let t=e.$sdfs();return t.forEach(r=>{r._tree=t[0]}),t}function be(e){if(e.$is_root())return e;if(e.$is_lonely()){let r=e.$parent();gu(r);let n=yt(e);return bt(e),e}else if(e.$is_fstch()){let r=e.$rsib();r._lsib=null;let n=e.$parent();n._fstch=e._rsib;let i=yt(e);return bt(e),e}else if(e.$is_lstch()){let r=e.$lsib();r._rsib=e._rsib,r._parent=e._parent;let n=yt(e);return bt(e),e}else{let r=e.$lsib();r._rsib=e._rsib;let n=yt(e);return bt(e),e}}function Vn(e){let t={};return t._nd=e,t._children=[],t}function zn(e){let t=[],r=e[0],n=[Vn(r)];for(n[0]._pbreadth=null;n.length>0;){let i=[];for(let o=0;o<n.length;o++){n[o]._breadth=o,n[o]._depth=t.length;let a=n[o]._nd.$children();a=a.map(c=>Vn(c)),a.forEach((c,u)=>{c._pbreadth=n[o]._breadth,n[o]._children.push([t.length+1,i.length+u])}),i=i.concat(a)}let l=n;t.push(l),n=i}return t}function Xn(e,t="_children"){let r=e._nd,n={};n[t]=[],n.$guid=r.$guid;for(let i in r)Ke.is_cu_property(i)&&(n[i]=r[i]);return n}function mu(e,t="_children"){let r=e[0][0],n=Xn(r,t),i=[{d:n,ele:r}];for(;i.length>0;){let l=[];for(let o=0;o<i.length;o++){let a=i[o],c=a.d,u=a.ele,f=a.ele._children.map(d=>e[d[0]][d[1]]);for(let d=0;d<f.length;d++){let b=f[d],k=Xn(b,t);c[t].push(k);let lt={d:k,ele:b};l.push(lt)}}i=l}return n}function Jn(e,t="_children"){let r=new z;e.$guid!==void 0&&(r.$guid=e.$guid);for(let n in e)Ke.is_cu_property(n)&&t!==n&&(r[n]=e[n]);return r}function bu(e,t="_children"){let r=Jn(e,t),n=[{d:e,nd:r}];for(;n.length>0;){let i=[];for(let l=0;l<n.length;l++){let o=n[l].d,a=n[l].nd,c=o[t]===void 0?[]:o[t];for(let u=0;u<c.length;u++){let _=c[u],f=Jn(_,t);a.$append_child(f);let d={d:_,nd:f};i.push(d)}}n=i}return r}function yu(e){let t=["_fstch","_lsib","_rsib","_parent","_tree","$guid","_guid","_id","$open_at","$close_at"];e._fstch=void 0,e._lsib=void 0,e._rsib=void 0,e._parent=void 0,e._tree=void 0,e.$guid=void 0,e._guid=void 0,e._id=void 0,e.$open_at=void 0,e.$close_at=void 0;for(let r of t)Object.defineProperty(e,r,{enumerable:!1})}function wu(e,t,r){let n=e.$depth();return" ".repeat(n)+"["+r.indexOf(e)+"] : "+e.$guid}function $u(e,t){let r=e.$depth(),n=" ".repeat(r),i="";return t===e.$open_at&&(i=n+"<"+e._id+" : "+e.$guid+">"),t===e.$close_at&&(i=n+"</"+e._id+" : "+e.$guid+">"),i}var vu=["$fstch","$rsib","$parent"];function ku(e){if(e.$fstch()!==null)return["$fstch"];if(e.$rsib()!==null)return["$rsib"];{let n=[],i=e.$parent();for(;i!==null;)if(n.push("$parent"),i.$rsib()!==null){n.push("$rsib");break}else i=i.$parent();return n}}function xu(e){return e.$sdfs().map(n=>n.$sdfs_next_action_for_srch())}var li={$fstch:"$append_child",$rsib:"$add_rsib",$parent:"$parent"};function Su(e,t){for(let r=0;r<t.length;r++){let n=li[t[r]];e=e[n]()}return e}function Tu(e){let t=new z,r=t;for(let n=0;n<e.length;n++){let i=e[n];r=Su(r,i)}return t}function Eu(e,t,r){if(r&&(t=t.$clone()),!e.$is_root())if(e.$is_lonely()){let n=e.$parent();e.$disconn(),n.$append_child(t)}else if(e.$is_lstch()){let n=e.$lsib();e.$disconn(),n.$add_rsib(t)}else{let n=e.$rsib();e.$disconn(),n.$add_lsib(t)}return t}var j=class{#t=null;#e={with_id:!1,with_et:!1};constructor(t=!1,r=!1){yu(this),this._fstch=null,this.#e.with_id=t,this.#e.with_et=r,t&&(this.$guid=Ke.gen_guid()),r&&(this.#t=new Wn)}get opt(){return this.#e}enable_et(){this.#t=new Wn}disable_et(){this.#t=null}get et(){return this.#t}regis_recv_from_handler(t){let r=function(n){t(n.data.src,n.data.msg)};this.et.addEventListener("$msg__",r)}send_to(t,r){t.et.dispatch("$msg__",{src:this,msg:r})}$is_inited(){return Zn(this)}$is_root(){return _s(this)}$is_fstch(){return Oc(this)}$is_lstch(){return jc(this)}$is_leaf(){return Dc(this)}$is_lonely(){return Rc(this)}$fstch(){return this._fstch}$lstch(){return Bn(this)}$which_child(t){return Fn(t,this)}$some_children(...t){return Mn(this,...t)}$children(){return fs(this)}$children_count(){return Lc(this)}$rsib(){return this._rsib}$lsib(){return Pc(this)}$fstsib(t=!1){return St(this,t)}$lstsib(t=!1){return ei(this,t)}$psibs(){return gs(this)}$fsibs(){return ti(this)}$which_sib(t){return Wc(t,this)}$some_sibs(...t){return Bc(this,...t)}$sibseq(){return Yn(this)}$sibs(t=!1){return si(this,t)}$sibs_count(t=!1){return Fc(this,t)}$parent(){return hs(this)}$root(){return Mc(this)}$ances(t=!1){return vt(this,t)}$which_ance(t){return Yc(t,this)}$some_ances(...t){return Hc(this,...t)}$ances_count(t=!1){return Uc(this,t)}$prepend_child(t){return t=t===void 0?new j(this.#e.with_id,this.#e.with_et):t,ds(this,t)}$insert_child(t,r){return r=r===void 0?new j(this.#e.with_id,this.#e.with_et):r,Un(t,this,r)}$append_child(t){return t=t===void 0?new j(this.#e.with_id,this.#e.with_et):t,ps(this,t)}$clone(){if(_s(this)){let t=$t(this);return kt(t)}else{let t=Yn(this),r=hs(this);be(this);let n=$t(this),i=kt(n);return Un(t,r,this),i}}$append_children(t,r){let n=[];for(let i=0;i<t;i++){let l=r===void 0?new j(this.#e.with_id,this.#e.with_et):r.$clone();l=ps(this,l),n.push(l)}return n}$add_rsib(t){return t=t===void 0?new j(this.#e.with_id,this.#e.with_et):t,ri(this,t)}$add_lsib(t){return t=t===void 0?new j(this.#e.with_id,this.#e.with_et):t,nu(this,t)}$rsib_of_fst_ance_having_rsib(){return iu(this)}$sdfs_next(){return lu(this)}$drmost_des(){return ni(this)}$sdfs_prev(){return ou(this)}$sdfs(){return ye(this)}$dlmost_des(){return au(this)}$edfs_next(){return cu(this)}$lsib_of_fst_ance_having_lsib(){return uu(this)}$edfs_prev(){return _u(this)}$edfs(){return fu(this)}$offset(){return eu(this)}$sedfs_next(){return ii(this)}$sedfs_prev(t){return hu(this)}$sedfs(){return Gn(this)}$deses(t=!1){return Hn(this,t)}$lst_lyr_deses(){return tu(this)}$which_lyr_deses(t){return su(t,this)}$some_lyrs_deses(...t){return ru(this,...t)}$count(t=!0){return Hn(this,t).length}$depth(t=!1){return vt(this,t).length}$height(){let t=this.$depth(),n=this.$sdfs().map(l=>l.$depth());return Math.max(...n)-t+1}$pbreadth(){return Kc(this)}$breadth(){return Qc(this)}$width(){return Zc(this)}$lyr(){return Jc(this)}$lcin(){return zc(this)}$rcin(){return Xc(this)}$luncle(){return Gc(this)}$runcle(){return Vc(this)}$sdfs_repr(t=wu,r=!1){let n=this.$root(),i=ye(n),a=ye(this).map((c,u)=>t(c,u,i)).join(`
3
- `);if(console.log(a),r)return a}$sedfs_repr(t=$u,r=!1){let n=this.$root();oi(n);let o=Gn(this).map((a,c)=>t(a,c)).join(`
4
- `);if(console.log(o),r)return o}$disconn(){return be(this)}$rm_fstch(){let t=this._fstch;return be(t)}$rm_lstch(){let t=Bn(this);return be(t)}$rm_which(t){let r=Fn(t,this);return be(r)}$rm_some_children(...t){return Mn(this,...t).map(n=>be(n))}$rm_all_children(){return fs(this).map(r=>be(r))}$dump(){if(this.$is_root())return $t(this);console.log("only root !!!")}$dump2file(t){if(this.$is_root()){let r=$t(this);Qn.wjson(t,r)}else console.log("only root !!!")}$sdfs2mat(){return zn(ye(this))}$nest_dict(t="_children"){let r=zn(ye(this));return mu(r,t)}$index(){return this.$sibseq()}$sdfs_index(){return this.$root().$sdfs().indexOf(this)}$sdfs_leafs(){return this.$root().$sdfs().filter(i=>i.$is_leaf())}$sdfs_nonleafs(){return this.$root().$sdfs().filter(i=>!i.$is_leaf())}$sdfs_leaf_index(){return this.$sdfs_leafs().indexOf(this)}$sdfs_nonleaf_index(){return this.$sdfs_nonleafs().indexOf(this)}$sdfs_next_action_for_srch(){return ku(this)}$sdfs_srch_action_list(){return xu(this)}$get_node_with_action(t){let r=this;for(let n=0;n<t.length;n++)r=r[t[n]]();return r}$replace_with(t,r=!0){return Eu(this,t,r)}[Symbol.iterator](){return this.$sdfs()[Symbol.iterator]()}get[Symbol.toStringTag](){return this.$guid?this.$guid.substr(0,8):"<empty>"}};Object.defineProperty(j,"name",{value:"\u200D"});function oi(e){let t=ye(e);return t.forEach((r,n)=>{r._id=n}),t}function Cu(e){let t=new z;return t._id=e._id,t.$guid=e._guid,t}function Kn(e,t){for(;t._id!==e;)t=t._parent;return t}function Je(e,t){let r=ai(t);for(let n of r)e[n]=t[n];return e}function kt(e){let t=Ke.dict_keys(e)[0],r=me.get_root(e[t],e),n=Cu(r);n=Je(n,r);let i=n,l=r,o=me.get_sdfs_next(l,e),a;for(;o!==null;)if(l._fstch===o._id)a=i.$prepend_child(),a._id=o._id,a.$guid=o._guid,a=Je(a,o),i=a,l=o,o=me.get_sdfs_next(l,e);else if(l._rsib===o._id)a=i.$add_rsib(),a._id=o._id,a.$guid=o._guid,a=Je(a,o),i=a,l=o,o=me.get_sdfs_next(l,e);else if(o._parent!==null&&o._parent!==void 0){let c=o._parent;i=Kn(c,i),a=i.$append_child(),a._id=o._id,a.$guid=o._guid,a=Je(a,o),i=a,l=o,o=me.get_sdfs_next(l,e)}else if(o._parent===void 0){let u=me.get_parent(o,e)._id;i=Kn(u,i),a=i.$append_child(),a._id=o._id,a.$guid=o._guid,a=Je(a,o),i=a,l=o,o=me.get_sdfs_next(l,e)}else console.log("Impossible",i,l,o);return n}function wt(e,t){return e[t]===null?null:e[t]===void 0?void 0:e[t]._id}function ai(e){return Ke.dict_keys(e).filter(n=>!Ic.includes(n))}function qu(e,t){let r=ai(e);for(let n of r)t[n]=e[n];return t}function $t(e){let t=oi(e),r=e._id,n={};return t.forEach((i,l)=>{let o={};o._tree=r,o._fstch=wt(i,"_fstch"),o._lsib=wt(i,"_lsib"),o._rsib=wt(i,"_rsib"),o._parent=wt(i,"_parent"),o._id=i._id,o._guid=i.$guid,o=qu(i,o),n[i._id]=o}),n}var z=class extends j{constructor(t=!0,r=!0){super(t,r),this._fstch=null,this._lsib=null,this._rsib=null,this._parent=null,this._tree=this}$is_parent_of(t){return t.$parent()===this}$is_root_of(t){return t.$root()===this}$is_descendant_of(t){return t.$deses(!1).indexOf(this)>=0}$is_inclusive_descendant_of(t){return t.$deses(!0).indexOf(this)>=0}$is_ancestor_of(t){return t.$ances(!1).indexOf(this)>=0}$is_inclusive_ancestor_of(t){return t.$ances(!0).indexOf(this)>=0}$is_sibling_of(t){return t.$sibs(!1).indexOf(this)>=0}$is_inclusive_siblings_of(t){return t.$sibs(!0).indexOf(this)>=0}$is_preceding_of(t){let r=t.$sdfs(),n=r.indexOf(t),i=r.indexof(this);return i>=0&&i<n}$is_following_of(t){let r=t.$sdfs(),n=r.indexOf(t);return r.indexof(this)>n}$is_first_child_of(t){return this===t.$fstch()}$is_child_of(t){return t.$children().indexOf(this)>=0}$is_last_child_of(t){return this===t.$lstch()}$is_previous_sibling_of(t){return this===t.$lsib()}$is_next_sibling_of(t){return this===t.$rsib()}};Object.defineProperty(z,"name",{value:"\u200D"});function ci(e){if(typeof e=="string"){let t=Qn.rjson(e);return kt(t)}else return typeof e=="object"?kt(e):new z}function Au(e,t="_children"){return bu(e,t)}function Nu(e){let t=e.$dump();return ci(ndict)}function ms(e,t,...r){let n=t(e,...r);return n=new Buffer.from(n).toString("base64"),n}function ui(e){let t=e.$ances(!0).map(r=>r.$children().length);return t=t.join("-"),t}function _i(e){return e.$pbreadth()+"-"+e.$breadth()+"-"+e.$depth()}function fi(e,t,...r){let n=ui(e);return t&&(out=ms(e,t,...r),n=n+"@"+out),n}function hi(e,t,...r){let n=_i(e);return t&&(out=ms(e,t,...r),n=n+"@"+out),n}function bs(e,t,r,n,i,...l){let o=r.$sdfs(),a=n.$sdfs();if(o.length!==a.length)return!1;{let c=o.map(_=>t(_,i,...l)),u=a.map(_=>t(_,i,...l));e&&(c.sort(),u.sort());for(let _=0;_<c.length;_++){let f=c[_],d=u[_];if(f!==d)return!1}}return!0}function Iu(e,t,r,...n){return bs(!1,hi,e,t,r,...n)}function Ou(e,t,r,...n){return bs(!0,fi,e,t,r,...n)}di.exports={SDFS_NEXT_BUILD_ACTION_DICT:li,build_from_srch_action_list:Tu,SDFS_NEXT_SRCH_ACTIONS:vu,RESERVED_EVENT_TYPES:["$msg__"],Node:j,Tree:z,Root:z,load:ci,load_from_nest_dict:Au,clone:Nu,get_cu_sign:ms,get_internal_sign_ignore_order:ui,get_internal_sign_keep_order:_i,get_sign_keep_order:hi,struct_eq:bs,struct_eq_keep_order:Iu,get_sign_ignore_order:fi,struct_eq_ignore_order:Ou}});var ys=h((xd,gi)=>{var ju=pi(),Du=us(),Ru=Jt();gi.exports={ndfunc:Du,ndcls:ju,ndutil:Ru}});var Ct=h((Od,bi)=>{var q=S(),Lu=ys(),{Root:Pu}=ys().ndcls,{TYPE_DICT:Sd,isNode:Td,empty:m,is_bigint_str:Ed,is_jsint_str:Cd,NUM_TYPE_DICT:qd,parse_abnormal_num:Ad,parse_int:Nd,parse_float:Id,parse_num:Wu,to_str:Et}=S(),D=class extends Pu{constructor(t=m){super(!1,!1),this.key=t,this.value=m,this.type=m,this.chtype=m,this.hashes=new Set,this.kcmt=[],this.bvcmt=[],this.avcmt=[]}kto_str(){return this.key===m?m:JSON.stringify(this.key)}is_undefined(){return this.type===q.TYPE_DICT.UndefinedLiteral}is_null(){return this.type===q.TYPE_DICT.NullLiteral}is_boolean(){return this.type>=2&&this.type<=4}is_false(){return this.type===3}is_true(){return this.type===4}is_numerical(){return nd.type>=5&&nd.type<=11}is_int(){return this.type===6}is_float(){return this.type===7}is_bigint(){return this.type===8}is_infi(){return this.type===9||this.type===10}is_pos_infi(){return this.type===9}is_neg_infi(){return this.type===10}is_nan(){return this.type===11}is_str(){return this.type===12}is_ary(){return this.type===13}is_ele(){return this.chtype===14}is_dict(){return this.type===15}is_prop(){return this.chtype===16}is_ref(){return this.type===17}is_leaf(){return!this.is_ary()&&!this.is_dict()}is_cmt(){return this.is_lcmt()||this.is_blcmt()}is_lcmt(){return this.type>=18&&this.type<=22}is_blcmt(){return this.type>=23&&this.type<=27}is_ttcmt(){return this.type===19||this.type===24}is_kcmt(){return this.type===20||this.type===25}is_bvcmt(){return this.type===21||this.type===26}is_avcmt(){return this.type===22||this.type===27}is_prim(){return this.is_leaf()&&!is_cmt()}},ws=class extends D{constructor(t=m){super(t),this.value=void 0,this.type=q.TYPE_DICT.UndefinedLiteral}vto_rawstr(){return Et(this.value)}},$s=class extends D{constructor(t=m){super(t),this.value=null,this.type=q.TYPE_DICT.NullLiteral}vto_rawstr(){return Et(this.value)}},vs=class extends D{constructor(t,r=m){super(r),t==="true"&&(this.value=!0,this.type=q.TYPE_DICT.BooleanLiteral.TrueLiteral),t==="false"&&(this.value=!1,this.type=q.TYPE_DICT.BooleanLiteral.FalseLiteral)}vto_rawstr(){return Et(this.value)}},ks=class extends D{constructor(t,r=m){if(super(r),typeof t=="string"){let n=Wu(t,!0);this.value=n.value,this.type=n.type}else this.value=t.value,this.type=t.type}vto_rawstr(){let t=Et(this.value);return this.type===q.TYPE_DICT.NumericLiteral.Float&&!t.includes(".")&&(t=t+"."),t}};function Qe(e){return e=JSON.stringify(e),e.substr(1,e.length-2)}var xs=class extends D{constructor(t,r=m){super(r),this.value=t,this.type=q.TYPE_DICT.StringLiteral}vto_rawstr(){return Qe(this.value)}};function Bu(e){e instanceof Tt?e.type=q.TYPE_DICT.CommentLine.tt:e.type=q.TYPE_DICT.CommentBlock.tt}function Fu(e,t){return{lsib:e.$lsib(),data:t}}function mi(e,t){Bu(t);let r=Fu(e,t);return e.ttcmt.push(r),r}var Ss=class extends D{constructor(t=m){super(t),this.value=[],this.type=q.TYPE_DICT.ArrayExpression._self,this.open=m,this.close=m,this.ttcmt=[]}is_inited(){return this.open===m&&this.close===m}is_opened(){return this.open!==m&&this.close===m}is_closed(){return this.open!==m&&this.close!==m}append_child(t){return t.chtype=q.TYPE_DICT.ArrayExpression.element,t.is_ref()?this.value.push(t.value.value):this.value.push(t.value),this.$append_child(t)}append_ttcmt(t){return mi(this,t)}},Ts=class extends D{constructor(t=m){super(t),this.value={},this.type=q.TYPE_DICT.ObjectExpression._self,this.open=m,this.close=m,this.ttcmt=[]}is_inited(){return this.open===m&&this.close===m}is_opened(){return this.open!==m&&this.close===m}is_closed(){return this.open!==m&&this.close!==m}append_child(t){return t.chtype=q.TYPE_DICT.ObjectExpression.property,t.is_ref()?this.value[t.key]=t.value.value:this.value[t.key]=t.value,this.$append_child(t)}append_ttcmt(t){return mi(this,t)}},Es=class extends D{constructor(t,r=m){super(r),this.value=t,this.type=q.TYPE_DICT._Ref}vto_rawstr(){if(this.value.is_leaf())return this.value.vto_rawstr();if(this.value.key!==m)return'&"'+Qe(this.value.key)+'"';for(let t of this.value.hashes)return'&"'+Qe(t)+'"'}},Tt=class extends D{constructor(t){super(),this.value=t,this.type=q.TYPE_DICT.CommentLine._self}vto_rawstr(t=`
5
- `){return"//"+Qe(this.value)+t}},Cs=class extends D{constructor(t){super(),this.value=t,this.type=q.TYPE_DICT.CommentBlock._self}vto_rawstr(){return"/*"+Qe(this.value)+"*/"}};bi.exports={UndefinedLiteral:ws,NullLiteral:$s,BooleanLiteral:vs,NumericLiteral:ks,StringLiteral:xs,ArrayExpression:Ss,ObjectExpression:Ts,_Ref:Es,CommentLine:Tt,CommentBlock:Cs,_ndtree:Lu}});var Si=h((jd,xi)=>{var{empty:Ns}=S(),{UndefinedLiteral:yi,NullLiteral:wi,BooleanLiteral:$i,NumericLiteral:vi,StringLiteral:qs,ArrayExpression:Mu,ObjectExpression:Yu,CommentLine:Hu,CommentBlock:Uu,_Ref:As}=Ct();function Gu(e,t){let r=Ns,n=e;for(;n!==null;){if(n.key===t){r=n;break}else if(n.hashes.has(t)){r=n;break}else if(n.$sibseq().toString()===t){r=n;break}n=n.$sdfs_prev()}return r!==null?r:Ns}function ki(e,t){return e instanceof yi?new yi("undefined",t):e instanceof wi?new wi("null",t):e instanceof $i?new $i(e.vto_rawstr(),t):e instanceof vi?new vi(e.vto_rawstr(),t):e instanceof qs?new qs(e.value,t):e instanceof Hu||e instanceof Uu?new qs(e.value,t):e instanceof Mu?new As(e,t):e instanceof Yu?new As(e,t):e instanceof As?(e=e.value,ki(e,t)):Ns}xi.exports={find_refnd_with_hash:Gu,clone:ki}});var Li=h((Dd,we)=>{var Vu=Array,zu=S(),{empty:$,parse0:Xu}=S(),et=class extends Vu{get lst(){return this[this.length-1]}set lst(t){this[this.length-1]=t}get top(){return this[this.length-1]}set top(t){this[this.length-1]=t}get fst(){return this[0]}set fst(t){this[0]=t}get bot(){return this[0]}set bot(t){this[0]=t}*gen_from_lst(){for(let t=this.length-1;t>-1;t--)yield this[t]}};function*Ju(e){for(let t of e)yield t;e=null}function*Ku(e,t){yield*t,yield*e}var tt=Xt(),Is=xe(),Ae=nn(),{UndefinedLiteral:Qu,NullLiteral:Zu,BooleanLiteral:Ti,NumericLiteral:e_,StringLiteral:Ei,CommentLine:Ze,CommentBlock:t_,ArrayExpression:Os,ObjectExpression:s_}=Ct(),U=I(),Ci=U.gtv,le=U.STATE_DICT,js=U.LEFTED_TYPE,qe=U.AVND_CACHE_STATE_DICT,H=S(),w=te(),qi=Si();function*Di(e){for(;e.length>0;)yield e.pop()}function Ai(e){let t;return e.__is_sync_mode()?t=tt.from_generator(e.g,e.ch_cache.curr):t=tt.from_generator(Di(e.unshift_cache),e.ch_cache.curr),t}function Ni(e,t,r){e.lefted.type=js.quote,e.lefted.data={rslt:t.rslt,lefted:t.ch,state:t.state,quote:r},e.state=U.get_main_eofv_with_code(e.state)}function Ri(e,t,r){e.lefted.type=r,e.lefted.data={rslt:t.rslt,lefted:t.ch,state:t.state}}function r_(e,t,r){return Ri(e,t,r),e.state=U.get_lcmt_eofv_with_code(e.state),e}function n_(e,t,r){return Ri(e,t,r),e.state=U.get_blkcmt_eofv_with_code(e.state),e}function i_(e,t){let r;return e.__is_sync_mode()?r=t(e.g,e.ch_cache.curr):r=t(Di(e.unshift_cache),e.ch_cache.curr),r}function Ii(e,t,r,n){let i=i_(e,r);return i.state!==Ae.STATE_DICT.succ?((t===Ze?r_:n_)(e,i,n),$):new t(i.rslt)}function Oi(e,t){let r=new t(e.str_cache.k);return e.$set_avnd_cache(r),e.$mv_key_to_nd(r),e.$mv_kcmt_to_kcmt(),e.$mv_bvcmt_to_bvcmt(),r.open=e.ch_cache.curr,e.stack.lst.append_child(r),e.stack.push(r),t===Os?e.state=le.bv:e.state=le.bk,e}var Ds=Symbol("root_lblk_ch"),ji=Symbol("root_rblk_ch"),Ne=class{#t=Ci(le.bv);#e=new et;constructor(t,r=" "){if(r!==$){let i=Ju(r);t=Ku(t,i)}this.g=t,this.lefted={type:$,data:$},this.ch_cache={tmp:$,curr:$},this.str_cache={k:$,v:$,maybe_vquote:$},this.cmt_cache={kcmt:[],bvcmt:[],avcmt:[]};let n=new Os;this.stack.push(n),n.open=Ds,this.avnd_cache={state:qe.handling,data:n},this.unshift_cache=new et,this.mode="sync"}__use_sync_mode(){this.mode="sync"}__use_async_mode(){this.mode="async"}__is_sync_mode(){return this.mode==="sync"}__is_async_mode(){return this.mode==="async"}__unshift_g(t){t=t??this.ch_cache.curr;for(let r of t)this.unshift_cache.unshift(r)}$has_yield_sign(){return this.avnd_cache.state===qe.handled}$set_yield_sign(){this.avnd_cache.state=qe.handled}$clear_yield_sign(){this.avnd_cache.state=qe.handling}get state(){return this.#t}set state(t){this.#t=Ci(t)}get stack(){return this.#e}$next_ch(){return this.unshift_cache.length>0?this.ch_cache.curr=this.unshift_cache.pop():this.ch_cache.curr=this.g.next().value,this.ch_cache.curr}$is_currch_eof(){return this.ch_cache.curr===void 0}$handle_main_eof(){return this.state=U.get_main_eofv_with_code(this.state),this}$is_currch_comma(){return w.commas.has(this.ch_cache.curr)}$is_currch_colon(){return w.colons.has(this.ch_cache.curr)}$is_currch_ws(){return Is.is_ws(this.ch_cache.curr)}$is_currch_quote(){return w.quotes.has(this.ch_cache.curr)}$is_currch_slash(){return this.ch_cache.curr===w.slash}$is_currch_asterisk(){return this.ch_cache.curr===w.asterisk}$is_currch_ary_lblk(){return w.array_blks.lhas(this.ch_cache.curr)}$is_currch_obj_lblk(){return w.obj_blks.lhas(this.ch_cache.curr)}$is_currch_lblk(){return this.$is_currch_ary_lblk()||this.$is_currch_obj_lblk()}$is_currch_ary_rblk(){return w.array_blks.rhas(this.ch_cache.curr)}$is_currch_obj_rblk(){return w.obj_blks.rhas(this.ch_cache.curr)}$is_currch_rblk(){return this.$is_currch_ary_rblk()||this.$is_currch_obj_rblk()}$is_currch_hash(){return w.hash===this.ch_cache.curr}$is_currch_ref(){return w.ref===this.ch_cache.curr}$mv_avcmt_to_avcmt(){let t=this.avnd_cache.data;t.avcmt=this.cmt_cache.avcmt,this.cmt_cache.avcmt=[]}$change_state_when_end_av(t=$,r=$){return this.stack.lst.is_ary()?t===$?this.state=le.bv:(this.state=le.v,this.str_cache.v=t,r===$||(this.str_cache.maybe_vquote=r)):t===$?this.state=le.bk:(this.state=le.k,this.str_cache.k=t),this.state}$vcache_to_nd(){let t=this.str_cache.v,r;if(this.str_cache.maybe_vquote===$){let n=Xu(t,{only_value:!1,with_value:!0,with_type:!0,unknown_as_string:!0});n.type===H.TYPE_DICT.UndefinedLiteral?r=new Qu(this.str_cache.k):n.type===H.TYPE_DICT.NullLiteral?r=new Zu(this.str_cache.k):n.type===H.TYPE_DICT.BooleanLiteral.TrueLiteral?r=new Ti("true",this.str_cache.k):n.type===H.TYPE_DICT.BooleanLiteral.FalseLiteral?r=new Ti("false",this.str_cache.k):n.type===H.TYPE_DICT.StringLiteral?r=new Ei(n.value,this.str_cache.k):r=new e_(n,this.str_cache.k)}else r=new Ei(t,this.str_cache.k);return this.str_cache.v=$,this.str_cache.maybe_vquote=$,r}$mv_kcmt_to_kcmt(){let t=this.avnd_cache.data;t.kcmt=this.cmt_cache.kcmt,this.cmt_cache.kcmt=[]}$mv_bvcmt_to_bvcmt(){let t=this.avnd_cache.data;t.bvcmt=this.cmt_cache.bvcmt,this.cmt_cache.bvcmt=[]}$mv_key_to_nd(){let t=this.avnd_cache.data;return t.key=this.str_cache.k,this.str_cache.k=$,t.key}$set_avnd_cache(t,r=qe.handling){return this.avnd_cache.data=t,this.avnd_cache.state=r,this.avnd_cache}$setup_leafnd(){let t=this.$vcache_to_nd();this.$set_avnd_cache(t,qe.handling),this.$mv_key_to_nd(),this.$mv_kcmt_to_kcmt(),this.$mv_bvcmt_to_bvcmt(),this.$mv_avcmt_to_avcmt(),this.stack.lst.append_child(t)}$handle_quote(t){let r=Ai(this);return r.state!==tt.STATE_DICT.succ?(Ni(this,r,t),$):r.rslt}$abandon_key_when_end_bv(){this.cmt_cache.kcmt=[],this.cmt_cache.bvcmt=[],this.str_cache.k=$}$refresh_key(t=$){t===$?this.str_cache.k=this.ch_cache.curr:this.str_cache.k=t,this.cmt_cache.kcmt=[]}$handle_lcmt(){return Ii(this,Ze,Ae.lc_from_generator,js.lcmt)}$handle_blkcmt(){return Ii(this,t_,Ae.blk_from_generator,js.blkcmt)}$push_kcmt(t){t.type=Ae instanceof Ze?H.TYPE_DICT.CommentLine.k:H.TYPE_DICT.CommentBlock.k,this.cmt_cache.kcmt.push(t)}$push_bvcmt(t){let r=t instanceof Ze?"CommentLine":"CommentBlock";t.type=H.TYPE_DICT[r].bv,this.cmt_cache.bvcmt.push(t)}$push_avcmt(t){t.type=Ae instanceof Ze?H.TYPE_DICT.CommentLine.k:H.TYPE_DICT.CommentBlock.k,this.cmt_cache.avcmt.push(t)}$mv_avcmt_to_ttcmt(t){t=t??this.avnd_cache.data.$parent();for(let r of this.cmt_cache.avcmt)t.$append_child(r);this.cmt_cache.avcmt=[]}$open_nonleaf_nd(){if(w.array_blks.lhas(this.ch_cache.curr))return Oi(this,Os);if(w.obj_blks.lhas(this.ch_cache.curr))return Oi(this,s_)}$is_rblk_match(){let t=this.stack.lst,r=t.is_ary()?"array_blks":"obj_blks";return w[r].getl(this.ch_cache.curr)===t.open}$close_nonleaf_nd(){let t=this.stack.lst;t.close=this.ch_cache.curr,this.$set_avnd_cache(t),this.stack.pop(),this.state=le.av}$get_hash_or_ref(t="#"){let r=$,n=this.$next_ch(),i="";for(;!Is.is_ws(n)&&!w.commas.has(n)&&!w.colons.has(n)&&!w.array_blks.has(n)&&!w.obj_blks.has(n)&&n!==w.hash&&n!==w.ref&&n!==w.slash;)if(w.quotes.has(n)){let l=Ai(this);if(l.state!==tt.STATE_DICT.succ)return Ni(this,l,this.ch_cache.curr),t===w.hash?this.state=U.get_hash_quote_eofv_with_code(this.state):this.state=U.get_ref_quote_eofv_with_code(this.state),r;i=i+l.rslt,n=this.$next_ch()}else{if(n===void 0)return $handle_main_eof(),r;i=i+n,n=this.$next_ch()}return this.__unshift_g(n),r=i,r}$is_hash_of_pnd(){return this.stack.lst.$children().length===0}$find_ref(t){let r=this.stack.lst,n=r.$lstch();return n===null&&(n=r),qi.find_refnd_with_hash(n,t)}$add_ref_to_parent(t){let r=this.stack.lst,n=qi.clone(t,this.str_cache.k);this.$set_avnd_cache(n),this.$mv_key_to_nd(n),this.$mv_kcmt_to_kcmt(),this.$mv_bvcmt_to_bvcmt(),r.append_child(n)}};Ne[Ds]=Ds;Ne[ji]=ji;Ne.MODES=["sync","async"];we.exports=Ne;we.exports.Stack=et;we.exports._type_util=zu;we.exports._esc=tt;we.exports._cmt=Ae;we.exports._ws=Is});var Fi=h((Rd,Bi)=>{var{empty:Pi}=S(),Wi=I(),Ie=Wi.gtv,G=Wi.STATE_DICT;function l_(e){let t=e.state;return t===Ie(G.bk)||(t===Ie(G.k)||t===Ie(G.ak)?(e.str_cache.k=Pi,e.state=G.bk):t===Ie(G.bv)?(e.$abandon_key_when_end_bv(),e.stack.lst.is_ary()?e.state=G.bv:e.state=G.bk):t===Ie(G.v)?(e.$setup_leafnd(),e.$change_state_when_end_av()):t===Ie(G.av)&&(e.$mv_avcmt_to_avcmt(),e.$change_state_when_end_av())),e}Bi.exports=l_});var Hi=h((Pd,Yi)=>{var{empty:Ld}=S(),Mi=I(),Oe=Mi.gtv,oe=Mi.STATE_DICT;function o_(e){let t=e.state;return t===Oe(oe.bk)||(t===Oe(oe.k)||t===Oe(oe.ak)?e.state=oe.bv:t===Oe(oe.bv)||(t===Oe(oe.v)?(e.$setup_leafnd(),e.$change_state_when_end_av()):t===Oe(oe.av)&&(e.$mv_avcmt_to_avcmt(),e.$change_state_when_end_av()))),e}Yi.exports=o_});var Rs=h((Bd,Gi)=>{var{empty:Wd}=S(),Ui=I(),je=Ui.gtv,ae=Ui.STATE_DICT;function a_(e){let t=e.state;return t===je(ae.bk)||(t===je(ae.k)?e.state=ae.ak:t===je(ae.ak)||t===je(ae.bv)||(t===je(ae.v)?(e.$setup_leafnd(),e.state=ae.av):je(ae.av))),e}Gi.exports=a_});var Ji=h((Fd,Xi)=>{var{empty:Vi}=S(),zi=I(),De=zi.gtv,X=zi.STATE_DICT;function c_(e,t){let r=e.state,n=e.$handle_quote(t);return n===Vi||(r===De(X.bk)?(e.str_cache.k=n,e.state=X.k):r===De(X.k)?e.str_cache.k=e.str_cache.k+n:r===De(X.ak)?(e.$refresh_key(n),e.state=X.k):r===De(X.bv)?(e.str_cache.maybe_vquote=t,e.str_cache.v=n,e.state=X.v):r===De(X.v)?(e.str_cache.v=e.str_cache.v+n,e.str_cache.maybe_vquote=Vi):r===De(X.av)&&(e.$mv_avcmt_to_avcmt(),e.$change_state_when_end_av(n,t))),e}Xi.exports=c_});var el=h((Md,Zi)=>{var{empty:Ki}=S(),Ls=I(),R=Ls.gtv,E=Ls.STATE_DICT,u_=Ls.LEFTED_TYPE,$e=te();function Qi(e,t){let r=e.state,n=e[t]();if(n!==Ki){let i=e.stack.lst;if(r===R(E.bk))i.append_ttcmt(n);else if(r===R(E.k))e.$push_kcmt(n),e.state=E.ak;else if(r===R(E.ak))e.$push_kcmt(n);else if(r===R(E.bv))i.is_ary()?i.append_ttcmt(n):i.is_dict()&&e.$push_bvcmt(n);else if(r===R(E.v))e.$setup_leafnd(),e.state=E.av;else if(r===R(E.av)){let l=e.stack.lst;l.is_ary()?(l.append_ttcmt(n),e.state=E.bv):l.is_dict()&&e.$push_avcmt(n)}}return e}function __(e){return Qi(e,"$handle_lcmt")}function f_(e){return Qi(e,"$handle_blkcmt")}function h_(e){let t=e.state;t===R(E.bk)?(e.__unshift_g(e.ch_cache.curr),e.str_cache.k=$e.slash,e.state=E.k):t===R(E.k)?(e.__unshift_g(e.ch_cache.curr),e.str_cache.k=e.str_cache.k+$e.slash):t===R(E.ak)?(e.__unshift_g(e.ch_cache.curr),e.$refresh_key($e.slash),e.state=E.k):t===R(E.bv)?(e.__unshift_g(e.ch_cache.curr),e.str_cache.v=$e.slash,e.state=E.v):t===R(E.v)?(e.__unshift_g(e.ch_cache.curr),e.str_cache.v=e.str_cache.v+$e.slash,e.str_cache.maybe_vquote=Ki):t===R(E.av)&&(e.$mv_avcmt_to_avcmt(),e.$change_state_when_end_av($e.slash))}function d_(e){let t=e.state,r=e.$next_ch();return e.$is_currch_eof()?(e.lefted.data=$e.slash,e.lefted.type=u_.backslash,e.$handle_main_eof()):e.$is_currch_slash()?__(e):e.$is_currch_asterisk()?f_(e):h_(e),e}Zi.exports=d_});var rl=h((Hd,sl)=>{var{empty:Yd}=S(),tl=I(),Re=tl.gtv,ce=tl.STATE_DICT;function p_(e){let t=e.state;return t===Re(ce.bk)?(e.str_cache.k=e.ch_cache.curr,e.state=ce.k):t===Re(ce.k)?e.str_cache.k=e.str_cache.k+e.ch_cache.curr:t===Re(ce.ak)?(e.$refresh_key(),e.state=ce.k):t===Re(ce.bv)?e.$open_nonleaf_nd():t===Re(ce.v)?(e.$setup_leafnd(),e.$change_state_when_end_av(),e.__unshift_g(e.ch_cache.curr)):t===Re(ce.av)&&(e.$mv_avcmt_to_avcmt(),e.$change_state_when_end_av(),e.__unshift_g(e.ch_cache.curr)),e}sl.exports=p_});var ol=h((Ud,ll)=>{var{empty:nl}=S(),il=I(),Le=il.gtv,ve=il.STATE_DICT,g_=Rs();function m_(e){let t=e.state;return t===Le(ve.bk)?e.$close_nonleaf_nd():t===Le(ve.k)?(e.str_cache.k=nl,e.$close_nonleaf_nd()):t===Le(ve.ak)?(e.$refresh_key(),e.str_cache.k=nl,e.$close_nonleaf_nd()):t===Le(ve.bv)?(e.$abandon_key_when_end_bv(),e.$close_nonleaf_nd()):t===Le(ve.v)?(e.$setup_leafnd(),e.state=ve.av,e.__unshift_g(e.ch_cache.curr)):t===Le(ve.av)&&(e.$has_yield_sign()?(e.$clear_yield_sign(),e.$close_nonleaf_nd()):(e.$mv_avcmt_to_avcmt(),e.$set_yield_sign(),e.__unshift_g(e.ch_cache.curr))),e}function b_(e){return e.$is_rblk_match()?m_(e):g_(e),e}ll.exports=b_});var _l=h((Gd,ul)=>{var{empty:y_}=S(),cl=I(),Pe=cl.gtv,ue=cl.STATE_DICT,w_=te(),{CommentLine:al}=Ct();function $_(e){let t=e.state,r=e.$get_hash_or_ref(w_.hash);if(r!==y_){let n=e.stack.lst;if(t===Pe(ue.bk))e.$is_hash_of_pnd()&&n.hashes.add(r);else if(t===Pe(ue.k)){let i=new al(r);e.$push_kcmt(i),e.state=ue.ak}else if(t===Pe(ue.ak)){let i=new al(r);e.$push_kcmt(i)}else t===Pe(ue.bv)?e.$is_hash_of_pnd()&&n.is_ary()&&n.hashes.add(r):t===Pe(ue.v)?(e.$setup_leafnd(),e.avnd_cache.data.hashes.add(r),e.state=ue.av):t===Pe(ue.av)&&e.avnd_cache.data.hashes.add(r)}return e}ul.exports=$_});var dl=h((Vd,hl)=>{var{empty:Ps}=S(),fl=I(),We=fl.gtv,O=fl.STATE_DICT,v_=te();function k_(e){let t=e.state,r=e.$get_hash_or_ref(v_.ref);if(r!==Ps){let n=e.$find_ref(r);if(n!==Ps){let i=e.stack.lst;t===We(O.bk)||t===We(O.k)||t===We(O.ak)?(e.$refresh_key(n.vto_rawstr()),e.state=O.ak):t===We(O.bv)?(e.$add_ref_to_parent(n),e.state=O.av):t===We(O.v)?(e.str_cache.maybe_vquote=Ps,e.$setup_leafnd(),e.state=O.av):t===We(O.av)&&(e.$has_yield_sign()?(e.$clear_yield_sign(),i.is_ary()?(e.$add_ref_to_parent(n),e.state=O.av):i.is_dict()&&(e.str_cache.k=n.vto_rawstr(),e.state=O.ak)):(e.$mv_avcmt_to_avcmt(),e.$set_yield_sign()))}}return e}hl.exports=k_});var ml=h((zd,gl)=>{var{empty:x_}=S(),pl=I(),Be=pl.gtv,J=pl.STATE_DICT;function S_(e){let t=e.state;return t===Be(J.bk)?(e.str_cache.k=e.ch_cache.curr,e.state=J.k):t===Be(J.k)?e.str_cache.k=e.str_cache.k+e.ch_cache.curr:t===Be(J.ak)?(e.$refresh_key(),e.state=J.k):t===Be(J.bv)?(e.str_cache.v=e.ch_cache.curr,e.state=J.v):t===Be(J.v)?(e.str_cache.v=e.str_cache.v+e.ch_cache.curr,e.str_cache.maybe_vquote=x_):t===Be(J.av)&&(e.$mv_avcmt_to_avcmt(),e.$change_state_when_end_av(),e.__unshift_g(e.ch_cache.curr)),e}gl.exports=S_});var vl=h((Xd,$l)=>{var{empty:T_}=S(),E_=Li(),C_=Fi(),q_=Hi(),A_=Rs(),N_=Ji(),I_=el(),O_=rl(),j_=ol(),D_=_l(),R_=dl(),L_=ml(),wl=I(),bl=wl.gtv,yl=wl.STATE_DICT,P_=te();function*W_(e,t=T_){let r=new E_(e,t);for(;;)if(r.$next_ch(),r.$is_currch_eof()){r.$handle_main_eof(),yield r;break}else r.$is_currch_comma()?(C_(r),yield r):r.$is_currch_colon()?(q_(r),yield r):r.$is_currch_ws()?(A_(r),yield r):r.$is_currch_quote()?(N_(r,r.ch_cache.curr),yield r):r.$is_currch_slash()?(I_(r),yield r):r.$is_currch_lblk()?(O_(r),yield r):r.$is_currch_rblk()?(j_(r),yield r):r.$is_currch_hash()?(D_(r),yield r):r.$is_currch_ref()?r.state===bl(yl.av)||r.state===bl(yl.v)?r.__unshift_g(P_.fst_comma+r.ch_cache.curr):(R_(r),yield r):(L_(r),yield r)}$l.exports=W_});var El=h((Jd,Tl)=>{var{sync_gen_from_str:Ws}=Dr(),{is_should_yield:Bs}=I(),P=te(),{is_nl:B_,is_ws:kl}=xe(),Fs=vl(),F_={enable_ref:!1,encoding:"utf8"};function xl(e,t={enable_ref:!1}){let r=Fs(e),n=r.next().value,i=n.avnd_cache.data.$root(),l=n.state;for(let o of r){let a=o.state;if(Bs(n,l,a)&&!t.enable_ref){let c=n.avnd_cache.data;c.$disconn(),c=null}l=a}return i}function M_(e,t={enable_ref:!1}){let r=Ws(e);return xl(r,t)}function*Sl(e,t={enable_ref:!1,encoding:"utf8"}){let r=Fs(e),n=r.next().value,i=n.state;for(let l of r){let o=l.state;if(Bs(n,i,o)&&!t.enable_ref){let a=n.avnd_cache.data;yield a,a.$disconn(),a=null}i=o}}function*Y_(e,t={enable_ref:!1,encoding:"utf8"}){let r=Ws(e);yield*Sl(r,t)}function H_(){return{d:void 0,ppg:void 0,prev:void 0,curr:void 0,can_send:!1,data:"",state:"init",label:"",pstate:""}}function U_(e){let t=Ws(""),r=Fs(t," "),n=r.next().value;n.__use_async_mode();let i=H_();return i.rt=n.avnd_cache.data,i.prev=n.state,i.ppg=r,i.d=n,i}function G_(e,t){return e.data=e.data+t,e.state==="init"?t===P.slash?e.state="slash":P.quotes.has(t)?(e.label=t,e.state="quote"):t===P.hash?e.state="hash":t===P.ref?e.state="ref":e.can_send=!0:e.state==="quote"?t==="\\"?(e.state="esc",e.pstate="quote"):t===e.label&&(e.pstate!==""?(e.state=e.pstate,e.pstate=""):e.can_send=!0):e.state==="slash"?t===P.slash?e.state="lcmt":t===P.asterisk?e.state="blkcmt":P.quotes.has(t)?(e.label=t,e.state="quote"):e.can_send=!0:e.state==="lcmt"?t==="\\"?(e.state="esc",e.pstate="lcmt"):B_(t)&&(e.can_send=!0):e.state==="blkcmt"?t==="\\"?(e.state="esc",e.pstate="blkcmt"):t===P.asterisk&&(e.state="asterisk"):e.state==="asterisk"?t==="\\"?(e.state="esc",e.pstate="blkcmt"):t===P.slash&&(e.can_send=!0):e.state==="hash"?kl(t)?e.can_send=!0:P.quotes.has(t)&&(e.state="quote",e.pstate="hash"):e.state==="ref"?kl(t)?e.can_send=!0:P.quotes.has(t)&&(e.state="quote",e.pstate="ref"):e.state==="esc"?(e.state=e.pstate,e.pstate=""):console.log("impossible"),e}async function*V_(e,t){for(let r of e)G_(t,r),t.can_send&&(yield t,t.data="",t.state="init",t.label="",t.can_send=!1)}async function*z_(e){let t=U_(e);for await(let r of e)yield*V_(r,t);yield t}function X_(e){let t=e.d.unshift_cache;t.forEach(r=>{e.prev=e.curr,e.d=e.ppg.next().value,e.curr=e.d.state}),t=null}async function*J_(e,t){if(e.d.__unshift_g(e.data),e.prev=e.curr,e.d=e.ppg.next().value,e.curr=e.d.state,Bs(e.d,e.prev,e.curr)&&!t.enable_ref){let r=e.d.avnd_cache.data;yield r,r.$disconn(),r=null}}async function*K_(e,t={enable_ref:!1,encoding:"utf8"}){e=z_(e);let r;for await(r of e)X_(r),yield*J_(r,t);yield r.rt}Tl.exports={OPT_DICT:F_,parse_from_generator:xl,parse_from_str:M_,gen_from_generator:Sl,gen_from_str:Y_,agen_from_generator:K_}});var qt=h((Kd,rt)=>{var{empty:Q_}=S(),Z_=te(),st=El();function Ms(e){return e.length===1?e[0]:e}function ef(){for(let e in st){let t;e.startsWith("gen_")?t=function*(r,n={enable_ref:!1,encoding:"utf8"}){let i=st[e](r,n);for(let l of i)l=Ms(l),yield[l.key,l.value]}:e.startsWith("agen_")?t=async function*(r,n={enable_ref:!1,encoding:"utf8"}){let i=st[e](r,n);for await(let l of i)l=Ms(l),yield[l.key,l.value]}:t=function(r,n={enable_ref:!1,encoding:"utf8"}){let i=st[e](r,n).value;return Ms(i)},Object.defineProperty(t,"name",{value:e}),rt.exports[e]=t}rt.exports.OPT_DICT=st.OPT_DICT}ef();rt.exports.CFG=Z_;rt.exports.empty=Q_});var Nl=h((Qd,Al)=>{var Ys=(e,t)=>{let r=btoa(unescape(encodeURIComponent(t.trim())));return`data:${e};base64,${r}`},At=(e,t={})=>{let r={...t};return r.src===void 0&&e.trim()!==""&&(r.src=Ys("text/javascript",e)),`<script${Object.entries(r).map(([i,l])=>` ${i}=${JSON.stringify(l)}`).join("")}><\/script>`},Cl=(e,t={})=>{let r={...t,rel:"stylesheet"};return r.href===void 0&&e.trim()!==""&&(r.href=Ys("text/css",e)),`<link${Object.entries(r).map(([i,l])=>` ${i}=${JSON.stringify(l)}`).join("")}>`},ql=e=>e.replace(/[&<>"']/g,t=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"})[t]),tf=(e,t=(r,n,i,l,o,a)=>!0)=>{let r=[],n=(i,l,o,a)=>{let[c,u,_]=i;t(i,c,l,o,i,a)&&r.push({tag:c,attrs:u,depth:o,node:i}),Array.isArray(_)&&_.forEach((f,d)=>{n(f,d,o+1,i)})};return n(e,0,0,null),r},sf=e=>{let t=[],r=(n,i)=>{if(!Array.isArray(n))return;let[l,o,a]=n;if(o&&Object.keys(o).length>0&&t.push({tag:l,attrs:{...o},depth:i}),Array.isArray(a))for(let c=0;c<a.length;c++)r(a[c],i+1)};return r(e,0),t},rf=e=>{let t=[],r=n=>{let[i,l,o]=n;if(l&&l.id){let a=l.class?l.class.split(/\s+/):[];t.push([l.id,a])}Array.isArray(o)&&o.forEach(r)};return r(e),t},nf=e=>{let t=[],r=n=>{if(!Array.isArray(n))return;let[i,l,o]=n;if(i&&l&&l.id&&t.push([i.toLowerCase(),l.id]),Array.isArray(o))for(let a=0;a<o.length;a++)r(o[a])};return r(e),t},lf=e=>{let t=[],r=n=>{let[i,l,o]=n;l&&l.id&&t.push(l.id),Array.isArray(o)&&o.forEach(r)};return r(e),t},Hs=e=>{let t=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),[r,n,i]=e,l=r.toLowerCase(),o=n.___text___||"",a={...n};if(delete a.___text___,l==="script"){if(a.src!==void 0&&o.trim()!==""){let f=At("",a),d=At(o,{type:a.type});return`${f}
6
- ${d}`}return At(o,a)}if(l==="style"||l==="link"&&a.rel==="stylesheet")return Cl(o,a);let c="";for(let[f,d]of Object.entries(a))c+=` ${f}=${JSON.stringify(d)}`;if(t.has(l))return`<${r}${c}>`;let u=l==="textarea"||l==="pre"||l==="script"||l==="style"?o:ql(o),_=i.map(f=>Hs(f)).join("");return`<${r}${c}>${u}${_}</${r}>`},Us=e=>{let[t,r,n]=e,i=document.createElement(t);for(let[l,o]of Object.entries(r))l==="___text___"?i.textContent=o:i.setAttribute(l,o);return n.forEach(l=>{i.appendChild(Us(l))}),i},of=(e,...t)=>Object.entries(e).map(([r,n])=>{let i=Object.entries(n).map(([l,o])=>`${l}:${o};`).join("");return`${r}{${i}}`}).join(`
7
- `),af=(e,t=!1)=>{let r=e.split("-");for(let n=1;n<r.length;++n)r[n]=r[n].charAt(0).toUpperCase()+r[n].slice(1);return t&&(r[0]=r[0].charAt(0).toUpperCase()+r[0].slice(1)),r.join("")},cf=e=>e.replace(/-/g,"_"),uf=(e,t)=>typeof e=="string"?(e=e.trim().toLowerCase(),e==="false"||e==="0"||e==="no"||e==="off"||e==="fls"||e==="f"||e==="null"||e==="nul"||e==="none"||e==="nu"||e==="n"?!1:e==="true"||e==="1"||e==="yes"||e==="on"||e==="tru"||e==="t"||e==="y"?!0:e===""||e==="undefined"||e==="un"||e==="default"||e==="dflt"?!!t:!!e):e===void 0?!!t:!!e,_f=e=>{let t=e.replace(/[^0-9.-]/g,"");return parseFloat(t)},ff=(e,t="ele",...r)=>{if(typeof document>"u"||t==="html")return Hs(e);let n=Us(e);if(t==="ele")return n;{let i=n.outerHTML;return n=null,i}},hf=e=>{let t=[],r=1,n="",i=u=>{if(!Array.isArray(u)||typeof u[0]!="string")return JSON.stringify(u);let[_,f,d]=u,b=r++,k=`${_.toUpperCase()}_${b}`;b===1&&(n=k);let lt=d.map(ot=>i(ot));return t.push({id:b,varName:k,tag:_,attrStr:JSON.stringify(f),childrenStr:`[${lt.join(", ")}]`}),k};i(e);let l=t,o=Math.max(...l.map(u=>u.varName.length)),a=l.map(u=>{let _=" ".repeat(o-u.varName.length);return`const ${u.varName}${_} = ["${u.tag}", ${u.attrStr}, ${u.childrenStr}];`}).join(`
1
+ var nvbasicbw=(()=>{var h=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var S=h((vd,gr)=>{var xo=Symbol("empty"),Me=Symbol("unknown"),lr=()=>typeof process<"u"&&process.versions!=null&&process.versions.node!=null,or=/^[\-\+]?[0-9]+$/,ar=/^\+?[0-9]+$/,So=/^[\-\+]?0[bB][0-1]+$/,To=/^[\-\+]?0[oO][0-7]+$/,cr=/^[\-\+]?0[xX][0-9a-fA-F]+$/,Eo=e=>or.test(e)||cr.test(e),rr={"0b":2,"0o":8,"0x":16,2:"0b",8:"0o",16:"0x"},Co=/^[\-\+]?[0-9]+n$/,qo=/^[\-\+]?0[bB][0-1]+n$/,Ao=/^[\-\+]?0[oO][0-7]+n$/,No=/^[\-\+]?0[xX][0-9a-fA-F]+n$/,ur=e=>Co.test(e)||qo.test(e)||Ao.test(e)||No.test(e),fe={Integer:6,Float:7,BigInt:8,PosInfinity:9,NegInfinity:10,NaN:11,6:"Integer",7:"Float",8:"BigInt",9:"PosInfinity",10:"NegInfinity",11:"NaN"},_r=(e,t=!1)=>{let r={value:void 0,type:void 0};return e==="+Infinity"||e==="Infinity"?(r.value=1/0,r.type=fe.PosInfinity):e==="-Infinity"?(r.value=-1/0,r.type=fe.NegInfinity):(e==="NaN"||e==="+NaN"||e==="-NaN")&&(r.value=NaN,r.type=fe.NaN),t?r:r.value},Io=e=>{let t,r,n;e[0]==="+"||e[0]==="-"?(t=e[0],r=rr[e.slice(1,3).join("").toLowerCase()],n=e.slice(3).join("").toLowerCase()):(t="+",r=rr[e.slice(0,2).join("").toLowerCase()],n=e.slice(2).join("").toLowerCase());let i=parseInt(n,r);return t==="+"?+i:-i},fr=e=>{let t=Array.from(e);if(or.test(e))return parseInt(e);if(So.test(e)||To.test(e)||cr.test(e))return Io(t)},jo=e=>{let t=e.be.sign+e.be.bd+e.be.dot+e.be.ad,r=e.ae.sign+e.ae.bd+e.ae.dot+e.ae.ad,n;if(!(t==="+"||t==="-"||r==="+"||r==="-")){if(r!=="")if(e.ae.dot==="."){let i=parseFloat(t),l=parseFloat(r);n=i*10**l}else n=parseFloat(t+"e"+r);else n=parseFloat(t);return n}},Oo=(e,t)=>e.length===0||t==="."||t==="-."||t==="+."||t==="+"||t==="-",Do=()=>({be:{sign:"",bd:"",dot:"",ad:""},ae:{sign:"",bd:"",dot:"",ad:""},state:"init"}),nr=(e,t,r,n)=>((e[r]==="-"||e[r]==="+")&&(t[n].sign=e[r],r=r+1),[e,r]),Ro=(e,t,r,n)=>{if(t.state=n+"bd",e[r]===".")t[n].bd="0",t[n].dot=".",t.state=n+"ad";else if(ar.test(e[r]))t[n].bd=e[r];else return[!0,r];return[!1,r+1]},ir=(e,t,r,n)=>{let i;for(i=r;i<e.length;i++)if(e[i]==="."){if(t[n].dot===".")return[!0,i];t[n].dot=".",t.state=n+"ad"}else{if(e[i]==="e"||e[i]==="E")return n==="ae"?[!0,i]:(t.state="aebd",[!1,i+1]);if(ar.test(e[i]))t.state===n+"bd"?t[n].bd=t[n].bd+e[i]:t[n].ad=t[n].ad+e[i];else return[!0,i]}return[!1,i+1]},hr=e=>{let t=Do(),r=Array.from(e);if(Oo(r,e))return;let n=0,i=!1;if([r,n]=nr(r,t,n,"be"),[i,n]=Ro(r,t,n,"be"),!i&&([i,n]=ir(r,t,n,"be"),!i&&([r,n]=nr(r,t,n,"ae"),[i,n]=ir(r,t,n,"ae"),!i)))return jo(t)},dr=(e,t=!1)=>{let r={value:void 0,type:void 0};if(ur(e))r.value=BigInt(e.substr(0,e.length-1)),r.type=fe.BigInt;else{let n=fr(e);n!==void 0?(r.value=n,r.type=fe.Integer):(n=hr(e),n!==void 0?(r.value=n,r.type=fe.Float):(n=_r(e,t=!0),n.value!==void 0&&(r=n)))}return t?r:r.value},Lo=(e,t=!0)=>{if(typeof e=="string")return e;if(e===void 0)return"undefined";if(e===null)return"null";if(typeof e=="number")return e.toString();if(typeof e=="bigint")return e.toString()+"n";if(typeof e=="symbol")return e.description;if(lr()&&e[Symbol.for("nodejs.util.inspect.custom")])return e[Symbol.for("nodejs.util.inspect.custom")]();{let r=function(n){if(typeof n.toString=="function")return n.toString()};try{return t?s=JSON.stringify(e):s=JSON.stringify(e,null,4),typeof s=="string"?s:r(e)}catch{return r(e)}}},Fe={UndefinedLiteral:0,NullLiteral:1,FalseLiteral:3,TrueLiteral:4,StringLiteral:12},Po={only_value:!0,with_value:!0,with_type:!1,unknown_as_string:!1};function pr(e,t={only_value:!0,with_value:!0,with_type:!1,unknown_as_string:!1}){let r=JSON.parse(JSON.stringify(Po));Object.assign(r,t);let{only_value:n,with_value:i,with_type:l,unknown_as_string:o}=r,a={value:Me,type:Me};if(e==="undefined")a.value=void 0,a.type=Fe.UndefinedLiteral;else if(e==="null")a.value=null,a.type=Fe.NullLiteral;else if(e==="false")a.value=!1,a.type=Fe.FalseLiteral;else if(e==="true")a.value=!0,a.type=Fe.TrueLiteral;else{let c=dr(e,!0);c.type===void 0?o?(a.value=e,a.type=Fe.StringLiteral):(a.value=e,a.type=Me):(a.value=c.value,a.type=c.type)}return n?a.value:(l||delete a.type,i||delete a.value,a)}pr.unknown=Me;var Wo={UndefinedLiteral:0,NullLiteral:1,BooleanLiteral:{_self:2,FalseLiteral:3,TrueLiteral:4},NumericLiteral:{_self:5,Integer:6,Float:7,BigInt:8,PosInfinity:9,NegInfinity:10,NaN:11},StringLiteral:12,ArrayExpression:{_self:13,element:14},ObjectExpression:{_self:15,property:16},_Ref:17,CommentLine:{_self:18,tt:19,k:20,bv:21,av:22},CommentBlock:{_self:23,tt:24,k:25,bv:26,av:27}};gr.exports={TYPE_DICT:Wo,isNode:lr,empty:xo,unknown:Me,is_bigint_str:ur,is_jsint_str:Eo,NUM_TYPE_DICT:fe,parse_abnormal_num:_r,parse_int:fr,parse_float:hr,parse_num:dr,parse0:pr,to_str:Lo}});var wr=h((kd,yr)=>{var Ye={backSpace:8,tab:9,lineFeed:10,lineTab:11,formFeed:12,carriageReturn:13,shiftOut:14,space:32,exclamationMark:33,quotationMark:34,numberSign:35,dollarSign:36,percentSign:37,ampersand:38,apostrophe:39,leftParenthesis:40,rightParenthesis:41,asterisk:42,plusSign:43,comma:44,dash:45,dot:46,slash:47,digit0:48,digit1:49,digit2:50,digit3:51,digit4:52,digit5:53,digit6:54,digit7:55,digit8:56,digit9:57,colon:58,semicolon:59,lessThan:60,equalsTo:61,greaterThan:62,questionMark:63,atSign:64,uppercaseA:65,uppercaseB:66,uppercaseC:67,uppercaseD:68,uppercaseE:69,uppercaseF:70,uppercaseG:71,uppercaseH:72,uppercaseI:73,uppercaseJ:74,uppercaseK:75,uppercaseL:76,uppercaseM:77,uppercaseN:78,uppercaseO:79,uppercaseP:80,uppercaseQ:81,uppercaseR:82,uppercaseS:83,uppercaseT:84,uppercaseU:85,uppercaseV:86,uppercaseW:87,uppercaseX:88,uppercaseY:89,uppercaseZ:90,leftSquareBracket:91,backslash:92,rightSquareBracket:93,caret:94,underscore:95,graveAccent:96,lowercaseA:97,lowercaseB:98,lowercaseC:99,lowercaseD:100,lowercaseE:101,lowercaseF:102,lowercaseG:103,lowercaseH:104,lowercaseI:105,lowercaseJ:106,lowercaseK:107,lowercaseL:108,lowercaseM:109,lowercaseN:110,lowercaseO:111,lowercaseP:112,lowercaseQ:113,lowercaseR:114,lowercaseS:115,lowercaseT:116,lowercaseU:117,lowercaseV:118,lowercaseW:119,lowercaseX:120,lowercaseY:121,lowercaseZ:122,leftCurlyBrace:123,verticalBar:124,rightCurlyBrace:125,tilde:126,nonBreakingSpace:160,oghamSpaceMark:5760,enQuad:8192,emQuad:8193,enSpace:8194,emSpace:8195,threePerEmSpace:8196,fourPerEmSpace:8197,sixPerEmSpace:8198,figureSpace:8199,punctuationSpace:8200,thinSpace:8201,hairSpace:8202,lineSeparator:8232,paragraphSeparator:8233,narrowNoBreakSpace:8239,mediumMathematicalSpace:8287,ideographicSpace:12288,zeroWidthNoBreakSpace:65279};function Bo(e){let t=Object.entries(e),r=new Map;return t.forEach(n=>r.set(n[1],n[0])),r}var Pt=Bo(Ye);function Fo(e){let t=Object.entries(e);return t=t.map(r=>[r[0],String.fromCharCode(r[1])]),Object.fromEntries(t)}var Mo=Fo(Ye),mr=e=>55296<=e&&e<=56319,Yo=e=>56320<=e&&e<=57343,Ho=(e,t)=>(e-55296)*1024+(t-56320)+65536,br=e=>e<=65535,Uo=e=>!br(e),Go=e=>{if(e<=65535)return[e,null];{e=e-65536;let t=[null,null];return t[0]=(e>>10)+55296,t[1]=e%1024+56320,t}},Vo=(e,t)=>mr(e)?t+2:t+1;yr.exports={CODE_DICT:Ye,CH_DICT:Mo,CODE_NAME_MP:Pt,cd2ch:e=>String.fromCharCode(e),ch2cd:e=>e.codePointAt(0),cd2n:e=>Pt.get(e),n2cd:e=>String.fromCharCode(Ye[e]),n2ch:e=>Ye[e],ch2n:e=>Pt.get(e.codePointAt(0)),is_high_code:mr,is_low_code:Yo,get_code_point_from_high_low:Ho,get_high_low_from_code_point:Go,is_length1_code_point:br,is_length2_code_point:Uo,_next_code_index:Vo}});var xe=h((xd,T)=>{var{CODE_DICT:p,CH_DICT:y}=wr(),$r=/\r\n?|[\n\u2028\u2029]/;T.exports.line_break_regexp=$r;T.exports.line_break_regexp_g=new RegExp($r.source,"g");function vr(e){switch(e){case p.lineFeed:case p.carriageReturn:case p.lineSeparator:case p.paragraphSeparator:return!0;default:return!1}}function kr(e){switch(e){case y.lineFeed:case y.carriageReturn:case y.lineSeparator:case y.paragraphSeparator:return!0;default:return!1}}var Wt=[p.lineFeed,p.carriageReturn,p.lineSeparator,p.paragraphSeparator],xr=Wt.map(e=>String.fromCharCode(e));T.exports.NL_CODE_ARR=Wt;T.exports.NL_CH_ARR=xr;T.exports.is_nl_code=vr;T.exports.is_nl=kr;T.exports.skip_white_space_regexp=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g;function Sr(e){switch(e){case 9:case 11:case 12:case p.space:case p.nonBreakingSpace:case p.oghamSpaceMark:case 8192:case 8193:case 8194:case 8195:case 8196:case 8197:case 8198:case 8199:case 8200:case 8201:case 8202:case 8239:case 8287:case 12288:case 65279:return!0;default:return!1}}T.exports.is_non_nl_ws_code=Sr;function Tr(e){switch(e){case y.tab:case y.lineTab:case y.formFeed:case y.space:case y.nonBreakingSpace:case y.oghamSpaceMark:case y.enQuad:case y.emQuad:case y.enSpace:case y.emSpace:case y.threePerEmSpace:case y.fourPerEmSpace:case y.sixPerEmSpace:case y.figureSpace:case y.punctuationSpace:case y.thinSpace:case y.hairSpace:case y.narrowNoBreakSpace:case y.mediumMathematicalSpace:case y.ideographicSpace:case y.zeroWidthNoBreakSpace:return!0;default:return!1}}T.exports.is_non_nl_ws=Tr;var Bt=[p.tab,p.lineTab,p.formFeed,p.space,p.nonBreakingSpace,p.oghamSpaceMark,p.enQuad,p.emQuad,p.enSpace,p.emSpace,p.threePerEmSpace,p.fourPerEmSpace,p.sixPerEmSpace,p.figureSpace,p.punctuationSpace,p.thinSpace,p.hairSpace,p.narrowNoBreakSpace,p.mediumMathematicalSpace,p.ideographicSpace,p.zeroWidthNoBreakSpace];T.exports.NON_NL_WS_CODE_ARR=Bt;var Er=Bt.map(e=>String.fromCharCode(e));T.exports.NON_NL_WS_CH_ARR=Er;function zo(e){return Sr(e)||vr(e)}function ke(e){return Tr(e)||kr(e)}T.exports.is_ws_code=zo;T.exports.is_ws=ke;T.exports.WS_CHCODE_ARR=Wt.concat(Bt);T.exports.WS_CH_ARR=xr.concat(Er);var ee={init:0,executing:1,succ:2,eof:3};T.exports.STATE_DICT=ee;function Xo(e,t=new Set){let r={g:e,rslt:"",state:ee.init},n=r.g.next().value;if(n===void 0)return r.state=ee.eof,r;for(;n!==void 0&&(ke(n)||t.has(n));)n=r.g.next().value;for(;n!==void 0&&!ke(n)&&!t.has(n);)r.rslt=r.rslt+n,n=r.g.next().value;return n===void 0?r.state=ee.eof:(ke(n)||t.has(n))&&(r.state=ee.succ),r}function Jo(e,t=0,r=new Set){let n={arr:e,pos:t,rslt:"",state:ee.init};for(let l=n.pos;l<e.length;l++){let o=e[l];if(ke(o)||r.has(o))n.pos=n.pos+1;else break}let i=n.pos;for(let l=n.pos;l<e.length;l++){let o=e[l];if(!ke(o)&&!r.has(o))n.pos=n.pos+1;else break}return n.pos===e.length?n.state=ee.eof:n.state=ee.succ,n.rslt=e.slice(i,n.pos).join(""),n}T.exports.from_generator=Xo;T.exports.from_charr=Jo});var te=h((Sd,jr)=>{var{WS_CH_ARR:Cr,NON_NL_WS_CH_ARR:Ko,NL_CH_ARR:Qo}=xe();function Zo(e){return Array.from(e).length}var ea="\u200C",qr="\u200D",ta=()=>typeof process<"u"&&process.versions!=null&&process.versions.node!=null;function Ft(e,t,...r){let n=function(){return t(this,...r)};ta()?e.prototype[Symbol.for("nodejs.util.inspect.custom")]=n:e.prototype.repr=n}var W={tmpl_quote:new Error("tmpl_quote: ` cant be deleted"),reserved:new Error(" [/,*,#,&,`,\\,] and whitespaces are reserved"),inuse:new Error("in using"),char:new Error("must be a char"),pair:new Error("left block must be different with right"),cant_be_empty:new Error("can NOT be empty")},ct=Symbol("get_pair_lmp"),sa=Symbol("add_pair_reserved"),He=class{#t;#e=new Map;#s=new Map;constructor(t){this.#t=t}get[ct](){return this.#e}get size(){return this.#e.size}[sa](t,r){if(t===r)throw W.pair;this.#e.set(t,r),this.#s.set(r,t)}add(t,r){if(this.#t.validate(t),this.#t.validate(r),t===r)throw W.pair;this.#e.set(t,r),this.#s.set(r,t)}ldelete(t){if(this.size<2)throw W.cant_be_empty;{let r=this.#e.get(t);this.#e.delete(t),this.#s.delete(r)}}rdelete(t){if(this.size<2)throw W.cant_be_empty;{let r=this.#s.get(t);this.#s.delete(t),this.#e.delete(r)}}lhas(t){return this.#e.has(t)}rhas(t){return this.#s.has(t)}has(t){return this.lhas(t)||this.rhas(t)}getl(t){return this.#s.get(t)}getr(t){return this.#e.get(t)}[Symbol.iterator](){return this.#e[Symbol.iterator]()}};function ra(e){return new Map(e[ct])}Ft(He,ra);var Ar=Symbol("get_single_set"),Nr=Symbol("add_single_reserved"),Se=class{#t;#e=new Set;constructor(t){this.#t=t}get[Ar](){return this.#e}[Nr](t){this.#e.add(t)}add(t){this.#t.validate(t),this.#e.add(t)}delete(t){if(this.size<2)throw W.cant_be_empty;if(t==="`")throw W.tmpl_quote;this.#e.delete(t)}has(t){return this.#e.has(t)}[Symbol.iterator](){return this.#e[Symbol.iterator]()}};function na(e){return new Set(e[Ar])}Ft(Se,na);var ut=class{#t;#e;#s;#r;#n;#i=!1;constructor(){this.#t=new He(this),this.#t.add("[","]"),this.#t.add("(",")"),this.#t.add("<",">"),this.#t.add("\uFF08","\uFF09"),this.#t.add("\u2018","\u2019"),this.#e=new He(this),this.#e.add("{","}"),this.#e.add("\u3010","\u3011"),this.#e.add("\u300A","\u300B"),this.#e.add("\u201C","\u201D"),this.#s=new Se(this),this.#s.add('"'),this.#s.add("'"),this.#s.add("\xB7"),this.#s[Nr]("`"),this.#r=new Se(this),this.#r.add(","),this.#r.add("\uFF0C"),this.#r.add(";"),this.#r.add("\uFF1B"),this.#r.add("\u3002"),this.#r.add("\u3001"),this.#n=new Se(this),this.#n.add(":"),this.#n.add("\uFF1A"),this.#n.add("="),this.#i=!0}get reserved(){return["/","*","#","&","`","\\"].concat(Cr)}get inuse(){let t=new Set;if(this.#i){for(let r of this.#s)t.add(r);for(let r of this.#r)t.add(r);for(let r of this.#n)t.add(r);for(let r of this.#t[ct])t.add(r);for(let r of this.#e[ct])t.add(r)}return t}validate(t){if(typeof t!="string"||Zo(t)!==1)throw W.char;if(this.reserved.includes(t))throw W.reserved;if(Array.from(this.inuse).flat().includes(t))throw W.inuse;return t}get esc(){return"\\"}get slash(){return"/"}get line_comment(){return"//"}get asterisk(){return"*"}get blk_comments(){return["/*","*/"]}get hash(){return"#"}get ref(){return"&"}get tmpl_quote(){return"`"}get nl(){return Qo}get non_nl_ws(){return Ko}get ws(){return Cr}get array_blks(){return this.#t}get fst_ary_blks(){return Array.from(this.#t)[0]}get obj_blks(){return this.#e}get fst_obj_blks(){return Array.from(this.#e)[0]}get quotes(){return this.#s}get fst_quote(){return Array.from(this.#s)[0]}get commas(){return this.#r}get fst_comma(){return Array.from(this.#r)[0]}get colons(){return this.#n}get fst_colon(){return Array.from(this.#n)[0]}},_t=class{constructor(t){this.reserved=t.reserved}get[Symbol.toStringTag](){return"reserved"}};Object.defineProperty(_t,"name",{value:qr});var ft=class{constructor(t){this.esc=t.esc,this.hash=t.hash,this.ref=t.ref,this.tmpl_quote=t.tmpl_quote,this.slash=t.slash,this.asterisk=t.asterisk,this.line_comment=t.line_comment,this.blk_comments=t.blk_comments,this.nl=t.nl,this.non_nl_ws=t.non_nl_ws}get[Symbol.toStringTag](){return"fixed"}};Object.defineProperty(ft,"name",{value:qr});var ht=class{constructor(t){this.obj_blks=t.obj_blks,this.array_blks=t.array_blks,this.quotes=t.quotes,this.commas=t.commas,this.colons=t.colons}get[Symbol.toStringTag](){return"configurable-if-not-reserved"}};Object.defineProperty(ht,"name",{value:ea});function ia(e){return[new ft(e),new ht(e),new _t(e)]}Ft(ut,ia);var Ir=new ut;Ir.ERROR_DICT=W;jr.exports=Ir});var Dr=h((Td,Or)=>{function*la(e){for(let t of e)yield t;e=null}Or.exports.sync_gen_from_str=la});var I=h((Ed,Pr)=>{var Rr={bk:{_self:0,eof:{_self:1,lc:2,blkc:3,hash:{_self:4,naked:5,quote:6},ref:{_self:7,naked:8,quote:9}}},k:{_self:10,eof:{_self:11,lc:12,blkc:13,hash:{_self:14,naked:15,quote:16},ref:{_self:17,naked:18,quote:19}}},ak:{_self:20,eof:{_self:21,lc:22,blkc:23,hash:{_self:24,naked:25,quote:26},ref:{_self:27,naked:28,quote:29}}},bv:{_self:30,eof:{_self:31,lc:32,blkc:33,hash:{_self:34,naked:35,quote:36},ref:{_self:37,naked:38,quote:39}}},v:{_self:40,eof:{_self:41,lc:42,blkc:43,hash:{_self:44,naked:45,quote:46},ref:{_self:47,naked:48,quote:49}}},av:{_self:50,eof:{_self:51,lc:52,blkc:53,hash:{_self:54,naked:55,quote:56},ref:{_self:57,naked:58,quote:59}}}};function N(e){return e instanceof Object?e._self:e}function oa(e){return e+1}function aa(e){return e+2}function ca(e){return e+3}function ua(e){return e+6}function _a(e){return e+5}function fa(e){return e+9}function ha(e){return e+8}function Lr(e){return e%10!==0}var da={backslash:0,lcmt:1,blkcmt:2,quote:3,naked:4},pa={handling:0,handled:1};function ga(e,t,r){let n=Rr;return e.$has_yield_sign()||Lr(r)||t===N(n.av)&&r===N(n.bv)||t===N(n.av)&&r===N(n.bk)||t===N(n.av)&&r===N(n.k)||t===N(n.av)&&r===N(n.v)||t===N(n.av)&&r===N(n.ak)||t===N(n.v)&&r===N(n.bv)||t===N(n.v)&&r===N(n.bk)}Pr.exports={STATE_DICT:Rr,gtv:N,get_main_eofv_with_code:oa,get_lcmt_eofv_with_code:aa,get_blkcmt_eofv_with_code:ca,get_hash_quote_eofv_with_code:ua,get_hash_naked_eofv_with_code:_a,get_ref_quote_eofv_with_code:fa,get_ref_naked_eofv_with_code:ha,LEFTED_TYPE:da,AVND_CACHE_STATE_DICT:pa,is_eofv:Lr,is_should_yield:ga}});var Xt=h((Cd,Xr)=>{var{is_nl:Fr}=xe(),Mr=(e,t,r=" ",n=!1)=>{let i=e.length;return i<=t?r.repeat(t-i)+e:n?e.substr(i-t):e},dt=(e,t,r,n="0",i=!1)=>{let l=e.toString(t);return Mr(l,r,n,i)},ma=/^[0-7]$/,ba=/^[0-9a-fA-F]$/,he=e=>ma.test(e),z=e=>ba.test(e),pt={b:"\b",f:"\f",n:`
2
+ `,r:"\r",t:" ",v:"\v"},Yr={"\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\v":"\\v","\\":"\\\\"};function ya(e){return Yr[e]}function Hr(e){return pt[e]}function wa(e){if(e.length>1)return;let t=e.charCodeAt(0);if(t>=0&&t<=255)return"\\x"+dt(t,16,2)}function $a(e){e=Array.from(e);let t=e[0],r=e[1];if(z(t)&&z(r)){let n=parseInt("0x"+t+r);return String.fromCharCode(n)}}function va(e){if(e.length>1)return;let t=e.charCodeAt(0);if(t>=0&&t<=255)return"\\u"+dt(t,16,4)}function ka(e){e=Array.from(e);let t=e[0],r=e[1],n=e[2],i=e[3];if(z(t)&&z(r)&&z(n)&&z(i)){let l=parseInt("0x"+t+r+n+i);return String.fromCharCode(l)}}function xa(e){if(e.length>1)return;let t=e.charCodeAt(0);if(t>=0&&t<=255)return"\\"+dt(t,8,3)}function Sa(e){let t="";e=Array.from(e);let r=e[0];if(he(r)){t=t+r;let n=e[1];if(he(n)){t=t+n;let l=e[2];he(l)&&(t=t+l)}let i=parseInt(t,8);return String.fromCharCode(i)}}var g={init:0,executing:1,succ:2,eof:3,backslash:4,x:5,u:6,o:7};function*Ta(e){let t=Array.from(e);for(let r of t)yield r}function*Wr(e,t){yield*t,yield*e}function Ur(e,t,r,n,i=!1){if(typeof t=="string"){let o=t;t=a=>a===o}if(typeof(r==="string")&&r.length>0){let o=Ta(r);e=Wr(e,o)}else e=Wr(e,r);let l={state:g.init,end:t,esc:n,g:e,curr:"",ch:e.next().value,offset:0};return l.ch!==void 0&&(l.offset=l.offset+1),i&&(l.rslt=""),l}function Mt(e){return e.ch===void 0||e.end(e.ch)&&e.state!==g.backslash||e.state===g.x||e.state===g.u||e.state===g.o}function Yt(e,t=!1){return e.ch===e.esc?(e.state=g.backslash,e.curr=""):(e.state=g.executing,t&&(e.rslt=e.rslt+e.ch),e.curr=e.ch),e.ch=e.g.next().value,e.ch!==void 0&&(e.offset=e.offset+1),e}function Br(e,t,r,n,i,l,o){return o===!0?n===Gr?(e.state=g.x,e.ch="\\x"+t.join(""),e):n===Vr?(e.state=g.u,e.ch="\\u"+t.join(""),e):(n===zr&&(e.state=g.o,e.ch="\\"+t.join("")),e):i?(e.curr=t.join(""),l&&(e.rslt=e.rslt+e.curr),e.state=g.executing,e.ch=r,e):(e.curr=n(t),l&&(e.rslt=e.rslt+e.curr),e.state=g.executing,e.ch=r,e)}function Ea(e,t,r,n,i){return e.curr=n(t),i&&(e.rslt=e.rslt+e.curr),e.state=g.executing,e.ch=e.g.next().value,e.ch!==void 0&&(e.offset=e.offset+1),e}function gt(e,t,r,n,i=!0,l=!1,o=void 0,a=!1){let c;if(o!==void 0?c=o:(c=e.g.next().value,c!==void 0&&(e.offset=e.offset+1)),c===void 0)return e;let u=0,_=[],f;if(l?f=!0:f=r(c),f)u=u+1,_.push(c);else return e.state=g.executing,e.ch=c,e;for(;u<t;){if(c=e.g.next().value,c===void 0)return Br(e,_,c,n,i,a,tail=!0);if(e.offset=e.offset+1,f=r(c),f)u=u+1,_.push(c);else return Br(e,_,c,n,i,a,tail=!1)}return Ea(e,_,c,n,a)}function Gr(e){let t=parseInt("0x"+e[0]+e[1]);return String.fromCharCode(t)}function Vr(e){let t=parseInt("0x"+e[0]+e[1]+e[2]+e[3]);return String.fromCharCode(t)}function zr(e){let t=parseInt(e.join(""),8);return String.fromCharCode(t)}function Ht(e,t=!1){return e.curr=Hr(e.ch),t&&(e.rslt=e.rslt+e.curr),e.state=g.executing,e.ch=e.g.next().value,e.ch!==void 0&&(e.offset=e.offset+1),e}function Ut(e,t=!1){return gt(e,2,z,Gr,!0,!1,void 0,t)}function Gt(e,t=!1){return gt(e,4,z,Vr,!0,!1,void 0,t)}function Vt(e,t=!1){return gt(e,3,he,zr,!1,!0,e.ch,t)}function zt(e,t=!1){return e.curr=e.ch,t&&(e.rslt=e.rslt+e.ch),e.state=g.executing,e.ch=e.g.next().value,e.ch!==void 0&&(e.offset=e.offset+1),e}function Ca(e,t=i=>i==='"',r="",n="\\"){let i=Ur(e,t,r,n,!0);for(i.state=g.executing;!Mt(i);)i.state===g.executing?Yt(i,!0):i.state===g.backslash&&(Fr(i.ch)?(i.ch=i.g.next().value,i.ch!==void 0&&(i.offset=i.offset+1),i.state=g.executing):i.ch in pt?Ht(i,!0):i.ch==="x"?Ut(i,!0):i.ch==="u"?Gt(i,!0):he(i.ch)?Vt(i,!0):zt(i,!0));return typeof i.ch=="string"&&i.end(i.ch)?(i.state=g.succ,i.ch=""):i.state===g.backslash?i.ch=i.esc:i.ch===void 0&&(i.state=g.eof,i.ch=""),i}function*qa(e){let t=e;for(t.state=g.executing;!Mt(t);)t.state===g.executing?(Yt(t,!1),t.curr!==""&&(yield t.curr)):t.state===g.backslash&&(Fr(t.ch)?(t.state=g.executing,t.ch=t.g.next().value,t.ch!==void 0&&(t.offset=t.offset+1)):t.ch in pt?(Ht(t,!1),t.curr!==""&&(yield t.curr)):t.ch==="x"?(Ut(t,!1),t.curr!==""&&(yield t.curr)):t.ch==="u"?(Gt(t,!1),t.curr!==""&&(yield t.curr)):he(t.ch)?(Vt(t,!1),t.curr!==""&&(yield t.curr)):(zt(t,!1),t.curr!==""&&(yield t.curr)));return typeof t.ch=="string"&&t.end(t.ch)?(t.state=g.succ,t.ch=""):t.state===g.backslash?(t.ch=t.esc,yield t.curr):t.ch===void 0&&(t.state=g.eof,t.ch=""),t}Xr.exports={CHAR_UNESC_DICT:pt,CHAR_ESC_DICT:Yr,escc:ya,unescc:Hr,escx:wa,unescx:$a,escu:va,unescu:ka,esco:xa,unesco:Sa,STATE_DICT:g,from_generator:Ca,init:Ur,handle_executing:Yt,is_terminated:Mt,handle_escc:Ht,esc_handle_engine:gt,handle_escx:Ut,handle_escu:Gt,handle_esco:Vt,handle_esc_other:zt,gen:qa,prepend:Mr,prepend_num:dt,is_odigit_ch:he,is_hdigit_ch:z}});var nn=h((qd,rn)=>{var{is_nl:Aa}=xe(),Te=Xt(),Jr={line_comment:0,blk_comment:1},se={init:0,executing:1,succ:2,eof:3,asterisk:4};function Kr(e){return{state:se.init,g:e,rslt:"",ch:"",offset:0}}function Qr(e,t){return e.state=se.eof,e.rslt=e.rslt+t.rslt,e.ch="",e}function Zr(e,t){return e.state=se.succ,e.rslt=e.rslt+t.rslt,e.ch="",e}function en(e,t){return e.state=se.executing,e.rslt=e.rslt+t.rslt,e.ch=t.ch,e}function tn(e,t=""){let r=Kr(e);r.state=se.executing;let n=Te.from_generator(r.g,Aa,t);return r.offset=n.offset+r.offset,r.g=n.g,n.state===Te.STATE_DICT.eof?Qr(r,n):n.state===Te.STATE_DICT.succ?Zr(r,n):en(r,n)}function sn(e,t=""){let r=Kr(e);r.state=se.executing;let n;for(;;){if(n=Te.from_generator(r.g,"*",t),r.offset=r.offset+n.offset,r.g=n.g,n.state===Te.STATE_DICT.eof)return Qr(r,n);if(n.state===Te.STATE_DICT.succ){let i=r.g.next().value;if(i!==void 0&&(r.offset=r.offset+1),i==="/")return Zr(r,n);if(i!==void 0)r.rslt=r.rslt+n.rslt+"*",t=i,r.offset=r.offset-1;else return r.rslt=r.rslt+n.rslt,r.ch="*",r.state=se.asterisk,r}else return en(r,n)}return r}function Na(e,t,r=""){return t===Jr.line_comment?tn(e,r):sn(e,r)}rn.exports={TYPE_DICT:Jr,STATE_DICT:se,lc_from_generator:tn,blk_from_generator:sn,from_generator:Na}});var Jt=h((Ad,ln)=>{function Ia(e){if(globalThis.document===void 0){let i=globalThis.require("fs").readFileSync(e).toString();return JSON.parse(i)}else return}function ja(e,t){if(globalThis.document===void 0){let n=globalThis.require("fs"),i=JSON.stringify(t);n.writeFileSync(e,i)}else return}function Oa(e){return parseInt(e).toString()===e}ln.exports={rjson:Ia,wjson:ja,is_int_str:Oa}});var Kt=h((Nd,on)=>{var Da=()=>Math.random()*9007199254740992;function Ra(e,t){return Array.from({length:t-e}).map((r,n)=>n+e)}function La(e,t){return t.filter((r,n)=>e.includes(n))}function Pa(e){return Object.entries(e).length===0}function Wa(e){return Object.entries(e).map(n=>n[1])}function Ba(e){return Object.entries(e).map(n=>n[0])}function Fa(e){return Object.entries(e).length}function Ma(e,t){for(let r in e)t(r,e[r]);return e}function Ya(e,t){for(let r in e)e[r]=t(r,e[r]);return e}function Ha(e,t){for(let r in t)e[r]=t[r];return e}function Ua(e,t){for(let r in t)!(r in e)&&(e[r]=t[r]);return e}function Ga(e,t,r){return r=r.filter(n=>n[e]!==t),r}function Va(e,t,r){return r.findIndex(i=>i[e]===t)}function za(e){return JSON.parse(JSON.stringify(e))}function Xa(e,t){for(let r=0;r<e.length;r++){lyr=e[r];for(let n=0;n<lyr.length;n++)e[r][n]=t(e[r][n],r,n)}return e}function Ja(e){let t=e[0]!=="_",r=e[0]!=="$";return t&&r}on.exports={gen_guid:Da,range:Ra,seqs_slct:La,dict_length:Fa,is_empty_dict:Pa,dict_values:Wa,dict_keys:Ba,dict_map:Ya,dict_foreach:Ma,dict_plus:Ha,dict_update:Ua,dtb_kv_rm:Ga,dtb_kv_get_seq:Va,dcp:za,mat_map:Xa,is_cu_property:Ja}});var us=h((Id,jn)=>{var v=Kt();function es(e){if(v.is_empty_dict(e))return 0;{let t=v.dict_keys(e);return Math.max(...t)+1}}function Ue(e){return e!=null}function cn(e,t){return e._id=e._id+t,e._tree=e._tree+t,Ue(e._fstch)&&(e._fstch=e._fstch+t),Ue(e._lsib)&&(e._lsib=e._lsib+t),Ue(e._rsib)&&(e._rsib=e._rsib+t),Ue(e._parent)&&(e._parent=e._parent+t),e}function de(e,t){let r=es(e);for(let n in t){let i=cn(t[n],r);t[i._id]=i,delete t[n]}return t}function Ka(e=0){let t=e;return{_id:t,_fstch:null,_lsib:null,_rsib:null,_parent:null,_tree:t}}function Qa(e,t=0){return{_id:es(e)+t,_fstch:null,_lsib:void 0,_rsib:void 0,_parent:void 0,_tree:void 0}}function un(e){return e._tree!==void 0}function re(e){let t=e._tree!==void 0,r=e._tree===e._id;return t&&r}function ts(e){return e._lsib===null}function ss(e){return e._rsib===null}function B(e){return e._fstch===null}function _n(e,t){if(re(e))return!0;{let n=x(e,t);return M(n,t).length===1}}function Xe(e){return re(e)||!un(e)}function mt(e,t,r){if(!Xe(t))return console.log("only root or uninited could be prepend"),e;let n=B(e);if(t._tree=e._tree,t._lsib=null,n)t._rsib=null,t._parent=e._id;else{let i=r[e._fstch];i._lsib=void 0,t._rsib=i._id,t._parent=void 0}return e._fstch=t._id,r[t._id]=t,e}function rs(e,t,r){if(!Xe(t))return console.log("only root or uninited could be append"),e;let n=B(e);if(t._tree=e._tree,t._rsib=null,n)e._fstch=t._id,t._lsib=null;else{let i=ge(e,r);i._parent=void 0,i._rsib=t._id,t._lsib=void 0}return t._parent=e._id,r[t._id]=t,e}function ns(e,t,r){if(!Xe(t))return console.log("only root or uninited could be add"),e;if(re(e))return console.log("cant addrsib to root"),e;let n=ss(e);return t._tree=e._tree,n?(t._parent=e._parent,e._parent=void 0,t._rsib=null):(t._rsib=e._rsib,t._parent=void 0),e._rsib=t._id,t._lsib=void 0,r[t._id]=t,e}function fn(e,t,r){if(!Xe(t))return console.log("only root or uninited could be add"),e;if(re(e))return console.log("cant addlsib to root"),e;let n=ts(e);if(t._tree=e._tree,n){let i=x(e,r);e._lsib=void 0,t._lsib=null,i._fstch=t._id}else{let i=F(e,r);i._rsib=t._id,t._lsib=void 0}return t._rsib=e._id,t._parent=void 0,r[t._id]=t,e}function hn(e,t,r,n){let i=M(t,n),l=i.length;if(l===0)return mt(t,r,n);if(e<=l&&e>=0){if(e===0)return mt(t,r,n);if(e===l)return rs(t,r,n);{let a=i[e-1];return ns(a,r,n)}}else return console.log("not in range!!"),t}function Ee(e,t){for(let r in t)t[r]._tree=e._tree}function Za(e,t,r){r=de(t,r);let n=v.dict_keys(r)[0],i=ie(r[n],r);return e=mt(e,i,t),Ee(e,r),v.dict_plus(t,r),e}function ec(e,t,r){r=de(t,r);let n=v.dict_keys(r)[0],i=ie(r[n],r);return e=rs(e,i,t),Ee(e,r),v.dict_plus(t,r),e}function tc(e,t,r){r=de(t,r);let n=v.dict_keys(r)[0],i=ie(r[n],r);return e=ns(e,i,t),Ee(e,r),v.dict_plus(t,r),e}function sc(e,t,r){r=de(t,r);let n=v.dict_keys(r)[0],i=ie(r[n],r);return e=fn(e,i,t),Ee(e,r),v.dict_plus(t,r),e}function rc(e,t,r,n){n=de(r,n);let i=v.dict_keys(n)[0],l=ie(n[i],n);return t=hn(e,t,l,r),Ee(t,n),v.dict_plus(r,n),t}function Ge(e,t){let r=Y(e,t),n=r[0]._id;return r.forEach(i=>{i._tree=n}),r}function Ve(e,t){let r={};return e.map(n=>{let i=n._id;r[i]=n,delete t[i]}),r}function dn(e){return e._fstch=null,e}function ze(e){return e._lsib=null,e._rsib=null,e._parent=null,e}function Ce(e,t){if(re(e))return[e,t];if(_n(e,t)){let n=t[e._parent];dn(n);let i=Ge(e,t),l=Ve(i,t);return ze(e),[e,l]}else if(ts(e)){let n=L(e,t);n._lsib=null;let i=x(e,t);i._fstch=e._rsib;let l=Ge(e,t),o=Ve(l,t);return ze(e),[e,o]}else if(ss(e)){let n=F(e,t);n._rsib=e._rsib,n._parent=e._parent;let i=Ge(e,t),l=Ve(i,t);return ze(e),[e,l]}else{let n=F(e,t);n._rsib=e._rsib;let i=Ge(e,t),l=Ve(i,t);return ze(e),[e,l]}}function nc(e,t){let r=pe(e,t);return r===null?[e,t]:Ce(r,t)}function ic(e,t){let r=ge(e,t);return r===null?[e,t]:Ce(r,t)}function lc(e,t,r){let n=pn(e,t,r);return n===null?[t,r]:Ce(n,r)}function oc(e,t,...r){let n=gn(e,t,...whiches);for(let i=0;i<n.length;i++)Ce(n[i],t);return[e,t]}function ac(e,t){let r=M(e,t);for(let n=0;n<r.length;n++)Ce(r[n],t);return t}function pe(e,t){return e._fstch===null?null:t[e._fstch]}function M(e,t){let r=[],n=pe(e,t);for(;n!==null;)r.push(n),n=L(n,t);return r}function ge(e,t){let r=M(e,t);return r.length===0?null:r[r.length-1]}function pn(e,t,r){let n=M(t,r);return n.length===0||e>n.length-1||e<0?null:n[e]}function gn(e,t,...r){let n=M(e,t),i=[];if(n.length!==0)for(let l=0;l<r.length;l++){let o=r[l];o>n.length-1||o<0||i.push(n[o])}return i}function mn(e,t,r=!1){let n=e,i=L(e,t);for(;i!==null;)n=i,i=L(i,t);return r||n._id!==e._id?n:null}function cc(e,t){let r=ne(e,t,!0),n=v.dtb_kv_get_seq("_id",e._id,r),i=[];if(r.length!==0)for(let l=0;l<r.length;l++)l<n&&i.push(r[l]);return i}function uc(e,t){let r=ne(e,t,!0),n=v.dtb_kv_get_seq("_id",e._id,r),i=[];if(r.length!==0)for(let l=0;l<r.length;l++)l>n&&i.push(r[l]);return i}function ne(e,t,r=!1){let n=x(e,t),i;return n!==null?i=M(n,t):i=[e],r||(i=v.dtb_kv_rm("_id",e._id,i)),i}function _c(e,t,r=!1){let n=ne(e,t,!0);return r?n[0]:n[0]._id===e._id?null:n[0]}function fc(e,t,r){let n=ne(t,r,!0),i=n.length;return e<=i-1&&e>=0?n[e]:null}function hc(e,t,...r){let n=ne(e,t,!0),i=[];if(n.length!==0)for(let l=0;l<r.length;l++){let o=r[l];o>n.length-1||o<0||i.push(n[o])}return i}function dc(e,t){let r=ne(e,t,!0);return v.dtb_kv_get_seq("_id",e._id,r)}function F(e,t){let r=ne(e,t,!0),n=v.dtb_kv_get_seq("_id",e._id,r);return n===0?null:r[n-1]}function L(e,t){return e._rsib===null?null:t[e._rsib]}function C(e,t){return bt(e,t,!0).length-1}function bn(e,t){let r=C(e,t),i=Y(e,t).map(o=>C(o,t));return Math.max(...i)-r+1}function pc(e,t){return B(e)?null:C(e,t)+1}function gc(e,t){if(B(e))return null;{let n=C(e,t),l=Y(e,t).map(a=>C(a,t));return Math.max(...l)}}function mc(e,t,r){let n=C(t,r);return bn(t,r)<=e?null:n+e}function yn(e,t){let r=ie(e,t),n=Y(r,t),i=C(e,t);return n.filter(o=>C(o,t)===i)}function Qt(e,t){let r=yn(e,t);return v.dtb_kv_get_seq("_id",e._id,r)}function bc(e,t){return Y(e,t).length}function ie(e,t){let r=e,n=x(e,t);for(;n!==null;)r=n,n=x(n,t);return r}function x(e,t){let r;if(re(e))r=null;else{let n=mn(e,t,!0);r=t[n._parent]}return r}function bt(e,t,r=!1){let n=[],i=x(e,t);for(;i!==null;)n.push(i),i=x(i,t);return r&&n.unshift(e),n}function yc(e,t,r){let n=bt(t,r,!0),i=n.length;return e<i&&e>=0?n[e]:null}function wc(e,t,...r){let n=bt(e,t,!0),i=[];if(n.length!==0)for(let l=0;l<r.length;l++){let o=r[l];o>n.length-1||o<0||i.push(n[o])}return i}function wn(e,t){let r=x(e,t);for(;r!==null;){let n=L(r,t);if(n!==null)return n;r=x(r,t)}return null}function $n(e,t){let r=pe(e,t);if(r!==null)return r;{let n=L(e,t);return n!==null?n:wn(e,t)}}function vn(e,t){let r=e,n=ge(e,t);for(;n!==null;)r=n,n=ge(n,t);return r}function $c(e,t){if(re(e))return null;if(B(e)){let n=F(e,t);return n!==null?n:x(e,t)}else{let n=F(e,t);return n!==null?B(n)?n:vn(n,t):x(e,t)}}function Y(e,t){let r=C(e,t),n=[];for(;e!==null&&(n.push(e),e=$n(e,t),!(e!==null&&C(e,t)<=r)););return n}function is(e,t){let r=e,n=pe(e,t);for(;n!==null;)r=n,n=pe(n,t);return r}function kn(e,t){let r=L(e,t);return r===null?x(e,t):is(r,t)}function xn(e,t){let r=x(e,t);for(;r!==null;){let n=F(r,t);if(n!==null)return n;r=x(r,t)}return null}function vc(e,t){if(B(e)){let n=F(e,t);return n===null?xn(e,t):n}else return ge(e,t)}function Sn(e,t){let r=[],n=is(e,t);for(;n!==null&&(r.push(n),n._id!==e._id);)n=kn(n,t);return r}function Zt(e){v.dict_foreach(e,(t,r)=>{e[t]._$visited=!1})}function Tn(e,t){let r=e._$visited;if(B(e))if(r){let i=L(e,t);return i===null?x(e,t):i}else return e._$visited=!0,e;else if(r){let i=L(e,t);return i===null?x(e,t):i}else return e._$visited=!0,pe(e,t)}function kc(e,t,r){if(B(t)){if(e)return t;{let i=F(t,r);return i===null?x(t,r):i}}else{if(e)return ge(t,r);{let i=F(t,r);return i===null?x(t,r):i}}}function En(e,t){return t._$visited&&e===t._id}function Cn(e,t,r=!1,n=!0){let i=[];Zt(t);let l=e._id;for(;!En(l,e);)r?i.push(v.dcp(e)):i.push(e),e=Tn(e,t);return r?i.push(v.dcp(e)):i.push(e),n&&Zt(t),i}function xc(e,t){let r={};r._depth=C(e,t),r._breadth=Qt(e,t);let n=x(e,t);return r._pbreadth=n===null?null:Qt(n,t),r._id=e._id,r}function an(e){let t={};return t.ele={},t.nd=e,t.ele._id=e._id,t.ele._children=[],t}function ls(e,t){let r=[],n=e[0],i=[an(n)];for(i[0].ele._pbreadth=null;i.length>0;){let l=[];for(let a=0;a<i.length;a++){i[a].ele._breadth=a,i[a].ele._depth=r.length;let c=M(i[a].nd,t);c=c.map(u=>an(u)),c.forEach((u,_)=>{u.ele._pbreadth=i[a].ele._breadth,i[a].ele._children.push([r.length+1,l.length+_])}),l=l.concat(c)}let o=i.map(a=>a.ele);r.push(o),i=l}return r}function qn(e,t){return Sn(e[0],t)}function An(e,t,r=!1,n=!0){return Cn(e[0],t,r,n)}function Sc(e,t){let r=os(e,t);return ls(r,t)}function os(e,t){let r=e[e.length-1];return Y(r,t)}function Tc(e,t,r=!1,n=!0){let i=os(e,t);return An(i,t,r,n)}function Ec(e,t){let r=as(e,t);return ls(r,t)}function as(e,t){let r=e[0];return Y(r,t)}function Cc(e,t){let r=as(e,t);return qn(r,t)}function cs(e,t,r=!1){let n=Y(e,t);return r||n.splice(0,1),n}function qc(e,t){return M(e,t)}function Ac(e,t){let r=cs(e,t,!1),n=sdfs.map(l=>C(l,t)),i=Math.max(...n);return r=r.filter(l=>C(l,t)===i),r}function Nn(e,t,r){let n=C(t,r),i=cs(t,r,!1),l=sdfs.map(o=>C(o,r));return i=i.filter(o=>C(o,r)===n+e),i}function Nc(e,t,...r){let n=r.map(i=>Nn(i,e,t));return n=Array.prototype.concat(...n),n}function In(e){let t=v.dict_keys(e)[0],r=e[t];return ie(r,e)}function Ic(e){let t=In(e);return Y(t,e)}jn.exports={calc_next_id:es,update_nodes_ids:de,creat_root:Ka,creat_nd:Qa,is_inited:un,is_root:re,is_fstch:ts,is_lstch:ss,is_leaf:B,is_lonely:_n,is_id:Ue,is_connectable:Xe,prepend_child:mt,append_child:rs,insert_child:hn,add_rsib:ns,add_lsib:fn,get_fstch:pe,get_rsib:L,get_children:M,get_lstch:ge,get_which_child:pn,get_some_children:gn,get_fstsib:_c,get_lstsib:mn,get_preceding_sibs:cc,get_following_sibs:uc,get_sibs:ne,get_which_sib:fc,get_some_sibs:hc,get_sibseq:dc,get_lsib:F,get_rsib:L,get_lyr:yn,get_breadth:Qt,get_count:bc,get_depth:C,get_height:bn,get_fst_lyr_des_depth:pc,get_lst_lyr_des_depth:gc,get_which_lyr_des_depth:mc,get_root:ie,get_parent:x,get_ances:bt,get_which_ance:yc,get_some_ances:wc,get_rsib_of_fst_ance_having_rsib:wn,get_sdfs_next:$n,get_drmost_des:vn,get_sdfs_prev:$c,get_sdfs:Y,get_lsib_of_fst_ance_having_lsib:xn,get_dlmost_des:is,get_edfs_next:kn,get_edfs_prev:vc,get_edfs:Sn,clear_$visited:Zt,get_sedfs_next:Tn,is_sedfs_traverse_finished:En,get_sedfs_prev:kc,get_sedfs:Cn,get_deses:cs,get_fst_lyr_deses:qc,get_lst_lyr_deses:Ac,get_which_lyr_deses:Nn,get_some_lyrs_deses:Nc,nd2ele:xc,sdfs2mat:ls,sdfs2edfs:qn,sdfs2sedfs:An,edfs2mat:Sc,edfs2sdfs:os,edfs2sedfs:Tc,sedfs2mat:Ec,sedfs2sdfs:as,sedfs2edfs:Cc,update_disconnected_nodes:Ge,update_orig_nodes:Ve,leafize:dn,rootize:ze,disconnect:Ce,rm_fstch:nc,rm_lstch:ic,rm_which:lc,rm_some:oc,rm_all:ac,update_treeid:Ee,update_one_nodeid:cn,update_nodes_ids:de,prepend_child_tree:Za,append_child_tree:ec,add_rsib_tree:tc,add_lsib_tree:sc,insert_child_tree:rc,get_root_via_tree:In,tree2sdfs:Ic}});var Pn=h((jd,Ln)=>{function On(e="E"){class t extends Event{#t;constructor(n,i){super(n),this.#t=i}get data(){return this.#t}set data(n){this.#t=n}}return t}var Dn=On();function Rn(e="ET"){class t extends EventTarget{#t=new Map;addEventListener(n,i){super.addEventListener(n,i),this.#t.set(n,i)}ls(){return this.#t}removeEventListener(n){super.removeEventListener(n),this.#t.delete(n)}dispatch(n,i){let l=new Dn(n,i);return this.dispatchEvent(l),l}}return t}var jc=Rn();Ln.exports={creat_event_cls:On,E:Dn,creat_event_target_cls:Rn,ET:jc}});var pi=h((Od,di)=>{var Qn=Jt(),Ke=Kt(),me=us(),{ET:Wn}=Pn(),Oc=["_fstch","_lsib","_rsib","_parent","_tree"];function Zn(e){return e._tree!==void 0}function _s(e){return e._tree===e}function Dc(e){return e._lsib===null}function Rc(e){return e._rsib===null}function Lc(e){return e._fstch===null}function Pc(e){return e.$sibs(!0).length===1}function St(e){return _s(e)||!Zn(e)}function Bn(e){let t=e._fstch,r=t;for(;t!==null;)r=t,t=t._rsib;return r}function Fn(e,t){let r=0,n=t._fstch;for(;;){if(r===e)return n;if(n===null)return n;n=n._rsib,r=r+1}}function Mn(e,...t){let r=[],n=0,i=e._fstch;for(;;){if(t.includes(n))r.push(i);else if(i===null)return r;i=i._rsib,n=n+1}}function fs(e){let t=[],r=0,n=e._fstch;for(;;){if(n===null)return t;t.push(n),n=n._rsib,r=r+1}}function Wc(e){let t=0,r=e._fstch;for(;;){if(r===null)return t;r=r._rsib,t=t+1}}function ei(e,t=!1){let r=e._rsib,n=e;for(;r!==null;)n=r,r=r._rsib;return t||n!==e?n:null}function Tt(e,t=!1){let r=hs(e);if(r===null)return t?e:null;{let n=r._fstch;return t||n!==e?n:null}}function Bc(e){let t=Tt(e,!1);if(t===null)return null;{let r=t;for(;;){if(r._rsib===e)return r;r=r._rsib}}}function gs(e){let t=[],n=Tt(e,!0);for(;n!==null;){if(n===e)return t;t.push(n),n=n._rsib}}function ti(e){let t=[],r=e._rsib;for(;r!==null;)t.push(r),r=r._rsib;return t}function si(e,t=!1){let r=gs(e),n=ti(e),i=[e],l;return t?l=r.concat(i,n):l=r.concat(n),l}function Fc(e,t){let r=Tt(t,!0),n=0;for(;;){if(r===null)return null;if(n==e)return r;r=r._rsib,n=n+1}}function Mc(e,...t){return si(e,!0).filter((i,l)=>t.includes(l))}function Yn(e){return gs(e).length}function Yc(e,t=!1){return e.$sibs(t).length}function hs(e){return ei(e,!0)._parent}function Hc(e){let t=e,r=e;for(;t!==null;)r=t,t=t.$parent();return r}function Uc(e,t){let r=0,n=t;for(;n!==null;){if(r===e)return n;n=n.$parent(),r=r+1}return null}function kt(e,t=!1){let r=[],n=e;for(t&&r.push(n),n=n.$parent();n!==null;)r.push(n),n=n.$parent();return r}function Gc(e,...t){return kt(e,!0).filter((i,l)=>t.includes(l))}function Vc(e,t=!1){return kt(e,t).length}function zc(e){let t=e.$parent();return t===null?null:t.$lsib()}function Xc(e){let t=e.$parent();return t===null?null:t.$rsib()}function Jc(e){let t=e.$luncle();return e.$is_fstch()?t===null?null:t.$lstch():null}function Kc(e){let t=e.$runcle();return e.$is_lstch()?t===null?null:t.$fstch():null}function Qc(e){let r=e.$root().$sdfs(),n=e.$depth();return r.filter(l=>l.$depth()===n)}function Zc(e){let t=e.$parent();return t===null?null:t.$breadth()}function eu(e){return e.$lyr().indexOf(e)}function tu(e){let t=e.$sdfs();return t=t.filter(r=>r.$is_leaf()),t.length}function su(e){let r=e.$root().$edfs(),n;if(e.$is_leaf())n=r.indexOf(e);else{let i=e.$dlmost_des();n=r.indexOf(i)}return r=r.slice(0,n+1),offset=r.filter(i=>i.$is_leaf()).length-1,offset}function Hn(e,t=!1){let r=ni(e),n=ye(e),i=n.indexOf(r);return t?n.slice(0,i+1):n.slice(1,i+1)}function ru(e){let t=e.$deses(!1),r=t.map(i=>i.$depth()),n=Math.max(...r);return t=t.filter(i=>i.$depth()===n),t}function nu(e,t){let r=t.$depth(),n=t.$deses(!1),i=n.map(l=>l.$depth());return n=n.filter(l=>l.$depth()===r+e),n}function iu(e,...t){let r=e.$depth(),n=t.map(o=>o+r),i=e.$deses(!1),l=i.map(o=>o.$depth());return i=i.filter(o=>n.includes(o.$depth())),i}function ds(e,t){if(!St(t))return console.log("only root or uninited could be prepend"),t;let r=e.$is_leaf();if(t._tree=e._tree,t._lsib=null,r)t._rsib=null,t._parent=e;else{let n=e._fstch;n._lsib=void 0,t._rsib=n,t._parent=void 0}return e._fstch=t,t}function ps(e,t){if(!St(t))return console.log("only root or uninited could be append"),t;let r=e.$is_leaf();if(t._tree=e._tree,t._rsib=null,r)e._fstch=t,t._lsib=null;else{let n=e.$lstch();n._parent=void 0,n._rsib=t,t._lsib=void 0}return t._parent=e,t}function ri(e,t){if(!St(t))return console.log("only root or uninited could be add"),t;if(e.$is_root())return console.log("cant addrsib to root"),e;let r=e.$is_lstch();return t._tree=e._tree,r?(t._parent=e._parent,e._parent=void 0,t._rsib=null):(t._rsib=e._rsib,t._parent=void 0),e._rsib=t,t._lsib=void 0,t}function lu(e,t){if(!St(t))return console.log("only root or uninited could be add"),t;if(e.$is_root())return console.log("cant addlsib to root"),e;let r=e.$is_fstch();if(t._tree=e._tree,r){let n=e.$parent();e._lsib=void 0,t._lsib=null,n._fstch=t}else{let n=e.$lsib();n._rsib=t,t._lsib=void 0}return t._rsib=e,t._parent=void 0,t}function Un(e,t,r){let n=fs(t),i=n.length;if(i===0)r=ds(t,r);else if(!(e<=i&&e>=0))console.log("not in range!!");else if(e===0)r=ds(t,r);else if(e===i)r=ps(t,r);else{let o=n[e-1];r=ri(o,r)}return r}function ou(e){let t=e.$parent();for(;t!==null;){let r=t.$rsib();if(r!==null)return r;t=t.$parent()}return null}function au(e){let t=e.$fstch();if(t!==null)return t;{let r=e.$rsib();return r!==null?r:e.$rsib_of_fst_ance_having_rsib()}}function ni(e){let t=e,r=e.$lstch();for(;r!==null;)t=r,r=r.$lstch();return t}function cu(e){if(e.$is_root())return null;if(e.$is_leaf()){let r=e.$lsib();return r!==null?r:e.$parent()}else{let r=e.$lsib();return r!==null?r.$is_leaf()?r:r.$drmost_des():e.$parent()}}function ye(e){let t=e.$depth();if(e===null)return[];{let r=[e];for(e=e.$sdfs_next();e!==null&&e.$depth()>t;)r.push(e),e=e.$sdfs_next();return r}}function uu(e){let t=e,r=e.$fstch();for(;r!==null;)t=r,r=r.$fstch();return t}function _u(e){let t=e.$rsib();return t===null?e.$parent():t.$dlmost_des()}function fu(e){let t=e.$parent();for(;t!==null;){let r=t.$lsib();if(r!==null)return r;t=t.$parent()}return null}function hu(e){if(e.$is_leaf()){let r=e.$lsib();return r===null?e.$lsib_of_fst_ance_having_lsib():r}else return e.$lstch()}function du(e){let t=[],r=e.$dlmost_des();for(;r!==null&&(t.push(r),r!==e);)r=r.$edfs_next();return t}function ii(e){let t=e.$visited;if(e.$is_leaf())if(t){let n=e.$rsib();return n===null?e.$parent():n}else return e.$visited=!0,e;else if(t){let n=e.$rsib();return n===null?e.$parent():n}else return e.$visited=!0,e.$fstch()}function pu(e,t){if(t.$is_leaf()){if(e)return t;{let n=t.$lsib();return n===null?t.$parent():n}}else{if(e)return t.$lstch();{let n=t.$lsib();return n===null?t.$parent():n}}}function gu(e){e.$sdfs().forEach(r=>{delete r.$visited})}function mu(e,t){return t.$visited&&e===t}function Gn(e){gu(e);let t=[],r=new Set,n=e;for(;!mu(n,e);)r.has(e)?e.$close_at=t.length:(e.$open_at=t.length,r.add(e)),t.push(e),e=ii(e);return n.$close_at=t.length,t.push(n),t.forEach(i=>{delete i.$visited}),t}function bu(e){return e._fstch=null,e}function yt(e){return e._lsib=null,e._rsib=null,e._parent=null,e}function wt(e){let t=e.$sdfs();return t.forEach(r=>{r._tree=t[0]}),t}function be(e){if(e.$is_root())return e;if(e.$is_lonely()){let r=e.$parent();bu(r);let n=wt(e);return yt(e),e}else if(e.$is_fstch()){let r=e.$rsib();r._lsib=null;let n=e.$parent();n._fstch=e._rsib;let i=wt(e);return yt(e),e}else if(e.$is_lstch()){let r=e.$lsib();r._rsib=e._rsib,r._parent=e._parent;let n=wt(e);return yt(e),e}else{let r=e.$lsib();r._rsib=e._rsib;let n=wt(e);return yt(e),e}}function Vn(e){let t={};return t._nd=e,t._children=[],t}function zn(e){let t=[],r=e[0],n=[Vn(r)];for(n[0]._pbreadth=null;n.length>0;){let i=[];for(let o=0;o<n.length;o++){n[o]._breadth=o,n[o]._depth=t.length;let a=n[o]._nd.$children();a=a.map(c=>Vn(c)),a.forEach((c,u)=>{c._pbreadth=n[o]._breadth,n[o]._children.push([t.length+1,i.length+u])}),i=i.concat(a)}let l=n;t.push(l),n=i}return t}function Xn(e,t="_children"){let r=e._nd,n={};n[t]=[],n.$guid=r.$guid;for(let i in r)Ke.is_cu_property(i)&&(n[i]=r[i]);return n}function yu(e,t="_children"){let r=e[0][0],n=Xn(r,t),i=[{d:n,ele:r}];for(;i.length>0;){let l=[];for(let o=0;o<i.length;o++){let a=i[o],c=a.d,u=a.ele,f=a.ele._children.map(d=>e[d[0]][d[1]]);for(let d=0;d<f.length;d++){let b=f[d],k=Xn(b,t);c[t].push(k);let ot={d:k,ele:b};l.push(ot)}}i=l}return n}function Jn(e,t="_children"){let r=new X;e.$guid!==void 0&&(r.$guid=e.$guid);for(let n in e)Ke.is_cu_property(n)&&t!==n&&(r[n]=e[n]);return r}function wu(e,t="_children"){let r=Jn(e,t),n=[{d:e,nd:r}];for(;n.length>0;){let i=[];for(let l=0;l<n.length;l++){let o=n[l].d,a=n[l].nd,c=o[t]===void 0?[]:o[t];for(let u=0;u<c.length;u++){let _=c[u],f=Jn(_,t);a.$append_child(f);let d={d:_,nd:f};i.push(d)}}n=i}return r}function $u(e){let t=["_fstch","_lsib","_rsib","_parent","_tree","$guid","_guid","_id","$open_at","$close_at"];e._fstch=void 0,e._lsib=void 0,e._rsib=void 0,e._parent=void 0,e._tree=void 0,e.$guid=void 0,e._guid=void 0,e._id=void 0,e.$open_at=void 0,e.$close_at=void 0;for(let r of t)Object.defineProperty(e,r,{enumerable:!1})}function vu(e,t,r){let n=e.$depth();return" ".repeat(n)+"["+r.indexOf(e)+"] : "+e.$guid}function ku(e,t){let r=e.$depth(),n=" ".repeat(r),i="";return t===e.$open_at&&(i=n+"<"+e._id+" : "+e.$guid+">"),t===e.$close_at&&(i=n+"</"+e._id+" : "+e.$guid+">"),i}var xu=["$fstch","$rsib","$parent"];function Su(e){if(e.$fstch()!==null)return["$fstch"];if(e.$rsib()!==null)return["$rsib"];{let n=[],i=e.$parent();for(;i!==null;)if(n.push("$parent"),i.$rsib()!==null){n.push("$rsib");break}else i=i.$parent();return n}}function Tu(e){return e.$sdfs().map(n=>n.$sdfs_next_action_for_srch())}var li={$fstch:"$append_child",$rsib:"$add_rsib",$parent:"$parent"};function Eu(e,t){for(let r=0;r<t.length;r++){let n=li[t[r]];e=e[n]()}return e}function Cu(e){let t=new X,r=t;for(let n=0;n<e.length;n++){let i=e[n];r=Eu(r,i)}return t}function qu(e,t,r){if(r&&(t=t.$clone()),!e.$is_root())if(e.$is_lonely()){let n=e.$parent();e.$disconn(),n.$append_child(t)}else if(e.$is_lstch()){let n=e.$lsib();e.$disconn(),n.$add_rsib(t)}else{let n=e.$rsib();e.$disconn(),n.$add_lsib(t)}return t}var O=class{#t=null;#e={with_id:!1,with_et:!1};constructor(t=!1,r=!1){$u(this),this._fstch=null,this.#e.with_id=t,this.#e.with_et=r,t&&(this.$guid=Ke.gen_guid()),r&&(this.#t=new Wn)}get opt(){return this.#e}enable_et(){this.#t=new Wn}disable_et(){this.#t=null}get et(){return this.#t}regis_recv_from_handler(t){let r=function(n){t(n.data.src,n.data.msg)};this.et.addEventListener("$msg__",r)}send_to(t,r){t.et.dispatch("$msg__",{src:this,msg:r})}$is_inited(){return Zn(this)}$is_root(){return _s(this)}$is_fstch(){return Dc(this)}$is_lstch(){return Rc(this)}$is_leaf(){return Lc(this)}$is_lonely(){return Pc(this)}$fstch(){return this._fstch}$lstch(){return Bn(this)}$which_child(t){return Fn(t,this)}$some_children(...t){return Mn(this,...t)}$children(){return fs(this)}$children_count(){return Wc(this)}$rsib(){return this._rsib}$lsib(){return Bc(this)}$fstsib(t=!1){return Tt(this,t)}$lstsib(t=!1){return ei(this,t)}$psibs(){return gs(this)}$fsibs(){return ti(this)}$which_sib(t){return Fc(t,this)}$some_sibs(...t){return Mc(this,...t)}$sibseq(){return Yn(this)}$sibs(t=!1){return si(this,t)}$sibs_count(t=!1){return Yc(this,t)}$parent(){return hs(this)}$root(){return Hc(this)}$ances(t=!1){return kt(this,t)}$which_ance(t){return Uc(t,this)}$some_ances(...t){return Gc(this,...t)}$ances_count(t=!1){return Vc(this,t)}$prepend_child(t){return t=t===void 0?new O(this.#e.with_id,this.#e.with_et):t,ds(this,t)}$insert_child(t,r){return r=r===void 0?new O(this.#e.with_id,this.#e.with_et):r,Un(t,this,r)}$append_child(t){return t=t===void 0?new O(this.#e.with_id,this.#e.with_et):t,ps(this,t)}$clone(){if(_s(this)){let t=vt(this);return xt(t)}else{let t=Yn(this),r=hs(this);be(this);let n=vt(this),i=xt(n);return Un(t,r,this),i}}$append_children(t,r){let n=[];for(let i=0;i<t;i++){let l=r===void 0?new O(this.#e.with_id,this.#e.with_et):r.$clone();l=ps(this,l),n.push(l)}return n}$add_rsib(t){return t=t===void 0?new O(this.#e.with_id,this.#e.with_et):t,ri(this,t)}$add_lsib(t){return t=t===void 0?new O(this.#e.with_id,this.#e.with_et):t,lu(this,t)}$rsib_of_fst_ance_having_rsib(){return ou(this)}$sdfs_next(){return au(this)}$drmost_des(){return ni(this)}$sdfs_prev(){return cu(this)}$sdfs(){return ye(this)}$dlmost_des(){return uu(this)}$edfs_next(){return _u(this)}$lsib_of_fst_ance_having_lsib(){return fu(this)}$edfs_prev(){return hu(this)}$edfs(){return du(this)}$offset(){return su(this)}$sedfs_next(){return ii(this)}$sedfs_prev(t){return pu(this)}$sedfs(){return Gn(this)}$deses(t=!1){return Hn(this,t)}$lst_lyr_deses(){return ru(this)}$which_lyr_deses(t){return nu(t,this)}$some_lyrs_deses(...t){return iu(this,...t)}$count(t=!0){return Hn(this,t).length}$depth(t=!1){return kt(this,t).length}$height(){let t=this.$depth(),n=this.$sdfs().map(l=>l.$depth());return Math.max(...n)-t+1}$pbreadth(){return Zc(this)}$breadth(){return eu(this)}$width(){return tu(this)}$lyr(){return Qc(this)}$lcin(){return Jc(this)}$rcin(){return Kc(this)}$luncle(){return zc(this)}$runcle(){return Xc(this)}$sdfs_repr(t=vu,r=!1){let n=this.$root(),i=ye(n),a=ye(this).map((c,u)=>t(c,u,i)).join(`
3
+ `);if(console.log(a),r)return a}$sedfs_repr(t=ku,r=!1){let n=this.$root();oi(n);let o=Gn(this).map((a,c)=>t(a,c)).join(`
4
+ `);if(console.log(o),r)return o}$disconn(){return be(this)}$rm_fstch(){let t=this._fstch;return be(t)}$rm_lstch(){let t=Bn(this);return be(t)}$rm_which(t){let r=Fn(t,this);return be(r)}$rm_some_children(...t){return Mn(this,...t).map(n=>be(n))}$rm_all_children(){return fs(this).map(r=>be(r))}$dump(){if(this.$is_root())return vt(this);console.log("only root !!!")}$dump2file(t){if(this.$is_root()){let r=vt(this);Qn.wjson(t,r)}else console.log("only root !!!")}$sdfs2mat(){return zn(ye(this))}$nest_dict(t="_children"){let r=zn(ye(this));return yu(r,t)}$index(){return this.$sibseq()}$sdfs_index(){return this.$root().$sdfs().indexOf(this)}$sdfs_leafs(){return this.$root().$sdfs().filter(i=>i.$is_leaf())}$sdfs_nonleafs(){return this.$root().$sdfs().filter(i=>!i.$is_leaf())}$sdfs_leaf_index(){return this.$sdfs_leafs().indexOf(this)}$sdfs_nonleaf_index(){return this.$sdfs_nonleafs().indexOf(this)}$sdfs_next_action_for_srch(){return Su(this)}$sdfs_srch_action_list(){return Tu(this)}$get_node_with_action(t){let r=this;for(let n=0;n<t.length;n++)r=r[t[n]]();return r}$replace_with(t,r=!0){return qu(this,t,r)}[Symbol.iterator](){return this.$sdfs()[Symbol.iterator]()}get[Symbol.toStringTag](){return this.$guid?this.$guid.substr(0,8):"<empty>"}};Object.defineProperty(O,"name",{value:"\u200D"});function oi(e){let t=ye(e);return t.forEach((r,n)=>{r._id=n}),t}function Au(e){let t=new X;return t._id=e._id,t.$guid=e._guid,t}function Kn(e,t){for(;t._id!==e;)t=t._parent;return t}function Je(e,t){let r=ai(t);for(let n of r)e[n]=t[n];return e}function xt(e){let t=Ke.dict_keys(e)[0],r=me.get_root(e[t],e),n=Au(r);n=Je(n,r);let i=n,l=r,o=me.get_sdfs_next(l,e),a;for(;o!==null;)if(l._fstch===o._id)a=i.$prepend_child(),a._id=o._id,a.$guid=o._guid,a=Je(a,o),i=a,l=o,o=me.get_sdfs_next(l,e);else if(l._rsib===o._id)a=i.$add_rsib(),a._id=o._id,a.$guid=o._guid,a=Je(a,o),i=a,l=o,o=me.get_sdfs_next(l,e);else if(o._parent!==null&&o._parent!==void 0){let c=o._parent;i=Kn(c,i),a=i.$append_child(),a._id=o._id,a.$guid=o._guid,a=Je(a,o),i=a,l=o,o=me.get_sdfs_next(l,e)}else if(o._parent===void 0){let u=me.get_parent(o,e)._id;i=Kn(u,i),a=i.$append_child(),a._id=o._id,a.$guid=o._guid,a=Je(a,o),i=a,l=o,o=me.get_sdfs_next(l,e)}else console.log("Impossible",i,l,o);return n}function $t(e,t){return e[t]===null?null:e[t]===void 0?void 0:e[t]._id}function ai(e){return Ke.dict_keys(e).filter(n=>!Oc.includes(n))}function Nu(e,t){let r=ai(e);for(let n of r)t[n]=e[n];return t}function vt(e){let t=oi(e),r=e._id,n={};return t.forEach((i,l)=>{let o={};o._tree=r,o._fstch=$t(i,"_fstch"),o._lsib=$t(i,"_lsib"),o._rsib=$t(i,"_rsib"),o._parent=$t(i,"_parent"),o._id=i._id,o._guid=i.$guid,o=Nu(i,o),n[i._id]=o}),n}var X=class extends O{constructor(t=!0,r=!0){super(t,r),this._fstch=null,this._lsib=null,this._rsib=null,this._parent=null,this._tree=this}$is_parent_of(t){return t.$parent()===this}$is_root_of(t){return t.$root()===this}$is_descendant_of(t){return t.$deses(!1).indexOf(this)>=0}$is_inclusive_descendant_of(t){return t.$deses(!0).indexOf(this)>=0}$is_ancestor_of(t){return t.$ances(!1).indexOf(this)>=0}$is_inclusive_ancestor_of(t){return t.$ances(!0).indexOf(this)>=0}$is_sibling_of(t){return t.$sibs(!1).indexOf(this)>=0}$is_inclusive_siblings_of(t){return t.$sibs(!0).indexOf(this)>=0}$is_preceding_of(t){let r=t.$sdfs(),n=r.indexOf(t),i=r.indexof(this);return i>=0&&i<n}$is_following_of(t){let r=t.$sdfs(),n=r.indexOf(t);return r.indexof(this)>n}$is_first_child_of(t){return this===t.$fstch()}$is_child_of(t){return t.$children().indexOf(this)>=0}$is_last_child_of(t){return this===t.$lstch()}$is_previous_sibling_of(t){return this===t.$lsib()}$is_next_sibling_of(t){return this===t.$rsib()}};Object.defineProperty(X,"name",{value:"\u200D"});function ci(e){if(typeof e=="string"){let t=Qn.rjson(e);return xt(t)}else return typeof e=="object"?xt(e):new X}function Iu(e,t="_children"){return wu(e,t)}function ju(e){let t=e.$dump();return ci(ndict)}function ms(e,t,...r){let n=t(e,...r);return n=new Buffer.from(n).toString("base64"),n}function ui(e){let t=e.$ances(!0).map(r=>r.$children().length);return t=t.join("-"),t}function _i(e){return e.$pbreadth()+"-"+e.$breadth()+"-"+e.$depth()}function fi(e,t,...r){let n=ui(e);return t&&(out=ms(e,t,...r),n=n+"@"+out),n}function hi(e,t,...r){let n=_i(e);return t&&(out=ms(e,t,...r),n=n+"@"+out),n}function bs(e,t,r,n,i,...l){let o=r.$sdfs(),a=n.$sdfs();if(o.length!==a.length)return!1;{let c=o.map(_=>t(_,i,...l)),u=a.map(_=>t(_,i,...l));e&&(c.sort(),u.sort());for(let _=0;_<c.length;_++){let f=c[_],d=u[_];if(f!==d)return!1}}return!0}function Ou(e,t,r,...n){return bs(!1,hi,e,t,r,...n)}function Du(e,t,r,...n){return bs(!0,fi,e,t,r,...n)}di.exports={SDFS_NEXT_BUILD_ACTION_DICT:li,build_from_srch_action_list:Cu,SDFS_NEXT_SRCH_ACTIONS:xu,RESERVED_EVENT_TYPES:["$msg__"],Node:O,Tree:X,Root:X,load:ci,load_from_nest_dict:Iu,clone:ju,get_cu_sign:ms,get_internal_sign_ignore_order:ui,get_internal_sign_keep_order:_i,get_sign_keep_order:hi,struct_eq:bs,struct_eq_keep_order:Ou,get_sign_ignore_order:fi,struct_eq_ignore_order:Du}});var ys=h((Dd,gi)=>{var Ru=pi(),Lu=us(),Pu=Jt();gi.exports={ndfunc:Lu,ndcls:Ru,ndutil:Pu}});var qt=h((Hd,bi)=>{var q=S(),Wu=ys(),{Root:Bu}=ys().ndcls,{TYPE_DICT:Rd,isNode:Ld,empty:m,is_bigint_str:Pd,is_jsint_str:Wd,NUM_TYPE_DICT:Bd,parse_abnormal_num:Fd,parse_int:Md,parse_float:Yd,parse_num:Fu,to_str:Ct}=S(),D=class extends Bu{constructor(t=m){super(!1,!1),this.key=t,this.value=m,this.type=m,this.chtype=m,this.hashes=new Set,this.kcmt=[],this.bvcmt=[],this.avcmt=[]}kto_str(){return this.key===m?m:JSON.stringify(this.key)}is_undefined(){return this.type===q.TYPE_DICT.UndefinedLiteral}is_null(){return this.type===q.TYPE_DICT.NullLiteral}is_boolean(){return this.type>=2&&this.type<=4}is_false(){return this.type===3}is_true(){return this.type===4}is_numerical(){return nd.type>=5&&nd.type<=11}is_int(){return this.type===6}is_float(){return this.type===7}is_bigint(){return this.type===8}is_infi(){return this.type===9||this.type===10}is_pos_infi(){return this.type===9}is_neg_infi(){return this.type===10}is_nan(){return this.type===11}is_str(){return this.type===12}is_ary(){return this.type===13}is_ele(){return this.chtype===14}is_dict(){return this.type===15}is_prop(){return this.chtype===16}is_ref(){return this.type===17}is_leaf(){return!this.is_ary()&&!this.is_dict()}is_cmt(){return this.is_lcmt()||this.is_blcmt()}is_lcmt(){return this.type>=18&&this.type<=22}is_blcmt(){return this.type>=23&&this.type<=27}is_ttcmt(){return this.type===19||this.type===24}is_kcmt(){return this.type===20||this.type===25}is_bvcmt(){return this.type===21||this.type===26}is_avcmt(){return this.type===22||this.type===27}is_prim(){return this.is_leaf()&&!is_cmt()}},ws=class extends D{constructor(t=m){super(t),this.value=void 0,this.type=q.TYPE_DICT.UndefinedLiteral}vto_rawstr(){return Ct(this.value)}},$s=class extends D{constructor(t=m){super(t),this.value=null,this.type=q.TYPE_DICT.NullLiteral}vto_rawstr(){return Ct(this.value)}},vs=class extends D{constructor(t,r=m){super(r),t==="true"&&(this.value=!0,this.type=q.TYPE_DICT.BooleanLiteral.TrueLiteral),t==="false"&&(this.value=!1,this.type=q.TYPE_DICT.BooleanLiteral.FalseLiteral)}vto_rawstr(){return Ct(this.value)}},ks=class extends D{constructor(t,r=m){if(super(r),typeof t=="string"){let n=Fu(t,!0);this.value=n.value,this.type=n.type}else this.value=t.value,this.type=t.type}vto_rawstr(){let t=Ct(this.value);return this.type===q.TYPE_DICT.NumericLiteral.Float&&!t.includes(".")&&(t=t+"."),t}};function Qe(e){return e=JSON.stringify(e),e.substr(1,e.length-2)}var xs=class extends D{constructor(t,r=m){super(r),this.value=t,this.type=q.TYPE_DICT.StringLiteral}vto_rawstr(){return Qe(this.value)}};function Mu(e){e instanceof Et?e.type=q.TYPE_DICT.CommentLine.tt:e.type=q.TYPE_DICT.CommentBlock.tt}function Yu(e,t){return{lsib:e.$lsib(),data:t}}function mi(e,t){Mu(t);let r=Yu(e,t);return e.ttcmt.push(r),r}var Ss=class extends D{constructor(t=m){super(t),this.value=[],this.type=q.TYPE_DICT.ArrayExpression._self,this.open=m,this.close=m,this.ttcmt=[]}is_inited(){return this.open===m&&this.close===m}is_opened(){return this.open!==m&&this.close===m}is_closed(){return this.open!==m&&this.close!==m}append_child(t){return t.chtype=q.TYPE_DICT.ArrayExpression.element,t.is_ref()?this.value.push(t.value.value):this.value.push(t.value),this.$append_child(t)}append_ttcmt(t){return mi(this,t)}},Ts=class extends D{constructor(t=m){super(t),this.value={},this.type=q.TYPE_DICT.ObjectExpression._self,this.open=m,this.close=m,this.ttcmt=[]}is_inited(){return this.open===m&&this.close===m}is_opened(){return this.open!==m&&this.close===m}is_closed(){return this.open!==m&&this.close!==m}append_child(t){return t.chtype=q.TYPE_DICT.ObjectExpression.property,t.is_ref()?this.value[t.key]=t.value.value:this.value[t.key]=t.value,this.$append_child(t)}append_ttcmt(t){return mi(this,t)}},Es=class extends D{constructor(t,r=m){super(r),this.value=t,this.type=q.TYPE_DICT._Ref}vto_rawstr(){if(this.value.is_leaf())return this.value.vto_rawstr();if(this.value.key!==m)return'&"'+Qe(this.value.key)+'"';for(let t of this.value.hashes)return'&"'+Qe(t)+'"'}},Et=class extends D{constructor(t){super(),this.value=t,this.type=q.TYPE_DICT.CommentLine._self}vto_rawstr(t=`
5
+ `){return"//"+Qe(this.value)+t}},Cs=class extends D{constructor(t){super(),this.value=t,this.type=q.TYPE_DICT.CommentBlock._self}vto_rawstr(){return"/*"+Qe(this.value)+"*/"}};bi.exports={UndefinedLiteral:ws,NullLiteral:$s,BooleanLiteral:vs,NumericLiteral:ks,StringLiteral:xs,ArrayExpression:Ss,ObjectExpression:Ts,_Ref:Es,CommentLine:Et,CommentBlock:Cs,_ndtree:Wu}});var Si=h((Ud,xi)=>{var{empty:Ns}=S(),{UndefinedLiteral:yi,NullLiteral:wi,BooleanLiteral:$i,NumericLiteral:vi,StringLiteral:qs,ArrayExpression:Hu,ObjectExpression:Uu,CommentLine:Gu,CommentBlock:Vu,_Ref:As}=qt();function zu(e,t){let r=Ns,n=e;for(;n!==null;){if(n.key===t){r=n;break}else if(n.hashes.has(t)){r=n;break}else if(n.$sibseq().toString()===t){r=n;break}n=n.$sdfs_prev()}return r!==null?r:Ns}function ki(e,t){return e instanceof yi?new yi("undefined",t):e instanceof wi?new wi("null",t):e instanceof $i?new $i(e.vto_rawstr(),t):e instanceof vi?new vi(e.vto_rawstr(),t):e instanceof qs?new qs(e.value,t):e instanceof Gu||e instanceof Vu?new qs(e.value,t):e instanceof Hu?new As(e,t):e instanceof Uu?new As(e,t):e instanceof As?(e=e.value,ki(e,t)):Ns}xi.exports={find_refnd_with_hash:zu,clone:ki}});var Li=h((Gd,we)=>{var Xu=Array,Ju=S(),{empty:$,parse0:Ku}=S(),et=class extends Xu{get lst(){return this[this.length-1]}set lst(t){this[this.length-1]=t}get top(){return this[this.length-1]}set top(t){this[this.length-1]=t}get fst(){return this[0]}set fst(t){this[0]=t}get bot(){return this[0]}set bot(t){this[0]=t}*gen_from_lst(){for(let t=this.length-1;t>-1;t--)yield this[t]}};function*Qu(e){for(let t of e)yield t;e=null}function*Zu(e,t){yield*t,yield*e}var tt=Xt(),Is=xe(),Ae=nn(),{UndefinedLiteral:e_,NullLiteral:t_,BooleanLiteral:Ti,NumericLiteral:s_,StringLiteral:Ei,CommentLine:Ze,CommentBlock:r_,ArrayExpression:js,ObjectExpression:n_}=qt(),U=I(),Ci=U.gtv,le=U.STATE_DICT,Os=U.LEFTED_TYPE,qe=U.AVND_CACHE_STATE_DICT,H=S(),w=te(),qi=Si();function*Di(e){for(;e.length>0;)yield e.pop()}function Ai(e){let t;return e.__is_sync_mode()?t=tt.from_generator(e.g,e.ch_cache.curr):t=tt.from_generator(Di(e.unshift_cache),e.ch_cache.curr),t}function Ni(e,t,r){e.lefted.type=Os.quote,e.lefted.data={rslt:t.rslt,lefted:t.ch,state:t.state,quote:r},e.state=U.get_main_eofv_with_code(e.state)}function Ri(e,t,r){e.lefted.type=r,e.lefted.data={rslt:t.rslt,lefted:t.ch,state:t.state}}function i_(e,t,r){return Ri(e,t,r),e.state=U.get_lcmt_eofv_with_code(e.state),e}function l_(e,t,r){return Ri(e,t,r),e.state=U.get_blkcmt_eofv_with_code(e.state),e}function o_(e,t){let r;return e.__is_sync_mode()?r=t(e.g,e.ch_cache.curr):r=t(Di(e.unshift_cache),e.ch_cache.curr),r}function Ii(e,t,r,n){let i=o_(e,r);return i.state!==Ae.STATE_DICT.succ?((t===Ze?i_:l_)(e,i,n),$):new t(i.rslt)}function ji(e,t){let r=new t(e.str_cache.k);return e.$set_avnd_cache(r),e.$mv_key_to_nd(r),e.$mv_kcmt_to_kcmt(),e.$mv_bvcmt_to_bvcmt(),r.open=e.ch_cache.curr,e.stack.lst.append_child(r),e.stack.push(r),t===js?e.state=le.bv:e.state=le.bk,e}var Ds=Symbol("root_lblk_ch"),Oi=Symbol("root_rblk_ch"),Ne=class{#t=Ci(le.bv);#e=new et;constructor(t,r=" "){if(r!==$){let i=Qu(r);t=Zu(t,i)}this.g=t,this.lefted={type:$,data:$},this.ch_cache={tmp:$,curr:$},this.str_cache={k:$,v:$,maybe_vquote:$},this.cmt_cache={kcmt:[],bvcmt:[],avcmt:[]};let n=new js;this.stack.push(n),n.open=Ds,this.avnd_cache={state:qe.handling,data:n},this.unshift_cache=new et,this.mode="sync"}__use_sync_mode(){this.mode="sync"}__use_async_mode(){this.mode="async"}__is_sync_mode(){return this.mode==="sync"}__is_async_mode(){return this.mode==="async"}__unshift_g(t){t=t??this.ch_cache.curr;for(let r of t)this.unshift_cache.unshift(r)}$has_yield_sign(){return this.avnd_cache.state===qe.handled}$set_yield_sign(){this.avnd_cache.state=qe.handled}$clear_yield_sign(){this.avnd_cache.state=qe.handling}get state(){return this.#t}set state(t){this.#t=Ci(t)}get stack(){return this.#e}$next_ch(){return this.unshift_cache.length>0?this.ch_cache.curr=this.unshift_cache.pop():this.ch_cache.curr=this.g.next().value,this.ch_cache.curr}$is_currch_eof(){return this.ch_cache.curr===void 0}$handle_main_eof(){return this.state=U.get_main_eofv_with_code(this.state),this}$is_currch_comma(){return w.commas.has(this.ch_cache.curr)}$is_currch_colon(){return w.colons.has(this.ch_cache.curr)}$is_currch_ws(){return Is.is_ws(this.ch_cache.curr)}$is_currch_quote(){return w.quotes.has(this.ch_cache.curr)}$is_currch_slash(){return this.ch_cache.curr===w.slash}$is_currch_asterisk(){return this.ch_cache.curr===w.asterisk}$is_currch_ary_lblk(){return w.array_blks.lhas(this.ch_cache.curr)}$is_currch_obj_lblk(){return w.obj_blks.lhas(this.ch_cache.curr)}$is_currch_lblk(){return this.$is_currch_ary_lblk()||this.$is_currch_obj_lblk()}$is_currch_ary_rblk(){return w.array_blks.rhas(this.ch_cache.curr)}$is_currch_obj_rblk(){return w.obj_blks.rhas(this.ch_cache.curr)}$is_currch_rblk(){return this.$is_currch_ary_rblk()||this.$is_currch_obj_rblk()}$is_currch_hash(){return w.hash===this.ch_cache.curr}$is_currch_ref(){return w.ref===this.ch_cache.curr}$mv_avcmt_to_avcmt(){let t=this.avnd_cache.data;t.avcmt=this.cmt_cache.avcmt,this.cmt_cache.avcmt=[]}$change_state_when_end_av(t=$,r=$){return this.stack.lst.is_ary()?t===$?this.state=le.bv:(this.state=le.v,this.str_cache.v=t,r===$||(this.str_cache.maybe_vquote=r)):t===$?this.state=le.bk:(this.state=le.k,this.str_cache.k=t),this.state}$vcache_to_nd(){let t=this.str_cache.v,r;if(this.str_cache.maybe_vquote===$){let n=Ku(t,{only_value:!1,with_value:!0,with_type:!0,unknown_as_string:!0});n.type===H.TYPE_DICT.UndefinedLiteral?r=new e_(this.str_cache.k):n.type===H.TYPE_DICT.NullLiteral?r=new t_(this.str_cache.k):n.type===H.TYPE_DICT.BooleanLiteral.TrueLiteral?r=new Ti("true",this.str_cache.k):n.type===H.TYPE_DICT.BooleanLiteral.FalseLiteral?r=new Ti("false",this.str_cache.k):n.type===H.TYPE_DICT.StringLiteral?r=new Ei(n.value,this.str_cache.k):r=new s_(n,this.str_cache.k)}else r=new Ei(t,this.str_cache.k);return this.str_cache.v=$,this.str_cache.maybe_vquote=$,r}$mv_kcmt_to_kcmt(){let t=this.avnd_cache.data;t.kcmt=this.cmt_cache.kcmt,this.cmt_cache.kcmt=[]}$mv_bvcmt_to_bvcmt(){let t=this.avnd_cache.data;t.bvcmt=this.cmt_cache.bvcmt,this.cmt_cache.bvcmt=[]}$mv_key_to_nd(){let t=this.avnd_cache.data;return t.key=this.str_cache.k,this.str_cache.k=$,t.key}$set_avnd_cache(t,r=qe.handling){return this.avnd_cache.data=t,this.avnd_cache.state=r,this.avnd_cache}$setup_leafnd(){let t=this.$vcache_to_nd();this.$set_avnd_cache(t,qe.handling),this.$mv_key_to_nd(),this.$mv_kcmt_to_kcmt(),this.$mv_bvcmt_to_bvcmt(),this.$mv_avcmt_to_avcmt(),this.stack.lst.append_child(t)}$handle_quote(t){let r=Ai(this);return r.state!==tt.STATE_DICT.succ?(Ni(this,r,t),$):r.rslt}$abandon_key_when_end_bv(){this.cmt_cache.kcmt=[],this.cmt_cache.bvcmt=[],this.str_cache.k=$}$refresh_key(t=$){t===$?this.str_cache.k=this.ch_cache.curr:this.str_cache.k=t,this.cmt_cache.kcmt=[]}$handle_lcmt(){return Ii(this,Ze,Ae.lc_from_generator,Os.lcmt)}$handle_blkcmt(){return Ii(this,r_,Ae.blk_from_generator,Os.blkcmt)}$push_kcmt(t){t.type=Ae instanceof Ze?H.TYPE_DICT.CommentLine.k:H.TYPE_DICT.CommentBlock.k,this.cmt_cache.kcmt.push(t)}$push_bvcmt(t){let r=t instanceof Ze?"CommentLine":"CommentBlock";t.type=H.TYPE_DICT[r].bv,this.cmt_cache.bvcmt.push(t)}$push_avcmt(t){t.type=Ae instanceof Ze?H.TYPE_DICT.CommentLine.k:H.TYPE_DICT.CommentBlock.k,this.cmt_cache.avcmt.push(t)}$mv_avcmt_to_ttcmt(t){t=t??this.avnd_cache.data.$parent();for(let r of this.cmt_cache.avcmt)t.$append_child(r);this.cmt_cache.avcmt=[]}$open_nonleaf_nd(){if(w.array_blks.lhas(this.ch_cache.curr))return ji(this,js);if(w.obj_blks.lhas(this.ch_cache.curr))return ji(this,n_)}$is_rblk_match(){let t=this.stack.lst,r=t.is_ary()?"array_blks":"obj_blks";return w[r].getl(this.ch_cache.curr)===t.open}$close_nonleaf_nd(){let t=this.stack.lst;t.close=this.ch_cache.curr,this.$set_avnd_cache(t),this.stack.pop(),this.state=le.av}$get_hash_or_ref(t="#"){let r=$,n=this.$next_ch(),i="";for(;!Is.is_ws(n)&&!w.commas.has(n)&&!w.colons.has(n)&&!w.array_blks.has(n)&&!w.obj_blks.has(n)&&n!==w.hash&&n!==w.ref&&n!==w.slash;)if(w.quotes.has(n)){let l=Ai(this);if(l.state!==tt.STATE_DICT.succ)return Ni(this,l,this.ch_cache.curr),t===w.hash?this.state=U.get_hash_quote_eofv_with_code(this.state):this.state=U.get_ref_quote_eofv_with_code(this.state),r;i=i+l.rslt,n=this.$next_ch()}else{if(n===void 0)return $handle_main_eof(),r;i=i+n,n=this.$next_ch()}return this.__unshift_g(n),r=i,r}$is_hash_of_pnd(){return this.stack.lst.$children().length===0}$find_ref(t){let r=this.stack.lst,n=r.$lstch();return n===null&&(n=r),qi.find_refnd_with_hash(n,t)}$add_ref_to_parent(t){let r=this.stack.lst,n=qi.clone(t,this.str_cache.k);this.$set_avnd_cache(n),this.$mv_key_to_nd(n),this.$mv_kcmt_to_kcmt(),this.$mv_bvcmt_to_bvcmt(),r.append_child(n)}};Ne[Ds]=Ds;Ne[Oi]=Oi;Ne.MODES=["sync","async"];we.exports=Ne;we.exports.Stack=et;we.exports._type_util=Ju;we.exports._esc=tt;we.exports._cmt=Ae;we.exports._ws=Is});var Fi=h((Vd,Bi)=>{var{empty:Pi}=S(),Wi=I(),Ie=Wi.gtv,G=Wi.STATE_DICT;function a_(e){let t=e.state;return t===Ie(G.bk)||(t===Ie(G.k)||t===Ie(G.ak)?(e.str_cache.k=Pi,e.state=G.bk):t===Ie(G.bv)?(e.$abandon_key_when_end_bv(),e.stack.lst.is_ary()?e.state=G.bv:e.state=G.bk):t===Ie(G.v)?(e.$setup_leafnd(),e.$change_state_when_end_av()):t===Ie(G.av)&&(e.$mv_avcmt_to_avcmt(),e.$change_state_when_end_av())),e}Bi.exports=a_});var Hi=h((Xd,Yi)=>{var{empty:zd}=S(),Mi=I(),je=Mi.gtv,oe=Mi.STATE_DICT;function c_(e){let t=e.state;return t===je(oe.bk)||(t===je(oe.k)||t===je(oe.ak)?e.state=oe.bv:t===je(oe.bv)||(t===je(oe.v)?(e.$setup_leafnd(),e.$change_state_when_end_av()):t===je(oe.av)&&(e.$mv_avcmt_to_avcmt(),e.$change_state_when_end_av()))),e}Yi.exports=c_});var Rs=h((Kd,Gi)=>{var{empty:Jd}=S(),Ui=I(),Oe=Ui.gtv,ae=Ui.STATE_DICT;function u_(e){let t=e.state;return t===Oe(ae.bk)||(t===Oe(ae.k)?e.state=ae.ak:t===Oe(ae.ak)||t===Oe(ae.bv)||(t===Oe(ae.v)?(e.$setup_leafnd(),e.state=ae.av):Oe(ae.av))),e}Gi.exports=u_});var Ji=h((Qd,Xi)=>{var{empty:Vi}=S(),zi=I(),De=zi.gtv,J=zi.STATE_DICT;function __(e,t){let r=e.state,n=e.$handle_quote(t);return n===Vi||(r===De(J.bk)?(e.str_cache.k=n,e.state=J.k):r===De(J.k)?e.str_cache.k=e.str_cache.k+n:r===De(J.ak)?(e.$refresh_key(n),e.state=J.k):r===De(J.bv)?(e.str_cache.maybe_vquote=t,e.str_cache.v=n,e.state=J.v):r===De(J.v)?(e.str_cache.v=e.str_cache.v+n,e.str_cache.maybe_vquote=Vi):r===De(J.av)&&(e.$mv_avcmt_to_avcmt(),e.$change_state_when_end_av(n,t))),e}Xi.exports=__});var el=h((Zd,Zi)=>{var{empty:Ki}=S(),Ls=I(),R=Ls.gtv,E=Ls.STATE_DICT,f_=Ls.LEFTED_TYPE,$e=te();function Qi(e,t){let r=e.state,n=e[t]();if(n!==Ki){let i=e.stack.lst;if(r===R(E.bk))i.append_ttcmt(n);else if(r===R(E.k))e.$push_kcmt(n),e.state=E.ak;else if(r===R(E.ak))e.$push_kcmt(n);else if(r===R(E.bv))i.is_ary()?i.append_ttcmt(n):i.is_dict()&&e.$push_bvcmt(n);else if(r===R(E.v))e.$setup_leafnd(),e.state=E.av;else if(r===R(E.av)){let l=e.stack.lst;l.is_ary()?(l.append_ttcmt(n),e.state=E.bv):l.is_dict()&&e.$push_avcmt(n)}}return e}function h_(e){return Qi(e,"$handle_lcmt")}function d_(e){return Qi(e,"$handle_blkcmt")}function p_(e){let t=e.state;t===R(E.bk)?(e.__unshift_g(e.ch_cache.curr),e.str_cache.k=$e.slash,e.state=E.k):t===R(E.k)?(e.__unshift_g(e.ch_cache.curr),e.str_cache.k=e.str_cache.k+$e.slash):t===R(E.ak)?(e.__unshift_g(e.ch_cache.curr),e.$refresh_key($e.slash),e.state=E.k):t===R(E.bv)?(e.__unshift_g(e.ch_cache.curr),e.str_cache.v=$e.slash,e.state=E.v):t===R(E.v)?(e.__unshift_g(e.ch_cache.curr),e.str_cache.v=e.str_cache.v+$e.slash,e.str_cache.maybe_vquote=Ki):t===R(E.av)&&(e.$mv_avcmt_to_avcmt(),e.$change_state_when_end_av($e.slash))}function g_(e){let t=e.state,r=e.$next_ch();return e.$is_currch_eof()?(e.lefted.data=$e.slash,e.lefted.type=f_.backslash,e.$handle_main_eof()):e.$is_currch_slash()?h_(e):e.$is_currch_asterisk()?d_(e):p_(e),e}Zi.exports=g_});var rl=h((tp,sl)=>{var{empty:ep}=S(),tl=I(),Re=tl.gtv,ce=tl.STATE_DICT;function m_(e){let t=e.state;return t===Re(ce.bk)?(e.str_cache.k=e.ch_cache.curr,e.state=ce.k):t===Re(ce.k)?e.str_cache.k=e.str_cache.k+e.ch_cache.curr:t===Re(ce.ak)?(e.$refresh_key(),e.state=ce.k):t===Re(ce.bv)?e.$open_nonleaf_nd():t===Re(ce.v)?(e.$setup_leafnd(),e.$change_state_when_end_av(),e.__unshift_g(e.ch_cache.curr)):t===Re(ce.av)&&(e.$mv_avcmt_to_avcmt(),e.$change_state_when_end_av(),e.__unshift_g(e.ch_cache.curr)),e}sl.exports=m_});var ol=h((sp,ll)=>{var{empty:nl}=S(),il=I(),Le=il.gtv,ve=il.STATE_DICT,b_=Rs();function y_(e){let t=e.state;return t===Le(ve.bk)?e.$close_nonleaf_nd():t===Le(ve.k)?(e.str_cache.k=nl,e.$close_nonleaf_nd()):t===Le(ve.ak)?(e.$refresh_key(),e.str_cache.k=nl,e.$close_nonleaf_nd()):t===Le(ve.bv)?(e.$abandon_key_when_end_bv(),e.$close_nonleaf_nd()):t===Le(ve.v)?(e.$setup_leafnd(),e.state=ve.av,e.__unshift_g(e.ch_cache.curr)):t===Le(ve.av)&&(e.$has_yield_sign()?(e.$clear_yield_sign(),e.$close_nonleaf_nd()):(e.$mv_avcmt_to_avcmt(),e.$set_yield_sign(),e.__unshift_g(e.ch_cache.curr))),e}function w_(e){return e.$is_rblk_match()?y_(e):b_(e),e}ll.exports=w_});var _l=h((rp,ul)=>{var{empty:$_}=S(),cl=I(),Pe=cl.gtv,ue=cl.STATE_DICT,v_=te(),{CommentLine:al}=qt();function k_(e){let t=e.state,r=e.$get_hash_or_ref(v_.hash);if(r!==$_){let n=e.stack.lst;if(t===Pe(ue.bk))e.$is_hash_of_pnd()&&n.hashes.add(r);else if(t===Pe(ue.k)){let i=new al(r);e.$push_kcmt(i),e.state=ue.ak}else if(t===Pe(ue.ak)){let i=new al(r);e.$push_kcmt(i)}else t===Pe(ue.bv)?e.$is_hash_of_pnd()&&n.is_ary()&&n.hashes.add(r):t===Pe(ue.v)?(e.$setup_leafnd(),e.avnd_cache.data.hashes.add(r),e.state=ue.av):t===Pe(ue.av)&&e.avnd_cache.data.hashes.add(r)}return e}ul.exports=k_});var dl=h((np,hl)=>{var{empty:Ps}=S(),fl=I(),We=fl.gtv,j=fl.STATE_DICT,x_=te();function S_(e){let t=e.state,r=e.$get_hash_or_ref(x_.ref);if(r!==Ps){let n=e.$find_ref(r);if(n!==Ps){let i=e.stack.lst;t===We(j.bk)||t===We(j.k)||t===We(j.ak)?(e.$refresh_key(n.vto_rawstr()),e.state=j.ak):t===We(j.bv)?(e.$add_ref_to_parent(n),e.state=j.av):t===We(j.v)?(e.str_cache.maybe_vquote=Ps,e.$setup_leafnd(),e.state=j.av):t===We(j.av)&&(e.$has_yield_sign()?(e.$clear_yield_sign(),i.is_ary()?(e.$add_ref_to_parent(n),e.state=j.av):i.is_dict()&&(e.str_cache.k=n.vto_rawstr(),e.state=j.ak)):(e.$mv_avcmt_to_avcmt(),e.$set_yield_sign()))}}return e}hl.exports=S_});var ml=h((ip,gl)=>{var{empty:T_}=S(),pl=I(),Be=pl.gtv,K=pl.STATE_DICT;function E_(e){let t=e.state;return t===Be(K.bk)?(e.str_cache.k=e.ch_cache.curr,e.state=K.k):t===Be(K.k)?e.str_cache.k=e.str_cache.k+e.ch_cache.curr:t===Be(K.ak)?(e.$refresh_key(),e.state=K.k):t===Be(K.bv)?(e.str_cache.v=e.ch_cache.curr,e.state=K.v):t===Be(K.v)?(e.str_cache.v=e.str_cache.v+e.ch_cache.curr,e.str_cache.maybe_vquote=T_):t===Be(K.av)&&(e.$mv_avcmt_to_avcmt(),e.$change_state_when_end_av(),e.__unshift_g(e.ch_cache.curr)),e}gl.exports=E_});var vl=h((lp,$l)=>{var{empty:C_}=S(),q_=Li(),A_=Fi(),N_=Hi(),I_=Rs(),j_=Ji(),O_=el(),D_=rl(),R_=ol(),L_=_l(),P_=dl(),W_=ml(),wl=I(),bl=wl.gtv,yl=wl.STATE_DICT,B_=te();function*F_(e,t=C_){let r=new q_(e,t);for(;;)if(r.$next_ch(),r.$is_currch_eof()){r.$handle_main_eof(),yield r;break}else r.$is_currch_comma()?(A_(r),yield r):r.$is_currch_colon()?(N_(r),yield r):r.$is_currch_ws()?(I_(r),yield r):r.$is_currch_quote()?(j_(r,r.ch_cache.curr),yield r):r.$is_currch_slash()?(O_(r),yield r):r.$is_currch_lblk()?(D_(r),yield r):r.$is_currch_rblk()?(R_(r),yield r):r.$is_currch_hash()?(L_(r),yield r):r.$is_currch_ref()?r.state===bl(yl.av)||r.state===bl(yl.v)?r.__unshift_g(B_.fst_comma+r.ch_cache.curr):(P_(r),yield r):(W_(r),yield r)}$l.exports=F_});var El=h((op,Tl)=>{var{sync_gen_from_str:Ws}=Dr(),{is_should_yield:Bs}=I(),P=te(),{is_nl:M_,is_ws:kl}=xe(),Fs=vl(),Y_={enable_ref:!1,encoding:"utf8"};function xl(e,t={enable_ref:!1}){let r=Fs(e),n=r.next().value,i=n.avnd_cache.data.$root(),l=n.state;for(let o of r){let a=o.state;if(Bs(n,l,a)&&!t.enable_ref){let c=n.avnd_cache.data;c.$disconn(),c=null}l=a}return i}function H_(e,t={enable_ref:!1}){let r=Ws(e);return xl(r,t)}function*Sl(e,t={enable_ref:!1,encoding:"utf8"}){let r=Fs(e),n=r.next().value,i=n.state;for(let l of r){let o=l.state;if(Bs(n,i,o)&&!t.enable_ref){let a=n.avnd_cache.data;yield a,a.$disconn(),a=null}i=o}}function*U_(e,t={enable_ref:!1,encoding:"utf8"}){let r=Ws(e);yield*Sl(r,t)}function G_(){return{d:void 0,ppg:void 0,prev:void 0,curr:void 0,can_send:!1,data:"",state:"init",label:"",pstate:""}}function V_(e){let t=Ws(""),r=Fs(t," "),n=r.next().value;n.__use_async_mode();let i=G_();return i.rt=n.avnd_cache.data,i.prev=n.state,i.ppg=r,i.d=n,i}function z_(e,t){return e.data=e.data+t,e.state==="init"?t===P.slash?e.state="slash":P.quotes.has(t)?(e.label=t,e.state="quote"):t===P.hash?e.state="hash":t===P.ref?e.state="ref":e.can_send=!0:e.state==="quote"?t==="\\"?(e.state="esc",e.pstate="quote"):t===e.label&&(e.pstate!==""?(e.state=e.pstate,e.pstate=""):e.can_send=!0):e.state==="slash"?t===P.slash?e.state="lcmt":t===P.asterisk?e.state="blkcmt":P.quotes.has(t)?(e.label=t,e.state="quote"):e.can_send=!0:e.state==="lcmt"?t==="\\"?(e.state="esc",e.pstate="lcmt"):M_(t)&&(e.can_send=!0):e.state==="blkcmt"?t==="\\"?(e.state="esc",e.pstate="blkcmt"):t===P.asterisk&&(e.state="asterisk"):e.state==="asterisk"?t==="\\"?(e.state="esc",e.pstate="blkcmt"):t===P.slash&&(e.can_send=!0):e.state==="hash"?kl(t)?e.can_send=!0:P.quotes.has(t)&&(e.state="quote",e.pstate="hash"):e.state==="ref"?kl(t)?e.can_send=!0:P.quotes.has(t)&&(e.state="quote",e.pstate="ref"):e.state==="esc"?(e.state=e.pstate,e.pstate=""):console.log("impossible"),e}async function*X_(e,t){for(let r of e)z_(t,r),t.can_send&&(yield t,t.data="",t.state="init",t.label="",t.can_send=!1)}async function*J_(e){let t=V_(e);for await(let r of e)yield*X_(r,t);yield t}function K_(e){let t=e.d.unshift_cache;t.forEach(r=>{e.prev=e.curr,e.d=e.ppg.next().value,e.curr=e.d.state}),t=null}async function*Q_(e,t){if(e.d.__unshift_g(e.data),e.prev=e.curr,e.d=e.ppg.next().value,e.curr=e.d.state,Bs(e.d,e.prev,e.curr)&&!t.enable_ref){let r=e.d.avnd_cache.data;yield r,r.$disconn(),r=null}}async function*Z_(e,t={enable_ref:!1,encoding:"utf8"}){e=J_(e);let r;for await(r of e)K_(r),yield*Q_(r,t);yield r.rt}Tl.exports={OPT_DICT:Y_,parse_from_generator:xl,parse_from_str:H_,gen_from_generator:Sl,gen_from_str:U_,agen_from_generator:Z_}});var nt=h((ap,rt)=>{var{empty:ef}=S(),tf=te(),st=El();function Ms(e){return e.length===1?e[0]:e}function sf(){for(let e in st){let t;e.startsWith("gen_")?t=function*(r,n={enable_ref:!1,encoding:"utf8"}){let i=st[e](r,n);for(let l of i)l=Ms(l),yield[l.key,l.value]}:e.startsWith("agen_")?t=async function*(r,n={enable_ref:!1,encoding:"utf8"}){let i=st[e](r,n);for await(let l of i)l=Ms(l),yield[l.key,l.value]}:t=function(r,n={enable_ref:!1,encoding:"utf8"}){let i=st[e](r,n).value;return Ms(i)},Object.defineProperty(t,"name",{value:e}),rt.exports[e]=t}rt.exports.OPT_DICT=st.OPT_DICT}sf();rt.exports.CFG=tf;rt.exports.empty=ef});var Nl=h((cp,Al)=>{var Ys=(e,t)=>{let r=btoa(unescape(encodeURIComponent(t.trim())));return`data:${e};base64,${r}`},At=(e,t={})=>{let r={...t};return r.src===void 0&&e.trim()!==""&&(r.src=Ys("text/javascript",e)),`<script${Object.entries(r).map(([i,l])=>` ${i}=${JSON.stringify(l)}`).join("")}><\/script>`},Cl=(e,t={})=>{let r={...t,rel:"stylesheet"};return r.href===void 0&&e.trim()!==""&&(r.href=Ys("text/css",e)),`<link${Object.entries(r).map(([i,l])=>` ${i}=${JSON.stringify(l)}`).join("")}>`},ql=e=>e.replace(/[&<>"']/g,t=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"})[t]),rf=(e,t=(r,n,i,l,o,a)=>!0)=>{let r=[],n=(i,l,o,a)=>{let[c,u,_]=i;t(i,c,l,o,i,a)&&r.push({tag:c,attrs:u,depth:o,node:i}),Array.isArray(_)&&_.forEach((f,d)=>{n(f,d,o+1,i)})};return n(e,0,0,null),r},nf=e=>{let t=[],r=(n,i)=>{if(!Array.isArray(n))return;let[l,o,a]=n;if(o&&Object.keys(o).length>0&&t.push({tag:l,attrs:{...o},depth:i}),Array.isArray(a))for(let c=0;c<a.length;c++)r(a[c],i+1)};return r(e,0),t},lf=e=>{let t=[],r=n=>{let[i,l,o]=n;if(l&&l.id){let a=l.class?l.class.split(/\s+/):[];t.push([l.id,a])}Array.isArray(o)&&o.forEach(r)};return r(e),t},of=e=>{let t=[],r=n=>{if(!Array.isArray(n))return;let[i,l,o]=n;if(i&&l&&l.id&&t.push([i.toLowerCase(),l.id]),Array.isArray(o))for(let a=0;a<o.length;a++)r(o[a])};return r(e),t},af=e=>{let t=[],r=n=>{let[i,l,o]=n;l&&l.id&&t.push(l.id),Array.isArray(o)&&o.forEach(r)};return r(e),t},Hs=e=>{let t=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),[r,n,i]=e,l=r.toLowerCase(),o=n.___text___||"",a={...n};if(delete a.___text___,l==="script"){if(a.src!==void 0&&o.trim()!==""){let f=At("",a),d=At(o,{type:a.type});return`${f}
6
+ ${d}`}return At(o,a)}if(l==="style"||l==="link"&&a.rel==="stylesheet")return Cl(o,a);let c="";for(let[f,d]of Object.entries(a))c+=` ${f}=${JSON.stringify(d)}`;if(t.has(l))return`<${r}${c}>`;let u=l==="textarea"||l==="pre"||l==="script"||l==="style"?o:ql(o),_=i.map(f=>Hs(f)).join("");return`<${r}${c}>${u}${_}</${r}>`},Us=e=>{let[t,r,n]=e,i=document.createElement(t);for(let[l,o]of Object.entries(r))l==="___text___"?i.textContent=o:i.setAttribute(l,o);return n.forEach(l=>{i.appendChild(Us(l))}),i},cf=(e,...t)=>Object.entries(e).map(([r,n])=>{let i=Object.entries(n).map(([l,o])=>`${l}:${o};`).join("");return`${r}{${i}}`}).join(`
7
+ `),uf=(e,t=!1)=>{let r=e.split("-");for(let n=1;n<r.length;++n)r[n]=r[n].charAt(0).toUpperCase()+r[n].slice(1);return t&&(r[0]=r[0].charAt(0).toUpperCase()+r[0].slice(1)),r.join("")},_f=e=>e.replace(/-/g,"_"),ff=(e,t)=>typeof e=="string"?(e=e.trim().toLowerCase(),e==="false"||e==="0"||e==="no"||e==="off"||e==="fls"||e==="f"||e==="null"||e==="nul"||e==="none"||e==="nu"||e==="n"?!1:e==="true"||e==="1"||e==="yes"||e==="on"||e==="tru"||e==="t"||e==="y"?!0:e===""||e==="undefined"||e==="un"||e==="default"||e==="dflt"?!!t:!!e):e===void 0?!!t:!!e,hf=e=>{let t=e.replace(/[^0-9.-]/g,"");return parseFloat(t)},df=(e,t="ele",...r)=>{if(typeof document>"u"||t==="html")return Hs(e);let n=Us(e);if(t==="ele")return n;{let i=n.outerHTML;return n=null,i}},pf=e=>{let t=[],r=1,n="",i=u=>{if(!Array.isArray(u)||typeof u[0]!="string")return JSON.stringify(u);let[_,f,d]=u,b=r++,k=`${_.toUpperCase()}_${b}`;b===1&&(n=k);let ot=d.map(at=>i(at));return t.push({id:b,varName:k,tag:_,attrStr:JSON.stringify(f),childrenStr:`[${ot.join(", ")}]`}),k};i(e);let l=t,o=Math.max(...l.map(u=>u.varName.length)),a=l.map(u=>{let _=" ".repeat(o-u.varName.length);return`const ${u.varName}${_} = ["${u.tag}", ${u.attrStr}, ${u.childrenStr}];`}).join(`
8
8
  `),c=`
9
9
 
10
10
  const DFRZ = require("nv-facutil-deep-freeze-j");
@@ -15,7 +15,7 @@ const IDS = DFRZ(get_all_ids_from_strict_tac_json(TAC));
15
15
 
16
16
  module.exports = (rtrn = 'html', ...args) => from_strict_tac_json(TAC, rtrn, ...args);
17
17
  module.exports.IDS = IDS;
18
- module.exports.TAC = TAC;`;return a+c};Al.exports={to_base64_uri:Ys,code2hscript:At,css2hlink:Cl,escape_text:ql,dash_to_camel:af,dash_to_snake:cf,attr_value_to_bool:uf,css_str_to_num:_f,get_all_nds_from_strict_tac_json:tf,get_all_attrs_from_strict_tac_json:sf,get_all_id_and_clses_from_strict_tac_json:rf,get_all_tag_id_pairs_from_strict_tac_json:nf,get_all_ids_from_strict_tac_json:lf,strict_tac_json_to_html:Hs,strict_tac_json_to_dom:Us,from_strict_tac_json:ff,strict_tac_json_to_def:hf,simple_json_to_css:of}});var K=h((Zd,Il)=>{var df=e=>e.constructor.name==="AsyncFunction",pf=e=>typeof e!="string"||(e=e.trim(),e==="")?!1:!!(e.startsWith("http://")||e.startsWith("https://")||e.startsWith("ws://")||e.startsWith("wss://")||e.startsWith("//")||e.startsWith("/")||e.startsWith("./")||e.startsWith("../")||/^(data|blob|file|wasm):/i.test(e)),gf=e=>e.startsWith("http://")||e.startsWith("https://")||e.startsWith("ws://")||e.startsWith("wss://")||/^(data|blob|file|wasm):/i.test(e)?e:e.startsWith("//")||e.startsWith("/")||e.startsWith("./")||e.startsWith("../")?e.startsWith("//")?window.location.protocol+e:e.startsWith("/")?window.location.origin+e:new URL(e,window.location.href).href:e,mf=()=>new Date().toISOString().replace(/[:.]/g,"-"),bf=/^(.*?)=["]?(.*)["]?$/,yf=(e=document.cookie)=>{let t=e.split("; "),r={};for(let n of t){let i=bf.exec(n);r[i[1]]=i[2]}return r},{to_base64_uri:wf,code2hscript:$f,css2hlink:vf,escape_text:kf,dash_to_camel:xf,dash_to_snake:Sf,attr_value_to_bool:Tf,css_str_to_num:Ef,get_all_nds_from_strict_tac_json:Cf,get_all_attrs_from_strict_tac_json:qf,get_all_id_and_clses_from_strict_tac_json:Af,get_all_tag_id_pairs_from_strict_tac_json:Nf,get_all_ids_from_strict_tac_json:If,strict_tac_json_to_html:Of,strict_tac_json_to_dom:jf,from_strict_tac_json:Df,strict_tac_json_to_def:Rf,simple_json_to_css:Lf}=Nl(),Pf=qt(),Wf=e=>Pf.parse_from_str(e+" ");Il.exports={is_async:df,is_url:pf,fullfill_url:gf,creat_dt_prefix:mf,get_ck:yf,parse_json_input:Wf,to_base64_uri:wf,code2hscript:$f,css2hlink:vf,escape_text:kf,dash_to_camel:xf,dash_to_snake:Sf,attr_value_to_bool:Tf,css_str_to_num:Ef,get_all_nds_from_strict_tac_json:Cf,get_all_attrs_from_strict_tac_json:qf,get_all_id_and_clses_from_strict_tac_json:Af,get_all_tag_id_pairs_from_strict_tac_json:Nf,get_all_ids_from_strict_tac_json:If,strict_tac_json_to_html:Of,strict_tac_json_to_dom:jf,from_strict_tac_json:Df,strict_tac_json_to_def:Rf,simple_json_to_css:Lf}});var nt=h((ep,Dl)=>{var{is_async:_e}=K(),Bf=e=>{let t=0;for(;e&&e.parentNode;)e=e.parentNode,t++;return t},Ff=(e,t)=>{if(t>0){let r=1;for(;;){let n=e.parentNode;if(r===t)return n;e=n,++r}}else return e},Mf=e=>{for(;e.parentNode;)e=e.parentNode;return e},Q=e=>e.firstChild===null||e.firstChild===void 0,Nt=(e,t=Q)=>{let r=0;for(;!t(e);)e=e.lastChild,++r;return[e,r]},It=(e,t=Q)=>{let r=0;for(;!t(e);)e=e.firstChild,++r;return[e,r]},Ol=(e,t)=>{if(e.nextSibling)return[e.nextSibling,t];let r=e.parentNode,n=t;for(;r;){if(n-=1,r.nextSibling)return[r.nextSibling,n];r=r.parentNode}return[null,-1]},Yf=async(e,t=(n,i)=>{},r=Q)=>{let[n,i]=Nt(e,r),l=e,o=_e(t),a=0;for(;;){let c=!1;if(o?c=await t(l,a):c=t(l,a),c||l===n)return;if(!r(l))++a,l=l.firstChild;else{let u=Ol(l,a);if(l=u[0],l)a=u[1];else break}}},jl=(e,t)=>{if(e.prevSibling)return[e.prevSibling,t];let r=e.parentNode,n=t;for(;r;){if(n-=1,r.prevSibling)return[r.prevSibling,n];r=r.parentNode}return[null,-1]},Hf=async(e,t=(n,i)=>{},r=Q)=>{let[n,i]=It(e,r),l=e,o=_e(t),a=0;for(;;){let c=!1;if(o?c=await t(l,a):c=t(l,a),c||l===n)return;if(!r(l))++a,l=l.lastChild;else{let u=jl(l,a);if(l=u[0],l)a=u[1];else break}}},Uf=async(e,t=(n,i)=>{},r=Q)=>{let[n,i]=It(e,r),l=_e(t);for(;;){let o=!1;if(l?o=await t(n,i):o=t(n,i),o||n===e)return;{let a=n.nextSibling;if(a){let c=It(a,r);i+=c[1],n=c[0]}else{let c=n.parentNode;if(c)--i,n=c;else break}}}},Gf=async(e,t=(n,i)=>{},r=Q)=>{let[n,i]=Nt(e,r),l=_e(t);for(;;){let o=!1;if(l?o=await t(n,i):o=t(n,i),o||n===e)return;{let a=n.prevSibling;if(a){let c=Nt(a,r);i+=c[1],n=c[0]}else{let c=n.parentNode;if(c)--i,n=c;else break}}}},Vf=async(e,t=(i,l)=>{},r=(i,l)=>{},n=Q)=>{let i=e,l="open",o={open:[r,_e(r)],clos:[t,_e(t)]},a=0;for(;;){let c=!1,[u,_]=o[l];if(l==="open"){if(_?c=await u(i,a):c=u(i,a),c)return;n(i)?l="clos":(i=i.firstChild,++a)}else{let f,d,b,k=i.nextSibling;if(k?(b="open",f=k,d=a):(b="clos",f=i.parentNode,d=a-1),_?c=await u(i,a):c=u(i,a),c)return;if(i!==e)l=b,i=f,a=d;else break}}},zf=async(e,t=(i,l)=>{},r=(i,l)=>{},n=Q)=>{let i=e,l="open",o={open:[r,_e(r)],clos:[t,_e(t)]},a=0;for(;;){let c=!1,[u,_]=o[l];if(l==="open"){if(_?c=await u(i,a):c=u(i,a),c)return;n(i)?l="clos":(i=i.lastChild,++a)}else{let f,d,b,k=i.prevSibling;if(k?(b="open",f=k,d=a):(b="clos",f=i.parentNode,d=a-1),_?c=await u(i,a):c=u(i,a),c)return;if(i!==e)l=b,i=f,a=d;else break}}};Dl.exports={get_depth:Bf,get_ance:Ff,get_rt:Mf,is_topo_leaf:Q,get_drmost:Nt,get_dlmost:It,find_rb_of_fst_ance_has_rb:Ol,editonly_sdfs_for_each:Yf,find_lb_of_fst_ance_has_lb:jl,editonly_rsdfs_for_each:Hf,editonly_edfs_for_each:Uf,editonly_redfs_for_each:Gf,visit:Vf,rvisit:zf}});var Ll=h((tp,Rl)=>{var Xf=new Set(["html","head","body","title","meta","link","base","style","header","footer","nav","main","section","article","aside","h1","h2","h3","h4","h5","h6","address","p","hr","pre","blockquote","ol","ul","li","dl","dt","dd","figure","figcaption","div","a","em","strong","small","s","cite","q","dfn","abbr","ruby","rt","rp","data","time","code","var","samp","kbd","sub","sup","i","b","u","mark","bdi","bdo","span","br","wbr","ins","del","img","iframe","embed","object","param","video","audio","source","track","picture","map","area","canvas","svg","table","caption","colgroup","col","thead","tbody","tfoot","tr","th","td","form","label","input","button","select","datalist","optgroup","option","textarea","output","progress","meter","fieldset","legend","details","summary","dialog","script","noscript","template","slot"]),Jf=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),Kf=new Set(["class","rel","sandbox","allow","headers","aria-describedby","aria-labelledby"]);Rl.exports={TAGS:Xf,VOID_TAGS:Jf,NEED_TO_SP_ATTR_NMS:Kf}});var Hl=h((sp,Yl)=>{var{TAGS:Qf,VOID_TAGS:Pl,NEED_TO_SP_ATTR_NMS:Zf}=Ll(),{is_url:Wl,fullfill_url:eh}=K(),{editonly_sdfs_for_each:A,is_topo_leaf:Vs}=nt(),Bl=(e,t)=>{let r=[e];for(let n of t){let i=[];for(let l of r){let o=l.children;for(let a=0;a<o.length;a++){let c=o[a];c.tagName.toLowerCase()===n&&i.push(c)}}if(i.length===0)return[];r=i}return r},Fl=(e,t)=>{let r=[],n=t.length;function i(l,o){let a=o;l.nodeType===1&&l.tagName.toLowerCase()===t[o]&&(a=o+1,a===n&&r.push(l));let c=l.children;if(c)for(let u=0;u<c.length;u++)i(c[u],a)}return i(e,0),r},Gs=async(e,t,r=Vs)=>{let n=[];return await A(e,async(i,l)=>{if(i.tagName){if(t.test(i.tagName))n.push(i);else if(i.attributes){for(let o of i.attributes)if(t.test(o.name)){n.push(i);break}}}},r),n},th=async(e,t=Vs)=>{let r=new Set,n=new Set,i=new Set,l=new Set,o=new Set;return await A(e,async(a,c)=>{if(a.nodeType===Node.ELEMENT_NODE){if(r.add(a.tagName.toLowerCase()),a.attributes)for(let u of a.attributes)if(n.add(u.name.toLowerCase()),Zf.has(u.name.toLowerCase())){let _=u.value.split(/[ ]+/g);for(let f of _)i.add(f)}else i.add(u.value)}else a.nodeType===Node.TEXT_NODE?l.add(a.nodeValue):a.nodeType===Node.COMMENT_NODE&&o.add(a.nodeValue)},t),{tags:Array.from(r),keys:Array.from(n),vals:Array.from(i),txts:Array.from(l),cmts:Array.from(o)}},Ml=async(e,t,r=Vs)=>{if(typeof t=="string")if(t[0]==="#"){let n=[];return await A(e,async(i,l)=>{if(i.tagName){let o=t.slice(1),a=i.getAttribute("id");o===a&&n.push(i)}},r),n}else if(t[0]==="."){let n=[];return await A(e,async(i,l)=>{if(i.tagName){let o=t.slice(1);i.getAttribute("class").split(/[ ]+/g).map(c=>c.toLowerCase()).includes(o)&&n.push(i)}},r),n}else if(t[0]==="`"){let n=[];return await A(e,async(i,l)=>{if(i.nodeType===Node.TEXT_NODE){let o=t.slice(1);node.nodeValue.includes(o)&&n.push(i)}},r),n}else if(t[0]==="!"){let n=[];return await A(e,async(i,l)=>{if(i.nodeType===Node.ELEMENT_NODE&&typeof i.click=="function"){let o=i.tagName.toLowerCase();["html","head","meta","link","style","script"].includes(o)||o.includes(t.slice(1).toLowerCase())&&n.push(i)}},r),n}else if(t[0]==="@"){let n=[];return await A(e,async(i,l)=>{if(i.tagName&&i.attributes)for(let o of i.attributes){let c=o.value.split(/[ ]+/g),u=t.slice(1);for(let _ of c)if(Wl(_)&&_.includes(u)){n.push(i);break}}},r),n}else if(t[0]==="-"){let n={};return await A(e,async(i,l)=>{if(i.tagName&&i.attributes){for(let o of i.attributes)if(o.name.startsWith("data-")){let a=o.name.slice(5);if(a.includes(t.slice(1))){let c=o.value;try{c=JSON.parse(c)}catch{}n[a]?n[a].push(c):n[a]=[c]}}}},r),n}else{if(t[0]==="*")return th(e,r);if(t[0]==="&"){let n=[];return await A(e,async(i,l)=>{if(i.tagName&&i.attributes)for(let o of i.attributes){let c=o.value.split(/[ ]+/g),u=t.slice(1);for(let _ of c)Wl(_)&&_.includes(u)&&n.push(eh(_))}},r),n}else if(t.slice(0,2)==="?:"){let n=[];return await A(e,async(i,l)=>{if(i.tagName&&i.attributes){for(let o of i.attributes)if(t.slice(2).toLowerCase()===o.name.toLowerCase()){n.push(i);break}}},r),n}else if(t.slice(0,2)===":?"){let n=[];return await A(e,async(i,l)=>{if(i.tagName&&i.attributes){for(let o of i.attributes)if(o.value.includes(t.slice(2))){n.push(i);break}}},r),n}else if(t.slice(0,3)==="</>"){let n=[];return await A(e,async(i,l)=>{if(i.nodeType===Node.ELEMENT_NODE){let o=node.nodeValue.toLowerCase();if(!Pl.has(o)){let a=t.slice(3);o.includes(a.toLowerCase())&&n.push(i)}}},r),n}else if(t.slice(0,2)==="<>"){let n=[];return await A(e,async(i,l)=>{if(i.nodeType===Node.ELEMENT_NODE){let o=node.nodeValue.toLowerCase();if(Pl.has(o)){let a=t.slice(2);o.includes(a.toLowerCase())&&n.push(i)}}},r),n}else if(t.slice(0,2)==="//"){let n=[];return await A(e,async(i,l)=>{if(i.nodeType===Node.COMMENT_NODE){let o=t.slice(2);node.nodeValue.toLowerCase().includes(o.toLowerCase())&&n.push(i)}},r),n}else if(t[0]==="/"){let n=t.split("/").filter(l=>l!==""),i=Bl(document,n);return i.length===0?await Gs(e,new RegExp(t),r):i}else if(t.includes("/")){let n=t.split("/").filter(i=>i!=="");return Fl(document,n)}else{let n=[];return await A(e,async(i,l)=>{(i.tagName?i.tagName.toLowerCase()===t.toLowerCase():!1)&&n.push(i)},r),n}}else{if(t instanceof RegExp)return await Gs(e,t,r);{let n=[];return is_async(t)?await A(e,async(i,l)=>{await t(i,l)&&n.push(i)},r):await A(e,async(i,l)=>{t(i,l)&&n.push(i)},r),n}}},sh=new Proxy(document,{get(e,t,r){return Qf.has(t.toLowerCase())||t[0]==="*"||t[0]==="&"||t[0]==="-"||t[0]==="#"||t[0]==="."||t[0]==="?"||t[0]===":"||t[0]==="@"||t[0]==="!"||t[0]==="<"||t.includes("/")?Ml(document,t):Reflect.get(e,t,r)}});Yl.exports={plget:Bl,plinget:Fl,filter_on_tag_or_attr_key_with_rgx:Gs,filter:Ml,$:sh}});var Xl=h((rp,zl)=>{var Ul=()=>new Promise(e=>{requestAnimationFrame(()=>{e()})}),rh=()=>new Promise(e=>{requestAnimationFrame(()=>{requestAnimationFrame(e)})}),nh=async e=>{for(let t=0;t<e;++t)await Ul()},ih=async(e=0)=>new Promise(t=>{setTimeout(()=>{t()},e)}),Ot=class{timers={};run(t,r,n=300){this.timers[t]&&clearTimeout(this.timers[t]),this.timers[t]=setTimeout(async()=>{await r(),delete this.timers[t]},n)}cancel(t){this.timers[t]&&(clearTimeout(this.timers[t]),delete this.timers[t])}},Gl=()=>new Ot,Vl=Gl(),lh=(e,t,r=300)=>{Vl.run(e,t,r)},oh=e=>{Vl.cancel(e)};zl.exports={wait_for_layout_ready:Ul,wait_for_paint_ready:rh,wait_for_n_raf:nh,wait:ih,SimpleDebounce:Ot,creat_simple_debounce:Gl,simple_debounce:lh,cancel_simple_debounce:oh}});var Ql=h((np,Kl)=>{var{dash_to_camel:jt}=K(),Jl=(e,t,r=!1)=>{let n=jt(t,r)+"Element";e.constructor.prototype.hasOwnProperty(n)||Object.defineProperty(e.constructor.prototype,n,{get:function(){let i=this.shadowRoot;return i?i.querySelector(`.${t}`):null}})},ah=(e,t)=>{for(let r of t)Jl(e,r,!1)},ch=e=>{for(let t in DYN_CLSES){{let n="all"+jt(t,!0)+"Elements";e.constructor.prototype.hasOwnProperty(n)||Object.defineProperty(e.constructor.prototype,n,{get:function(){let i=this.shadowRoot;return i?i.querySelectorAll(`.${t}`):null}})}let r=DYN_CLSES[t];for(let n of r){let i=jt(n,!0),l="get"+jt(t,!0)+"ElementBy"+i;e.constructor.prototype.hasOwnProperty(l)||(e.constructor.prototype[l]=function(o){let a=this.shadowRoot;return a?a.querySelector(`.${t}[${n}="${o}"]`):null})}}},uh=(e,t)=>{for(let r of t)r=r[0]==="#"?r.slice(1):r,Object.defineProperty(e.prototype,"#"+r,{get:function(){return this["#"][r]||(this["#"][r]=this.shadowRoot.getElementById(r)),this["#"][r]},configurable:!0,enumerable:!1})};Kl.exports={add_one_fixed_element_getter:Jl,add_fixed_element_getters:ah,add_dyn_element_getters:ch,add_all_ele_getters_with_ids_using_hash_cache:uh}});var eo=h((ip,Zl)=>{var _h=qt(),{css_str_to_num:fh,attr_value_to_bool:hh}=K(),dh=(e,t)=>{let r=Object.keys(t);for(let n of ATTRS_KEYS){let i=n[0]==="."?n:`.${n}`,l=t[n],o=l.type.toLowerCase();e.prototype.hasOwnProperty(i)||(o==="boolean"||o==="bool"||o==="bl"?Object.defineProperty(e.prototype,i,{get:function(){return hh(this.getAttribute(n),l.default)},set:function(a){this.setAttribute(n,a?"true":"false")}}):o==="number"||o==="num"?Object.defineProperty(e.prototype,i,{get:function(){let a=this.getAttribute(n);return a?Number(a):l.default},set:function(a){this.setAttribute(n,String(a))}}):o==="cssnum"||Array.isArray(o)&&o.includes("cssnum")&&o.includes("number")?Object.defineProperty(e.prototype,i,{get:function(){return fh(this.getAttribute(n))},set:function(a){isNaN(Number(a))?this.setAttribute(n,a):this.setAttribute(n,String(a)+"px")}}):o==="json"?Object.defineProperty(e.prototype,i,{get:function(){let a=this.getAttribute(n);return a?_h.parse_from_str(a):l.default},set:function(a){this.setAttribute(n,JSON.stringify(a))}}):Object.defineProperty(e.prototype,i,{get:function(){return this.getAttribute(n)||l.default},set:function(a){this.setAttribute(n,a)}}))}};Zl.exports={add_attr_accessors_to_cls:dh}});var so=h((lp,to)=>{var zs=class{css=`
18
+ module.exports.TAC = TAC;`;return a+c},gf=e=>e.constructor.name==="AsyncFunction",mf=e=>typeof e!="string"||(e=e.trim(),e==="")?!1:!!(e.startsWith("http://")||e.startsWith("https://")||e.startsWith("ws://")||e.startsWith("wss://")||e.startsWith("//")||e.startsWith("/")||e.startsWith("./")||e.startsWith("../")||/^(data|blob|file|wasm):/i.test(e)),bf=e=>e.startsWith("http://")||e.startsWith("https://")||e.startsWith("ws://")||e.startsWith("wss://")||/^(data|blob|file|wasm):/i.test(e)?e:e.startsWith("//")||e.startsWith("/")||e.startsWith("./")||e.startsWith("../")?e.startsWith("//")?window.location.protocol+e:e.startsWith("/")?window.location.origin+e:new URL(e,window.location.href).href:e,yf=()=>new Date().toISOString().replace(/[:.]/g,"-"),wf=/^(.*?)=["]?(.*)["]?$/,$f=(e=document.cookie)=>{if(e==="")return{};let t=e.split("; "),r={};for(let n of t){let i=wf.exec(n);r[i[1]]=i[2]}return r};Al.exports={to_base64_uri:Ys,code2hscript:At,css2hlink:Cl,escape_text:ql,dash_to_camel:uf,dash_to_snake:_f,attr_value_to_bool:ff,css_str_to_num:hf,get_all_nds_from_strict_tac_json:rf,get_all_attrs_from_strict_tac_json:nf,get_all_id_and_clses_from_strict_tac_json:lf,get_all_tag_id_pairs_from_strict_tac_json:of,get_all_ids_from_strict_tac_json:af,strict_tac_json_to_html:Hs,strict_tac_json_to_dom:Us,from_strict_tac_json:df,strict_tac_json_to_def:pf,simple_json_to_css:cf,creat_dt_prefix:yf,get_ck:$f,fullfill_url:bf,is_async:gf,is_url:mf}});var V=h((up,Il)=>{var{is_async:vf,is_url:kf,fullfill_url:xf,creat_dt_prefix:Sf,get_ck:Tf,to_base64_uri:Ef,code2hscript:Cf,css2hlink:qf,escape_text:Af,dash_to_camel:Nf,dash_to_snake:If,attr_value_to_bool:jf,css_str_to_num:Of,get_all_nds_from_strict_tac_json:Df,get_all_attrs_from_strict_tac_json:Rf,get_all_id_and_clses_from_strict_tac_json:Lf,get_all_tag_id_pairs_from_strict_tac_json:Pf,get_all_ids_from_strict_tac_json:Wf,strict_tac_json_to_html:Bf,strict_tac_json_to_dom:Ff,from_strict_tac_json:Mf,strict_tac_json_to_def:Yf,simple_json_to_css:Hf}=Nl(),Uf=nt(),Gf=e=>Uf.parse_from_str(e+" ");Il.exports={is_async:vf,is_url:kf,fullfill_url:xf,creat_dt_prefix:Sf,get_ck:Tf,parse_json_input:Gf,to_base64_uri:Ef,code2hscript:Cf,css2hlink:qf,escape_text:Af,dash_to_camel:Nf,dash_to_snake:If,attr_value_to_bool:jf,css_str_to_num:Of,get_all_nds_from_strict_tac_json:Df,get_all_attrs_from_strict_tac_json:Rf,get_all_id_and_clses_from_strict_tac_json:Lf,get_all_tag_id_pairs_from_strict_tac_json:Pf,get_all_ids_from_strict_tac_json:Wf,strict_tac_json_to_html:Bf,strict_tac_json_to_dom:Ff,from_strict_tac_json:Mf,strict_tac_json_to_def:Yf,simple_json_to_css:Hf}});var it=h((_p,Dl)=>{var{is_async:_e}=V(),Vf=e=>{let t=0;for(;e&&e.parentNode;)e=e.parentNode,t++;return t},zf=(e,t)=>{if(t>0){let r=1;for(;;){let n=e.parentNode;if(r===t)return n;e=n,++r}}else return e},Xf=e=>{for(;e.parentNode;)e=e.parentNode;return e},Q=e=>e.firstChild===null||e.firstChild===void 0,Nt=(e,t=Q)=>{let r=0;for(;!t(e);)e=e.lastChild,++r;return[e,r]},It=(e,t=Q)=>{let r=0;for(;!t(e);)e=e.firstChild,++r;return[e,r]},jl=(e,t)=>{if(e.nextSibling)return[e.nextSibling,t];let r=e.parentNode,n=t;for(;r;){if(n-=1,r.nextSibling)return[r.nextSibling,n];r=r.parentNode}return[null,-1]},Jf=async(e,t=(n,i)=>{},r=Q)=>{let[n,i]=Nt(e,r),l=e,o=_e(t),a=0;for(;;){let c=!1;if(o?c=await t(l,a):c=t(l,a),c||l===n)return;if(!r(l))++a,l=l.firstChild;else{let u=jl(l,a);if(l=u[0],l)a=u[1];else break}}},Ol=(e,t)=>{if(e.prevSibling)return[e.prevSibling,t];let r=e.parentNode,n=t;for(;r;){if(n-=1,r.prevSibling)return[r.prevSibling,n];r=r.parentNode}return[null,-1]},Kf=async(e,t=(n,i)=>{},r=Q)=>{let[n,i]=It(e,r),l=e,o=_e(t),a=0;for(;;){let c=!1;if(o?c=await t(l,a):c=t(l,a),c||l===n)return;if(!r(l))++a,l=l.lastChild;else{let u=Ol(l,a);if(l=u[0],l)a=u[1];else break}}},Qf=async(e,t=(n,i)=>{},r=Q)=>{let[n,i]=It(e,r),l=_e(t);for(;;){let o=!1;if(l?o=await t(n,i):o=t(n,i),o||n===e)return;{let a=n.nextSibling;if(a){let c=It(a,r);i+=c[1],n=c[0]}else{let c=n.parentNode;if(c)--i,n=c;else break}}}},Zf=async(e,t=(n,i)=>{},r=Q)=>{let[n,i]=Nt(e,r),l=_e(t);for(;;){let o=!1;if(l?o=await t(n,i):o=t(n,i),o||n===e)return;{let a=n.prevSibling;if(a){let c=Nt(a,r);i+=c[1],n=c[0]}else{let c=n.parentNode;if(c)--i,n=c;else break}}}},eh=async(e,t=(i,l)=>{},r=(i,l)=>{},n=Q)=>{let i=e,l="open",o={open:[r,_e(r)],clos:[t,_e(t)]},a=0;for(;;){let c=!1,[u,_]=o[l];if(l==="open"){if(_?c=await u(i,a):c=u(i,a),c)return;n(i)?l="clos":(i=i.firstChild,++a)}else{let f,d,b,k=i.nextSibling;if(k?(b="open",f=k,d=a):(b="clos",f=i.parentNode,d=a-1),_?c=await u(i,a):c=u(i,a),c)return;if(i!==e)l=b,i=f,a=d;else break}}},th=async(e,t=(i,l)=>{},r=(i,l)=>{},n=Q)=>{let i=e,l="open",o={open:[r,_e(r)],clos:[t,_e(t)]},a=0;for(;;){let c=!1,[u,_]=o[l];if(l==="open"){if(_?c=await u(i,a):c=u(i,a),c)return;n(i)?l="clos":(i=i.lastChild,++a)}else{let f,d,b,k=i.prevSibling;if(k?(b="open",f=k,d=a):(b="clos",f=i.parentNode,d=a-1),_?c=await u(i,a):c=u(i,a),c)return;if(i!==e)l=b,i=f,a=d;else break}}};Dl.exports={get_depth:Vf,get_ance:zf,get_rt:Xf,is_topo_leaf:Q,get_drmost:Nt,get_dlmost:It,find_rb_of_fst_ance_has_rb:jl,editonly_sdfs_for_each:Jf,find_lb_of_fst_ance_has_lb:Ol,editonly_rsdfs_for_each:Kf,editonly_edfs_for_each:Qf,editonly_redfs_for_each:Zf,visit:eh,rvisit:th}});var Ll=h((fp,Rl)=>{var sh=new Set(["html","head","body","title","meta","link","base","style","header","footer","nav","main","section","article","aside","h1","h2","h3","h4","h5","h6","address","p","hr","pre","blockquote","ol","ul","li","dl","dt","dd","figure","figcaption","div","a","em","strong","small","s","cite","q","dfn","abbr","ruby","rt","rp","data","time","code","var","samp","kbd","sub","sup","i","b","u","mark","bdi","bdo","span","br","wbr","ins","del","img","iframe","embed","object","param","video","audio","source","track","picture","map","area","canvas","svg","table","caption","colgroup","col","thead","tbody","tfoot","tr","th","td","form","label","input","button","select","datalist","optgroup","option","textarea","output","progress","meter","fieldset","legend","details","summary","dialog","script","noscript","template","slot"]),rh=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),nh=new Set(["class","rel","sandbox","allow","headers","aria-describedby","aria-labelledby"]);Rl.exports={TAGS:sh,VOID_TAGS:rh,NEED_TO_SP_ATTR_NMS:nh}});var Hl=h((hp,Yl)=>{var{TAGS:ih,VOID_TAGS:Pl,NEED_TO_SP_ATTR_NMS:lh}=Ll(),{is_url:Wl,fullfill_url:oh}=V(),{editonly_sdfs_for_each:A,is_topo_leaf:Vs}=it(),Bl=(e,t)=>{let r=[e];for(let n of t){let i=[];for(let l of r){let o=l.children;for(let a=0;a<o.length;a++){let c=o[a];c.tagName.toLowerCase()===n&&i.push(c)}}if(i.length===0)return[];r=i}return r},Fl=(e,t)=>{let r=[],n=t.length;function i(l,o){let a=o;l.nodeType===1&&l.tagName.toLowerCase()===t[o]&&(a=o+1,a===n&&r.push(l));let c=l.children;if(c)for(let u=0;u<c.length;u++)i(c[u],a)}return i(e,0),r},Gs=async(e,t,r=Vs)=>{let n=[];return await A(e,async(i,l)=>{if(i.tagName){if(t.test(i.tagName))n.push(i);else if(i.attributes){for(let o of i.attributes)if(t.test(o.name)){n.push(i);break}}}},r),n},ah=async(e,t=Vs)=>{let r=new Set,n=new Set,i=new Set,l=new Set,o=new Set;return await A(e,async(a,c)=>{if(a.nodeType===Node.ELEMENT_NODE){if(r.add(a.tagName.toLowerCase()),a.attributes)for(let u of a.attributes)if(n.add(u.name.toLowerCase()),lh.has(u.name.toLowerCase())){let _=u.value.split(/[ ]+/g);for(let f of _)i.add(f)}else i.add(u.value)}else a.nodeType===Node.TEXT_NODE?l.add(a.nodeValue):a.nodeType===Node.COMMENT_NODE&&o.add(a.nodeValue)},t),{tags:Array.from(r),keys:Array.from(n),vals:Array.from(i),txts:Array.from(l),cmts:Array.from(o)}},Ml=async(e,t,r=Vs)=>{if(typeof t=="string")if(t[0]==="#"){let n=[];return await A(e,async(i,l)=>{if(i.tagName){let o=t.slice(1),a=i.getAttribute("id");o===a&&n.push(i)}},r),n}else if(t[0]==="."){let n=[];return await A(e,async(i,l)=>{if(i.tagName){let o=t.slice(1);i.getAttribute("class").split(/[ ]+/g).map(c=>c.toLowerCase()).includes(o)&&n.push(i)}},r),n}else if(t[0]==="`"){let n=[];return await A(e,async(i,l)=>{if(i.nodeType===Node.TEXT_NODE){let o=t.slice(1);node.nodeValue.includes(o)&&n.push(i)}},r),n}else if(t[0]==="!"){let n=[];return await A(e,async(i,l)=>{if(i.nodeType===Node.ELEMENT_NODE&&typeof i.click=="function"){let o=i.tagName.toLowerCase();["html","head","meta","link","style","script"].includes(o)||o.includes(t.slice(1).toLowerCase())&&n.push(i)}},r),n}else if(t[0]==="@"){let n=[];return await A(e,async(i,l)=>{if(i.tagName&&i.attributes)for(let o of i.attributes){let c=o.value.split(/[ ]+/g),u=t.slice(1);for(let _ of c)if(Wl(_)&&_.includes(u)){n.push(i);break}}},r),n}else if(t[0]==="-"){let n={};return await A(e,async(i,l)=>{if(i.tagName&&i.attributes){for(let o of i.attributes)if(o.name.startsWith("data-")){let a=o.name.slice(5);if(a.includes(t.slice(1))){let c=o.value;try{c=JSON.parse(c)}catch{}n[a]?n[a].push(c):n[a]=[c]}}}},r),n}else{if(t[0]==="*")return ah(e,r);if(t[0]==="&"){let n=[];return await A(e,async(i,l)=>{if(i.tagName&&i.attributes)for(let o of i.attributes){let c=o.value.split(/[ ]+/g),u=t.slice(1);for(let _ of c)Wl(_)&&_.includes(u)&&n.push(oh(_))}},r),n}else if(t.slice(0,2)==="?:"){let n=[];return await A(e,async(i,l)=>{if(i.tagName&&i.attributes){for(let o of i.attributes)if(t.slice(2).toLowerCase()===o.name.toLowerCase()){n.push(i);break}}},r),n}else if(t.slice(0,2)===":?"){let n=[];return await A(e,async(i,l)=>{if(i.tagName&&i.attributes){for(let o of i.attributes)if(o.value.includes(t.slice(2))){n.push(i);break}}},r),n}else if(t.slice(0,3)==="</>"){let n=[];return await A(e,async(i,l)=>{if(i.nodeType===Node.ELEMENT_NODE){let o=node.nodeValue.toLowerCase();if(!Pl.has(o)){let a=t.slice(3);o.includes(a.toLowerCase())&&n.push(i)}}},r),n}else if(t.slice(0,2)==="<>"){let n=[];return await A(e,async(i,l)=>{if(i.nodeType===Node.ELEMENT_NODE){let o=node.nodeValue.toLowerCase();if(Pl.has(o)){let a=t.slice(2);o.includes(a.toLowerCase())&&n.push(i)}}},r),n}else if(t.slice(0,2)==="//"){let n=[];return await A(e,async(i,l)=>{if(i.nodeType===Node.COMMENT_NODE){let o=t.slice(2);node.nodeValue.toLowerCase().includes(o.toLowerCase())&&n.push(i)}},r),n}else if(t[0]==="/"){let n=t.split("/").filter(l=>l!==""),i=Bl(document,n);return i.length===0?await Gs(e,new RegExp(t),r):i}else if(t.includes("/")){let n=t.split("/").filter(i=>i!=="");return Fl(document,n)}else{let n=[];return await A(e,async(i,l)=>{(i.tagName?i.tagName.toLowerCase()===t.toLowerCase():!1)&&n.push(i)},r),n}}else{if(t instanceof RegExp)return await Gs(e,t,r);{let n=[];return is_async(t)?await A(e,async(i,l)=>{await t(i,l)&&n.push(i)},r):await A(e,async(i,l)=>{t(i,l)&&n.push(i)},r),n}}},ch=new Proxy(document,{get(e,t,r){return ih.has(t.toLowerCase())||t[0]==="*"||t[0]==="&"||t[0]==="-"||t[0]==="#"||t[0]==="."||t[0]==="?"||t[0]===":"||t[0]==="@"||t[0]==="!"||t[0]==="<"||t.includes("/")?Ml(document,t):Reflect.get(e,t,r)}});Yl.exports={plget:Bl,plinget:Fl,filter_on_tag_or_attr_key_with_rgx:Gs,filter:Ml,$:ch}});var Xl=h((dp,zl)=>{var Ul=()=>new Promise(e=>{requestAnimationFrame(()=>{e()})}),uh=()=>new Promise(e=>{requestAnimationFrame(()=>{requestAnimationFrame(e)})}),_h=async e=>{for(let t=0;t<e;++t)await Ul()},fh=async(e=0)=>new Promise(t=>{setTimeout(()=>{t()},e)}),jt=class{timers={};run(t,r,n=300){this.timers[t]&&clearTimeout(this.timers[t]),this.timers[t]=setTimeout(async()=>{await r(),delete this.timers[t]},n)}cancel(t){this.timers[t]&&(clearTimeout(this.timers[t]),delete this.timers[t])}},Gl=()=>new jt,Vl=Gl(),hh=(e,t,r=300)=>{Vl.run(e,t,r)},dh=e=>{Vl.cancel(e)};zl.exports={wait_for_layout_ready:Ul,wait_for_paint_ready:uh,wait_for_n_raf:_h,wait:fh,SimpleDebounce:jt,creat_simple_debounce:Gl,simple_debounce:hh,cancel_simple_debounce:dh}});var Ql=h((pp,Kl)=>{var{dash_to_camel:Ot}=V(),Jl=(e,t,r=!1)=>{let n=Ot(t,r)+"Element";e.constructor.prototype.hasOwnProperty(n)||Object.defineProperty(e.constructor.prototype,n,{get:function(){let i=this.shadowRoot;return i?i.querySelector(`.${t}`):null}})},ph=(e,t)=>{for(let r of t)Jl(e,r,!1)},gh=e=>{for(let t in DYN_CLSES){{let n="all"+Ot(t,!0)+"Elements";e.constructor.prototype.hasOwnProperty(n)||Object.defineProperty(e.constructor.prototype,n,{get:function(){let i=this.shadowRoot;return i?i.querySelectorAll(`.${t}`):null}})}let r=DYN_CLSES[t];for(let n of r){let i=Ot(n,!0),l="get"+Ot(t,!0)+"ElementBy"+i;e.constructor.prototype.hasOwnProperty(l)||(e.constructor.prototype[l]=function(o){let a=this.shadowRoot;return a?a.querySelector(`.${t}[${n}="${o}"]`):null})}}},mh=(e,t)=>{for(let r of t)r=r[0]==="#"?r.slice(1):r,Object.defineProperty(e.prototype,"#"+r,{get:function(){return this["#"][r]||(this["#"][r]=this.shadowRoot.getElementById(r)),this["#"][r]},configurable:!0,enumerable:!1})};Kl.exports={add_one_fixed_element_getter:Jl,add_fixed_element_getters:ph,add_dyn_element_getters:gh,add_all_ele_getters_with_ids_using_hash_cache:mh}});var eo=h((gp,Zl)=>{var bh=nt(),{css_str_to_num:yh,attr_value_to_bool:wh}=V(),$h=(e,t)=>{let r=Object.keys(t);for(let n of ATTRS_KEYS){let i=n[0]==="."?n:`.${n}`,l=t[n],o=l.type.toLowerCase();e.prototype.hasOwnProperty(i)||(o==="boolean"||o==="bool"||o==="bl"?Object.defineProperty(e.prototype,i,{get:function(){return wh(this.getAttribute(n),l.default)},set:function(a){this.setAttribute(n,a?"true":"false")}}):o==="number"||o==="num"?Object.defineProperty(e.prototype,i,{get:function(){let a=this.getAttribute(n);return a?Number(a):l.default},set:function(a){this.setAttribute(n,String(a))}}):o==="cssnum"||Array.isArray(o)&&o.includes("cssnum")&&o.includes("number")?Object.defineProperty(e.prototype,i,{get:function(){return yh(this.getAttribute(n))},set:function(a){isNaN(Number(a))?this.setAttribute(n,a):this.setAttribute(n,String(a)+"px")}}):o==="json"?Object.defineProperty(e.prototype,i,{get:function(){let a=this.getAttribute(n);return a?bh.parse_from_str(a):l.default},set:function(a){this.setAttribute(n,JSON.stringify(a))}}):Object.defineProperty(e.prototype,i,{get:function(){return this.getAttribute(n)||l.default},set:function(a){this.setAttribute(n,a)}}))}};Zl.exports={add_attr_accessors_to_cls:$h}});var so=h((mp,to)=>{var zs=class{css=`
19
19
  position: fixed;
20
20
  top: 0;
21
21
  left: 0;
@@ -25,17 +25,17 @@ module.exports.TAC = TAC;`;return a+c};Al.exports={to_base64_uri:Ys,code2hscript
25
25
  border: none;
26
26
  margin: 0;
27
27
  padding: 0;
28
- `;is_ok(t,r,n){return t.style[r]=`${n}px`,t.getBoundingClientRect()[r]===n}find_upbound(t,r){let n=1;for(;this.is_ok(t,r,n);)n*=2;return n}mx(t,r){t.style.cssText=this.css,document.body.appendChild(t);let n=this.find_upbound(t,r),i=Math.floor(n/2);for(;i+1<n;){let l=Math.floor((i+n)/2);this.is_ok(t,r,l)?i=l:n=l}return document.body.removeChild(t),i}},it=()=>{let e=document.createElement("div"),t=new zs,r=t.mx(e,"width"),n=t.mx(e,"height");return[r,n]},ph=(e,t)=>{let[r,n]=it(),i=document.createElement(e);return i.style.width=`${r}px`,i.style.height=`${t}px`,i},gh=(e,t)=>{let[r,n]=it(),i=document.createElement(e);return i.style.width=`${t}px`,i.style.height=`${n}px`,i},mh=e=>{let[t,r]=it(),n=document.createElement(e);return n.style.width=`${t}px`,n.style.height=`${r}px`,n},bh=(e,t="height")=>{let[r,n]=it();return Math.floor(r/e)},Xs=class{css=`
28
+ `;is_ok(t,r,n){return t.style[r]=`${n}px`,t.getBoundingClientRect()[r]===n}find_upbound(t,r){let n=1;for(;this.is_ok(t,r,n);)n*=2;return n}mx(t,r){t.style.cssText=this.css,document.body.appendChild(t);let n=this.find_upbound(t,r),i=Math.floor(n/2);for(;i+1<n;){let l=Math.floor((i+n)/2);this.is_ok(t,r,l)?i=l:n=l}return document.body.removeChild(t),i}},lt=()=>{let e=document.createElement("div"),t=new zs,r=t.mx(e,"width"),n=t.mx(e,"height");return[r,n]},vh=(e,t)=>{let[r,n]=lt(),i=document.createElement(e);return i.style.width=`${r}px`,i.style.height=`${t}px`,i},kh=(e,t)=>{let[r,n]=lt(),i=document.createElement(e);return i.style.width=`${t}px`,i.style.height=`${n}px`,i},xh=e=>{let[t,r]=lt(),n=document.createElement(e);return n.style.width=`${t}px`,n.style.height=`${r}px`,n},Sh=(e,t="height")=>{let[r,n]=lt();return Math.floor(r/e)},Xs=class{css=`
29
29
  position: absolute;
30
30
  visibility: hidden;
31
31
  display: none;
32
- `;is_ok(t,r){t.style.zIndex=r;let n=window.getComputedStyle(t).zIndex;return String(n)===String(r)}find_upbound(t){let r=1;for(;this.is_ok(t,r);)r*=2;return r}mx(t){t.style.cssText=this.css,document.body.appendChild(t);let r=this.find_upbound(t),n=Math.floor(r/2);for(;n+1<r;){let i=Math.floor((n+r)/2);this.is_ok(t,i)?n=i:r=i}return document.body.removeChild(t),n}},yh=()=>{let e=document.createElement("div");return new Xs().mx(e)},wh=()=>{let e=document.createElement("div"),t=document.createElement("span");t.style.fontSize="1px",t.innerText="A",e.appendChild(t),document.body.appendChild(e);let r=parseFloat(window.getComputedStyle(t).fontSize);return document.body.removeChild(e),r};to.exports={find_mx_wh:it,creat_mxw_ele:ph,creat_mxh_ele:gh,creat_mxwh_ele:mh,calc_mx_cnt:bh,find_mx_zindex:yh,find_min_font:wh}});var Zs=h((op,lo)=>{var{fullfill_url:ro}=K(),{editonly_sdfs_for_each:no}=nt(),Z=e=>{let t=[],r=0;for(;;){let n=e.indexOf("url(",r);if(n===-1)break;let i=e.indexOf("(",n),l=e.indexOf(")",i+1);if(l===-1)break;let o=e.substring(i+1,l).trim();(o.startsWith('"')&&o.endsWith('"')||o.startsWith("'")&&o.endsWith("'"))&&(o=o.slice(1,-1)),o&&t.push(o),r=l+1}return t},$h=async()=>{let e=document.querySelectorAll("script"),t=[];for(let i of e)if(i.src)t.push(fetch(i.src).then(l=>l.ok?l.text():"").catch(()=>""));else{let l=i.textContent;l.trim()&&t.push(Promise.resolve(l))}return`<script>
32
+ `;is_ok(t,r){t.style.zIndex=r;let n=window.getComputedStyle(t).zIndex;return String(n)===String(r)}find_upbound(t){let r=1;for(;this.is_ok(t,r);)r*=2;return r}mx(t){t.style.cssText=this.css,document.body.appendChild(t);let r=this.find_upbound(t),n=Math.floor(r/2);for(;n+1<r;){let i=Math.floor((n+r)/2);this.is_ok(t,i)?n=i:r=i}return document.body.removeChild(t),n}},Th=()=>{let e=document.createElement("div");return new Xs().mx(e)},Eh=()=>{let e=document.createElement("div"),t=document.createElement("span");t.style.fontSize="1px",t.innerText="A",e.appendChild(t),document.body.appendChild(e);let r=parseFloat(window.getComputedStyle(t).fontSize);return document.body.removeChild(e),r};to.exports={find_mx_wh:lt,creat_mxw_ele:vh,creat_mxh_ele:kh,creat_mxwh_ele:xh,calc_mx_cnt:Sh,find_mx_zindex:Th,find_min_font:Eh}});var Zs=h((bp,lo)=>{var{fullfill_url:ro}=V(),{editonly_sdfs_for_each:no}=it(),Z=e=>{let t=[],r=0;for(;;){let n=e.indexOf("url(",r);if(n===-1)break;let i=e.indexOf("(",n),l=e.indexOf(")",i+1);if(l===-1)break;let o=e.substring(i+1,l).trim();(o.startsWith('"')&&o.endsWith('"')||o.startsWith("'")&&o.endsWith("'"))&&(o=o.slice(1,-1)),o&&t.push(o),r=l+1}return t},Ch=async()=>{let e=document.querySelectorAll("script"),t=[];for(let i of e)if(i.src)t.push(fetch(i.src).then(l=>l.ok?l.text():"").catch(()=>""));else{let l=i.textContent;l.trim()&&t.push(Promise.resolve(l))}return`<script>
33
33
  ${(await Promise.all(t)).filter(i=>i).join(`
34
34
 
35
35
  `)}
36
- <\/script>`},vh=async()=>{let e="";for(let t of document.querySelectorAll('link[rel="stylesheet"]'))if(t.href)try{e+=await(await fetch(t.href)).text()+`
36
+ <\/script>`},qh=async()=>{let e="";for(let t of document.querySelectorAll('link[rel="stylesheet"]'))if(t.href)try{e+=await(await fetch(t.href)).text()+`
37
37
  `}catch{}for(let t of document.querySelectorAll("style"))e+=t.outerHtml+`
38
- `;return e},kh=()=>{let e=new Set;return document.querySelectorAll("script[src]").forEach(t=>{let r=t.src;r&&!r.startsWith("data:")&&!r.startsWith("blob:")&&e.add(r)}),document.querySelectorAll('script[type="module"][src]').forEach(t=>{let r=t.src;r&&!r.startsWith("data:")&&!r.startsWith("blob:")&&e.add(r)}),"performance"in window&&performance.getEntriesByType&&performance.getEntriesByType("resource").forEach(r=>{r.initiatorType==="script"&&r.name&&!r.name.startsWith("data:")&&!r.name.startsWith("blob:")&&e.add(r.name)}),"performance"in window&&performance.getEntriesByType&&performance.getEntriesByType("resource").forEach(r=>{(r.name.endsWith(".json")||r.name.includes("?format=json")||r.initiatorType==="xmlhttprequest"&&r.name.includes("json"))&&r.name&&!r.name.startsWith("data:")&&!r.name.startsWith("blob:")&&e.add(r.name)}),Array.from(e)},xh=()=>{let e=new Set;document.querySelectorAll('link[rel="stylesheet"]').forEach(n=>{let i=n.href;i&&!i.startsWith("data:")&&e.add(i)});let r=document.styleSheets;for(let n=0;n<r.length;n++){let i=r[n];try{if(!i.cssRules)continue;for(let l=0;l<i.cssRules.length;l++){let o=i.cssRules[l];if(o.type===CSSRule.IMPORT_RULE){o.href&&!o.href.startsWith("data:")&&e.add(o.href);let a=o.cssText;Z(a).forEach(c=>{c.startsWith("data:")||e.add(c)})}}}catch(l){l.name==="SecurityError"?console.warn(`Cannot access CSS rules for stylesheet: ${i.href||"inline style"}. Cross-origin restrictions apply.`):console.warn(`Error accessing stylesheet rules: ${l.message}`);continue}}return Array.from(document.styleSheets).forEach(n=>{try{if(!n.cssRules)return;Array.from(n.cssRules).forEach(i=>{if(i.type===CSSRule.FONT_FACE_RULE){let l=i.style.src;l&&Z(l).forEach(o=>e.add(o))}})}catch(i){i.name!=="SecurityError"&&console.warn("Error accessing stylesheet:",i)}}),root.querySelectorAll("*").forEach(n=>{if(fltr&&!fltr(n))return;let i=getComputedStyle(n);["backgroundImage","background"].forEach(f=>{let d=i[f];d&&d!=="none"&&Z(d).forEach(b=>e.add(b))});let o=i.listStyleImage;o&&o!=="none"&&Z(o).forEach(f=>e.add(f));let a=i.cursor;a&&a.includes("url(")&&Z(a).forEach(f=>e.add(f));let c=i.borderImageSource;c&&c!=="none"&&Z(c).forEach(f=>e.add(f));let u=i.content;u&&u!=="normal"&&u!=="none"&&Z(u).forEach(f=>e.add(f));let _=i.maskImage;_&&_!=="none"&&Z(_).forEach(f=>e.add(f))}),Array.from(e)},Sh=(e=document,t=r=>!0)=>{let r=new Set;return e.querySelectorAll("img[src]").forEach(n=>{t(n)&&r.add(ro(n.getAttribute("src")))}),e.querySelectorAll("img[srcset]").forEach(n=>{if(t(n)){let i=n.getAttribute("srcset");if(!i)return;for(let l of i.split(",")){let[o]=l.trim().split(/\s+/);o&&r.add(ro(o))}}}),e.querySelectorAll("svg").forEach(n=>{if(t(n)){let i=new XMLSerializer().serializeToString(n),l=new Blob([i],{type:"image/svg+xml"}),o=URL.createObjectURL(l);r.add([o,".svg"])}}),e.querySelectorAll("*").forEach(n=>{if(t(n)){let i=getComputedStyle(n).backgroundImage;if(!i||i==="none")return;let l=i.indexOf("url(")+4,o=i.indexOf(")",l);if(o===-1)return;let a=i.substring(l,o).trim();(a.startsWith('"')||a.startsWith("'"))&&(a=a.substring(1)),(a.endsWith('"')||a.endsWith("'"))&&(a=a.substring(0,a.length-1)),a&&r.add(a)}}),Array.from(r).filter(Boolean)},Js=(e,t)=>{if(e instanceof CSSStyleRule){let r=e.style;for(let n=0;n<r.length;n++){let i=r[n];if(i.startsWith("--")){let l=r.getPropertyValue(i).trim();l&&(t[i]=l)}}}else if(e instanceof CSSMediaRule||e instanceof CSSSupportsRule||e instanceof CSSKeyframesRule){let r=e.cssRules||e.rules;if(r)for(let n=0;n<r.length;n++)Js(r[n],t)}else if(e instanceof CSSFontFaceRule){let r=e.style;for(let n=0;n<r.length;n++){let i=r[n];if(i.startsWith("--")){let l=r.getPropertyValue(i).trim();l&&(t[i]=l)}}}},Th=()=>{let e={},t=document.styleSheets;for(let r=0;r<t.length;r++){let n=t[r],i="";n.href?i=n.href:n.ownerNode?n.ownerNode.tagName==="STYLE"?i="inline-style":n.ownerNode.tagName==="LINK"?i=n.ownerNode.href||"external-stylesheet":i="unknown":i="unknown",e[i]||(e[i]={});try{let l=n.cssRules||n.rules;if(!l)continue;for(let o=0;o<l.length;o++){let a=l[o];Js(a,e[i])}}catch(l){console.warn(`\u65E0\u6CD5\u8BBF\u95EE\u6837\u5F0F\u8868 ${i} \u7684\u89C4\u5219:`,l)}}return e},Ks=(e,t)=>{if(e instanceof CSSStyleRule){let r=e.style;for(let n=0;n<r.length;n++){let i=r[n];i.startsWith("--")&&t.add(i)}}else if(e.cssRules||e.rules){let r=e.cssRules||e.rules;for(let n=0;n<r.length;n++)Ks(r[n],t)}else if(e.style){let r=e.style;for(let n=0;n<r.length;n++){let i=r[n];i.startsWith("--")&&t.add(i)}}},Dt=()=>{let e=new Set,t=document.styleSheets;for(let r=0;r<t.length;r++)try{let n=t[r],i=n.cssRules||n.rules;if(!i)continue;for(let l=0;l<i.length;l++)Ks(i[l],e)}catch{}return Array.from(e)},Qs=(e,t)=>{if(!t||!e)return null;let r=e.startsWith("--")?e:`--${e}`,n=window.getComputedStyle(t).getPropertyValue(r).trim();if(n==="")return null;let i=t;for(;i;){let l=i.parentElement;if(!l&&i.parentNode instanceof ShadowRoot&&(l=i.parentNode.host),!l||window.getComputedStyle(l).getPropertyValue(r).trim()!==n)return i;i=l}return i},Eh=(e,t)=>{if(!t||!e)return!1;let r=e.startsWith("--")?e:`--${e}`,n=window.getComputedStyle(t).getPropertyValue(r).trim();if(n==="")return!1;let i=t.parentElement;if(!i&&t.parentNode instanceof ShadowRoot&&(i=t.parentNode.host),!i)return!0;let l=window.getComputedStyle(i).getPropertyValue(r).trim();return n!==l},Ch=async(e=document.documentElement)=>{let t=Dt(),r={};t.forEach(i=>r[i]=[]);let n=new Map;return await no(e,i=>{let l=window.getComputedStyle(i),o=i.parentElement;!o&&i.parentNode instanceof ShadowRoot&&(o=i.parentNode.host);let a=o?n.get(o):null,c=new Map;for(let u of t){let _=l.getPropertyValue(u).trim();_&&(c.set(u,_),(!a||a.get(u)!==_)&&r[u].push(i))}n.set(i,c)}),r},qh=async(e=document.documentElement)=>{let t=Dt(),r=new Map,n=new Map;return await no(e,i=>{let l=window.getComputedStyle(i),o=i.parentElement||(i.parentNode instanceof ShadowRoot?i.parentNode.host:null),a=o?n.get(o):null,c=new Map,u=[];for(let _ of t){let f=l.getPropertyValue(_).trim();f&&(c.set(_,f),(!a||a.get(_)!==f)&&u.push(_))}u.length>0&&r.set(i,u),n.set(i,c)}),r},Ah=(e,t)=>{if(!e)return!1;let r=e.startsWith("--")?e:`--${e}`;return t?Qs(r,t)!==null:Dt().includes(r)},Nh=(e,t,r=document.documentElement)=>{let n=e.startsWith("--")?e:`--${e}`;r.style.setProperty(n,String(t))},io=e=>{let t=e.startsWith("--")?e:`--${e}`;for(let r of document.styleSheets)try{let n=r.cssRules||r.rules;if(!n)continue;for(let i=0;i<n.length;i++){let l=n[i];if(window.CSSPropertyRule&&l instanceof CSSPropertyRule&&l.name===t)return{name:l.name,syntax:l.syntax,inherits:l.inherits,initialValue:l.initialValue}}}catch{}return null},Ih=(e,t)=>{let r=io(e);return r&&r.inherits===!1?Qs(e,t)!==t:!1},Oh=(e,{syntax:t="*",inherits:r=!0,initialValue:n}={})=>{let i=e.startsWith("--")?e:`--${e}`;if(!window.CSS||!window.CSS.registerProperty)return console.warn("\u5F53\u524D\u6D4F\u89C8\u5668\u4E0D\u652F\u6301 CSS.registerProperty"),!1;try{let l={name:i,syntax:t,inherits:r};return n!==void 0?l.initialValue=String(n):t!=="*"&&console.warn(`\u8B66\u544A: \u5F53 syntax \u4E3A "${t}" \u65F6\uFF0C\u5EFA\u8BAE\u63D0\u4F9B initialValue\u3002`),window.CSS.registerProperty(l),!0}catch(l){return console.error(`CSS \u53D8\u91CF "${i}" \u6CE8\u518C\u5931\u8D25:`,l.message),!1}};lo.exports={get_all_scripts:$h,get_all_csses:vh,extract_urls_from_url_paren:Z,collect_css_remote_urls:xh,collect_js_remote_urls:kh,collect_img_like_urls:Sh,extract_css_varnms_from_rule:Js,get_all_css_vars:Th,extract_css_varnms_from_rule_to_set:Ks,get_all_uniq_css_varnms:Dt,find_css_var_scope_ele:Qs,is_css_var_defined_on_self:Eh,get_css_var_scope_ele_mp:Ch,get_scope_ele_css_var_mp:qh,is_css_var_defined:Ah,def_css_var:Nh,get_css_prop_var:io,is_css_var_isolated:Ih,def_css_prop_var:Oh}});var tr=h((ap,_o)=>{var oo={success:"#38a169",error:"#e53e3e",warning:"#d69e2e",loading:"#3182ce",info:"#667eea"},jh=e=>`
38
+ `;return e},Ah=()=>{let e=new Set;return document.querySelectorAll("script[src]").forEach(t=>{let r=t.src;r&&!r.startsWith("data:")&&!r.startsWith("blob:")&&e.add(r)}),document.querySelectorAll('script[type="module"][src]').forEach(t=>{let r=t.src;r&&!r.startsWith("data:")&&!r.startsWith("blob:")&&e.add(r)}),"performance"in window&&performance.getEntriesByType&&performance.getEntriesByType("resource").forEach(r=>{r.initiatorType==="script"&&r.name&&!r.name.startsWith("data:")&&!r.name.startsWith("blob:")&&e.add(r.name)}),"performance"in window&&performance.getEntriesByType&&performance.getEntriesByType("resource").forEach(r=>{(r.name.endsWith(".json")||r.name.includes("?format=json")||r.initiatorType==="xmlhttprequest"&&r.name.includes("json"))&&r.name&&!r.name.startsWith("data:")&&!r.name.startsWith("blob:")&&e.add(r.name)}),Array.from(e)},Nh=()=>{let e=new Set;document.querySelectorAll('link[rel="stylesheet"]').forEach(n=>{let i=n.href;i&&!i.startsWith("data:")&&e.add(i)});let r=document.styleSheets;for(let n=0;n<r.length;n++){let i=r[n];try{if(!i.cssRules)continue;for(let l=0;l<i.cssRules.length;l++){let o=i.cssRules[l];if(o.type===CSSRule.IMPORT_RULE){o.href&&!o.href.startsWith("data:")&&e.add(o.href);let a=o.cssText;Z(a).forEach(c=>{c.startsWith("data:")||e.add(c)})}}}catch(l){l.name==="SecurityError"?console.warn(`Cannot access CSS rules for stylesheet: ${i.href||"inline style"}. Cross-origin restrictions apply.`):console.warn(`Error accessing stylesheet rules: ${l.message}`);continue}}return Array.from(document.styleSheets).forEach(n=>{try{if(!n.cssRules)return;Array.from(n.cssRules).forEach(i=>{if(i.type===CSSRule.FONT_FACE_RULE){let l=i.style.src;l&&Z(l).forEach(o=>e.add(o))}})}catch(i){i.name!=="SecurityError"&&console.warn("Error accessing stylesheet:",i)}}),root.querySelectorAll("*").forEach(n=>{if(fltr&&!fltr(n))return;let i=getComputedStyle(n);["backgroundImage","background"].forEach(f=>{let d=i[f];d&&d!=="none"&&Z(d).forEach(b=>e.add(b))});let o=i.listStyleImage;o&&o!=="none"&&Z(o).forEach(f=>e.add(f));let a=i.cursor;a&&a.includes("url(")&&Z(a).forEach(f=>e.add(f));let c=i.borderImageSource;c&&c!=="none"&&Z(c).forEach(f=>e.add(f));let u=i.content;u&&u!=="normal"&&u!=="none"&&Z(u).forEach(f=>e.add(f));let _=i.maskImage;_&&_!=="none"&&Z(_).forEach(f=>e.add(f))}),Array.from(e)},Ih=(e=document,t=r=>!0)=>{let r=new Set;return e.querySelectorAll("img[src]").forEach(n=>{t(n)&&r.add(ro(n.getAttribute("src")))}),e.querySelectorAll("img[srcset]").forEach(n=>{if(t(n)){let i=n.getAttribute("srcset");if(!i)return;for(let l of i.split(",")){let[o]=l.trim().split(/\s+/);o&&r.add(ro(o))}}}),e.querySelectorAll("svg").forEach(n=>{if(t(n)){let i=new XMLSerializer().serializeToString(n),l=new Blob([i],{type:"image/svg+xml"}),o=URL.createObjectURL(l);r.add([o,".svg"])}}),e.querySelectorAll("*").forEach(n=>{if(t(n)){let i=getComputedStyle(n).backgroundImage;if(!i||i==="none")return;let l=i.indexOf("url(")+4,o=i.indexOf(")",l);if(o===-1)return;let a=i.substring(l,o).trim();(a.startsWith('"')||a.startsWith("'"))&&(a=a.substring(1)),(a.endsWith('"')||a.endsWith("'"))&&(a=a.substring(0,a.length-1)),a&&r.add(a)}}),Array.from(r).filter(Boolean)},Js=(e,t)=>{if(e instanceof CSSStyleRule){let r=e.style;for(let n=0;n<r.length;n++){let i=r[n];if(i.startsWith("--")){let l=r.getPropertyValue(i).trim();l&&(t[i]=l)}}}else if(e instanceof CSSMediaRule||e instanceof CSSSupportsRule||e instanceof CSSKeyframesRule){let r=e.cssRules||e.rules;if(r)for(let n=0;n<r.length;n++)Js(r[n],t)}else if(e instanceof CSSFontFaceRule){let r=e.style;for(let n=0;n<r.length;n++){let i=r[n];if(i.startsWith("--")){let l=r.getPropertyValue(i).trim();l&&(t[i]=l)}}}},jh=()=>{let e={},t=document.styleSheets;for(let r=0;r<t.length;r++){let n=t[r],i="";n.href?i=n.href:n.ownerNode?n.ownerNode.tagName==="STYLE"?i="inline-style":n.ownerNode.tagName==="LINK"?i=n.ownerNode.href||"external-stylesheet":i="unknown":i="unknown",e[i]||(e[i]={});try{let l=n.cssRules||n.rules;if(!l)continue;for(let o=0;o<l.length;o++){let a=l[o];Js(a,e[i])}}catch(l){console.warn(`\u65E0\u6CD5\u8BBF\u95EE\u6837\u5F0F\u8868 ${i} \u7684\u89C4\u5219:`,l)}}return e},Ks=(e,t)=>{if(e instanceof CSSStyleRule){let r=e.style;for(let n=0;n<r.length;n++){let i=r[n];i.startsWith("--")&&t.add(i)}}else if(e.cssRules||e.rules){let r=e.cssRules||e.rules;for(let n=0;n<r.length;n++)Ks(r[n],t)}else if(e.style){let r=e.style;for(let n=0;n<r.length;n++){let i=r[n];i.startsWith("--")&&t.add(i)}}},Dt=()=>{let e=new Set,t=document.styleSheets;for(let r=0;r<t.length;r++)try{let n=t[r],i=n.cssRules||n.rules;if(!i)continue;for(let l=0;l<i.length;l++)Ks(i[l],e)}catch{}return Array.from(e)},Qs=(e,t)=>{if(!t||!e)return null;let r=e.startsWith("--")?e:`--${e}`,n=window.getComputedStyle(t).getPropertyValue(r).trim();if(n==="")return null;let i=t;for(;i;){let l=i.parentElement;if(!l&&i.parentNode instanceof ShadowRoot&&(l=i.parentNode.host),!l||window.getComputedStyle(l).getPropertyValue(r).trim()!==n)return i;i=l}return i},Oh=(e,t)=>{if(!t||!e)return!1;let r=e.startsWith("--")?e:`--${e}`,n=window.getComputedStyle(t).getPropertyValue(r).trim();if(n==="")return!1;let i=t.parentElement;if(!i&&t.parentNode instanceof ShadowRoot&&(i=t.parentNode.host),!i)return!0;let l=window.getComputedStyle(i).getPropertyValue(r).trim();return n!==l},Dh=async(e=document.documentElement)=>{let t=Dt(),r={};t.forEach(i=>r[i]=[]);let n=new Map;return await no(e,i=>{let l=window.getComputedStyle(i),o=i.parentElement;!o&&i.parentNode instanceof ShadowRoot&&(o=i.parentNode.host);let a=o?n.get(o):null,c=new Map;for(let u of t){let _=l.getPropertyValue(u).trim();_&&(c.set(u,_),(!a||a.get(u)!==_)&&r[u].push(i))}n.set(i,c)}),r},Rh=async(e=document.documentElement)=>{let t=Dt(),r=new Map,n=new Map;return await no(e,i=>{let l=window.getComputedStyle(i),o=i.parentElement||(i.parentNode instanceof ShadowRoot?i.parentNode.host:null),a=o?n.get(o):null,c=new Map,u=[];for(let _ of t){let f=l.getPropertyValue(_).trim();f&&(c.set(_,f),(!a||a.get(_)!==f)&&u.push(_))}u.length>0&&r.set(i,u),n.set(i,c)}),r},Lh=(e,t)=>{if(!e)return!1;let r=e.startsWith("--")?e:`--${e}`;return t?Qs(r,t)!==null:Dt().includes(r)},Ph=(e,t,r=document.documentElement)=>{let n=e.startsWith("--")?e:`--${e}`;r.style.setProperty(n,String(t))},io=e=>{let t=e.startsWith("--")?e:`--${e}`;for(let r of document.styleSheets)try{let n=r.cssRules||r.rules;if(!n)continue;for(let i=0;i<n.length;i++){let l=n[i];if(window.CSSPropertyRule&&l instanceof CSSPropertyRule&&l.name===t)return{name:l.name,syntax:l.syntax,inherits:l.inherits,initialValue:l.initialValue}}}catch{}return null},Wh=(e,t)=>{let r=io(e);return r&&r.inherits===!1?Qs(e,t)!==t:!1},Bh=(e,{syntax:t="*",inherits:r=!0,initialValue:n}={})=>{let i=e.startsWith("--")?e:`--${e}`;if(!window.CSS||!window.CSS.registerProperty)return console.warn("\u5F53\u524D\u6D4F\u89C8\u5668\u4E0D\u652F\u6301 CSS.registerProperty"),!1;try{let l={name:i,syntax:t,inherits:r};return n!==void 0?l.initialValue=String(n):t!=="*"&&console.warn(`\u8B66\u544A: \u5F53 syntax \u4E3A "${t}" \u65F6\uFF0C\u5EFA\u8BAE\u63D0\u4F9B initialValue\u3002`),window.CSS.registerProperty(l),!0}catch(l){return console.error(`CSS \u53D8\u91CF "${i}" \u6CE8\u518C\u5931\u8D25:`,l.message),!1}};lo.exports={get_all_scripts:Ch,get_all_csses:qh,extract_urls_from_url_paren:Z,collect_css_remote_urls:Nh,collect_js_remote_urls:Ah,collect_img_like_urls:Ih,extract_css_varnms_from_rule:Js,get_all_css_vars:jh,extract_css_varnms_from_rule_to_set:Ks,get_all_uniq_css_varnms:Dt,find_css_var_scope_ele:Qs,is_css_var_defined_on_self:Oh,get_css_var_scope_ele_mp:Dh,get_scope_ele_css_var_mp:Rh,is_css_var_defined:Lh,def_css_var:Ph,get_css_prop_var:io,is_css_var_isolated:Wh,def_css_prop_var:Bh}});var tr=h((yp,_o)=>{var oo={success:"#38a169",error:"#e53e3e",warning:"#d69e2e",loading:"#3182ce",info:"#667eea"},Fh=e=>`
39
39
  position: fixed;
40
40
  top: 50%;
41
41
  left: 50%;
@@ -53,4 +53,4 @@ ${(await Promise.all(t)).filter(i=>i).join(`
53
53
  align-items: center;
54
54
  justify-content: center;
55
55
  font-size: 16px; /* \u5B57\u4F53\u53D8\u5927 */
56
- `,Dh=(e,t)=>{let r=document.createElement("div");return r.style.cssText=jh(e),r.textContent=t,document.body.appendChild(r),r},Rt=class{tasks={};del(t){let r=this.tasks[t];if(!r)return;let{init_timer:n,duration_timer:i,ele:l}=r;clearTimeout(n),clearTimeout(i),l&&document.body.contains(l)&&document.body.removeChild(l),delete this.tasks[t]}add(t,r,n="error",i=1e3,l=100){this.del(t);let o={};this.tasks[t]=o,o.init_timer=setTimeout(()=>{o.ele=Dh(n,r),o.duration_timer=setTimeout(()=>{this.del(t)},i)},l)}},ao=()=>new Rt,co=ao(),Rh=(e,t,r="error",n=1e3,i=100)=>{co.add(e,t,r,n,i)},Lh=e=>{co.del(e)},Ph=async(e,t=async(n,i)=>{console.log(n)},r=99999)=>{let n=`${Date.now()}_${Math.floor(Math.random()*1e4)}`,i=`confirm-overlay-${n}`,l=`confirm-dialog-${n}`,o=document.createElement("div");o.className=i,Object.assign(o.style,{position:"fixed",top:"0",left:"0",width:"100%",height:"100%",backgroundColor:"rgba(0, 0, 0, 0.5)",display:"flex",justifyContent:"center",alignItems:"center",zIndex:String(r)});let a=document.createElement("div");a.className=l,Object.assign(a.style,{backgroundColor:"white",borderRadius:"8px",padding:"20px",width:"300px",boxShadow:"0 5px 15px rgba(0, 0, 0, 0.3)",fontFamily:"Arial, sans-serif"});let c=document.createElement("h3");c.textContent=e,c.style.margin="0 0 20px 0",c.style.color="#333",c.style.fontSize="18px";let u=document.createElement("div");u.style.display="flex",u.style.justifyContent="flex-end",u.style.gap="10px";let _=document.createElement("button");_.textContent="\u53D6\u6D88",Object.assign(_.style,{padding:"8px 16px",backgroundColor:"#f5f5f5",border:"1px solid #ddd",borderRadius:"4px",cursor:"pointer",fontSize:"14px"});let f=document.createElement("button");f.textContent="\u786E\u8BA4",Object.assign(f.style,{padding:"8px 16px",backgroundColor:"#3498db",color:"white",border:"none",borderRadius:"4px",cursor:"pointer",fontSize:"14px"});let d=async b=>{try{await t(b,a)}catch(k){console.error("Dialog callback error:",k)}finally{a.remove(),o.remove()}};return _.addEventListener("click",()=>d(!1)),f.addEventListener("click",()=>d(!0)),o.addEventListener("click",b=>{b.target===o&&d(!1)}),u.appendChild(_),u.appendChild(f),a.appendChild(c),a.appendChild(u),o.appendChild(a),document.body.appendChild(o),a},uo=async e=>{let t=document.createElement("div");Object.assign(t.style,{position:"fixed",inset:"0",backgroundColor:"rgba(0,0,0,0.85)",display:"flex",justifyContent:"center",alignItems:"center",zIndex:"100000",backdropFilter:"blur(4px)",overflow:"hidden"});let r=await e,n=r instanceof HTMLElement?r:new Image;typeof r=="string"&&(n.src=r),Object.assign(n.style,{maxWidth:"90%",maxHeight:"90%",objectFit:"contain",border:"1px solid #555",boxShadow:"0 8px 30px rgba(0,0,0,0.5)",backgroundColor:"#fff"});let i=document.createElement("div");Object.assign(i.style,{position:"fixed",top:"30px",right:"30px",display:"flex",height:"40px",background:"#222",borderRadius:"20px",boxShadow:"0 4px 15px rgba(0,0,0,0.8)",zIndex:"100001",overflow:"hidden",border:"1px solid #444"});let l=document.createElement("div");l.innerHTML="\u283F",Object.assign(l.style,{padding:"0 15px",cursor:"move",backgroundColor:"#333",height:"100%",display:"flex",alignItems:"center",color:"#888"});let o=document.createElement("div");o.innerText="\u4FDD\u5B58\u622A\u56FE",Object.assign(o.style,{padding:"0 15px",cursor:"pointer",height:"100%",display:"flex",alignItems:"center",fontSize:"13px",fontWeight:"bold",backgroundColor:"#2f54eb",color:"#fff",borderRight:"1px solid #444"}),o.onclick=async()=>{let _=await window.showSaveFilePicker({suggestedName:`screenshot_${new Date().getTime()}.png`,types:[{description:"PNG Image",accept:{"image/png":[".png"]}}]}),d=await(await fetch(n.src)).blob(),b=await _.createWritable();await b.write(d),await b.close()};let a=document.createElement("div");a.innerText="\u5173\u95ED",Object.assign(a.style,{padding:"0 15px",cursor:"pointer",height:"100%",display:"flex",alignItems:"center",fontSize:"13px",fontWeight:"bold",backgroundColor:"#ff4d4f",color:"#fff"}),a.onclick=()=>{t.remove(),i.remove(),window.onmousemove=null,window.onmouseup=null};let c=!1,u={x:0,y:0};l.onmousedown=_=>{c=!0,u.x=_.clientX-i.offsetLeft,u.y=_.clientY-i.offsetTop},window.onmousemove=_=>{c&&(i.style.left=_.clientX-u.x+"px",i.style.top=_.clientY-u.y+"px",i.style.right="auto")},window.onmouseup=()=>c=!1,i.append(l,o,a),t.appendChild(n),document.body.append(t,i)},er=async(e,t)=>{if(t==="b64")return e.toDataURL("image/png");let r=await new Promise(n=>e.toBlob(n,"image/png"));switch(t){case"url":return URL.createObjectURL(r);case"u8a":return new Uint8Array(await r.arrayBuffer());case"ab":return await r.arrayBuffer();case"img":return new Promise((n,i)=>{let l=new Image,o=URL.createObjectURL(r);l.onload=()=>{URL.revokeObjectURL(o),n(l)},l.onerror=i,l.src=o,l.crossOrigin="anonymous"});default:return r}},Wh=async(e,t=void 0)=>{if(!e||!(e instanceof HTMLElement)){console.error("\u65E0\u6548\u7684\u5143\u7D20\u5BF9\u8C61");return}let r=e.style.outline,n=e.style.transition;try{e.style.transition="outline 0.2s ease",e.style.outline="4px solid #2f54eb",e.style.outlineOffset="2px",e.scrollIntoView({block:"center",behavior:"instant"});let i=await navigator.mediaDevices.getDisplayMedia({video:{displaySurface:"browser"},preferCurrentTab:!0}),l=document.createElement("video");l.srcObject=i,await l.play();let o=l.videoWidth/window.innerWidth,a=l.videoHeight/window.innerHeight,c=e.getBoundingClientRect(),u=document.createElement("canvas");if(u.width=c.width*o,u.height=c.height*a,u.getContext("2d").drawImage(l,c.left*o,c.top*a,c.width*o,c.height*a,0,0,u.width,u.height),i.getTracks().forEach(f=>f.stop()),e.style.outline=r,e.style.transition=n,t===void 0){let f=await er(u,"img");uo(f);return}return await er(u,t)}catch(i){e.style.outline=r,e.style.transition=n,i.name==="NotAllowedError"?console.warn("\u7528\u6237\u53D6\u6D88\u4E86\u5C4F\u5E55\u5171\u4EAB\u6388\u6743\u6216\u6743\u9650\u88AB\u62D2\u7EDD"):i.name==="NotFoundError"?console.error("\u672A\u627E\u5230\u53EF\u7528\u7684\u5A92\u4F53\u6D41\u6E90"):console.error("\u622A\u56FE\u53D1\u751F\u610F\u5916\u9519\u8BEF:",i)}},Bh=async(e,t={})=>{let r=typeof e=="function"?e():e;if(!r)return;let n="",i=Date.now(),{defaultName:l,ext:o}=t;l&&l.includes(".")?n=l:o?n=`${i}.${o}`:n=`${i}.txt`;let a=prompt("\u8BF7\u8F93\u5165\u6587\u4EF6\u540D\uFF1A",n);if(a!==null){if("showSaveFilePicker"in window)try{let u=await(await window.showSaveFilePicker({suggestedName:a,excludeAcceptAllOption:!1})).createWritable();await u.write(r),await u.close();return}catch(c){if(c.name==="AbortError")return;console.warn("showSaveFilePicker failed, trying legacy...")}try{let c=new Blob([r],{type:"application/octet-stream"}),u=URL.createObjectURL(c),_=document.createElement("a");_.href=u,_.download=a,document.body.appendChild(_),_.click(),setTimeout(()=>{document.body.removeChild(_),URL.revokeObjectURL(u)},100)}catch(c){console.error("Save failed:",c)}}};_o.exports={SimpleAlert:Rt,creat_simple_alert:ao,simple_alert:Rh,cancel_simple_alert:Lh,simple_confirm_cancel:Ph,show_img_modal:uo,convert_canvas:er,ele2img:Wh,save_to_file:Bh}});var mo=h((cp,go)=>{var{creat_dt_prefix:fo}=K(),{simple_alert:Fh}=tr(),{collect_img_like_urls:Mh}=Zs(),{visit:Yh}=nt(),ho=async(e,t,r)=>{if(!r)try{r=await window.showDirectoryPicker()}catch(n){return[!1,String(n.stack)]}try{let i=await(await r.getFileHandle(t,{create:!0})).createWritable();return await i.write(e),await i.close(),[!0,null]}catch(n){return[!1,String(n.stack)]}},po=async(e,t,r,n)=>{if(r)Array.isArray(e)&&(e=e[0]);else if(Array.isArray(e))r=fo()+"_inline"+e[1],e=e[0];else{let l=new URL(e).pathname.split("/");r=fo()+"_"+l[l.length-1]}if(!t)try{dir=await window.showDirectoryPicker()}catch(i){n&&n.fails.push([e,String(i.stack)])}try{let l=await(await fetch(e)).blob(),[o,a]=await ho(l,r,t);n&&(o?n.succs.push(e):n.fails.push([e,String(a)]))}catch(i){n&&n.fails.push([e,String(i.stack)])}},Hh=async(e=t=>!0)=>{let t=[],r=[],n=await window.showDirectoryPicker(),i=Mh(document,e),l=Array.from(new Set(i));for(let o of l)await po(o,n,void 0,{succs:t,fails:r});return Fh("dnld_img_like",JSON.stringify({succs:t,fails:r},null,2),"success"),{succs:t,fails:r}},Uh=async(e=document.body,t=100,r=100,n=i=>!0)=>{try{let i=await window.showDirectoryPicker(),l=await navigator.mediaDevices.getDisplayMedia({video:{displaySurface:"browser"},preferCurrentTab:!0}),o=document.createElement("video");o.srcObject=l,await o.play();let a=o.videoWidth/window.innerWidth,c=o.videoHeight/window.innerHeight,u=[];await Yh(e,(_,f)=>{_.nodeType===1&&_.offsetWidth>=t&&_.offsetHeight>=r&&n(_)&&u.push({el:_,depth:f})},(_,f)=>{}),console.log(`[Scanner] \u5F00\u59CB\u81EA\u52A8\u4FDD\u5B58 ${u.length} \u5F20\u56FE\u7247\u5230\u76EE\u5F55...`);for(let _=0;_<u.length;_++){let{el:f,depth:d}=u[_];f.scrollIntoView({block:"center",behavior:"instant"}),await new Promise(Lt=>setTimeout(Lt,100));let b=f.getBoundingClientRect(),k=document.createElement("canvas");k.width=b.width*a,k.height=b.height*c,k.getContext("2d").drawImage(o,b.left*a,b.top*c,b.width*a,b.height*c,0,0,k.width,k.height);let ot=`dep${d}_${f.tagName.toLowerCase()}_${_}.png`,$o=await new Promise(Lt=>k.toBlob(Lt,"image/png")),sr=await(await i.getFileHandle(ot,{create:!0})).createWritable();await sr.write($o),await sr.close(),console.log(`\u5DF2\u81EA\u52A8\u5199\u5165: ${ot}`)}l.getTracks().forEach(_=>_.stop()),console.log("\u6279\u91CF\u4FDD\u5B58\u4EFB\u52A1\u5B8C\u6210\uFF01")}catch(i){if(i.name==="AbortError")return;console.error("\u6279\u91CF\u4FDD\u5B58\u5931\u8D25:",i)}};go.exports={save_blob:ho,fetch_save:po,dnld_img_like:Hh,take_photo_for_all_eles:Uh}});var yo=h((up,bo)=>{var{to_base64_uri:Gh}=K(),Vh=(e,t=!1,r="text/javascript")=>new Promise((n,i)=>{try{let l=new Blob([e],{type:"application/javascript"}),o=URL.createObjectURL(l),a=document.createElement("script");a.src=o,a.type=r,a.async=!t,a.onload=()=>{URL.revokeObjectURL(o),n([!0,a])},a.onerror=c=>{URL.revokeObjectURL(o),a.parentNode&&a.parentNode.removeChild(a),n([!1,c])},document.head.appendChild(a)}catch(l){n([!1,l])}}),zh=(e,t="link")=>{let r=Gh("text/css",e);if(t==="style"){let n=`@import ${r}`,i=document.createElement("style");return i.textContent=n,document.head.appendChild(i),i}else{let n=document.createElement("link");return n.rel="stylesheet",n.href=r,document.head.appendChild(n),n}};bo.exports={loadjs:Vh,loadcss:zh}});var ad=h((_p,wo)=>{var Xh=qt(),Jh=K(),Kh=nt(),Qh=Hl(),Zh=Xl(),ed=Ql(),td=eo(),sd=so(),rd=Zs(),id=tr(),ld=mo(),od=yo();wo.exports={_ison:Xh,_util:Jh,_nd:Kh,_ele:Qh,_attr,_wait:Zh,_ele_getter:ed,_cls_accessor:td,_limit:sd,_code:rd,_ui:id,_dnld:ld,_impt:od}});return ad();})();
56
+ `,Mh=(e,t)=>{let r=document.createElement("div");return r.style.cssText=Fh(e),r.textContent=t,document.body.appendChild(r),r},Rt=class{tasks={};del(t){let r=this.tasks[t];if(!r)return;let{init_timer:n,duration_timer:i,ele:l}=r;clearTimeout(n),clearTimeout(i),l&&document.body.contains(l)&&document.body.removeChild(l),delete this.tasks[t]}add(t,r,n="error",i=1e3,l=100){this.del(t);let o={};this.tasks[t]=o,o.init_timer=setTimeout(()=>{o.ele=Mh(n,r),o.duration_timer=setTimeout(()=>{this.del(t)},i)},l)}},ao=()=>new Rt,co=ao(),Yh=(e,t,r="error",n=1e3,i=100)=>{co.add(e,t,r,n,i)},Hh=e=>{co.del(e)},Uh=async(e,t=async(n,i)=>{console.log(n)},r=99999)=>{let n=`${Date.now()}_${Math.floor(Math.random()*1e4)}`,i=`confirm-overlay-${n}`,l=`confirm-dialog-${n}`,o=document.createElement("div");o.className=i,Object.assign(o.style,{position:"fixed",top:"0",left:"0",width:"100%",height:"100%",backgroundColor:"rgba(0, 0, 0, 0.5)",display:"flex",justifyContent:"center",alignItems:"center",zIndex:String(r)});let a=document.createElement("div");a.className=l,Object.assign(a.style,{backgroundColor:"white",borderRadius:"8px",padding:"20px",width:"300px",boxShadow:"0 5px 15px rgba(0, 0, 0, 0.3)",fontFamily:"Arial, sans-serif"});let c=document.createElement("h3");c.textContent=e,c.style.margin="0 0 20px 0",c.style.color="#333",c.style.fontSize="18px";let u=document.createElement("div");u.style.display="flex",u.style.justifyContent="flex-end",u.style.gap="10px";let _=document.createElement("button");_.textContent="\u53D6\u6D88",Object.assign(_.style,{padding:"8px 16px",backgroundColor:"#f5f5f5",border:"1px solid #ddd",borderRadius:"4px",cursor:"pointer",fontSize:"14px"});let f=document.createElement("button");f.textContent="\u786E\u8BA4",Object.assign(f.style,{padding:"8px 16px",backgroundColor:"#3498db",color:"white",border:"none",borderRadius:"4px",cursor:"pointer",fontSize:"14px"});let d=async b=>{try{await t(b,a)}catch(k){console.error("Dialog callback error:",k)}finally{a.remove(),o.remove()}};return _.addEventListener("click",()=>d(!1)),f.addEventListener("click",()=>d(!0)),o.addEventListener("click",b=>{b.target===o&&d(!1)}),u.appendChild(_),u.appendChild(f),a.appendChild(c),a.appendChild(u),o.appendChild(a),document.body.appendChild(o),a},uo=async e=>{let t=document.createElement("div");Object.assign(t.style,{position:"fixed",inset:"0",backgroundColor:"rgba(0,0,0,0.85)",display:"flex",justifyContent:"center",alignItems:"center",zIndex:"100000",backdropFilter:"blur(4px)",overflow:"hidden"});let r=await e,n=r instanceof HTMLElement?r:new Image;typeof r=="string"&&(n.src=r),Object.assign(n.style,{maxWidth:"90%",maxHeight:"90%",objectFit:"contain",border:"1px solid #555",boxShadow:"0 8px 30px rgba(0,0,0,0.5)",backgroundColor:"#fff"});let i=document.createElement("div");Object.assign(i.style,{position:"fixed",top:"30px",right:"30px",display:"flex",height:"40px",background:"#222",borderRadius:"20px",boxShadow:"0 4px 15px rgba(0,0,0,0.8)",zIndex:"100001",overflow:"hidden",border:"1px solid #444"});let l=document.createElement("div");l.innerHTML="\u283F",Object.assign(l.style,{padding:"0 15px",cursor:"move",backgroundColor:"#333",height:"100%",display:"flex",alignItems:"center",color:"#888"});let o=document.createElement("div");o.innerText="\u4FDD\u5B58\u622A\u56FE",Object.assign(o.style,{padding:"0 15px",cursor:"pointer",height:"100%",display:"flex",alignItems:"center",fontSize:"13px",fontWeight:"bold",backgroundColor:"#2f54eb",color:"#fff",borderRight:"1px solid #444"}),o.onclick=async()=>{let _=await window.showSaveFilePicker({suggestedName:`screenshot_${new Date().getTime()}.png`,types:[{description:"PNG Image",accept:{"image/png":[".png"]}}]}),d=await(await fetch(n.src)).blob(),b=await _.createWritable();await b.write(d),await b.close()};let a=document.createElement("div");a.innerText="\u5173\u95ED",Object.assign(a.style,{padding:"0 15px",cursor:"pointer",height:"100%",display:"flex",alignItems:"center",fontSize:"13px",fontWeight:"bold",backgroundColor:"#ff4d4f",color:"#fff"}),a.onclick=()=>{t.remove(),i.remove(),window.onmousemove=null,window.onmouseup=null};let c=!1,u={x:0,y:0};l.onmousedown=_=>{c=!0,u.x=_.clientX-i.offsetLeft,u.y=_.clientY-i.offsetTop},window.onmousemove=_=>{c&&(i.style.left=_.clientX-u.x+"px",i.style.top=_.clientY-u.y+"px",i.style.right="auto")},window.onmouseup=()=>c=!1,i.append(l,o,a),t.appendChild(n),document.body.append(t,i)},er=async(e,t)=>{if(t==="b64")return e.toDataURL("image/png");let r=await new Promise(n=>e.toBlob(n,"image/png"));switch(t){case"url":return URL.createObjectURL(r);case"u8a":return new Uint8Array(await r.arrayBuffer());case"ab":return await r.arrayBuffer();case"img":return new Promise((n,i)=>{let l=new Image,o=URL.createObjectURL(r);l.onload=()=>{URL.revokeObjectURL(o),n(l)},l.onerror=i,l.src=o,l.crossOrigin="anonymous"});default:return r}},Gh=async(e,t=void 0)=>{if(!e||!(e instanceof HTMLElement)){console.error("\u65E0\u6548\u7684\u5143\u7D20\u5BF9\u8C61");return}let r=e.style.outline,n=e.style.transition;try{e.style.transition="outline 0.2s ease",e.style.outline="4px solid #2f54eb",e.style.outlineOffset="2px",e.scrollIntoView({block:"center",behavior:"instant"});let i=await navigator.mediaDevices.getDisplayMedia({video:{displaySurface:"browser"},preferCurrentTab:!0}),l=document.createElement("video");l.srcObject=i,await l.play();let o=l.videoWidth/window.innerWidth,a=l.videoHeight/window.innerHeight,c=e.getBoundingClientRect(),u=document.createElement("canvas");if(u.width=c.width*o,u.height=c.height*a,u.getContext("2d").drawImage(l,c.left*o,c.top*a,c.width*o,c.height*a,0,0,u.width,u.height),i.getTracks().forEach(f=>f.stop()),e.style.outline=r,e.style.transition=n,t===void 0){let f=await er(u,"img");uo(f);return}return await er(u,t)}catch(i){e.style.outline=r,e.style.transition=n,i.name==="NotAllowedError"?console.warn("\u7528\u6237\u53D6\u6D88\u4E86\u5C4F\u5E55\u5171\u4EAB\u6388\u6743\u6216\u6743\u9650\u88AB\u62D2\u7EDD"):i.name==="NotFoundError"?console.error("\u672A\u627E\u5230\u53EF\u7528\u7684\u5A92\u4F53\u6D41\u6E90"):console.error("\u622A\u56FE\u53D1\u751F\u610F\u5916\u9519\u8BEF:",i)}},Vh=async(e,t={})=>{let r=typeof e=="function"?e():e;if(!r)return;let n="",i=Date.now(),{defaultName:l,ext:o}=t;l&&l.includes(".")?n=l:o?n=`${i}.${o}`:n=`${i}.txt`;let a=prompt("\u8BF7\u8F93\u5165\u6587\u4EF6\u540D\uFF1A",n);if(a!==null){if("showSaveFilePicker"in window)try{let u=await(await window.showSaveFilePicker({suggestedName:a,excludeAcceptAllOption:!1})).createWritable();await u.write(r),await u.close();return}catch(c){if(c.name==="AbortError")return;console.warn("showSaveFilePicker failed, trying legacy...")}try{let c=new Blob([r],{type:"application/octet-stream"}),u=URL.createObjectURL(c),_=document.createElement("a");_.href=u,_.download=a,document.body.appendChild(_),_.click(),setTimeout(()=>{document.body.removeChild(_),URL.revokeObjectURL(u)},100)}catch(c){console.error("Save failed:",c)}}};_o.exports={SimpleAlert:Rt,creat_simple_alert:ao,simple_alert:Yh,cancel_simple_alert:Hh,simple_confirm_cancel:Uh,show_img_modal:uo,convert_canvas:er,ele2img:Gh,save_to_file:Vh}});var mo=h((wp,go)=>{var{creat_dt_prefix:fo}=V(),{simple_alert:zh}=tr(),{collect_img_like_urls:Xh}=Zs(),{visit:Jh}=it(),ho=async(e,t,r)=>{if(!r)try{r=await window.showDirectoryPicker()}catch(n){return[!1,String(n.stack)]}try{let i=await(await r.getFileHandle(t,{create:!0})).createWritable();return await i.write(e),await i.close(),[!0,null]}catch(n){return[!1,String(n.stack)]}},po=async(e,t,r,n)=>{if(r)Array.isArray(e)&&(e=e[0]);else if(Array.isArray(e))r=fo()+"_inline"+e[1],e=e[0];else{let l=new URL(e).pathname.split("/");r=fo()+"_"+l[l.length-1]}if(!t)try{dir=await window.showDirectoryPicker()}catch(i){n&&n.fails.push([e,String(i.stack)])}try{let l=await(await fetch(e)).blob(),[o,a]=await ho(l,r,t);n&&(o?n.succs.push(e):n.fails.push([e,String(a)]))}catch(i){n&&n.fails.push([e,String(i.stack)])}},Kh=async(e=t=>!0)=>{let t=[],r=[],n=await window.showDirectoryPicker(),i=Xh(document,e),l=Array.from(new Set(i));for(let o of l)await po(o,n,void 0,{succs:t,fails:r});return zh("dnld_img_like",JSON.stringify({succs:t,fails:r},null,2),"success"),{succs:t,fails:r}},Qh=async(e=document.body,t=100,r=100,n=i=>!0)=>{try{let i=await window.showDirectoryPicker(),l=await navigator.mediaDevices.getDisplayMedia({video:{displaySurface:"browser"},preferCurrentTab:!0}),o=document.createElement("video");o.srcObject=l,await o.play();let a=o.videoWidth/window.innerWidth,c=o.videoHeight/window.innerHeight,u=[];await Jh(e,(_,f)=>{_.nodeType===1&&_.offsetWidth>=t&&_.offsetHeight>=r&&n(_)&&u.push({el:_,depth:f})},(_,f)=>{}),console.log(`[Scanner] \u5F00\u59CB\u81EA\u52A8\u4FDD\u5B58 ${u.length} \u5F20\u56FE\u7247\u5230\u76EE\u5F55...`);for(let _=0;_<u.length;_++){let{el:f,depth:d}=u[_];f.scrollIntoView({block:"center",behavior:"instant"}),await new Promise(Lt=>setTimeout(Lt,100));let b=f.getBoundingClientRect(),k=document.createElement("canvas");k.width=b.width*a,k.height=b.height*c,k.getContext("2d").drawImage(o,b.left*a,b.top*c,b.width*a,b.height*c,0,0,k.width,k.height);let at=`dep${d}_${f.tagName.toLowerCase()}_${_}.png`,ko=await new Promise(Lt=>k.toBlob(Lt,"image/png")),sr=await(await i.getFileHandle(at,{create:!0})).createWritable();await sr.write(ko),await sr.close(),console.log(`\u5DF2\u81EA\u52A8\u5199\u5165: ${at}`)}l.getTracks().forEach(_=>_.stop()),console.log("\u6279\u91CF\u4FDD\u5B58\u4EFB\u52A1\u5B8C\u6210\uFF01")}catch(i){if(i.name==="AbortError")return;console.error("\u6279\u91CF\u4FDD\u5B58\u5931\u8D25:",i)}};go.exports={save_blob:ho,fetch_save:po,dnld_img_like:Kh,take_photo_for_all_eles:Qh}});var yo=h(($p,bo)=>{var{to_base64_uri:Zh}=V(),ed=(e,t=!1,r="text/javascript")=>new Promise((n,i)=>{try{let l=new Blob([e],{type:"application/javascript"}),o=URL.createObjectURL(l),a=document.createElement("script");a.src=o,a.type=r,a.async=!t,a.onload=()=>{URL.revokeObjectURL(o),n([!0,a])},a.onerror=c=>{URL.revokeObjectURL(o),a.parentNode&&a.parentNode.removeChild(a),n([!1,c])},document.head.appendChild(a)}catch(l){n([!1,l])}}),td=(e,t="link")=>{let r=Zh("text/css",e);if(t==="style"){let n=`@import ${r}`,i=document.createElement("style");return i.textContent=n,document.head.appendChild(i),i}else{let n=document.createElement("link");return n.rel="stylesheet",n.href=r,document.head.appendChild(n),n}};bo.exports={loadjs:ed,loadcss:td}});var $o=h((vp,wo)=>{var sd=nt(),{attr_value_to_bool:rd,css_str_to_num:id}=V();wo.exports=(e,t)=>{Object.defineProperty(e,"observedAttributes",{get:()=>t});for(let r in ATTRS){let n=ATTRS[r],i=n.type.toLowerCase();r=r.toLowerCase(),Object.defineProperty(e.prototype,"@"+r,{get:function(){let l=this.getAttribute(r);return l===null?n.dflt:i==="bl"||i==="bool"?rd(l):i==="num"||i==="number"?Number(l):i==="cssnum"?id(l):i==="json"?sd.parse_from_str(l):l},set:function(l){l===null?this.removeAttribute(r):i==="cssnum"?this.setAttribute(r,Number(l)+"px"):i==="num"||i==="number"?this.setAttribute(r,Number(l)):i==="bl"||i==="bool"?this.setAttribute(r,String(!!l)):i==="json"?this.setAttribute(r,typeof l=="string"?l:JSON.stringify(l)):this.setAttribute(r,String(l))},configurable:!0,enumerable:!1})}}});var yd=h((kp,vo)=>{var ld=nt(),od=V(),ad=it(),cd=Hl(),ud=Xl(),_d=Ql(),fd=eo(),hd=so(),dd=Zs(),pd=tr(),gd=mo(),md=yo(),bd=$o();vo.exports={_ison:ld,_util:od,_nd:ad,_ele:cd,_attr:bd,_wait:ud,_ele_getter:_d,_cls_accessor:fd,_limit:hd,_code:dd,_ui:pd,_dnld:gd,_impt:md}});return yd();})();
package/index.js CHANGED
@@ -10,6 +10,7 @@ const _code = require("./code");
10
10
  const _ui = require("./ui");
11
11
  const _dnld = require("./dnld");
12
12
  const _impt = require("./impt");
13
+ const _attr = require("./attr-accessor")
13
14
 
14
15
  module.exports = {
15
16
  _ison,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nv-basic-bw",
3
- "version": "1.0.32",
3
+ "version": "1.0.33",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"
@@ -9,7 +9,7 @@
9
9
  "license": "ISC",
10
10
  "description": "",
11
11
  "dependencies": {
12
- "nv-basic-util-bw": "^1.0.5",
12
+ "nv-basic-util-bw": "^1.0.7",
13
13
  "nvison-bw": "^1.0.0"
14
14
  }
15
15
  }
package/util.js CHANGED
@@ -1,72 +1,5 @@
1
- const is_async = (f)=>f.constructor.name === "AsyncFunction";
2
- const is_url = (s)=>{
3
- if (typeof s !== "string") return false;
4
- s = s.trim();
5
- if (s === "") return false;
6
-
7
- // 快路径(你系统里最常见的)
8
- // 绝对 URL / 协议相对 / 绝对路径 / 相对路径
9
- if (
10
- s.startsWith("http://") ||
11
- s.startsWith("https://") ||
12
- s.startsWith("ws://") ||
13
- s.startsWith("wss://") ||
14
- s.startsWith("//") ||
15
- s.startsWith("/") ||
16
- s.startsWith("./") ||
17
- s.startsWith("../")
18
- ) {
19
- return true;
20
- }
21
-
22
- // data / blob / file / wasm 等(前端系统常见)
23
- if (/^(data|blob|file|wasm):/i.test(s)) {
24
- return true;
25
- }
26
- return false;
27
- }
28
-
29
- const fullfill_url = (url)=>{
30
- if(
31
- url.startsWith("http://") ||
32
- url.startsWith("https://") ||
33
- url.startsWith("ws://") ||
34
- url.startsWith("wss://") ||
35
- /^(data|blob|file|wasm):/i.test(url)
36
- ) {
37
- return url;
38
- } else if(
39
- url.startsWith("//") || url.startsWith("/") || url.startsWith("./") || url.startsWith("../")
40
- ) {
41
- // protocol-relative: //cdn/a.js
42
- if (url.startsWith("//")) {
43
- return window.location.protocol + url;
44
- }
45
- // absolute path: /a/b
46
- if (url.startsWith("/")) {
47
- return window.location.origin + url;
48
- }
49
- // relative path: ./a ../b foo/bar
50
- return new URL(url, window.location.href).href;
51
- } else {
52
- return url
53
- }
54
- }
55
-
56
- const creat_dt_prefix = () => new Date().toISOString().replace(/[:.]/g, "-");
57
-
58
- const CKRGX = /^(.*?)=["]?(.*)["]?$/;
59
- const get_ck = (s=document.cookie)=>{
60
- let arr = s.split("; ");
61
- let d = {};
62
- for(let e of arr) {
63
- let grps = CKRGX.exec(e);
64
- d[grps[1]] = grps[2];
65
- }
66
- return d;
67
- }
68
-
69
1
  const {
2
+ is_async,is_url,fullfill_url,creat_dt_prefix,get_ck,
70
3
  to_base64_uri,code2hscript,css2hlink,escape_text,
71
4
  dash_to_camel,dash_to_snake,attr_value_to_bool,css_str_to_num,
72
5
  ////