archgine 1.0.11 → 1.0.13

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.
@@ -3999,7 +3999,7 @@ Ss.__DOMHandler = mi;
3999
3999
  Ss.normalizeLineEndings = Hc;
4000
4000
  Ss.DOMParser = Vc;
4001
4001
  var Fy = Ss.DOMParser;
4002
- const Uy = "1.0.11";
4002
+ const Uy = "1.0.13";
4003
4003
  function qy() {
4004
4004
  return typeof window < "u" && ({}.toString.call(window) === "[object Window]" || {}.toString.call(window) === "[object global]");
4005
4005
  }
package/lib/index.d.ts CHANGED
@@ -4,5 +4,6 @@ export { GLOB } from './core/global.js';
4
4
  export { Color, ColorsEnum } from './math/color.js';
5
5
  export * as Vector2 from './math/vector2';
6
6
  export { Monitor } from './core/monitor';
7
+ export type { IApp } from './extras/interfaces';
7
8
  export { AppEnum, SvgApp } from './extras/svg-app';
8
9
  export { defaultConfig, EnvironmentWorker, };
package/lib/index.mjs CHANGED
@@ -3995,7 +3995,7 @@ ja.__DOMHandler = Fs;
3995
3995
  ja.normalizeLineEndings = cp;
3996
3996
  ja.DOMParser = fp;
3997
3997
  var fv = ja.DOMParser;
3998
- const pv = "1.0.11";
3998
+ const pv = "1.0.13";
3999
3999
  function dv() {
4000
4000
  return typeof window < "u" && ({}.toString.call(window) === "[object Window]" || {}.toString.call(window) === "[object global]");
4001
4001
  }
package/lib/index.umd.js CHANGED
@@ -2,7 +2,7 @@
2
2
  `,nexist:"∄",nexists:"∄",Nfr:"𝔑",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"⋙̸",ngsim:"≵",nGt:"≫⃒",ngt:"≯",ngtr:"≯",nGtv:"≫̸",nhArr:"⇎",nharr:"↮",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",NJcy:"Њ",njcy:"њ",nlArr:"⇍",nlarr:"↚",nldr:"‥",nlE:"≦̸",nle:"≰",nLeftarrow:"⇍",nleftarrow:"↚",nLeftrightarrow:"⇎",nleftrightarrow:"↮",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nLl:"⋘̸",nlsim:"≴",nLt:"≪⃒",nlt:"≮",nltri:"⋪",nltrie:"⋬",nLtv:"≪̸",nmid:"∤",NoBreak:"⁠",NonBreakingSpace:" ",Nopf:"ℕ",nopf:"𝕟",Not:"⫬",not:"¬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",notin:"∉",notindot:"⋵̸",notinE:"⋹̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",NotLeftTriangle:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangle:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",npar:"∦",nparallel:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",npre:"⪯̸",nprec:"⊀",npreceq:"⪯̸",nrArr:"⇏",nrarr:"↛",nrarrc:"⤳̸",nrarrw:"↝̸",nRightarrow:"⇏",nrightarrow:"↛",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",Nscr:"𝒩",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",Ntilde:"Ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",Nu:"Ν",nu:"ν",num:"#",numero:"№",numsp:" ",nvap:"≍⃒",nVDash:"⊯",nVdash:"⊮",nvDash:"⊭",nvdash:"⊬",nvge:"≥⃒",nvgt:">⃒",nvHarr:"⤄",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwarhk:"⤣",nwArr:"⇖",nwarr:"↖",nwarrow:"↖",nwnear:"⤧",Oacute:"Ó",oacute:"ó",oast:"⊛",ocir:"⊚",Ocirc:"Ô",ocirc:"ô",Ocy:"О",ocy:"о",odash:"⊝",Odblac:"Ő",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",OElig:"Œ",oelig:"œ",ofcir:"⦿",Ofr:"𝔒",ofr:"𝔬",ogon:"˛",Ograve:"Ò",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",Omacr:"Ō",omacr:"ō",Omega:"Ω",omega:"ω",Omicron:"Ο",omicron:"ο",omid:"⦶",ominus:"⊖",Oopf:"𝕆",oopf:"𝕠",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",operp:"⦹",oplus:"⊕",Or:"⩔",or:"∨",orarr:"↻",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",Oscr:"𝒪",oscr:"ℴ",Oslash:"Ø",oslash:"ø",osol:"⊘",Otilde:"Õ",otilde:"õ",Otimes:"⨷",otimes:"⊗",otimesas:"⨶",Ouml:"Ö",ouml:"ö",ovbar:"⌽",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",par:"∥",para:"¶",parallel:"∥",parsim:"⫳",parsl:"⫽",part:"∂",PartialD:"∂",Pcy:"П",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",Pfr:"𝔓",pfr:"𝔭",Phi:"Φ",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",Pi:"Π",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plus:"+",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"ℌ",pointint:"⨕",Popf:"ℙ",popf:"𝕡",pound:"£",Pr:"⪻",pr:"≺",prap:"⪷",prcue:"≼",prE:"⪳",pre:"⪯",prec:"≺",precapprox:"⪷",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",precsim:"≾",Prime:"″",prime:"′",primes:"ℙ",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"∏",Product:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",Proportion:"∷",Proportional:"∝",propto:"∝",prsim:"≾",prurel:"⊰",Pscr:"𝒫",pscr:"𝓅",Psi:"Ψ",psi:"ψ",puncsp:" ",Qfr:"𝔔",qfr:"𝔮",qint:"⨌",Qopf:"ℚ",qopf:"𝕢",qprime:"⁗",Qscr:"𝒬",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",QUOT:'"',quot:'"',rAarr:"⇛",race:"∽̱",Racute:"Ŕ",racute:"ŕ",radic:"√",raemptyv:"⦳",Rang:"⟫",rang:"⟩",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",Rarr:"↠",rArr:"⇒",rarr:"→",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",Rarrtl:"⤖",rarrtl:"↣",rarrw:"↝",rAtail:"⤜",ratail:"⤚",ratio:"∶",rationals:"ℚ",RBarr:"⤐",rBarr:"⤏",rbarr:"⤍",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",Rcaron:"Ř",rcaron:"ř",Rcedil:"Ŗ",rcedil:"ŗ",rceil:"⌉",rcub:"}",Rcy:"Р",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",Re:"ℜ",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",rect:"▭",REG:"®",reg:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",Rfr:"ℜ",rfr:"𝔯",rHar:"⥤",rhard:"⇁",rharu:"⇀",rharul:"⥬",Rho:"Ρ",rho:"ρ",rhov:"ϱ",RightAngleBracket:"⟩",RightArrow:"→",Rightarrow:"⇒",rightarrow:"→",RightArrowBar:"⇥",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",RightTee:"⊢",RightTeeArrow:"↦",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangle:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",RightVectorBar:"⥓",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"‏",rmoust:"⎱",rmoustache:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",Ropf:"ℝ",ropf:"𝕣",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"›",Rscr:"ℛ",rscr:"𝓇",Rsh:"↱",rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",RuleDelayed:"⧴",ruluhar:"⥨",rx:"℞",Sacute:"Ś",sacute:"ś",sbquo:"‚",Sc:"⪼",sc:"≻",scap:"⪸",Scaron:"Š",scaron:"š",sccue:"≽",scE:"⪴",sce:"⪰",Scedil:"Ş",scedil:"ş",Scirc:"Ŝ",scirc:"ŝ",scnap:"⪺",scnE:"⪶",scnsim:"⋩",scpolint:"⨓",scsim:"≿",Scy:"С",scy:"с",sdot:"⋅",sdotb:"⊡",sdote:"⩦",searhk:"⤥",seArr:"⇘",searr:"↘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",Sfr:"𝔖",sfr:"𝔰",sfrown:"⌢",sharp:"♯",SHCHcy:"Щ",shchcy:"щ",SHcy:"Ш",shcy:"ш",ShortDownArrow:"↓",ShortLeftArrow:"←",shortmid:"∣",shortparallel:"∥",ShortRightArrow:"→",ShortUpArrow:"↑",shy:"­",Sigma:"Σ",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",SmallCircle:"∘",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",SOFTcy:"Ь",softcy:"ь",sol:"/",solb:"⧄",solbar:"⌿",Sopf:"𝕊",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",squ:"□",Square:"□",square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"▪",squf:"▪",srarr:"→",Sscr:"𝒮",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",Star:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",Sub:"⋐",sub:"⊂",subdot:"⪽",subE:"⫅",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",Subset:"⋐",subset:"⊂",subseteq:"⊆",subseteqq:"⫅",SubsetEqual:"⊆",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succ:"≻",succapprox:"⪸",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",SuchThat:"∋",Sum:"∑",sum:"∑",sung:"♪",Sup:"⋑",sup:"⊃",sup1:"¹",sup2:"²",sup3:"³",supdot:"⪾",supdsub:"⫘",supE:"⫆",supe:"⊇",supedot:"⫄",Superset:"⊃",SupersetEqual:"⊇",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",Supset:"⋑",supset:"⊃",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swarhk:"⤦",swArr:"⇙",swarr:"↙",swarrow:"↙",swnwar:"⤪",szlig:"ß",Tab:" ",target:"⌖",Tau:"Τ",tau:"τ",tbrk:"⎴",Tcaron:"Ť",tcaron:"ť",Tcedil:"Ţ",tcedil:"ţ",Tcy:"Т",tcy:"т",tdot:"⃛",telrec:"⌕",Tfr:"𝔗",tfr:"𝔱",there4:"∴",Therefore:"∴",therefore:"∴",Theta:"Θ",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",ThickSpace:"  ",thinsp:" ",ThinSpace:" ",thkap:"≈",thksim:"∼",THORN:"Þ",thorn:"þ",Tilde:"∼",tilde:"˜",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",times:"×",timesb:"⊠",timesbar:"⨱",timesd:"⨰",tint:"∭",toea:"⤨",top:"⊤",topbot:"⌶",topcir:"⫱",Topf:"𝕋",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",TRADE:"™",trade:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",Tscr:"𝒯",tscr:"𝓉",TScy:"Ц",tscy:"ц",TSHcy:"Ћ",tshcy:"ћ",Tstrok:"Ŧ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",Uacute:"Ú",uacute:"ú",Uarr:"↟",uArr:"⇑",uarr:"↑",Uarrocir:"⥉",Ubrcy:"Ў",ubrcy:"ў",Ubreve:"Ŭ",ubreve:"ŭ",Ucirc:"Û",ucirc:"û",Ucy:"У",ucy:"у",udarr:"⇅",Udblac:"Ű",udblac:"ű",udhar:"⥮",ufisht:"⥾",Ufr:"𝔘",ufr:"𝔲",Ugrave:"Ù",ugrave:"ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",Umacr:"Ū",umacr:"ū",uml:"¨",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",uogon:"ų",Uopf:"𝕌",uopf:"𝕦",UpArrow:"↑",Uparrow:"⇑",uparrow:"↑",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",UpDownArrow:"↕",Updownarrow:"⇕",updownarrow:"↕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",Upsi:"ϒ",upsi:"υ",upsih:"ϒ",Upsilon:"Υ",upsilon:"υ",UpTee:"⊥",UpTeeArrow:"↥",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",Uring:"Ů",uring:"ů",urtri:"◹",Uscr:"𝒰",uscr:"𝓊",utdot:"⋰",Utilde:"Ũ",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",Uuml:"Ü",uuml:"ü",uwangle:"⦧",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",vArr:"⇕",varr:"↕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",Vbar:"⫫",vBar:"⫨",vBarv:"⫩",Vcy:"В",vcy:"в",VDash:"⊫",Vdash:"⊩",vDash:"⊨",vdash:"⊢",Vdashl:"⫦",Vee:"⋁",vee:"∨",veebar:"⊻",veeeq:"≚",vellip:"⋮",Verbar:"‖",verbar:"|",Vert:"‖",vert:"|",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",Vopf:"𝕍",vopf:"𝕧",vprop:"∝",vrtri:"⊳",Vscr:"𝒱",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",Vvdash:"⊪",vzigzag:"⦚",Wcirc:"Ŵ",wcirc:"ŵ",wedbar:"⩟",Wedge:"⋀",wedge:"∧",wedgeq:"≙",weierp:"℘",Wfr:"𝔚",wfr:"𝔴",Wopf:"𝕎",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",Wscr:"𝒲",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",Xfr:"𝔛",xfr:"𝔵",xhArr:"⟺",xharr:"⟷",Xi:"Ξ",xi:"ξ",xlArr:"⟸",xlarr:"⟵",xmap:"⟼",xnis:"⋻",xodot:"⨀",Xopf:"𝕏",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrArr:"⟹",xrarr:"⟶",Xscr:"𝒳",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",Yacute:"Ý",yacute:"ý",YAcy:"Я",yacy:"я",Ycirc:"Ŷ",ycirc:"ŷ",Ycy:"Ы",ycy:"ы",yen:"¥",Yfr:"𝔜",yfr:"𝔶",YIcy:"Ї",yicy:"ї",Yopf:"𝕐",yopf:"𝕪",Yscr:"𝒴",yscr:"𝓎",YUcy:"Ю",yucy:"ю",Yuml:"Ÿ",yuml:"ÿ",Zacute:"Ź",zacute:"ź",Zcaron:"Ž",zcaron:"ž",Zcy:"З",zcy:"з",Zdot:"Ż",zdot:"ż",zeetrf:"ℨ",ZeroWidthSpace:"​",Zeta:"Ζ",zeta:"ζ",Zfr:"ℨ",zfr:"𝔷",ZHcy:"Ж",zhcy:"ж",zigrarr:"⇝",Zopf:"ℤ",zopf:"𝕫",Zscr:"𝒵",zscr:"𝓏",zwj:"‍",zwnj:"‌"}),n.entityMap=n.HTML_ENTITIES})(sh);var vu={},Wn=bi.NAMESPACE,xu=/[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,ah=new RegExp("[\\-\\.0-9"+xu.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),uh=new RegExp("^"+xu.source+ah.source+"*(?::"+xu.source+ah.source+"*)?$"),zn=0,Zi=1,Kr=2,Vn=3,Qr=4,Jr=5,$n=6,Ys=7;function jr(n,t){this.message=n,this.locator=t,Error.captureStackTrace&&Error.captureStackTrace(this,jr)}jr.prototype=new Error,jr.prototype.name=jr.name;function oh(){}oh.prototype={parse:function(n,t,e){var r=this.domBuilder;r.startDocument(),ch(t,t={}),ad(n,t,e,r,this.errorHandler),r.endDocument()}};function ad(n,t,e,r,a){function u(B){if(B>65535){B-=65536;var Pt=55296+(B>>10),Pe=56320+(B&1023);return String.fromCharCode(Pt,Pe)}else return String.fromCharCode(B)}function l(B){var Pt=B.slice(1,-1);return Object.hasOwnProperty.call(e,Pt)?e[Pt]:Pt.charAt(0)==="#"?u(parseInt(Pt.substr(1).replace("x","0x"))):(a.error("entity not found:"+B),B)}function c(B){if(B>S){var Pt=n.substring(S,B).replace(/&#?\w+;/g,l);A&&f(S),r.characters(Pt,0,B-S),S=B}}function f(B,Pt){for(;B>=x&&(Pt=E.exec(n));)g=Pt.index,x=g+Pt[0].length,A.lineNumber++;A.columnNumber=B-g+1}for(var g=0,x=0,E=/.*(?:\r\n?|\n)|.*$/g,A=r.locator,T=[{currentNSMap:t}],I={},S=0;;){try{var D=n.indexOf("<",S);if(D<0){if(!n.substr(S).match(/^\s*$/)){var q=r.doc,V=q.createTextNode(n.substr(S));q.appendChild(V),r.currentElement=V}return}switch(D>S&&c(D),n.charAt(D+1)){case"/":var nt=n.indexOf(">",D+3),W=n.substring(D+2,nt).replace(/[ \t\n\r]+$/g,""),X=T.pop();nt<0?(W=n.substring(D+2).replace(/[\s<].*/,""),a.error("end tag name: "+W+" is not complete:"+X.tagName),nt=D+1+W.length):W.match(/\s</)&&(W=W.replace(/[\s<].*/,""),a.error("end tag name: "+W+" maybe not complete"),nt=D+1+W.length);var $=X.localNSMap,K=X.tagName==W,tt=K||X.tagName&&X.tagName.toLowerCase()==W.toLowerCase();if(tt){if(r.endElement(X.uri,X.localName,W),$)for(var Z in $)Object.prototype.hasOwnProperty.call($,Z)&&r.endPrefixMapping(Z);K||a.fatalError("end tag name: "+W+" is not match the current start tagName:"+X.tagName)}else T.push(X);nt++;break;case"?":A&&f(D),nt=cd(n,D,r);break;case"!":A&&f(D),nt=hd(n,D,r,a);break;default:A&&f(D);var z=new fh,J=T[T.length-1].currentNSMap,nt=ud(n,D,z,J,l,a),mt=z.length;if(!z.closed&&ld(n,nt,z.tagName,I)&&(z.closed=!0,e.nbsp||a.warning("unclosed xml attribute")),A&&mt){for(var It=lh(A,{}),Ct=0;Ct<mt;Ct++){var yt=z[Ct];f(yt.offset),yt.locator=lh(A,{})}r.locator=It,hh(z,r,J)&&T.push(z),r.locator=A}else hh(z,r,J)&&T.push(z);Wn.isHTML(z.uri)&&!z.closed?nt=od(n,nt,z.tagName,l,r):nt++}}catch(B){if(B instanceof jr)throw B;a.error("element parse error: "+B),nt=-1}nt>S?S=nt:c(Math.max(D,S)+1)}}function lh(n,t){return t.lineNumber=n.lineNumber,t.columnNumber=n.columnNumber,t}function ud(n,t,e,r,a,u){function l(A,T,I){e.attributeNames.hasOwnProperty(A)&&u.fatalError("Attribute "+A+" redefined"),e.addValue(A,T.replace(/[\t\n\r]/g," ").replace(/&#?\w+;/g,a),I)}for(var c,f,g=++t,x=zn;;){var E=n.charAt(g);switch(E){case"=":if(x===Zi)c=n.slice(t,g),x=Vn;else if(x===Kr)x=Vn;else throw new Error("attribute equal must after attrName");break;case"'":case'"':if(x===Vn||x===Zi)if(x===Zi&&(u.warning('attribute value must after "="'),c=n.slice(t,g)),t=g+1,g=n.indexOf(E,t),g>0)f=n.slice(t,g),l(c,f,t-1),x=Jr;else throw new Error("attribute value no end '"+E+"' match");else if(x==Qr)f=n.slice(t,g),l(c,f,t),u.warning('attribute "'+c+'" missed start quot('+E+")!!"),t=g+1,x=Jr;else throw new Error('attribute value must after "="');break;case"/":switch(x){case zn:e.setTagName(n.slice(t,g));case Jr:case $n:case Ys:x=Ys,e.closed=!0;case Qr:case Zi:break;case Kr:e.closed=!0;break;default:throw new Error("attribute invalid close char('/')")}break;case"":return u.error("unexpected end of input"),x==zn&&e.setTagName(n.slice(t,g)),g;case">":switch(x){case zn:e.setTagName(n.slice(t,g));case Jr:case $n:case Ys:break;case Qr:case Zi:f=n.slice(t,g),f.slice(-1)==="/"&&(e.closed=!0,f=f.slice(0,-1));case Kr:x===Kr&&(f=c),x==Qr?(u.warning('attribute "'+f+'" missed quot(")!'),l(c,f,t)):((!Wn.isHTML(r[""])||!f.match(/^(?:disabled|checked|selected)$/i))&&u.warning('attribute "'+f+'" missed value!! "'+f+'" instead!!'),l(f,f,t));break;case Vn:throw new Error("attribute value missed!!")}return g;case"€":E=" ";default:if(E<=" ")switch(x){case zn:e.setTagName(n.slice(t,g)),x=$n;break;case Zi:c=n.slice(t,g),x=Kr;break;case Qr:var f=n.slice(t,g);u.warning('attribute "'+f+'" missed quot(")!!'),l(c,f,t);case Jr:x=$n;break}else switch(x){case Kr:e.tagName,(!Wn.isHTML(r[""])||!c.match(/^(?:disabled|checked|selected)$/i))&&u.warning('attribute "'+c+'" missed value!! "'+c+'" instead2!!'),l(c,c,t),t=g,x=Zi;break;case Jr:u.warning('attribute space is required"'+c+'"!!');case $n:x=Zi,t=g;break;case Vn:x=Qr,t=g;break;case Ys:throw new Error("elements closed character '/' and '>' must be connected to")}}g++}}function hh(n,t,e){for(var r=n.tagName,a=null,E=n.length;E--;){var u=n[E],l=u.qName,c=u.value,A=l.indexOf(":");if(A>0)var f=u.prefix=l.slice(0,A),g=l.slice(A+1),x=f==="xmlns"&&g;else g=l,f=null,x=l==="xmlns"&&"";u.localName=g,x!==!1&&(a==null&&(a={},ch(e,e={})),e[x]=a[x]=c,u.uri=Wn.XMLNS,t.startPrefixMapping(x,c))}for(var E=n.length;E--;){u=n[E];var f=u.prefix;f&&(f==="xml"&&(u.uri=Wn.XML),f!=="xmlns"&&(u.uri=e[f||""]))}var A=r.indexOf(":");A>0?(f=n.prefix=r.slice(0,A),g=n.localName=r.slice(A+1)):(f=null,g=n.localName=r);var T=n.uri=e[f||""];if(t.startElement(T,g,r,n),n.closed){if(t.endElement(T,g,r),a)for(f in a)Object.prototype.hasOwnProperty.call(a,f)&&t.endPrefixMapping(f)}else return n.currentNSMap=e,n.localNSMap=a,!0}function od(n,t,e,r,a){if(/^(?:script|textarea)$/i.test(e)){var u=n.indexOf("</"+e+">",t),l=n.substring(t+1,u);if(/[&<]/.test(l))return/^script$/i.test(e)?(a.characters(l,0,l.length),u):(l=l.replace(/&#?\w+;/g,r),a.characters(l,0,l.length),u)}return t+1}function ld(n,t,e,r){var a=r[e];return a==null&&(a=n.lastIndexOf("</"+e+">"),a<t&&(a=n.lastIndexOf("</"+e)),r[e]=a),a<t}function ch(n,t){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])}function hd(n,t,e,r){var a=n.charAt(t+2);switch(a){case"-":if(n.charAt(t+3)==="-"){var u=n.indexOf("-->",t+4);return u>t?(e.comment(n,t+4,u-t-4),u+3):(r.error("Unclosed comment"),-1)}else return-1;default:if(n.substr(t+3,6)=="CDATA["){var u=n.indexOf("]]>",t+9);return e.startCDATA(),e.characters(n,t+9,u-t-9),e.endCDATA(),u+3}var l=fd(n,t),c=l.length;if(c>1&&/!doctype/i.test(l[0][0])){var f=l[1][0],g=!1,x=!1;c>3&&(/^public$/i.test(l[2][0])?(g=l[3][0],x=c>4&&l[4][0]):/^system$/i.test(l[2][0])&&(x=l[3][0]));var E=l[c-1];return e.startDTD(f,g,x),e.endDTD(),E.index+E[0].length}}return-1}function cd(n,t,e){var r=n.indexOf("?>",t);if(r){var a=n.substring(t,r).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);return a?(a[0].length,e.processingInstruction(a[1],a[2]),r+2):-1}return-1}function fh(){this.attributeNames={}}fh.prototype={setTagName:function(n){if(!uh.test(n))throw new Error("invalid tagName:"+n);this.tagName=n},addValue:function(n,t,e){if(!uh.test(n))throw new Error("invalid attribute:"+n);this.attributeNames[n]=this.length,this[this.length++]={qName:n,value:t,offset:e}},length:0,getLocalName:function(n){return this[n].localName},getLocator:function(n){return this[n].locator},getQName:function(n){return this[n].qName},getURI:function(n){return this[n].uri},getValue:function(n){return this[n].value}};function fd(n,t){var e,r=[],a=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;for(a.lastIndex=t,a.exec(n);e=a.exec(n);)if(r.push(e),e[1])return r}vu.XMLReader=oh,vu.ParseError=jr;var pd=bi,dd=Yi,ph=sh,dh=vu,gd=dd.DOMImplementation,gh=pd.NAMESPACE,md=dh.ParseError,yd=dh.XMLReader;function mh(n){return n.replace(/\r[\n\u0085]/g,`
3
3
  `).replace(/[\r\u0085\u2028]/g,`
4
4
  `)}function yh(n){this.options=n||{locator:{}}}yh.prototype.parseFromString=function(n,t){var e=this.options,r=new yd,a=e.domBuilder||new Gn,u=e.errorHandler,l=e.locator,c=e.xmlns||{},f=/\/x?html?$/.test(t),g=f?ph.HTML_ENTITIES:ph.XML_ENTITIES;l&&a.setDocumentLocator(l),r.errorHandler=vd(u,a,l),r.domBuilder=e.domBuilder||a,f&&(c[""]=gh.HTML),c.xml=c.xml||gh.XML;var x=e.normalizeLineEndings||mh;return n&&typeof n=="string"?r.parse(x(n),c,g):r.errorHandler.error("invalid doc source"),a.doc};function vd(n,t,e){if(!n){if(t instanceof Gn)return t;n=t}var r={},a=n instanceof Function;e=e||{};function u(l){var c=n[l];!c&&a&&(c=n.length==2?function(f){n(l,f)}:n),r[l]=c&&function(f){c("[xmldom "+l+"] "+f+Eu(e))}||function(){}}return u("warning"),u("error"),u("fatalError"),r}function Gn(){this.cdata=!1}function tn(n,t){t.lineNumber=n.lineNumber,t.columnNumber=n.columnNumber}Gn.prototype={startDocument:function(){this.doc=new gd().createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(n,t,e,r){var a=this.doc,u=a.createElementNS(n,e||t),l=r.length;Zs(this,u),this.currentElement=u,this.locator&&tn(this.locator,u);for(var c=0;c<l;c++){var n=r.getURI(c),f=r.getValue(c),e=r.getQName(c),g=a.createAttributeNS(n,e);this.locator&&tn(r.getLocator(c),g),g.value=g.nodeValue=f,u.setAttributeNode(g)}},endElement:function(n,t,e){var r=this.currentElement;r.tagName,this.currentElement=r.parentNode},startPrefixMapping:function(n,t){},endPrefixMapping:function(n){},processingInstruction:function(n,t){var e=this.doc.createProcessingInstruction(n,t);this.locator&&tn(this.locator,e),Zs(this,e)},ignorableWhitespace:function(n,t,e){},characters:function(n,t,e){if(n=vh.apply(this,arguments),n){if(this.cdata)var r=this.doc.createCDATASection(n);else var r=this.doc.createTextNode(n);this.currentElement?this.currentElement.appendChild(r):/^\s*$/.test(n)&&this.doc.appendChild(r),this.locator&&tn(this.locator,r)}},skippedEntity:function(n){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(n){(this.locator=n)&&(n.lineNumber=0)},comment:function(n,t,e){n=vh.apply(this,arguments);var r=this.doc.createComment(n);this.locator&&tn(this.locator,r),Zs(this,r)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(n,t,e){var r=this.doc.implementation;if(r&&r.createDocumentType){var a=r.createDocumentType(n,t,e);this.locator&&tn(this.locator,a),Zs(this,a),this.doc.doctype=a}},warning:function(n){console.warn("[xmldom warning] "+n,Eu(this.locator))},error:function(n){console.error("[xmldom error] "+n,Eu(this.locator))},fatalError:function(n){throw new md(n,this.locator)}};function Eu(n){if(n)return`
5
- @`+(n.systemId||"")+"#[line:"+n.lineNumber+",col:"+n.columnNumber+"]"}function vh(n,t,e){return typeof n=="string"?n.substr(t,e):n.length>=t+e||t?new java.lang.String(n,t,e)+"":n}"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,function(n){Gn.prototype[n]=function(){return null}});function Zs(n,t){n.currentElement?n.currentElement.appendChild(t):n.doc.appendChild(t)}Xs.__DOMHandler=Gn,Xs.normalizeLineEndings=mh,Xs.DOMParser=yh;var xd=Xs.DOMParser;const Ed="1.0.11";function Ad(){return typeof window<"u"&&({}.toString.call(window)==="[object Window]"||{}.toString.call(window)==="[object global]")}const en=typeof window<"u"?window:typeof WorkerGlobalScope<"u"?self:{document:void 0,tinyEngine:void 0};en.Path2D||Hp(en),en.DOMParser||(en.DOMParser=xd);const gt={window:en,version:Ed,isBrowser:Ad(),dpr:typeof window<"u"&&window.devicePixelRatio||1,document:en.document,time:0,deltaTime:0,config:$r},Xn=(n,t,e)=>Math.max(t,Math.min(e,n)),Ki=(n,t=1e-6)=>Math.abs(n)<t?0:n<0?-1:1,Ks=n=>n*(Math.PI/180),bd=(n,t)=>(n%t+t)%t,Au=(n,t,e)=>(1-e)*n+e*t,wd=n=>{let t=n*(180/Math.PI);return t<0&&(t+=360),t>360&&(t-=360),t},be={transparent:"rgba(1, 1, 1, 0)",green:"#45b787",darkGreen:"#314a43",blue:"#6e9bc5",darkBlue:"#2775b6",red:"#F26666",darkRed:"#D95970",brown:"#ECD2B9",darkBrown:"#BF9D8A",yellow:"#ECDEC0",darkYellow:"#D0AC57",lightGray:"#e0e0e0",gray:"#beb6b6",darkGray:"#918883",white:"#F2F2F2",darkWhite:"#ececec",lightBlack:"#2E3032",black:"#182327",blackAlpha5:"rgba(0, 0, 0, 0.5)"},Td={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},Ye={h:0,s:0,l:0},Qs={h:0,s:0,l:0};function bu(n,t,e){return e<0&&(e+=1),e>1&&(e-=1),e<1/6?n+(t-n)*6*e:e<1/2?t:e<2/3?n+(t-n)*6*(2/3-e):n}const _d=/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3}|[A-Fa-f0-9]{8})$|rgb\(\s*\d+\s*,\s*\d+\s*,\s*\d+\s*\)|rgba\(\s*\d+\s*,\s*\d+\s*,\s*\d+\s*,\s*[\d.]+\s*\)/;class we{isColor=!0;r=1;g=1;b=1;a=1;constructor(t,e,r,a){return e===void 0&&r===void 0?this.set(t):this.setRGBA(t,e,r,a)}static isColor(t){return typeof t=="string"?_d.test(t):typeof t=="number"?t>=0&&t<=16777215:!1}static getRandomStyle(){return Qi.random().getStyle()}static getDarken(t,e=.8){return Qi.set(t).getHSL(Js),Qi.setHSL(Js.h,Js.s,Js.l*e).getStyle()}static getLighten(t,e=1.2){return this.getDarken(t,e)}static getContrast(t){return Qi.set(t),Qi.getContrastString()}static getArray(t){return Qi.set(t).toArray()}static getComplementary(t){return Qi.set(t),Qi.getComplementaryString()}set(t){return t&&t.isColor?this.copy(t):typeof t=="number"?this.setHex(t):typeof t=="string"&&this.setStyle(t),this}random(){return this.setHex(Math.floor(Math.random()*(1<<24)))}setScalar(t){return this.r=t,this.g=t,this.b=t,this.a=1,this}setHex(t){return t=Math.floor(t),this.r=(t>>16&255)/255,this.g=(t>>8&255)/255,this.b=(t&255)/255,this.a=1,this}setR(t){return this.r=t,this}setG(t){return this.g=t,this}setB(t){return this.b=t,this}setA(t){return this.a=t,this}setRGB(t,e,r){return this.setRGBA(t,e,r,this.a)}setRGBA(t,e,r,a=1){return this.r=t,this.g=e,this.b=r,this.a=a,this}setHSL(t,e,r,a=1){if(t=bd(t,1),e=Xn(e,0,1),r=Xn(r,0,1),e===0)this.r=this.g=this.b=r;else{const u=r<=.5?r*(1+e):r+e-r*e,l=2*r-u;this.r=bu(l,u,t+1/3),this.g=bu(l,u,t),this.b=bu(l,u,t-1/3)}return this.a=a,this}setStyle(t){let e;if(e=/^((?:rgb|hsl)a?)\(([^\)]*)\)/.exec(t)){let r;const a=e[1],u=e[2];switch(a){case"rgb":case"rgba":if(r=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(u))return this.r=Math.min(255,parseInt(r[1],10))/255,this.g=Math.min(255,parseInt(r[2],10))/255,this.b=Math.min(255,parseInt(r[3],10))/255,this.a=Math.max(Math.min(1,r[4]!==void 0?parseFloat(r[4]):1),0),this;if(r=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(u))return this.r=Math.min(100,parseInt(r[1],10))/100,this.g=Math.min(100,parseInt(r[2],10))/100,this.b=Math.min(100,parseInt(r[3],10))/100,this.a=Math.max(Math.min(1,r[4]!==void 0?parseFloat(r[4]):1),0),this;break;case"hsl":case"hsla":if(r=/^\s*(\d*\.?\d+)\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(u)){const l=parseFloat(r[1])/360,c=parseInt(r[2],10)/100,f=parseInt(r[3],10)/100,g=Math.max(Math.min(1,r[4]!==void 0?parseFloat(r[4]):1),0);return this.setHSL(l,c,f,g)}break}}else if(e=/^\#([A-Fa-f\d]+)$/.exec(t)){const r=e[1],a=r.length;if(a===3)return this.r=parseInt(r.charAt(0)+r.charAt(0),16)/255,this.g=parseInt(r.charAt(1)+r.charAt(1),16)/255,this.b=parseInt(r.charAt(2)+r.charAt(2),16)/255,this.a=1,this;if(a===6)return this.r=parseInt(r.charAt(0)+r.charAt(1),16)/255,this.g=parseInt(r.charAt(2)+r.charAt(3),16)/255,this.b=parseInt(r.charAt(4)+r.charAt(5),16)/255,this.a=1,this}return t&&t.length>0?this.setColorName(t):this}setColorName(t){const e=Td[t.toLowerCase()];return e!==void 0?this.setHex(e):console.warn("Color: Unknown color "+t),this}clone(){return new we(this.r,this.g,this.b,this.a)}copy(t){return this.r=t.r,this.g=t.g,this.b=t.b,this.a=t.a,this}getRGB(t=new we){return t.setRGB(this.r,this.g,this.b)}getRGBByBg(t=new we){const e=this.a,r=e*this.r+(1-e)*t.r,a=e*this.g+(1-e)*t.g,u=e*this.b+(1-e)*t.b;return new we(r,a,u)}getHex(){return Xn(this.r*255,0,255)<<16^Xn(this.g*255,0,255)<<8^Xn(this.b*255,0,255)<<0}getHSL(t){const e=this.r,r=this.g,a=this.b,u=Math.max(e,r,a),l=Math.min(e,r,a);let c=0,f;const g=(l+u)/2;if(l===u)c=0,f=0;else{const x=u-l;switch(f=g<=.5?x/(u+l):x/(2-u-l),u){case e:c=(r-a)/x+(r<a?6:0);break;case r:c=(a-e)/x+2;break;case a:c=(e-r)/x+4;break}c/=6}return t.h=c,t.s=f,t.l=g,t}getStyle(){return this.a===1?`rgb(${this.r*255|0},${this.g*255|0},${this.b*255|0})`:`rgba(${this.r*255|0},${this.g*255|0},${this.b*255|0},${this.a||1})`}getHexString(){return"#"+("000000"+this.getHex().toString(16)).slice(-6)}getBrightness(){let t=(this.r*255*299+this.g*255*587+this.b*255*144)/1e3;return t+=(255-t)*(255-this.a*255)/255,t}getContrastString(){return this.getBrightness()>125?"#2f2f2f":"#f2f2f2"}getComplementary(t=new we){const e=this.toArray(),r=[0,0,0,1];for(let a=0;a<e.length;a++)if(a<3)r[a]=1-e[a];else if(a===3)e[a]>1||e[a]<=0?r[a]=1:r[a]=Math.max(Math.min(parseFloat(e[a].toFixed(2)),1),0);else continue;return t.setRGBA(r[0],r[1],r[2],parseFloat(r[3].toFixed(2)))}getComplementaryString(){return this.getComplementary().getStyle()}getLightenOrDarken(t){if(typeof t>"u"||t>=1)return this.getHexString();const e=this.getRGBByBg(),r=e.r*t+(1-t),a=e.g*t+(1-t),u=e.b*t+(1-t);return new we(r,a,u).getHexString()}getNormalized(){return[parseFloat(Math.max(Math.min(this.r,1),0).toFixed(2)),parseFloat(Math.max(Math.min(this.g,1),0).toFixed(2)),parseFloat(Math.max(Math.min(this.b,1),0).toFixed(2)),parseFloat(Math.max(Math.min(this.a,1),0).toFixed(2))]}getNormalized3(){return[parseFloat(Math.max(Math.min(this.r,1),0).toFixed(2)),parseFloat(Math.max(Math.min(this.g,1),0).toFixed(2)),parseFloat(Math.max(Math.min(this.b,1),0).toFixed(2))]}offsetHSL(t,e,r){return this.getHSL(Ye),Ye.h+=t,Ye.s+=e,Ye.l+=r,this.setHSL(Ye.h,Ye.s,Ye.l),this}add(t){return this.r+=t.r,this.g+=t.g,this.b+=t.b,this}addColors(t,e){return this.r=t.r+e.r,this.g=t.g+e.g,this.b=t.b+e.b,this}addScalar(t){return this.r+=t,this.g+=t,this.b+=t,this}sub(t){return this.r=Math.max(0,this.r-t.r),this.g=Math.max(0,this.g-t.g),this.b=Math.max(0,this.b-t.b),this}multiply(t){return this.r*=t.r,this.g*=t.g,this.b*=t.b,this}multiplyScalar(t){return this.r*=t,this.g*=t,this.b*=t,this}lerp(t,e){return this.r+=(t.r-this.r)*e,this.g+=(t.g-this.g)*e,this.b+=(t.b-this.b)*e,this}lerpColors(t,e,r){return this.r=t.r+(e.r-t.r)*r,this.g=t.g+(e.g-t.g)*r,this.b=t.b+(e.b-t.b)*r,this}lerpHSL(t,e){this.getHSL(Ye),t.getHSL(Qs);const r=Au(Ye.h,Qs.h,e),a=Au(Ye.s,Qs.s,e),u=Au(Ye.l,Qs.l,e);return this.setHSL(r,a,u),this}equals(t){return t.r===this.r&&t.g===this.g&&t.b===this.b}fromArray(t,e=0){return this.r=t[e],this.g=t[e+1],this.b=t[e+2],this.a=t[e+3],this}toArray(t=[0,0,0,0],e=0){return t[e]=this.r,t[e+1]=this.g,t[e+2]=this.b,t[e+3]=this.a,t}fromBufferAttribute(t,e){return this.r=t.getX(e),this.g=t.getY(e),this.b=t.getZ(e),t.normalized===!0&&(this.r/=255,this.g/=255,this.b/=255),this}toJSON(){return this.getHex()}*[Symbol.iterator](){yield this.r,yield this.g,yield this.b}}const Qi=new we,Js={h:0,s:0,l:0};class L{isVector2=!0;x=0;y=0;z;constructor(t=0,e=0,r){this.x=t,this.y=e,this.z=r||0}static isZero(t){return t.x===0&&t.y===0}static isEmpty(t){return!Number.isFinite(t.x)&&!Number.isFinite(t.y)}static equals(t,e,r=!0){return r?t.x===e.x&&t.y===e.y:Math.abs(t.x-e.x)<Number.EPSILON&&Math.abs(t.y-e.y)<Number.EPSILON}static getInt32Array(t,e=2){const r=new ArrayBuffer(t.length*e*4),a=new Int32Array(r);for(let u=0,l=t.length;u<l;u++)a[u*2]=t[u].x,a[u*2+1]=t[u].y;return a}static getFloat64Array(t,e=2){const r=new ArrayBuffer(t.length*e*8),a=new Float64Array(r);for(let u=0,l=t.length;u<l;u++)a[u*2]=t[u].x,a[u*2+1]=t[u].y;return a}static getVectors(t){const e=[];for(let r=0,a=t.length;r<a;r++)e.push(new L(t[r].x,t[r].y));return e}static getStrings(t){const e=[];if(!t||!t.length)return"";for(let r=0,a=t.length;r<a;r++)e.push(L.getString(t[r]));return e.join(",")}static getString(t){return`${t.x},${t.y}`}static getLength(t){return Math.sqrt(t.x*t.x+t.y*t.y)}static getDistance(t,e){return Math.sqrt((t.x-e.x)*(t.x-e.x)+(t.y-e.y)*(t.y-e.y))}static dot(t,e){return t.x*e.y+t.y*e.x}static cross(t,e){return t.x*e.y-t.y*e.x}static sub(t,e){return new L().subVectors(t,e)}static isPointOnSegment(t,e,r){return Ki(this.sub(t,r).cross(this.sub(e,r)))===0&&Ki(this.sub(t,r).dot(this.sub(e,r)))<=0}static angle(t,e,r){return r?Math.atan2(t.y-e.y,t.x-e.x):wd(Math.atan2(t.y-e.y,t.x-e.x))}static getSamplingPoints(t,e=100){let r=this.getClothoidPoints(t,e),a=0;for(let u=0,l=r.length;u<l;u++){let c=Math.max(0,u-1);u>0?a+=this.getDistance(r[c],r[c+1]):a=0,r[u].l=Math.round(a);let f=this.angle(r[c+1],r[c]);r[u].a=Math.round(f*100)/100}return r}static getClothoidPoints(t,e=100){let r=[],a=t.concat([]);if(!a||a.length<2)return r;a.length===2?(a.push(a[1]),a.unshift(a[0])):a.length===3&&a.splice(2,0,a[1]);for(let u=0;u<a.length-3;u+=3){let l=new L(a[u].x,a[u].y),c=new L(a[u+1].x,a[u+1].y),f=new L(a[u+2].x,a[u+2].y),g=new L(a[u+3].x,a[u+3].y),x=0;x+=l.distanceTo(c),x+=c.distanceTo(f),x+=f.distanceTo(g);let E=Math.min(.5,1/(x/e));for(let A=E;A<1;A+=E){let T=3*(c.x-l.x),I=3*(f.x-c.x)-T,S=g.x-l.x-T-I,D=3*(c.y-l.y),q=3*(f.y-c.y)-D,V=g.y-l.y-D-q,W=S*Math.pow(A,3)+I*Math.pow(A,2)+T*A+l.x,X=V*Math.pow(A,3)+q*Math.pow(A,2)+D*A+l.y;r.push({x:Math.round(W),y:Math.round(X),a:0,l:0})}}return r.unshift({x:a[0].x,y:a[0].y,a:0,l:0}),r.push({x:a[a.length-1].x,y:a[a.length-1].y,a:0,l:0}),r}static getClothoidLength(t){let e=0;if(t.length>2)for(let r=0;r<t.length;r++){let a=Math.max(0,r-1);r>0&&(e+=this.getDistance(t[a],t[a+1]))}return e}static getCircleCenterByChord(t,e,r,a=!0,u=new L){const l=this.getDistance(t,e);if(l===0)return u.x=1/0,u.y=1/0,u;wu.set((t.x+e.x)/2,(t.y+e.y)/2);const c=Math.sqrt(r*r-l*l/4),f=a?-1:1;return u.x=wu.x+f*c*(e.y-t.y)/l,u.y=wu.y-f*c*(e.x-t.x)/l,u}static isPointInCircle(t,e,r){return this.getDistance(r,t)<e}static isPointInPolygonByRay(t,e){let r=0;const a=new L().copy(t),u=new L,l=new L;for(let c=0;c<e.length;c++){c===e.length-1?(u.copy(e[c]),l.copy(e[0])):(u.copy(e[c]),l.copy(e[c+1]));let f=[u.y,l.y].sort((g,x)=>g-x);f[0]<a.y&&f[1]>a.y&&(u.x<a.x||l.x<a.x)&&r++}return r%2===1}static whichSideOfSegment(t,e,r){return(e.x-t.x)*(r.y-t.y)-(r.x-t.x)*(e.y-t.y)}static getIntersectionOfSegments(t,e,r,a,u=!1,l=new L){const c=(a.y-r.y)*(e.x-t.x)-(a.x-r.x)*(e.y-t.y);if(c===0)return l.makeEmpty();const f=(a.x-r.x)*(t.y-r.y)-(a.y-r.y)*(t.x-r.x),g=(e.x-t.x)*(t.y-r.y)-(e.y-t.y)*(t.x-r.x),x=f/c,E=g/c;return u&&(x<0||x>1||E<0||E>1)?l.makeEmpty():(l.x=t.x+x*(e.x-t.x),l.y=t.y+x*(e.y-t.y),l)}static getConvexHullByGrahamScan(t,e=!1,r=[]){if(!t||!t.length)return r;const a=t.length;let u=0;for(let f=0;f<a;f++)t[f].x<t[u].x&&(u=f);let l=u,c;do{r.push(t[l]),c=(l+1)%a;for(let f=0;f<a;f++)this.whichSideOfSegment(t[l],t[f],t[c])>0&&(c=f);l=c}while(l!==u);return e&&r.push(t[u]),r}static getPointsWithMatrix3(t,e){const r=[];if(!t)return r;for(let a=0,u=t.length;a<u;a++)r.push({x:e.elements[0]*t[a].x+e.elements[3]*t[a].y+e.elements[6],y:e.elements[1]*t[a].x+e.elements[4]*t[a].y+e.elements[7]});return r}static getPointsApplyMatrix3(t,e=[]){for(let r=0,a=e.length;r<a;r++){const u=t.elements[0]*e[r].x+t.elements[3]*e[r].y+t.elements[6],l=t.elements[1]*e[r].x+t.elements[4]*e[r].y+t.elements[7];e[r].x=u,e[r].y=l}return e}add(t){return this.x+=t.x,this.y+=t.y,this}addScalar(t){return this.x+=t,this.y+=t,this}addScaledVector(t,e){return this.x+=t.x*e,this.y+=t.y*e,this}addVectors(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}applyMatrix3(t){const e=this.x,r=this.y,a=t.elements;return this.x=a[0]*e+a[3]*r+a[6],this.y=a[1]*e+a[4]*r+a[7],this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}ceilToZero(){return this.x=this.x<0?Math.floor(this.x):Math.ceil(this.x),this.y=this.y<0?Math.floor(this.y):Math.ceil(this.y),this}clamp(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this}clampLength(t,e){const r=this.length();return this.divideScalar(r||1).multiplyScalar(Math.max(t,Math.min(e,r)))}clampScalar(t,e){return this.x=Math.max(t,Math.min(e,this.x)),this.y=Math.max(t,Math.min(e,this.y)),this}clone(){return new L(this.x,this.y)}copy(t){return this.x=t.x,this.y=t.y,this}cross(t){return this.x*t.y-this.y*t.x}distanceTo(t){return Math.sqrt(this.distanceToSquared(t))}distanceToSquared(t){const e=this.x-t.x,r=this.y-t.y;return e*e+r*r}divide(t){return this.x/=t.x,this.y/=t.y,this}divideScalar(t){return this.multiplyScalar(1/t)}dot(t){return this.x*t.x+this.y*t.y}equals(t,e=!0){return e?t.x===this.x&&t.y===this.y:Math.abs(t.x-this.x)<Number.EPSILON&&Math.abs(t.y-this.y)<Number.EPSILON}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}floorToZero(){return this.roundToZero()}fromArray(t,e=0){return this.x=t[e],this.y=t[e+1],this.z=t[e+2],this}fromBufferAttribute(t,e){return this.x=t.getX(e),this.y=t.getY(e),this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("out of range: "+t)}}identity(){return this.set(0,0)}isEmpty(){return!Number.isFinite(this.x)&&!Number.isFinite(this.y)}isZero(){return this.x===0&&this.y===0}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}lengthSq(){return this.x*this.x+this.y*this.y}lerp(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this}lerpVectors(t,e,r){return this.x=t.x+(e.x-t.x)*r,this.y=t.y+(e.y-t.y)*r,this}makeEmpty(){return this.x=1/0,this.y=1/0,this}manhattanDistanceTo(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this}maxXY(t,e){return this.x=Math.max(this.x,t),this.y=Math.max(this.y,e),this}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this}minXY(t,e){return this.x=Math.max(this.x,t),this.y=Math.max(this.y,e),this}multiply(t){return this.x*=t.x,this.y*=t.y,this}multiplyScalar(t,e){return this.x*=t,this.y*=e||t,this}multiplyVectors(t,e){return this.x=t.x*e.x,this.y=t.y*e.y,this}negate(){return this.x=-this.x,this.y=-this.y,this}normalize(){return this.divideScalar(this.length()||1)}project(t){return this.applyMatrix3(t.matrixWorldInverse).applyMatrix3(t.projectionMatrix)}random(){return this.x=Math.random(),this.y=Math.random(),this}rotate(t){const e=Math.cos(t),r=Math.sin(t),a=this.x,u=this.y;return this.x=a*e-u*r,this.y=a*r+u*e,this}rotateAround(t,e){const r=Math.cos(e),a=Math.sin(e),u=this.x-t.x,l=this.y-t.y;return this.x=u*r-l*a+t.x,this.y=u*a+l*r+t.y,this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this}set(t,e){return this.x=t,this.y=e,this}setComponent(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;case 2:this.z=e;break;default:throw new Error("out of range: "+t)}return this}setFromMatrixColumn(t,e){return this.fromArray(t.elements,e*3)}setLength(t){return this.normalize().multiplyScalar(t)}setScalar(t){return this.x=t,this.y=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setZ(t){return this.z=t,this}sub(t){return this.x-=t.x,this.y-=t.y,this}subScalar(t){return this.x-=t,this.y-=t,this}subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this}toArray(t=[],e=0){return t[e]=this.x,t[e+1]=this.y,t}toString(){return`{x:${this.x},y:${this.y}}`}unproject(t,e=!1){return this.applyMatrix3(t.projectionMatrixInverse).applyMatrix3(t.matrixWorld)}validate(){return!(isNaN(this.x)||isNaN(this.y))}*[Symbol.iterator](){yield this.x,yield this.y}}const wu=new L,Cd=Object.freeze(Object.defineProperty({__proto__:null,default:L},Symbol.toStringTag,{value:"Module"})),Sd=gt.window.requestAnimationFrame,Yn=gt.window.performance?()=>gt.window.performance.now():()=>new Date().getTime(),xh=Sd;class wt{static idCounter=0;id=wt.idCounter++;timers=new Map;timersDuration=new Map;counters=new Map;countersAmount=new Map;out=[];constructor(){}destroy(){wt.remove(this)}addTimer(t,e=Yn(),r=Yn()-(this.timersDuration.get(t)||Yn())){this.addTimerDuration(t,r),this.timersDuration.set(t,e)}addTimerDuration(t,e){var r;this.timers.has(t)||this.timers.set(t,[]),(r=this.timers.get(t))==null||r.push(e)}calculateTimers(){this.timers.forEach((t,e)=>{!t||!t.length||(this.out.push(this.calculateDurations(e,t)),t.length=0)})}addCounterAmount(t,e){var r;this.counters.has(t)||this.counters.set(t,[]),(r=this.counters.get(t))==null||r.push(e)}calculateCounters(){this.counters.forEach((t,e)=>{!t||!t.length||(this.out.push(this.calculateAmounts(e,t)),t.length=0)})}start(){return this.stop(),wt.add(this),this}stop(){return wt.remove(this),this}calculateDurations(t,e){const r={name:t,avg:0,min:0,max:0,stdDev:0,count:0,FPS:0};if(!e||!e.length)return r;const a=e.length,{min:u,max:l,avg:c}=this.minMaxAvg(e),f=parseFloat(this.stdDev(e,c).toFixed(2));return{name:t,avg:this.fd(c),min:this.fd(u),max:this.fd(l),stdDev:f,count:a,FPS:Math.ceil(a/wt.duration*1e3)}}calculateAmounts(t,e){const r={name:t,avg:0,min:0,max:0,stdDev:0,count:0,FPS:0};if(!e||!e.length)return r;const a=e.length,{min:u,max:l,avg:c}=this.minMaxAvg(e),f=this.stdDev(e,c);return{name:t,avg:c,min:u,max:l,stdDev:f,count:a,FPS:Math.ceil(a/wt.duration*1e3)}}minMaxAvg(t){let e=t[0],r=t[0],a=t.length,u=0;for(let c=0;c<t.length;c++){const f=t[c];u+=f,f<e&&(e=f),f>r&&(r=f)}const l=u/a;return{min:this.fx(e),max:this.fx(r),avg:this.fx(l)}}stdDev(t,e){let r=0;for(let u=0;u<t.length;u++){const l=t[u];r+=(l-e)*(l-e)}const a=t.length;return this.fx(Math.sqrt(r/a))}fd(t){return t>1e3?(t/1e3).toFixed(1)+"s":t.toFixed(1)+"ms"}fx(t,e=1){return e===1?Math.round(t*10)/10:e===2?Math.round(t*100)/100:e===3?Math.round(t*1e3)/1e3:t}static children=[];static isRunning=!1;static actived=!1;static duration=0;static lastTime=Yn();static messages=[];static maxLetters=20;static active(t){t?wt.actived=!0:wt.actived=!1,wt.duration=t||0}static add(t){this.children.push(t),this.handleStart()}static remove(t){for(let e=0,r=wt.children.length;e<r;e++)if(wt.children[e].id===t.id){this.children.splice(e,1);break}}static handleStart(){this.isRunning||(this.isRunning=!0,xh(this.runLoop))}static runLoop(){wt.children.length?(wt.runFrames(),xh(wt.runLoop)):wt.isRunning=!1}static runFrames(){let t,e=Yn();if(!(e-wt.lastTime<wt.duration)){wt.lastTime=e;for(let r=0,a=this.children.length;r<a;r++)t=this.children[r],t.calculateTimers(),t.calculateCounters(),wt.messages=wt.messages.concat(t.out),t.out.length=0;if(wt.messages.length){if(wt.actived){let r=[];r.push(Dd),r.push(Nd),r.push(Md),this.messages.forEach(a=>r.push(Rd(a,this.maxLetters))),r.push(Od),console.log(r.join(`
5
+ @`+(n.systemId||"")+"#[line:"+n.lineNumber+",col:"+n.columnNumber+"]"}function vh(n,t,e){return typeof n=="string"?n.substr(t,e):n.length>=t+e||t?new java.lang.String(n,t,e)+"":n}"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,function(n){Gn.prototype[n]=function(){return null}});function Zs(n,t){n.currentElement?n.currentElement.appendChild(t):n.doc.appendChild(t)}Xs.__DOMHandler=Gn,Xs.normalizeLineEndings=mh,Xs.DOMParser=yh;var xd=Xs.DOMParser;const Ed="1.0.13";function Ad(){return typeof window<"u"&&({}.toString.call(window)==="[object Window]"||{}.toString.call(window)==="[object global]")}const en=typeof window<"u"?window:typeof WorkerGlobalScope<"u"?self:{document:void 0,tinyEngine:void 0};en.Path2D||Hp(en),en.DOMParser||(en.DOMParser=xd);const gt={window:en,version:Ed,isBrowser:Ad(),dpr:typeof window<"u"&&window.devicePixelRatio||1,document:en.document,time:0,deltaTime:0,config:$r},Xn=(n,t,e)=>Math.max(t,Math.min(e,n)),Ki=(n,t=1e-6)=>Math.abs(n)<t?0:n<0?-1:1,Ks=n=>n*(Math.PI/180),bd=(n,t)=>(n%t+t)%t,Au=(n,t,e)=>(1-e)*n+e*t,wd=n=>{let t=n*(180/Math.PI);return t<0&&(t+=360),t>360&&(t-=360),t},be={transparent:"rgba(1, 1, 1, 0)",green:"#45b787",darkGreen:"#314a43",blue:"#6e9bc5",darkBlue:"#2775b6",red:"#F26666",darkRed:"#D95970",brown:"#ECD2B9",darkBrown:"#BF9D8A",yellow:"#ECDEC0",darkYellow:"#D0AC57",lightGray:"#e0e0e0",gray:"#beb6b6",darkGray:"#918883",white:"#F2F2F2",darkWhite:"#ececec",lightBlack:"#2E3032",black:"#182327",blackAlpha5:"rgba(0, 0, 0, 0.5)"},Td={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},Ye={h:0,s:0,l:0},Qs={h:0,s:0,l:0};function bu(n,t,e){return e<0&&(e+=1),e>1&&(e-=1),e<1/6?n+(t-n)*6*e:e<1/2?t:e<2/3?n+(t-n)*6*(2/3-e):n}const _d=/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3}|[A-Fa-f0-9]{8})$|rgb\(\s*\d+\s*,\s*\d+\s*,\s*\d+\s*\)|rgba\(\s*\d+\s*,\s*\d+\s*,\s*\d+\s*,\s*[\d.]+\s*\)/;class we{isColor=!0;r=1;g=1;b=1;a=1;constructor(t,e,r,a){return e===void 0&&r===void 0?this.set(t):this.setRGBA(t,e,r,a)}static isColor(t){return typeof t=="string"?_d.test(t):typeof t=="number"?t>=0&&t<=16777215:!1}static getRandomStyle(){return Qi.random().getStyle()}static getDarken(t,e=.8){return Qi.set(t).getHSL(Js),Qi.setHSL(Js.h,Js.s,Js.l*e).getStyle()}static getLighten(t,e=1.2){return this.getDarken(t,e)}static getContrast(t){return Qi.set(t),Qi.getContrastString()}static getArray(t){return Qi.set(t).toArray()}static getComplementary(t){return Qi.set(t),Qi.getComplementaryString()}set(t){return t&&t.isColor?this.copy(t):typeof t=="number"?this.setHex(t):typeof t=="string"&&this.setStyle(t),this}random(){return this.setHex(Math.floor(Math.random()*(1<<24)))}setScalar(t){return this.r=t,this.g=t,this.b=t,this.a=1,this}setHex(t){return t=Math.floor(t),this.r=(t>>16&255)/255,this.g=(t>>8&255)/255,this.b=(t&255)/255,this.a=1,this}setR(t){return this.r=t,this}setG(t){return this.g=t,this}setB(t){return this.b=t,this}setA(t){return this.a=t,this}setRGB(t,e,r){return this.setRGBA(t,e,r,this.a)}setRGBA(t,e,r,a=1){return this.r=t,this.g=e,this.b=r,this.a=a,this}setHSL(t,e,r,a=1){if(t=bd(t,1),e=Xn(e,0,1),r=Xn(r,0,1),e===0)this.r=this.g=this.b=r;else{const u=r<=.5?r*(1+e):r+e-r*e,l=2*r-u;this.r=bu(l,u,t+1/3),this.g=bu(l,u,t),this.b=bu(l,u,t-1/3)}return this.a=a,this}setStyle(t){let e;if(e=/^((?:rgb|hsl)a?)\(([^\)]*)\)/.exec(t)){let r;const a=e[1],u=e[2];switch(a){case"rgb":case"rgba":if(r=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(u))return this.r=Math.min(255,parseInt(r[1],10))/255,this.g=Math.min(255,parseInt(r[2],10))/255,this.b=Math.min(255,parseInt(r[3],10))/255,this.a=Math.max(Math.min(1,r[4]!==void 0?parseFloat(r[4]):1),0),this;if(r=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(u))return this.r=Math.min(100,parseInt(r[1],10))/100,this.g=Math.min(100,parseInt(r[2],10))/100,this.b=Math.min(100,parseInt(r[3],10))/100,this.a=Math.max(Math.min(1,r[4]!==void 0?parseFloat(r[4]):1),0),this;break;case"hsl":case"hsla":if(r=/^\s*(\d*\.?\d+)\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(u)){const l=parseFloat(r[1])/360,c=parseInt(r[2],10)/100,f=parseInt(r[3],10)/100,g=Math.max(Math.min(1,r[4]!==void 0?parseFloat(r[4]):1),0);return this.setHSL(l,c,f,g)}break}}else if(e=/^\#([A-Fa-f\d]+)$/.exec(t)){const r=e[1],a=r.length;if(a===3)return this.r=parseInt(r.charAt(0)+r.charAt(0),16)/255,this.g=parseInt(r.charAt(1)+r.charAt(1),16)/255,this.b=parseInt(r.charAt(2)+r.charAt(2),16)/255,this.a=1,this;if(a===6)return this.r=parseInt(r.charAt(0)+r.charAt(1),16)/255,this.g=parseInt(r.charAt(2)+r.charAt(3),16)/255,this.b=parseInt(r.charAt(4)+r.charAt(5),16)/255,this.a=1,this}return t&&t.length>0?this.setColorName(t):this}setColorName(t){const e=Td[t.toLowerCase()];return e!==void 0?this.setHex(e):console.warn("Color: Unknown color "+t),this}clone(){return new we(this.r,this.g,this.b,this.a)}copy(t){return this.r=t.r,this.g=t.g,this.b=t.b,this.a=t.a,this}getRGB(t=new we){return t.setRGB(this.r,this.g,this.b)}getRGBByBg(t=new we){const e=this.a,r=e*this.r+(1-e)*t.r,a=e*this.g+(1-e)*t.g,u=e*this.b+(1-e)*t.b;return new we(r,a,u)}getHex(){return Xn(this.r*255,0,255)<<16^Xn(this.g*255,0,255)<<8^Xn(this.b*255,0,255)<<0}getHSL(t){const e=this.r,r=this.g,a=this.b,u=Math.max(e,r,a),l=Math.min(e,r,a);let c=0,f;const g=(l+u)/2;if(l===u)c=0,f=0;else{const x=u-l;switch(f=g<=.5?x/(u+l):x/(2-u-l),u){case e:c=(r-a)/x+(r<a?6:0);break;case r:c=(a-e)/x+2;break;case a:c=(e-r)/x+4;break}c/=6}return t.h=c,t.s=f,t.l=g,t}getStyle(){return this.a===1?`rgb(${this.r*255|0},${this.g*255|0},${this.b*255|0})`:`rgba(${this.r*255|0},${this.g*255|0},${this.b*255|0},${this.a||1})`}getHexString(){return"#"+("000000"+this.getHex().toString(16)).slice(-6)}getBrightness(){let t=(this.r*255*299+this.g*255*587+this.b*255*144)/1e3;return t+=(255-t)*(255-this.a*255)/255,t}getContrastString(){return this.getBrightness()>125?"#2f2f2f":"#f2f2f2"}getComplementary(t=new we){const e=this.toArray(),r=[0,0,0,1];for(let a=0;a<e.length;a++)if(a<3)r[a]=1-e[a];else if(a===3)e[a]>1||e[a]<=0?r[a]=1:r[a]=Math.max(Math.min(parseFloat(e[a].toFixed(2)),1),0);else continue;return t.setRGBA(r[0],r[1],r[2],parseFloat(r[3].toFixed(2)))}getComplementaryString(){return this.getComplementary().getStyle()}getLightenOrDarken(t){if(typeof t>"u"||t>=1)return this.getHexString();const e=this.getRGBByBg(),r=e.r*t+(1-t),a=e.g*t+(1-t),u=e.b*t+(1-t);return new we(r,a,u).getHexString()}getNormalized(){return[parseFloat(Math.max(Math.min(this.r,1),0).toFixed(2)),parseFloat(Math.max(Math.min(this.g,1),0).toFixed(2)),parseFloat(Math.max(Math.min(this.b,1),0).toFixed(2)),parseFloat(Math.max(Math.min(this.a,1),0).toFixed(2))]}getNormalized3(){return[parseFloat(Math.max(Math.min(this.r,1),0).toFixed(2)),parseFloat(Math.max(Math.min(this.g,1),0).toFixed(2)),parseFloat(Math.max(Math.min(this.b,1),0).toFixed(2))]}offsetHSL(t,e,r){return this.getHSL(Ye),Ye.h+=t,Ye.s+=e,Ye.l+=r,this.setHSL(Ye.h,Ye.s,Ye.l),this}add(t){return this.r+=t.r,this.g+=t.g,this.b+=t.b,this}addColors(t,e){return this.r=t.r+e.r,this.g=t.g+e.g,this.b=t.b+e.b,this}addScalar(t){return this.r+=t,this.g+=t,this.b+=t,this}sub(t){return this.r=Math.max(0,this.r-t.r),this.g=Math.max(0,this.g-t.g),this.b=Math.max(0,this.b-t.b),this}multiply(t){return this.r*=t.r,this.g*=t.g,this.b*=t.b,this}multiplyScalar(t){return this.r*=t,this.g*=t,this.b*=t,this}lerp(t,e){return this.r+=(t.r-this.r)*e,this.g+=(t.g-this.g)*e,this.b+=(t.b-this.b)*e,this}lerpColors(t,e,r){return this.r=t.r+(e.r-t.r)*r,this.g=t.g+(e.g-t.g)*r,this.b=t.b+(e.b-t.b)*r,this}lerpHSL(t,e){this.getHSL(Ye),t.getHSL(Qs);const r=Au(Ye.h,Qs.h,e),a=Au(Ye.s,Qs.s,e),u=Au(Ye.l,Qs.l,e);return this.setHSL(r,a,u),this}equals(t){return t.r===this.r&&t.g===this.g&&t.b===this.b}fromArray(t,e=0){return this.r=t[e],this.g=t[e+1],this.b=t[e+2],this.a=t[e+3],this}toArray(t=[0,0,0,0],e=0){return t[e]=this.r,t[e+1]=this.g,t[e+2]=this.b,t[e+3]=this.a,t}fromBufferAttribute(t,e){return this.r=t.getX(e),this.g=t.getY(e),this.b=t.getZ(e),t.normalized===!0&&(this.r/=255,this.g/=255,this.b/=255),this}toJSON(){return this.getHex()}*[Symbol.iterator](){yield this.r,yield this.g,yield this.b}}const Qi=new we,Js={h:0,s:0,l:0};class L{isVector2=!0;x=0;y=0;z;constructor(t=0,e=0,r){this.x=t,this.y=e,this.z=r||0}static isZero(t){return t.x===0&&t.y===0}static isEmpty(t){return!Number.isFinite(t.x)&&!Number.isFinite(t.y)}static equals(t,e,r=!0){return r?t.x===e.x&&t.y===e.y:Math.abs(t.x-e.x)<Number.EPSILON&&Math.abs(t.y-e.y)<Number.EPSILON}static getInt32Array(t,e=2){const r=new ArrayBuffer(t.length*e*4),a=new Int32Array(r);for(let u=0,l=t.length;u<l;u++)a[u*2]=t[u].x,a[u*2+1]=t[u].y;return a}static getFloat64Array(t,e=2){const r=new ArrayBuffer(t.length*e*8),a=new Float64Array(r);for(let u=0,l=t.length;u<l;u++)a[u*2]=t[u].x,a[u*2+1]=t[u].y;return a}static getVectors(t){const e=[];for(let r=0,a=t.length;r<a;r++)e.push(new L(t[r].x,t[r].y));return e}static getStrings(t){const e=[];if(!t||!t.length)return"";for(let r=0,a=t.length;r<a;r++)e.push(L.getString(t[r]));return e.join(",")}static getString(t){return`${t.x},${t.y}`}static getLength(t){return Math.sqrt(t.x*t.x+t.y*t.y)}static getDistance(t,e){return Math.sqrt((t.x-e.x)*(t.x-e.x)+(t.y-e.y)*(t.y-e.y))}static dot(t,e){return t.x*e.y+t.y*e.x}static cross(t,e){return t.x*e.y-t.y*e.x}static sub(t,e){return new L().subVectors(t,e)}static isPointOnSegment(t,e,r){return Ki(this.sub(t,r).cross(this.sub(e,r)))===0&&Ki(this.sub(t,r).dot(this.sub(e,r)))<=0}static angle(t,e,r){return r?Math.atan2(t.y-e.y,t.x-e.x):wd(Math.atan2(t.y-e.y,t.x-e.x))}static getSamplingPoints(t,e=100){let r=this.getClothoidPoints(t,e),a=0;for(let u=0,l=r.length;u<l;u++){let c=Math.max(0,u-1);u>0?a+=this.getDistance(r[c],r[c+1]):a=0,r[u].l=Math.round(a);let f=this.angle(r[c+1],r[c]);r[u].a=Math.round(f*100)/100}return r}static getClothoidPoints(t,e=100){let r=[],a=t.concat([]);if(!a||a.length<2)return r;a.length===2?(a.push(a[1]),a.unshift(a[0])):a.length===3&&a.splice(2,0,a[1]);for(let u=0;u<a.length-3;u+=3){let l=new L(a[u].x,a[u].y),c=new L(a[u+1].x,a[u+1].y),f=new L(a[u+2].x,a[u+2].y),g=new L(a[u+3].x,a[u+3].y),x=0;x+=l.distanceTo(c),x+=c.distanceTo(f),x+=f.distanceTo(g);let E=Math.min(.5,1/(x/e));for(let A=E;A<1;A+=E){let T=3*(c.x-l.x),I=3*(f.x-c.x)-T,S=g.x-l.x-T-I,D=3*(c.y-l.y),q=3*(f.y-c.y)-D,V=g.y-l.y-D-q,W=S*Math.pow(A,3)+I*Math.pow(A,2)+T*A+l.x,X=V*Math.pow(A,3)+q*Math.pow(A,2)+D*A+l.y;r.push({x:Math.round(W),y:Math.round(X),a:0,l:0})}}return r.unshift({x:a[0].x,y:a[0].y,a:0,l:0}),r.push({x:a[a.length-1].x,y:a[a.length-1].y,a:0,l:0}),r}static getClothoidLength(t){let e=0;if(t.length>2)for(let r=0;r<t.length;r++){let a=Math.max(0,r-1);r>0&&(e+=this.getDistance(t[a],t[a+1]))}return e}static getCircleCenterByChord(t,e,r,a=!0,u=new L){const l=this.getDistance(t,e);if(l===0)return u.x=1/0,u.y=1/0,u;wu.set((t.x+e.x)/2,(t.y+e.y)/2);const c=Math.sqrt(r*r-l*l/4),f=a?-1:1;return u.x=wu.x+f*c*(e.y-t.y)/l,u.y=wu.y-f*c*(e.x-t.x)/l,u}static isPointInCircle(t,e,r){return this.getDistance(r,t)<e}static isPointInPolygonByRay(t,e){let r=0;const a=new L().copy(t),u=new L,l=new L;for(let c=0;c<e.length;c++){c===e.length-1?(u.copy(e[c]),l.copy(e[0])):(u.copy(e[c]),l.copy(e[c+1]));let f=[u.y,l.y].sort((g,x)=>g-x);f[0]<a.y&&f[1]>a.y&&(u.x<a.x||l.x<a.x)&&r++}return r%2===1}static whichSideOfSegment(t,e,r){return(e.x-t.x)*(r.y-t.y)-(r.x-t.x)*(e.y-t.y)}static getIntersectionOfSegments(t,e,r,a,u=!1,l=new L){const c=(a.y-r.y)*(e.x-t.x)-(a.x-r.x)*(e.y-t.y);if(c===0)return l.makeEmpty();const f=(a.x-r.x)*(t.y-r.y)-(a.y-r.y)*(t.x-r.x),g=(e.x-t.x)*(t.y-r.y)-(e.y-t.y)*(t.x-r.x),x=f/c,E=g/c;return u&&(x<0||x>1||E<0||E>1)?l.makeEmpty():(l.x=t.x+x*(e.x-t.x),l.y=t.y+x*(e.y-t.y),l)}static getConvexHullByGrahamScan(t,e=!1,r=[]){if(!t||!t.length)return r;const a=t.length;let u=0;for(let f=0;f<a;f++)t[f].x<t[u].x&&(u=f);let l=u,c;do{r.push(t[l]),c=(l+1)%a;for(let f=0;f<a;f++)this.whichSideOfSegment(t[l],t[f],t[c])>0&&(c=f);l=c}while(l!==u);return e&&r.push(t[u]),r}static getPointsWithMatrix3(t,e){const r=[];if(!t)return r;for(let a=0,u=t.length;a<u;a++)r.push({x:e.elements[0]*t[a].x+e.elements[3]*t[a].y+e.elements[6],y:e.elements[1]*t[a].x+e.elements[4]*t[a].y+e.elements[7]});return r}static getPointsApplyMatrix3(t,e=[]){for(let r=0,a=e.length;r<a;r++){const u=t.elements[0]*e[r].x+t.elements[3]*e[r].y+t.elements[6],l=t.elements[1]*e[r].x+t.elements[4]*e[r].y+t.elements[7];e[r].x=u,e[r].y=l}return e}add(t){return this.x+=t.x,this.y+=t.y,this}addScalar(t){return this.x+=t,this.y+=t,this}addScaledVector(t,e){return this.x+=t.x*e,this.y+=t.y*e,this}addVectors(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}applyMatrix3(t){const e=this.x,r=this.y,a=t.elements;return this.x=a[0]*e+a[3]*r+a[6],this.y=a[1]*e+a[4]*r+a[7],this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}ceilToZero(){return this.x=this.x<0?Math.floor(this.x):Math.ceil(this.x),this.y=this.y<0?Math.floor(this.y):Math.ceil(this.y),this}clamp(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this}clampLength(t,e){const r=this.length();return this.divideScalar(r||1).multiplyScalar(Math.max(t,Math.min(e,r)))}clampScalar(t,e){return this.x=Math.max(t,Math.min(e,this.x)),this.y=Math.max(t,Math.min(e,this.y)),this}clone(){return new L(this.x,this.y)}copy(t){return this.x=t.x,this.y=t.y,this}cross(t){return this.x*t.y-this.y*t.x}distanceTo(t){return Math.sqrt(this.distanceToSquared(t))}distanceToSquared(t){const e=this.x-t.x,r=this.y-t.y;return e*e+r*r}divide(t){return this.x/=t.x,this.y/=t.y,this}divideScalar(t){return this.multiplyScalar(1/t)}dot(t){return this.x*t.x+this.y*t.y}equals(t,e=!0){return e?t.x===this.x&&t.y===this.y:Math.abs(t.x-this.x)<Number.EPSILON&&Math.abs(t.y-this.y)<Number.EPSILON}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}floorToZero(){return this.roundToZero()}fromArray(t,e=0){return this.x=t[e],this.y=t[e+1],this.z=t[e+2],this}fromBufferAttribute(t,e){return this.x=t.getX(e),this.y=t.getY(e),this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("out of range: "+t)}}identity(){return this.set(0,0)}isEmpty(){return!Number.isFinite(this.x)&&!Number.isFinite(this.y)}isZero(){return this.x===0&&this.y===0}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}lengthSq(){return this.x*this.x+this.y*this.y}lerp(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this}lerpVectors(t,e,r){return this.x=t.x+(e.x-t.x)*r,this.y=t.y+(e.y-t.y)*r,this}makeEmpty(){return this.x=1/0,this.y=1/0,this}manhattanDistanceTo(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this}maxXY(t,e){return this.x=Math.max(this.x,t),this.y=Math.max(this.y,e),this}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this}minXY(t,e){return this.x=Math.max(this.x,t),this.y=Math.max(this.y,e),this}multiply(t){return this.x*=t.x,this.y*=t.y,this}multiplyScalar(t,e){return this.x*=t,this.y*=e||t,this}multiplyVectors(t,e){return this.x=t.x*e.x,this.y=t.y*e.y,this}negate(){return this.x=-this.x,this.y=-this.y,this}normalize(){return this.divideScalar(this.length()||1)}project(t){return this.applyMatrix3(t.matrixWorldInverse).applyMatrix3(t.projectionMatrix)}random(){return this.x=Math.random(),this.y=Math.random(),this}rotate(t){const e=Math.cos(t),r=Math.sin(t),a=this.x,u=this.y;return this.x=a*e-u*r,this.y=a*r+u*e,this}rotateAround(t,e){const r=Math.cos(e),a=Math.sin(e),u=this.x-t.x,l=this.y-t.y;return this.x=u*r-l*a+t.x,this.y=u*a+l*r+t.y,this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this}set(t,e){return this.x=t,this.y=e,this}setComponent(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;case 2:this.z=e;break;default:throw new Error("out of range: "+t)}return this}setFromMatrixColumn(t,e){return this.fromArray(t.elements,e*3)}setLength(t){return this.normalize().multiplyScalar(t)}setScalar(t){return this.x=t,this.y=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setZ(t){return this.z=t,this}sub(t){return this.x-=t.x,this.y-=t.y,this}subScalar(t){return this.x-=t,this.y-=t,this}subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this}toArray(t=[],e=0){return t[e]=this.x,t[e+1]=this.y,t}toString(){return`{x:${this.x},y:${this.y}}`}unproject(t,e=!1){return this.applyMatrix3(t.projectionMatrixInverse).applyMatrix3(t.matrixWorld)}validate(){return!(isNaN(this.x)||isNaN(this.y))}*[Symbol.iterator](){yield this.x,yield this.y}}const wu=new L,Cd=Object.freeze(Object.defineProperty({__proto__:null,default:L},Symbol.toStringTag,{value:"Module"})),Sd=gt.window.requestAnimationFrame,Yn=gt.window.performance?()=>gt.window.performance.now():()=>new Date().getTime(),xh=Sd;class wt{static idCounter=0;id=wt.idCounter++;timers=new Map;timersDuration=new Map;counters=new Map;countersAmount=new Map;out=[];constructor(){}destroy(){wt.remove(this)}addTimer(t,e=Yn(),r=Yn()-(this.timersDuration.get(t)||Yn())){this.addTimerDuration(t,r),this.timersDuration.set(t,e)}addTimerDuration(t,e){var r;this.timers.has(t)||this.timers.set(t,[]),(r=this.timers.get(t))==null||r.push(e)}calculateTimers(){this.timers.forEach((t,e)=>{!t||!t.length||(this.out.push(this.calculateDurations(e,t)),t.length=0)})}addCounterAmount(t,e){var r;this.counters.has(t)||this.counters.set(t,[]),(r=this.counters.get(t))==null||r.push(e)}calculateCounters(){this.counters.forEach((t,e)=>{!t||!t.length||(this.out.push(this.calculateAmounts(e,t)),t.length=0)})}start(){return this.stop(),wt.add(this),this}stop(){return wt.remove(this),this}calculateDurations(t,e){const r={name:t,avg:0,min:0,max:0,stdDev:0,count:0,FPS:0};if(!e||!e.length)return r;const a=e.length,{min:u,max:l,avg:c}=this.minMaxAvg(e),f=parseFloat(this.stdDev(e,c).toFixed(2));return{name:t,avg:this.fd(c),min:this.fd(u),max:this.fd(l),stdDev:f,count:a,FPS:Math.ceil(a/wt.duration*1e3)}}calculateAmounts(t,e){const r={name:t,avg:0,min:0,max:0,stdDev:0,count:0,FPS:0};if(!e||!e.length)return r;const a=e.length,{min:u,max:l,avg:c}=this.minMaxAvg(e),f=this.stdDev(e,c);return{name:t,avg:c,min:u,max:l,stdDev:f,count:a,FPS:Math.ceil(a/wt.duration*1e3)}}minMaxAvg(t){let e=t[0],r=t[0],a=t.length,u=0;for(let c=0;c<t.length;c++){const f=t[c];u+=f,f<e&&(e=f),f>r&&(r=f)}const l=u/a;return{min:this.fx(e),max:this.fx(r),avg:this.fx(l)}}stdDev(t,e){let r=0;for(let u=0;u<t.length;u++){const l=t[u];r+=(l-e)*(l-e)}const a=t.length;return this.fx(Math.sqrt(r/a))}fd(t){return t>1e3?(t/1e3).toFixed(1)+"s":t.toFixed(1)+"ms"}fx(t,e=1){return e===1?Math.round(t*10)/10:e===2?Math.round(t*100)/100:e===3?Math.round(t*1e3)/1e3:t}static children=[];static isRunning=!1;static actived=!1;static duration=0;static lastTime=Yn();static messages=[];static maxLetters=20;static active(t){t?wt.actived=!0:wt.actived=!1,wt.duration=t||0}static add(t){this.children.push(t),this.handleStart()}static remove(t){for(let e=0,r=wt.children.length;e<r;e++)if(wt.children[e].id===t.id){this.children.splice(e,1);break}}static handleStart(){this.isRunning||(this.isRunning=!0,xh(this.runLoop))}static runLoop(){wt.children.length?(wt.runFrames(),xh(wt.runLoop)):wt.isRunning=!1}static runFrames(){let t,e=Yn();if(!(e-wt.lastTime<wt.duration)){wt.lastTime=e;for(let r=0,a=this.children.length;r<a;r++)t=this.children[r],t.calculateTimers(),t.calculateCounters(),wt.messages=wt.messages.concat(t.out),t.out.length=0;if(wt.messages.length){if(wt.actived){let r=[];r.push(Dd),r.push(Nd),r.push(Md),this.messages.forEach(a=>r.push(Rd(a,this.maxLetters))),r.push(Od),console.log(r.join(`
6
6
  `))}wt.messages.length=0}}}}const js=20,ta=["avg","min","max","stdDev","count","FPS"],fi=Id(ta,1),Dd=Bd(ta,js),Nd=Pd(ta,js),Md=Ld(ta,js),Od=Fd(js);function Bd(n,t=20){let e="┌";e+="─".repeat(t),e+="┬";for(let r=0,a=n.length;r<a;r++)e+="─".repeat(fi),r<a-1?e+="┬":e+="┐";return e}function Id(n,t=0){let e=0;for(let r=0,a=n.length;r<a;r++)e=Math.max(e,n[r].length);return e+t}function Pd(n,t=20){let e="│";e+=" ".repeat(t),e+="│";for(let r=0,a=n.length;r<a;r++)e+=" ".repeat(Math.max(fi-n[r].length-1,0)),e+=n[r],e+=" │";return e}function Ld(n,t=20){let e="├";e+="─".repeat(t),e+="┼";for(let r=0,a=n.length;r<a;r++)e+="─".repeat(fi),r<a-1?e+="┴":e+="┘";return e}function Rd(n,t=20){let e="│";e+=" ".repeat(Math.max(t-n.name.length,0)),e+=n.name,e+="│";const r=typeof n.avg=="string"?fi-n.avg.length:fi-n.avg.toString().length;return e+=" ".repeat(Math.max(r,0)),e+=n.avg+" ",e+=" ".repeat(Math.max(fi-n.min.toString().length,0)),e+=n.min+" ",e+=" ".repeat(Math.max(fi-n.max.toString().length,0)),e+=n.max+" ",e+=" ".repeat(Math.max(fi-n.stdDev.toString().length,0)),e+=n.stdDev+" ",e+=" ".repeat(Math.max(fi-n.count.toString().length,0)),e+=n.count+" ",e+=" ".repeat(Math.max(fi-n.FPS.toString().length,0)),e+=n.FPS,e}function Fd(n=20){let t="└";for(let e=0;e<n;e++)t+="─";return t+="┘",t}class Ji{_listeners=new Map;destroy(){this._listeners.clear()}addEventListener(t,e){let r=this._listeners.get(t);r||(r=[],this._listeners.set(t,r)),r.includes(e)||r.push(e)}addEventListeners(t,e){const r=t.split(","),a=r.length;for(let u=0;u<a;u++)this.addEventListener(r[u].trim(),e)}isListening(t){var e;return this._listeners.has(t)&&!!((e=this._listeners.get(t))!=null&&e.length)}hasEventListener(t,e){var r;return this._listeners.size===0?!1:this._listeners.has(t)&&!!((r=this._listeners.get(t))!=null&&r.includes(e))}removeEventListener(t,e){const r=this._listeners.get(t);if(r){const a=r.indexOf(e);a>-1&&r.splice(a,1)}}dispatchEvent(t){const e=this._listeners.get(t.type);if(e){t.target=this;const r=e.slice(0);for(let a=0,u=r.length;a<u;a++)r[a].call(this,t);t.target=void 0}}dispatchEventAsync(t){const e=this._listeners.get(t.type);e&&setTimeout(()=>{for(const r of e)r.call(this,t)})}}function Ud(n){var t,e;return(e=(t=gt.window)==null?void 0:t.document)==null?void 0:e.createElement(n)}async function qd(n=2e3){return new Promise(t=>setTimeout(t,(Math.random()+.5)*n))}var ea={exports:{}};/**
7
7
  * @license
8
8
  * Lodash <https://lodash.com/>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "archgine",
3
- "version": "1.0.11",
3
+ "version": "1.0.13",
4
4
  "description": "A simple rendering engine developed by archbds.",
5
5
  "author": "diozhu@163.com",
6
6
  "license": "ISC",